tungsten 0.1.34 → 0.1.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/tungsten/_icons.js +1 -1
  3. data/app/assets/javascripts/tungsten/tungsten.js +1 -1
  4. data/app/assets/stylesheets/tungsten/components/_buttons.scss +21 -1
  5. data/app/assets/stylesheets/tungsten/components/_cards.scss +5 -5
  6. data/app/assets/stylesheets/tungsten/components/_icons.scss +11 -0
  7. data/app/assets/stylesheets/tungsten/components/_index.scss +1 -0
  8. data/app/assets/stylesheets/tungsten/components/_tables.scss +50 -0
  9. data/app/assets/stylesheets/tungsten/components/_time.scss +4 -11
  10. data/app/assets/stylesheets/tungsten/core/_banner.scss +1 -0
  11. data/app/assets/stylesheets/tungsten/form/_base.scss +1 -0
  12. data/app/assets/stylesheets/tungsten/form/_input-row.scss +3 -2
  13. data/app/assets/stylesheets/tungsten/form/_label-placeholder.scss +2 -2
  14. data/app/assets/stylesheets/tungsten/form/_validation.scss +37 -15
  15. data/app/assets/svgs/tungsten/angle-down.svg +1 -0
  16. data/app/helpers/tungsten/button_helper.rb +11 -8
  17. data/app/helpers/tungsten/content_helper.rb +13 -6
  18. data/app/helpers/tungsten/form_for_helper.rb +25 -0
  19. data/app/helpers/tungsten/form_helper.rb +26 -1
  20. data/app/helpers/tungsten/icon_helper.rb +2 -2
  21. data/app/helpers/tungsten/table_helper.rb +62 -0
  22. data/lib/tungsten/version.rb +1 -1
  23. data/public/{code-0.1.34.js → code-0.1.35.js} +1 -1
  24. data/public/{code-0.1.34.js.gz → code-0.1.35.js.gz} +0 -0
  25. data/public/{code-0.1.34.map.json → code-0.1.35.map.json} +0 -0
  26. data/public/{tungsten-0.1.34.css → tungsten-0.1.35.css} +114 -26
  27. data/public/tungsten-0.1.35.css.gz +0 -0
  28. data/public/{tungsten-0.1.34.js → tungsten-0.1.35.js} +4 -4
  29. data/public/tungsten-0.1.35.js.gz +0 -0
  30. data/public/tungsten-0.1.35.map.json +1 -0
  31. metadata +14 -10
  32. data/public/tungsten-0.1.34.css.gz +0 -0
  33. data/public/tungsten-0.1.34.js.gz +0 -0
  34. data/public/tungsten-0.1.34.map.json +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/browser-pack/_prelude.js","app/assets/javascripts/tungsten/_esvg.js","app/assets/javascripts/tungsten/_form-helpers.js","app/assets/javascripts/tungsten/_icons.js","app/assets/javascripts/tungsten/enhancements/clipboard.js","app/assets/javascripts/tungsten/enhancements/flash-messages.js","app/assets/javascripts/tungsten/enhancements/notify.js","app/assets/javascripts/tungsten/enhancements/text-helpers.js","app/assets/javascripts/tungsten/tungsten.js","node_modules/bean/bean.js","node_modules/component-emitter/index.js","node_modules/compose-event/index.js","node_modules/compose-event/lib/animation-events.js","node_modules/compose-event/lib/bubble-form-events.js","node_modules/compose-event/lib/callback-manager.js","node_modules/compose-event/lib/debounce.js","node_modules/compose-event/lib/delay.js","node_modules/compose-event/lib/media.js","node_modules/compose-event/lib/optimized-event-manager.js","node_modules/compose-event/lib/page.js","node_modules/compose-event/lib/repeat.js","node_modules/compose-event/lib/resize.js","node_modules/compose-event/lib/scroll.js","node_modules/compose-event/lib/shims/custom-event.js","node_modules/compose-event/lib/tap-events.js","node_modules/compose-event/lib/throttle.js","node_modules/compose-form-up/index.js","node_modules/compose-form-up/lib/progressive.js","node_modules/compose-form-up/lib/validation.js","node_modules/compose-slider/index.js","node_modules/compose-slider/lib/object.assign.js","node_modules/compose-time-toggle/index.js","node_modules/compose-time-toggle/lib/date-to-html.js","node_modules/compose-time-toggle/lib/timeago.js","node_modules/compose-time-toggle/lib/toggle.js","node_modules/compose-toggler/index.js","node_modules/compose-toolbox/index.js","node_modules/compose-toolbox/lib/ease.js","node_modules/compose-toolbox/lib/fromtop.js","node_modules/compose-toolbox/lib/scrollto.js","node_modules/compose-toolbox/lib/shims/_classlist.js","node_modules/compose-toolbox/lib/shims/_object.assign.js","node_modules/keymaster/keymaster.js","node_modules/superagent/lib/client.js","node_modules/superagent/lib/is-object.js","node_modules/superagent/lib/request-base.js","node_modules/superagent/lib/request.js"],"names":["dasherize","input","replace","use","name","options","id","symbol","svgs","parent","parentElement","prefix","dataset","base","symbolClass","svg","document","createRange","createContextualFragment","firstChild","setAttribute","trim","getAttribute","width","height","scale","console","error","names","_step","_iterator","querySelectorAll","Symbol","iterator","_iteratorNormalCompletion","next","done","value","esvg","window","Turbolinks","addEventListener","event","module","exports","syncValue","target","classList","toggle","length","toolbox","require","Event","notify","textSelectors","change","each","on","button","querySelector","message","submitMessage","buttonText","disableOnSubmit","disableWith","disabled","enabledText","innerHTML","onpageshow","dismiss","embed","insertAdjacentHTML","readyState","clipboard","copy","log","copyTrigger","currentTarget","copyElement","copyTarget","preventDefault","select","execCommand","blur","add","setTimeout","remove","err","alert","Notify","flash","type","textContent","show","clearTimeout","autoDismissTimeout","messageEl","body","template","lastChild","typeIcon","iconsByType","closeIcon","class","msg","outerHTML","defaults","defaultsByType","dismissAfter","keyOne","one","callback","cb","timeout","afterAnimation","parentNode","removeChild","success","progress","form-action","autoSizeTextarea","textarea","contains","style","offset","offsetHeight","clientHeight","newHeight","scrollHeight","maxHeight","innerHeight","textareas","delay","Array","prototype","forEach","call","node","RegExp","matchUrl","test","location","pathname","timeToggle","toggler","formUp","ajax","scroll","disablePointer","timeago","setup","Tungsten","merge","form","context","definition","define","amd","this","selectorEngine","win","old","namespaceRegex","nameRegex","addEvent","doc","root","documentElement","W3C_MODEL","eventSupport","ONE","slice","str2arr","s","d","split","isString","o","isFunction","isObject","buildOptions","originalDefaults","maybeOptions","key","hasOwnProperty","nativeEvents","hash","events","i","customEvents","isAncestor","element","container","compareDocumentPosition","nodeType","check","related","relatedTarget","toString","mouseenter","condition","mouseleave","mousewheel","navigator","userAgent","commonProps","mouseProps","concat","mouseWheelProps","keyProps","textProps","touchProps","messageProps","stateProps","overOutRegex","typeFixers","reg","fix","newEvent","keyCode","which","rightClick","pos","x","y","pageX","pageY","clientX","clientY","scrollLeft","scrollTop","typeFixerMap","isNative","arguments","ownerDocument","parentWindow","originalEvent","isBean","l","p","props","fixer","srcElement","returnValue","stopPropagation","cancelBubble","stop","stopped","stopImmediatePropagation","isImmediatePropagationStopped","clone","ne","targetElement","RegEntry","wrappedHandler","fn","args","eargs","apply","findTarget","eventElement","__beanDel","ft","handler","original","namespaces","customType","once","removeListener","eventType","inNamespaces","checkNamespaces","j","c","matches","checkElement","checkOriginal","checkHandler","registry","map","forAll","pfx","list","all","t","charAt","substr","has","get","entries","entry","push","put","del","splice","removed","setSelectorEngine","e","r","Error","rootListener","propertyName","listeners","listener","custom","useCapture","attachEvent","detachEvent","rm","originalFn","orgType","handlers","delegate","selector","array","match","fireListener","evt","createEvent","dispatchEvent","fireEvent","createEventObject","off","typeSpec","k","isTypeStr","defaultOpts","opts","indexOf","types","first","undefined","delfn","fire","from","beanDel","bean","noConflict","cleanup","CollectGarbage","Emitter","obj","mixin","_callbacks","removeAllListeners","removeEventListener","callbacks","emit","len","hasListeners","setEvent","animationEvent","transform","isEmpty","join","registerType","transformArgs","arg","keys","scope","unbind","el","getComputedStyle","getPropertyValue","transformedArgs","newEvents","shift","objEvents","touchstart","tap","a","Object","page","debounce","throttle","repeat","bubbleFormEvents","resize","callbackManager","media","formBubbling","ready","keyOn","keyOff","camelCaseEventTypes","animationstart","animationend","animationiteration","lowerCaseEventTypes","getAnimationEventTypes","prefixes","animationName","toLowerCase","transformAnimationEvents","cssAnimEventTypes","env","supported","formEls","fireBubble","detail","triggered","ev","CustomEvent","bubbles","cancelable","defaultPrevented","tagName","bubbleOn","bubbleOff","Manager","new","manager","start","bool","enabled","now","Date","pickFunction","found","candidate","wait","max","leading","trailing","leadingFn","trailingFn","queued","handle","lastCalled","lastInvoked","leadingBlocked","invoke","callType","addToQueue","requestAnimationFrame","loop","removeFromQueue","cancelAnimationFrame","maxPassed","waitReached","debounced","argsStart","queueDelay","complete","parseQuery","query","dimension","result","min","size","num","limit","toPx","listen","minWidth","maxWidth","minHeight","matchMedia","addListener","optimizedEventManager","run","running","started","toUpperCase","substring","readyAlready","changed","cancel","disableAnimation","head","pointerEvents","params","initCustomEvent","Tap","e1","e2","timeout_id","endEvents","touches","validation","progressive","validate","invalidateField","reset","formCallbacks","registeredForms","newForm","currentStep","steps","stepIndex","nextStep","active","forward","showStep","index","Number","step","direction","disable","revisit","disableOtherFieldsets","firstInput","focus","setNav","nav","enableFieldsets","fieldset","trigger","formEl","getClosest","fireCallbacks","getCallbacks","formData","filter","Callback","formSelector","watching","nextSelector","backSelector","createElement","checkValidity","validateForm","invalidInput","inputs","some","checkInput","showMessage","statusEl","valid","isValid","activeElement","checkValue","checkLength","setCustomValidity","invalidValue","regexp","escapedRegex","cachedMessage","invalidValueMessage","str","checkCount","goal","lessThanGoal","wordCount","phrasing","display","nextSibling","submit","checkValidation","hideMessage","label","validationMessage","existingMessage","invalidHandler","sliders","listening","Slider","self","refresh","slider","setLabels","setInput","setFill","ranges","data","labels","externalLabels","assign","extractData","extractValues","getLabels","values","segments","camelCase","removeAttribute","inputClass","inputExists","getLineLabels","mark","getData","val","delimiter","external","default","labelCount","objectSize","lineLabels","containerHTML","templateHTML","classes","previousSibling","html","fills","labelTemplate","labelHTML","positionLabel","labelMeta","position","altKey","meta","attributes","nodeName","nodeValue","labelElements","internalSelector","externalSelector","sliderIndex","fill","offsetParent","labelEls","labelAtIndex","set","object","group","TypeError","output","source","nextKey","TimeToggle","dateToHTML","DateToHTML","isNaN","getDate","local","dateString","parse","utc","date","getUTCFullYear","mo","pad","getUTCMonth","getUTCDate","h","getUTCHours","m","getUTCMinutes","getUTCSeconds","zone","getFullYear","getMonth","getHours","getMinutes","getSeconds","timezone","getTimezoneOffset","tz","String","Timeago","timeEls","datetime","timeagoStyle","browserSupport","time","say","just_now","minute_ago","minutes_ago","hour_ago","hours_ago","yesterday","days_ago","last_week","weeks_ago","secs","getTime","mins","Math","floor","hours","days","weeks","Toggle","nextTime","init","toggleEl","mode","setContent","dateHTML","dateTextNode","Toggler","checkboxSelector","radioSelector","selectSelector","hashChange","anchor","checked","getSelectFromOption","selectedIndex","ratchet","triggerToggling","toggleCheckboxes","setupSelects","setupRadios","actions","selectedOptions","action","dispatch","setClass","setState","selectors","sel","settings","classnames","classname","method","triggerTogglerEventsOnChildren","state","toggleAction","focusEl","hide","getLeafNodes","hasChildNodes","getElementsByTagName","elem","children","eventName","leafChildNodes","checkboxes","radio","togglerActive","radioName","siblings","parentForm","showSelectors","dataAttributes","addClassSelectors","addClass","removeClass","option","elements","attr","scrollTo","fromTop","ease","getNext","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","count","collection","rootEl","FormData","fields","field","append","inOutQuad","b","inOutCubic","inOutQuint","ts","tc","inOutCirc","sqrt","round","getBoundingClientRect","top","pageYOffset","move","amount","to","duration","currentTime","animateScroll","testElement","createMethod","DOMTokenList","token","_toggle","force","view","elemCtrProto","Element","objCtr","strTrim","arrIndexOf","item","DOMEx","code","DOMException","checkTokenAndGetIndex","ClassList","trimmedClasses","_updateClassName","classListProto","classListGetter","tokens","iter","updated","defineProperty","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","global","compareArray","a1","a2","updateModifierKey","_mods","modifierMap","modifiersMatch","_downKeys","_MODIFIERS","assignKey","_handlers","getScope","mods","clearModifier","resetModifiers","getKeys","getMods","shortcut","unbindKey","multipleKeys","isPressed","getPressedKeyCodes","setScope","_scope","deleteScope","mi","previousKey","16","18","17","91","⇧","⌥","alt","⌃","ctrl","control","⌘","command","_MAP","backspace","tab","clear","enter","return","esc","escape","space","left","up","right","down","delete","home","end","pageup","pagedown",",",".","/","`","-","=",";","'","[","]","\\","charCodeAt","noop","serialize","pairs","pushEncodedKeyValuePair","isArray","v","subkey","encodeURIComponent","parseString","pair","decodeURIComponent","parseHeader","line","lines","pop","isJSON","mime","reduce","parts","Response","req","xhr","text","responseType","responseText","statusText","_setStatusProperties","status","header","headers","getAllResponseHeaders","getResponseHeader","_setHeaderProperties","_parseBody","response","Request","url","_query","_header","res","rawResponse","statusCode","new_err","request","warn","requestBase","bind","getXHR","XMLHttpRequest","protocol","ActiveXObject","serializeObject","json","xml","urlencoded","form-data","application/x-www-form-urlencoded","application/json","JSON","stringify","ct","statusType","info","ok","clientError","serverError","toError","accepted","noContent","badRequest","unauthorized","notAcceptable","notFound","forbidden","_responseType","accept","auth","user","pass","btoa","username","password","attach","file","filename","_getFormData","_formData","_callback","crossDomainError","crossDomain","_timeoutError","_timeout","_appendQueryString","_data","onreadystatechange","timedout","_aborted","handleProgress","total","percent","loaded","onprogress","upload","_timer","abort","open","_withCredentials","withCredentials","_isHost","contentType","_serializer","setRequestHeader","send","patch","post","_parser","ms","then","resolve","reject","_fullfilledPromise","Promise","innerResolve","innerReject","catch","getHeader","unset","redirects","n","_maxRedirects","toJSON","RequestConstructor"],"mappings":"AAAA;cCAA,WASE,QAASA,GAAWC,GAClB,MAAOA,GAAMC,QAAQ,UAAW,KAAKA,QAAQ,SAAU,KAOzD,QAASC,GAAKC,EAAMC,GAClBA,EAAUA,KACV,IAAIC,GAAKN,EAAWI,GAChBG,EAASC,IAAOF,EAEpB,IAAKC,EAAS,CACZ,GAAIE,GAASF,EAAOG,cAChBC,EAASF,EAAOG,QAAQD,OACxBE,EAASJ,EAAOG,QAAQE,YAExBC,EAAMC,SAASC,cAAcC,yBAA0B,0BAA4BP,EAAS,IAAML,EAAK,aAAca,UAezH,OAdAJ,GAAIK,aAAc,QAASP,EAAO,IAAMF,EAAS,IAAML,EAAK,KAAQD,EAAO,OAAU,IAAKgB,QAC1FN,EAAIK,aAAc,UAAWb,EAAOe,aAAc,YAE1CjB,EAAQkB,OAASlB,EAAQmB,QAAUnB,EAAQoB,OAO5CpB,EAAQkB,OAASR,EAAIK,aAAc,QAAUf,EAAQkB,OACrDlB,EAAQmB,QAAST,EAAIK,aAAc,SAAUf,EAAQmB,UAN1DT,EAAIK,aAAa,QAAUb,EAAOe,aAAa,UAC/CP,EAAIK,aA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IAAIrjB,GAAOlK,SAASrB,KAAKmyB,OACvB,IAAK,GAAI1wB,KAAO6X,GACdtZ,KAAKmyB,MAAM1wB,GAAO6X,EAAK7X,OAEhB,gBAAmB6X,IAEvBzd,GAAMmE,KAAKnE,KAAK,QACrBA,EAAOmE,KAAK4uB,QAAQ,gBAElB5uB,KAAKmyB,MADH,qCAAuCt2B,EAC5BmE,KAAKmyB,MACdnyB,KAAKmyB,MAAQ,IAAM7Y,EACnBA,GAEUtZ,KAAKmyB,OAAS,IAAM7Y,GAGpCtZ,KAAKmyB,MAAQ7Y,CAGf,QAAK/N,GAAOvL,KAAKkzB,QAAQ5Z,GAActZ,MAGlCnE,GAAMmE,KAAKnE,KAAK,QACdmE;;ACjWT,QAASivB,SAAQwF,EAAoBtS,EAAQuM,GAE3C,MAAI,kBAAqBA,GAChB,GAAI+F,GAAmB,MAAOtS,GAAQoJ,IAAImD,GAI/C,GAAK/pB,UAAUxL,OACV,GAAIs7B,GAAmB,MAAOtS,GAGhC,GAAIsS,GAAmBtS,EAAQuM,GAGxC71B,OAAOC,QAAUm2B","file":"bundle.js","sourcesContent":["(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})","(function(){\n var names\n\n function attr( source, name ){\n if (typeof source == 'object')\n return name+'=\"'+source.getAttribute(name)+'\" '\n else\n return name+'=\"'+source+'\" ' }\n\n function dasherize( input ) {\n return input.replace(/[\\W,_]/g, '-').replace(/-{2,}/g, '-')\n }\n\n function svgName( name ) {\n return \"svg-\"+dasherize( name )\n }\n\n function use( name, options ) {\n options = options || {}\n var id = dasherize( name )\n var symbol = svgs()[id]\n\n if ( symbol ) {\n var parent = symbol.parentElement\n var prefix = parent.dataset.prefix\n var base = parent.dataset.symbolClass\n\n var svg = document.createRange().createContextualFragment( '<svg><use xlink:href=\"#' + prefix + '-' + id + '\"/></svg>' ).firstChild;\n svg.setAttribute( 'class', base + ' ' + prefix + '-' + id + ' ' + ( options.class || '' ).trim() )\n svg.setAttribute( 'viewBox', symbol.getAttribute( 'viewBox' ) )\n\n if ( !( options.width || options.height || options.scale ) ) {\n\n svg.setAttribute('width', symbol.getAttribute('width'))\n svg.setAttribute('height', symbol.getAttribute('height'))\n\n } else {\n\n if ( options.width ) svg.setAttribute( 'width', options.width )\n if ( options.height ) svg.setAttribute( 'height', options.height )\n }\n\n return svg\n } else {\n console.error('Cannot find \"'+name+'\" svg symbol. Ensure that svg scripts are loaded')\n }\n }\n\n function svgs(){\n if ( !names ) {\n names = {}\n for( var symbol of document.querySelectorAll( 'svg[id^=esvg] symbol' ) ) {\n names[symbol.dataset.name] = symbol\n }\n }\n return names\n }\n\n var esvg = {\n svgs: svgs,\n use: use\n }\n\n // Handle Turbolinks page change events\n if ( window.Turbolinks ) {\n document.addEventListener( \"turbolinks:load\", function( event ) { names = null; esvg.svgs() })\n }\n\n if( typeof( module ) != 'undefined' ) { module.exports = esvg }\n else window.esvg = esvg\n\n})()","var toolbox = require( 'compose-toolbox' )\nvar Event = toolbox.event\nvar notify = require( './enhancements/notify' )\nvar textSelectors = 'textarea, input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=hidden]):not([type=submit]):not([type=image]):not([type=reset])'\n\nfunction syncValue( input ) {\n\n // Allow calling from event handler\n input = ( input.target || input )\n\n // If element is empty (or contains only whitespace)\n // Add empty class\n input.classList.toggle( 'empty', !input.value.trim().length )\n}\n\n// Initialize input state\nEvent.change( function() {\n toolbox.each( document.querySelectorAll( textSelectors ), syncValue )\n})\n\n// Set input state on keyup (debounced)\nEvent.on( document, 'input', textSelectors, syncValue )\n\nEvent.on( document, 'submit', function(event) {\n // If the button has a data-submit-message, use that\n var button = event.target.querySelector('[type=submit]')\n var message = button.dataset.submitMessage || event.target.dataset.submitMessage\n var buttonText = button.querySelector('.button-text') || button\n\n // Send form messages\n if ( message ) notify( 'form-action', message )\n\n // Disable submission buttons\n if ( button.dataset.disableOnSubmit || button.dataset.disableWith )\n button.disabled = true\n\n if ( button.dataset.disableWith ) {\n button.dataset.enabledText = buttonText.innerHTML\n buttonText.innerHTML = button.dataset.disableWith\n }\n})\n\n\n// When a back button is used:\n// - Disabled buttons remain disabled\n// - Progress notifications remain active\n//\n// This renables buttons and hides notifications.\nwindow.onpageshow = function(event) {\n\n var button = document.querySelector('[data-disable-with][disabled],[data-disable-on-submit][disabled]')\n \n if ( button && button.disabled )\n button.disabled = false\n\n if ( button && button.dataset.enabledText ) {\n var buttonText = button.querySelector('.button-text') || button\n buttonText.innerHTML = button.dataset.enabledText\n }\n\n // Dismiss leftover progress notifications\n if ( document.querySelector( '.notification.form-action' ) ) {\n notify.dismiss()\n }\n}\n","(function(){\n\n function embed() {\n if (!document.querySelector('#esvg-svg-icons')) {\n 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><symbol id=\"svg-logo\" data-name=\"logo\" viewBox=\"0 0 54 32\" width=\"54\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M32.207 25.946L21.72 32l-11.234-6.486L0 19.46V6.485L11.235 0 21.72 6.054 32.207 0 43.44 6.486l10.487 6.055v12.974L42.693 32l-10.486-6.054zm.66-1.343V14.27l9.054 5.19.003 10.378-9.055-5.235zm-20.884.046V14.27l9.085 5.218.002 10.44-9.086-5.28zM1.498 18.594V8.215l8.988 5.19v10.38l-8.988-5.19zM21.72 7.785l8.99 5.188-8.99 5.19-8.988-5.19 8.99-5.19zm20.973 0l8.988 5.188-8.987 5.19-8.99-5.19 8.99-5.19zM11.235 1.728l8.988 5.19-8.988 5.188-8.99-5.19 8.99-5.188zm20.97 0l8.99 5.19-8.99 5.188-8.987-5.19 8.988-5.188z\"/><path d=\"M1.437 18.643L1.442 8.11l19.652 11.35.01 10.545L1.436 18.643zm31.37 6l.03-10.464 9.147 5.243-.01 10.582-9.168-5.363z\" fill-opacity=\".345\"/></symbol><symbol id=\"svg-cluster\" data-name=\"cluster\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M16 32c-.056 0-.113-.002-.17-.005-.112-.007-.224-.02-.335-.04-.332-.06-.653-.18-.942-.354-.13-.078-.256-.167-.373-.266-.055-.047-.108-.096-.16-.147C9.604 26.8 5.2 22.397.813 17.98c-.076-.077-.148-.158-.214-.243-.127-.16-.236-.335-.324-.52-.09-.184-.157-.38-.203-.58C.023 16.43 0 16.215 0 16c0-.214.024-.43.073-.638.046-.2.114-.395.203-.58.088-.184.197-.358.323-.52.065-.084.137-.165.213-.242C5.2 9.604 9.603 5.2 14.02.813c.077-.076.158-.148.243-.214.16-.127.335-.236.52-.324.184-.09.38-.157.58-.203C15.57.023 15.785 0 16 0c.214 0 .43.024.638.073.2.046.395.114.58.203.184.088.358.197.52.323.084.065.165.137.242.213C22.396 5.2 26.8 9.603 31.187 14.02c.076.077.148.158.214.243.127.16.236.335.324.52.09.184.157.38.203.58.05.208.073.423.073.637 0 .214-.024.43-.073.638-.046.2-.114.395-.203.58-.088.184-.197.358-.323.52-.065.084-.137.165-.213.242-4.388 4.416-8.79 8.82-13.207 13.207-.052.05-.105.1-.16.147-.117.1-.242.188-.373.267-.275.166-.578.282-.892.345-.11.022-.223.038-.335.046-.05.005-.102.008-.152.01H16zm0-1.883c.055 0 .11-.005.164-.014.107-.02.21-.057.305-.112.068-.04.13-.087.187-.143 4.412-4.384 8.84-8.755 13.195-13.195.026-.027.052-.056.075-.087.042-.054.077-.113.106-.176.05-.112.08-.234.083-.356.005-.145-.023-.29-.083-.423-.03-.062-.064-.12-.106-.175-.023-.03-.05-.06-.075-.087-4.358-4.442-8.758-8.842-13.2-13.2-.027-.026-.056-.052-.087-.075-.054-.042-.113-.077-.176-.106-.112-.05-.234-.08-.356-.083-.145-.005-.29.023-.423.083-.06.028-.117.062-.17.102-.033.024-.063.05-.092.078-4.442 4.358-8.842 8.758-13.2 13.2l-.08.09c-.04.055-.073.112-.1.173-.06.133-.09.28-.084.424.004.122.032.244.083.355.03.062.064.12.106.175.023.03.05.06.075.087 4.358 4.442 8.758 8.842 13.2 13.2.055.053.116.1.183.14.088.05.184.087.284.106.056.012.112.018.17.02H16z\" fill-opacity=\".502\" fill-rule=\"nonzero\"/><path d=\"M17.482 26.93l-.847.846c-.17.17-.397.263-.635.263s-.466-.095-.635-.264l-11.14-11.14c-.17-.17-.264-.398-.264-.636s.095-.466.264-.635l11.14-11.14c.17-.17.398-.264.636-.264s.466.095.635.264l4.05 4.05v5.456c-.104.03-.205.064-.303.106-.27.116-.517.283-.725.49-.2.195-.362.426-.48.68-.102.22-.17.454-.2.695-.033.248-.025.5.022.745.04.213.11.42.21.614.122.244.288.466.487.654.193.18.416.33.658.438.2.09.412.15.628.18.11.015.22.022.328.023h.062c.11-.004.218-.014.326-.032.215-.036.425-.102.622-.195.243-.115.466-.273.656-.463s.348-.414.464-.657c.095-.2.162-.416.197-.636.038-.24.04-.488.002-.73-.038-.24-.112-.472-.22-.69-.123-.248-.292-.475-.494-.666-.214-.2-.465-.362-.738-.472-.08-.032-.164-.06-.25-.084V9.528l5.838 5.837c.17.17.263.397.263.635s-.095.466-.264.635l-6.64 6.64-4.508-4.51v-6.51c.13-.036.258-.083.38-.14.243-.116.466-.274.657-.464.187-.186.342-.405.457-.643.097-.2.164-.415.2-.634.042-.246.043-.5.005-.745-.036-.24-.11-.472-.218-.69-.125-.248-.293-.475-.496-.666-.214-.2-.465-.362-.737-.472-.144-.058-.294-.1-.447-.13-.15-.027-.306-.04-.46-.04-.15.003-.298.02-.444.05-.156.03-.31.08-.456.142-.27.116-.516.283-.725.49-.198.195-.36.426-.48.68-.102.218-.17.454-.2.695-.032.247-.024.5.023.744.04.214.11.422.21.615.12.24.283.46.478.645.195.186.422.338.668.448.106.047.216.087.328.118v6.768c.002.05 0 .06.01.11.016.09.05.176.104.25.028.04.037.048.07.084l4.693 4.694-1.88 1.88-6.962-6.962v-.81c.13-.036.258-.084.38-.142.244-.115.467-.273.657-.463s.348-.414.464-.657c.094-.2.16-.416.196-.636.038-.24.04-.488.002-.73-.037-.24-.11-.472-.218-.69-.124-.248-.293-.475-.495-.666-.214-.2-.465-.362-.738-.472-.144-.057-.293-.1-.446-.13-.15-.027-.305-.04-.46-.038-.154.002-.307.018-.458.05-.15.032-.3.08-.44.14-.27.116-.518.283-.726.49-.198.195-.362.426-.48.68-.102.22-.17.454-.2.695-.033.248-.025.5.022.745.043.223.118.44.223.64.125.238.29.455.487.638.19.178.41.323.647.43.107.046.217.086.33.117v1.07c0 .04 0 .05.005.09.012.088.044.173.092.25.017.024.035.048.054.07l.03.033 7.146 7.146zm-6.7-9.83c.055 0 .11-.005.166-.014.096-.014.19-.042.278-.08.103-.047.2-.11.283-.184.09-.08.168-.176.228-.28.05-.093.09-.19.114-.293.03-.13.035-.26.02-.39-.015-.11-.046-.217-.092-.318-.055-.12-.133-.23-.227-.324-.098-.096-.213-.174-.34-.228-.13-.057-.274-.087-.418-.09-.145 0-.29.025-.423.08-.125.05-.24.123-.34.215-.097.09-.178.2-.237.317-.05.1-.083.205-.1.313-.02.13-.018.262.007.39.02.1.055.2.102.29.053.102.123.196.204.277.087.085.187.156.297.21.09.042.183.073.28.09.055.01.11.015.167.017h.03zm10.53 0c.056 0 .112-.005.167-.014.095-.014.19-.042.277-.08.107-.05.206-.114.293-.192.087-.08.16-.172.22-.273.05-.09.087-.185.11-.285.032-.13.04-.264.022-.396-.014-.11-.045-.217-.09-.318-.056-.12-.134-.23-.228-.324-.098-.096-.213-.174-.34-.228-.13-.057-.274-.087-.418-.09-.145 0-.29.025-.423.08-.126.05-.24.123-.34.215-.097.09-.178.2-.237.317-.05.1-.083.205-.1.313-.02.13-.018.262.007.39.02.106.058.208.108.302.058.105.13.2.218.283.082.077.176.142.278.19.09.044.183.075.28.092.055.01.11.015.167.017h.028zM16 11.084c.056 0 .112-.004.168-.013.096-.014.19-.042.278-.08.103-.047.198-.11.283-.184.09-.08.167-.176.227-.282.05-.09.09-.185.112-.285.03-.128.037-.263.02-.395-.014-.11-.044-.217-.09-.317-.056-.12-.133-.23-.228-.324-.097-.096-.213-.174-.34-.23-.13-.055-.274-.085-.418-.087-.144-.002-.29.024-.423.078-.124.05-.24.124-.338.216-.097.092-.178.2-.237.318-.05.1-.083.204-.1.313-.02.13-.02.263.007.39.02.106.057.208.108.303.057.107.133.205.222.287.08.076.173.14.272.187.09.044.188.075.288.092.053.008.106.013.16.015H16z\"/></symbol><symbol id=\"svg-download\" data-name=\"download\" viewBox=\"0 0 33 32\" width=\"33\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path fill=\"none\" d=\"M0 0h32.978v32H0z\"/><path d=\"M15.5 28.627V16.92c.005-.1.015-.195.045-.29.08-.262.27-.48.515-.6.113-.054.23-.08.355-.095.074-.003.074-.003.148 0 .124.014.24.04.355.095.245.12.435.338.515.6.03.095.04.19.044.29v11.707l2.54-2.54.043-.04c.12-.1.25-.176.4-.216.13-.034.267-.042.4-.023.326.048.613.262.752.56.04.087.068.18.082.275.014.094.014.19 0 .286-.02.133-.066.26-.137.376-.03.05-.065.093-.102.138-1.38 1.462-2.842 2.844-4.264 4.266l-.03.03c-.052.048-.11.09-.17.126-.027.016-.055.03-.084.044-.108.05-.225.08-.344.09-.097.007-.196 0-.293-.022-.097-.022-.19-.06-.275-.108-.075-.043-.145-.097-.206-.158-1.45-1.37-2.82-2.818-4.227-4.227-.107-.112-.19-.24-.24-.387-.11-.332-.032-.707.2-.968.064-.07.138-.134.22-.184.15-.092.315-.136.49-.147.057 0 .057 0 .114.004.058.007.114.016.17.03.17.046.316.136.443.256l2.54 2.54zm10.424-4.984h-4.52c-.036-.002-.072-.002-.107-.006-.142-.015-.28-.062-.403-.136-.09-.054-.174-.124-.243-.206-.258-.305-.307-.748-.12-1.102.05-.094.116-.18.194-.254.13-.123.293-.21.467-.248.094-.02.12-.018.214-.023h4.444c.43-.075.854-.197 1.264-.348 1.132-.42 2.194-1.103 2.908-2.09.165-.23.31-.47.433-.724.287-.59.45-1.234.516-1.886.037-.383.045-.77.015-1.155-.033-.436-.117-.868-.25-1.285-.37-1.173-1.124-2.212-2.122-2.932-.48-.348-1.017-.62-1.583-.802-.42-.135-.857-.22-1.297-.257-.232-.02-.463-.022-.696-.016l-.103-.002c-.09-.012-.115-.01-.204-.037-.2-.058-.378-.18-.505-.345-.056-.073-.064-.095-.108-.176-.054-.113-.11-.224-.168-.335-.347-.65-.77-1.255-1.27-1.796-.6-.647-1.297-1.2-2.064-1.634-.824-.465-1.727-.79-2.66-.952-.792-.14-1.604-.164-2.403-.076-.8.088-1.588.292-2.33.604-.875.368-1.685.885-2.388 1.52-.775.702-1.418 1.546-1.887 2.48-.343.683-.593 1.414-.74 2.165-.07.373-.116.748-.14 1.127l-.013.104c-.008.035-.014.07-.024.104-.018.067-.045.133-.078.195-.133.248-.373.43-.65.495-.067.016-.137.024-.207.025-.035 0-.07-.003-.106-.004-.137-.02-.272-.048-.408-.068-.496-.063-.996-.043-1.483.073-1.008.242-1.902.874-2.468 1.74-.173.264-.315.55-.42.846-.11.308-.182.628-.215.953-.04.392-.025.794.03 1.184.075.536.243 1.06.54 1.517.09.14.19.27.3.393.632.704 1.546 1.09 2.458 1.275.34.07.692.116 1.04.12h5.17l.107.005c.094.015.118.015.21.046.168.056.32.16.436.295.07.082.125.175.165.274.04.1.063.204.07.31.018.363-.168.715-.478.9-.123.075-.26.122-.403.137-.035.004-.07.004-.107.006-1.744 0-3.49.014-5.233 0-.42-.012-.836-.057-1.247-.134-1.186-.223-2.346-.7-3.253-1.512-.167-.15-.324-.31-.47-.48-.177-.203-.337-.42-.48-.65-.397-.64-.645-1.363-.764-2.106-.047-.296-.074-.594-.084-.894-.01-.296-.003-.592.027-.887.047-.455.145-.905.292-1.338.338-.99.94-1.883 1.723-2.575.656-.578 1.436-1.01 2.274-1.26.61-.184 1.25-.265 1.888-.25l.06-.344c.067-.326.144-.648.238-.967.198-.665.462-1.31.788-1.923.66-1.243 1.576-2.348 2.672-3.23.883-.713 1.882-1.278 2.947-1.668.702-.256 1.43-.436 2.172-.536.337-.047.676-.074 1.017-.088.16-.005.323-.008.485-.007.918.012 1.83.137 2.715.385 1.845.518 3.527 1.556 4.828 2.963.575.622 1.068 1.313 1.48 2.053l.004.006c.092.005.185.01.277.018.102.008.202.018.302.03.23.03.46.065.687.114.57.12 1.128.308 1.657.556 1.148.54 2.155 1.364 2.912 2.38.57.768.998 1.64 1.252 2.562.277 1.007.338 2.06.218 3.097-.097.834-.322 1.654-.69 2.41-.173.356-.377.696-.608 1.016-.154.212-.32.415-.495.61-.903.992-2.076 1.712-3.33 2.176-.553.205-1.128.367-1.712.458-.047.006-.046.006-.093.01l-.068.003z\"/></symbol><symbol id=\"svg-x-circle\" data-name=\"x-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><path d=\"M23.484 21.68c.478.477.478 1.254 0 1.732-.24.24-.554.36-.868.36-.31 0-.625-.12-.865-.36L16 17.662l-5.75 5.75c-.24.24-.555.36-.866.36-.314 0-.628-.12-.868-.36-.478-.478-.478-1.255 0-1.733l5.752-5.752-5.752-5.75c-.478-.477-.478-1.253 0-1.73.478-.48 1.255-.48 1.735 0L16 14.195l5.75-5.75c.48-.48 1.256-.48 1.734 0s.478 1.255 0 1.733l-5.752 5.748 5.752 5.75z\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-plus-circle\" data-name=\"plus-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><path d=\"M23.24 17.376h-5.792v5.792c0 .8-.65 1.448-1.448 1.448-.8 0-1.448-.648-1.448-1.448v-5.792H8.76c-.8 0-1.448-.65-1.448-1.448 0-.8.65-1.448 1.448-1.448h5.792V8.688c0-.8.65-1.448 1.448-1.448.8 0 1.448.65 1.448 1.448v5.792h5.792c.8 0 1.448.65 1.448 1.448 0 .8-.65 1.448-1.448 1.448\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-check-circle\" data-name=\"check-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><path d=\"M24.925 12.745l-10.22 11.2-7.59-7.588c-.48-.483-.48-1.255 0-1.732.477-.483 1.252-.483 1.732 0l5.776 5.775 8.49-9.307c.457-.502 1.233-.536 1.733-.08.5.455.534 1.232.08 1.732\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-thumbs-up-circle\" data-name=\"thumbs-up-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><path d=\"M23.07 18.6c.78 0 1.413.634 1.413 1.415 0 .78-.632 1.414-1.413 1.414h-.943c.78 0 1.414.632 1.414 1.413 0 .78-.632 1.414-1.413 1.414H16c-3.77 0-2.828-1.886-10.37-1.886V13.89h2.83c3.298 0 7.07-3.037 7.07-7.54 0-1.49 2.827-1.68 2.827 1.148 0 1.885-.943 5.45-.943 5.45h7.54c.782 0 1.415.633 1.415 1.413s-.634 1.413-1.415 1.413h-.943c.782 0 1.414.634 1.414 1.414 0 .782-.632 1.414-1.414 1.414h-.942\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-lock-circle\" data-name=\"lock-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><path d=\"M9.558 11.134c0-.338.007-.676.01-1.014.03-.753.17-1.492.446-2.194.668-1.696 2.063-3.057 3.775-3.683.658-.24 1.345-.362 2.044-.388.166-.002.165-.002.332 0 .7.026 1.386.147 2.045.388 1.712.626 3.108 1.987 3.776 3.683.277.702.416 1.44.445 2.194.005.338.01.676.013 1.014.634.02 1.27.044 1.903.07.077.01.15.02.223.046.24.083.44.267.542.5.042.095.062.192.074.294.18 4.31.004 8.627.004 12.94-.005.103-.017.202-.05.3-.083.24-.267.44-.5.542-.095.042-.192.062-.294.075-5.534.23-11.078.004-16.617.004-.103-.004-.2-.016-.3-.05-.24-.083-.44-.266-.542-.5-.042-.095-.062-.19-.074-.293-.18-4.31-.004-8.627-.004-12.94.005-.103.017-.2.05-.3.083-.24.267-.44.5-.542.095-.04.192-.062.294-.074.634-.026 1.27-.05 1.904-.07zm13.794 1.905H8.648v11.026h14.704V13.04zm-8.303 5.247c-.57-.347-.92-.992-.886-1.667.01-.183.046-.365.11-.538.07-.195.176-.378.31-.54.15-.18.334-.332.54-.444.244-.132.507-.2.782-.22.095-.002.094-.002.188 0 .275.02.538.088.78.22.208.112.394.264.544.445.132.16.237.344.31.54.062.172.098.354.108.537.034.682-.324 1.333-.902 1.677.023 1.03.043 2.06-.018 3.085-.015.147-.057.287-.136.413-.218.35-.656.514-1.05.392-.105-.032-.204-.083-.29-.15-.097-.074-.18-.168-.24-.274-.066-.118-.103-.246-.116-.38-.06-1.03-.073-2.065-.035-3.096zm5.54-7.204c.003-.305.007-.61.003-.917-.022-.575-.134-1.138-.36-1.67-.522-1.234-1.586-2.2-2.867-2.6-.517-.16-1.062-.227-1.603-.2-.496.026-.986.13-1.448.313-.516.202-.994.5-1.404.873-.436.397-.796.878-1.052 1.41-.283.588-.426 1.223-.45 1.873-.005.306 0 .612.002.917 3.06-.07 6.12-.07 9.18 0z\"/></symbol><symbol id=\"svg-heart-circle\" data-name=\"heart-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M11.228 6.83c.45.027.894.1 1.326.234 1.488.46 2.712 1.564 3.47 2.912.08-.146.172-.287.263-.427.49-.72 1.086-1.355 1.816-1.83.545-.357 1.15-.617 1.785-.762.565-.13 1.15-.166 1.727-.112.482.046.958.155 1.413.32.416.152.815.353 1.186.594.934.607 1.685 1.475 2.174 2.473.358.732.576 1.527.66 2.336.04.374.056.753.034 1.13-.044.792-.254 1.57-.55 2.304-.44 1.098-1.07 2.116-1.77 3.068-1.223 1.67-2.673 3.174-4.192 4.577-1.256 1.16-2.568 2.265-3.944 3.282l-.07.048c-.258.144-.545.194-.83.106-.085-.025-.16-.063-.236-.106-.177-.12-.346-.253-.517-.383-1.207-.932-2.376-1.913-3.497-2.948C10.3 22.56 9.173 21.415 8.15 20.18c-.7-.848-1.355-1.74-1.905-2.693-.41-.71-.762-1.46-.998-2.244-.15-.503-.252-1.02-.282-1.546-.018-.323-.01-.648.018-.97.08-.96.346-1.906.81-2.753.443-.812 1.065-1.524 1.817-2.064.397-.285.83-.52 1.285-.7.578-.226 1.183-.35 1.802-.385.178-.006.354-.006.53 0zm9.778 2.024c-.31.012-.615.058-.912.15-.224.07-.44.162-.646.275-1.17.64-1.877 1.87-2.267 3.106-.065.206-.12.414-.172.624l-.026.086c-.067.17-.16.32-.3.44-.4.342-1.016.315-1.385-.06-.107-.11-.178-.238-.234-.38-.055-.186-.1-.375-.153-.562-.377-1.234-1.023-2.467-2.154-3.163-.153-.093-.312-.177-.477-.247-.367-.155-.76-.245-1.155-.265-.336-.018-.674.015-1 .093-.28.068-.55.167-.805.295-.833.418-1.49 1.13-1.88 1.973-.228.492-.365 1.024-.422 1.563-.042.407-.044.816.02 1.22.104.646.344 1.267.633 1.852.446.902 1.02 1.738 1.638 2.53.806 1.03 1.7 1.992 2.636 2.908 1.277 1.253 2.635 2.42 4.043 3.524l.036.027c1.015-.783 1.997-1.613 2.945-2.478.787-.717 1.55-1.46 2.276-2.24.978-1.05 1.903-2.167 2.65-3.395.47-.777.887-1.617 1.075-2.512.098-.474.11-.953.06-1.433-.054-.506-.177-1.005-.38-1.47-.35-.803-.937-1.496-1.693-1.94-.248-.148-.513-.266-.788-.353-.324-.103-.657-.155-.995-.166h-.17z\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-arrow-up-circle\" data-name=\"arrow-up-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M22.294 14.798c-.24.24-.556.36-.87.36-.315 0-.627-.12-.868-.36l-3.303-3.305V22.68c0 .677-.548 1.23-1.23 1.23-.678 0-1.228-.553-1.228-1.23V11.57l-3.227 3.228c-.482.48-1.26.48-1.738 0-.482-.48-.482-1.258 0-1.737l5.243-5.247c.226-.282.56-.48.95-.48.008 0 .013.006.02.006.008 0 .013-.006.02-.006.327 0 .64.13.868.36l5.364 5.367c.48.48.48 1.26 0 1.738\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-gear-circle\" data-name=\"gear-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><g fill-rule=\"nonzero\"><path d=\"M24.253 6.97c.168.045.32.117.445.24.054.052.064.068.11.128 1.096 1.71 2.035 3.514 3.05 5.272.04.077.074.15.095.236.07.277.004.578-.175.8-.073.09-.16.16-.257.22l-1.64.95c.022.154.034.308.048.464.013.193.023.385.026.58.003.423-.023.842-.07 1.263v.013l1.64.95.072.044c.07.053.13.107.186.174.16.2.23.464.192.718-.013.086-.04.164-.073.244-.932 1.803-2.025 3.52-3.04 5.277-.046.073-.094.14-.156.2-.206.2-.5.294-.783.25-.114-.018-.216-.06-.318-.113l-1.635-.95c-.13.098-.262.188-.396.28-.19.123-.19.122-.384.242-.39.23-.787.435-1.2.623l-.013.006v1.91l-.004.084c-.013.086-.028.167-.06.248-.092.24-.285.432-.525.525-.08.03-.162.046-.247.058-2.03.094-4.062.004-6.094.004-.086-.005-.168-.012-.25-.036-.277-.078-.504-.286-.607-.552-.042-.11-.057-.218-.063-.333V25.08c-.142-.06-.282-.128-.422-.195-.203-.102-.203-.1-.404-.207-.404-.222-.79-.464-1.168-.73l-.027-.02-1.66.952-.074.038c-.08.033-.16.06-.245.073-.253.04-.517-.032-.716-.193-.07-.054-.122-.117-.175-.185C6.14 22.905 5.2 21.1 4.185 19.34c-.052-.1-.094-.203-.11-.318-.045-.282.048-.576.247-.78.06-.064.128-.11.2-.157l1.642-.948c-.02-.156-.033-.31-.046-.467-.014-.23-.014-.23-.023-.46-.006-.464.018-.922.07-1.382v-.014l-1.64-.947-.07-.046c-.07-.052-.13-.106-.186-.173-.162-.2-.232-.465-.193-.718.014-.087.04-.165.074-.245.935-1.803 2.03-3.518 3.047-5.276.062-.098.13-.184.22-.257.222-.18.523-.245.8-.176.084.02.16.056.235.096l1.652.95c.07-.052.143-.102.214-.152.19-.128.19-.128.385-.252.454-.278.92-.523 1.407-.743l.014-.006V4.96l.004-.085c.012-.085.027-.166.06-.247.09-.24.285-.433.524-.526.08-.03.162-.046.248-.058 2.028-.094 4.062-.004 6.093-.004.115.006.224.02.332.062.267.104.474.33.553.607.023.084.03.166.035.252V6.87c.142.06.28.13.42.196.202.102.2.102.4.208.4.224.782.466 1.154.733l.02.014 1.628-.946.076-.04c.138-.055.266-.08.414-.084.085.007.085.006.17.02zm-2.23 14.94c.118.025.22.06.325.115l1.38.8 2.08-3.607-1.39-.802c-.064-.04-.082-.05-.14-.1-.153-.132-.26-.313-.3-.51-.018-.087-.02-.17-.017-.258.028-.216.07-.43.098-.645.04-.37.067-.74.055-1.11-.015-.44-.068-.87-.143-1.304l-.01-.086c-.003-.088-.002-.17.016-.257.04-.198.147-.38.3-.51.058-.052.076-.06.14-.1l1.388-.803-2.08-3.605-1.375.798c-.07.035-.085.046-.158.072-.19.067-.402.07-.594.006-.084-.028-.157-.07-.232-.115-.123-.092-.24-.194-.362-.29-.348-.262-.71-.502-1.093-.71-.382-.21-.78-.386-1.187-.542l-.078-.034c-.066-.037-.084-.044-.145-.09-.16-.12-.277-.29-.332-.483-.024-.082-.03-.165-.035-.25V5.88h-4.168V7.49c-.004.086-.012.168-.036.252-.056.192-.174.363-.333.483-.06.045-.08.052-.145.09-.2.086-.402.16-.602.245-.745.337-1.446.748-2.072 1.276l-.07.052c-.074.047-.147.088-.23.116-.192.065-.404.064-.595-.003-.073-.024-.09-.035-.157-.07L8.33 9.125l-2.086 3.608 1.387.802c.066.04.083.05.142.1.153.132.26.314.3.512.018.087.02.17.016.258-.02.154-.05.307-.073.46-.058.43-.09.862-.08 1.297.01.437.065.868.14 1.297l.01.086c.004.077.007.096 0 .172-.023.202-.113.393-.253.54-.06.062-.13.11-.203.158l-1.39.802 2.084 3.61 1.403-.805c.078-.04.154-.075.24-.096.196-.048.407-.03.59.053.072.032.087.044.152.085.12.092.236.192.356.286.3.226.61.433.938.618.44.25.9.455 1.37.636l.08.034c.065.037.083.044.143.09.16.12.278.29.332.482.023.084.03.166.035.253v1.606h4.168v-1.607c.004-.087.01-.17.035-.253.055-.19.172-.363.332-.483.06-.045.078-.052.144-.09.197-.085.4-.16.598-.245.455-.207.895-.44 1.31-.716.26-.173.506-.362.745-.56l.07-.054c.064-.04.08-.052.15-.083.108-.05.218-.068.335-.078.086 0 .086 0 .172.01z\"/><path d=\"M16.148 11.052c.698.026 1.378.18 2.01.484.533.257 1.02.613 1.43 1.042.41.43.74.934.97 1.48.19.45.313.93.363 1.415.052.498.027 1.005-.074 1.495-.314 1.533-1.372 2.853-2.797 3.497-.598.27-1.247.418-1.902.434-.658.016-1.32-.1-1.932-.34-.553-.22-1.066-.54-1.506-.938-.44-.4-.805-.876-1.075-1.403-.22-.432-.377-.896-.462-1.373-.08-.452-.1-.916-.052-1.374.06-.565.215-1.12.462-1.632.43-.89 1.13-1.643 1.987-2.137.637-.366 1.342-.573 2.073-.638.17-.01.336-.016.505-.013zm-.206 1.84c-.437.016-.863.112-1.257.302-.81.39-1.428 1.138-1.652 2.01-.09.354-.118.725-.08 1.088.032.33.12.652.255.954.153.34.37.65.632.91.263.264.573.48.912.632.374.17.78.26 1.19.27.413.012.826-.06 1.21-.21.347-.138.668-.338.944-.59.275-.248.504-.548.673-.878.137-.27.234-.56.288-.857.06-.336.063-.68.012-1.018-.14-.92-.71-1.743-1.514-2.207-.4-.23-.84-.358-1.297-.4-.107-.005-.212-.008-.318-.007z\"/></g></symbol><symbol id=\"svg-search-circle\" data-name=\"search-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M7.716 13.77c0-3.362 2.738-6.102 6.105-6.102 3.363 0 6.1 2.74 6.1 6.103 0 3.365-2.737 6.105-6.1 6.105-3.366 0-6.104-2.74-6.104-6.104m18.19 10.785l-5.88-5.882c1.073-1.353 1.74-3.042 1.74-4.902 0-4.38-3.564-7.948-7.945-7.948-4.383 0-7.95 3.567-7.95 7.95 0 4.382 3.567 7.95 7.95 7.95 1.857 0 3.548-.67 4.9-1.744l5.883 5.882c.18.18.415.27.652.27.236 0 .472-.09.65-.27.363-.358.363-.943 0-1.305\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-warning-circle\" data-name=\"warning-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M16.898 17.985c0 .493-.4.892-.892.892s-.89-.4-.89-.892V13.12c0-.49.398-.89.89-.89s.892.4.892.89v4.865zm-.892 3.242c-.446 0-.81-.364-.81-.81 0-.45.364-.81.81-.81.448 0 .81.36.81.81 0 .446-.362.81-.81.81m9.614 1.837L16.803 5.43c-.303-.605-1.29-.605-1.594 0L6.293 23.26c-.14.276-.125.604.04.866.16.264.448.425.757.425h17.867c.492 0 .892-.4.892-.89 0-.23-.087-.44-.23-.596\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-star-circle\" data-name=\"star-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M16.08 5.155c.28.025.535.142.71.367.053.067.09.137.126.213l2.607 6.106h6.06l.082.005c.17.022.325.07.466.17.376.263.512.773.317 1.188-.06.13-.15.233-.254.328l-5.213 4.342 2.63 7.014.025.08c.04.167.048.33.004.5-.118.445-.554.75-1.014.708-.172-.016-.323-.08-.467-.174l-6.136-4.38L9.89 26l-.072.046c-.15.08-.307.13-.48.132-.462.002-.87-.34-.947-.796-.028-.17-.004-.333.05-.496l2.628-7.014-5.213-4.34-.062-.057c-.096-.104-.175-.215-.224-.35-.16-.43.02-.926.418-1.156.15-.087.308-.122.478-.13h6.062l2.632-6.108.036-.074c.042-.072.086-.14.144-.2.155-.167.354-.258.576-.296.082-.007.082-.007.164-.007zm-2.045 8.02c-.035.072-.072.14-.12.205-.13.168-.316.29-.522.343-.08.02-.156.026-.236.03h-4.05l3.706 3.084.062.057c.058.063.11.125.154.2.097.17.14.37.123.567-.01.087-.03.166-.057.247l-1.768 4.717 4.14-2.955.072-.047c.076-.04.15-.076.233-.098.19-.052.397-.043.583.025.08.03.15.072.223.12l4.14 2.954-1.768-4.717-.026-.08c-.02-.083-.034-.164-.035-.25 0-.197.06-.393.175-.554.05-.07.107-.128.17-.186l3.705-3.084h-4.05l-.078-.004c-.08-.01-.157-.024-.234-.05-.26-.09-.45-.283-.566-.528l-1.98-4.637c-.665 1.547-1.33 3.093-1.997 4.64z\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-pencil-circle\" data-name=\"pencil-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M7.925 18.165c3.857-4.193 8.057-8.058 12.086-12.087.123-.112.256-.198.417-.24.07-.02.088-.02.16-.03.08-.002.08-.002.162 0 .07.01.088.01.158.03.134.035.248.1.357.185 1.634 1.497 3.137 3.132 4.704 4.7.055.06.106.12.147.192.136.236.16.526.068.782-.037.104-.094.192-.16.28-3.865 4.216-8.087 8.09-12.132 12.135l-.022.02c-.07.066-.15.12-.237.16-.022.012-.044.022-.067.032-2.164.718-4.384 1.256-6.577 1.882-.137.033-.27.047-.41.024-.357-.06-.654-.332-.746-.684-.035-.136-.033-.27-.013-.408.53-2.22 1.252-4.39 1.878-6.582.006-.02.013-.037.02-.055.034-.095.084-.186.148-.267l.016-.02.017-.02c.008-.01.016-.02.025-.028zm.16 5.796l3.335-.952c-.81-.77-1.616-1.546-2.39-2.35l-.944 3.303zm5.185-1.852l7.013-7.013-3.33-3.33-7.032 7.03c1.14 1.082 2.28 2.164 3.35 3.313zm4.996-11.658l3.33 3.33L24 11.38l-3.332-3.332-2.402 2.402z\"/></symbol><symbol id=\"svg-message-circle\" data-name=\"message-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M17.342 23.582l-3.53 3.53-.066.06c-.12.088-.245.155-.392.185-.38.076-.778-.112-.96-.455-.072-.133-.1-.272-.107-.42v-2.9c-.087 0-.174-.002-.26-.003l-.41-.022c-.333-.03-.665-.072-.994-.14-.64-.132-1.266-.344-1.856-.63-1.33-.643-2.473-1.658-3.273-2.9-.457-.713-.8-1.496-1.012-2.314-.203-.783-.284-1.597-.243-2.405.043-.864.228-1.718.546-2.52.357-.9.877-1.73 1.527-2.446.692-.76 1.53-1.388 2.455-1.836.71-.343 1.47-.58 2.248-.7.335-.05.672-.077 1.01-.09 2.665-.034 5.33-.034 7.996 0 .338.013.674.04 1.01.09.778.12 1.54.357 2.248.7.926.448 1.763 1.075 2.454 1.836.65.715 1.17 1.547 1.527 2.445.32.802.505 1.656.55 2.52.04.807-.04 1.62-.244 2.404-.212.818-.556 1.6-1.013 2.313-.87 1.353-2.146 2.434-3.627 3.063-.668.283-1.374.475-2.094.567-.336.043-.672.06-1.01.065h-2.48zm.123-5.826c.128.01.25.04.364.1.097.05.186.12.26.203.267.305.29.767.058 1.1-.055.078-.122.146-.198.203-.143.106-.31.16-.485.175-2.205.06-4.412.06-6.617 0-.176-.014-.342-.07-.485-.175-.326-.242-.448-.69-.29-1.063.037-.088.088-.17.15-.24.074-.084.163-.154.26-.205.115-.06.237-.09.365-.1 2.205-.058 4.412-.058 6.617 0zm3.747-2.847c.18.017.35.075.493.19.373.293.447.846.166 1.228-.07.096-.16.178-.263.24-.122.07-.255.107-.395.12-3.457.117-6.92.117-10.376 0-.18-.017-.35-.075-.494-.19-.372-.293-.447-.846-.165-1.228.07-.096.16-.178.264-.24.123-.07.255-.107.396-.12 3.457-.117 6.92-.117 10.376 0zm0-2.85c.14.015.273.05.395.123.103.06.193.143.264.24.282.38.208.934-.165 1.228-.144.115-.312.173-.493.192-3.457.115-6.92.115-10.376 0-.18-.02-.35-.077-.494-.19-.372-.295-.447-.848-.165-1.23.07-.096.16-.178.264-.24.123-.07.255-.107.396-.12 3.457-.117 6.92-.117 10.376 0z\"/></symbol><symbol id=\"svg-progress-circle\" data-name=\"progress-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><g fill-rule=\"nonzero\"><path d=\"M16 21.288c-.58 0-1.048.47-1.048 1.048v3.52c0 .58.47 1.05 1.048 1.05.578 0 1.048-.47 1.048-1.05v-3.52c0-.58-.47-1.048-1.048-1.048\" fill-opacity=\".502\"/><path d=\"M25.955 14.9l-3.458-.008c-.597.013-1.05.467-1.05 1.046-.002.58.467 1.05 1.046 1.05l3.458.007h.003c.577 0 1.046-.468 1.048-1.046 0-.58-.467-1.05-1.045-1.05\" fill-opacity=\".251\"/><path d=\"M16.025 2.832h-.003c-.577 0-1.045.468-1.047 1.046l-.01 5.46c-.002.58.466 1.05 1.044 1.05h.002c.578 0 1.046-.467 1.047-1.045l.01-5.46c.002-.58-.466-1.05-1.045-1.05\"/><path d=\"M13.75 20.81c-.536-.223-1.148.03-1.37.565l-1.375 3.298c-.223.534.03 1.147.563 1.37.133.054.27.082.403.082.412 0 .8-.243.97-.647l1.373-3.297c.224-.533-.028-1.147-.562-1.37\" fill-opacity=\".6\"/><path d=\"M19.604 21.393c-.22-.537-.833-.79-1.367-.572-.535.22-.79.833-.57 1.37l1.354 3.298c.168.406.56.65.97.65.133 0 .27-.024.398-.078.536-.22.79-.833.572-1.367l-1.356-3.3z\" fill-opacity=\".4\"/><path d=\"M9.5 16.964h.002c.578 0 1.046-.468 1.048-1.046 0-.58-.467-1.05-1.046-1.05L6.05 14.86h-.003C5.47 14.86 5 15.33 5 15.908c-.003.578.465 1.05 1.045 1.05l3.455.007z\" fill-opacity=\".902\"/><path d=\"M21.075 13.83c.166.405.557.65.97.65.132 0 .267-.026.398-.08l3.158-1.296c.535-.22.79-.833.57-1.366-.22-.535-.83-.793-1.367-.57l-3.158 1.294c-.536.22-.79.833-.57 1.367\" fill-opacity=\".2\"/><path d=\"M10.992 17.99c-.22-.536-.83-.794-1.367-.57l-3.228 1.332c-.535.22-.79.833-.57 1.366.167.405.558.65.97.65.13 0 1.557-.558 1.688-.613l1.938-.798c.535-.22.79-.833.57-1.367\" fill-opacity=\".8\"/><path d=\"M21.28 19.75c-.407-.408-1.07-.41-1.48-.002-.41.41-.412 1.072-.002 1.482l2.482 2.49c.205.204.475.308.743.308s.535-.103.74-.306c.41-.41.41-1.07.003-1.482l-2.485-2.49z\" fill-opacity=\".349\"/><path d=\"M19.902 12.04c.205.205.474.308.743.308.268 0 .536-.102.74-.305l2.405-2.397c.41-.41.412-1.072.002-1.482-.408-.41-1.07-.41-1.48-.003l-2.405 2.398c-.412.41-.412 1.07-.005 1.482\" fill-opacity=\".149\"/><path d=\"M18.13 10.813c.132.054.27.08.403.08.41 0 .8-.242.968-.645l1.292-3.107c.223-.532-.03-1.145-.564-1.368-.535-.222-1.15.032-1.37.565l-1.292 3.106c-.222.534.03 1.147.564 1.37\" fill-opacity=\".102\"/><path d=\"M13.176 6.326c-.22-.535-.834-.793-1.368-.57-.534.222-.79.834-.57 1.37l1.287 3.115c.166.406.556.65.97.65.13 0 .267-.025.397-.08.536-.22.79-.833.57-1.367l-1.286-3.117zM10.626 12.015c.204.205.473.308.742.308.267 0 .535-.102.74-.305.41-.41.41-1.073.002-1.482l-2.393-2.4c-.41-.41-1.072-.41-1.48-.002-.412.41-.413 1.07-.005 1.482l2.394 2.4z\"/><path d=\"M12.186 19.73c-.41-.412-1.072-.413-1.482-.004L8.208 22.21c-.41.41-.41 1.072-.002 1.482.204.206.472.308.743.308.265 0 .533-.1.737-.305l2.495-2.485c.41-.408.41-1.07.004-1.48\" fill-opacity=\".702\"/><path d=\"M25.59 18.787l-3.214-1.338c-.534-.223-1.148.03-1.37.563-.222.535.03 1.148.565 1.37l3.214 1.34c.13.054.268.08.403.08.41 0 .8-.243.967-.644.223-.537-.03-1.15-.564-1.373\" fill-opacity=\".302\"/><path d=\"M6.407 13.07l3.16 1.314c.13.054.267.08.4.08.41 0 .8-.243.968-.646.223-.533-.03-1.146-.564-1.37l-3.156-1.314c-.535-.222-1.15.03-1.37.564-.223.535.03 1.148.563 1.37\"/></g></symbol><symbol id=\"svg-arrow-down-circle\" data-name=\"arrow-down-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M22.218 18.943l-5.243 5.243c-.226.282-.558.48-.95.48-.006 0-.01-.006-.018-.006-.008 0-.013.005-.02.005-.315 0-.63-.12-.87-.36l-5.36-5.362c-.483-.48-.483-1.26 0-1.738.478-.48 1.255-.48 1.737 0l3.3 3.3V9.323c0-.678.55-1.23 1.23-1.23.68 0 1.23.552 1.23 1.23V20.43l3.226-3.225c.48-.48 1.26-.48 1.738 0 .48.48.48 1.258 0 1.738\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-no-circle\" data-name=\"no-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><path d=\"M16.288 3.93c.48.018.958.052 1.434.12 1.2.174 2.37.53 3.463 1.053 2.135 1.02 3.95 2.69 5.153 4.727.596 1.01 1.042 2.104 1.32 3.242.272 1.12.384 2.28.33 3.43-.06 1.254-.318 2.495-.76 3.67-1.17 3.098-3.644 5.633-6.713 6.877-1.43.58-2.97.878-4.515.878-1.544 0-3.084-.3-4.515-.88-2.284-.925-4.256-2.57-5.59-4.642-.555-.866-1-1.805-1.315-2.785-.355-1.1-.55-2.25-.577-3.404-.028-1.154.11-2.31.412-3.425.318-1.18.82-2.31 1.48-3.34 1.2-1.866 2.92-3.39 4.92-4.347 1.092-.524 2.264-.88 3.463-1.052.476-.068.954-.102 1.434-.12.29-.003.288-.003.576 0zM23.67 9.8L9.874 23.597c.736.59 1.556 1.074 2.432 1.43 1.17.474 2.432.718 3.695.718s2.524-.244 3.695-.72c2.51-1.017 4.536-3.09 5.49-5.625.363-.96.573-1.976.622-3 .05-1.023-.062-2.053-.33-3.04-.26-.966-.67-1.89-1.21-2.73-.183-.288-.383-.565-.596-.83zM22.13 8.256c-.58-.465-1.213-.865-1.885-1.186-.894-.427-1.852-.718-2.833-.86-.39-.056-.78-.083-1.175-.098-.235-.003-.234-.003-.47 0-.394.015-.785.042-1.175.1-.98.14-1.94.43-2.833.86-1.637.783-3.044 2.03-4.025 3.557-.54.84-.95 1.764-1.21 2.73-.246.912-.36 1.86-.338 2.803.023.946.182 1.888.472 2.788.26.802.62 1.57 1.076 2.276.184.287.384.564.597.83l13.798-13.8z\"/></symbol><symbol id=\"svg-question-circle\" data-name=\"question-circle\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill-opacity=\".149\"/><path d=\"M17.46 17.292v3.053c0 .807-.653 1.46-1.46 1.46-.807 0-1.46-.653-1.46-1.46v-4.33c0-.804.653-1.46 1.46-1.46 1.584 0 2.87-1.284 2.87-2.868 0-1.584-1.286-2.87-2.87-2.87s-2.87 1.286-2.87 2.87c0 .806-.654 1.46-1.46 1.46-.81 0-1.462-.654-1.462-1.46 0-3.194 2.598-5.792 5.792-5.792s5.792 2.598 5.792 5.792c0 2.69-1.84 4.956-4.33 5.605M16 25.398c-.798 0-1.444-.643-1.444-1.444 0-.795.646-1.438 1.444-1.438.798 0 1.444.643 1.444 1.438 0 .8-.646 1.444-1.444 1.444\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-sync-circle\" data-name=\"sync-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M25.754 19.267c-1.384 3.912-5.102 6.538-9.254 6.538-2.776 0-5.45-1.168-7.36-3.014v.833c0 .68-.547 1.227-1.227 1.227-.677 0-1.227-.547-1.227-1.227v-4.77c0-.678.55-1.228 1.227-1.228h4.77c.68 0 1.228.55 1.228 1.227 0 .678-.547 1.227-1.226 1.227h-2.668c1.41 1.958 3.88 3.27 6.484 3.27 3.114 0 5.905-1.97 6.943-4.903.223-.638.922-.974 1.565-.748.638.225.972.93.746 1.567M6.294 12.78c1.383-3.91 5.1-6.537 9.254-6.537 2.775 0 5.453 1.17 7.36 3.018v-.835c0-.675.547-1.227 1.227-1.227.677 0 1.227.552 1.227 1.227v4.77c0 .68-.55 1.227-1.227 1.227h-4.77c-.678 0-1.228-.547-1.228-1.227 0-.677.55-1.227 1.227-1.227h2.667c-1.407-1.956-3.88-3.27-6.482-3.27-3.115 0-5.905 1.97-6.94 4.902-.18.503-.653.818-1.157.818-.136 0-.273-.02-.408-.07-.64-.227-.975-.927-.75-1.567\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-copy\" data-name=\"copy\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><g fill-rule=\"nonzero\"><path d=\"M22.667 4.667c0-.368-.3-.667-.667-.667h-3.333v10.495c1.208-.64 2.562-1.032 4-1.127v-8.7zM4 25.333V4H.667C.3 4 0 4.3 0 4.667V26c0 1.837 1.496 3.333 3.333 3.333h12.02c-.878-1.165-1.517-2.52-1.818-4H4z\" fill-opacity=\".302\"/><path d=\"M14 12H7.333c-.368 0-.666.3-.666.667 0 .368.298.666.666.666H14c.368 0 .667-.298.667-.666 0-.368-.3-.667-.667-.667M14 14.667H7.333c-.368 0-.666.298-.666.666 0 .368.298.667.666.667H14c.368 0 .667-.3.667-.667 0-.368-.3-.666-.667-.666M14.667 18c0-.368-.3-.667-.667-.667H7.333c-.368 0-.666.3-.666.667 0 .368.298.667.666.667H14c.368 0 .667-.3.667-.667M7.333 20c-.368 0-.666.3-.666.667 0 .368.298.666.666.666h4c.368 0 .667-.298.667-.666 0-.368-.3-.667-.667-.667h-4z\" fill-opacity=\".502\"/><path d=\"M6 9.333h10.667c.368 0 .666-.298.666-.666V3.333c0-.368-.298-.666-.666-.666h-2.06C14.33 1.115 13.087 0 11.333 0 9.687 0 8.363 1 8.06 2.667H6c-.368 0-.667.298-.667.666v5.334c0 .368.3.666.667.666\" fill-opacity=\".302\"/><path d=\"M26.97 24H24v2.97c0 .367-.3.666-.667.666-.368 0-.666-.3-.666-.667V24h-2.97c-.368 0-.666-.3-.666-.667 0-.368.3-.666.667-.666h2.97v-2.97c0-.37.298-.666.666-.666.368 0 .667.298.667.667v2.97h2.97c.367 0 .666.298.666.666 0 .368-.3.667-.667.667m-3.637-9.333c-4.78 0-8.666 3.888-8.666 8.666 0 4.78 3.886 8.667 8.666 8.667S32 28.112 32 23.333c0-4.778-3.888-8.666-8.667-8.666\"/></g></symbol><symbol id=\"svg-refresh-circle\" data-name=\"refresh-circle\" viewBox=\"0 0 33 33\" width=\"33\" height=\"33\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16.024\" cy=\"16.024\" r=\"16.024\" fill-opacity=\".149\"/><path d=\"M25.628 10.107l-1.048 4.12c-.012.046-.044.086-.064.135-.172.46-.638.794-1.13.794-.033 0-.065-.01-.1-.012-.032-.003-.06-.008-.09-.013-.038-.006-.077-.004-.114-.013l-4.117-1.05c-.66-.168-1.06-.836-.893-1.497.17-.663.836-1.062 1.502-.89l1.462.37c-.506-.614-1.122-1.137-1.842-1.53-1.47-.81-3.17-.99-4.775-.526-1.613.47-2.945 1.538-3.75 3.01-.81 1.47-1 3.168-.526 4.777.967 3.327 4.46 5.247 7.785 4.276.655-.185 1.338.185 1.525.838.193.654-.182 1.336-.838 1.53-.813.235-1.632.35-2.44.35-3.79 0-7.29-2.486-8.402-6.302-.653-2.246-.392-4.608.732-6.656 1.125-2.046 2.98-3.533 5.224-4.19 2.242-.65 4.604-.393 6.65.73 1.015.56 1.893 1.298 2.598 2.173l.26-1.03c.17-.662.842-1.064 1.5-.89.658.166 1.058.837.89 1.497\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-backup\" data-name=\"backup\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M16.04 23.89c-.905.073-1.812.11-2.706.11C8.047 24 2.484 22.656 0 20.483v2.85c0 3.364 5.856 6 13.334 6 1.358 0 2.66-.088 3.888-.25C16.452 27.787 16 26.28 16 24.667c0-.263.015-.522.04-.778zm-2.707-1.223c1.004 0 1.988-.047 2.943-.13.556-2.19 1.943-4.045 3.807-5.213-2.15.436-4.49.676-6.75.676C8.047 18 2.483 16.656 0 14.483V18c0 2.113 5.947 4.667 13.333 4.667zm0-6c6.106 0 11.5-1.683 13.334-3.44V8.893C23.82 10.807 18.377 12 13.333 12 8.047 12 2.483 10.656 0 8.483V12c0 2.113 5.947 4.667 13.333 4.667zm0-6c6.106 0 11.5-1.683 13.334-3.438V6c0-3.364-5.858-6-13.334-6S0 2.636 0 6c0 2.113 5.948 4.667 13.333 4.667z\" fill-opacity=\".502\"/><path d=\"M28 25.333h-2.667V28c0 .368-.3.667-.666.667-.368 0-.667-.3-.667-.667v-2.667h-2.667c-.368 0-.666-.298-.666-.666 0-.368.298-.667.666-.667H24v-2.667c0-.368.3-.666.667-.666.366 0 .666.298.666.666V24H28c.367 0 .667.3.667.667 0 .368-.3.666-.667.666m-3.333-8c-4.044 0-7.334 3.29-7.334 7.334S20.623 32 24.667 32C28.71 32 32 28.71 32 24.667c0-4.044-3.29-7.334-7.333-7.334\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-progress\" data-name=\"progress\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><circle cx=\"16\" cy=\"16\" r=\"16\" fill=\"none\"/><g fill-rule=\"nonzero\"><path d=\"M16 22.915c-.758 0-1.37.613-1.37 1.37v4.605c0 .756.612 1.37 1.37 1.37.756 0 1.37-.614 1.37-1.37v-4.605c0-.757-.614-1.37-1.37-1.37\" fill-opacity=\".502\"/><path d=\"M29.018 14.56l-4.522-.008c-.78.016-1.373.61-1.373 1.367-.002.756.61 1.37 1.368 1.372l4.522.01h.003c.755 0 1.367-.612 1.37-1.37 0-.755-.61-1.37-1.367-1.37\" fill-opacity=\".251\"/><path d=\"M16.033.242h-.002c-.754 0-1.367.61-1.37 1.367l-.015 5.68c0 .755.61 1.37 1.367 1.372h.003c.756 0 1.37-.61 1.37-1.368l.016-5.68c.003-.757-.61-1.37-1.367-1.372\"/><path d=\"M13.06 22.29c-.703-.292-1.503.04-1.795.738L9.468 27.34c-.29.7.04 1.5.736 1.79.174.074.352.11.528.11.537 0 1.045-.318 1.266-.846l1.796-4.31c.292-.7-.037-1.503-.735-1.793\" fill-opacity=\".6\"/><path d=\"M20.713 23.052c-.287-.702-1.09-1.035-1.788-.748-.7.287-1.035 1.09-.747 1.79l1.773 4.313c.22.53.73.85 1.27.85.172 0 .35-.032.52-.1.7-.29 1.033-1.09.747-1.79l-1.774-4.315z\" fill-opacity=\".4\"/><path d=\"M7.5 17.26h.003c.755 0 1.368-.61 1.37-1.367 0-.758-.61-1.372-1.367-1.373l-4.518-.01h-.003c-.756 0-1.37.612-1.37 1.368-.003.757.61 1.372 1.367 1.373l4.52.01z\" fill-opacity=\".902\"/><path d=\"M22.636 13.162c.218.53.73.85 1.267.85.174 0 .35-.034.522-.105l4.13-1.694c.698-.287 1.033-1.09.744-1.786-.29-.7-1.088-1.037-1.79-.745l-4.13 1.692c-.7.287-1.032 1.09-.744 1.788\" fill-opacity=\".2\"/><path d=\"M9.45 18.602c-.287-.7-1.085-1.04-1.787-.745l-4.22 1.74c-.7.29-1.033 1.09-.745 1.788.217.53.728.85 1.267.85.172 0 2.036-.73 2.208-.8l2.534-1.045c.7-.288 1.033-1.09.744-1.788\" fill-opacity=\".8\"/><path d=\"M22.906 20.904c-.533-.534-1.4-.537-1.937-.002-.537.534-.54 1.4-.004 1.937l3.246 3.255c.27.267.62.402.97.402.352 0 .7-.134.97-.4.536-.534.537-1.4.003-1.937l-3.25-3.256z\" fill-opacity=\".349\"/><path d=\"M21.103 10.822c.267.268.62.402.97.402.352 0 .7-.133.97-.398l3.144-3.135c.536-.534.538-1.4.003-1.937-.535-.535-1.4-.537-1.938-.004L21.11 8.883c-.54.535-.54 1.4-.007 1.938\" fill-opacity=\".149\"/><path d=\"M18.786 9.217c.173.07.35.106.526.106.536 0 1.047-.318 1.266-.844l1.69-4.064c.29-.697-.04-1.5-.74-1.79-.7-.29-1.5.04-1.792.738l-1.69 4.06c-.29.7.04 1.5.74 1.793\" fill-opacity=\".102\"/><path d=\"M12.307 3.35c-.29-.7-1.09-1.037-1.79-.744-.698.288-1.032 1.09-.743 1.79l1.682 4.074c.216.528.727.848 1.267.848.173 0 .35-.033.52-.105.7-.287 1.034-1.09.746-1.787L12.306 3.35zM8.973 10.79c.267.267.618.4.97.4.35 0 .7-.132.967-.397.536-.535.54-1.403.003-1.938l-3.13-3.137c-.533-.537-1.4-.538-1.936-.004-.537.535-.54 1.4-.004 1.938l3.13 3.137z\"/><path d=\"M11.012 20.876c-.536-.537-1.402-.538-1.937-.004l-3.265 3.25c-.535.533-.537 1.4-.002 1.936.267.27.618.403.97.403.35 0 .7-.13.967-.398l3.263-3.25c.536-.533.537-1.4.004-1.936\" fill-opacity=\".702\"/><path d=\"M28.54 19.645l-4.203-1.75c-.697-.29-1.5.04-1.79.738-.29.698.04 1.5.738 1.792l4.202 1.75c.17.07.35.106.526.106.537 0 1.045-.317 1.264-.842.292-.7-.038-1.502-.737-1.793\" fill-opacity=\".302\"/><path d=\"M3.456 12.167l4.13 1.72c.172.07.35.105.526.105.537 0 1.047-.318 1.264-.846.292-.697-.038-1.498-.737-1.79l-4.13-1.72c-.698-.29-1.5.04-1.79.74-.292.698.038 1.5.736 1.79\"/></g></symbol><symbol id=\"svg-status-failed\" data-name=\"status-failed\" viewBox=\"0 0 33 32\" width=\"33\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M16.217 26.67c-.754 0-1.362-.61-1.362-1.36 0-.752.608-1.36 1.362-1.36.75 0 1.36.608 1.36 1.36 0 .75-.61 1.36-1.36 1.36M14.97 13.06c0-.688.558-1.247 1.247-1.247.688 0 1.247.56 1.247 1.247v8.163c0 .69-.56 1.248-1.247 1.248-.69 0-1.248-.557-1.248-1.248v-8.163zm17.423 17.32L17.65.89c-.026-.05-.06-.08-.086-.126-.192-.312-.477-.54-.816-.66 0 0 .003-.004.005-.004C16.58.04 16.403 0 16.217 0c-.567 0-1.063.294-1.348.76-.025.043-.058.076-.08.118L.133 30.194c-.195.386-.175.846.052 1.212.23.37.63.594 1.063.594H31.21c.69 0 1.247-.56 1.247-1.247 0-.13-.027-.252-.064-.372\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-status-pending\" data-name=\"status-pending\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M20 18.666h-6.666V8c0-.736.596-1.332 1.332-1.332C15.404 6.668 16 7.264 16 8v8h4c.738 0 1.334.596 1.334 1.334 0 .74-.596 1.332-1.334 1.332M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-status-partial\" data-name=\"status-partial\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0zm.013 2.472v27.055l.102.01c1.764-.014 3.52-.375 5.147-1.064 1.555-.658 2.982-1.61 4.19-2.79 1.168-1.142 2.13-2.492 2.82-3.97.566-1.21.95-2.5 1.135-3.82.207-1.478.17-2.99-.11-4.454-.24-1.25-.66-2.463-1.24-3.594-1.32-2.57-3.46-4.69-6.05-5.977-1.19-.594-2.468-1.007-3.78-1.226-.565-.095-1.133-.147-1.703-.173-.17-.004-.34-.015-.51.002z\"/><path d=\"M16.013 2.472v27.055l.102.01c1.764-.014 3.52-.375 5.147-1.064 1.555-.658 2.982-1.61 4.19-2.79 1.168-1.142 2.13-2.492 2.82-3.97.566-1.21.95-2.5 1.135-3.82.207-1.478.17-2.99-.11-4.454-.24-1.25-.66-2.463-1.24-3.594-1.32-2.57-3.46-4.69-6.05-5.977-1.19-.594-2.468-1.007-3.78-1.226-.565-.095-1.133-.147-1.703-.173-.17-.004-.34-.015-.51.002z\" fill-opacity=\".149\"/></symbol><symbol id=\"svg-status-complete\" data-name=\"status-complete\" viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M24.965 12.802l-10.267 11.25-7.626-7.62c-.48-.486-.48-1.262 0-1.742.482-.484 1.26-.484 1.74 0l5.805 5.802 8.53-9.35c.46-.503 1.24-.538 1.74-.08s.538 1.238.078 1.74M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0\" fill-rule=\"nonzero\"/></symbol><symbol id=\"svg-dice\" data-name=\"dice\" viewBox=\"0 0 45 32\" width=\"45\" height=\"32\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M30.762 10.232c1.183.684 1.59 2.2.906 3.382l-9.9 17.148c-.683 1.183-2.2 1.59-3.382.906l-17.148-9.9c-1.183-.684-1.59-2.2-.906-3.382l9.9-17.148c.684-1.183 2.2-1.59 3.382-.906l17.148 9.9z\" fill-opacity=\".149\"/><path d=\"M22.13 5.25c.02-.002.04-.002.06-.002h19.803c1.366 0 2.475 1.11 2.475 2.475v19.802c0 1.366-1.11 2.475-2.475 2.475H22.208l2.44-4.23c.273.11.57.17.88.17 1.29 0 2.34-1.047 2.34-2.338 0-.75-.354-1.416-.902-1.844l4.702-8.144c.683-1.183.277-2.698-.906-3.382L22.13 5.25zm16.35 16.013c1.29 0 2.34 1.048 2.34 2.34 0 1.29-1.05 2.338-2.34 2.338-1.29 0-2.34-1.047-2.34-2.338 0-1.29 1.05-2.34 2.34-2.34zm0-11.956c1.29 0 2.34 1.048 2.34 2.34 0 1.29-1.05 2.338-2.34 2.338-1.29 0-2.34-1.048-2.34-2.34 0-1.29 1.05-2.338 2.34-2.338zM19.712 22.345c1.118.645 1.502 2.077.857 3.196-.647 1.12-2.08 1.502-3.197.857-1.118-.646-1.502-2.078-.856-3.196.645-1.117 2.077-1.5 3.195-.855zM17.093 13.93c1.118.645 1.502 2.077.856 3.195-.647 1.118-2.078 1.502-3.197.857-1.118-.646-1.5-2.078-.856-3.196.646-1.118 2.078-1.502 3.196-.856zM14.473 5.514c1.118.646 1.502 2.078.856 3.196-.646 1.118-2.078 1.502-3.196.856-1.118-.645-1.502-2.077-.856-3.195.645-1.118 2.077-1.5 3.195-.856z\"/></symbol><symbol id=\"svg-angle-down\" data-name=\"angle-down\" viewBox=\"0 0 27 15\" width=\"27\" height=\"15\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" stroke-linejoin=\"round\" stroke-miterlimit=\"1.414\"><path d=\"M25.304.005c.092.012.116.012.206.036.135.037.263.097.377.177.348.244.545.665.508 1.088-.01.104-.032.207-.068.305-.048.132-.12.254-.21.36-.02.028-.046.053-.07.08l-12 12c-.025.022-.05.047-.077.07-.08.067-.17.123-.264.168-.32.148-.695.148-1.014 0-.095-.045-.184-.1-.264-.17-.027-.02-.052-.046-.077-.07l-12-12C.29 1.98.27 1.966.217 1.89c-.08-.114-.14-.242-.176-.377C-.08 1.066.074.578.428.28.535.19.658.12.788.073.92.025 1.06 0 1.2 0c.246 0 .49.076.69.217.076.053.09.072.16.134l11.15 11.153L24.352.35l.078-.07c.073-.056.09-.073.17-.12.122-.07.255-.118.393-.142.093-.016.116-.014.21-.018l.104.005z\" fill-rule=\"nonzero\"/></symbol></svg>')\n }\n }\n\n // If DOM is already ready, embed SVGs\n if (document.readyState == 'interactive') { embed() }\n\n // Handle Turbolinks page change events\n if ( window.Turbolinks ) {\n document.addEventListener(\"turbolinks:load\", function(event) { embed() })\n }\n\n // Handle standard DOM ready events\n document.addEventListener(\"DOMContentLoaded\", function(event) { embed() })\n})()","var event = require( 'compose-toolbox' ).event\n\n// Public API function\nvar clipboard = function() {\n\n // Listen for click events\n event.on( document, 'click', '[data-copy-target]', copy )\n\n // Copy to clipboard handler\n function copy( event ) {\n\n console.log( event )\n\n // Assignment\n var copyTrigger = event.currentTarget,\n copyElement = document.querySelector( copyTrigger.dataset.copyTarget )\n\n // Prevent default behavior\n event.preventDefault()\n\n // Is the element selectable?\n if ( copyElement && copyElement.select ) {\n\n // Select text\n copyElement.select();\n\n // Give it a try\n try {\n\n // Copy text\n document.execCommand( 'copy' )\n\n // Blur the element\n copyElement.blur()\n\n // Trigger copied state\n copyTrigger.classList.add( 'copied' )\n\n // Remove copied state after a couple seconds\n setTimeout( function() {\n copyTrigger.classList.remove( 'copied' )\n }, 2000 )\n\n // If it borks\n } catch ( err ) {\n\n // Go nuclear\n alert( 'please press Ctrl/Cmd+C to copy' )\n\n }\n\n }\n\n }\n}\n\nmodule.exports = clipboard\n","var Event = require('compose-event')\nvar Notify = require('./notify')\n\n// If a page has an element .form-flash, trigger a notification\n//\nEvent.change(function(){\n var flash = document.querySelector('.flash-message:not(.fired)')\n if (flash) {\n flash.classList.add('hidden','fired')\n Notify(flash.dataset.type, flash.textContent.trim())\n }\n})\n\n","var Event = require( 'compose-event' )\nvar esvg = require( '../_esvg' )\n\nvar defaultsByType = {\n message: { dismissAfter: 3500 },\n success: { dismissAfter: 3500 },\n}\n\nvar iconsByType = {\n message: \"message-circle\",\n error: \"no-circle\",\n progress: \"progress-circle\",\n 'form-action': \"progress-circle\",\n success: \"thumbs-up-circle\",\n}\n\n\nvar autoDismissTimeout,\n messageEl,\n template = '\\\n<div class=\"notification\">\\\n <div class=\"notification-content\">\\\n <div class=\"notification-message\" role=\"alert\"></div>\\\n <button class=\"notification-close\" href=\"#\" role=\"button\" aria-label=\"close message\">\\\n </button>\\\n </div>\\\n</div>\\\n'\n\nfunction notify (type, message) {\n if ( !message ) {\n message = type\n type = 'message'\n }\n\n return show( type, message )\n}\n\nfunction show ( type, message ) {\n clearTimeout( autoDismissTimeout )\n if ( messageEl ) return dismiss( function(){ show( type, message ) })\n\n document.body.insertAdjacentHTML( 'beforeend', template )\n messageEl = document.body.lastChild\n var typeIcon = esvg.use( iconsByType[type] || type )\n var closeIcon = esvg.use( 'x-circle', { 'scale': true, 'class': 'close-icon' } )\n\n var msg = messageEl.querySelector( '.notification-message' )\n msg.innerHTML = message\n\n if ( typeIcon ) msg.insertAdjacentHTML( 'beforebegin', \"<span class='notification-type-icon'>\" + typeIcon.outerHTML + \"</span>\" )\n if ( closeIcon ) messageEl.querySelector( '.notification-close' ).innerHTML = closeIcon.outerHTML\n\n if ( type ) {\n\n messageEl.classList.add( type )\n var defaults = defaultsByType[ type ]\n\n if ( defaults && defaults.dismissAfter ){\n autoDismissTimeout = window.setTimeout( dismiss, defaults.dismissAfter )\n }\n }\n\n messageEl = document.body.lastChild\n\n Event.keyOne( 'esc', dismiss )\n Event.one( messageEl, 'click', '.notification-close', dismiss )\n\n return {\n dismiss: dismiss\n }\n}\n\nfunction dismiss ( callback ) {\n\n if ( document.querySelector('.notification') == null ) { return }\n\n clearTimeout( autoDismissTimeout )\n\n var cb\n\n if ( typeof callback == 'function' ) {\n cb = function() { remove(); callback() }\n } else {\n cb = remove;\n }\n\n var timeout = window.setTimeout( cb, 500 )\n\n Event.one( messageEl, 'animationstart', function() {\n clearTimeout( timeout )\n\n Event.afterAnimation( messageEl, cb )\n })\n\n messageEl.classList.add( 'dismiss' )\n}\n\nfunction remove () {\n messageEl = document.querySelector('body > .notification')\n\n if (messageEl) {\n messageEl.parentNode.removeChild( messageEl )\n }\n messageEl = null\n}\n\nnotify.dismiss = dismiss\n\nmodule.exports = notify\n","var toolbox = require( 'compose-toolbox' )\n\nfunction autoSizeTextarea( textarea ) {\n var parent = textarea.parentElement\n\n if ( textarea.value == '' ) return\n if ( parent.classList.contains('input-wrapper') ) {\n\n parent.style.height = textarea.style.height\n var offset = textarea.offsetHeight - textarea.clientHeight\n textarea.style.height = 'auto'\n var newHeight = ( textarea.scrollHeight + offset )\n var maxHeight = window.innerHeight * .95\n\n if ( newHeight < maxHeight )\n textarea.style.height = newHeight + 'px'\n else\n textarea.style.height = maxHeight + 'px'\n\n parent.style.height = 'auto'\n }\n}\n\ntoolbox.event.change(function(){\n var textareas = document.querySelectorAll('textarea')\n toolbox.event.delay( function(){ Array.prototype.forEach.call(textareas, autoSizeTextarea) } )\n})\n\ntoolbox.event.on(document, 'keyup toggler:show', 'textarea', function(event){\n autoSizeTextarea(event.currentTarget)\n})\n\n\ntoolbox.event.change(function(){\n Array.prototype.forEach.call(document.querySelectorAll('[data-match-url]'), function(node){\n var matcher = node.getAttribute('data-match-url')\n if (matcher && new RegExp(node.dataset.matchUrl, \"i\").test(location.pathname)) {\n node.classList.add('here')\n }\n })\n})\n","// Icons must come before event registrations\nrequire( './_icons' ) // Import svg icons (from Esvg)\nvar esvg = require( './_esvg' )\n\nvar toolbox = require( 'compose-toolbox' )\nvar timeToggle = require( 'compose-time-toggle' ) // Switch time elements between local and UTC\nvar toggler = require( 'compose-toggler' )\nvar formUp = require( 'compose-form-up' )\nvar ajax = require( 'superagent' )\nvar clipboard = require( './enhancements/clipboard' )\nvar notify = require( './enhancements/notify' )\nvar event = toolbox.event\n\nevent.scroll.disablePointer() // disable pointer events on scroll for performance (to avoid extra repaints)\nclipboard();\n\nrequire( 'compose-slider' ) // Our slider (range input) component\nrequire( './_form-helpers' )\nrequire( './enhancements/flash-messages' )\nrequire( './enhancements/text-helpers' )\n\nevent.change( timeToggle.timeago.setup )\n\n// Public API object\nwindow.Tungsten = module.exports = toolbox.merge( {\n ajax : ajax,\n form : formUp,\n toggler : toggler,\n clipboard : clipboard,\n notify : notify,\n esvg : esvg,\n timeToggle : timeToggle\n}, toolbox )\n","/*!\n * Bean - copyright (c) Jacob Thornton 2011-2012\n * https://github.com/fat/bean\n * MIT license\n */\n(function (name, context, definition) {\n if (typeof module != 'undefined' && module.exports) module.exports = definition()\n else if (typeof define == 'function' && define.amd) define(definition)\n else context[name] = definition()\n})('bean', this, function (name, context) {\n name = name || 'bean'\n context = context || this\n\n var win = window\n , old = context[name]\n , namespaceRegex = /[^\\.]*(?=\\..*)\\.|.*/\n , nameRegex = /\\..*/\n , addEvent = 'addEventListener'\n , removeEvent = 'removeEventListener'\n , doc = document || {}\n , root = doc.documentElement || {}\n , W3C_MODEL = root[addEvent]\n , eventSupport = W3C_MODEL ? addEvent : 'attachEvent'\n , ONE = {} // singleton for quick matching making add() do one()\n\n , slice = Array.prototype.slice\n , str2arr = function (s, d) { return s.split(d || ' ') }\n , isString = function (o) { return typeof o == 'string' }\n , isFunction = function (o) { return typeof o == 'function' }\n , isObject = function (o) { return typeof o == 'object' }\n\n // Try to build an options object. If any key in `maybeOptions`\n // matches a key in `defaults`, it will be copied into a clone\n // of `defaults`, thus overriding the default.\n , buildOptions = function (originalDefaults, maybeOptions) {\n var defaults = {}\n\n for (var key in originalDefaults) {\n if (originalDefaults.hasOwnProperty(key)) {\n defaults[key] = originalDefaults[key];\n }\n }\n\n if (!isObject(maybeOptions)) {\n return defaults;\n }\n\n for (key in defaults) {\n if (defaults.hasOwnProperty(key) && maybeOptions.hasOwnProperty(key)) {\n defaults[key] = maybeOptions[key]\n }\n }\n\n return defaults\n }\n\n // events that we consider to be 'native', anything not in this list will\n // be treated as a custom event\n , standardNativeEvents =\n 'click dblclick mouseup mousedown contextmenu ' + // mouse buttons\n 'mousewheel mousemultiwheel DOMMouseScroll ' + // mouse wheel\n 'mouseover mouseout mousemove selectstart selectend ' + // mouse movement\n 'keydown keypress keyup ' + // keyboard\n 'orientationchange ' + // mobile\n 'focus blur change reset select submit ' + // form elements\n 'load unload beforeunload resize move DOMContentLoaded ' + // window\n 'readystatechange message ' + // window\n 'error abort scroll ' // misc\n // element.fireEvent('onXYZ'... is not forgiving if we try to fire an event\n // that doesn't actually exist, so make sure we only do these on newer browsers\n , w3cNativeEvents =\n 'show ' + // mouse buttons\n 'input invalid ' + // form elements\n 'touchstart touchmove touchend touchcancel ' + // touch\n 'gesturestart gesturechange gestureend ' + // gesture\n 'textinput ' + // TextEvent\n 'readystatechange pageshow pagehide popstate ' + // window\n 'hashchange offline online ' + // window\n 'afterprint beforeprint ' + // printing\n 'dragstart dragenter dragover dragleave drag drop dragend ' + // dnd\n 'loadstart progress suspend emptied stalled loadmetadata ' + // media\n 'loadeddata canplay canplaythrough playing waiting seeking ' + // media\n 'seeked ended durationchange timeupdate play pause ratechange ' + // media\n 'volumechange cuechange ' + // media\n 'checking noupdate downloading cached updateready obsolete ' // appcache\n\n // convert to a hash for quick lookups\n , nativeEvents = (function (hash, events, i) {\n for (i = 0; i < events.length; i++) events[i] && (hash[events[i]] = 1)\n return hash\n }({}, str2arr(standardNativeEvents + (W3C_MODEL ? w3cNativeEvents : ''))))\n\n // custom events are events that we *fake*, they are not provided natively but\n // we can use native events to generate them\n , customEvents = (function () {\n var isAncestor = 'compareDocumentPosition' in root\n ? function (element, container) {\n return container.compareDocumentPosition && (container.compareDocumentPosition(element) & 16) === 16\n }\n : 'contains' in root\n ? function (element, container) {\n container = container.nodeType === 9 || container === window ? root : container\n return container !== element && container.contains(element)\n }\n : function (element, container) {\n while (element = element.parentNode) if (element === container) return 1\n return 0\n }\n , check = function (event) {\n var related = event.relatedTarget\n return !related\n ? related == null\n : (related !== this && related.prefix !== 'xul' && !/document/.test(this.toString())\n && !isAncestor(related, this))\n }\n\n return {\n mouseenter: { base: 'mouseover', condition: check }\n , mouseleave: { base: 'mouseout', condition: check }\n , mousewheel: { base: /Firefox/.test(navigator.userAgent) ? 'DOMMouseScroll' : 'mousewheel' }\n }\n }())\n\n // we provide a consistent Event object across browsers by taking the actual DOM\n // event object and generating a new one from its properties.\n , Event = (function () {\n // a whitelist of properties (for different event types) tells us what to check for and copy\n var commonProps = str2arr('altKey attrChange attrName bubbles cancelable ctrlKey currentTarget ' +\n 'detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey ' +\n 'srcElement target timeStamp type view which propertyName path')\n , mouseProps = commonProps.concat(str2arr('button buttons clientX clientY dataTransfer ' +\n 'fromElement offsetX offsetY pageX pageY screenX screenY toElement movementX movementY region'))\n , mouseWheelProps = mouseProps.concat(str2arr('wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ ' +\n 'axis')) // 'axis' is FF specific\n , keyProps = commonProps.concat(str2arr('char charCode key keyCode keyIdentifier ' +\n 'keyLocation location isComposing code'))\n , textProps = commonProps.concat(str2arr('data'))\n , touchProps = commonProps.concat(str2arr('touches targetTouches changedTouches scale rotation'))\n , messageProps = commonProps.concat(str2arr('data origin source'))\n , stateProps = commonProps.concat(str2arr('state'))\n , overOutRegex = /over|out/\n // some event types need special handling and some need special properties, do that all here\n , typeFixers = [\n { // key events\n reg: /key/i\n , fix: function (event, newEvent) {\n newEvent.keyCode = event.keyCode || event.which\n return keyProps\n }\n }\n , { // mouse events\n reg: /click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i\n , fix: function (event, newEvent, type) {\n newEvent.rightClick = event.which === 3 || event.button === 2\n newEvent.pos = { x: 0, y: 0 }\n if (event.pageX || event.pageY) {\n newEvent.clientX = event.pageX\n newEvent.clientY = event.pageY\n } else if (event.clientX || event.clientY) {\n newEvent.clientX = event.clientX + doc.body.scrollLeft + root.scrollLeft\n newEvent.clientY = event.clientY + doc.body.scrollTop + root.scrollTop\n }\n if (overOutRegex.test(type)) {\n newEvent.relatedTarget = event.relatedTarget\n || event[(type == 'mouseover' ? 'from' : 'to') + 'Element']\n }\n return mouseProps\n }\n }\n , { // mouse wheel events\n reg: /mouse.*(wheel|scroll)/i\n , fix: function () { return mouseWheelProps }\n }\n , { // TextEvent\n reg: /^text/i\n , fix: function () { return textProps }\n }\n , { // touch and gesture events\n reg: /^touch|^gesture/i\n , fix: function () { return touchProps }\n }\n , { // message events\n reg: /^message$/i\n , fix: function () { return messageProps }\n }\n , { // popstate events\n reg: /^popstate$/i\n , fix: function () { return stateProps }\n }\n , { // everything else\n reg: /.*/\n , fix: function () { return commonProps }\n }\n ]\n , typeFixerMap = {} // used to map event types to fixer functions (above), a basic cache mechanism\n\n , Event = function (event, element, isNative) {\n if (!arguments.length) return\n event = event || ((element.ownerDocument || element.document || element).parentWindow || win).event\n this.originalEvent = event\n this.isNative = isNative\n this.isBean = true\n\n if (!event) return\n\n var type = event.type\n , target = event.target || event.srcElement\n , i, l, p, props, fixer\n\n this.target = target && target.nodeType === 3 ? target.parentNode : target\n\n if (isNative) { // we only need basic augmentation on custom events, the rest expensive & pointless\n fixer = typeFixerMap[type]\n if (!fixer) { // haven't encountered this event type before, map a fixer function for it\n for (i = 0, l = typeFixers.length; i < l; i++) {\n if (typeFixers[i].reg.test(type)) { // guaranteed to match at least one, last is .*\n typeFixerMap[type] = fixer = typeFixers[i].fix\n break\n }\n }\n }\n\n props = fixer(event, this, type)\n for (i = props.length; i--;) {\n if (!((p = props[i]) in this) && p in event) this[p] = event[p]\n }\n }\n }\n\n // preventDefault() and stopPropagation() are a consistent interface to those functions\n // on the DOM, stop() is an alias for both of them together\n Event.prototype.preventDefault = function () {\n if (this.originalEvent.preventDefault) this.originalEvent.preventDefault()\n else this.originalEvent.returnValue = false\n }\n Event.prototype.stopPropagation = function () {\n if (this.originalEvent.stopPropagation) this.originalEvent.stopPropagation()\n else this.originalEvent.cancelBubble = true\n }\n Event.prototype.stop = function () {\n this.preventDefault()\n this.stopPropagation()\n this.stopped = true\n }\n // stopImmediatePropagation() has to be handled internally because we manage the event list for\n // each element\n // note that originalElement may be a Bean#Event object in some situations\n Event.prototype.stopImmediatePropagation = function () {\n if (this.originalEvent.stopImmediatePropagation) this.originalEvent.stopImmediatePropagation()\n this.isImmediatePropagationStopped = function () { return true }\n }\n Event.prototype.isImmediatePropagationStopped = function () {\n return this.originalEvent.isImmediatePropagationStopped && this.originalEvent.isImmediatePropagationStopped()\n }\n Event.prototype.clone = function (currentTarget) {\n //TODO: this is ripe for optimisation, new events are *expensive*\n // improving this will speed up delegated events\n var ne = new Event(this, this.element, this.isNative)\n ne.currentTarget = currentTarget\n return ne\n }\n\n return Event\n }())\n\n // if we're in old IE we can't do onpropertychange on doc or win so we use doc.documentElement for both\n , targetElement = function (element, isNative) {\n return !W3C_MODEL && !isNative && (element === doc || element === win) ? root : element\n }\n\n /**\n * Bean maintains an internal registry for event listeners. We don't touch elements, objects\n * or functions to identify them, instead we store everything in the registry.\n * Each event listener has a RegEntry object, we have one 'registry' for the whole instance.\n */\n , RegEntry = (function () {\n // each handler is wrapped so we can handle delegation and custom events\n var wrappedHandler = function (element, fn, condition, args) {\n var call = function (event, eargs) {\n return fn.apply(element, args ? slice.call(eargs, event ? 0 : 1).concat(args) : eargs)\n }\n , findTarget = function (event, eventElement) {\n return fn.__beanDel ? fn.__beanDel.ft(event.target, element) : eventElement\n }\n , handler = condition\n ? function (event) {\n var target = findTarget(event, this) // deleated event\n if (condition.apply(target, arguments)) {\n if (event) event.currentTarget = target\n return call(event, arguments)\n }\n }\n : function (event) {\n if (fn.__beanDel) event = event.clone(findTarget(event)) // delegated event, fix the fix\n return call(event, arguments)\n }\n handler.__beanDel = fn.__beanDel\n return handler\n }\n\n , RegEntry = function (element, type, handler, original, namespaces, args, root) {\n var customType = customEvents[type]\n , isNative\n\n if (type == 'unload') {\n // self clean-up\n handler = once(removeListener, element, type, handler, original)\n }\n\n if (customType) {\n if (customType.condition) {\n handler = wrappedHandler(element, handler, customType.condition, args)\n }\n type = customType.base || type\n }\n\n this.isNative = isNative = nativeEvents[type] && !!element[eventSupport]\n this.customType = !W3C_MODEL && !isNative && type\n this.element = element\n this.type = type\n this.original = original\n this.namespaces = namespaces\n this.eventType = W3C_MODEL || isNative ? type : 'propertychange'\n this.target = targetElement(element, isNative)\n this[eventSupport] = !!this.target[eventSupport]\n this.root = root\n this.handler = wrappedHandler(element, handler, null, args)\n }\n\n // given a list of namespaces, is our entry in any of them?\n RegEntry.prototype.inNamespaces = function (checkNamespaces) {\n var i, j, c = 0\n if (!checkNamespaces) return true\n if (!this.namespaces) return false\n for (i = checkNamespaces.length; i--;) {\n for (j = this.namespaces.length; j--;) {\n if (checkNamespaces[i] == this.namespaces[j]) c++\n }\n }\n return checkNamespaces.length === c\n }\n\n // match by element, original fn (opt), handler fn (opt)\n RegEntry.prototype.matches = function (checkElement, checkOriginal, checkHandler) {\n return this.element === checkElement &&\n (!checkOriginal || this.original === checkOriginal) &&\n (!checkHandler || this.handler === checkHandler)\n }\n\n return RegEntry\n }())\n\n , registry = (function () {\n // our map stores arrays by event type, just because it's better than storing\n // everything in a single array.\n // uses '$' as a prefix for the keys for safety and 'r' as a special prefix for\n // rootListeners so we can look them up fast\n var map = {}\n\n // generic functional search of our registry for matching listeners,\n // `fn` returns false to break out of the loop\n , forAll = function (element, type, original, handler, root, fn) {\n var pfx = root ? 'r' : '$'\n if (!type || type == '*') {\n // search the whole registry\n for (var t in map) {\n if (t.charAt(0) == pfx) {\n forAll(element, t.substr(1), original, handler, root, fn)\n }\n }\n } else {\n var i = 0, l, list = map[pfx + type], all = element == '*'\n if (!list) return\n for (l = list.length; i < l; i++) {\n if ((all || list[i].matches(element, original, handler)) && !fn(list[i], list, i, type)) return\n }\n }\n }\n\n , has = function (element, type, original, root) {\n // we're not using forAll here simply because it's a bit slower and this\n // needs to be fast\n var i, list = map[(root ? 'r' : '$') + type]\n if (list) {\n for (i = list.length; i--;) {\n if (!list[i].root && list[i].matches(element, original, null)) return true\n }\n }\n return false\n }\n\n , get = function (element, type, original, root) {\n var entries = []\n forAll(element, type, original, null, root, function (entry) {\n return entries.push(entry)\n })\n return entries\n }\n\n , put = function (entry) {\n var has = !entry.root && !this.has(entry.element, entry.type, null, false)\n , key = (entry.root ? 'r' : '$') + entry.type\n ;(map[key] || (map[key] = [])).push(entry)\n return has\n }\n\n , del = function (entry) {\n forAll(entry.element, entry.type, null, entry.handler, entry.root, function (entry, list, i) {\n list.splice(i, 1)\n entry.removed = true\n if (list.length === 0) delete map[(entry.root ? 'r' : '$') + entry.type]\n return false\n })\n }\n\n // dump all entries, used for onunload\n , entries = function () {\n var t, entries = []\n for (t in map) {\n if (t.charAt(0) == '$') entries = entries.concat(map[t])\n }\n return entries\n }\n\n return { has: has, get: get, put: put, del: del, entries: entries }\n }())\n\n // we need a selector engine for delegated events, use querySelectorAll if it exists\n // but for older browsers we need Qwery, Sizzle or similar\n , selectorEngine\n , setSelectorEngine = function (e) {\n if (!arguments.length) {\n selectorEngine = doc.querySelectorAll\n ? function (s, r) {\n return r.querySelectorAll(s)\n }\n : function () {\n throw new Error('Bean: No selector engine installed') // eeek\n }\n } else {\n selectorEngine = e\n }\n }\n\n // we attach this listener to each DOM event that we need to listen to, only once\n // per event type per DOM element\n , rootListener = function (event, type) {\n if (!W3C_MODEL && type && event && event.propertyName != '_on' + type) return\n\n var listeners = registry.get(this, type || event.type, null, false)\n , l = listeners.length\n , i = 0\n\n event = new Event(event, this, true)\n if (type) event.type = type\n\n // iterate through all handlers registered for this type, calling them unless they have\n // been removed by a previous handler or stopImmediatePropagation() has been called\n for (; i < l && !event.isImmediatePropagationStopped(); i++) {\n if (!listeners[i].removed) listeners[i].handler.call(this, event)\n }\n }\n\n // add and remove listeners to DOM elements\n , listener = W3C_MODEL\n ? function (element, type, add, custom, useCapture) {\n // new browsers\n element[add ? addEvent : removeEvent](type, rootListener, useCapture)\n }\n : function (element, type, add, custom /*, useCapture */) {\n // IE8 and below, use attachEvent/detachEvent and we have to piggy-back propertychange events\n // to simulate event bubbling etc.\n var entry\n if (add) {\n registry.put(entry = new RegEntry(\n element\n , custom || type\n , function (event) { // handler\n rootListener.call(element, event, custom)\n }\n , rootListener\n , null\n , null\n , true // is root\n ))\n if (custom && element['_on' + custom] == null) element['_on' + custom] = 0\n entry.target.attachEvent('on' + entry.eventType, entry.handler)\n } else {\n entry = registry.get(element, custom || type, rootListener, true)[0]\n if (entry) {\n entry.target.detachEvent('on' + entry.eventType, entry.handler)\n registry.del(entry)\n }\n }\n }\n\n , once = function (rm, element, type, fn, originalFn) {\n // wrap the handler in a handler that does a remove as well\n return function () {\n fn.apply(this, arguments)\n rm(element, type, originalFn)\n }\n }\n\n , removeListener = function (element, orgType, handler, namespaces, useCapture) {\n var type = orgType && orgType.replace(nameRegex, '')\n , handlers = registry.get(element, type, null, false)\n , removed = {}\n , i, l\n\n for (i = 0, l = handlers.length; i < l; i++) {\n if ((!handler || handlers[i].original === handler) && handlers[i].inNamespaces(namespaces)) {\n // TODO: this is problematic, we have a registry.get() and registry.del() that\n // both do registry searches so we waste cycles doing this. Needs to be rolled into\n // a single registry.forAll(fn) that removes while finding, but the catch is that\n // we'll be splicing the arrays that we're iterating over. Needs extra tests to\n // make sure we don't screw it up. @rvagg\n registry.del(handlers[i])\n if (!removed[handlers[i].eventType] && handlers[i][eventSupport])\n removed[handlers[i].eventType] = { t: handlers[i].eventType, c: handlers[i].type }\n }\n }\n // check each type/element for removed listeners and remove the rootListener where it's no longer needed\n for (i in removed) {\n if (!registry.has(element, removed[i].t, null, false)) {\n // last listener of this type, remove the rootListener\n listener(element, removed[i].t, false, removed[i].c, useCapture)\n }\n }\n }\n\n // set up a delegate helper using the given selector, wrap the handler function\n , delegate = function (selector, fn) {\n //TODO: findTarget (therefore $) is called twice, once for match and once for\n // setting e.currentTarget, fix this so it's only needed once\n var findTarget = function (target, root) {\n var i, array = isString(selector) ? selectorEngine(selector, root) : selector\n for (; target && target !== root; target = target.parentNode) {\n for (i = array.length; i--;) {\n if (array[i] === target) return target\n }\n }\n }\n , handler = function (e) {\n var match = findTarget(e.target, this)\n if (match) fn.apply(match, arguments)\n }\n\n // __beanDel isn't pleasant but it's a private function, not exposed outside of Bean\n handler.__beanDel = {\n ft : findTarget // attach it here for customEvents to use too\n , selector : selector\n }\n return handler\n }\n\n , fireListener = W3C_MODEL ? function (isNative, type, element) {\n // modern browsers, do a proper dispatchEvent()\n var evt = doc.createEvent(isNative ? 'HTMLEvents' : 'UIEvents')\n evt[isNative ? 'initEvent' : 'initUIEvent'](type, true, true, win, 1)\n element.dispatchEvent(evt)\n } : function (isNative, type, element) {\n // old browser use onpropertychange, just increment a custom property to trigger the event\n element = targetElement(element, isNative)\n isNative ? element.fireEvent('on' + type, doc.createEventObject()) : element['_on' + type]++\n }\n\n /**\n * Public API: off(), on(), add(), (remove()), one(), fire(), clone()\n */\n\n /**\n * off(element[, eventType(s)[, handler ], options])\n */\n , off = function (element, typeSpec, fn) {\n var isTypeStr = isString(typeSpec),\n defaultOpts = {\n useCapture: false\n }\n , opts = buildOptions(defaultOpts, arguments[arguments.length - 1])\n , k, type, namespaces, i\n\n if (isTypeStr && typeSpec.indexOf(' ') > 0) {\n // off(el, 't1 t2 t3', fn) or off(el, 't1 t2 t3')\n typeSpec = str2arr(typeSpec)\n for (i = typeSpec.length; i--;)\n off(element, typeSpec[i], fn)\n return element\n }\n\n type = isTypeStr && typeSpec.replace(nameRegex, '')\n if (type && customEvents[type]) type = customEvents[type].base\n\n if (!typeSpec || isTypeStr) {\n // off(el) or off(el, t1.ns) or off(el, .ns) or off(el, .ns1.ns2.ns3)\n if (namespaces = isTypeStr && typeSpec.replace(namespaceRegex, '')) namespaces = str2arr(namespaces, '.')\n removeListener(element, type, fn, namespaces, opts.useCapture)\n } else if (isFunction(typeSpec)) {\n // off(el, fn)\n removeListener(element, null, typeSpec, null, opts.useCapture)\n } else {\n // off(el, { t1: fn1, t2, fn2 })\n for (k in typeSpec) {\n if (typeSpec.hasOwnProperty(k)) off(element, k, typeSpec[k])\n }\n }\n\n return element\n }\n\n /**\n * on(element, eventType(s)[, selector], handler[, args ], [options])\n */\n , on = function(element, events, selector, fn) {\n var defaultOpts = {\n useCapture: false\n },\n originalFn, type, types, i, args, entry, first, opts\n\n //TODO: the undefined check means you can't pass an 'args' argument, fix this perhaps?\n if (selector === undefined && typeof events == 'object') {\n //TODO: this can't handle delegated events\n for (type in events) {\n if (events.hasOwnProperty(type)) {\n on.call(this, element, type, events[type])\n }\n }\n return\n }\n\n if (!isFunction(selector)) {\n // delegated event\n originalFn = fn\n args = slice.call(arguments, 4)\n fn = delegate(selector, originalFn, selectorEngine)\n } else {\n args = slice.call(arguments, 3)\n fn = originalFn = selector\n }\n\n opts = buildOptions(defaultOpts, args[args.length - 1])\n types = str2arr(events)\n\n // special case for one(), wrap in a self-removing handler\n if (this === ONE) {\n fn = once(off, element, events, fn, originalFn)\n }\n\n for (i = types.length; i--;) {\n // add new handler to the registry and check if it's the first for this element/type\n first = registry.put(entry = new RegEntry(\n element\n , types[i].replace(nameRegex, '') // event type\n , fn\n , originalFn\n , str2arr(types[i].replace(namespaceRegex, ''), '.') // namespaces\n , args\n , false // not root\n ))\n if (entry[eventSupport] && first) {\n // first event of this type on this element, add root listener\n listener(element, entry.eventType, true, entry.customType, opts.useCapture)\n }\n }\n\n return element\n }\n\n /**\n * add(element[, selector], eventType(s), handler[, args ])\n *\n * Deprecated: kept (for now) for backward-compatibility\n */\n , add = function (element, events, fn, delfn, options) {\n return on.apply(\n null\n , !isString(fn)\n ? slice.call(arguments)\n : [ element, fn, events, delfn ].concat(arguments.length > 3 ? slice.call(arguments, 4) : [])\n )\n }\n\n /**\n * one(element, eventType(s)[, selector], handler[, args ])\n */\n , one = function () {\n return on.apply(ONE, arguments)\n }\n\n /**\n * fire(element, eventType(s)[, args ])\n *\n * The optional 'args' argument must be an array, if no 'args' argument is provided\n * then we can use the browser's DOM event system, otherwise we trigger handlers manually\n */\n , fire = function (element, type, args) {\n var types = str2arr(type)\n , i, j, l, names, handlers\n\n for (i = types.length; i--;) {\n type = types[i].replace(nameRegex, '')\n if (names = types[i].replace(namespaceRegex, '')) names = str2arr(names, '.')\n if (!names && !args && element[eventSupport]) {\n fireListener(nativeEvents[type], type, element)\n } else {\n // non-native event, either because of a namespace, arguments or a non DOM element\n // iterate over all listeners and manually 'fire'\n handlers = registry.get(element, type, null, false)\n args = [false].concat(args)\n for (j = 0, l = handlers.length; j < l; j++) {\n if (handlers[j].inNamespaces(names)) {\n handlers[j].handler.apply(element, args)\n }\n }\n }\n }\n return element\n }\n\n /**\n * clone(dstElement, srcElement[, eventType ])\n *\n * TODO: perhaps for consistency we should allow the same flexibility in type specifiers?\n */\n , clone = function (element, from, type) {\n var handlers = registry.get(from, type, null, false)\n , l = handlers.length\n , i = 0\n , args, beanDel\n\n for (; i < l; i++) {\n if (handlers[i].original) {\n args = [ element, handlers[i].type ]\n if (beanDel = handlers[i].handler.__beanDel) args.push(beanDel.selector)\n args.push(handlers[i].original)\n on.apply(null, args)\n }\n }\n return element\n }\n\n , bean = {\n 'on' : on\n , 'add' : add\n , 'one' : one\n , 'off' : off\n , 'remove' : off\n , 'clone' : clone\n , 'fire' : fire\n , 'Event' : Event\n , 'setSelectorEngine' : setSelectorEngine\n , 'noConflict' : function () {\n context[name] = old\n return this\n }\n }\n\n // for IE, clean up on unload to avoid leaks\n if (win.attachEvent) {\n var cleanup = function () {\n var i, entries = registry.entries()\n for (i in entries) {\n if (entries[i].type && entries[i].type !== 'unload') off(entries[i].element, entries[i].type)\n }\n win.detachEvent('onunload', cleanup)\n win.CollectGarbage && win.CollectGarbage()\n }\n win.attachEvent('onunload', cleanup)\n }\n\n // initialize selector engine to internal default (qSA or throw Error)\n setSelectorEngine()\n\n return bean\n});\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","require( './lib/shims/custom-event' )\n\nvar bean = require( 'bean' )\nvar key = require( 'keymaster' ) \nvar animationEvent = require( './lib/animation-events' )\nvar page = require( './lib/page' )\nvar tap = require( './lib/tap-events' )\nvar debounce = require( './lib/debounce' )\nvar throttle = require( './lib/throttle' )\nvar delay = require( './lib/delay' )\nvar repeat = require( './lib/repeat' )\nvar bubbleFormEvents = require( './lib/bubble-form-events' )\nvar scroll = require( './lib/scroll' )\nvar resize = require( './lib/resize' )\nvar callbackManager = require( './lib/callback-manager' )\nvar media = require( './lib/media' )\n\nvar slice = Array.prototype.slice\nvar formBubbling = false\n\nmodule.exports = {\n\n // DOM events\n on: on,\n off: off,\n one: one,\n fire: fire,\n clone: bean.clone,\n ready: page.ready,\n change: page.change,\n afterAnimation: afterAnimation,\n\n // Media query events\n media: media,\n\n // Keyboard events\n key: key,\n keyOn: key,\n keyOff: key.unbind,\n keyOne: keyOne,\n\n // Timing utilities\n debounce: debounce,\n throttle: throttle,\n delay: delay,\n repeat: repeat,\n\n // Optimized Event Managers\n scroll: scroll,\n resize: resize,\n\n callbackManager: callbackManager,\n callback: callbackManager.callback,\n\n // Bubbling fix\n bubbleFormEvents: bubbleFormEvents\n}\n\n// Bean doesn't account for cross-browser support on animation events\n// So rather than pass through events to bean, we process them to add\n// vendor prefixes or remove events if browsers do not suppor them\n//\nfunction on () {\n setEvent( 'on', slice.call( arguments ) )\n}\n\nfunction off () {\n setEvent( 'off', slice.call( arguments ) )\n}\n\nfunction one () {\n setEvent( 'one', slice.call( arguments ) )\n}\n\nfunction fire () {\n\n args = slice.call( arguments )\n var el = args[0]\n var events = []\n\n args[1].split(' ').forEach( function( event ) {\n\n var event = animationEvent.transform( event )\n if ( !isEmpty( event ) ) events.push( event )\n\n })\n\n if ( !isEmpty( events ) ) {\n\n args[1] = events.join( ' ' )\n bean.fire.apply( this, args )\n\n }\n}\n\nfunction setEvent( registerType, args ) {\n\n transformArgs( args ).forEach( function( arg ) {\n bean[ registerType ].apply( null, arg )\n })\n\n}\n\n// Add support for unbinding a key event after it is called\n//\nfunction keyOne ( keys, scope, fn ) {\n\n if ( typeof scope == 'function' ) {\n fn = scope\n scope = 'all'\n }\n\n key( keys, scope, function( event ) {\n key.unbind( keys, scope )\n fn( event )\n })\n}\n\nfunction afterAnimation( el, callback ) {\n var hasAnimation = !!window.getComputedStyle( el ).getPropertyValue( 'animation-duration' )\n if ( hasAnimation ) {\n one( el, 'animationend', callback )\n } else {\n callback()\n }\n}\n\n// Transform event arguments to handle tap event and cross-browser animation events\n// Returns an array of events to be registered individually\n//\nfunction transformArgs( args ) {\n\n var transformedArgs = []\n var newEvents = {}\n var element = args.shift() // retrieve element\n var events = args.shift()\n\n // detect event delegate selector\n if ( typeof args[0] != 'function' ) {\n var delegate = args.shift()\n }\n\n // convert event strings to object based events for code simplification\n // example: arguments ('hover focus', function) would become ({ 'hover focus': function })\n if ( typeof events == 'string' ) {\n var objEvents = {}\n objEvents[events] = args.shift()\n events = objEvents\n }\n\n // Walk through each key in the events object and add vendor prefixes to 'animation' events\n // and wrap callback in the tap function for all 'tap' events.\n //\n for ( event in events ) {\n\n if ( events.hasOwnProperty( event ) ) {\n var callback = events[event]\n\n // Events can be registered as space separated groups like \"hover focus\"\n // This handles each event independantly\n //\n event.split(' ').forEach( function( e ){\n\n // If it is an animation event, vendor prefix it, or fire the callback according to browser support\n e = animationEvent.transform( e )\n\n if ( isEmpty( e ) ) {\n // If it's empty, it has been removed since animation events are not supported.\n // In that case, trigger the event immediately\n callback()\n\n } else if ( e.match( /tap/ ) ) {\n\n // If it's a tap event, wrap the callback and set the event to 'touchstart'\n // Tap isn't a real native event, but this wrapper lets us simulate what a\n // native tap event would be.\n //\n newEvents.touchstart = tap( callback )\n } else {\n newEvents[ e ] = callback\n }\n })\n }\n }\n\n for ( event in newEvents ) {\n var a = []\n a.push( element, event )\n\n if ( delegate ) a.push( delegate )\n\n a.push( newEvents[ event ] )\n transformedArgs.push( a.concat( args ) )\n }\n\n return transformedArgs\n}\n\n\nfunction isEmpty( obj ) {\n\n var hasOwnProperty = Object.prototype.hasOwnProperty\n\n if ( obj == null || obj.length === 0 ) return true\n\n if ( 0 < obj.length ) return false\n\n for (var key in obj) {\n if ( hasOwnProperty.call( obj, key ) ) return false\n }\n\n return true;\n}\n","var cssAnimEventTypes = getAnimationEventTypes()\nvar supported = cssAnimEventTypes.animationstart !== undefined\n\nmodule.exports = {\n transform: transformAnimationEvents\n}\n\nfunction camelCaseEventTypes(prefix) {\n prefix = prefix || '';\n\n return {\n animationstart: prefix + 'AnimationStart',\n animationend: prefix + 'AnimationEnd',\n animationiteration: prefix + 'AnimationIteration'\n };\n}\n\nfunction lowerCaseEventTypes(prefix) {\n prefix = prefix || '';\n\n return {\n animationstart: prefix + 'animationstart',\n animationend: prefix + 'animationend',\n animationiteration: prefix + 'animationiteration'\n };\n}\n\n/**\n * @return {Object} Animation event types {animationstart, animationend, animationiteration}\n */\n\nfunction getAnimationEventTypes() {\n var prefixes = ['webkit', 'Moz', 'O', ''];\n var style = document.documentElement.style;\n\n // browser compliant\n if (undefined !== style.animationName) {\n return lowerCaseEventTypes();\n }\n\n for (var i = 0, len = prefixes.length, prefix; i < len; i++) {\n prefix = prefixes[i];\n\n if (undefined !== style[prefix + 'AnimationName']) {\n // Webkit\n if (0 === i) {\n return camelCaseEventTypes(prefix.toLowerCase());\n }\n // Mozilla\n else if (1 === i) {\n return lowerCaseEventTypes();\n }\n // Opera\n else if (2 === i) {\n return lowerCaseEventTypes(prefix.toLowerCase());\n }\n }\n }\n\n return {};\n}\n\n\n// Adds necessary add vendor prefixes or camelCased event names\n//\nfunction transformAnimationEvents (event) {\n if (!event.match(/animation/i)) {\n return event\n } else {\n if (cssAnimEventTypes[event]) {\n return cssAnimEventTypes[event]\n } else {\n if(window.env != 'test') {\n console.error('\"' + event + '\" is not a supported animation event')\n }\n return ''\n }\n }\n}\n","var Event = require( 'bean' ),\n page = require( './page' ),\n formEls;\n\nvar formBubbling = false\n\nvar fireBubble = function ( event ) {\n if ( event.detail && event.detail.triggered ) { return false }\n\n var ev = new CustomEvent( event.type, { bubbles: true, cancelable: true, detail: { triggered: true } } )\n\n event.stopPropagation()\n event.target.dispatchEvent( ev ) \n\n // Prevent default on original event if custom event is prevented\n if ( ev.defaultPrevented ) event.preventDefault() \n}\n\n// Simplify setting the event type based on the element\nvar eventType = function ( el ) {\n return ( el.tagName == 'FORM' ) ? 'submit' : 'focus blur'\n}\n\n// Add event listeners\nvar bubbleOn = function ( el ) {\n Event.on( el, eventType( el ), fireBubble )\n}\n\n// Remove event listeners\nvar bubbleOff = function ( el ) {\n Event.off( el, eventType( el ), fireBubble )\n}\n\n// Add/Remove event listeners\nvar bubbleFormEvents = function () {\n if ( formBubbling ) { return } \n page.change( function() {\n\n // Remove listeners from previous page\n if ( formEls ) Array.prototype.forEach.call( formEls, bubbleOff )\n\n // Add new listeners to this page\n formEls = document.querySelectorAll( 'form, input' )\n\n Array.prototype.forEach.call( formEls, bubbleOn )\n })\n\n var formBubbling = true\n}\n\nmodule.exports = bubbleFormEvents\n","var Manager = {\n new: function() {\n var manager = {\n\n callbacks: [],\n\n add: function( fn ) {\n\n var cb = Manager.callback.new( fn )\n manager.callbacks.push( cb )\n \n return cb\n\n },\n\n stop: function() {\n manager.callbacks.forEach( function( cb ) { cb.stop() } )\n },\n\n start: function() {\n manager.callbacks.forEach( function( cb ) { cb.start() } )\n },\n\n toggle: function( bool ) {\n manager.callbacks.forEach( function( cb ) { cb.toggle( bool ) } )\n },\n\n remove: function() {\n manager.callbacks = []\n },\n\n fire: function() {\n var args = Array.prototype.slice.call( arguments )\n manager.callbacks.forEach( function( fn ) { fn.apply( this, args ) } )\n }\n }\n\n return manager\n },\n\n callback: {\n new: function( fn ) {\n var cb = function() {\n if ( cb.enabled ) { fn.apply( fn, arguments ) }\n }\n\n cb.stop = function() { cb.enabled = false }\n cb.start = function() { cb.enabled = true }\n cb.toggle = function( bool ) {\n cb.enabled = ( 0 in arguments ) ? bool : !cb.enabled\n }\n cb.enabled = true\n\n return cb\n }\n }\n}\n\nmodule.exports = Manager\n","var now = function() {\n return Date.now()\n}\n\nvar pickFunction = function() {\n var found\n Array.prototype.forEach.call( arguments, function( candidate ) {\n if ( typeof( candidate ) == 'function' && !found ) { found = candidate }\n })\n\n return found\n}\n\nvar debounce = function( fn, wait, options ) {\n\n // Allow options passed as the first argument\n if ( typeof( fn ) == 'object' ) { options = fn } \n\n // Options won't be null\n else { options = options || {} }\n\n wait = options.wait || wait || 0\n\n var max = options.max || false,\n leading = ( ( 'leading' in options ) ? options.leading : false ),\n trailing = ( ( 'trailing' in options ) ? options.trailing : true ),\n \n // Grab functions from options or default to first argument\n leadingFn = pickFunction( options.leading, options.trailing, options.callback, fn ),\n trailingFn = pickFunction( options.trailing, options.leading, options.callback, fn ),\n\n // State tracking vars\n args, // Track arguments passed to debounced callback\n queued = false, // Has a callback been added to the animation loop?\n handle = {}, // Object for tracking functions and callbacks\n lastCalled = 0, // Keep a timer for debouncing\n lastInvoked = 0, // Keep a timer for max\n leadingBlocked = false; // Track leading, throttling subsequent leading calls\n\n // Queue the function with requestAnimationFrame\n var invoke = function( callType ) {\n\n lastCalled = now()\n lastInvoked = now()\n queued = false\n leadingBlocked = true\n\n if ( callType === 'leading' ) {\n leadingFn.apply( leadingFn, args ) }\n else {\n trailingFn.apply( trailingFn, args ) }\n\n }\n\n // Load the loop into the animation queue\n var addToQueue = function () {\n\n if ( !queued ) {\n queued = true\n handle.value = requestAnimationFrame( loop ) // Add to browser's animation queue\n }\n\n }\n\n // Remove from animation queue and reset debounce \n var removeFromQueue = function() {\n\n if ( \"value\" in handle ) {\n cancelAnimationFrame( handle.value )\n queued = false\n lastCalled = 0\n lastInvoked = 0\n leadingBlocked = false\n }\n \n }\n\n // prevent infinite debouncing ( if options.max is set )\n var maxPassed = function() {\n return ( max && now() - lastInvoked >= max )\n }\n\n var waitReached = function() {\n return ( now() - lastCalled ) >= wait\n }\n\n // This gets loaded into the animation queue and determines whether to ivoke the debounced function\n var loop = function () {\n \n // Loop was executed so it's no longer in the animation queue\n queued = false\n \n if ( leading && !leadingBlocked ) {\n invoke( 'leading' )\n }\n\n // If function has been called to frequently to execute\n else if ( maxPassed() ) {\n\n if ( leading ) { invoke( 'leading' ) }\n else { invoke( 'trailing' ) }\n\n } \n \n // If function hasn't been called since last wait\n else if ( waitReached() ) {\n\n // If trailing it's safe to invoke\n if ( trailing ) { invoke( 'trailing' ) }\n\n // If leading, it's safe to remove block\n if ( leading ) { leadingBlocked = false }\n \n } else {\n addToQueue()\n }\n\n }\n\n // A wrapper function for queueing up function calls\n //\n var debounced = function() {\n lastCalled = now()\n args = arguments\n addToQueue()\n }\n\n debounced.stop = removeFromQueue\n\n return debounced\n}\n\nmodule.exports = debounce\n","var now = function() {\n return Date.now()\n}\n\nvar delay = function ( fn, wait ) {\n\n var argsStart = ( wait != null ) ? 2 : 1;\n var handle = {}\n\n handle.args = Array.prototype.slice.call( arguments, argsStart )\n handle.wait = wait || 0\n handle.start = now()\n\n handle.stop = function () {\n if ( \"value\" in handle ) {\n cancelAnimationFrame( handle.value );\n }\n }\n\n handle.loop = function () {\n\n // If wait limit has been reached\n if ( now() - handle.start >= handle.wait ) {\n fn.apply( fn, handle.args )\n\n // If repeat is set and is not 0\n if ( !!handle.repeat ) {\n handle.repeat = handle.repeat - 1\n handle.start = now()\n queueDelay( handle )\n } else if ( handle.repeat === 0 && handle.complete ) {\n handle.complete()\n }\n\n } else {\n queueDelay( handle )\n }\n\n }\n\n\n return queueDelay( handle )\n}\n\nvar queueDelay = function ( handle ) {\n handle.value = requestAnimationFrame( handle.loop )\n return handle\n}\n\nmodule.exports = delay\n","// This simplifies common uses for window.matchMedia \n// namely, adding listeners for width and height queries\n\nfunction parseQuery( query, dimension ) {\n var result = {}\n\n if ( typeof( query ) === 'string' ) { return query }\n\n result.min = size( query.min, 'min-' + dimension )\n result.max = size( query.max, 'max-' + dimension )\n\n if ( result.min && result.max )\n result.query = result.min + ' and ' + result.max\n\n return result.query || result.min || result.max\n}\n\nfunction size( num, limit ) {\n return ( num ) ? '('+limit+': ' + toPx( num ) + ')' : null\n}\n\nfunction toPx( width ) {\n if ( typeof( width ) === 'number' ) { return width + 'px'}\n return width\n}\n\nvar media = {\n\n width: function( query, fn ) {\n return media.listen( parseQuery( query, 'width' ), fn )\n },\n\n minWidth: function( size, fn ) { return media.width( { min: size }, fn ) },\n maxWidth: function( size, fn ) { return media.width( { max: size }, fn ) },\n\n height: function( query, fn ) {\n return media.listen( parseQuery( query, 'height' ), fn )\n },\n\n minHeight: function( size, fn ) { return media.height( { min: size }, fn ) },\n maxHeight: function( size, fn ) { return media.height( { max: size }, fn ) },\n\n listen: function( query, fn ) {\n var match = window.matchMedia( query )\n\n if ( fn ) {\n fn( match )\n match.addListener( fn )\n }\n\n return match\n }\n\n}\n\n\nmodule.exports = media\n","var Event = require( 'bean' )\nvar callbackManager = require( './callback-manager' )\nvar throttle = require( './throttle' )\nvar debounce = require( './debounce' )\n\nvar optimizedEventManager = {\n new: function( name ) {\n\n // Create a new callback manager\n var manager = {\n run: callbackManager.new(),\n start: callbackManager.new(),\n stop: callbackManager.new()\n }\n\n // run callbacks when event happens (at paint-ready frames)\n var running = throttle( manager.run.fire )\n\n // fire callbacks when event starts (at paint-ready frames)\n var started = debounce({\n leading: manager.start.fire,\n trailing: false,\n wait: 150\n })\n\n // fire callbacks when event starts (at paint-ready frames)\n var stopped = debounce( manager.stop.fire, 150 )\n\n Event.on( window, name, function() {\n running()\n started()\n stopped()\n })\n\n // Public API\n var run = function ( fn ) { return manager.run.add( fn ) }\n run.start = function ( fn ) { return manager.start.add( fn ) }\n run.stop = function ( fn ) { return manager.stop.add( fn ) }\n\n // Add custom events for to run optimized listeners. ( name -> Name )\n run( function() { Event.fire( window, 'optimized' + name[0].toUpperCase() + name.substring(1) ) } )\n run.start( function() { Event.fire( window, name + 'Start' ) } )\n run.stop( function() { Event.fire( window, name + 'Stop' ) } )\n\n return run\n }\n}\n\nmodule.exports = optimizedEventManager\n","var Event = require( 'bean' )\nvar callbackManager = require( './callback-manager' )\n\n// Create a new page event manager\nvar manager = {\n ready: callbackManager.new(),\n change: callbackManager.new(),\n readyAlready: false,\n changed: false,\n}\n\nmanager.ready.add( function(){\n manager.readyAlready = true \n})\n\nmanager.ready.add( function(){ \n if ( !window.Turbolinks && !manager.changed ) { \n manager.changed = true \n manager.change.fire()\n }\n})\n\nvar ready = function ( fn ) {\n if ( manager.readyAlready ) { fn() }\n return manager.ready.add( fn ) }\n\nvar change = function( fn ) {\n if ( manager.changed ) { fn() }\n return manager.change.add( fn ) }\n\n// Make it easy to trigger ready callbacks\nready.fire = function () {\n manager.ready.fire()\n // Be sure ready can only be fired once\n manager.ready.stop() }\n\n// Make it easy to trigger change callbacks\nchange.fire = function () {\n manager.change.fire() }\n\nEvent.on( document, 'DOMContentLoaded', ready.fire )\nEvent.on( document, 'page:change', change.fire ) // Support rails turbolinks page load event\n\nmodule.exports = {\n ready: ready,\n change: change\n}\n","var delay = require( './delay' )\n\nvar repeat = function( fn, wait, limit ) {\n\n var argsStart = 1,\n handle = delay ( fn, wait );\n\n if ( limit != null ) { argsStart = 3 }\n else if ( wait != null ) { argsStart = 2 }\n\n // Enable repeat ( -1 will repeat forever )\n handle.repeat = limit || -1\n handle.args = Array.prototype.slice.call( arguments, argsStart )\n handle.stop = handle.cancel\n\n return handle\n}\n\nmodule.exports = repeat\n","var manager = require( './optimized-event-manager' )\nvar resize = manager.new( 'resize' )\n\n// Pause animations during resizing for better performance\nresize.disableAnimation = function() {\n var style = '<style id=\"fullstop\">.no-animation *, .no-animation *:after, .no-animation *:before {\\\n transition: none !important; animation: none !important\\\n }</style>'\n\n // Inject style for easy classname manipulation\n if ( !document.querySelector('style#fullstop') ) { \n document.head.insertAdjacentHTML('beforeend', style)\n }\n\n resize.start( function() { document.body.classList.add( 'no-animation' ) } )\n resize.stop( function() { document.body.classList.remove( 'no-animation' ) } )\n}\n\nmodule.exports = resize\n","var manager = require( './optimized-event-manager' )\nvar scroll = manager.new( 'scroll' )\n\nscroll.disablePointer = function() {\n\n // Disable pointer interaction\n scroll.start( function() {\n document.documentElement.style.pointerEvents = 'none'\n })\n\n // Enable pointer interaction\n scroll.stop( function() {\n document.documentElement.style.pointerEvents = ''\n })\n}\n\nmodule.exports = scroll\n","// Custom Event Polyfill\n(function () {\n\n if ( typeof window.CustomEvent === \"function\" ) return false;\n\n function CustomEvent ( event, params ) {\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n var evt = document.createEvent( 'CustomEvent' );\n evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );\n return evt;\n }\n\n CustomEvent.prototype = window.Event.prototype;\n\n window.CustomEvent = CustomEvent;\n})()\n","var endEvents = [\n 'touchend'\n]\n\nmodule.exports = Tap\n\n// default tap timeout in ms\nTap.timeout = 200\n\nfunction Tap(callback, options) {\n options = options || {}\n // if the user holds his/her finger down for more than 200ms,\n // then it's not really considered a tap.\n // however, you can make this configurable.\n var timeout = options.timeout || Tap.timeout\n\n // to keep track of the original listener\n listener.handler = callback\n\n return listener\n\n // el.addEventListener('touchstart', listener)\n function listener(e1) {\n // tap should only happen with a single finger\n if (!e1.touches || e1.touches.length > 1) return\n\n var el = e1.target\n var context = this\n var args = arguments;\n\n var timeout_id = setTimeout(cleanup, timeout)\n\n el.addEventListener('touchmove', cleanup)\n\n endEvents.forEach(function (event) {\n el.addEventListener(event, done)\n })\n\n function done(e2) {\n // since touchstart is added on the same tick\n // and because of bubbling,\n // it'll execute this on the same touchstart.\n // this filters out the same touchstart event.\n if (e1 === e2) return\n\n cleanup()\n\n // already handled\n if (e2.defaultPrevented) return\n\n // overwrite these functions so that they all to both start and events.\n var preventDefault = e1.preventDefault\n var stopPropagation = e1.stopPropagation\n\n e1.stopPropagation = function () {\n stopPropagation.call(e1)\n stopPropagation.call(e2)\n }\n\n e1.preventDefault = function () {\n preventDefault.call(e1)\n preventDefault.call(e2)\n }\n\n // calls the handler with the `end` event,\n // but i don't think it matters.\n callback.apply(context, args)\n }\n\n // cleanup end events\n // to cancel the tap, just run this early\n function cleanup(e2) {\n // if it's the same event as the origin,\n // then don't actually cleanup.\n // hit issues with this - don't remember\n if (e1 === e2) return\n\n clearTimeout(timeout_id)\n\n el.removeEventListener('touchmove', cleanup)\n\n endEvents.forEach(function (event) {\n el.removeEventListener(event, done)\n })\n }\n }\n}\n","var debounce = require( './debounce' )\n\nvar throttle = function( fn, wait, options ) {\n\n if ( typeof( fn ) == 'object' ) { options = fn; fn = undefined } \n else { options = options || {} }\n\n options.wait = options.wait || wait || 0\n options.max = options.max || options.wait\n options.callback = options.callback || fn\n options.leading = true\n options.trailing = true\n\n return debounce(options)\n}\n\n\nmodule.exports = throttle\n","var validation = require( './lib/validation' )\nvar progressive = require( './lib/progressive' )\n\nmodule.exports = {\n\n validate: validation.validate,\n invalidateField: validation.invalidateField,\n next: progressive.next,\n\n}\n","var toolbox = require( 'compose-toolbox' ),\n Event = toolbox.event,\n Callback = toolbox.event.callback,\n formSelector = 'form.progressive',\n watching = false,\n formCallbacks,\n registeredForms\n\n// Remove any existing callbacks and registered forms\nfunction reset () {\n\n formCallbacks = { next: [] }\n registeredForms = []\n\n}\n\nfunction newForm( form ) {\n\n if ( !form ) return\n\n var steps = toolbox.slice( form.querySelectorAll( '.form-step' ) ),\n stepIndex = 0,\n navItems = ''\n\n if ( steps.length == 0 ) return\n\n\n steps.forEach( function( step, index ) { \n\n // disable all steps but the current step\n step.disabled = step != currentStep()\n step.dataset.step = index\n\n })\n\n if ( form.dataset.nav ) {\n var nav = '<nav class=\"progressive-form-nav\">'\n\n steps.forEach( function( step, index ) {\n nav += '<a href=\"#\" class=\"progressive-form-nav-item\" data-step=\"'+( index + 1 )+'\">'\n nav += step.dataset.nav || \"Step \" + ( index + 1 )\n nav += '</a> '\n })\n\n nav += '</nav>'\n\n form.insertAdjacentHTML( 'afterbegin', nav )\n }\n\n show()\n\n function previousStep () { return steps[ stepIndex - 1] }\n function currentStep () { return steps[ stepIndex ] }\n function nextStep () { return steps[ stepIndex + 1] }\n function active () { return currentStep() && !currentStep().disabled }\n \n // Move to next fieldset\n function forward () {\n showStep( stepIndex + 1 )\n }\n\n // Move to next fieldset\n function back () {\n showStep( stepIndex - 1 )\n }\n\n // Accepts a step index\n function showStep ( index ) {\n\n index = Number( index )\n\n // Get the step from the index\n var step = steps[ index ]\n\n // Don't go to a non-existant step, or the current step\n if ( step && step != currentStep() ) {\n\n var direction = ( stepIndex < index ) ? 'forward' : 'reverse'\n\n // If a step is currently active\n // dismiss it before going to the specified step\n if ( active() ) {\n return dismiss( function() { showStep( index ) }, direction )\n }\n\n stepIndex = index\n\n show( direction )\n\n }\n }\n \n // Hide a completed step and move to the next\n function dismiss ( callback, direction ) {\n direction = direction || 'forward'\n\n currentStep().classList.remove( 'active', 'enter' )\n currentStep().classList.add( 'exit' )\n currentStep().dataset.direction = direction\n\n Event.afterAnimation( currentStep(), function() {\n disable()\n\n if ( typeof callback === 'function' ) callback()\n\n })\n\n }\n\n function revisit ( callback, direction ) {\n\n if ( !active() ) {\n direction = direction || 'reverse'\n\n currentStep().classList.remove( 'exit', 'completed' )\n currentStep().classList.add( 'active', 'enter' )\n currentStep().dataset.direction = direction\n\n disableOtherFieldsets()\n\n Event.afterAnimation( currentStep(), function() {\n if ( typeof callback === 'function' ) callback()\n })\n }\n }\n\n // Show the form-step\n function show ( direction ) {\n\n disableOtherFieldsets()\n currentStep().classList.remove( 'completed' )\n currentStep().dataset.direction = direction\n currentStep().classList.add( 'active', 'enter' )\n\n // focus on the first input\n var firstInput = currentStep().querySelector( 'input:not([hidden]), textarea, select' )\n if ( firstInput ) firstInput.focus()\n\n setNav()\n\n }\n\n // Disable a form step after it has been hidden\n function disable () {\n\n currentStep().disabled = true\n currentStep().classList.add( 'completed' )\n currentStep().classList.remove( 'enter', 'exit' )\n\n }\n\n function setNav () {\n toolbox.each( form.querySelectorAll( 'nav [data-step]' ), function ( nav ) {\n\n if ( nav.dataset.step < stepIndex + 1 ) {\n nav.classList.remove( 'here', 'next' )\n nav.classList.add( 'previous', 'completed' )\n }\n\n if ( nav.dataset.step == stepIndex + 1 ) {\n nav.classList.remove( 'previous', 'next' )\n nav.classList.add( 'here' )\n }\n\n if ( nav.dataset.step > stepIndex + 1 ) {\n nav.classList.remove( 'previous', 'here' )\n nav.classList.add( 'next' )\n }\n\n })\n }\n\n function enableFieldsets ( form ) {\n toolbox.each( form.querySelectorAll( 'fieldset.form-step[disabled]' ), function( fieldset ) {\n fieldset.disabled = false \n })\n }\n\n function disableOtherFieldsets ( ) {\n steps.forEach( function( fieldset ) {\n fieldset.disabled = fieldset != currentStep() \n })\n }\n\n registeredForms.push( function( event, trigger ) {\n var target = event.currentTarget\n\n if ( trigger === 'show-step' ) {\n event.preventDefault()\n\n if ( toolbox.matches( target, '.previous, .completed, .completed + a' ) )\n showStep( target.dataset.step - 1 )\n\n } else if ( trigger === 'next' ) {\n\n // Continue if submit was triggered on this form\n // and no invalid fields are found\n\n var formEl = ( target.tagName == \"FORM\" ) ? target : toolbox.getClosest( target, 'form')\n\n if ( form == formEl && !currentStep().querySelector( ':invalid' ) ) {\n\n // Get the function which triggers callbacks\n var fireCallbacks = getCallbacks( form )\n\n // This is the last stop, be sure all fieldsets are enabled!\n if ( !nextStep() ) enableFieldsets( form )\n else disableOtherFieldsets( form )\n\n // If there are callbacks, let them handle this!\n if ( fireCallbacks ) {\n\n // Since there are callbacks, stop the submission event\n event.preventDefault()\n\n fireCallbacks( event, {\n fieldset: currentStep(), // Valid fieldset element\n form: form, // Parent form element\n forward: forward, // Call forward() to move to the next fieldset\n dismiss: dismiss, // Hide and disable current step\n revisit: revisit, // Revisit current disabled step\n showStep: showStep, // Show a specific step by index (0 based)\n complete: !nextStep(), // is this is the final form step?\n formData: toolbox.formData( currentStep() ) // pass FormData for current fieldset\n })\n }\n\n // No callbacks? If there's a next step, stop submission and proceed\n else if ( nextStep() ) {\n event.preventDefault() \n forward()\n }\n }\n }\n })\n}\n\nfunction fire ( event, type ) {\n registeredForms.forEach( function( fn ) { fn( event, type ) })\n}\n\n\n// Returns a function which triggers callbacks\nfunction getCallbacks ( form, type ) {\n\n type = type || 'next'\n var callbacks = [], cb;\n\n formCallbacks[ type ].forEach( function( test ) {\n if ( cb = test( form ) ) {\n callbacks.push( cb )\n }\n })\n\n // Return a function which can trigger all callbacks\n // or returns fallse if none are called\n\n if ( callbacks.length )\n return function() {\n var args = toolbox.slice( arguments )\n\n callbacks.forEach( function( callback ) {\n callback.apply( callback, args ) }) }\n\n else return false\n}\n\nfunction next ( el, callback ) {\n on( el, 'next', callback )\n}\n\nfunction on ( el, event, callback ) {\n\n // Accept events list as an object e.g. { next: callback }\n if ( typeof event === 'object' ) {\n for ( type in event ) {\n on( el, type, event[ type ] )\n }\n }\n\n else if ( formCallbacks[ event ] ) {\n\n // Only allow access to a callback if the form matches\n var filter = function( form ) {\n if ( form == el ) return callback\n }\n\n // Add the test wrapper function to the callback list\n formCallbacks[ event ].push( filter )\n }\n}\n\nEvent.ready( function(){\n reset()\n\n // Add bubbling so we can listen for submission\n Event.bubbleFormEvents()\n\n var nextSelector = formSelector + ' [type=submit], ' + formSelector + ' .next-step'\n var backSelector = formSelector + ' .back-step'\n var navSelector = '.progressive-form-nav-item[data-step]'\n\n Event.on( document, 'click', nextSelector , fire, 'next' )\n Event.on( document, 'click', backSelector , fire, 'back' )\n Event.on( document, 'click', navSelector , fire, 'show-step' )\n// insert core styling for hiding disabled and completed form-steps\n document.head.insertAdjacentHTML( 'beforeend', \"<style>\\\n.form-step[disabled], .form-step.completed {\\\n position: absolute !important;\\\n top: -9999px !important;\\\n left: -9999px !important;\\\n left: 0 !important;\\\n right: 0 !important; }\\\n</style>\" )\n\n Event.change( function() {\n reset()\n\n toolbox.each( document.querySelectorAll( formSelector ), function( el ) {\n newForm( el )\n })\n })\n})\n\nmodule.exports = {\n next: next,\n new: newForm\n}\n","// Dependencies\nvar toolbox = require( 'compose-toolbox' ),\n Event = toolbox.event,\n getClosest = toolbox.getClosest,\n wordCount = toolbox.wordCount,\n textSelectors = '[required]';\n\n// Does this browser support HTML5 validation?\nfunction supported () {\n\n return typeof document.createElement( 'input' ).checkValidity === 'function'\n\n}\n\nvar invalidHandler = Event.callback.new( function( event ) { \n event.preventDefault() \n event.stopPropagation() \n})\n\n// Watch for events ( if validation is suported )\nEvent.ready( function(){\n\n if ( supported() ) { \n\n Event.bubbleFormEvents()\n\n document.addEventListener( 'invalid', invalidHandler, true )\n\n Event.on( document.body, 'click', '[type=submit]', submit )\n\n Event.on( document, 'validate', 'form', function( event ) { \n validateForm( event.target )\n })\n\n // Ensure all required inputs have aria-requrired attributes\n toolbox.slice( document.querySelectorAll( '[required]' ) ).forEach( function( element ) { \n element.setAttribute( 'aria-required', true )\n })\n\n // Watch input events\n Event.on( document, 'blur', '[required]', checkValidation )\n Event.on( document, 'keydown', '[required]', Event.debounce( checkValidation, 200 ) )\n Event.on( document, 'input', 'select[required]', Event.debounce( checkValidation, 200 ) )\n\n }\n})\n\nfunction validateForm ( form ) {\n\n // Scoped variables\n var inputs = form.querySelectorAll( '[required]' ),\n invalidInput;\n\n toolbox.slice( inputs ).some( function( input ) {\n\n // if invalid\n if ( !getClosest( input, '[disabled]' ) && !checkInput( input ) ) {\n invalidInput = input\n return true\n }\n })\n\n if ( invalidInput ) { \n\n // Show validation message\n focus( invalidInput )\n showMessage( invalidInput )\n\n return false\n }\n\n // The form is valid, skip it\n else { \n return true \n }\n\n}\n\n// Handler for validation events\nvar checkValidation = Event.callback.new( function( event ) {\n\n if ( checkInput( event.target, event.type ) ) {\n\n // Remove any pre-existing validation message\n hideMessage( event.target )\n }\n\n})\n\n\nfunction checkInput ( input, event ) {\n\n var el = statusEl( input ),\n valid = isValid( input ),\n neutral = event == 'keydown' && !valid;\n\n // Don't trigger invalid style while typing\n if ( neutral && input == document.activeElement ) {\n\n el.classList.remove( 'invalid', 'valid' )\n input.setAttribute( 'aria-invalid', false )\n\n } else {\n\n el.classList.toggle( 'invalid', !valid )\n el.classList.toggle( 'valid', valid )\n input.setAttribute( 'aria-invalid', valid )\n\n }\n\n return valid\n\n}\n\n// Is an input valid?\nfunction isValid ( input ) {\n\n // If element only contains whitespace, strip value\n if ( !input.value.replace( /\\s/g, '' ).length )\n input.value = ''\n\n // Set a custom validation message for word count\n var message = checkValue( input ) || checkLength( input ) || ''\n input.setCustomValidity( message )\n\n var valid = input.checkValidity()\n\n return valid\n\n}\n\n\nfunction checkValue( input ) {\n if ( input.dataset.invalidValue ) {\n\n // Does input value == invalid value? (case insensitive)\n var regexp = escapedRegex( input.dataset.invalidValue, 'i' )\n\n if ( input.value.match( regexp ) ) {\n\n // Remove any standard custom message\n input.dataset.cachedMessage = input.dataset.message\n input.dataset.message = ''\n\n return input.dataset.invalidValueMessage || \"Value '\"+input.value+\"' is not permitted\"\n\n // If not invalid value reset standard validation message\n } else if ( input.dataset.cachedMessage ) {\n\n input.dataset.message = input.dataset.cachedMessage\n input.dataset.cachedMessage = ''\n\n }\n }\n}\n\nfunction escapedRegex( input, options ) {\n var str = input.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')\n return new RegExp( \"^\" + str + '$', options )\n}\n\nfunction checkLength ( input ) {\n return checkCount( input, 'min' )\n || checkCount( input, 'max' )\n}\n\n// Test custom validation for maximum or minimum words present\nfunction checkCount ( input, limit ) {\n\n var goal = input.dataset[ limit + 'Words' ]\n\n if ( goal ) {\n\n var lessThanGoal = wordCount( input.value ) < goal\n phrasing = ( limit == 'min' ) ? 'at least ' : 'no more than ',\n valid = ( limit == 'min' ) ? !lessThanGoal : lessThanGoal\n\n // Return a custom error message\n if ( input.value && !valid )\n return 'Please write ' + phrasing + goal + ' words.'\n }\n\n\n}\n\n// If input is nested in a label, treat the label as the\n// target for assigning status (class names and messages).\nfunction statusEl ( input ) {\n\n return getClosest( input, 'label' ) || input\n\n}\n\n// Focus() if invalid element is not hidden\n// or Focus its immediate sibling (mostly used for upload buttons)\nfunction focus ( el ) {\n\n el = ( el.style.display !== 'none' ) ? el : el.nextSibling\n el.focus()\n\n}\n\n// Submission validation handler function\nfunction submit ( event ) {\n\n var form = ( event.target.tagName == \"FORM\" ) ? event.target : getClosest( event.target, 'form')\n\n // Skip validation if no invalid inputs found\n if ( !validateForm( form ) ) {\n\n // Pause keydown/blur triggers for the next second to avoid neutral empty style\n checkValidation.stop()\n Event.delay( checkValidation.start, 500 )\n\n // Stop the submission event\n event.preventDefault()\n event.stopImmediatePropagation()\n\n }\n\n}\n\nfunction invalidateField ( el, message ) {\n if ( el && el.value ) {\n el.dataset.invalidValue = el.value\n if ( message )\n el.dataset.invalidValueMessage = message\n }\n}\n\nfunction hideMessage ( el ) {\n\n var form = getClosest( el, 'form' ),\n msg = form.querySelector( '.validation-message' )\n\n if ( msg ) msg.parentNode.removeChild( msg )\n\n}\n\n\n// Validation message handler function\nfunction showMessage ( el ) {\n\n //hideMessage( el )\n\n var label = getClosest( el, 'label' ),\n message = el.dataset.message || el.validationMessage\n\n if ( label ) {\n var existingMessage = label.querySelector( '.validation-message-text' )\n\n if ( !existingMessage ) {\n label.insertAdjacentHTML( 'beforeend', '<span class=\"validation-message\"><span class=\"validation-message-text\" role=\"alert\">' + message + '</span></span>' )\n\n } else if ( existingMessage.textContent != message ) {\n existingMessage.innerHTML = message\n }\n }\n\n}\n\n// Public API\nmodule.exports = {\n validate: validateForm,\n invalidateField: invalidateField\n}\n","require ('./lib/object.assign')\n\nvar Event = require('compose-event')\n// Improves the utility and user interface for range inputs\n\nvar sliders = []\nvar listening\n\nvar Slider = {\n // When a slider is changed, update the associated label and input.\n change: function(event) {\n self.refresh(event.currentTarget)\n },\n\n // Update labels and inputs\n refresh: function (slider) {\n self.setLabels(slider)\n self.setInput(slider)\n self.setFill(slider)\n },\n \n // Some browsers don't focus when a slider input is changed, this lets us force focus.\n focus: function(event){\n event.currentTarget.focus()\n },\n \n // Inject slider templates into the DOM\n setup: function(){\n\n if (!listening) {\n Event.on(document, \"input toggler:show\", \"[type=range]\", self.change, { useCapture: true })\n Event.on(document, \"click change input\", \"[type=range]\", self.focus, { useCapture: true })\n listening = true\n }\n\n var ranges = document.querySelectorAll('[type=range]:not(.slider-input)')\n\n Array.prototype.forEach.call(ranges, function(slider){\n\n var data = self.data(slider)\n sliders.push(data)\n\n slider.dataset.id = data.id\n\n // Inject template and set inputs\n slider = self.template(slider)\n self.refresh(slider)\n\n })\n },\n\n data: function(el) {\n var data = {\n // Assign an incremental ID to track this slider with its data\n id: sliders.length,\n min: el.getAttribute('min') || 0,\n max: el.getAttribute('max') || 100,\n labels: {},\n externalLabels: {}\n }\n\n // Gets dataset as a hash\n Object.assign(data, self.extractData(el))\n\n data = self.extractValues(data)\n data = self.getLabels(data)\n\n if (data.values)\n data.max = (data.min + data.values.length - 1)\n\n data.segments = Number(data.max) - Number(data.min) + 1\n\n for (var key in data) {\n if(key.match(/-/)){\n data[this.camelCase(key)] = data[key]\n delete data[key]\n }\n }\n\n // Allow data-input or name attribute to set value for hidden input.\n //\n if (!data.input && el.getAttribute('name')) {\n data.input = el.getAttribute('name')\n el.removeAttribute('name')\n }\n\n if (data.input) {\n // Generate a class name for querying later (because some name attributes contain illegal characters for queries)\n data.inputClass = data.input.replace(/\\W/g,'-')\n data.inputExists = self.inputExists(el, data)\n }\n\n data = self.getLineLabels(data)\n\n if (data.mark) { \n data.mark = data.mark.split(',').map(Number) \n }\n\n return data\n },\n\n getData: function(slider) {\n if (typeof slider != 'string' && slider.dataset) {\n slider = slider.dataset.id\n }\n return sliders[slider]\n },\n\n extractValues: function(data) {\n if (data.values) { \n data.values = data.values.split(',').map(self.trim)\n } else {\n data.values = []\n for (var i = data.min; i <= data.max; i++ ) {\n data.values.push(i)\n }\n }\n\n return data\n },\n\n // Convert dataset strings into hashes of arrays\n // examples:\n // - data-label='one,two,three' => data.labels.default = ['one','two','three']\n // - data.external-label-awesome='one;two;three' => data.externalLabels.awesome = ['one','two','three']\n //\n // If labels have not been disabled (data-label='false') and there are no data labels,\n // an array of values is set to data.labels.default\n //\n getLabels: function(data) {\n if (data.label && data.label.match(/false|none/))\n data.label = false\n\n // Unless labels have been disabed with data-label='false'\n for (var val in data) {\n // Ignore non-native methods injected by some wayward lib\n if (!data.hasOwnProperty(val)) { continue }\n // Don't bother processing disabled labels\n if (data[val] === false) { continue }\n\n // Match properties: label, label-id, external-label-id\n var match = val.match(/^(external-)?label-(.+)|^label$/)\n\n if(match) {\n // Some labels may include commas, allow semicolons as an alternate separator\n //\n var delimiter = data[val].match(/;/) ? ';' : ','\n var labels = data[val].split(delimiter).map(self.trim)\n var external = match[1]\n var name = match[2]\n\n if(external){\n data.externalLabels[name] = labels\n } else if (val == 'label') {\n data.labels.default = labels\n delete data.label\n } else {\n data.labels[name] = labels\n }\n\n delete data[val]\n }\n\n var labelCount = self.objectSize(data.labels)\n\n // If there are no labels, use values for a label\n if (labelCount == 0)\n data.labels.default = data.values\n\n if (labelCount > 1)\n delete data.labels.default\n }\n\n return data\n },\n\n getLineLabels: function(data){\n var lineLabels = {}\n\n // Line labels may be in the following formats:\n // - 1:start,11:end - index specified, comma separated\n // - first,second,third,11:last - default to index for some labels\n // - 10,000;20,000;30,000 - semicolon separated\n //\n if(data.lineLabels) {\n var delimiter = data.lineLabels.match(/;/) ? ';' : ','\n data.lineLabels.split(delimiter).map(function(labels, index){\n var l = labels.split(':')\n label = (!l[1] ? l[0] : l[1])\n index = (!l[1] ? index + 1 : l[0])\n lineLabels[index] = label\n })\n data.lineLabels = lineLabels\n }\n\n return data\n },\n\n // \n template: function(slider){\n var data = self.getData(slider)\n\n slider.setAttribute('min', data.min)\n slider.setAttribute('max', data.max)\n\n slider.classList.add('slider-input')\n\n if(slider.classList.contains('left-label'))\n slider.classList.remove('left-label')\n\n var containerHTML = self.templateHTML(data)\n\n var classes = ['slider-container']\n\n if (containerHTML.match('slider-line-label'))\n classes.push('line-labels')\n\n if (containerHTML.match('slider-label'))\n classes.push(\"with-label\")\n else\n classes.push(\"without-label\")\n\n containerHTML = '<div class=\"'+classes.join(' ')+'\" id=\"slider'+data.id+'\">'\n + containerHTML\n +'</div>'\n\n slider.insertAdjacentHTML('beforebegin', containerHTML)\n var container = slider.previousSibling\n container.querySelector('.slider-input-container').insertAdjacentHTML('afterbegin', slider.outerHTML)\n slider.parentNode.removeChild(slider)\n\n slider = container.querySelector('.slider-input')\n \n // Update attributes from processed data\n //\n if(!slider.getAttribute('value'))\n slider.value = data.value || data.min\n return slider\n },\n \n templateHTML: function(data){\n var html = \"\"\n var fills = \"\"\n \n if (data.mark || data.lineLabels) {\n for(var i = 1; i <= data.segments; i++) {\n \n html += \"<div class='slider-segment'><span class='slider-segment-content'>\"\n\n if (data.mark && data.mark.indexOf(i) != -1)\n html += \"<span class='slider-segment-mark' data-index='\"+i+\"'></span>\"\n\n if (data.lineLabels && data.lineLabels[i]) \n html += \"<span class='slider-line-label'>\"+data.lineLabels[i]+\"</span>\"\n\n html += \"</span></div>\"\n }\n }\n\n // one less\n for(var i = 1; i < data.segments; i++) {\n fills += \"<span class='slider-fill' data-index='\"+i+\"'></span>\"\n }\n\n html = \"<div class='slider-input-container'>\"\n + \"<div class='slider-track'>\" + html + \"</div>\"\n + \"<div class='slider-fills'>\" + fills + \"</div>\"\n + \"</div>\"\n + self.labelTemplate(data)\n\n if (!data.inputExists && data.inputClass) {\n html += \"<input class='\"+data.inputClass+\"' type='hidden' name='\"+data.input+\"' value=''>\"\n }\n\n return html\n \n },\n\n labelTemplate: function(data){\n var html = \"\"\n\n if (data.label == false) { return html }\n\n for(var key in data.labels){\n html += '<span class=\"slider-label-'+key+' internal-label\" data-slider-label=\"'+key+'\">'\n html += self.labelHTML(data, key, '')\n html += '</span></span> '\n }\n\n if (html.length > 0) {\n html = \"<div class='slider-label align-\"+(data.positionLabel || 'right')+\"'>\" + html + \"</div>\"\n }\n\n return html\n },\n\n labelHTML: function(data, key, label) {\n return self.labelMeta(data, key, 'before')\n + \"<span class='label-content'>\" + label + \"</span>\"\n + self.labelMeta(data, key, 'after')\n },\n\n // Grab all prefixes or suffixes, for example:\n // - data-before-label='$'\n // - data-after-label='/mo'\n // - data-after-label-size='GB'\n //\n labelMeta: function(data, key, position) {\n var altKey = self.camelCase('-label-'+key)\n var meta = data[position+altKey] || data[position+'Label']\n if (meta)\n return \"<span class='\"+position+\"-label'>\"+meta+\"</span>\"\n else\n return ''\n },\n\n // Is there already an input matching this name?\n inputExists: function(slider, data) {\n if (data.inputClass) {\n var input = self.scope(slider).querySelector('input[name=\"'+data.input+'\"]')\n\n if(input) {\n input.classList.add(data.inputClass)\n return true\n }\n }\n },\n\n extractData: function(el) {\n var pattern = 'data-'\n var data = {}\n\n for (var i = 0; i < el.attributes.length; i++){\n var name = el.attributes[i].nodeName\n\n if(new RegExp(\"^\"+pattern).test(name)) {\n name = name.replace(pattern, '')\n data[name] = el.attributes[i].nodeValue\n }\n }\n return data\n },\n\n labelElements: function(id, key, external) {\n var selector = '[data-slider-label='+key+']'\n var internalSelector = \"#slider\"+id + ' ' + selector\n var externalSelector = selector += ':not(.internal-label)' \n if (external) { \n selector = externalSelector\n } else {\n selector = internalSelector + ', ' + externalSelector\n }\n\n return document.querySelectorAll(selector)\n },\n\n setFill: function(slider) {\n var data = self.getData(slider)\n var segments = document.querySelectorAll('#slider'+data.id+' .slider-segment')\n var fills = document.querySelectorAll('#slider'+data.id+' .slider-fill')\n var sliderIndex = self.sliderIndex(slider)\n \n Array.prototype.forEach.call(fills, function(fill, index){\n if (fill.dataset.index <= sliderIndex) {\n fill.classList.add('filled')\n if(segments[index]) {\n segments[index].classList.add('filled')\n }\n } else {\n fill.classList.remove('filled')\n if(segments[index]) {\n segments[index].classList.remove('filled')\n }\n }\n })\n \n },\n\n setInput: function(slider) {\n var data = self.getData(slider)\n\n // Don't update hidden sliders\n if (slider.offsetParent === null) { return }\n\n if (data.input && data.values) {\n var value = data.values[self.sliderIndex(slider)]\n var selector = \".\"+data.input.replace(/\\W/g,'-')\n var inputs = self.scope(slider).querySelectorAll(selector)\n\n Array.prototype.forEach.call(inputs, function(input){\n input.value = value\n })\n }\n },\n\n setLabels: function(slider) {\n var data = self.getData(slider)\n var index = self.sliderIndex(slider)\n\n if (slider.offsetParent === null) { return }\n\n Array.prototype.forEach.call(['labels', 'externalLabels'], function(type) {\n var external = (type == 'externalLabels')\n\n for (var key in data[type]) {\n var labelEls = self.labelElements(data.id, key, external)\n var labels = self.labelAtIndex(data[type], index)\n\n Array.prototype.forEach.call(labelEls, function(el) {\n var container = el.querySelector('.label-content')\n\n if ( container ) { container.innerHTML = labels[key] }\n else { el.innerHTML = self.labelHTML(data, key, labels[key]) }\n\n el.classList.toggle('empty-label', labels[key] === '')\n })\n }\n })\n },\n\n // Get all labels for the current slider position\n labelAtIndex: function(labels, index){\n var set = {}\n for (var key in labels) {\n set[key] = labels[key][index]\n }\n return set\n }, \n\n // Normalize the slider value by the minimum value\n sliderIndex: function(slider){\n return Number(slider.value) - Number(slider.getAttribute('min'))\n },\n\n // If slider is in a form, return that form.\n // This alows us to be sure that sliders in one\n // form do not update labels with the same name\n // in another form.\n //\n scope: function(slider) {\n var el = slider\n\n while (el && el.tagName != \"FORM\") {\n el = el.parentNode\n }\n\n return el || document\n },\n\n // Function for easy maping, as in: someArray.map(self.trim)\n trim: function(name){ \n return name.trim()\n },\n\n objectSize: function(object) {\n var length = 0; for(var i in object) { length++ }\n return length\n },\n\n camelCase: function(input) {\n return input.toLowerCase().replace(/-(.)/g, function(match, group) {\n return group.toUpperCase();\n });\n }\n}\n\nvar self = Slider\n\nEvent.change(Slider.setup)\n\nmodule.exports = Slider\n","if (typeof Object.assign != 'function') {\n (function () {\n Object.assign = function (target) {\n 'use strict';\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (Object.prototype.hasOwnProperty.call(source, nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n })();\n}\n","var TimeToggle = require('./lib/toggle.js')\nvar Event = require('compose-event')\n\nTimeToggle.timeago = require('./lib/timeago.js')\nTimeToggle.dateToHTML = require('./lib/date-to-html.js')\n\nEvent.ready(TimeToggle.listen)\nEvent.change(TimeToggle.setup)\n\nmodule.exports = TimeToggle\n","// Converts a simple date string into Date + Time + Timezone wrapped in HTML\n//\n// Input:\n// - String, compatible with JS date parsing e.g. \"2014-10-20\" or \"2014-05-21 10:63\"\n// - String, timezone: \"UTC\", \"CST\", etc.\n//\n// Returns: HTML which is \"2014-01-28 18:00:00 CST\", separated and wrapped with spans\n// with classnames: date, time and timezone\n//\nvar DateToHTML = {\n supported: function(){\n return !isNaN(new Date(\"2014-01-29T18:14:29+00:00\").getDate())\n },\n\n local: function(dateString) {\n return DateToHTML.parse(dateString, false)\n },\n\n utc: function(dateString) {\n return DateToHTML.parse(dateString, true)\n },\n\n parse: function dateToHtml(dateString, utc) {\n if(!DateToHTML.supported()){ return false }\n\n var date = new Date(dateString)\n\n // If date is invalid, bail\n if(isNaN(date.getDate())){ return false }\n\n if(utc) {\n var y = date.getUTCFullYear()\n var mo = pad(date.getUTCMonth() + 1)\n var d = pad(date.getUTCDate())\n var h = pad(date.getUTCHours())\n var m = pad(date.getUTCMinutes())\n var s = pad(date.getUTCSeconds())\n var zone = 'UTC'\n } else {\n var y = date.getFullYear()\n var mo = pad(date.getMonth() + 1)\n var d = pad(date.getDate())\n var h = pad(date.getHours())\n var m = pad(date.getMinutes())\n var s = pad(date.getSeconds())\n var zone = DateToHTML.timezone(date)\n }\n\n var str = '<span class=\"date\">'+y+'-'+mo+'-'+d+'</span>'\n str += ' <span class=\"time\">'+h+':'+m+':'+s+'</span>'\n str += ' <span class=\"timezone\">'+zone+'</span>'\n return str\n },\n\n // Extract timezone label\n timezone: function(date){\n var zone = (date.getTimezoneOffset()/-60)\n var tz = String(date).match(/\\((.+)\\)$/)\n\n if(tz) {\n // Browser has friendly timezone label like 'EST'\n var zone = tz[1]\n \n } else {\n // Browser uses a GMT offset +/-\n var zone = \"GMT \" \n zone += ((zone > 0) ? '+' : '')\n zone += \" \"+ pad(zone*100, 4)\n }\n\n return zone\n }\n}\n\nvar pad = function datePad(num, pad){\n pad = pad || 2\n while(String(num).length < pad) {\n num = '0' + num\n }\n return num\n}\n\nmodule.exports = DateToHTML\n","// Timeago by Brandon Mathis, based on JavaScript Pretty Date Copyright (c) 2011 John Resig\n// Returns relative time\n\nvar Timeago = {\n // setup HTML templates\n setup: function timeagoSetup() {\n\n var timeEls = document.querySelectorAll('.timeago[datetime]')\n\n Array.prototype.forEach.call(timeEls, function(el) {\n var datetime = el.attributes.datetime.value\n var style = el.dataset.timeagoStyle\n el.innerHTML = Timeago.parse(datetime, style)\n })\n },\n\n // If a browser can't handle dates, bail.\n browserSupport: function timeagoBrowserSupport() {\n return !isNaN(new Date(\"2014-01-29T18:14:29+00:00\").getDate())\n },\n\n parse: function timeagoParse(time, style) {\n\n if (typeof(time) == 'string') {\n time = new Date(time)\n }\n\n if (style === 'short')\n var say = {\n just_now: \"now\",\n minute_ago: \"1m\",\n minutes_ago: \"m\",\n hour_ago: \"1h\",\n hours_ago: \"h\",\n yesterday: \"1d\",\n days_ago: \"d\",\n last_week: \"1w\",\n weeks_ago: \"w\"\n }\n\n else if (style === 'long')\n var say = {\n just_now: \"just now\",\n minute_ago: \"1 minute ago\",\n minutes_ago: \" minutes ago\",\n hour_ago: \"1 hour ago\",\n hours_ago: \" hours ago\",\n yesterday: \"1 day ago\",\n days_ago: \" days ago\",\n last_week: \"1 week ago\",\n weeks_ago: \" weeks ago\"\n }\n\n else\n var say = {\n just_now: \"just now\",\n minute_ago: \"1 minute\",\n minutes_ago: \" minutes\",\n hour_ago: \"1 hour\",\n hours_ago: \" hours\",\n yesterday: \"1 day\",\n days_ago: \" days\",\n last_week: \"1 week\",\n weeks_ago: \" weeks\"\n }\n\n var secs = ((new Date().getTime() - new Date(time).getTime()) / 1000)\n var mins = Math.floor(secs / 60)\n var hours = Math.floor(secs / 3600)\n var days = Math.floor(secs / 86400)\n var weeks = Math.floor(days / 7)\n var months = Math.floor(days / 30)\n\n if(isNaN(secs) || days < 0) {\n return false\n }\n\n if(days === 0) {\n if (secs < 60) return say.just_now\n else if(secs < 120) return say.minute_ago \n else if(secs < 3600) return mins + say.minutes_ago \n else if(secs < 7200) return say.hour_ago\n else return hours + say.hours_ago\n } else {\n if(days === 1) return say.yesterday\n else if(days < 7) return days + say.days_ago\n else if(weeks === 1) return say.last_week\n else return weeks + say.weeks_ago\n }\n }\n}\n\nmodule.exports = Timeago\n","var Timeago = require('./timeago')\nvar DateToHTML = require('./date-to-html')\nvar Event = require('compose-event')\n\nvar Toggle = {\n timeEls: function(){\n return document.querySelectorAll('.time-toggle[datetime]')\n },\n\n // The key is the current time, the value is the next time type to be displayed\n nextTime: {\n 'timeago': 'local',\n 'local': 'utc',\n 'utc': 'timeago'\n },\n\n // Attach listeners, setup HTML templates\n setup: function() {\n if(!Timeago.browserSupport()) return false\n\n Array.prototype.forEach.call(Toggle.timeEls(), Toggle.init)\n },\n\n // Attach listeners to toggle time zones whine clicked\n listen: function() {\n if(!Timeago.browserSupport()) return false\n\n Event.on(document, \"click\", \".time-toggle\", Toggle.toggle)\n },\n\n // Toggle all times on page\n toggle: function( event ){\n Array.prototype.forEach.call(Toggle.timeEls(), function(el) {\n Toggle.toggleEl(el)\n })\n\n if ( event && event.target ) { event.stopPropagation() }\n },\n\n // Switch between time ago, UTC, and local time\n toggleEl: function(el) {\n var date = el.getAttribute('datetime')\n var next = Toggle.nextTime[el.dataset.mode || 'timeago' ]\n\n Toggle.setContent(el, Toggle.dateHTML(date, next, el), next)\n\n return el\n },\n\n // Supply HTML for UTC and local datetime\n //\n init: function(el) {\n var datetime = el.getAttribute('datetime')\n var mode = el.dataset.mode || 'timeago'\n var html = Toggle.dateHTML(datetime, mode, el)\n\n if (html){ \n el.setAttribute('title', 'toggle time')\n Toggle.setContent(el, html, mode)\n } else {\n el.classList.remove('time-toggle')\n }\n\n return el\n },\n\n setContent: function( el, html, mode ) {\n var dateTextNode = el.querySelector( '.date-text' )\n\n if ( dateTextNode ) {\n dateTextNode.innerHTML = html\n } else {\n el.innerHTML = '<span class=\"date-text\">'+html+'</span'\n }\n\n el.dataset.mode = mode\n },\n\n dateHTML: function(date, type, el) {\n if (type == 'timeago')\n var t = Timeago.parse(date, el.dataset.timeago)\n else if (DateToHTML[type])\n var t = DateToHTML[type](date)\n\n if (t) {\n return \"<span class='time-toggle-date \"+type+\"'>\" + t + \"</span>\"\n }\n }\n}\n\nmodule.exports = Toggle\n","var Event = require('compose-event')\n\nvar Toggler = {\n checkboxSelector: \"[type=checkbox][data-toggle], [type=checkbox][data-show], [type=checkbox][data-hide]\",\n radioSelector: \"input[type=radio][data-show], input[type=radio][data-hide], input[type=radio][data-add-class], input[type=radio][data-remove-class]\",\n selectSelector: \"option[data-hide], option[data-show]\",\n\n listen: function(){\n Event.on(document, \"click change\", \"[data-toggle], [data-show], [data-hide], [data-toggle-class], [data-add-class], [data-remove-class]\", Toggler.trigger)\n Event.on(document, \"change\", \".select-toggler\", Toggler.trigger)\n Event.on(window, 'hashchange', Toggler.hashChange)\n },\n\n hashChange: function() {\n if ( window.location.hash ) {\n\n var anchor = '[data-anchor=\"'+window.location.hash+'\"]'\n var target = document.querySelector( 'input'+anchor+ ', option'+anchor )\n\n if ( target ) {\n if ( target.type == 'radio' ) {\n target.checked = true\n } else {\n var select = Toggler.getSelectFromOption(target)\n select.selectedIndex = target.index\n target = select\n }\n ratchet.toggler.triggerToggling( target )\n }\n }\n },\n\n refresh: function(){\n Toggler.toggleCheckboxes()\n Toggler.setupSelects()\n Toggler.setupRadios()\n },\n\n trigger: function(event) {\n // Stop event and bubbling if link is only being used as a toggler\n if (event.currentTarget.getAttribute('href') == \"#\") {\n event.preventDefault()\n event.stop()\n } \n\n Toggler.triggerToggling(event.currentTarget, event)\n },\n\n triggerToggling: function(target, event) {\n var actions = ['hide', 'toggle', 'show', 'removeClass', 'toggleClass', 'addClass']\n var select\n\n // Store the select, and set the target to the current option\n // Events fire on the select, but the options have toggling attributes\n if (target.tagName.match(/select/i)) {\n select = target\n target = select.selectedOptions[0]\n }\n\n // Radio inputs and selects do not support toggling, so remove them\n if (select || target.type == 'radio') {\n actions = actions.filter(function(action) {\n return !action.match(/toggle/)\n })\n }\n\n // Dispatch all actions\n actions.forEach(function(action) {\n Toggler.dispatch(target, action)\n })\n },\n\n dispatch: function(el, type) {\n var action = type\n var data = el.dataset[type]\n\n // Abort if element doesn't have data for the action\n if (!data || typeof data == 'undefined' || data == '') return\n\n // Toggle and show are treated the same for checkboxes\n if (el.type == 'checkbox')\n action = (type.match(/hide|remove/i) ? !el.checked : el.checked)\n\n if (data){\n if (type.match(/class/i)){\n Toggler.setClass(data, action, el)\n } else {\n Toggler.setState(data, action)\n }\n }\n },\n\n // Add, remove, or toggle classnames, triggered by elements with:\n // data-hide-class, data-show-class, and data-toggle-class values\n //\n // Data value examples:\n // - \"classname\" - add/remove/toggle classname on current element\n // - \"foo bar\" - multiple classnames, separated by spaces (like html class property)\n // - \"foo bar; selector\" - change classnames on elements matched by selector\n // - \"foo bar; selector, selector\" - match multiple selectors\n //\n // You can perform multiple add/remove classes by joining values with an `&`\n // For example: \"classname & foo bar; selector\"\n // This would toggle classname on current element and toggle `foo bar` classnames\n // on an element matching the selector\n //\n\n setClass: function (selectors, action, el){\n if(typeof selectors == 'undefined' || selectors == '') return\n\n if (typeof(action) == 'boolean') {\n action = (action ? 'add' : 'remove')\n }\n\n if (selectors.match(/&/)) {\n selectors.split('&').forEach(function(sel){\n Toggler.setClass(sel.trim(), action, el) \n })\n return\n }\n\n // Get selector and classnames, format: \"classname classname; selector,selector\"\n var settings = selectors.split(';')\n var classnames = settings[0].trim()\n var matches = []\n selectors = settings[1]\n\n if (selectors) {\n matches = document.querySelectorAll(selectors)\n\n // If no slectors are present, and el is an OPTION, use its SELECT as the matched element\n } else if (el && el.tagName.match(/option/i)) {\n matches = [Toggler.getSelectFromOption(el)]\n \n // If no slectors are present, use the current el for classnames\n } else if (el) {\n matches = [el]\n }\n\n Array.prototype.forEach.call(matches, function(match){\n Array.prototype.forEach.call(classnames.split(' '), function(classname) {\n var method = action.replace(/Class/,'')\n match.classList[method](classname)\n })\n\n Toggler.triggerTogglerEventsOnChildren(match, 'class')\n })\n },\n\n setState: function(selectors, state) {\n var matches = document.querySelectorAll(selectors)\n\n Array.prototype.forEach.call(matches, function(match){\n var action = Toggler.toggleAction(match, state)\n\n Toggler[action](match)\n Toggler.triggerTogglerEventsOnChildren(match, action)\n })\n },\n\n toggleAction: function(el, action) {\n\n if (typeof(action) == 'boolean') {\n action = (action ? 'show' : 'hide')\n }\n\n if (action == 'toggle') {\n if (el.classList.contains('hidden')) {\n action = 'show'\n } else {\n action = 'hide'\n }\n }\n\n return action\n },\n\n show: function(el) {\n el.classList.remove('hidden')\n el.classList.add('visible')\n\n // Enable inputs, fieldsets or forms when shown\n if ( typeof el.disabled != 'undefined' ){\n el.disabled = false\n }\n\n // Focus on key element if an element expects focus\n var focusEl = el.querySelector('[data-focus]')\n if (focusEl) { focusEl.focus() }\n\n // Trigger input event on ranges that have been hidden\n var ranges = el.querySelectorAll('[type=range]')\n },\n\n hide: function(el) {\n el.classList.remove('visible')\n el.classList.add('hidden')\n\n // Disable inputs, fieldsets or forms when hidden\n if ( typeof el.disabled != 'undefined' ){\n el.disabled = true\n }\n },\n\n getLeafNodes: function (parent) {\n // is the parent itself a leaf node?\n if (!parent.hasChildNodes()) return [parent]\n\n var nodes = Array.prototype.slice.call(parent.getElementsByTagName(\"*\"), 0)\n\n return nodes.filter(function(elem) {\n return elem.children && elem.children.length === 0\n })\n },\n\n triggerTogglerEventsOnChildren: function(el, eventName){\n // we care about leaf nodes since the event will bubble to\n // non-leaf nodes from the leaf nodes\n var leafChildNodes = Toggler.getLeafNodes(el)\n\n Array.prototype.forEach.call(leafChildNodes, function(node) {\n // 'toggler:show', 'toggler:hide', etc\n Event.fire(node, \"toggler:\" + eventName)\n })\n },\n\n toggleCheckboxes: function(checkboxes) {\n checkboxes = checkboxes || document.querySelectorAll(Toggler.checkboxSelector)\n\n Array.prototype.forEach.call(checkboxes, Toggler.triggerToggling)\n },\n\n setupRadios: function() {\n Array.prototype.forEach.call(document.querySelectorAll(Toggler.radioSelector), function(radio, index){\n if (!radio.dataset.togglerActive) {\n\n var radioName = radio.getAttribute('name'),\n siblings = Toggler.parentForm(radio).querySelectorAll('[type=radio][name=\"'+radioName+'\"]'),\n showSelectors = Toggler.dataAttributes(siblings, 'show'),\n addClassSelectors = Toggler.dataAttributes(siblings, 'addClass'),\n checked\n\n Array.prototype.forEach.call(siblings, function(r){\n\n if (r.dataset.anchor && window.location.hash == ('#'+r.dataset.anchor.replace('#',''))) {\n r.checked = true\n }\n\n // Ensure that all radio buttons in a group have a default data-show value of ''\n // This means that unset data-show values will toggle off everything\n //\n r.dataset.show = r.dataset.show || ''\n r.dataset.addClass = r.dataset.addClass || ''\n\n // Append element's data-hide to showSelectors\n if ( r.dataset.hide && r.dataset.hide.length > 0 )\n showSelectors = showSelectors.concat( r.dataset.hide.split( ',' ) )\n\n r.dataset.hide = showSelectors.filter(function(selector){\n return r.dataset.show.indexOf( selector )\n }).join(',')\n\n // Ensure that all radio buttons in a group have a default data-add-class value of ''\n // This means that unset data-add-class values are toggle off all classes\n //\n r.dataset.addClass = r.dataset.addClass || ''\n\n // Ensure that selected radio buttons remove classes according\n // to the deselected radio buttons\n r.dataset.removeClass = addClassSelectors.filter(function(selector){\n return r.dataset.addClass.indexOf( selector )\n }).join('&')\n\n\n r.dataset.togglerActive = true\n\n\n if( r.checked ) checked = r\n\n })\n\n if ( checked ) {\n Toggler.triggerToggling( checked )\n } else {\n Toggler.setState( showSelectors.join(','), 'hide' )\n Toggler.setClass( addClassSelectors.join(' & '), 'removeClass' )\n }\n }\n\n })\n },\n\n // Add data-hide to each <option> containing the selectors from other\n // option's data-show. This makes the toggling of elements exclusive.\n //\n setupSelects: function(){\n Array.prototype.forEach.call(document.querySelectorAll(Toggler.selectSelector), function(option){\n // Prevent an option from being considered twice\n if (!option.dataset.togglerActive) {\n\n option.dataset.show = option.dataset.show || ''\n\n var select = Toggler.getSelectFromOption(option)\n select.classList.add('select-toggler')\n var options = select.querySelectorAll('option')\n\n var showSelectors = Toggler.dataAttributes(options, 'show')\n var addClassSelectors = Toggler.dataAttributes(options, 'addClass')\n\n Array.prototype.forEach.call(options, function(o, index) {\n\n if (o.dataset.anchor && window.location.hash == ('#'+o.dataset.anchor.replace('#',''))) {\n select.selectedIndex = index\n }\n\n o.dataset.show = o.dataset.show || ''\n o.dataset.addClass = o.dataset.addClass || ''\n\n // Append element's data-hide to showSelectors\n if ( o.dataset.hide && o.dataset.hide.length > 0 )\n showSelectors = showSelectors.concat( o.dataset.hide.split( ',' ) )\n\n // If show selectors are not present in element's data-show\n // Add them to the list of selectors to be hidden\n o.dataset.hide = showSelectors.filter(function(selector){\n return o.dataset.show.indexOf( selector )\n }).join(',')\n\n o.dataset.removeClass = addClassSelectors.filter(function(selector){\n return o.dataset.addClass.indexOf( selector )\n }).join(' & ')\n\n o.dataset.togglerActive = true\n })\n\n // Ensure that currently selected option is toggled properly\n //\n Toggler.triggerToggling(select)\n }\n })\n },\n\n // Find parent <select> for an option (accounts for option groups)\n //\n getSelectFromOption: function(el) {\n var p = el.parentElement\n\n if (p.tagName == 'SELECT') {\n return p\n } else {\n return Toggler.getSelectFromOption(p)\n }\n },\n\n\n // Find parent <form> or document if there is no form\n //\n parentForm: function(element) {\n var el = element\n\n while (el && el.tagName != \"FORM\") {\n el = el.parentNode\n }\n\n return el || document\n },\n\n // Return a unique array of all data attribute values from elements\n //\n dataAttributes: function(elements, attr) {\n return Array.prototype.map.call(elements, function(el) { \n return el.dataset[attr]\n }).filter(function(selectors, index, self) {\n return selectors != \"\" && typeof selectors != 'undefined' && self.indexOf(selectors) === index\n })\n }\n}\n\nEvent.ready(Toggler.listen)\nEvent.change(Toggler.refresh)\n\nmodule.exports = Toggler\n","// Shims\nrequire( './lib/shims/_classlist' )\nvar merge = require( './lib/shims/_object.assign' )\n\nvar event = require( 'compose-event' )\nvar scrollTo = require( './lib/scrollto' )\nvar fromTop = require( './lib/fromtop' )\nvar ease = require( './lib/ease' )\n\nvar toolbox = {\n\n event: event,\n scrollTo: scrollTo,\n fromTop: fromTop,\n merge: merge,\n ease: ease,\n\n // Get closest DOM element up the tree that matches a given selector\n getClosest: function ( el, selector ) {\n for ( ; el && el !== document; el = el.parentNode ) {\n if ( toolbox.matches( el, selector ) ) return el;\n }\n return false;\n },\n\n // Get next DOM element that matches a given selector\n getNext: function( el, selector ) {\n for ( ; el && el !== document; el = el.parentNode ) {\n if ( el.querySelector( selector ) ) return el.querySelector( selector );\n }\n return false;\n },\n\n // Matches selector function\n // @reference https://developer.mozilla.org/en-US/docs/Web/API/Element/matches\n matches: function ( el, selector ) {\n return ( el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector ).call( el, selector );\n },\n\n wordCount: function( str ) {\n var matches = str.match( /\\S+/g );\n return matches ? matches.length : 0;\n },\n\n // Easy access to slice for converting objects into arrays of values.\n slice: function( obj, count ) {\n return Array.prototype.slice.call( obj, count )\n },\n\n each: function( collection, callback ) {\n return Array.prototype.forEach.call( collection, callback )\n },\n\n formData: function( rootEl ) {\n var formData = new FormData(),\n fields = rootEl.querySelectorAll( 'input[name]' )\n\n // Loop over fields\n toolbox.each( fields, function( field ) {\n // Append current field’s name/value to new formData object\n formData.append( field.name, field.value );\n })\n\n // Then return said formData object\n return formData;\n }\n\n}\n\n\nmodule.exports = toolbox\n","// easing functions http://gizma.com/easing/\nvar ease = {\n\n inOutQuad: function (t, b, c, d) {\n t /= d/2\n if (t < 1) { return c/2*t*t + b }\n t--\n return -c/2 * (t*(t-2) - 1) + b\n },\n\n inOutCubic: function (t, b, c, d) {\n\tt /= d/2;\n\tif (t < 1) return c/2*t*t*t + b;\n\tt -= 2;\n\treturn c/2*(t*t*t + 2) + b;\n },\n\n inOutQuint: function(t, b, c, d) {\n var ts = (t/=d)*t,\n tc = ts*t;\n return b+c*(6*tc*ts + -15*ts*ts + 10*tc);\n },\n\n inOutCirc: function (t, b, c, d) {\n t /= d/2;\n if (t < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;\n t -= 2;\n return c/2 * (Math.sqrt(1 - t*t) + 1) + b;\n }\n\n}\n\nease.default = ease.inOutQuad\n\nmodule.exports = ease\n","module.exports = function( el ) {\n return Math.round( el.getBoundingClientRect().top + window.pageYOffset );\n}\n","var ease = require( './ease' )\nvar fromTop = require( './fromtop' )\n\nfunction move(amount) {\n\n // Scroll all because document.scrollingElement is still expiremental\n document.documentElement.scrollTop = amount;\n document.body.parentNode.scrollTop = amount;\n document.body.scrollTop = amount;\n\n}\n\nfunction position() {\n return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop;\n}\n\nfunction scrollTo(to, callback, duration) {\n\n // Making args flexible\n //\n // Allow for element or y-coordinates\n if( typeof( to ) === 'object' ) { to = fromTop( to ) }\n\n // Accept duration as the second argument\n if( typeof( callback ) === 'number' ) { duration = callback; callback = null }\n\n // Default duration = 500\n duration = ( typeof( duration ) === 'undefined' ) ? 500 : duration\n\n var start = position(),\n change = to - start,\n currentTime = 0,\n increment = 20;\n\n\n var animateScroll = function() {\n\n // increment the time\n currentTime += increment\n\n // find the value with the quadratic in-out easing function\n var val = ease.default(currentTime, start, change, duration)\n\n // move the document.body\n move(val);\n\n // do the animation unless its over\n if ( currentTime < duration ) {\n requestAnimationFrame( animateScroll )\n } else {\n if ( callback && typeof( callback ) === 'function') {\n callback()\n }\n }\n }\n\n animateScroll()\n}\n\nmodule.exports = scrollTo\n","/**\n * ClassList polyfill\n * Cross-browser full element.classList implementation\n * @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js\n * @author Eli Grey - http://eligrey.com\n * @license MIT\n **/\n\nif ( 'document' in self ) {\n\n // Full polyfill for browsers with no classList support\n if ( !( 'classList' in document.createElement( '_' ) ) ) {\n\n ( function( view ) {\n\n 'use strict';\n\n if ( !( 'Element' in view ) ) return;\n\n var\n classListProp = 'classList',\n protoProp = 'prototype',\n elemCtrProto = view.Element[ protoProp ],\n objCtr = Object,\n\n strTrim = String[ protoProp ].trim || function() {\n return this.replace( /^\\s+|\\s+$/g, '' );\n },\n\n arrIndexOf = Array[ protoProp ].indexOf || function( item ) {\n for ( var i = 0; i < this.length; i++ ) {\n if ( i in this && this[ i ] === item ) {\n return i;\n }\n }\n return -1;\n },\n\n DOMEx = function( type, message ) {\n this.name = type;\n this.code = DOMException[ type ];\n this.message = message;\n },\n\n checkTokenAndGetIndex = function( classList, token ) {\n if ( token === '' ) {\n throw new DOMEx(\n 'SYNTAX_ERR',\n 'An invalid or illegal string was specified'\n );\n }\n if ( /\\s/.test( token ) ) {\n throw new DOMEx(\n 'INVALID_CHARACTER_ERR',\n 'String contains an invalid character'\n );\n }\n return arrIndexOf.call( classList, token );\n },\n\n ClassList = function( elem ) {\n var trimmedClasses = strTrim.call( elem.getAttribute( 'class' ) || '' ),\n classes = trimmedClasses ? trimmedClasses.split( /\\s+/ ) : [];\n\n for ( var i = 0; i < classes.length; i++ ) {\n this.push( classes[ i ] );\n }\n\n this._updateClassName = function() {\n elem.setAttribute( 'class', this.toString() );\n };\n },\n\n classListProto = ClassList[ protoProp ] = [],\n\n classListGetter = function() {\n return new ClassList( this );\n };\n\n DOMEx[ protoProp ] = Error[ protoProp ];\n\n classListProto.item = function( i ) {\n return this[ i ] || null;\n };\n\n classListProto.contains = function( token ) {\n token += '';\n return checkTokenAndGetIndex( this, token ) !== -1;\n };\n\n classListProto.add = function() {\n var\n tokens = arguments,\n iter = 0,\n len = tokens.length,\n updated = false,\n token;\n\n do {\n token = tokens[ iter ] + '';\n if ( checkTokenAndGetIndex( this, token ) === -1 ) {\n this.push( token );\n updated = true;\n }\n }\n\n while ( ++iter < len );\n\n if ( updated ) {\n this._updateClassName();\n }\n };\n\n classListProto.remove = function() {\n var\n tokens = arguments,\n iter = 0,\n len = tokens.length,\n updated = false,\n token,\n index;\n\n do {\n token = tokens[ iter ] + '';\n index = checkTokenAndGetIndex( this, token );\n\n while ( index !== -1 ) {\n this.splice( index, 1 );\n updated = true;\n index = checkTokenAndGetIndex( this, token );\n }\n }\n\n while ( ++iter < len );\n\n if ( updated ) {\n this._updateClassName();\n }\n };\n\n classListProto.toggle = function( token, force ) {\n token += '';\n\n var\n result = this.contains( token ),\n method = result ? force !== true && 'remove' : force !== false && 'add';\n\n if ( method ) {\n this[ method ]( token );\n }\n\n if ( force === true || force === false ) {\n return force;\n } else {\n return !result;\n }\n };\n\n classListProto.toString = function() {\n return this.join( ' ' );\n };\n\n if ( objCtr.defineProperty ) {\n var classListPropDesc = {\n get : classListGetter,\n enumerable : true,\n configurable : true\n };\n\n try {\n objCtr.defineProperty( elemCtrProto, classListProp, classListPropDesc );\n }\n\n catch ( ex ) {\n if ( ex.number === -0x7FF5EC54 ) {\n classListPropDesc.enumerable = false;\n objCtr.defineProperty( elemCtrProto, classListProp, classListPropDesc );\n }\n }\n\n } else if ( objCtr[ protoProp ].__defineGetter__ ) {\n elemCtrProto.__defineGetter__( classListProp, classListGetter );\n }\n\n }( self ));\n\n } else {\n\n ( function() {\n\n 'use strict';\n\n var testElement = document.createElement( '_' );\n\n testElement.classList.add( 'c1', 'c2' );\n\n if ( !testElement.classList.contains( 'c2' ) ) {\n var createMethod = function( method ) {\n var original = DOMTokenList.prototype[ method ];\n\n DOMTokenList.prototype[ method ] = function( token ) {\n var i, len = arguments.length;\n\n for ( i = 0; i < len; i++ ) {\n token = arguments[ i ];\n original.call( this, token );\n }\n };\n };\n createMethod( 'add' );\n createMethod( 'remove' );\n }\n\n testElement.classList.toggle( 'c3', false );\n\n if ( testElement.classList.contains( 'c3' ) ) {\n var _toggle = DOMTokenList.prototype.toggle;\n\n DOMTokenList.prototype.toggle = function( token, force ) {\n if ( 1 in arguments && !this.contains( token ) === !force ) {\n return force;\n } else {\n return _toggle.call( this, token );\n }\n };\n\n }\n\n testElement = null;\n\n }());\n\n }\n}\n","/**\n * Object.assign polyfill\n * Cross-browser full Object.assign implementation\n * @source https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n * @license MIT\n **/\n\nif ( typeof Object.assign != 'function' ) {\n ( function() {\n Object.assign = function( target ) {\n 'use strict';\n if ( target === undefined || target === null ) {\n throw new TypeError( 'Cannot convert undefined or null to object' );\n }\n\n var output = Object( target );\n for ( var index = 1; index < arguments.length; index++ ) {\n var source = arguments[ index ];\n if ( source !== undefined && source !== null ) {\n for ( var nextKey in source ) {\n if ( Object.prototype.hasOwnProperty.call( source, nextKey ) ) {\n output[ nextKey ] = source[ nextKey ];\n }\n }\n }\n }\n return output;\n };\n })();\n}\n\n// Make it easy to merge objects without overwriting the original objects\nvar merge = function() {\n var args = [{}].concat( Array.prototype.slice.call( arguments ) )\n return Object.assign.apply( this, args )\n}\n\nmodule.exports = merge\n","// keymaster.js\n// (c) 2011-2013 Thomas Fuchs\n// keymaster.js may be freely distributed under the MIT license.\n\n;(function(global){\n var k,\n _handlers = {},\n _mods = { 16: false, 18: false, 17: false, 91: false },\n _scope = 'all',\n // modifier keys\n _MODIFIERS = {\n '⇧': 16, shift: 16,\n '⌥': 18, alt: 18, option: 18,\n '⌃': 17, ctrl: 17, control: 17,\n '⌘': 91, command: 91\n },\n // special keys\n _MAP = {\n backspace: 8, tab: 9, clear: 12,\n enter: 13, 'return': 13,\n esc: 27, escape: 27, space: 32,\n left: 37, up: 38,\n right: 39, down: 40,\n del: 46, 'delete': 46,\n home: 36, end: 35,\n pageup: 33, pagedown: 34,\n ',': 188, '.': 190, '/': 191,\n '`': 192, '-': 189, '=': 187,\n ';': 186, '\\'': 222,\n '[': 219, ']': 221, '\\\\': 220\n },\n code = function(x){\n return _MAP[x] || x.toUpperCase().charCodeAt(0);\n },\n _downKeys = [];\n\n for(k=1;k<20;k++) _MAP['f'+k] = 111+k;\n\n // IE doesn't support Array#indexOf, so have a simple replacement\n function index(array, item){\n var i = array.length;\n while(i--) if(array[i]===item) return i;\n return -1;\n }\n\n // for comparing mods before unassignment\n function compareArray(a1, a2) {\n if (a1.length != a2.length) return false;\n for (var i = 0; i < a1.length; i++) {\n if (a1[i] !== a2[i]) return false;\n }\n return true;\n }\n\n var modifierMap = {\n 16:'shiftKey',\n 18:'altKey',\n 17:'ctrlKey',\n 91:'metaKey'\n };\n function updateModifierKey(event) {\n for(k in _mods) _mods[k] = event[modifierMap[k]];\n };\n\n // handle keydown event\n function dispatch(event) {\n var key, handler, k, i, modifiersMatch, scope;\n key = event.keyCode;\n\n if (index(_downKeys, key) == -1) {\n _downKeys.push(key);\n }\n\n // if a modifier key, set the key.<modifierkeyname> property to true and return\n if(key == 93 || key == 224) key = 91; // right command on webkit, command on Gecko\n if(key in _mods) {\n _mods[key] = true;\n // 'assignKey' from inside this closure is exported to window.key\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = true;\n return;\n }\n updateModifierKey(event);\n\n // see if we need to ignore the keypress (filter() can can be overridden)\n // by default ignore key presses if a select, textarea, or input is focused\n if(!assignKey.filter.call(this, event)) return;\n\n // abort if no potentially matching shortcuts found\n if (!(key in _handlers)) return;\n\n scope = getScope();\n\n // for each potential shortcut\n for (i = 0; i < _handlers[key].length; i++) {\n handler = _handlers[key][i];\n\n // see if it's in the current scope\n if(handler.scope == scope || handler.scope == 'all'){\n // check if modifiers match if any\n modifiersMatch = handler.mods.length > 0;\n for(k in _mods)\n if((!_mods[k] && index(handler.mods, +k) > -1) ||\n (_mods[k] && index(handler.mods, +k) == -1)) modifiersMatch = false;\n // call the handler and stop the event if neccessary\n if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){\n if(handler.method(event, handler)===false){\n if(event.preventDefault) event.preventDefault();\n else event.returnValue = false;\n if(event.stopPropagation) event.stopPropagation();\n if(event.cancelBubble) event.cancelBubble = true;\n }\n }\n }\n }\n };\n\n // unset modifier keys on keyup\n function clearModifier(event){\n var key = event.keyCode, k,\n i = index(_downKeys, key);\n\n // remove key from _downKeys\n if (i >= 0) {\n _downKeys.splice(i, 1);\n }\n\n if(key == 93 || key == 224) key = 91;\n if(key in _mods) {\n _mods[key] = false;\n for(k in _MODIFIERS) if(_MODIFIERS[k] == key) assignKey[k] = false;\n }\n };\n\n function resetModifiers() {\n for(k in _mods) _mods[k] = false;\n for(k in _MODIFIERS) assignKey[k] = false;\n };\n\n // parse and assign shortcut\n function assignKey(key, scope, method){\n var keys, mods;\n keys = getKeys(key);\n if (method === undefined) {\n method = scope;\n scope = 'all';\n }\n\n // for each shortcut\n for (var i = 0; i < keys.length; i++) {\n // set modifier keys if any\n mods = [];\n key = keys[i].split('+');\n if (key.length > 1){\n mods = getMods(key);\n key = [key[key.length-1]];\n }\n // convert to keycode and...\n key = key[0]\n key = code(key);\n // ...store handler\n if (!(key in _handlers)) _handlers[key] = [];\n _handlers[key].push({ shortcut: keys[i], scope: scope, method: method, key: keys[i], mods: mods });\n }\n };\n\n // unbind all handlers for given key in current scope\n function unbindKey(key, scope) {\n var multipleKeys, keys,\n mods = [],\n i, j, obj;\n\n multipleKeys = getKeys(key);\n\n for (j = 0; j < multipleKeys.length; j++) {\n keys = multipleKeys[j].split('+');\n\n if (keys.length > 1) {\n mods = getMods(keys);\n key = keys[keys.length - 1];\n }\n\n key = code(key);\n\n if (scope === undefined) {\n scope = getScope();\n }\n if (!_handlers[key]) {\n return;\n }\n for (i = 0; i < _handlers[key].length; i++) {\n obj = _handlers[key][i];\n // only clear handlers if correct scope and mods match\n if (obj.scope === scope && compareArray(obj.mods, mods)) {\n _handlers[key][i] = {};\n }\n }\n }\n };\n\n // Returns true if the key with code 'keyCode' is currently down\n // Converts strings into key codes.\n function isPressed(keyCode) {\n if (typeof(keyCode)=='string') {\n keyCode = code(keyCode);\n }\n return index(_downKeys, keyCode) != -1;\n }\n\n function getPressedKeyCodes() {\n return _downKeys.slice(0);\n }\n\n function filter(event){\n var tagName = (event.target || event.srcElement).tagName;\n // ignore keypressed in any elements that support keyboard data input\n return !(tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');\n }\n\n // initialize key.<modifier> to false\n for(k in _MODIFIERS) assignKey[k] = false;\n\n // set current scope (default 'all')\n function setScope(scope){ _scope = scope || 'all' };\n function getScope(){ return _scope || 'all' };\n\n // delete all handlers for a given scope\n function deleteScope(scope){\n var key, handlers, i;\n\n for (key in _handlers) {\n handlers = _handlers[key];\n for (i = 0; i < handlers.length; ) {\n if (handlers[i].scope === scope) handlers.splice(i, 1);\n else i++;\n }\n }\n };\n\n // abstract key logic for assign and unassign\n function getKeys(key) {\n var keys;\n key = key.replace(/\\s/g, '');\n keys = key.split(',');\n if ((keys[keys.length - 1]) == '') {\n keys[keys.length - 2] += ',';\n }\n return keys;\n }\n\n // abstract mods logic for assign and unassign\n function getMods(key) {\n var mods = key.slice(0, key.length - 1);\n for (var mi = 0; mi < mods.length; mi++)\n mods[mi] = _MODIFIERS[mods[mi]];\n return mods;\n }\n\n // cross-browser events\n function addEvent(object, event, method) {\n if (object.addEventListener)\n object.addEventListener(event, method, false);\n else if(object.attachEvent)\n object.attachEvent('on'+event, function(){ method(window.event) });\n };\n\n // set the handlers globally on document\n addEvent(document, 'keydown', function(event) { dispatch(event) }); // Passing _scope to a callback to ensure it remains the same by execution. Fixes #48\n addEvent(document, 'keyup', clearModifier);\n\n // reset modifiers to false whenever the window is (re)focused.\n addEvent(window, 'focus', resetModifiers);\n\n // store previously defined key\n var previousKey = global.key;\n\n // restore previously defined key and return reference to our key object\n function noConflict() {\n var k = global.key;\n global.key = previousKey;\n return k;\n }\n\n // set window.key and window.key.set/get/deleteScope, and the default filter\n global.key = assignKey;\n global.key.setScope = setScope;\n global.key.getScope = getScope;\n global.key.deleteScope = deleteScope;\n global.key.filter = filter;\n global.key.isPressed = isPressed;\n global.key.getPressedKeyCodes = getPressedKeyCodes;\n global.key.noConflict = noConflict;\n global.key.unbind = unbindKey;\n\n if(typeof module !== 'undefined') module.exports = assignKey;\n\n})(this);\n","/**\n * Root reference for iframes.\n */\n\nvar root;\nif (typeof window !== 'undefined') { // Browser window\n root = window;\n} else if (typeof self !== 'undefined') { // Web Worker\n root = self;\n} else { // Other environments\n console.warn(\"Using browser-only version of superagent in non-browser environment\");\n root = this;\n}\n\nvar Emitter = require('emitter');\nvar requestBase = require('./request-base');\nvar isObject = require('./is-object');\n\n/**\n * Noop.\n */\n\nfunction noop(){};\n\n/**\n * Expose `request`.\n */\n\nvar request = module.exports = require('./request').bind(null, Request);\n\n/**\n * Determine XHR.\n */\n\nrequest.getXHR = function () {\n if (root.XMLHttpRequest\n && (!root.location || 'file:' != root.location.protocol\n || !root.ActiveXObject)) {\n return new XMLHttpRequest;\n } else {\n try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}\n try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}\n }\n throw Error(\"Browser-only verison of superagent could not find XHR\");\n};\n\n/**\n * Removes leading and trailing whitespace, added to support IE.\n *\n * @param {String} s\n * @return {String}\n * @api private\n */\n\nvar trim = ''.trim\n ? function(s) { return s.trim(); }\n : function(s) { return s.replace(/(^\\s*|\\s*$)/g, ''); };\n\n/**\n * Serialize the given `obj`.\n *\n * @param {Object} obj\n * @return {String}\n * @api private\n */\n\nfunction serialize(obj) {\n if (!isObject(obj)) return obj;\n var pairs = [];\n for (var key in obj) {\n pushEncodedKeyValuePair(pairs, key, obj[key]);\n }\n return pairs.join('&');\n}\n\n/**\n * Helps 'serialize' with serializing arrays.\n * Mutates the pairs array.\n *\n * @param {Array} pairs\n * @param {String} key\n * @param {Mixed} val\n */\n\nfunction pushEncodedKeyValuePair(pairs, key, val) {\n if (val != null) {\n if (Array.isArray(val)) {\n val.forEach(function(v) {\n pushEncodedKeyValuePair(pairs, key, v);\n });\n } else if (isObject(val)) {\n for(var subkey in val) {\n pushEncodedKeyValuePair(pairs, key + '[' + subkey + ']', val[subkey]);\n }\n } else {\n pairs.push(encodeURIComponent(key)\n + '=' + encodeURIComponent(val));\n }\n } else if (val === null) {\n pairs.push(encodeURIComponent(key));\n }\n}\n\n/**\n * Expose serialization method.\n */\n\n request.serializeObject = serialize;\n\n /**\n * Parse the given x-www-form-urlencoded `str`.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parseString(str) {\n var obj = {};\n var pairs = str.split('&');\n var pair;\n var pos;\n\n for (var i = 0, len = pairs.length; i < len; ++i) {\n pair = pairs[i];\n pos = pair.indexOf('=');\n if (pos == -1) {\n obj[decodeURIComponent(pair)] = '';\n } else {\n obj[decodeURIComponent(pair.slice(0, pos))] =\n decodeURIComponent(pair.slice(pos + 1));\n }\n }\n\n return obj;\n}\n\n/**\n * Expose parser.\n */\n\nrequest.parseString = parseString;\n\n/**\n * Default MIME type map.\n *\n * superagent.types.xml = 'application/xml';\n *\n */\n\nrequest.types = {\n html: 'text/html',\n json: 'application/json',\n xml: 'application/xml',\n urlencoded: 'application/x-www-form-urlencoded',\n 'form': 'application/x-www-form-urlencoded',\n 'form-data': 'application/x-www-form-urlencoded'\n};\n\n/**\n * Default serialization map.\n *\n * superagent.serialize['application/xml'] = function(obj){\n * return 'generated xml here';\n * };\n *\n */\n\n request.serialize = {\n 'application/x-www-form-urlencoded': serialize,\n 'application/json': JSON.stringify\n };\n\n /**\n * Default parsers.\n *\n * superagent.parse['application/xml'] = function(str){\n * return { object parsed from str };\n * };\n *\n */\n\nrequest.parse = {\n 'application/x-www-form-urlencoded': parseString,\n 'application/json': JSON.parse\n};\n\n/**\n * Parse the given header `str` into\n * an object containing the mapped fields.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction parseHeader(str) {\n var lines = str.split(/\\r?\\n/);\n var fields = {};\n var index;\n var line;\n var field;\n var val;\n\n lines.pop(); // trailing CRLF\n\n for (var i = 0, len = lines.length; i < len; ++i) {\n line = lines[i];\n index = line.indexOf(':');\n field = line.slice(0, index).toLowerCase();\n val = trim(line.slice(index + 1));\n fields[field] = val;\n }\n\n return fields;\n}\n\n/**\n * Check if `mime` is json or has +json structured syntax suffix.\n *\n * @param {String} mime\n * @return {Boolean}\n * @api private\n */\n\nfunction isJSON(mime) {\n return /[\\/+]json\\b/.test(mime);\n}\n\n/**\n * Return the mime type for the given `str`.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction type(str){\n return str.split(/ *; */).shift();\n};\n\n/**\n * Return header field parameters.\n *\n * @param {String} str\n * @return {Object}\n * @api private\n */\n\nfunction params(str){\n return str.split(/ *; */).reduce(function(obj, str){\n var parts = str.split(/ *= */),\n key = parts.shift(),\n val = parts.shift();\n\n if (key && val) obj[key] = val;\n return obj;\n }, {});\n};\n\n/**\n * Initialize a new `Response` with the given `xhr`.\n *\n * - set flags (.ok, .error, etc)\n * - parse header\n *\n * Examples:\n *\n * Aliasing `superagent` as `request` is nice:\n *\n * request = superagent;\n *\n * We can use the promise-like API, or pass callbacks:\n *\n * request.get('/').end(function(res){});\n * request.get('/', function(res){});\n *\n * Sending data can be chained:\n *\n * request\n * .post('/user')\n * .send({ name: 'tj' })\n * .end(function(res){});\n *\n * Or passed to `.send()`:\n *\n * request\n * .post('/user')\n * .send({ name: 'tj' }, function(res){});\n *\n * Or passed to `.post()`:\n *\n * request\n * .post('/user', { name: 'tj' })\n * .end(function(res){});\n *\n * Or further reduced to a single call for simple cases:\n *\n * request\n * .post('/user', { name: 'tj' }, function(res){});\n *\n * @param {XMLHTTPRequest} xhr\n * @param {Object} options\n * @api private\n */\n\nfunction Response(req, options) {\n options = options || {};\n this.req = req;\n this.xhr = this.req.xhr;\n // responseText is accessible only if responseType is '' or 'text' and on older browsers\n this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined')\n ? this.xhr.responseText\n : null;\n this.statusText = this.req.xhr.statusText;\n this._setStatusProperties(this.xhr.status);\n this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());\n // getAllResponseHeaders sometimes falsely returns \"\" for CORS requests, but\n // getResponseHeader still works. so we get content-type even if getting\n // other headers fails.\n this.header['content-type'] = this.xhr.getResponseHeader('content-type');\n this._setHeaderProperties(this.header);\n this.body = this.req.method != 'HEAD'\n ? this._parseBody(this.text ? this.text : this.xhr.response)\n : null;\n}\n\n/**\n * Get case-insensitive `field` value.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nResponse.prototype.get = function(field){\n return this.header[field.toLowerCase()];\n};\n\n/**\n * Set header related properties:\n *\n * - `.type` the content type without params\n *\n * A response of \"Content-Type: text/plain; charset=utf-8\"\n * will provide you with a `.type` of \"text/plain\".\n *\n * @param {Object} header\n * @api private\n */\n\nResponse.prototype._setHeaderProperties = function(header){\n // content-type\n var ct = this.header['content-type'] || '';\n this.type = type(ct);\n\n // params\n var obj = params(ct);\n for (var key in obj) this[key] = obj[key];\n};\n\n/**\n * Parse the given body `str`.\n *\n * Used for auto-parsing of bodies. Parsers\n * are defined on the `superagent.parse` object.\n *\n * @param {String} str\n * @return {Mixed}\n * @api private\n */\n\nResponse.prototype._parseBody = function(str){\n var parse = request.parse[this.type];\n if (!parse && isJSON(this.type)) {\n parse = request.parse['application/json'];\n }\n return parse && str && (str.length || str instanceof Object)\n ? parse(str)\n : null;\n};\n\n/**\n * Set flags such as `.ok` based on `status`.\n *\n * For example a 2xx response will give you a `.ok` of __true__\n * whereas 5xx will be __false__ and `.error` will be __true__. The\n * `.clientError` and `.serverError` are also available to be more\n * specific, and `.statusType` is the class of error ranging from 1..5\n * sometimes useful for mapping respond colors etc.\n *\n * \"sugar\" properties are also defined for common cases. Currently providing:\n *\n * - .noContent\n * - .badRequest\n * - .unauthorized\n * - .notAcceptable\n * - .notFound\n *\n * @param {Number} status\n * @api private\n */\n\nResponse.prototype._setStatusProperties = function(status){\n // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\n if (status === 1223) {\n status = 204;\n }\n\n var type = status / 100 | 0;\n\n // status / class\n this.status = this.statusCode = status;\n this.statusType = type;\n\n // basics\n this.info = 1 == type;\n this.ok = 2 == type;\n this.clientError = 4 == type;\n this.serverError = 5 == type;\n this.error = (4 == type || 5 == type)\n ? this.toError()\n : false;\n\n // sugar\n this.accepted = 202 == status;\n this.noContent = 204 == status;\n this.badRequest = 400 == status;\n this.unauthorized = 401 == status;\n this.notAcceptable = 406 == status;\n this.notFound = 404 == status;\n this.forbidden = 403 == status;\n};\n\n/**\n * Return an `Error` representative of this response.\n *\n * @return {Error}\n * @api public\n */\n\nResponse.prototype.toError = function(){\n var req = this.req;\n var method = req.method;\n var url = req.url;\n\n var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')';\n var err = new Error(msg);\n err.status = this.status;\n err.method = method;\n err.url = url;\n\n return err;\n};\n\n/**\n * Expose `Response`.\n */\n\nrequest.Response = Response;\n\n/**\n * Initialize a new `Request` with the given `method` and `url`.\n *\n * @param {String} method\n * @param {String} url\n * @api public\n */\n\nfunction Request(method, url) {\n var self = this;\n this._query = this._query || [];\n this.method = method;\n this.url = url;\n this.header = {}; // preserves header name case\n this._header = {}; // coerces header names to lowercase\n this.on('end', function(){\n var err = null;\n var res = null;\n\n try {\n res = new Response(self);\n } catch(e) {\n err = new Error('Parser is unable to parse the response');\n err.parse = true;\n err.original = e;\n // issue #675: return the raw response if the response parsing fails\n err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;\n // issue #876: return the http status code if the response parsing fails\n err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null;\n return self.callback(err);\n }\n\n self.emit('response', res);\n\n var new_err;\n try {\n if (res.status < 200 || res.status >= 300) {\n new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\n new_err.original = err;\n new_err.response = res;\n new_err.status = res.status;\n }\n } catch(e) {\n new_err = e; // #985 touching res may cause INVALID_STATE_ERR on old Android\n }\n\n // #1000 don't catch errors from the callback to avoid double calling it\n if (new_err) {\n self.callback(new_err, res);\n } else {\n self.callback(null, res);\n }\n });\n}\n\n/**\n * Mixin `Emitter` and `requestBase`.\n */\n\nEmitter(Request.prototype);\nfor (var key in requestBase) {\n Request.prototype[key] = requestBase[key];\n}\n\n/**\n * Set Content-Type to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n * superagent.types.xml = 'application/xml';\n *\n * request.post('/')\n * .type('xml')\n * .send(xmlstring)\n * .end(callback);\n *\n * request.post('/')\n * .type('application/xml')\n * .send(xmlstring)\n * .end(callback);\n *\n * @param {String} type\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.type = function(type){\n this.set('Content-Type', request.types[type] || type);\n return this;\n};\n\n/**\n * Set responseType to `val`. Presently valid responseTypes are 'blob' and\n * 'arraybuffer'.\n *\n * Examples:\n *\n * req.get('/')\n * .responseType('blob')\n * .end(callback);\n *\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.responseType = function(val){\n this._responseType = val;\n return this;\n};\n\n/**\n * Set Accept to `type`, mapping values from `request.types`.\n *\n * Examples:\n *\n * superagent.types.json = 'application/json';\n *\n * request.get('/agent')\n * .accept('json')\n * .end(callback);\n *\n * request.get('/agent')\n * .accept('application/json')\n * .end(callback);\n *\n * @param {String} accept\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.accept = function(type){\n this.set('Accept', request.types[type] || type);\n return this;\n};\n\n/**\n * Set Authorization field value with `user` and `pass`.\n *\n * @param {String} user\n * @param {String} pass\n * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic')\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.auth = function(user, pass, options){\n if (!options) {\n options = {\n type: 'basic'\n }\n }\n\n switch (options.type) {\n case 'basic':\n var str = btoa(user + ':' + pass);\n this.set('Authorization', 'Basic ' + str);\n break;\n\n case 'auto':\n this.username = user;\n this.password = pass;\n break;\n }\n return this;\n};\n\n/**\n* Add query-string `val`.\n*\n* Examples:\n*\n* request.get('/shoes')\n* .query('size=10')\n* .query({ color: 'blue' })\n*\n* @param {Object|String} val\n* @return {Request} for chaining\n* @api public\n*/\n\nRequest.prototype.query = function(val){\n if ('string' != typeof val) val = serialize(val);\n if (val) this._query.push(val);\n return this;\n};\n\n/**\n * Queue the given `file` as an attachment to the specified `field`,\n * with optional `filename`.\n *\n * ``` js\n * request.post('/upload')\n * .attach('content', new Blob(['<a id=\"a\"><b id=\"b\">hey!</b></a>'], { type: \"text/html\"}))\n * .end(callback);\n * ```\n *\n * @param {String} field\n * @param {Blob|File} file\n * @param {String} filename\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.attach = function(field, file, filename){\n this._getFormData().append(field, file, filename || file.name);\n return this;\n};\n\nRequest.prototype._getFormData = function(){\n if (!this._formData) {\n this._formData = new root.FormData();\n }\n return this._formData;\n};\n\n/**\n * Invoke the callback with `err` and `res`\n * and handle arity check.\n *\n * @param {Error} err\n * @param {Response} res\n * @api private\n */\n\nRequest.prototype.callback = function(err, res){\n var fn = this._callback;\n this.clearTimeout();\n fn(err, res);\n};\n\n/**\n * Invoke callback with x-domain error.\n *\n * @api private\n */\n\nRequest.prototype.crossDomainError = function(){\n var err = 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.');\n err.crossDomain = true;\n\n err.status = this.status;\n err.method = this.method;\n err.url = this.url;\n\n this.callback(err);\n};\n\n/**\n * Invoke callback with timeout error.\n *\n * @api private\n */\n\nRequest.prototype._timeoutError = function(){\n var timeout = this._timeout;\n var err = new Error('timeout of ' + timeout + 'ms exceeded');\n err.timeout = timeout;\n this.callback(err);\n};\n\n/**\n * Compose querystring to append to req.url\n *\n * @api private\n */\n\nRequest.prototype._appendQueryString = function(){\n var query = this._query.join('&');\n if (query) {\n this.url += ~this.url.indexOf('?')\n ? '&' + query\n : '?' + query;\n }\n};\n\n/**\n * Initiate request, invoking callback `fn(res)`\n * with an instanceof `Response`.\n *\n * @param {Function} fn\n * @return {Request} for chaining\n * @api public\n */\n\nRequest.prototype.end = function(fn){\n var self = this;\n var xhr = this.xhr = request.getXHR();\n var timeout = this._timeout;\n var data = this._formData || this._data;\n\n // store callback\n this._callback = fn || noop;\n\n // state change\n xhr.onreadystatechange = function(){\n if (4 != xhr.readyState) return;\n\n // In IE9, reads to any property (e.g. status) off of an aborted XHR will\n // result in the error \"Could not complete the operation due to error c00c023f\"\n var status;\n try { status = xhr.status } catch(e) { status = 0; }\n\n if (0 == status) {\n if (self.timedout) return self._timeoutError();\n if (self._aborted) return;\n return self.crossDomainError();\n }\n self.emit('end');\n };\n\n // progress\n var handleProgress = function(direction, e) {\n if (e.total > 0) {\n e.percent = e.loaded / e.total * 100;\n }\n e.direction = direction;\n self.emit('progress', e);\n }\n if (this.hasListeners('progress')) {\n try {\n xhr.onprogress = handleProgress.bind(null, 'download');\n if (xhr.upload) {\n xhr.upload.onprogress = handleProgress.bind(null, 'upload');\n }\n } catch(e) {\n // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist.\n // Reported here:\n // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context\n }\n }\n\n // timeout\n if (timeout && !this._timer) {\n this._timer = setTimeout(function(){\n self.timedout = true;\n self.abort();\n }, timeout);\n }\n\n // querystring\n this._appendQueryString();\n\n // initiate request\n if (this.username && this.password) {\n xhr.open(this.method, this.url, true, this.username, this.password);\n } else {\n xhr.open(this.method, this.url, true);\n }\n\n // CORS\n if (this._withCredentials) xhr.withCredentials = true;\n\n // body\n if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !this._isHost(data)) {\n // serialize stuff\n var contentType = this._header['content-type'];\n var serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : ''];\n if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];\n if (serialize) data = serialize(data);\n }\n\n // set header fields\n for (var field in this.header) {\n if (null == this.header[field]) continue;\n xhr.setRequestHeader(field, this.header[field]);\n }\n\n if (this._responseType) {\n xhr.responseType = this._responseType;\n }\n\n // send stuff\n this.emit('request', this);\n\n // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing)\n // We need null here if data is undefined\n xhr.send(typeof data !== 'undefined' ? data : null);\n return this;\n};\n\n\n/**\n * Expose `Request`.\n */\n\nrequest.Request = Request;\n\n/**\n * GET `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.get = function(url, data, fn){\n var req = request('GET', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.query(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * HEAD `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.head = function(url, data, fn){\n var req = request('HEAD', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * OPTIONS query to `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.options = function(url, data, fn){\n var req = request('OPTIONS', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * DELETE `url` with optional callback `fn(res)`.\n *\n * @param {String} url\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nfunction del(url, fn){\n var req = request('DELETE', url);\n if (fn) req.end(fn);\n return req;\n};\n\nrequest['del'] = del;\nrequest['delete'] = del;\n\n/**\n * PATCH `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} [data]\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.patch = function(url, data, fn){\n var req = request('PATCH', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * POST `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed} [data]\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.post = function(url, data, fn){\n var req = request('POST', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n\n/**\n * PUT `url` with optional `data` and callback `fn(res)`.\n *\n * @param {String} url\n * @param {Mixed|Function} [data] or fn\n * @param {Function} [fn]\n * @return {Request}\n * @api public\n */\n\nrequest.put = function(url, data, fn){\n var req = request('PUT', url);\n if ('function' == typeof data) fn = data, data = null;\n if (data) req.send(data);\n if (fn) req.end(fn);\n return req;\n};\n","/**\n * Check if `obj` is an object.\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nfunction isObject(obj) {\n return null !== obj && 'object' === typeof obj;\n}\n\nmodule.exports = isObject;\n","/**\n * Module of mixed-in functions shared between node and client code\n */\nvar isObject = require('./is-object');\n\n/**\n * Clear previous timeout.\n *\n * @return {Request} for chaining\n * @api public\n */\n\nexports.clearTimeout = function _clearTimeout(){\n this._timeout = 0;\n clearTimeout(this._timer);\n return this;\n};\n\n/**\n * Override default response body parser\n *\n * This function will be called to convert incoming data into request.body\n *\n * @param {Function}\n * @api public\n */\n\nexports.parse = function parse(fn){\n this._parser = fn;\n return this;\n};\n\n/**\n * Override default request body serializer\n *\n * This function will be called to convert data set via .send or .attach into payload to send\n *\n * @param {Function}\n * @api public\n */\n\nexports.serialize = function serialize(fn){\n this._serializer = fn;\n return this;\n};\n\n/**\n * Set timeout to `ms`.\n *\n * @param {Number} ms\n * @return {Request} for chaining\n * @api public\n */\n\nexports.timeout = function timeout(ms){\n this._timeout = ms;\n return this;\n};\n\n/**\n * Promise support\n *\n * @param {Function} resolve\n * @param {Function} reject\n * @return {Request}\n */\n\nexports.then = function then(resolve, reject) {\n if (!this._fullfilledPromise) {\n var self = this;\n this._fullfilledPromise = new Promise(function(innerResolve, innerReject){\n self.end(function(err, res){\n if (err) innerReject(err); else innerResolve(res);\n });\n });\n }\n return this._fullfilledPromise.then(resolve, reject);\n}\n\nexports.catch = function(cb) {\n return this.then(undefined, cb);\n};\n\n/**\n * Allow for extension\n */\n\nexports.use = function use(fn) {\n fn(this);\n return this;\n}\n\n\n/**\n * Get request header `field`.\n * Case-insensitive.\n *\n * @param {String} field\n * @return {String}\n * @api public\n */\n\nexports.get = function(field){\n return this._header[field.toLowerCase()];\n};\n\n/**\n * Get case-insensitive header `field` value.\n * This is a deprecated internal API. Use `.get(field)` instead.\n *\n * (getHeader is no longer used internally by the superagent code base)\n *\n * @param {String} field\n * @return {String}\n * @api private\n * @deprecated\n */\n\nexports.getHeader = exports.get;\n\n/**\n * Set header `field` to `val`, or multiple fields with one object.\n * Case-insensitive.\n *\n * Examples:\n *\n * req.get('/')\n * .set('Accept', 'application/json')\n * .set('X-API-Key', 'foobar')\n * .end(callback);\n *\n * req.get('/')\n * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })\n * .end(callback);\n *\n * @param {String|Object} field\n * @param {String} val\n * @return {Request} for chaining\n * @api public\n */\n\nexports.set = function(field, val){\n if (isObject(field)) {\n for (var key in field) {\n this.set(key, field[key]);\n }\n return this;\n }\n this._header[field.toLowerCase()] = val;\n this.header[field] = val;\n return this;\n};\n\n/**\n * Remove header `field`.\n * Case-insensitive.\n *\n * Example:\n *\n * req.get('/')\n * .unset('User-Agent')\n * .end(callback);\n *\n * @param {String} field\n */\nexports.unset = function(field){\n delete this._header[field.toLowerCase()];\n delete this.header[field];\n return this;\n};\n\n/**\n * Write the field `name` and `val`, or multiple fields with one object\n * for \"multipart/form-data\" request bodies.\n *\n * ``` js\n * request.post('/upload')\n * .field('foo', 'bar')\n * .end(callback);\n *\n * request.post('/upload')\n * .field({ foo: 'bar', baz: 'qux' })\n * .end(callback);\n * ```\n *\n * @param {String|Object} name\n * @param {String|Blob|File|Buffer|fs.ReadStream} val\n * @return {Request} for chaining\n * @api public\n */\nexports.field = function(name, val) {\n\n // name should be either a string or an object.\n if (null === name || undefined === name) {\n throw new Error('.field(name, val) name can not be empty');\n }\n\n if (isObject(name)) {\n for (var key in name) {\n this.field(key, name[key]);\n }\n return this;\n }\n\n // val should be defined now\n if (null === val || undefined === val) {\n throw new Error('.field(name, val) val can not be empty');\n }\n this._getFormData().append(name, val);\n return this;\n};\n\n/**\n * Abort the request, and clear potential timeout.\n *\n * @return {Request}\n * @api public\n */\nexports.abort = function(){\n if (this._aborted) {\n return this;\n }\n this._aborted = true;\n this.xhr && this.xhr.abort(); // browser\n this.req && this.req.abort(); // node\n this.clearTimeout();\n this.emit('abort');\n return this;\n};\n\n/**\n * Enable transmission of cookies with x-domain requests.\n *\n * Note that for this to work the origin must not be\n * using \"Access-Control-Allow-Origin\" with a wildcard,\n * and also must set \"Access-Control-Allow-Credentials\"\n * to \"true\".\n *\n * @api public\n */\n\nexports.withCredentials = function(){\n // This is browser-only functionality. Node side is no-op.\n this._withCredentials = true;\n return this;\n};\n\n/**\n * Set the max redirects to `n`. Does noting in browser XHR implementation.\n *\n * @param {Number} n\n * @return {Request} for chaining\n * @api public\n */\n\nexports.redirects = function(n){\n this._maxRedirects = n;\n return this;\n};\n\n/**\n * Convert to a plain javascript object (not JSON string) of scalar properties.\n * Note as this method is designed to return a useful non-this value,\n * it cannot be chained.\n *\n * @return {Object} describing method, url, and data of this request\n * @api public\n */\n\nexports.toJSON = function(){\n return {\n method: this.method,\n url: this.url,\n data: this._data,\n headers: this._header\n };\n};\n\n/**\n * Check if `obj` is a host object,\n * we don't want to serialize these :)\n *\n * TODO: future proof, move to compoent land\n *\n * @param {Object} obj\n * @return {Boolean}\n * @api private\n */\n\nexports._isHost = function _isHost(obj) {\n var str = {}.toString.call(obj);\n\n switch (str) {\n case '[object File]':\n case '[object Blob]':\n case '[object FormData]':\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Send `data` as the request body, defaulting the `.type()` to \"json\" when\n * an object is given.\n *\n * Examples:\n *\n * // manual json\n * request.post('/user')\n * .type('json')\n * .send('{\"name\":\"tj\"}')\n * .end(callback)\n *\n * // auto json\n * request.post('/user')\n * .send({ name: 'tj' })\n * .end(callback)\n *\n * // manual x-www-form-urlencoded\n * request.post('/user')\n * .type('form')\n * .send('name=tj')\n * .end(callback)\n *\n * // auto x-www-form-urlencoded\n * request.post('/user')\n * .type('form')\n * .send({ name: 'tj' })\n * .end(callback)\n *\n * // defaults to x-www-form-urlencoded\n * request.post('/user')\n * .send('name=tobi')\n * .send('species=ferret')\n * .end(callback)\n *\n * @param {String|Object} data\n * @return {Request} for chaining\n * @api public\n */\n\nexports.send = function(data){\n var obj = isObject(data);\n var type = this._header['content-type'];\n\n // merge\n if (obj && isObject(this._data)) {\n for (var key in data) {\n this._data[key] = data[key];\n }\n } else if ('string' == typeof data) {\n // default to x-www-form-urlencoded\n if (!type) this.type('form');\n type = this._header['content-type'];\n if ('application/x-www-form-urlencoded' == type) {\n this._data = this._data\n ? this._data + '&' + data\n : data;\n } else {\n this._data = (this._data || '') + data;\n }\n } else {\n this._data = data;\n }\n\n if (!obj || this._isHost(data)) return this;\n\n // default to json\n if (!type) this.type('json');\n return this;\n};\n","// The node and browser modules expose versions of this with the\n// appropriate constructor function bound as first argument\n/**\n * Issue a request:\n *\n * Examples:\n *\n * request('GET', '/users').end(callback)\n * request('/users').end(callback)\n * request('/users', callback)\n *\n * @param {String} method\n * @param {String|Function} url or callback\n * @return {Request}\n * @api public\n */\n\nfunction request(RequestConstructor, method, url) {\n // callback\n if ('function' == typeof url) {\n return new RequestConstructor('GET', method).end(url);\n }\n\n // url first\n if (2 == arguments.length) {\n return new RequestConstructor('GET', method);\n }\n\n return new RequestConstructor(method, url);\n}\n\nmodule.exports = request;\n"]}