\n\t * @returns {number} The mapped value.\n\t */\n\tfunction mapLinear(x, a1, a2, b1, b2) {\n\t return b1 + (x - a1) * (b2 - b1) / (a2 - a1);\n\t}\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! nouislider - 9.2.0 - 2017-01-11 10:35:34 */\r\n\t\r\n\t(function (factory) {\r\n\t\r\n\t if ( true ) {\r\n\t\r\n\t // AMD. Register as an anonymous module.\r\n\t !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\t\r\n\t } else if ( typeof exports === 'object' ) {\r\n\t\r\n\t // Node/CommonJS\r\n\t module.exports = factory();\r\n\t\r\n\t } else {\r\n\t\r\n\t // Browser globals\r\n\t window.noUiSlider = factory();\r\n\t }\r\n\t\r\n\t}(function( ){\r\n\t\r\n\t\t'use strict';\r\n\t\r\n\t\tvar VERSION = '9.2.0';\r\n\t\r\n\t\r\n\t\t// Creates a node, adds it to target, returns the new node.\r\n\t\tfunction addNodeTo ( target, className ) {\r\n\t\t\tvar div = document.createElement('div');\r\n\t\t\taddClass(div, className);\r\n\t\t\ttarget.appendChild(div);\r\n\t\t\treturn div;\r\n\t\t}\r\n\t\r\n\t\t// Removes duplicates from an array.\r\n\t\tfunction unique ( array ) {\r\n\t\t\treturn array.filter(function(a){\r\n\t\t\t\treturn !this[a] ? this[a] = true : false;\r\n\t\t\t}, {});\r\n\t\t}\r\n\t\r\n\t\t// Round a value to the closest 'to'.\r\n\t\tfunction closest ( value, to ) {\r\n\t\t\treturn Math.round(value / to) * to;\r\n\t\t}\r\n\t\r\n\t\t// Current position of an element relative to the document.\r\n\t\tfunction offset ( elem, orientation ) {\r\n\t\r\n\t\tvar rect = elem.getBoundingClientRect(),\r\n\t\t\tdoc = elem.ownerDocument,\r\n\t\t\tdocElem = doc.documentElement,\r\n\t\t\tpageOffset = getPageOffset();\r\n\t\r\n\t\t\t// getBoundingClientRect contains left scroll in Chrome on Android.\r\n\t\t\t// I haven't found a feature detection that proves this. Worst case\r\n\t\t\t// scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\r\n\t\t\tif ( /webkit.*Chrome.*Mobile/i.test(navigator.userAgent) ) {\r\n\t\t\t\tpageOffset.x = 0;\r\n\t\t\t}\r\n\t\r\n\t\t\treturn orientation ? (rect.top + pageOffset.y - docElem.clientTop) : (rect.left + pageOffset.x - docElem.clientLeft);\r\n\t\t}\r\n\t\r\n\t\t// Checks whether a value is numerical.\r\n\t\tfunction isNumeric ( a ) {\r\n\t\t\treturn typeof a === 'number' && !isNaN( a ) && isFinite( a );\r\n\t\t}\r\n\t\r\n\t\t// Sets a class and removes it after [duration] ms.\r\n\t\tfunction addClassFor ( element, className, duration ) {\r\n\t\t\tif (duration > 0) {\r\n\t\t\taddClass(element, className);\r\n\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\tremoveClass(element, className);\r\n\t\t\t\t}, duration);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Limits a value to 0 - 100\r\n\t\tfunction limit ( a ) {\r\n\t\t\treturn Math.max(Math.min(a, 100), 0);\r\n\t\t}\r\n\t\r\n\t\t// Wraps a variable as an array, if it isn't one yet.\r\n\t\t// Note that an input array is returned by reference!\r\n\t\tfunction asArray ( a ) {\r\n\t\t\treturn Array.isArray(a) ? a : [a];\r\n\t\t}\r\n\t\r\n\t\t// Counts decimals\r\n\t\tfunction countDecimals ( numStr ) {\r\n\t\t\tnumStr = String(numStr);\r\n\t\t\tvar pieces = numStr.split(\".\");\r\n\t\t\treturn pieces.length > 1 ? pieces[1].length : 0;\r\n\t\t}\r\n\t\r\n\t\t// http://youmightnotneedjquery.com/#add_class\r\n\t\tfunction addClass ( el, className ) {\r\n\t\t\tif ( el.classList ) {\r\n\t\t\t\tel.classList.add(className);\r\n\t\t\t} else {\r\n\t\t\t\tel.className += ' ' + className;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// http://youmightnotneedjquery.com/#remove_class\r\n\t\tfunction removeClass ( el, className ) {\r\n\t\t\tif ( el.classList ) {\r\n\t\t\t\tel.classList.remove(className);\r\n\t\t\t} else {\r\n\t\t\t\tel.className = el.className.replace(new RegExp('(^|\\\\b)' + className.split(' ').join('|') + '(\\\\b|$)', 'gi'), ' ');\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\r\n\t\tfunction hasClass ( el, className ) {\r\n\t\t\treturn el.classList ? el.classList.contains(className) : new RegExp('\\\\b' + className + '\\\\b').test(el.className);\r\n\t\t}\r\n\t\r\n\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\r\n\t\tfunction getPageOffset ( ) {\r\n\t\r\n\t\t\tvar supportPageOffset = window.pageXOffset !== undefined,\r\n\t\t\t\tisCSS1Compat = ((document.compatMode || \"\") === \"CSS1Compat\"),\r\n\t\t\t\tx = supportPageOffset ? window.pageXOffset : isCSS1Compat ? document.documentElement.scrollLeft : document.body.scrollLeft,\r\n\t\t\t\ty = supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documentElement.scrollTop : document.body.scrollTop;\r\n\t\r\n\t\t\treturn {\r\n\t\t\t\tx: x,\r\n\t\t\t\ty: y\r\n\t\t\t};\r\n\t\t}\r\n\t\r\n\t\t// we provide a function to compute constants instead\r\n\t\t// of accessing window.* as soon as the module needs it\r\n\t\t// so that we do not compute anything if not needed\r\n\t\tfunction getActions ( ) {\r\n\t\r\n\t\t\t// Determine the events to bind. IE11 implements pointerEvents without\r\n\t\t\t// a prefix, which breaks compatibility with the IE10 implementation.\r\n\t\t\treturn window.navigator.pointerEnabled ? {\r\n\t\t\t\tstart: 'pointerdown',\r\n\t\t\t\tmove: 'pointermove',\r\n\t\t\t\tend: 'pointerup'\r\n\t\t\t} : window.navigator.msPointerEnabled ? {\r\n\t\t\t\tstart: 'MSPointerDown',\r\n\t\t\t\tmove: 'MSPointerMove',\r\n\t\t\t\tend: 'MSPointerUp'\r\n\t\t\t} : {\r\n\t\t\t\tstart: 'mousedown touchstart',\r\n\t\t\t\tmove: 'mousemove touchmove',\r\n\t\t\t\tend: 'mouseup touchend'\r\n\t\t\t};\r\n\t\t}\r\n\t\r\n\t\r\n\t// Value calculation\r\n\t\r\n\t\t// Determine the size of a sub-range in relation to a full range.\r\n\t\tfunction subRangeRatio ( pa, pb ) {\r\n\t\t\treturn (100 / (pb - pa));\r\n\t\t}\r\n\t\r\n\t\t// (percentage) How many percent is this value of this range?\r\n\t\tfunction fromPercentage ( range, value ) {\r\n\t\t\treturn (value * 100) / ( range[1] - range[0] );\r\n\t\t}\r\n\t\r\n\t\t// (percentage) Where is this value on this range?\r\n\t\tfunction toPercentage ( range, value ) {\r\n\t\t\treturn fromPercentage( range, range[0] < 0 ?\r\n\t\t\t\tvalue + Math.abs(range[0]) :\r\n\t\t\t\t\tvalue - range[0] );\r\n\t\t}\r\n\t\r\n\t\t// (value) How much is this percentage on this range?\r\n\t\tfunction isPercentage ( range, value ) {\r\n\t\t\treturn ((value * ( range[1] - range[0] )) / 100) + range[0];\r\n\t\t}\r\n\t\r\n\t\r\n\t// Range conversion\r\n\t\r\n\t\tfunction getJ ( value, arr ) {\r\n\t\r\n\t\t\tvar j = 1;\r\n\t\r\n\t\t\twhile ( value >= arr[j] ){\r\n\t\t\t\tj += 1;\r\n\t\t\t}\r\n\t\r\n\t\t\treturn j;\r\n\t\t}\r\n\t\r\n\t\t// (percentage) Input a value, find where, on a scale of 0-100, it applies.\r\n\t\tfunction toStepping ( xVal, xPct, value ) {\r\n\t\r\n\t\t\tif ( value >= xVal.slice(-1)[0] ){\r\n\t\t\t\treturn 100;\r\n\t\t\t}\r\n\t\r\n\t\t\tvar j = getJ( value, xVal ), va, vb, pa, pb;\r\n\t\r\n\t\t\tva = xVal[j-1];\r\n\t\t\tvb = xVal[j];\r\n\t\t\tpa = xPct[j-1];\r\n\t\t\tpb = xPct[j];\r\n\t\r\n\t\t\treturn pa + (toPercentage([va, vb], value) / subRangeRatio (pa, pb));\r\n\t\t}\r\n\t\r\n\t\t// (value) Input a percentage, find where it is on the specified range.\r\n\t\tfunction fromStepping ( xVal, xPct, value ) {\r\n\t\r\n\t\t\t// There is no range group that fits 100\r\n\t\t\tif ( value >= 100 ){\r\n\t\t\t\treturn xVal.slice(-1)[0];\r\n\t\t\t}\r\n\t\r\n\t\t\tvar j = getJ( value, xPct ), va, vb, pa, pb;\r\n\t\r\n\t\t\tva = xVal[j-1];\r\n\t\t\tvb = xVal[j];\r\n\t\t\tpa = xPct[j-1];\r\n\t\t\tpb = xPct[j];\r\n\t\r\n\t\t\treturn isPercentage([va, vb], (value - pa) * subRangeRatio (pa, pb));\r\n\t\t}\r\n\t\r\n\t\t// (percentage) Get the step that applies at a certain value.\r\n\t\tfunction getStep ( xPct, xSteps, snap, value ) {\r\n\t\r\n\t\t\tif ( value === 100 ) {\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\r\n\t\t\tvar j = getJ( value, xPct ), a, b;\r\n\t\r\n\t\t\t// If 'snap' is set, steps are used as fixed points on the slider.\r\n\t\t\tif ( snap ) {\r\n\t\r\n\t\t\t\ta = xPct[j-1];\r\n\t\t\t\tb = xPct[j];\r\n\t\r\n\t\t\t\t// Find the closest position, a or b.\r\n\t\t\t\tif ((value - a) > ((b-a)/2)){\r\n\t\t\t\t\treturn b;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\treturn a;\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( !xSteps[j-1] ){\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\r\n\t\t\treturn xPct[j-1] + closest(\r\n\t\t\t\tvalue - xPct[j-1],\r\n\t\t\t\txSteps[j-1]\r\n\t\t\t);\r\n\t\t}\r\n\t\r\n\t\r\n\t// Entry parsing\r\n\t\r\n\t\tfunction handleEntryPoint ( index, value, that ) {\r\n\t\r\n\t\t\tvar percentage;\r\n\t\r\n\t\t\t// Wrap numerical input in an array.\r\n\t\t\tif ( typeof value === \"number\" ) {\r\n\t\t\t\tvalue = [value];\r\n\t\t\t}\r\n\t\r\n\t\t\t// Reject any invalid input, by testing whether value is an array.\r\n\t\t\tif ( Object.prototype.toString.call( value ) !== '[object Array]' ){\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'range' contains invalid value.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Covert min/max syntax to 0 and 100.\r\n\t\t\tif ( index === 'min' ) {\r\n\t\t\t\tpercentage = 0;\r\n\t\t\t} else if ( index === 'max' ) {\r\n\t\t\t\tpercentage = 100;\r\n\t\t\t} else {\r\n\t\t\t\tpercentage = parseFloat( index );\r\n\t\t\t}\r\n\t\r\n\t\t\t// Check for correct input.\r\n\t\t\tif ( !isNumeric( percentage ) || !isNumeric( value[0] ) ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'range' value isn't numeric.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Store values.\r\n\t\t\tthat.xPct.push( percentage );\r\n\t\t\tthat.xVal.push( value[0] );\r\n\t\r\n\t\t\t// NaN will evaluate to false too, but to keep\r\n\t\t\t// logging clear, set step explicitly. Make sure\r\n\t\t\t// not to override the 'step' setting with false.\r\n\t\t\tif ( !percentage ) {\r\n\t\t\t\tif ( !isNaN( value[1] ) ) {\r\n\t\t\t\t\tthat.xSteps[0] = value[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthat.xSteps.push( isNaN(value[1]) ? false : value[1] );\r\n\t\t\t}\r\n\t\r\n\t\t\tthat.xHighestCompleteStep.push(0);\r\n\t\t}\r\n\t\r\n\t\tfunction handleStepPoint ( i, n, that ) {\r\n\t\r\n\t\t\t// Ignore 'false' stepping.\r\n\t\t\tif ( !n ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\r\n\t\t\t// Factor to range ratio\r\n\t\t\tthat.xSteps[i] = fromPercentage([\r\n\t\t\t\t that.xVal[i]\r\n\t\t\t\t,that.xVal[i+1]\r\n\t\t\t], n) / subRangeRatio (\r\n\t\t\t\tthat.xPct[i],\r\n\t\t\t\tthat.xPct[i+1] );\r\n\t\r\n\t\t\tvar totalSteps = (that.xVal[i+1] - that.xVal[i]) / that.xNumSteps[i];\r\n\t\t\tvar highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);\r\n\t\t\tvar step = that.xVal[i] + (that.xNumSteps[i] * highestStep);\r\n\t\r\n\t\t\tthat.xHighestCompleteStep[i] = step;\r\n\t\t}\r\n\t\r\n\t\r\n\t// Interface\r\n\t\r\n\t\t// The interface to Spectrum handles all direction-based\r\n\t\t// conversions, so the above values are unaware.\r\n\t\r\n\t\tfunction Spectrum ( entry, snap, direction, singleStep ) {\r\n\t\r\n\t\t\tthis.xPct = [];\r\n\t\t\tthis.xVal = [];\r\n\t\t\tthis.xSteps = [ singleStep || false ];\r\n\t\t\tthis.xNumSteps = [ false ];\r\n\t\t\tthis.xHighestCompleteStep = [];\r\n\t\r\n\t\t\tthis.snap = snap;\r\n\t\t\tthis.direction = direction;\r\n\t\r\n\t\t\tvar index, ordered = [ /* [0, 'min'], [1, '50%'], [2, 'max'] */ ];\r\n\t\r\n\t\t\t// Map the object keys to an array.\r\n\t\t\tfor ( index in entry ) {\r\n\t\t\t\tif ( entry.hasOwnProperty(index) ) {\r\n\t\t\t\t\tordered.push([entry[index], index]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t// Sort all entries by value (numeric sort).\r\n\t\t\tif ( ordered.length && typeof ordered[0][0] === \"object\" ) {\r\n\t\t\t\tordered.sort(function(a, b) { return a[0][0] - b[0][0]; });\r\n\t\t\t} else {\r\n\t\t\t\tordered.sort(function(a, b) { return a[0] - b[0]; });\r\n\t\t\t}\r\n\t\r\n\t\r\n\t\t\t// Convert all entries to subranges.\r\n\t\t\tfor ( index = 0; index < ordered.length; index++ ) {\r\n\t\t\t\thandleEntryPoint(ordered[index][1], ordered[index][0], this);\r\n\t\t\t}\r\n\t\r\n\t\t\t// Store the actual step values.\r\n\t\t\t// xSteps is sorted in the same order as xPct and xVal.\r\n\t\t\tthis.xNumSteps = this.xSteps.slice(0);\r\n\t\r\n\t\t\t// Convert all numeric steps to the percentage of the subrange they represent.\r\n\t\t\tfor ( index = 0; index < this.xNumSteps.length; index++ ) {\r\n\t\t\t\thandleStepPoint(index, this.xNumSteps[index], this);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tSpectrum.prototype.getMargin = function ( value ) {\r\n\t\r\n\t\t\tvar step = this.xNumSteps[0];\r\n\t\r\n\t\t\tif ( step && ((value / step) % 1) !== 0 ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'limit', 'margin' and 'padding' must be divisible by step.\");\r\n\t\t\t}\r\n\t\r\n\t\t\treturn this.xPct.length === 2 ? fromPercentage(this.xVal, value) : false;\r\n\t\t};\r\n\t\r\n\t\tSpectrum.prototype.toStepping = function ( value ) {\r\n\t\r\n\t\t\tvalue = toStepping( this.xVal, this.xPct, value );\r\n\t\r\n\t\t\treturn value;\r\n\t\t};\r\n\t\r\n\t\tSpectrum.prototype.fromStepping = function ( value ) {\r\n\t\r\n\t\t\treturn fromStepping( this.xVal, this.xPct, value );\r\n\t\t};\r\n\t\r\n\t\tSpectrum.prototype.getStep = function ( value ) {\r\n\t\r\n\t\t\tvalue = getStep(this.xPct, this.xSteps, this.snap, value );\r\n\t\r\n\t\t\treturn value;\r\n\t\t};\r\n\t\r\n\t\tSpectrum.prototype.getNearbySteps = function ( value ) {\r\n\t\r\n\t\t\tvar j = getJ(value, this.xPct);\r\n\t\r\n\t\t\treturn {\r\n\t\t\t\tstepBefore: { startValue: this.xVal[j-2], step: this.xNumSteps[j-2], highestStep: this.xHighestCompleteStep[j-2] },\r\n\t\t\t\tthisStep: { startValue: this.xVal[j-1], step: this.xNumSteps[j-1], highestStep: this.xHighestCompleteStep[j-1] },\r\n\t\t\t\tstepAfter: { startValue: this.xVal[j-0], step: this.xNumSteps[j-0], highestStep: this.xHighestCompleteStep[j-0] }\r\n\t\t\t};\r\n\t\t};\r\n\t\r\n\t\tSpectrum.prototype.countStepDecimals = function () {\r\n\t\t\tvar stepDecimals = this.xNumSteps.map(countDecimals);\r\n\t\t\treturn Math.max.apply(null, stepDecimals);\r\n\t \t};\r\n\t\r\n\t\t// Outside testing\r\n\t\tSpectrum.prototype.convert = function ( value ) {\r\n\t\t\treturn this.getStep(this.toStepping(value));\r\n\t\t};\r\n\t\r\n\t/*\tEvery input option is tested and parsed. This'll prevent\r\n\t\tendless validation in internal methods. These tests are\r\n\t\tstructured with an item for every option available. An\r\n\t\toption can be marked as required by setting the 'r' flag.\r\n\t\tThe testing function is provided with three arguments:\r\n\t\t\t- The provided value for the option;\r\n\t\t\t- A reference to the options object;\r\n\t\t\t- The name for the option;\r\n\t\r\n\t\tThe testing function returns false when an error is detected,\r\n\t\tor true when everything is OK. It can also modify the option\r\n\t\tobject, to make sure all values can be correctly looped elsewhere. */\r\n\t\r\n\t\tvar defaultFormatter = { 'to': function( value ){\r\n\t\t\treturn value !== undefined && value.toFixed(2);\r\n\t\t}, 'from': Number };\r\n\t\r\n\t\tfunction testStep ( parsed, entry ) {\r\n\t\r\n\t\t\tif ( !isNumeric( entry ) ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'step' is not numeric.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// The step option can still be used to set stepping\r\n\t\t\t// for linear sliders. Overwritten if set in 'range'.\r\n\t\t\tparsed.singleStep = entry;\r\n\t\t}\r\n\t\r\n\t\tfunction testRange ( parsed, entry ) {\r\n\t\r\n\t\t\t// Filter incorrect input.\r\n\t\t\tif ( typeof entry !== 'object' || Array.isArray(entry) ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'range' is not an object.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Catch missing start or end.\r\n\t\t\tif ( entry.min === undefined || entry.max === undefined ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): Missing 'min' or 'max' in 'range'.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Catch equal start or end.\r\n\t\t\tif ( entry.min === entry.max ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'range' 'min' and 'max' cannot be equal.\");\r\n\t\t\t}\r\n\t\r\n\t\t\tparsed.spectrum = new Spectrum(entry, parsed.snap, parsed.dir, parsed.singleStep);\r\n\t\t}\r\n\t\r\n\t\tfunction testStart ( parsed, entry ) {\r\n\t\r\n\t\t\tentry = asArray(entry);\r\n\t\r\n\t\t\t// Validate input. Values aren't tested, as the public .val method\r\n\t\t\t// will always provide a valid location.\r\n\t\t\tif ( !Array.isArray( entry ) || !entry.length ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'start' option is incorrect.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Store the number of handles.\r\n\t\t\tparsed.handles = entry.length;\r\n\t\r\n\t\t\t// When the slider is initialized, the .val method will\r\n\t\t\t// be called with the start options.\r\n\t\t\tparsed.start = entry;\r\n\t\t}\r\n\t\r\n\t\tfunction testSnap ( parsed, entry ) {\r\n\t\r\n\t\t\t// Enforce 100% stepping within subranges.\r\n\t\t\tparsed.snap = entry;\r\n\t\r\n\t\t\tif ( typeof entry !== 'boolean' ){\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'snap' option must be a boolean.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testAnimate ( parsed, entry ) {\r\n\t\r\n\t\t\t// Enforce 100% stepping within subranges.\r\n\t\t\tparsed.animate = entry;\r\n\t\r\n\t\t\tif ( typeof entry !== 'boolean' ){\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'animate' option must be a boolean.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testAnimationDuration ( parsed, entry ) {\r\n\t\r\n\t\t\tparsed.animationDuration = entry;\r\n\t\r\n\t\t\tif ( typeof entry !== 'number' ){\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'animationDuration' option must be a number.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testConnect ( parsed, entry ) {\r\n\t\r\n\t\t\tvar connect = [false];\r\n\t\t\tvar i;\r\n\t\r\n\t\t\t// Map legacy options\r\n\t\t\tif ( entry === 'lower' ) {\r\n\t\t\t\tentry = [true, false];\r\n\t\t\t}\r\n\t\r\n\t\t\telse if ( entry === 'upper' ) {\r\n\t\t\t\tentry = [false, true];\r\n\t\t\t}\r\n\t\r\n\t\t\t// Handle boolean options\r\n\t\t\tif ( entry === true || entry === false ) {\r\n\t\r\n\t\t\t\tfor ( i = 1; i < parsed.handles; i++ ) {\r\n\t\t\t\t\tconnect.push(entry);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tconnect.push(false);\r\n\t\t\t}\r\n\t\r\n\t\t\t// Reject invalid input\r\n\t\t\telse if ( !Array.isArray( entry ) || !entry.length || entry.length !== parsed.handles + 1 ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'connect' option doesn't match handle count.\");\r\n\t\t\t}\r\n\t\r\n\t\t\telse {\r\n\t\t\t\tconnect = entry;\r\n\t\t\t}\r\n\t\r\n\t\t\tparsed.connect = connect;\r\n\t\t}\r\n\t\r\n\t\tfunction testOrientation ( parsed, entry ) {\r\n\t\r\n\t\t\t// Set orientation to an a numerical value for easy\r\n\t\t\t// array selection.\r\n\t\t\tswitch ( entry ){\r\n\t\t\t case 'horizontal':\r\n\t\t\t\tparsed.ort = 0;\r\n\t\t\t\tbreak;\r\n\t\t\t case 'vertical':\r\n\t\t\t\tparsed.ort = 1;\r\n\t\t\t\tbreak;\r\n\t\t\t default:\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'orientation' option is invalid.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testMargin ( parsed, entry ) {\r\n\t\r\n\t\t\tif ( !isNumeric(entry) ){\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'margin' option must be numeric.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Issue #582\r\n\t\t\tif ( entry === 0 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\r\n\t\t\tparsed.margin = parsed.spectrum.getMargin(entry);\r\n\t\r\n\t\t\tif ( !parsed.margin ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'margin' option is only supported on linear sliders.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testLimit ( parsed, entry ) {\r\n\t\r\n\t\t\tif ( !isNumeric(entry) ){\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'limit' option must be numeric.\");\r\n\t\t\t}\r\n\t\r\n\t\t\tparsed.limit = parsed.spectrum.getMargin(entry);\r\n\t\r\n\t\t\tif ( !parsed.limit || parsed.handles < 2 ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'limit' option is only supported on linear sliders with 2 or more handles.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testPadding ( parsed, entry ) {\r\n\t\r\n\t\t\tif ( !isNumeric(entry) ){\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be numeric.\");\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( entry === 0 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\r\n\t\t\tparsed.padding = parsed.spectrum.getMargin(entry);\r\n\t\r\n\t\t\tif ( !parsed.padding ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option is only supported on linear sliders.\");\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( parsed.padding < 0 ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be a positive number.\");\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( parsed.padding >= 50 ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be less than half the range.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testDirection ( parsed, entry ) {\r\n\t\r\n\t\t\t// Set direction as a numerical value for easy parsing.\r\n\t\t\t// Invert connection for RTL sliders, so that the proper\r\n\t\t\t// handles get the connect/background classes.\r\n\t\t\tswitch ( entry ) {\r\n\t\t\t case 'ltr':\r\n\t\t\t\tparsed.dir = 0;\r\n\t\t\t\tbreak;\r\n\t\t\t case 'rtl':\r\n\t\t\t\tparsed.dir = 1;\r\n\t\t\t\tbreak;\r\n\t\t\t default:\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'direction' option was not recognized.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testBehaviour ( parsed, entry ) {\r\n\t\r\n\t\t\t// Make sure the input is a string.\r\n\t\t\tif ( typeof entry !== 'string' ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'behaviour' must be a string containing options.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Check if the string contains any keywords.\r\n\t\t\t// None are required.\r\n\t\t\tvar tap = entry.indexOf('tap') >= 0;\r\n\t\t\tvar drag = entry.indexOf('drag') >= 0;\r\n\t\t\tvar fixed = entry.indexOf('fixed') >= 0;\r\n\t\t\tvar snap = entry.indexOf('snap') >= 0;\r\n\t\t\tvar hover = entry.indexOf('hover') >= 0;\r\n\t\r\n\t\t\tif ( fixed ) {\r\n\t\r\n\t\t\t\tif ( parsed.handles !== 2 ) {\r\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'fixed' behaviour must be used with 2 handles\");\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Use margin to enforce fixed state\r\n\t\t\t\ttestMargin(parsed, parsed.start[1] - parsed.start[0]);\r\n\t\t\t}\r\n\t\r\n\t\t\tparsed.events = {\r\n\t\t\t\ttap: tap || snap,\r\n\t\t\t\tdrag: drag,\r\n\t\t\t\tfixed: fixed,\r\n\t\t\t\tsnap: snap,\r\n\t\t\t\thover: hover\r\n\t\t\t};\r\n\t\t}\r\n\t\r\n\t\tfunction testTooltips ( parsed, entry ) {\r\n\t\r\n\t\t\tif ( entry === false ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\r\n\t\t\telse if ( entry === true ) {\r\n\t\r\n\t\t\t\tparsed.tooltips = [];\r\n\t\r\n\t\t\t\tfor ( var i = 0; i < parsed.handles; i++ ) {\r\n\t\t\t\t\tparsed.tooltips.push(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\telse {\r\n\t\r\n\t\t\t\tparsed.tooltips = asArray(entry);\r\n\t\r\n\t\t\t\tif ( parsed.tooltips.length !== parsed.handles ) {\r\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): must pass a formatter for all handles.\");\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tparsed.tooltips.forEach(function(formatter){\r\n\t\t\t\t\tif ( typeof formatter !== 'boolean' && (typeof formatter !== 'object' || typeof formatter.to !== 'function') ) {\r\n\t\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'tooltips' must be passed a formatter or 'false'.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testFormat ( parsed, entry ) {\r\n\t\r\n\t\t\tparsed.format = entry;\r\n\t\r\n\t\t\t// Any object with a to and from method is supported.\r\n\t\t\tif ( typeof entry.to === 'function' && typeof entry.from === 'function' ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\r\n\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'format' requires 'to' and 'from' methods.\");\r\n\t\t}\r\n\t\r\n\t\tfunction testCssPrefix ( parsed, entry ) {\r\n\t\r\n\t\t\tif ( entry !== undefined && typeof entry !== 'string' && entry !== false ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'cssPrefix' must be a string or `false`.\");\r\n\t\t\t}\r\n\t\r\n\t\t\tparsed.cssPrefix = entry;\r\n\t\t}\r\n\t\r\n\t\tfunction testCssClasses ( parsed, entry ) {\r\n\t\r\n\t\t\tif ( entry !== undefined && typeof entry !== 'object' ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'cssClasses' must be an object.\");\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( typeof parsed.cssPrefix === 'string' ) {\r\n\t\t\t\tparsed.cssClasses = {};\r\n\t\r\n\t\t\t\tfor ( var key in entry ) {\r\n\t\t\t\t\tif ( !entry.hasOwnProperty(key) ) { continue; }\r\n\t\r\n\t\t\t\t\tparsed.cssClasses[key] = parsed.cssPrefix + entry[key];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tparsed.cssClasses = entry;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction testUseRaf ( parsed, entry ) {\r\n\t\t\tif ( entry === true || entry === false ) {\r\n\t\t\t\tparsed.useRequestAnimationFrame = entry;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'useRequestAnimationFrame' option should be true (default) or false.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Test all developer settings and parse to assumption-safe values.\r\n\t\tfunction testOptions ( options ) {\r\n\t\r\n\t\t\t// To prove a fix for #537, freeze options here.\r\n\t\t\t// If the object is modified, an error will be thrown.\r\n\t\t\t// Object.freeze(options);\r\n\t\r\n\t\t\tvar parsed = {\r\n\t\t\t\tmargin: 0,\r\n\t\t\t\tlimit: 0,\r\n\t\t\t\tpadding: 0,\r\n\t\t\t\tanimate: true,\r\n\t\t\t\tanimationDuration: 300,\r\n\t\t\t\tformat: defaultFormatter\r\n\t\t\t};\r\n\t\r\n\t\t\t// Tests are executed in the order they are presented here.\r\n\t\t\tvar tests = {\r\n\t\t\t\t'step': { r: false, t: testStep },\r\n\t\t\t\t'start': { r: true, t: testStart },\r\n\t\t\t\t'connect': { r: true, t: testConnect },\r\n\t\t\t\t'direction': { r: true, t: testDirection },\r\n\t\t\t\t'snap': { r: false, t: testSnap },\r\n\t\t\t\t'animate': { r: false, t: testAnimate },\r\n\t\t\t\t'animationDuration': { r: false, t: testAnimationDuration },\r\n\t\t\t\t'range': { r: true, t: testRange },\r\n\t\t\t\t'orientation': { r: false, t: testOrientation },\r\n\t\t\t\t'margin': { r: false, t: testMargin },\r\n\t\t\t\t'limit': { r: false, t: testLimit },\r\n\t\t\t\t'padding': { r: false, t: testPadding },\r\n\t\t\t\t'behaviour': { r: true, t: testBehaviour },\r\n\t\t\t\t'format': { r: false, t: testFormat },\r\n\t\t\t\t'tooltips': { r: false, t: testTooltips },\r\n\t\t\t\t'cssPrefix': { r: false, t: testCssPrefix },\r\n\t\t\t\t'cssClasses': { r: false, t: testCssClasses },\r\n\t\t\t\t'useRequestAnimationFrame': { r: false, t: testUseRaf }\r\n\t\t\t};\r\n\t\r\n\t\t\tvar defaults = {\r\n\t\t\t\t'connect': false,\r\n\t\t\t\t'direction': 'ltr',\r\n\t\t\t\t'behaviour': 'tap',\r\n\t\t\t\t'orientation': 'horizontal',\r\n\t\t\t\t'cssPrefix' : 'noUi-',\r\n\t\t\t\t'cssClasses': {\r\n\t\t\t\t\ttarget: 'target',\r\n\t\t\t\t\tbase: 'base',\r\n\t\t\t\t\torigin: 'origin',\r\n\t\t\t\t\thandle: 'handle',\r\n\t\t\t\t\thandleLower: 'handle-lower',\r\n\t\t\t\t\thandleUpper: 'handle-upper',\r\n\t\t\t\t\thorizontal: 'horizontal',\r\n\t\t\t\t\tvertical: 'vertical',\r\n\t\t\t\t\tbackground: 'background',\r\n\t\t\t\t\tconnect: 'connect',\r\n\t\t\t\t\tltr: 'ltr',\r\n\t\t\t\t\trtl: 'rtl',\r\n\t\t\t\t\tdraggable: 'draggable',\r\n\t\t\t\t\tdrag: 'state-drag',\r\n\t\t\t\t\ttap: 'state-tap',\r\n\t\t\t\t\tactive: 'active',\r\n\t\t\t\t\ttooltip: 'tooltip',\r\n\t\t\t\t\tpips: 'pips',\r\n\t\t\t\t\tpipsHorizontal: 'pips-horizontal',\r\n\t\t\t\t\tpipsVertical: 'pips-vertical',\r\n\t\t\t\t\tmarker: 'marker',\r\n\t\t\t\t\tmarkerHorizontal: 'marker-horizontal',\r\n\t\t\t\t\tmarkerVertical: 'marker-vertical',\r\n\t\t\t\t\tmarkerNormal: 'marker-normal',\r\n\t\t\t\t\tmarkerLarge: 'marker-large',\r\n\t\t\t\t\tmarkerSub: 'marker-sub',\r\n\t\t\t\t\tvalue: 'value',\r\n\t\t\t\t\tvalueHorizontal: 'value-horizontal',\r\n\t\t\t\t\tvalueVertical: 'value-vertical',\r\n\t\t\t\t\tvalueNormal: 'value-normal',\r\n\t\t\t\t\tvalueLarge: 'value-large',\r\n\t\t\t\t\tvalueSub: 'value-sub'\r\n\t\t\t\t},\r\n\t\t\t\t'useRequestAnimationFrame': true\r\n\t\t\t};\r\n\t\r\n\t\t\t// Run all options through a testing mechanism to ensure correct\r\n\t\t\t// input. It should be noted that options might get modified to\r\n\t\t\t// be handled properly. E.g. wrapping integers in arrays.\r\n\t\t\tObject.keys(tests).forEach(function( name ){\r\n\t\r\n\t\t\t\t// If the option isn't set, but it is required, throw an error.\r\n\t\t\t\tif ( options[name] === undefined && defaults[name] === undefined ) {\r\n\t\r\n\t\t\t\t\tif ( tests[name].r ) {\r\n\t\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\ttests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] );\r\n\t\t\t});\r\n\t\r\n\t\t\t// Forward pips options\r\n\t\t\tparsed.pips = options.pips;\r\n\t\r\n\t\t\tvar styles = [['left', 'top'], ['right', 'bottom']];\r\n\t\r\n\t\t\t// Pre-define the styles.\r\n\t\t\tparsed.style = styles[parsed.dir][parsed.ort];\r\n\t\t\tparsed.styleOposite = styles[parsed.dir?0:1][parsed.ort];\r\n\t\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t\r\n\t\r\n\tfunction closure ( target, options, originalOptions ){\r\n\t\r\n\t\tvar actions = getActions( );\r\n\t\r\n\t\t// All variables local to 'closure' are prefixed with 'scope_'\r\n\t\tvar scope_Target = target;\r\n\t\tvar scope_Locations = [];\r\n\t\tvar scope_Base;\r\n\t\tvar scope_Handles;\r\n\t\tvar scope_HandleNumbers = [];\r\n\t\tvar scope_ActiveHandle = false;\r\n\t\tvar scope_Connects;\r\n\t\tvar scope_Spectrum = options.spectrum;\r\n\t\tvar scope_Values = [];\r\n\t\tvar scope_Events = {};\r\n\t\tvar scope_Self;\r\n\t\r\n\t\r\n\t\t// Append a origin to the base\r\n\t\tfunction addOrigin ( base, handleNumber ) {\r\n\t\r\n\t\t\tvar origin = addNodeTo(base, options.cssClasses.origin);\r\n\t\t\tvar handle = addNodeTo(origin, options.cssClasses.handle);\r\n\t\r\n\t\t\thandle.setAttribute('data-handle', handleNumber);\r\n\t\r\n\t\t\tif ( handleNumber === 0 ) {\r\n\t\t\t\taddClass(handle, options.cssClasses.handleLower);\r\n\t\t\t}\r\n\t\r\n\t\t\telse if ( handleNumber === options.handles - 1 ) {\r\n\t\t\t\taddClass(handle, options.cssClasses.handleUpper);\r\n\t\t\t}\r\n\t\r\n\t\t\treturn origin;\r\n\t\t}\r\n\t\r\n\t\t// Insert nodes for connect elements\r\n\t\tfunction addConnect ( base, add ) {\r\n\t\r\n\t\t\tif ( !add ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\treturn addNodeTo(base, options.cssClasses.connect);\r\n\t\t}\r\n\t\r\n\t\t// Add handles to the slider base.\r\n\t\tfunction addElements ( connectOptions, base ) {\r\n\t\r\n\t\t\tscope_Handles = [];\r\n\t\t\tscope_Connects = [];\r\n\t\r\n\t\t\tscope_Connects.push(addConnect(base, connectOptions[0]));\r\n\t\r\n\t\t\t// [::::O====O====O====]\r\n\t\t\t// connectOptions = [0, 1, 1, 1]\r\n\t\r\n\t\t\tfor ( var i = 0; i < options.handles; i++ ) {\r\n\t\t\t\t// Keep a list of all added handles.\r\n\t\t\t\tscope_Handles.push(addOrigin(base, i));\r\n\t\t\t\tscope_HandleNumbers[i] = i;\r\n\t\t\t\tscope_Connects.push(addConnect(base, connectOptions[i + 1]));\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Initialize a single slider.\r\n\t\tfunction addSlider ( target ) {\r\n\t\r\n\t\t\t// Apply classes and data to the target.\r\n\t\t\taddClass(target, options.cssClasses.target);\r\n\t\r\n\t\t\tif ( options.dir === 0 ) {\r\n\t\t\t\taddClass(target, options.cssClasses.ltr);\r\n\t\t\t} else {\r\n\t\t\t\taddClass(target, options.cssClasses.rtl);\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( options.ort === 0 ) {\r\n\t\t\t\taddClass(target, options.cssClasses.horizontal);\r\n\t\t\t} else {\r\n\t\t\t\taddClass(target, options.cssClasses.vertical);\r\n\t\t\t}\r\n\t\r\n\t\t\tscope_Base = addNodeTo(target, options.cssClasses.base);\r\n\t\t}\r\n\t\r\n\t\r\n\t\tfunction addTooltip ( handle, handleNumber ) {\r\n\t\r\n\t\t\tif ( !options.tooltips[handleNumber] ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\treturn addNodeTo(handle.firstChild, options.cssClasses.tooltip);\r\n\t\t}\r\n\t\r\n\t\t// The tooltips option is a shorthand for using the 'update' event.\r\n\t\tfunction tooltips ( ) {\r\n\t\r\n\t\t\t// Tooltips are added with options.tooltips in original order.\r\n\t\t\tvar tips = scope_Handles.map(addTooltip);\r\n\t\r\n\t\t\tbindEvent('update', function(values, handleNumber, unencoded) {\r\n\t\r\n\t\t\t\tif ( !tips[handleNumber] ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tvar formattedValue = values[handleNumber];\r\n\t\r\n\t\t\t\tif ( options.tooltips[handleNumber] !== true ) {\r\n\t\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\ttips[handleNumber].innerHTML = formattedValue;\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\r\n\t\tfunction getGroup ( mode, values, stepped ) {\r\n\t\r\n\t\t\t// Use the range.\r\n\t\t\tif ( mode === 'range' || mode === 'steps' ) {\r\n\t\t\t\treturn scope_Spectrum.xVal;\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( mode === 'count' ) {\r\n\t\r\n\t\t\t\tif ( !values ) {\r\n\t\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): 'values' required for mode 'count'.\");\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Divide 0 - 100 in 'count' parts.\r\n\t\t\t\tvar spread = ( 100 / (values - 1) );\r\n\t\t\t\tvar v;\r\n\t\t\t\tvar i = 0;\r\n\t\r\n\t\t\t\tvalues = [];\r\n\t\r\n\t\t\t\t// List these parts and have them handled as 'positions'.\r\n\t\t\t\twhile ( (v = i++ * spread) <= 100 ) {\r\n\t\t\t\t\tvalues.push(v);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tmode = 'positions';\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( mode === 'positions' ) {\r\n\t\r\n\t\t\t\t// Map all percentages to on-range values.\r\n\t\t\t\treturn values.map(function( value ){\r\n\t\t\t\t\treturn scope_Spectrum.fromStepping( stepped ? scope_Spectrum.getStep( value ) : value );\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( mode === 'values' ) {\r\n\t\r\n\t\t\t\t// If the value must be stepped, it needs to be converted to a percentage first.\r\n\t\t\t\tif ( stepped ) {\r\n\t\r\n\t\t\t\t\treturn values.map(function( value ){\r\n\t\r\n\t\t\t\t\t\t// Convert to percentage, apply step, return to value.\r\n\t\t\t\t\t\treturn scope_Spectrum.fromStepping( scope_Spectrum.getStep( scope_Spectrum.toStepping( value ) ) );\r\n\t\t\t\t\t});\r\n\t\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Otherwise, we can simply use the values.\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction generateSpread ( density, mode, group ) {\r\n\t\r\n\t\t\tfunction safeIncrement(value, increment) {\r\n\t\t\t\t// Avoid floating point variance by dropping the smallest decimal places.\r\n\t\t\t\treturn (value + increment).toFixed(7) / 1;\r\n\t\t\t}\r\n\t\r\n\t\t\tvar indexes = {};\r\n\t\t\tvar firstInRange = scope_Spectrum.xVal[0];\r\n\t\t\tvar lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length-1];\r\n\t\t\tvar ignoreFirst = false;\r\n\t\t\tvar ignoreLast = false;\r\n\t\t\tvar prevPct = 0;\r\n\t\r\n\t\t\t// Create a copy of the group, sort it and filter away all duplicates.\r\n\t\t\tgroup = unique(group.slice().sort(function(a, b){ return a - b; }));\r\n\t\r\n\t\t\t// Make sure the range starts with the first element.\r\n\t\t\tif ( group[0] !== firstInRange ) {\r\n\t\t\t\tgroup.unshift(firstInRange);\r\n\t\t\t\tignoreFirst = true;\r\n\t\t\t}\r\n\t\r\n\t\t\t// Likewise for the last one.\r\n\t\t\tif ( group[group.length - 1] !== lastInRange ) {\r\n\t\t\t\tgroup.push(lastInRange);\r\n\t\t\t\tignoreLast = true;\r\n\t\t\t}\r\n\t\r\n\t\t\tgroup.forEach(function ( current, index ) {\r\n\t\r\n\t\t\t\t// Get the current step and the lower + upper positions.\r\n\t\t\t\tvar step;\r\n\t\t\t\tvar i;\r\n\t\t\t\tvar q;\r\n\t\t\t\tvar low = current;\r\n\t\t\t\tvar high = group[index+1];\r\n\t\t\t\tvar newPct;\r\n\t\t\t\tvar pctDifference;\r\n\t\t\t\tvar pctPos;\r\n\t\t\t\tvar type;\r\n\t\t\t\tvar steps;\r\n\t\t\t\tvar realSteps;\r\n\t\t\t\tvar stepsize;\r\n\t\r\n\t\t\t\t// When using 'steps' mode, use the provided steps.\r\n\t\t\t\t// Otherwise, we'll step on to the next subrange.\r\n\t\t\t\tif ( mode === 'steps' ) {\r\n\t\t\t\t\tstep = scope_Spectrum.xNumSteps[ index ];\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Default to a 'full' step.\r\n\t\t\t\tif ( !step ) {\r\n\t\t\t\t\tstep = high-low;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Low can be 0, so test for false. If high is undefined,\r\n\t\t\t\t// we are at the last subrange. Index 0 is already handled.\r\n\t\t\t\tif ( low === false || high === undefined ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Make sure step isn't 0, which would cause an infinite loop (#654)\r\n\t\t\t\tstep = Math.max(step, 0.0000001);\r\n\t\r\n\t\t\t\t// Find all steps in the subrange.\r\n\t\t\t\tfor ( i = low; i <= high; i = safeIncrement(i, step) ) {\r\n\t\r\n\t\t\t\t\t// Get the percentage value for the current step,\r\n\t\t\t\t\t// calculate the size for the subrange.\r\n\t\t\t\t\tnewPct = scope_Spectrum.toStepping( i );\r\n\t\t\t\t\tpctDifference = newPct - prevPct;\r\n\t\r\n\t\t\t\t\tsteps = pctDifference / density;\r\n\t\t\t\t\trealSteps = Math.round(steps);\r\n\t\r\n\t\t\t\t\t// This ratio represents the ammount of percentage-space a point indicates.\r\n\t\t\t\t\t// For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-devided.\r\n\t\t\t\t\t// Round the percentage offset to an even number, then divide by two\r\n\t\t\t\t\t// to spread the offset on both sides of the range.\r\n\t\t\t\t\tstepsize = pctDifference/realSteps;\r\n\t\r\n\t\t\t\t\t// Divide all points evenly, adding the correct number to this subrange.\r\n\t\t\t\t\t// Run up to <= so that 100% gets a point, event if ignoreLast is set.\r\n\t\t\t\t\tfor ( q = 1; q <= realSteps; q += 1 ) {\r\n\t\r\n\t\t\t\t\t\t// The ratio between the rounded value and the actual size might be ~1% off.\r\n\t\t\t\t\t\t// Correct the percentage offset by the number of points\r\n\t\t\t\t\t\t// per subrange. density = 1 will result in 100 points on the\r\n\t\t\t\t\t\t// full range, 2 for 50, 4 for 25, etc.\r\n\t\t\t\t\t\tpctPos = prevPct + ( q * stepsize );\r\n\t\t\t\t\t\tindexes[pctPos.toFixed(5)] = ['x', 0];\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t// Determine the point type.\r\n\t\t\t\t\ttype = (group.indexOf(i) > -1) ? 1 : ( mode === 'steps' ? 2 : 0 );\r\n\t\r\n\t\t\t\t\t// Enforce the 'ignoreFirst' option by overwriting the type for 0.\r\n\t\t\t\t\tif ( !index && ignoreFirst ) {\r\n\t\t\t\t\t\ttype = 0;\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif ( !(i === high && ignoreLast)) {\r\n\t\t\t\t\t\t// Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.\r\n\t\t\t\t\t\tindexes[newPct.toFixed(5)] = [i, type];\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t// Update the percentage count.\r\n\t\t\t\t\tprevPct = newPct;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\r\n\t\t\treturn indexes;\r\n\t\t}\r\n\t\r\n\t\tfunction addMarking ( spread, filterFunc, formatter ) {\r\n\t\r\n\t\t\tvar element = document.createElement('div');\r\n\t\t\tvar out = '';\r\n\t\t\tvar valueSizeClasses = [\r\n\t\t\t\toptions.cssClasses.valueNormal,\r\n\t\t\t\toptions.cssClasses.valueLarge,\r\n\t\t\t\toptions.cssClasses.valueSub\r\n\t\t\t];\r\n\t\t\tvar markerSizeClasses = [\r\n\t\t\t\toptions.cssClasses.markerNormal,\r\n\t\t\t\toptions.cssClasses.markerLarge,\r\n\t\t\t\toptions.cssClasses.markerSub\r\n\t\t\t];\r\n\t\t\tvar valueOrientationClasses = [\r\n\t\t\t\toptions.cssClasses.valueHorizontal,\r\n\t\t\t\toptions.cssClasses.valueVertical\r\n\t\t\t];\r\n\t\t\tvar markerOrientationClasses = [\r\n\t\t\t\toptions.cssClasses.markerHorizontal,\r\n\t\t\t\toptions.cssClasses.markerVertical\r\n\t\t\t];\r\n\t\r\n\t\t\taddClass(element, options.cssClasses.pips);\r\n\t\t\taddClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);\r\n\t\r\n\t\t\tfunction getClasses( type, source ){\r\n\t\t\t\tvar a = source === options.cssClasses.value;\r\n\t\t\t\tvar orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;\r\n\t\t\t\tvar sizeClasses = a ? valueSizeClasses : markerSizeClasses;\r\n\t\r\n\t\t\t\treturn source + ' ' + orientationClasses[options.ort] + ' ' + sizeClasses[type];\r\n\t\t\t}\r\n\t\r\n\t\t\tfunction getTags( offset, source, values ) {\r\n\t\t\t\treturn 'class=\"' + getClasses(values[1], source) + '\" style=\"' + options.style + ': ' + offset + '%\"';\r\n\t\t\t}\r\n\t\r\n\t\t\tfunction addSpread ( offset, values ){\r\n\t\r\n\t\t\t\t// Apply the filter function, if it is set.\r\n\t\t\t\tvalues[1] = (values[1] && filterFunc) ? filterFunc(values[0], values[1]) : values[1];\r\n\t\r\n\t\t\t\t// Add a marker for every point\r\n\t\t\t\tout += '';\r\n\t\r\n\t\t\t\t// Values are only appended for points marked '1' or '2'.\r\n\t\t\t\tif ( values[1] ) {\r\n\t\t\t\t\tout += '' + formatter.to(values[0]) + '
';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t// Append all points.\r\n\t\t\tObject.keys(spread).forEach(function(a){\r\n\t\t\t\taddSpread(a, spread[a]);\r\n\t\t\t});\r\n\t\r\n\t\t\telement.innerHTML = out;\r\n\t\r\n\t\t\treturn element;\r\n\t\t}\r\n\t\r\n\t\tfunction pips ( grid ) {\r\n\t\r\n\t\t\tvar mode = grid.mode;\r\n\t\t\tvar density = grid.density || 1;\r\n\t\t\tvar filter = grid.filter || false;\r\n\t\t\tvar values = grid.values || false;\r\n\t\t\tvar stepped = grid.stepped || false;\r\n\t\t\tvar group = getGroup( mode, values, stepped );\r\n\t\t\tvar spread = generateSpread( density, mode, group );\r\n\t\t\tvar format = grid.format || {\r\n\t\t\t\tto: Math.round\r\n\t\t\t};\r\n\t\r\n\t\t\treturn scope_Target.appendChild(addMarking(\r\n\t\t\t\tspread,\r\n\t\t\t\tfilter,\r\n\t\t\t\tformat\r\n\t\t\t));\r\n\t\t}\r\n\t\r\n\t\r\n\t\t// Shorthand for base dimensions.\r\n\t\tfunction baseSize ( ) {\r\n\t\t\tvar rect = scope_Base.getBoundingClientRect(), alt = 'offset' + ['Width', 'Height'][options.ort];\r\n\t\t\treturn options.ort === 0 ? (rect.width||scope_Base[alt]) : (rect.height||scope_Base[alt]);\r\n\t\t}\r\n\t\r\n\t\t// Handler for attaching events trough a proxy.\r\n\t\tfunction attachEvent ( events, element, callback, data ) {\r\n\t\r\n\t\t\t// This function can be used to 'filter' events to the slider.\r\n\t\t\t// element is a node, not a nodeList\r\n\t\r\n\t\t\tvar method = function ( e ){\r\n\t\r\n\t\t\t\tif ( scope_Target.hasAttribute('disabled') ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Stop if an active 'tap' transition is taking place.\r\n\t\t\t\tif ( hasClass(scope_Target, options.cssClasses.tap) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\te = fixEvent(e, data.pageOffset);\r\n\t\r\n\t\t\t\t// Handle reject of multitouch\r\n\t\t\t\tif ( !e ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Ignore right or middle clicks on start #454\r\n\t\t\t\tif ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Ignore right or middle clicks on start #454\r\n\t\t\t\tif ( data.hover && e.buttons ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\te.calcPoint = e.points[ options.ort ];\r\n\t\r\n\t\t\t\t// Call the event handler with the event [ and additional data ].\r\n\t\t\t\tcallback ( e, data );\r\n\t\t\t};\r\n\t\r\n\t\t\tvar methods = [];\r\n\t\r\n\t\t\t// Bind a closure on the target for every event type.\r\n\t\t\tevents.split(' ').forEach(function( eventName ){\r\n\t\t\t\telement.addEventListener(eventName, method, false);\r\n\t\t\t\tmethods.push([eventName, method]);\r\n\t\t\t});\r\n\t\r\n\t\t\treturn methods;\r\n\t\t}\r\n\t\r\n\t\t// Provide a clean event with standardized offset values.\r\n\t\tfunction fixEvent ( e, pageOffset ) {\r\n\t\r\n\t\t\t// Prevent scrolling and panning on touch events, while\r\n\t\t\t// attempting to slide. The tap event also depends on this.\r\n\t\t\te.preventDefault();\r\n\t\r\n\t\t\t// Filter the event to register the type, which can be\r\n\t\t\t// touch, mouse or pointer. Offset changes need to be\r\n\t\t\t// made on an event specific basis.\r\n\t\t\tvar touch = e.type.indexOf('touch') === 0;\r\n\t\t\tvar mouse = e.type.indexOf('mouse') === 0;\r\n\t\t\tvar pointer = e.type.indexOf('pointer') === 0;\r\n\t\t\tvar x;\r\n\t\t\tvar y;\r\n\t\r\n\t\t\t// IE10 implemented pointer events with a prefix;\r\n\t\t\tif ( e.type.indexOf('MSPointer') === 0 ) {\r\n\t\t\t\tpointer = true;\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( touch ) {\r\n\t\r\n\t\t\t\t// Fix bug when user touches with two or more fingers on mobile devices.\r\n\t\t\t\t// It's useful when you have two or more sliders on one page,\r\n\t\t\t\t// that can be touched simultaneously.\r\n\t\t\t\t// #649, #663, #668\r\n\t\t\t\tif ( e.touches.length > 1 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// noUiSlider supports one movement at a time,\r\n\t\t\t\t// so we can select the first 'changedTouch'.\r\n\t\t\t\tx = e.changedTouches[0].pageX;\r\n\t\t\t\ty = e.changedTouches[0].pageY;\r\n\t\t\t}\r\n\t\r\n\t\t\tpageOffset = pageOffset || getPageOffset();\r\n\t\r\n\t\t\tif ( mouse || pointer ) {\r\n\t\t\t\tx = e.clientX + pageOffset.x;\r\n\t\t\t\ty = e.clientY + pageOffset.y;\r\n\t\t\t}\r\n\t\r\n\t\t\te.pageOffset = pageOffset;\r\n\t\t\te.points = [x, y];\r\n\t\t\te.cursor = mouse || pointer; // Fix #435\r\n\t\r\n\t\t\treturn e;\r\n\t\t}\r\n\t\r\n\t\t// Translate a coordinate in the document to a percentage on the slider\r\n\t\tfunction calcPointToPercentage ( calcPoint ) {\r\n\t\t\tvar location = calcPoint - offset(scope_Base, options.ort);\r\n\t\t\tvar proposal = ( location * 100 ) / baseSize();\r\n\t\t\treturn options.dir ? 100 - proposal : proposal;\r\n\t\t}\r\n\t\r\n\t\t// Find handle closest to a certain percentage on the slider\r\n\t\tfunction getClosestHandle ( proposal ) {\r\n\t\r\n\t\t\tvar closest = 100;\r\n\t\t\tvar handleNumber = false;\r\n\t\r\n\t\t\tscope_Handles.forEach(function(handle, index){\r\n\t\r\n\t\t\t\t// Disabled handles are ignored\r\n\t\t\t\tif ( handle.hasAttribute('disabled') ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tvar pos = Math.abs(scope_Locations[index] - proposal);\r\n\t\r\n\t\t\t\tif ( pos < closest ) {\r\n\t\t\t\t\thandleNumber = index;\r\n\t\t\t\t\tclosest = pos;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\r\n\t\t\treturn handleNumber;\r\n\t\t}\r\n\t\r\n\t\t// Moves handle(s) by a percentage\r\n\t\t// (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\r\n\t\tfunction moveHandles ( upward, proposal, locations, handleNumbers ) {\r\n\t\r\n\t\t\tvar proposals = locations.slice();\r\n\t\r\n\t\t\tvar b = [!upward, upward];\r\n\t\t\tvar f = [upward, !upward];\r\n\t\r\n\t\t\t// Copy handleNumbers so we don't change the dataset\r\n\t\t\thandleNumbers = handleNumbers.slice();\r\n\t\r\n\t\t\t// Check to see which handle is 'leading'.\r\n\t\t\t// If that one can't move the second can't either.\r\n\t\t\tif ( upward ) {\r\n\t\t\t\thandleNumbers.reverse();\r\n\t\t\t}\r\n\t\r\n\t\t\t// Step 1: get the maximum percentage that any of the handles can move\r\n\t\t\tif ( handleNumbers.length > 1 ) {\r\n\t\r\n\t\t\t\thandleNumbers.forEach(function(handleNumber, o) {\r\n\t\r\n\t\t\t\t\tvar to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o]);\r\n\t\r\n\t\t\t\t\t// Stop if one of the handles can't move.\r\n\t\t\t\t\tif ( to === false ) {\r\n\t\t\t\t\t\tproposal = 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tproposal = to - proposals[handleNumber];\r\n\t\t\t\t\t\tproposals[handleNumber] = to;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\r\n\t\t\t// If using one handle, check backward AND forward\r\n\t\t\telse {\r\n\t\t\t\tb = f = [true];\r\n\t\t\t}\r\n\t\r\n\t\t\tvar state = false;\r\n\t\r\n\t\t\t// Step 2: Try to set the handles with the found percentage\r\n\t\t\thandleNumbers.forEach(function(handleNumber, o) {\r\n\t\t\t\tstate = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;\r\n\t\t\t});\r\n\t\r\n\t\t\t// Step 3: If a handle moved, fire events\r\n\t\t\tif ( state ) {\r\n\t\t\t\thandleNumbers.forEach(function(handleNumber){\r\n\t\t\t\t\tfireEvent('update', handleNumber);\r\n\t\t\t\t\tfireEvent('slide', handleNumber);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// External event handling\r\n\t\tfunction fireEvent ( eventName, handleNumber, tap ) {\r\n\t\r\n\t\t\tObject.keys(scope_Events).forEach(function( targetEvent ) {\r\n\t\r\n\t\t\t\tvar eventType = targetEvent.split('.')[0];\r\n\t\r\n\t\t\t\tif ( eventName === eventType ) {\r\n\t\t\t\t\tscope_Events[targetEvent].forEach(function( callback ) {\r\n\t\r\n\t\t\t\t\t\tcallback.call(\r\n\t\t\t\t\t\t\t// Use the slider public API as the scope ('this')\r\n\t\t\t\t\t\t\tscope_Self,\r\n\t\t\t\t\t\t\t// Return values as array, so arg_1[arg_2] is always valid.\r\n\t\t\t\t\t\t\tscope_Values.map(options.format.to),\r\n\t\t\t\t\t\t\t// Handle index, 0 or 1\r\n\t\t\t\t\t\t\thandleNumber,\r\n\t\t\t\t\t\t\t// Unformatted slider values\r\n\t\t\t\t\t\t\tscope_Values.slice(),\r\n\t\t\t\t\t\t\t// Event is fired by tap, true or false\r\n\t\t\t\t\t\t\ttap || false,\r\n\t\t\t\t\t\t\t// Left offset of the handle, in relation to the slider\r\n\t\t\t\t\t\t\tscope_Locations.slice()\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\r\n\t\t// Fire 'end' when a mouse or pen leaves the document.\r\n\t\tfunction documentLeave ( event, data ) {\r\n\t\t\tif ( event.type === \"mouseout\" && event.target.nodeName === \"HTML\" && event.relatedTarget === null ){\r\n\t\t\t\teventEnd (event, data);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Handle movement on document for handle and range drag.\r\n\t\tfunction eventMove ( event, data ) {\r\n\t\r\n\t\t\t// Fix #498\r\n\t\t\t// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\r\n\t\t\t// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\r\n\t\t\t// IE9 has .buttons and .which zero on mousemove.\r\n\t\t\t// Firefox breaks the spec MDN defines.\r\n\t\t\tif ( navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) {\r\n\t\t\t\treturn eventEnd(event, data);\r\n\t\t\t}\r\n\t\r\n\t\t\t// Check if we are moving up or down\r\n\t\t\tvar movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\r\n\t\r\n\t\t\t// Convert the movement into a percentage of the slider width/height\r\n\t\t\tvar proposal = (movement * 100) / data.baseSize;\r\n\t\r\n\t\t\tmoveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\r\n\t\t}\r\n\t\r\n\t\t// Unbind move events on document, call callbacks.\r\n\t\tfunction eventEnd ( event, data ) {\r\n\t\r\n\t\t\t// The handle is no longer active, so remove the class.\r\n\t\t\tif ( scope_ActiveHandle ) {\r\n\t\t\t\tremoveClass(scope_ActiveHandle, options.cssClasses.active);\r\n\t\t\t\tscope_ActiveHandle = false;\r\n\t\t\t}\r\n\t\r\n\t\t\t// Remove cursor styles and text-selection events bound to the body.\r\n\t\t\tif ( event.cursor ) {\r\n\t\t\t\tdocument.body.style.cursor = '';\r\n\t\t\t\tdocument.body.removeEventListener('selectstart', document.body.noUiListener);\r\n\t\t\t}\r\n\t\r\n\t\t\t// Unbind the move and end events, which are added on 'start'.\r\n\t\t\tdocument.documentElement.noUiListeners.forEach(function( c ) {\r\n\t\t\t\tdocument.documentElement.removeEventListener(c[0], c[1]);\r\n\t\t\t});\r\n\t\r\n\t\t\t// Remove dragging class.\r\n\t\t\tremoveClass(scope_Target, options.cssClasses.drag);\r\n\t\r\n\t\t\tsetZindex();\r\n\t\r\n\t\t\tdata.handleNumbers.forEach(function(handleNumber){\r\n\t\t\t\tfireEvent('set', handleNumber);\r\n\t\t\t\tfireEvent('change', handleNumber);\r\n\t\t\t\tfireEvent('end', handleNumber);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\t// Bind move events on document.\r\n\t\tfunction eventStart ( event, data ) {\r\n\t\r\n\t\t\tif ( data.handleNumbers.length === 1 ) {\r\n\t\r\n\t\t\t\tvar handle = scope_Handles[data.handleNumbers[0]];\r\n\t\r\n\t\t\t\t// Ignore 'disabled' handles\r\n\t\t\t\tif ( handle.hasAttribute('disabled') ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// Mark the handle as 'active' so it can be styled.\r\n\t\t\t\tscope_ActiveHandle = handle.children[0];\r\n\t\t\t\taddClass(scope_ActiveHandle, options.cssClasses.active);\r\n\t\t\t}\r\n\t\r\n\t\t\t// Fix #551, where a handle gets selected instead of dragged.\r\n\t\t\tevent.preventDefault();\r\n\t\r\n\t\t\t// A drag should never propagate up to the 'tap' event.\r\n\t\t\tevent.stopPropagation();\r\n\t\r\n\t\t\t// Attach the move and end events.\r\n\t\t\tvar moveEvent = attachEvent(actions.move, document.documentElement, eventMove, {\r\n\t\t\t\tstartCalcPoint: event.calcPoint,\r\n\t\t\t\tbaseSize: baseSize(),\r\n\t\t\t\tpageOffset: event.pageOffset,\r\n\t\t\t\thandleNumbers: data.handleNumbers,\r\n\t\t\t\tbuttonsProperty: event.buttons,\r\n\t\t\t\tlocations: scope_Locations.slice()\r\n\t\t\t});\r\n\t\r\n\t\t\tvar endEvent = attachEvent(actions.end, document.documentElement, eventEnd, {\r\n\t\t\t\thandleNumbers: data.handleNumbers\r\n\t\t\t});\r\n\t\r\n\t\t\tvar outEvent = attachEvent(\"mouseout\", document.documentElement, documentLeave, {\r\n\t\t\t\thandleNumbers: data.handleNumbers\r\n\t\t\t});\r\n\t\r\n\t\t\tdocument.documentElement.noUiListeners = moveEvent.concat(endEvent, outEvent);\r\n\t\r\n\t\t\t// Text selection isn't an issue on touch devices,\r\n\t\t\t// so adding cursor styles can be skipped.\r\n\t\t\tif ( event.cursor ) {\r\n\t\r\n\t\t\t\t// Prevent the 'I' cursor and extend the range-drag cursor.\r\n\t\t\t\tdocument.body.style.cursor = getComputedStyle(event.target).cursor;\r\n\t\r\n\t\t\t\t// Mark the target with a dragging state.\r\n\t\t\t\tif ( scope_Handles.length > 1 ) {\r\n\t\t\t\t\taddClass(scope_Target, options.cssClasses.drag);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tvar f = function(){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t};\r\n\t\r\n\t\t\t\tdocument.body.noUiListener = f;\r\n\t\r\n\t\t\t\t// Prevent text selection when dragging the handles.\r\n\t\t\t\tdocument.body.addEventListener('selectstart', f, false);\r\n\t\t\t}\r\n\t\r\n\t\t\tdata.handleNumbers.forEach(function(handleNumber){\r\n\t\t\t\tfireEvent('start', handleNumber);\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\t// Move closest handle to tapped location.\r\n\t\tfunction eventTap ( event ) {\r\n\t\r\n\t\t\t// The tap event shouldn't propagate up\r\n\t\t\tevent.stopPropagation();\r\n\t\r\n\t\t\tvar proposal = calcPointToPercentage(event.calcPoint);\r\n\t\t\tvar handleNumber = getClosestHandle(proposal);\r\n\t\r\n\t\t\t// Tackle the case that all handles are 'disabled'.\r\n\t\t\tif ( handleNumber === false ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t// Flag the slider as it is now in a transitional state.\r\n\t\t\t// Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\r\n\t\t\tif ( !options.events.snap ) {\r\n\t\t\t\taddClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\r\n\t\t\t}\r\n\t\r\n\t\t\tsetHandle(handleNumber, proposal, true, true);\r\n\t\r\n\t\t\tsetZindex();\r\n\t\r\n\t\t\tfireEvent('slide', handleNumber, true);\r\n\t\t\tfireEvent('set', handleNumber, true);\r\n\t\t\tfireEvent('change', handleNumber, true);\r\n\t\t\tfireEvent('update', handleNumber, true);\r\n\t\r\n\t\t\tif ( options.events.snap ) {\r\n\t\t\t\teventStart(event, { handleNumbers: [handleNumber] });\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Fires a 'hover' event for a hovered mouse/pen position.\r\n\t\tfunction eventHover ( event ) {\r\n\t\r\n\t\t\tvar proposal = calcPointToPercentage(event.calcPoint);\r\n\t\r\n\t\t\tvar to = scope_Spectrum.getStep(proposal);\r\n\t\t\tvar value = scope_Spectrum.fromStepping(to);\r\n\t\r\n\t\t\tObject.keys(scope_Events).forEach(function( targetEvent ) {\r\n\t\t\t\tif ( 'hover' === targetEvent.split('.')[0] ) {\r\n\t\t\t\t\tscope_Events[targetEvent].forEach(function( callback ) {\r\n\t\t\t\t\t\tcallback.call( scope_Self, value );\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\t// Attach events to several slider parts.\r\n\t\tfunction bindSliderEvents ( behaviour ) {\r\n\t\r\n\t\t\t// Attach the standard drag event to the handles.\r\n\t\t\tif ( !behaviour.fixed ) {\r\n\t\r\n\t\t\t\tscope_Handles.forEach(function( handle, index ){\r\n\t\r\n\t\t\t\t\t// These events are only bound to the visual handle\r\n\t\t\t\t\t// element, not the 'real' origin element.\r\n\t\t\t\t\tattachEvent ( actions.start, handle.children[0], eventStart, {\r\n\t\t\t\t\t\thandleNumbers: [index]\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\r\n\t\t\t// Attach the tap event to the slider base.\r\n\t\t\tif ( behaviour.tap ) {\r\n\t\t\t\tattachEvent (actions.start, scope_Base, eventTap, {});\r\n\t\t\t}\r\n\t\r\n\t\t\t// Fire hover events\r\n\t\t\tif ( behaviour.hover ) {\r\n\t\t\t\tattachEvent (actions.move, scope_Base, eventHover, { hover: true });\r\n\t\t\t}\r\n\t\r\n\t\t\t// Make the range draggable.\r\n\t\t\tif ( behaviour.drag ){\r\n\t\r\n\t\t\t\tscope_Connects.forEach(function( connect, index ){\r\n\t\r\n\t\t\t\t\tif ( connect === false || index === 0 || index === scope_Connects.length - 1 ) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tvar handleBefore = scope_Handles[index - 1];\r\n\t\t\t\t\tvar handleAfter = scope_Handles[index];\r\n\t\t\t\t\tvar eventHolders = [connect];\r\n\t\r\n\t\t\t\t\taddClass(connect, options.cssClasses.draggable);\r\n\t\r\n\t\t\t\t\t// When the range is fixed, the entire range can\r\n\t\t\t\t\t// be dragged by the handles. The handle in the first\r\n\t\t\t\t\t// origin will propagate the start event upward,\r\n\t\t\t\t\t// but it needs to be bound manually on the other.\r\n\t\t\t\t\tif ( behaviour.fixed ) {\r\n\t\t\t\t\t\teventHolders.push(handleBefore.children[0]);\r\n\t\t\t\t\t\teventHolders.push(handleAfter.children[0]);\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\teventHolders.forEach(function( eventHolder ) {\r\n\t\t\t\t\t\tattachEvent ( actions.start, eventHolder, eventStart, {\r\n\t\t\t\t\t\t\thandles: [handleBefore, handleAfter],\r\n\t\t\t\t\t\t\thandleNumbers: [index - 1, index]\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\r\n\t\t// Split out the handle positioning logic so the Move event can use it, too\r\n\t\tfunction checkHandlePosition ( reference, handleNumber, to, lookBackward, lookForward ) {\r\n\t\r\n\t\t\t// For sliders with multiple handles, limit movement to the other handle.\r\n\t\t\t// Apply the margin option by adding it to the handle positions.\r\n\t\t\tif ( scope_Handles.length > 1 ) {\r\n\t\r\n\t\t\t\tif ( lookBackward && handleNumber > 0 ) {\r\n\t\t\t\t\tto = Math.max(to, reference[handleNumber - 1] + options.margin);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tif ( lookForward && handleNumber < scope_Handles.length - 1 ) {\r\n\t\t\t\t\tto = Math.min(to, reference[handleNumber + 1] - options.margin);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t// The limit option has the opposite effect, limiting handles to a\r\n\t\t\t// maximum distance from another. Limit must be > 0, as otherwise\r\n\t\t\t// handles would be unmoveable.\r\n\t\t\tif ( scope_Handles.length > 1 && options.limit ) {\r\n\t\r\n\t\t\t\tif ( lookBackward && handleNumber > 0 ) {\r\n\t\t\t\t\tto = Math.min(to, reference[handleNumber - 1] + options.limit);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tif ( lookForward && handleNumber < scope_Handles.length - 1 ) {\r\n\t\t\t\t\tto = Math.max(to, reference[handleNumber + 1] - options.limit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\t// The padding option keeps the handles a certain distance from the\r\n\t\t\t// edges of the slider. Padding must be > 0.\r\n\t\t\tif ( options.padding ) {\r\n\t\r\n\t\t\t\tif ( handleNumber === 0 ) {\r\n\t\t\t\t\tto = Math.max(to, options.padding);\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tif ( handleNumber === scope_Handles.length - 1 ) {\r\n\t\t\t\t\tto = Math.min(to, 100 - options.padding);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\tto = scope_Spectrum.getStep(to);\r\n\t\r\n\t\t\t// Limit percentage to the 0 - 100 range\r\n\t\t\tto = limit(to);\r\n\t\r\n\t\t\t// Return false if handle can't move\r\n\t\t\tif ( to === reference[handleNumber] ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\treturn to;\r\n\t\t}\r\n\t\r\n\t\tfunction toPct ( pct ) {\r\n\t\t\treturn pct + '%';\r\n\t\t}\r\n\t\r\n\t\t// Updates scope_Locations and scope_Values, updates visual state\r\n\t\tfunction updateHandlePosition ( handleNumber, to ) {\r\n\t\r\n\t\t\t// Update locations.\r\n\t\t\tscope_Locations[handleNumber] = to;\r\n\t\r\n\t\t\t// Convert the value to the slider stepping/range.\r\n\t\t\tscope_Values[handleNumber] = scope_Spectrum.fromStepping(to);\r\n\t\r\n\t\t\t// Called synchronously or on the next animationFrame\r\n\t\t\tvar stateUpdate = function() {\r\n\t\t\t\tscope_Handles[handleNumber].style[options.style] = toPct(to);\r\n\t\t\t\tupdateConnect(handleNumber);\r\n\t\t\t\tupdateConnect(handleNumber + 1);\r\n\t\t\t};\r\n\t\r\n\t\t\t// Set the handle to the new position.\r\n\t\t\t// Use requestAnimationFrame for efficient painting.\r\n\t\t\t// No significant effect in Chrome, Edge sees dramatic performace improvements.\r\n\t\t\t// Option to disable is useful for unit tests, and single-step debugging.\r\n\t\t\tif ( window.requestAnimationFrame && options.useRequestAnimationFrame ) {\r\n\t\t\t\twindow.requestAnimationFrame(stateUpdate);\r\n\t\t\t} else {\r\n\t\t\t\tstateUpdate();\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tfunction setZindex ( ) {\r\n\t\r\n\t\t\tscope_HandleNumbers.forEach(function(handleNumber){\r\n\t\t\t\t// Handles before the slider middle are stacked later = higher,\r\n\t\t\t\t// Handles after the middle later is lower\r\n\t\t\t\t// [[7] [8] .......... | .......... [5] [4]\r\n\t\t\t\tvar dir = (scope_Locations[handleNumber] > 50 ? -1 : 1);\r\n\t\t\t\tvar zIndex = 3 + (scope_Handles.length + (dir * handleNumber));\r\n\t\t\t\tscope_Handles[handleNumber].childNodes[0].style.zIndex = zIndex;\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\t// Test suggested values and apply margin, step.\r\n\t\tfunction setHandle ( handleNumber, to, lookBackward, lookForward ) {\r\n\t\r\n\t\t\tto = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward);\r\n\t\r\n\t\t\tif ( to === false ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\tupdateHandlePosition(handleNumber, to);\r\n\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\r\n\t\t// Updates style attribute for connect nodes\r\n\t\tfunction updateConnect ( index ) {\r\n\t\r\n\t\t\t// Skip connects set to false\r\n\t\t\tif ( !scope_Connects[index] ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\r\n\t\t\tvar l = 0;\r\n\t\t\tvar h = 100;\r\n\t\r\n\t\t\tif ( index !== 0 ) {\r\n\t\t\t\tl = scope_Locations[index - 1];\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( index !== scope_Connects.length - 1 ) {\r\n\t\t\t\th = scope_Locations[index];\r\n\t\t\t}\r\n\t\r\n\t\t\tscope_Connects[index].style[options.style] = toPct(l);\r\n\t\t\tscope_Connects[index].style[options.styleOposite] = toPct(100 - h);\r\n\t\t}\r\n\t\r\n\t\t// ...\r\n\t\tfunction setValue ( to, handleNumber ) {\r\n\t\r\n\t\t\t// Setting with null indicates an 'ignore'.\r\n\t\t\t// Inputting 'false' is invalid.\r\n\t\t\tif ( to === null || to === false ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\r\n\t\t\t// If a formatted number was passed, attemt to decode it.\r\n\t\t\tif ( typeof to === 'number' ) {\r\n\t\t\t\tto = String(to);\r\n\t\t\t}\r\n\t\r\n\t\t\tto = options.format.from(to);\r\n\t\r\n\t\t\t// Request an update for all links if the value was invalid.\r\n\t\t\t// Do so too if setting the handle fails.\r\n\t\t\tif ( to !== false && !isNaN(to) ) {\r\n\t\t\t\tsetHandle(handleNumber, scope_Spectrum.toStepping(to), false, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Set the slider value.\r\n\t\tfunction valueSet ( input, fireSetEvent ) {\r\n\t\r\n\t\t\tvar values = asArray(input);\r\n\t\t\tvar isInit = scope_Locations[0] === undefined;\r\n\t\r\n\t\t\t// Event fires by default\r\n\t\t\tfireSetEvent = (fireSetEvent === undefined ? true : !!fireSetEvent);\r\n\t\r\n\t\t\tvalues.forEach(setValue);\r\n\t\r\n\t\t\t// Animation is optional.\r\n\t\t\t// Make sure the initial values were set before using animated placement.\r\n\t\t\tif ( options.animate && !isInit ) {\r\n\t\t\t\taddClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\r\n\t\t\t}\r\n\t\r\n\t\t\t// Now that all base values are set, apply constraints\r\n\t\t\tscope_HandleNumbers.forEach(function(handleNumber){\r\n\t\t\t\tsetHandle(handleNumber, scope_Locations[handleNumber], true, false);\r\n\t\t\t});\r\n\t\r\n\t\t\tsetZindex();\r\n\t\r\n\t\t\tscope_HandleNumbers.forEach(function(handleNumber){\r\n\t\r\n\t\t\t\tfireEvent('update', handleNumber);\r\n\t\r\n\t\t\t\t// Fire the event only for handles that received a new value, as per #579\r\n\t\t\t\tif ( values[handleNumber] !== null && fireSetEvent ) {\r\n\t\t\t\t\tfireEvent('set', handleNumber);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\t// Reset slider to initial values\r\n\t\tfunction valueReset ( fireSetEvent ) {\r\n\t\t\tvalueSet(options.start, fireSetEvent);\r\n\t\t}\r\n\t\r\n\t\t// Get the slider value.\r\n\t\tfunction valueGet ( ) {\r\n\t\r\n\t\t\tvar values = scope_Values.map(options.format.to);\r\n\t\r\n\t\t\t// If only one handle is used, return a single value.\r\n\t\t\tif ( values.length === 1 ){\r\n\t\t\t\treturn values[0];\r\n\t\t\t}\r\n\t\r\n\t\t\treturn values;\r\n\t\t}\r\n\t\r\n\t\t// Removes classes from the root and empties it.\r\n\t\tfunction destroy ( ) {\r\n\t\r\n\t\t\tfor ( var key in options.cssClasses ) {\r\n\t\t\t\tif ( !options.cssClasses.hasOwnProperty(key) ) { continue; }\r\n\t\t\t\tremoveClass(scope_Target, options.cssClasses[key]);\r\n\t\t\t}\r\n\t\r\n\t\t\twhile (scope_Target.firstChild) {\r\n\t\t\t\tscope_Target.removeChild(scope_Target.firstChild);\r\n\t\t\t}\r\n\t\r\n\t\t\tdelete scope_Target.noUiSlider;\r\n\t\t}\r\n\t\r\n\t\t// Get the current step size for the slider.\r\n\t\tfunction getCurrentStep ( ) {\r\n\t\r\n\t\t\t// Check all locations, map them to their stepping point.\r\n\t\t\t// Get the step point, then find it in the input list.\r\n\t\t\treturn scope_Locations.map(function( location, index ){\r\n\t\r\n\t\t\t\tvar nearbySteps = scope_Spectrum.getNearbySteps( location );\r\n\t\t\t\tvar value = scope_Values[index];\r\n\t\t\t\tvar increment = nearbySteps.thisStep.step;\r\n\t\t\t\tvar decrement = null;\r\n\t\r\n\t\t\t\t// If the next value in this step moves into the next step,\r\n\t\t\t\t// the increment is the start of the next step - the current value\r\n\t\t\t\tif ( increment !== false ) {\r\n\t\t\t\t\tif ( value + increment > nearbySteps.stepAfter.startValue ) {\r\n\t\t\t\t\t\tincrement = nearbySteps.stepAfter.startValue - value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\r\n\t\r\n\t\t\t\t// If the value is beyond the starting point\r\n\t\t\t\tif ( value > nearbySteps.thisStep.startValue ) {\r\n\t\t\t\t\tdecrement = nearbySteps.thisStep.step;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\telse if ( nearbySteps.stepBefore.step === false ) {\r\n\t\t\t\t\tdecrement = false;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// If a handle is at the start of a step, it always steps back into the previous step first\r\n\t\t\t\telse {\r\n\t\t\t\t\tdecrement = value - nearbySteps.stepBefore.highestStep;\r\n\t\t\t\t}\r\n\t\r\n\t\r\n\t\t\t\t// Now, if at the slider edges, there is not in/decrement\r\n\t\t\t\tif ( location === 100 ) {\r\n\t\t\t\t\tincrement = null;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\telse if ( location === 0 ) {\r\n\t\t\t\t\tdecrement = null;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t// As per #391, the comparison for the decrement step can have some rounding issues.\r\n\t\t\t\tvar stepDecimals = scope_Spectrum.countStepDecimals();\r\n\t\r\n\t\t\t\t// Round per #391\r\n\t\t\t\tif ( increment !== null && increment !== false ) {\r\n\t\t\t\t\tincrement = Number(increment.toFixed(stepDecimals));\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tif ( decrement !== null && decrement !== false ) {\r\n\t\t\t\t\tdecrement = Number(decrement.toFixed(stepDecimals));\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\treturn [decrement, increment];\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\t// Attach an event to this slider, possibly including a namespace\r\n\t\tfunction bindEvent ( namespacedEvent, callback ) {\r\n\t\t\tscope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];\r\n\t\t\tscope_Events[namespacedEvent].push(callback);\r\n\t\r\n\t\t\t// If the event bound is 'update,' fire it immediately for all handles.\r\n\t\t\tif ( namespacedEvent.split('.')[0] === 'update' ) {\r\n\t\t\t\tscope_Handles.forEach(function(a, index){\r\n\t\t\t\t\tfireEvent('update', index);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t// Undo attachment of event\r\n\t\tfunction removeEvent ( namespacedEvent ) {\r\n\t\r\n\t\t\tvar event = namespacedEvent && namespacedEvent.split('.')[0];\r\n\t\t\tvar namespace = event && namespacedEvent.substring(event.length);\r\n\t\r\n\t\t\tObject.keys(scope_Events).forEach(function( bind ){\r\n\t\r\n\t\t\t\tvar tEvent = bind.split('.')[0],\r\n\t\t\t\t\ttNamespace = bind.substring(tEvent.length);\r\n\t\r\n\t\t\t\tif ( (!event || event === tEvent) && (!namespace || namespace === tNamespace) ) {\r\n\t\t\t\t\tdelete scope_Events[bind];\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\r\n\t\t// Updateable: margin, limit, padding, step, range, animate, snap\r\n\t\tfunction updateOptions ( optionsToUpdate, fireSetEvent ) {\r\n\t\r\n\t\t\t// Spectrum is created using the range, snap, direction and step options.\r\n\t\t\t// 'snap' and 'step' can be updated, 'direction' cannot, due to event binding.\r\n\t\t\t// If 'snap' and 'step' are not passed, they should remain unchanged.\r\n\t\t\tvar v = valueGet();\r\n\t\r\n\t\t\tvar updateAble = ['margin', 'limit', 'padding', 'range', 'animate', 'snap', 'step', 'format'];\r\n\t\r\n\t\t\t// Only change options that we're actually passed to update.\r\n\t\t\tupdateAble.forEach(function(name){\r\n\t\t\t\tif ( optionsToUpdate[name] !== undefined ) {\r\n\t\t\t\t\toriginalOptions[name] = optionsToUpdate[name];\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\r\n\t\t\tvar newOptions = testOptions(originalOptions);\r\n\t\r\n\t\t\t// Load new options into the slider state\r\n\t\t\tupdateAble.forEach(function(name){\r\n\t\t\t\tif ( optionsToUpdate[name] !== undefined ) {\r\n\t\t\t\t\toptions[name] = newOptions[name];\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\r\n\t\t\t// Save current spectrum direction as testOptions in testRange call\r\n\t\t\t// doesn't rely on current direction\r\n\t\t\tnewOptions.spectrum.direction = scope_Spectrum.direction;\r\n\t\t\tscope_Spectrum = newOptions.spectrum;\r\n\t\r\n\t\t\t// Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\r\n\t\t\toptions.margin = newOptions.margin;\r\n\t\t\toptions.limit = newOptions.limit;\r\n\t\t\toptions.padding = newOptions.padding;\r\n\t\r\n\t\t\t// Invalidate the current positioning so valueSet forces an update.\r\n\t\t\tscope_Locations = [];\r\n\t\t\tvalueSet(optionsToUpdate.start || v, fireSetEvent);\r\n\t\t}\r\n\t\r\n\t\t// Throw an error if the slider was already initialized.\r\n\t\tif ( scope_Target.noUiSlider ) {\r\n\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): Slider was already initialized.\");\r\n\t\t}\r\n\t\r\n\t\t// Create the base element, initialise HTML and set classes.\r\n\t\t// Add handles and connect elements.\r\n\t\taddSlider(scope_Target);\r\n\t\taddElements(options.connect, scope_Base);\r\n\t\r\n\t\tscope_Self = {\r\n\t\t\tdestroy: destroy,\r\n\t\t\tsteps: getCurrentStep,\r\n\t\t\ton: bindEvent,\r\n\t\t\toff: removeEvent,\r\n\t\t\tget: valueGet,\r\n\t\t\tset: valueSet,\r\n\t\t\treset: valueReset,\r\n\t\t\t// Exposed for unit testing, don't use this in your application.\r\n\t\t\t__moveHandles: function(a, b, c) { moveHandles(a, b, scope_Locations, c); },\r\n\t\t\toptions: originalOptions, // Issue #600, #678\r\n\t\t\tupdateOptions: updateOptions,\r\n\t\t\ttarget: scope_Target, // Issue #597\r\n\t\t\tpips: pips // Issue #594\r\n\t\t};\r\n\t\r\n\t\t// Attach user events.\r\n\t\tbindSliderEvents(options.events);\r\n\t\r\n\t\t// Use the public value method to set the start values.\r\n\t\tvalueSet(options.start);\r\n\t\r\n\t\tif ( options.pips ) {\r\n\t\t\tpips(options.pips);\r\n\t\t}\r\n\t\r\n\t\tif ( options.tooltips ) {\r\n\t\t\ttooltips();\r\n\t\t}\r\n\t\r\n\t\treturn scope_Self;\r\n\t\r\n\t}\r\n\t\r\n\t\r\n\t\t// Run the standard initializer\r\n\t\tfunction initialize ( target, originalOptions ) {\r\n\t\r\n\t\t\tif ( !target.nodeName ) {\r\n\t\t\t\tthrow new Error(\"noUiSlider (\" + VERSION + \"): create requires a single element.\");\r\n\t\t\t}\r\n\t\r\n\t\t\t// Test the options and create the slider environment;\r\n\t\t\tvar options = testOptions( originalOptions, target );\r\n\t\t\tvar api = closure( target, options, originalOptions );\r\n\t\r\n\t\t\ttarget.noUiSlider = api;\r\n\t\r\n\t\t\treturn api;\r\n\t\t}\r\n\t\r\n\t\t// Use an object instead of a function for future expansibility;\r\n\t\treturn {\r\n\t\t\tversion: VERSION,\r\n\t\t\tcreate: initialize\r\n\t\t};\r\n\t\r\n\t}));\n\n/***/ },\n/* 40 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _component = __webpack_require__(2);\n\t\n\tvar _component2 = _interopRequireDefault(_component);\n\t\n\tvar _clamp = __webpack_require__(41);\n\t\n\tvar _clamp2 = _interopRequireDefault(_clamp);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar SELECTOR_COMPONENT = '.aui-js-indicator';\n\tvar CLASS_ITEM = 'aui-indicator__item';\n\tvar CLASS_ACTION = 'aui-indicator__action';\n\tvar CLASS_INDICATOR = 'aui-indicator__indicator';\n\tvar CLASS_IS_ACTIVE = 'is-active';\n\t\n\t/**\n\t * Class constructor for Indicator AUI component.\n\t * Implements AUI component design pattern defined at:\n\t * https://github.com/...\n\t *\n\t * @param {HTMLElement} element The element that will be upgraded.\n\t */\n\t\n\tvar Indicator = function (_Component) {\n\t _inherits(Indicator, _Component);\n\t\n\t /**\n\t * Upgrades all Indicator AUI components.\n\t * @returns {Array} Returns an array of all newly upgraded components.\n\t */\n\t Indicator.upgradeElements = function upgradeElements() {\n\t var components = [];\n\t Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(function (element) {\n\t if (!_component2.default.isElementUpgraded(element)) {\n\t components.push(new Indicator(element));\n\t }\n\t });\n\t return components;\n\t };\n\t\n\t function Indicator(element) {\n\t _classCallCheck(this, Indicator);\n\t\n\t return _possibleConstructorReturn(this, _Component.call(this, element));\n\t }\n\t\n\t Indicator.prototype.init = function init() {\n\t var _this2 = this;\n\t\n\t _Component.prototype.init.call(this);\n\t\n\t this._actions = Array.from(this._element.querySelectorAll('.' + CLASS_ACTION));\n\t this._listItems = Array.from(this._element.querySelectorAll('.' + CLASS_ITEM));\n\t\n\t this._indicator = document.createElement('span');\n\t this._indicator.classList.add(CLASS_INDICATOR);\n\t this._element.appendChild(this._indicator);\n\t\n\t this._element.addEventListener('click', this.clickHandler = function (event) {\n\t return _this2._onClick(event);\n\t });\n\t };\n\t\n\t /**\n\t * Handle click.\n\t * @param {Event} event The event that fired.\n\t * @private\n\t */\n\t\n\t\n\t Indicator.prototype._onClick = function _onClick(event) {\n\t if (!event.target.classList.contains(CLASS_ACTION)) {\n\t return;\n\t }\n\t event.preventDefault();\n\t\n\t this.selectAction(event.target);\n\t };\n\t\n\t /**\n\t * Select item with given action element.\n\t * @param {HTMLElement} actionElement Action child element of the list item to select.\n\t * @private\n\t */\n\t\n\t\n\t Indicator.prototype.selectAction = function selectAction(actionElement) {\n\t if (actionElement) {\n\t // Find index\n\t var listItem = actionElement.parentNode;\n\t var index = this._listItems.indexOf(listItem);\n\t this.select(index);\n\t }\n\t };\n\t\n\t /**\n\t * Select item.\n\t * @param {Integer} index Zero-based index of the list item to select.\n\t * @private\n\t */\n\t\n\t\n\t Indicator.prototype.select = function select() {\n\t var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\t\n\t index = (0, _clamp2.default)(index, 0, this._actions.length - 1);\n\t var activeItem = this._actions[index];\n\t\n\t // Update actions\n\t this._actions.forEach(function (item) {\n\t item.classList.remove(CLASS_IS_ACTIVE);\n\t });\n\t activeItem.classList.add(CLASS_IS_ACTIVE);\n\t\n\t // Update indicator position\n\t var rectContainer = this._element.getBoundingClientRect();\n\t var rectTarget = activeItem.getBoundingClientRect();\n\t var indicatorLeft = rectTarget.left - rectContainer.left;\n\t this._indicator.style.left = indicatorLeft + 'px';\n\t };\n\t\n\t return Indicator;\n\t}(_component2.default);\n\t\n\texports.default = Indicator;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 41 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = clamp;\n\t/**\n\t * Clamps `number` within the inclusive `lower` and `upper` bounds.\n\t *\n\t * @since 4.0.0\n\t * @category Number\n\t * @param {number} number The number to clamp.\n\t * @param {number} lower The lower bound.\n\t * @param {number} upper The upper bound.\n\t * @returns {number} Returns the clamped number.\n\t * @example\n\t *\n\t * clamp(-10, -5, 5)\n\t * // => -5\n\t *\n\t * clamp(10, -5, 5)\n\t * // => 5\n\t */\n\tfunction clamp(number, lower, upper) {\n\t number = +number;\n\t lower = +lower;\n\t upper = +upper;\n\t lower = lower === lower ? lower : 0;\n\t upper = upper === upper ? upper : 0;\n\t if (number === number) {\n\t number = number <= upper ? number : upper;\n\t number = number >= lower ? number : lower;\n\t }\n\t return number;\n\t}\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 42 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _component = __webpack_require__(2);\n\t\n\tvar _component2 = _interopRequireDefault(_component);\n\t\n\tvar _objectResize = __webpack_require__(43);\n\t\n\tvar _objectResize2 = _interopRequireDefault(_objectResize);\n\t\n\tvar _limit = __webpack_require__(24);\n\t\n\tvar _limit2 = _interopRequireDefault(_limit);\n\t\n\tvar _bezierEasing = __webpack_require__(44);\n\t\n\tvar _bezierEasing2 = _interopRequireDefault(_bezierEasing);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar SELECTOR_COMPONENT = '.aui-js-spinner';\n\tvar CLASS_CONTINUOUS = 'aui-spinner--continuous';\n\tvar CLASS_SHAPE = 'aui-spinner__svg';\n\tvar CLASS_PATH = 'aui-spinner__path';\n\tvar CLASS_PATH_PROGRESS = 'aui-spinner__path--progress';\n\tvar CLASS_GROUP = 'aui-spinner__group';\n\tvar CLASS_GROUP_BASE_PATH = 'aui-spinner__group-base';\n\tvar CLASS_GROUP_PROGRESS_PATH = 'aui-spinner__group-progress';\n\tvar CLASS_VALUE = 'aui-spinner__value';\n\tvar CLASS_IS_PENDING = 'is-pending';\n\tvar CLASS_IS_LOADING = 'is-loading';\n\tvar CLASS_IS_COMPLETE = 'is-complete';\n\tvar SIZE = 48;\n\tvar RADIUS = 22;\n\tvar STROKE_WIDTH = 3;\n\tvar LOOP_ANIMATION_DURATION = 1.5;\n\tvar LOOP_ANIMATION = [{\n\t dashLength: 0,\n\t dashOffset: 0,\n\t rotate: 0\n\t}, {\n\t dashLength: 0.65,\n\t dashOffset: -1,\n\t rotate: 360\n\t}];\n\t\n\t/**\n\t * Class constructor for Spinner AUI component.\n\t * Implements AUI component design pattern defined at:\n\t * https://github.com/...\n\t *\n\t * @param {HTMLElement} element The element that will be upgraded.\n\t */\n\t\n\tvar Spinner = function (_Component) {\n\t _inherits(Spinner, _Component);\n\t\n\t /**\n\t * Upgrades all Spinner AUI components.\n\t * @returns {Array} Returns an array of all newly upgraded components.\n\t */\n\t Spinner.upgradeElements = function upgradeElements() {\n\t var components = [];\n\t Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(function (element) {\n\t if (!_component2.default.isElementUpgraded(element)) {\n\t components.push(new Spinner(element));\n\t }\n\t });\n\t return components;\n\t };\n\t\n\t function Spinner(element) {\n\t _classCallCheck(this, Spinner);\n\t\n\t return _possibleConstructorReturn(this, _Component.call(this, element));\n\t }\n\t\n\t Spinner.prototype.init = function init() {\n\t _Component.prototype.init.call(this);\n\t\n\t this._objectResize = new _objectResize2.default(this._element, this.resize, this);\n\t\n\t this._continuous = this._element.classList.contains(CLASS_CONTINUOUS);\n\t\n\t // Add value element, if required:\n\t if (!this._continuous) {\n\t this._value = document.createElement('span');\n\t this._value.classList.add(CLASS_VALUE);\n\t this._element.appendChild(this._value);\n\t }\n\t\n\t // Add SVG graphic:\n\t // \n\t var shape = this.createSvgNode('svg', {\n\t class: CLASS_SHAPE,\n\t viewBox: '0 0 ' + SIZE + ' ' + SIZE\n\t });\n\t var group = this.createSvgNode('g', { class: CLASS_GROUP });\n\t var groupCircle1 = this.createSvgNode('g', { class: CLASS_GROUP_BASE_PATH });\n\t var groupCircle2 = this.createSvgNode('g', { class: CLASS_GROUP_PROGRESS_PATH });\n\t var circle1 = this.createSvgNode('circle', {\n\t class: CLASS_PATH,\n\t cx: 0,\n\t cy: 0,\n\t r: RADIUS\n\t });\n\t var circle2 = this.createSvgNode('circle', {\n\t class: CLASS_PATH + ' ' + CLASS_PATH_PROGRESS,\n\t cx: 0,\n\t cy: 0,\n\t r: RADIUS,\n\t transform: 'rotate(-90)'\n\t });\n\t groupCircle1.appendChild(circle1);\n\t groupCircle2.appendChild(circle2);\n\t group.appendChild(groupCircle1);\n\t group.appendChild(groupCircle2);\n\t shape.appendChild(group);\n\t this._element.appendChild(shape);\n\t this._shape = shape;\n\t this._group = group;\n\t this._progressPath = circle2;\n\t this._basePath = circle1;\n\t this._groupProgress = groupCircle2;\n\t\n\t this._easing = (0, _bezierEasing2.default)(0.75, 0.02, 0.5, 1);\n\t this._easingDasharray = (0, _bezierEasing2.default)(0.4, 0, 0, 1);\n\t this._progressPath.style.strokeOpacity = 0;\n\t\n\t this.resize();\n\t this.progress(0);\n\t };\n\t\n\t Spinner.prototype.progress = function progress(ratio) {\n\t ratio = (0, _limit2.default)(ratio, 0, 1);\n\t this._progress = ratio;\n\t var pathLength = this._getCircleLength(this._progressPath);\n\t\n\t if (!this._continuous) {\n\t this._progressPath.style.strokeDasharray = this._progress === 1 ? 'none' : this._progress * pathLength + ', ' + pathLength;\n\t this._progressPath.style.strokeOpacity = this._progress === 0 ? 0 : 1;\n\t }\n\t\n\t if (this._value) {\n\t this._value.innerHTML = '' + Math.round(this._progress * 100);\n\t }\n\t\n\t this._updateClasses();\n\t };\n\t\n\t Spinner.prototype.loop = function loop() {\n\t var _this2 = this;\n\t\n\t if (this._continuous) {\n\t this._progressPath.style.strokeOpacity = 1;\n\t window.requestAnimationFrame(function (timestamp) {\n\t return _this2._animateLoop(timestamp);\n\t });\n\t }\n\t };\n\t\n\t Spinner.prototype.stop = function stop() {};\n\t\n\t Spinner.prototype.resize = function resize() {\n\t var size = this._element.offsetWidth;\n\t var radius = (size - STROKE_WIDTH) / 2;\n\t this._shape.setAttributeNS(null, 'viewBox', size / -2 + ' ' + size / -2 + ' ' + size + ' ' + size);\n\t this._basePath.setAttributeNS(null, 'r', '' + radius);\n\t this._progressPath.setAttributeNS(null, 'r', '' + radius);\n\t };\n\t\n\t // TODO Optimize calculations; wording.\n\t\n\t\n\t Spinner.prototype._animateLoop = function _animateLoop(timestamp) {\n\t var _this3 = this;\n\t\n\t if (!this._loopStart) {\n\t this._loopStart = timestamp;\n\t }\n\t\n\t // The progress in seconds 0 <= progress <= LOOP_ANIMATION_DURATION\n\t var progress = (timestamp - this._loopStart) / 1000;\n\t // The progress ratio between 0 <= progressRatio <= 1\n\t var progressRatio = progress / LOOP_ANIMATION_DURATION;\n\t if (progressRatio > 1 || progressRatio === 0) {\n\t this._animationEndSet = false;\n\t progress = 0;\n\t progressRatio = 0;\n\t this._loopStart = timestamp;\n\t this._dashLengthStart = LOOP_ANIMATION[0].dashLength;\n\t this._dashOffsetStart = LOOP_ANIMATION[0].dashOffset;\n\t this._dashLengthEnd = LOOP_ANIMATION[1].dashLength;\n\t this._dashOffsetEnd = LOOP_ANIMATION[1].dashOffset;\n\t }\n\t var ease = this._easing(progressRatio);\n\t var pathLength = this._getCircleLength(this._progressPath);\n\t this._dashLengthRatio = this._dashLengthStart + (this._dashLengthEnd - this._dashLengthStart) * this._easingDasharray(progressRatio);\n\t this._dashOffsetRatio = this._dashOffsetStart + (this._dashOffsetEnd - this._dashOffsetStart) * ease;\n\t this._rotate = LOOP_ANIMATION[1].rotate * ease;\n\t\n\t var dashLength = pathLength * this._dashLengthRatio;\n\t var dashOffset = pathLength * this._dashOffsetRatio;\n\t\n\t this._progressPath.style.strokeDasharray = dashLength + ', ' + pathLength;\n\t this._progressPath.style.strokeDashoffset = '' + dashOffset;\n\t // this._group.setAttributeNS(null, 'transform', `rotate(${this._rotate})`);\n\t this._groupProgress.setAttributeNS(null, 'transform', 'rotate(' + this._rotate + ')');\n\t\n\t window.requestAnimationFrame(function (timestamp) {\n\t return _this3._animateLoop(timestamp);\n\t });\n\t };\n\t\n\t Spinner.prototype._updateClasses = function _updateClasses() {\n\t if (this._progress === 0) {\n\t this._element.classList.add(CLASS_IS_PENDING);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_PENDING);\n\t }\n\t\n\t if (this._progress > 0 && this._progress < 1) {\n\t this._element.classList.add(CLASS_IS_LOADING);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_LOADING);\n\t }\n\t\n\t if (this._progress === 1) {\n\t this._element.classList.add(CLASS_IS_COMPLETE);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_COMPLETE);\n\t }\n\t };\n\t\n\t Spinner.prototype._getCircleLength = function _getCircleLength(circle) {\n\t var r = circle.getAttribute('r');\n\t return 2 * Math.PI * r;\n\t };\n\t\n\t return Spinner;\n\t}(_component2.default);\n\t\n\texports.default = Spinner;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 43 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar ObjectResize = function () {\n\t function ObjectResize(parent, callback, callbackScope) {\n\t var _this = this;\n\t\n\t _classCallCheck(this, ObjectResize);\n\t\n\t var isIE = navigator.userAgent.match(/Trident/);\n\t\n\t // NOTE\n\t // this._parent.style.position != 'static'\n\t // this._parent.style.display = 'block'\n\t\n\t this._parent = parent;\n\t this._helperElement = document.createElement('object');\n\t this._helperElement.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1; border: 0px; opacity: 0;');\n\t this._helperElement.setAttribute('border', '0');\n\t this._helperElement.onload = function () {\n\t return _this._onLoad();\n\t };\n\t this._helperElement.type = 'text/html';\n\t if (isIE) {\n\t this._parent.appendChild(this._helperElement);\n\t }\n\t this._helperElement.data = 'about:blank';\n\t if (!isIE) {\n\t this._parent.appendChild(this._helperElement);\n\t }\n\t\n\t this._callback = callback;\n\t this._callbackScope = callbackScope;\n\t\n\t this._ticking = false;\n\t }\n\t\n\t ObjectResize.prototype._onLoad = function _onLoad(event) {\n\t var _this2 = this;\n\t\n\t this._helperElement.contentDocument.defaultView.addEventListener('resize', this._resizeHandler = function (event) {\n\t return _this2._onResize(event);\n\t });\n\t };\n\t\n\t ObjectResize.prototype._onResize = function _onResize(event) {\n\t var _this3 = this;\n\t\n\t if (!this._ticking) {\n\t window.requestAnimationFrame(function () {\n\t _this3._ticking = false;\n\t _this3._callback.call(_this3._callbackScope);\n\t });\n\t }\n\t this._ticking = true;\n\t };\n\t\n\t ObjectResize.prototype.dispose = function dispose() {\n\t this._helperElement.contentDocument.defaultView.removeEventListener('resize', this._resizeHandler);\n\t this._parent.removeChild(this._helperElement);\n\t };\n\t\n\t return ObjectResize;\n\t}();\n\t\n\t// (function() {\n\t// var attachEvent = document.attachEvent;\n\t// var isIE = navigator.userAgent.match(/Trident/);\n\t// var requestFrame = (function() {\n\t// var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||\n\t// function(fn) {\n\t// return window.setTimeout(fn, 20);\n\t// };\n\t// return function(fn) {\n\t// return raf(fn);\n\t// };\n\t// })();\n\t//\n\t// var cancelFrame = (function() {\n\t// var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame ||\n\t// window.clearTimeout;\n\t// return function(id) {\n\t// return cancel(id);\n\t// };\n\t// })();\n\t//\n\t// function resizeListener(e) {\n\t// var win = e.target || e.srcElement;\n\t// if (win.__resizeRAF__) cancelFrame(win.__resizeRAF__);\n\t// win.__resizeRAF__ = requestFrame(function() {\n\t// var trigger = win.__resizeTrigger__;\n\t// trigger.__resizeListeners__.forEach(function(fn) {\n\t// fn.call(trigger, e);\n\t// });\n\t// });\n\t// }\n\t//\n\t// function objectLoad(e) {\n\t// this.contentDocument.defaultView.__resizeTrigger__ = this.__resizeElement__;\n\t// this.contentDocument.defaultView.addEventListener('resize', resizeListener);\n\t// }\n\t//\n\t// window.addResizeListener = function(element, fn) {\n\t// if (!element.__resizeListeners__) {\n\t// element.__resizeListeners__ = [];\n\t// if (attachEvent) {\n\t// element.__resizeTrigger__ = element;\n\t// element.attachEvent('onresize', resizeListener);\n\t// } else {\n\t// if (getComputedStyle(element).position === 'static') element.style.position = 'relative';\n\t// var obj = element.__resizeTrigger__ = document.createElement('object');\n\t// obj.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n\t// obj.__resizeElement__ = element;\n\t// obj.onload = objectLoad;\n\t// obj.type = 'text/html';\n\t// if (isIE) element.appendChild(obj);\n\t// obj.data = 'about:blank';\n\t// if (!isIE) element.appendChild(obj);\n\t// }\n\t// }\n\t// element.__resizeListeners__.push(fn);\n\t// };\n\t//\n\t// window.removeResizeListener = function(element, fn) {\n\t// element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n\t// if (!element.__resizeListeners__.length) {\n\t// if (attachEvent) element.detachEvent('onresize', resizeListener);\n\t// else {\n\t// element.__resizeTrigger__.contentDocument.defaultView.removeEventListener('resize', resizeListener);\n\t// element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);\n\t// }\n\t// }\n\t// }\n\t// })();\n\t\n\t\n\texports.default = ObjectResize;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 44 */\n/***/ function(module, exports) {\n\n\t/**\n\t * https://github.com/gre/bezier-easing\n\t * BezierEasing - use bezier curve for transition easing function\n\t * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n\t */\n\t\n\t// These values are established by empiricism with tests (tradeoff: performance VS precision)\n\tvar NEWTON_ITERATIONS = 4;\n\tvar NEWTON_MIN_SLOPE = 0.001;\n\tvar SUBDIVISION_PRECISION = 0.0000001;\n\tvar SUBDIVISION_MAX_ITERATIONS = 10;\n\t\n\tvar kSplineTableSize = 11;\n\tvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\t\n\tvar float32ArraySupported = typeof Float32Array === 'function';\n\t\n\tfunction A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }\n\tfunction B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }\n\tfunction C (aA1) { return 3.0 * aA1; }\n\t\n\t// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\tfunction calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }\n\t\n\t// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\tfunction getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }\n\t\n\tfunction binarySubdivide (aX, aA, aB, mX1, mX2) {\n\t var currentX, currentT, i = 0;\n\t do {\n\t currentT = aA + (aB - aA) / 2.0;\n\t currentX = calcBezier(currentT, mX1, mX2) - aX;\n\t if (currentX > 0.0) {\n\t aB = currentT;\n\t } else {\n\t aA = currentT;\n\t }\n\t } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\t return currentT;\n\t}\n\t\n\tfunction newtonRaphsonIterate (aX, aGuessT, mX1, mX2) {\n\t for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n\t var currentSlope = getSlope(aGuessT, mX1, mX2);\n\t if (currentSlope === 0.0) {\n\t return aGuessT;\n\t }\n\t var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n\t aGuessT -= currentX / currentSlope;\n\t }\n\t return aGuessT;\n\t}\n\t\n\tfunction LinearEasing (x) {\n\t return x;\n\t}\n\t\n\tmodule.exports = function bezier (mX1, mY1, mX2, mY2) {\n\t if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n\t throw new Error('bezier x values must be in [0, 1] range');\n\t }\n\t\n\t if (mX1 === mY1 && mX2 === mY2) {\n\t return LinearEasing;\n\t }\n\t\n\t // Precompute samples table\n\t var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n\t for (var i = 0; i < kSplineTableSize; ++i) {\n\t sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n\t }\n\t\n\t function getTForX (aX) {\n\t var intervalStart = 0.0;\n\t var currentSample = 1;\n\t var lastSample = kSplineTableSize - 1;\n\t\n\t for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n\t intervalStart += kSampleStepSize;\n\t }\n\t --currentSample;\n\t\n\t // Interpolate to provide an initial guess for t\n\t var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n\t var guessForT = intervalStart + dist * kSampleStepSize;\n\t\n\t var initialSlope = getSlope(guessForT, mX1, mX2);\n\t if (initialSlope >= NEWTON_MIN_SLOPE) {\n\t return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n\t } else if (initialSlope === 0.0) {\n\t return guessForT;\n\t } else {\n\t return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n\t }\n\t }\n\t\n\t return function BezierEasing (x) {\n\t // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n\t if (x === 0) {\n\t return 0;\n\t }\n\t if (x === 1) {\n\t return 1;\n\t }\n\t return calcBezier(getTForX(x), mY1, mY2);\n\t };\n\t};\n\n\n/***/ },\n/* 45 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _component = __webpack_require__(2);\n\t\n\tvar _component2 = _interopRequireDefault(_component);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar SELECTOR_COMPONENT = '.aui-js-textfield';\n\tvar CLASS_FIELD = 'aui-textfield__field';\n\tvar CLASS_INPUT = 'aui-textfield__input';\n\tvar CLASS_LABEL = 'aui-textfield__label';\n\tvar CLASS_FOCUS_LINE = 'aui-textfield__focus-line';\n\tvar CLASS_COUNTER = 'aui-textfield__counter';\n\tvar CLASS_COUNTER_VALUE = 'aui-textfield__counter-value';\n\tvar CLASS_IS_FOCUS = 'is-focused';\n\tvar CLASS_IS_DIRTY = 'is-dirty';\n\tvar CLASS_IS_INVALID = 'is-invalid';\n\tvar CLASS_IS_DISABLED = 'is-disabled';\n\tvar CLASS_IS_EQUAL_MAX_CHARS = 'is-equal-max-length';\n\tvar CLASS_IS_GREATER_MAX_CHARS = 'is-greater-max-length';\n\tvar ATTR_AUTOSIZE = 'data-autosize';\n\t\n\t/**\n\t * Class constructor for Textfield AUI component.\n\t * Implements AUI component design pattern defined at:\n\t * https://github.com/...\n\t *\n\t * @param {HTMLElement} element The element that will be upgraded.\n\t */\n\t\n\tvar Textfield = function (_Component) {\n\t _inherits(Textfield, _Component);\n\t\n\t /**\n\t * Upgrades all Textfield AUI components.\n\t * @returns {Array} Returns an array of all newly upgraded components.\n\t */\n\t Textfield.upgradeElements = function upgradeElements() {\n\t var components = [];\n\t Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(function (element) {\n\t if (!_component2.default.isElementUpgraded(element)) {\n\t components.push(new Textfield(element));\n\t }\n\t });\n\t return components;\n\t };\n\t\n\t function Textfield(element) {\n\t _classCallCheck(this, Textfield);\n\t\n\t return _possibleConstructorReturn(this, _Component.call(this, element));\n\t }\n\t\n\t Textfield.prototype.init = function init() {\n\t var _this2 = this;\n\t\n\t _Component.prototype.init.call(this);\n\t\n\t this._input = this._element.querySelector('.' + CLASS_INPUT);\n\t this._input.addEventListener('input', this._inputHandler = function (event) {\n\t return _this2._onInput(event);\n\t });\n\t this._input.addEventListener('focus', this._focusHandler = function (event) {\n\t return _this2._onFocus(event);\n\t });\n\t this._input.addEventListener('blur', this._blurHandler = function (event) {\n\t return _this2._onBlur(event);\n\t });\n\t this._input.addEventListener('change', this._changeHandler = function (event) {\n\t return _this2._onChange(event);\n\t });\n\t this._input.addEventListener('reset', this._resetHandler = function (event) {\n\t return _this2._onReset(event);\n\t });\n\t\n\t // Insert counter if data attribute 'count' is present:\n\t if (this._element.getAttribute('data-count')) {\n\t this._maxChars = parseInt(this._element.getAttribute('data-count')) || 0;\n\t this._label = this._element.querySelector('.' + CLASS_FIELD);\n\t this._counter = document.createElement('span');\n\t this._counter.classList.add(CLASS_COUNTER);\n\t this._label.parentNode.insertBefore(this._counter, this._label.nextSibling);\n\t this._counterValue = document.createElement('span');\n\t this._counterValue.classList.add(CLASS_COUNTER_VALUE);\n\t this._counterValue.innerHTML = this._maxChars;\n\t this._counter.appendChild(this._counterValue);\n\t this._hasCounter = true;\n\t }\n\t\n\t // Insert thick focus line after label element:\n\t this._label = this._element.querySelector('.' + CLASS_LABEL);\n\t var focusLine = document.createElement('span');\n\t focusLine.classList.add(CLASS_FOCUS_LINE);\n\t this._label.parentNode.insertBefore(focusLine, this._label.nextSibling);\n\t\n\t // If textarea should adjust height to content\n\t if (this._element.hasAttribute(ATTR_AUTOSIZE) && this._element.getAttribute(ATTR_AUTOSIZE) !== 'false') {\n\t var style = window.getComputedStyle(this._input);\n\t this._inputPadding = parseInt(style.paddingTop) + parseInt(style.paddingBottom) || 0;\n\t this._inputBorder = parseInt(style.borderTop) + parseInt(style.borderBottom) || 0;\n\t this._input.addEventListener('keyup', this._keyupHandler = function (event) {\n\t return _this2._onKeyup(event);\n\t });\n\t this._autosize = true;\n\t }\n\t\n\t this.updateClasses();\n\t };\n\t\n\t Textfield.prototype.update = function update() {\n\t this.updateClasses();\n\t this.updateCounter();\n\t if (this._autosize) {\n\t this.adjustHeightToContent();\n\t }\n\t };\n\t\n\t Textfield.prototype.updateClasses = function updateClasses() {\n\t this.checkDisabled();\n\t this.checkDirty();\n\t this.checkFocus();\n\t };\n\t\n\t Textfield.prototype.updateCounter = function updateCounter() {\n\t if (this._counterValue) {\n\t var numChars = this._input.value.length;\n\t var remainingChars = this._maxChars - numChars;\n\t this._counterValue.innerHTML = remainingChars;\n\t\n\t if (remainingChars === 0) {\n\t this._element.classList.add(CLASS_IS_EQUAL_MAX_CHARS);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_EQUAL_MAX_CHARS);\n\t }\n\t\n\t if (remainingChars < 0) {\n\t this._element.classList.add(CLASS_IS_GREATER_MAX_CHARS);\n\t this._element.classList.add(CLASS_IS_INVALID);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_GREATER_MAX_CHARS);\n\t this._element.classList.remove(CLASS_IS_INVALID);\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Check the disabled state and update field accordingly.\n\t */\n\t\n\t\n\t Textfield.prototype.checkDisabled = function checkDisabled() {\n\t if (this._input.disabled) {\n\t this._element.classList.add(CLASS_IS_DISABLED);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_DISABLED);\n\t }\n\t };\n\t\n\t /**\n\t * Check the dirty state and update field accordingly.\n\t */\n\t\n\t\n\t Textfield.prototype.checkDirty = function checkDirty() {\n\t if (this._input.value && this._input.value.length > 0) {\n\t this._element.classList.add(CLASS_IS_DIRTY);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_DIRTY);\n\t }\n\t };\n\t\n\t /**\n\t * Check the focus state and update field accordingly.\n\t */\n\t\n\t\n\t Textfield.prototype.checkFocus = function checkFocus() {\n\t if (Boolean(this._element.querySelector(':focus'))) {\n\t this._element.classList.add(CLASS_IS_FOCUS);\n\t } else {\n\t this._element.classList.remove(CLASS_IS_FOCUS);\n\t }\n\t };\n\t\n\t /**\n\t * Resize textarea\n\t */\n\t\n\t\n\t Textfield.prototype.adjustHeightToContent = function adjustHeightToContent() {\n\t var htmlTop = window.pageYOffset;\n\t var bodyTop = document.body.scrollTop;\n\t var originalHeight = this._input.style.height;\n\t\n\t this._input.style.height = 'auto';\n\t if (this._input.scrollHeight === 0) {\n\t // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.\n\t this._input.style.height = originalHeight;\n\t return;\n\t }\n\t this._input.style.height = this._input.scrollHeight + this._inputBorder + 'px';\n\t\n\t // prevents scroll position jump\n\t document.documentElement.scrollTop = htmlTop;\n\t document.body.scrollTop = bodyTop;\n\t };\n\t\n\t /**\n\t * Disable text field.\n\t */\n\t\n\t\n\t Textfield.prototype.disable = function disable() {\n\t this._input.disabled = true;\n\t this.updateClasses();\n\t };\n\t\n\t /**\n\t * Dispose component\n\t */\n\t\n\t\n\t Textfield.prototype.dispose = function dispose() {\n\t _Component.prototype.dispose.call(this);\n\t\n\t this._input.removeEventListener('input', this._inputHandler);\n\t this._input.removeEventListener('focus', this._focusHandler);\n\t this._input.removeEventListener('blur', this._blurHandler);\n\t this._input.removeEventListener('change', this._changeHandler);\n\t this._input.removeEventListener('reset', this._resetHandler);\n\t\n\t _Component.prototype.removeChild.call(this, this._element.querySelector('.' + CLASS_FOCUS_LINE));\n\t _Component.prototype.removeChild.call(this, this._element.querySelector('.' + CLASS_COUNTER));\n\t };\n\t\n\t /**\n\t * Event Handler\n\t */\n\t\n\t Textfield.prototype._onInput = function _onInput(event) {\n\t this.update();\n\t };\n\t\n\t Textfield.prototype._onFocus = function _onFocus(event) {\n\t this.update();\n\t };\n\t\n\t Textfield.prototype._onBlur = function _onBlur(event) {\n\t this.update();\n\t };\n\t\n\t Textfield.prototype._onChange = function _onChange(event) {\n\t this.update();\n\t };\n\t\n\t Textfield.prototype._onReset = function _onReset(event) {\n\t this.update();\n\t };\n\t\n\t Textfield.prototype._onKeyup = function _onKeyup(event) {\n\t this.updateCounter();\n\t if (this._autosize) {\n\t this.adjustHeightToContent();\n\t }\n\t };\n\t\n\t /**\n\t * Getter and Setter\n\t */\n\t\n\t _createClass(Textfield, [{\n\t key: 'input',\n\t get: function get() {\n\t return this._input;\n\t }\n\t }, {\n\t key: 'autoSize',\n\t get: function get() {\n\t return this._autosize;\n\t },\n\t set: function set(value) {\n\t return this._autosize = Boolean(value);\n\t }\n\t }]);\n\t\n\t return Textfield;\n\t}(_component2.default);\n\t\n\texports.default = Textfield;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 46 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _component = __webpack_require__(2);\n\t\n\tvar _component2 = _interopRequireDefault(_component);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar SELECTOR_COMPONENT = '.aui-js-tooltip';\n\tvar CLASS_TRIANGLE = 'aui-tooltip__triangle';\n\tvar CLASS_IS_UPGRADED = 'is-upgraded';\n\tvar CLASS_IS_ACTIVE = 'is-active';\n\tvar CLASS_IS_TOP = 'is-top';\n\tvar OFFSET_VIEWPORT_X = 10;\n\tvar OFFSET_TARGET_TOP = 12;\n\tvar OFFSET_TARGET_BOTTOM = 12;\n\tvar OPEN_DELAY = 400;\n\t\n\t/**\n\t * Class constructor for Tooltip AUI component.\n\t * Implements AUI component design pattern defined at:\n\t * https://github.com/...\n\t *\n\t * @param {HTMLElement} element The element that will be upgraded.\n\t */\n\t\n\tvar Tooltip = function (_Component) {\n\t _inherits(Tooltip, _Component);\n\t\n\t function Tooltip() {\n\t _classCallCheck(this, Tooltip);\n\t\n\t return _possibleConstructorReturn(this, _Component.apply(this, arguments));\n\t }\n\t\n\t /**\n\t * Upgrades all Tooltip AUI components.\n\t * @returns {Array} Returns an array of all newly upgraded components.\n\t */\n\t Tooltip.upgradeElements = function upgradeElements() {\n\t var components = [];\n\t Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(function (element) {\n\t if (!_component2.default.isElementUpgraded(element)) {\n\t components.push(new Tooltip(element));\n\t }\n\t });\n\t return components;\n\t };\n\t\n\t /**\n\t * Initialize component\n\t */\n\t Tooltip.prototype.init = function init() {\n\t var _this2 = this;\n\t\n\t _Component.prototype.init.call(this);\n\t\n\t var forId = this._element.getAttribute('for');\n\t\n\t if (forId) {\n\t this._trigger = document.getElementById(forId);\n\t }\n\t\n\t if (this._trigger) {\n\t // Add triangle shape\n\t this._triangle = document.createElement('span');\n\t this._triangle.classList.add(CLASS_TRIANGLE);\n\t this._element.appendChild(this._triangle);\n\t\n\t // Prevent accidental text selection on Android\n\t if (!this._trigger.hasAttribute('tabindex')) {\n\t this._trigger.setAttribute('tabindex', '0');\n\t }\n\t\n\t this._trigger.addEventListener('mouseenter', this._boundMouseenter = function (event) {\n\t return _this2._onTriggerEnter(event);\n\t });\n\t this._trigger.addEventListener('mouseleave', this._boundMouseleave = function (event) {\n\t return _this2._onTriggerLeave(event);\n\t });\n\t this._trigger.addEventListener('focusin', this._boundfocusin = function (event) {\n\t return _this2._onTriggerEnter(event);\n\t });\n\t this._trigger.addEventListener('focusout', this._boundfocusout = function (event) {\n\t return _this2._onTriggerLeave(event);\n\t });\n\t this._trigger.addEventListener('touchstart', this._boundTouchstart = function (event) {\n\t return _this2._onTriggerEnter(event);\n\t });\n\t window.addEventListener('touchend', this._boundTouchendWindow = function (event) {\n\t return _this2._onTriggerLeaveOutside(event);\n\t });\n\t }\n\t };\n\t\n\t /**\n\t * Dispose component\n\t */\n\t\n\t\n\t Tooltip.prototype.dispose = function dispose() {\n\t this._trigger.removeEventListener('mouseenter', this._boundMouseenter);\n\t this._trigger.removeEventListener('mouseleave', this._boundMouseleave);\n\t this._trigger.removeEventListener('mousemove', this._boundMouseMove);\n\t this._trigger.removeEventListener('focusin', this._boundfocusin);\n\t this._trigger.removeEventListener('focusout', this._boundfocusout);\n\t this._trigger.removeEventListener('touchstart', this._boundTouchstart);\n\t window.removeEventListener('touchend', this._boundTouchendWindow);\n\t window.removeEventListener('scroll', this._boundScrollWindow);\n\t\n\t this._element.classList.remove(CLASS_IS_TOP, CLASS_IS_ACTIVE, CLASS_IS_UPGRADED);\n\t this._element.removeAttribute('style');\n\t this._element.removeChild(this._triangle);\n\t };\n\t\n\t /**\n\t * Open tooltip\n\t * @param {HTMLElement} trigger element that opens the tooltip.\n\t * @param {number} clientX the x-coordinate of trigger (mouse/touch).\n\t */\n\t\n\t\n\t Tooltip.prototype.open = function open(trigger, clientX) {\n\t var _this3 = this;\n\t\n\t if (!trigger) {\n\t return;\n\t }\n\t\n\t var rect = trigger.getBoundingClientRect();\n\t this._element.style.left = '0px';\n\t this._element.style.top = '0px';\n\t clientX = clientX || rect.left + rect.width / 2;\n\t var triggerX = clientX - rect.left;\n\t var yTop = rect.top - this._element.offsetHeight - OFFSET_TARGET_TOP;\n\t var yBottom = rect.bottom + OFFSET_TARGET_BOTTOM + 2;\n\t var x = rect.left + rect.width / 2 - this._element.offsetWidth / 2;\n\t var y = yBottom;\n\t var triangleX = 0;\n\t\n\t this._element.classList.remove(CLASS_IS_TOP);\n\t\n\t x = rect.left + triggerX - this._element.offsetWidth / 2;\n\t\n\t if (x < OFFSET_VIEWPORT_X) {\n\t x = OFFSET_VIEWPORT_X;\n\t }\n\t\n\t // If tooltip would be out of viewport on the right\n\t if (x + this._element.offsetWidth > window.innerWidth - OFFSET_VIEWPORT_X) {\n\t x = window.innerWidth - OFFSET_VIEWPORT_X - this._element.offsetWidth;\n\t }\n\t\n\t // If viewport height isn't large enough, place tooltip on top if possible\n\t if (yBottom + this._element.offsetHeight > window.innerHeight - OFFSET_VIEWPORT_X) {\n\t y = yTop;\n\t this._element.classList.add(CLASS_IS_TOP);\n\t }\n\t\n\t triangleX = triggerX + rect.left - x;\n\t\n\t this._element.classList.add(CLASS_IS_ACTIVE);\n\t this._element.style.left = x + 'px';\n\t this._element.style.top = y + 'px';\n\t\n\t this._triangle.style.left = triangleX + 'px';\n\t\n\t this._scrolled = false;\n\t window.addEventListener('scroll', this._boundScrollWindow = function (event) {\n\t return _this3._onScrollWindow(event);\n\t });\n\t };\n\t\n\t /**\n\t * Close tooltip.\n\t */\n\t\n\t\n\t Tooltip.prototype.close = function close() {\n\t clearTimeout(this.openTimeout);\n\t window.removeEventListener('scroll', this._boundScrollWindow);\n\t this._element.classList.remove(CLASS_IS_ACTIVE);\n\t };\n\t\n\t /**\n\t * Handle enter event.\n\t * @param {Event} event that fired.\n\t */\n\t\n\t\n\t Tooltip.prototype._onTriggerEnter = function _onTriggerEnter(event) {\n\t var _this4 = this;\n\t\n\t // this.open(event.target, event.clientX);\n\t this.openPositionX = event.clientX;\n\t this._trigger.addEventListener('mousemove', this._boundMouseMove = function (event) {\n\t return _this4._onTriggerMove(event);\n\t });\n\t\n\t clearTimeout(this.openTimeout);\n\t this.openTimeout = setTimeout(function () {\n\t _this4._trigger.removeEventListener('mousemove', _this4._boundMouseMove);\n\t _this4.open(event.target, _this4.openPositionX);\n\t }, OPEN_DELAY);\n\t };\n\t\n\t /**\n\t * Handle mousemove event.\n\t * @param {Event} event that fired.\n\t */\n\t\n\t\n\t Tooltip.prototype._onTriggerMove = function _onTriggerMove(event) {\n\t this.openPositionX = event.clientX;\n\t };\n\t\n\t /**\n\t * Handle leave event.\n\t * @param {Event} event that fired.\n\t */\n\t\n\t\n\t Tooltip.prototype._onTriggerLeave = function _onTriggerLeave(event) {\n\t this.close();\n\t };\n\t\n\t /**\n\t * Handle leave outside event.\n\t * @param {Event} event that fired.\n\t */\n\t\n\t\n\t Tooltip.prototype._onTriggerLeaveOutside = function _onTriggerLeaveOutside(event) {\n\t console.log('leaveoutside', event);\n\t if (!this._element.contains(event.target) && !this._trigger.contains(event.target)) {\n\t console.log('-> close');\n\t this.close();\n\t };\n\t };\n\t\n\t /**\n\t * Handle scroll event.\n\t * @param {Event} event that fired.\n\t */\n\t\n\t\n\t Tooltip.prototype._onScrollWindow = function _onScrollWindow(event) {\n\t window.removeEventListener('scroll', this._boundScrollWindow);\n\t if (!this._scrolled) {\n\t this.close();\n\t this._scrolled = true;\n\t }\n\t };\n\t\n\t return Tooltip;\n\t}(_component2.default);\n\t\n\texports.default = Tooltip;\n\tmodule.exports = exports['default'];\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** audi-ui.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 9f4e75109a8376f38dab\n **/","// TODO Add ComponentHandler.upgradeAllRegistered components e.g. to update them when all fonts are loaded.\n// TODO Perform a `Cutting the mustard` test once. audiui-head.js\n// TODO Outsource dependencies Tether, nouislider, bezier-easing\n\n/**\n * Import all AUI components.\n */\nimport Alert from './alert/alert';\nimport Audioplayer from './audioplayer/audioplayer';\nimport Breadcrumb from './breadcrumb/breadcrumb';\nimport Checkbox from './checkbox/checkbox';\nimport Dropdown from './dropdown/dropdown';\nimport Flyout from './flyout/flyout';\nimport Header from './header/header';\nimport Modal from './modal/modal';\nimport Nav from './nav/nav';\nimport Notification from './notification/notification';\nimport Pagination from './pagination/pagination';\nimport Player from './player/player';\nimport Popover from './popover/popover';\nimport Progress from './progress/progress';\nimport Radio from './radio/radio';\nimport Response from './response/response';\nimport Select from './select/select';\nimport Slider from './slider/slider';\nimport Indicator from './indicator/indicator';\nimport Spinner from './spinner/spinner';\nimport Textfield from './textfield/textfield';\nimport Tooltip from './tooltip/tooltip';\n\n/**\n * Export all AUI components to make them accessible through npm.\n * @example\n * import {Alert} from 'audi-ui';\n * Alert.upgradeElements();\n */\nexport {\n Alert,\n Audioplayer,\n Breadcrumb,\n Checkbox,\n Dropdown,\n Flyout,\n Header,\n Modal,\n Nav,\n Notification,\n Pagination,\n Player,\n Popover,\n Progress,\n Radio,\n Response,\n Select,\n Slider,\n Indicator,\n Spinner,\n Textfield,\n Tooltip\n}\n\n/**\n * Export Component Handler as default to have access to all components.\n * @example\n * import auiHandler from 'audi-ui';\n * auiHandler.upgradeAllElements();\n */\nclass ComponentHandler {\n\n constructor() {\n\n /**\n * Performs a \"Cutting the mustard\" test. If the browser supports the features\n * tested, adds a aui-js class to the element.\n */\n if ('classList' in document.createElement('div') && 'querySelector' in document && 'addEventListener' in window && Array.prototype.forEach) {\n document.documentElement.classList.add('aui-js');\n }\n\n this.upgradeAllElements();\n }\n\n upgradeAllElements() {\n Alert.upgradeElements();\n Audioplayer.upgradeElements();\n Breadcrumb.upgradeElements();\n Checkbox.upgradeElements();\n Dropdown.upgradeElements();\n Flyout.upgradeElements();\n Header.upgradeElements();\n // Modal.upgradeElements();\n Nav.upgradeElements();\n Notification.upgradeElements();\n Pagination.upgradeElements();\n Player.upgradeElements();\n Popover.upgradeElements();\n // Progress.upgradeElements();\n Radio.upgradeElements();\n Response.upgradeElements();\n Select.upgradeElements();\n Slider.upgradeElements();\n Indicator.upgradeElements();\n // Spinner.upgradeElements();\n Textfield.upgradeElements();\n Tooltip.upgradeElements();\n }\n\n}\n\nconst componentHandler = new ComponentHandler();\n\nexport default componentHandler;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/index.js\n **/","import Component from '../component/component';\nimport ResizeObserver from '../util/resize-observer';\n\nconst SELECTOR_COMPONENT = '.aui-js-alert';\nconst CLASS_CONTENT = 'aui-alert__content';\nconst CLASS_CLOSE_BUTTON = 'aui-alert__close';\nconst CLASS_IS_CLOSED = 'is-closed';\nconst CLASS_IS_OPEN = 'is-open';\nconst ATTR_CLOSE = 'data-close';\nconst ATTR_OPENDELAY = 'data-opendelay';\n\n/**\n * Class constructor for Alert AUI component.\n * Implements AUI component design pattern defined at:\n * https://github.com/...\n *\n * @param {HTMLElement} element The element that will be upgraded.\n */\nexport default class Alert extends Component {\n\n /**\n * Upgrades all Alert AUI components.\n * @returns {Array} Returns an array of all newly upgraded components.\n */\n static upgradeElements() {\n let components = [];\n Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => {\n if (!Component.isElementUpgraded(element)) {\n components.push(new Alert(element));\n }\n });\n return components;\n };\n\n /**\n * Constructor\n * @constructor\n * @param {HTMLElement} element The element of the AUI component.\n */\n constructor(element) {\n super(element);\n }\n\n /**\n * Initialize component\n */\n init() {\n super.init();\n\n this._content = this._element.querySelector(`.${CLASS_CONTENT}`);\n\n // Add close button\n this._closeButton = document.createElement('button');\n this._closeButton.setAttribute('type', 'button');\n this._closeButton.classList.add(CLASS_CLOSE_BUTTON);\n if (this._content) {\n this._content.appendChild(this._closeButton);\n }\n\n if (this._element.hasAttribute(ATTR_OPENDELAY)) {\n let delay = parseInt(this._element.getAttribute(ATTR_OPENDELAY));\n this._element.classList.add(CLASS_IS_CLOSED);\n this.openingTimeout = setTimeout(() => this.open(true), delay);\n } else {\n this.open();\n }\n\n this._resizeObserver = new ResizeObserver();\n this._resizeObserver.resized.add(this._resizedHandler = () => this.update());\n\n this.update();\n }\n\n /**\n * Open an Alert\n * @param {boolean} animate True, if the opening should be animated. Default: false\n */\n open(animate) {\n animate = animate || false;\n this._element.addEventListener('click', this._clickHandler = (event) => this._onClick(event));\n if (animate) {\n this._animateOpen();\n } else {\n this._element.classList.add(CLASS_IS_OPEN);\n this._element.classList.remove(CLASS_IS_CLOSED);\n }\n }\n\n /**\n * Animate opening of Alert\n */\n _animateOpen() {\n clearTimeout(this.openingTimeout);\n // Loop until start height is set and correctly rendered\n if (window.getComputedStyle(this._element).height && this._element.style.height) {\n this._element.classList.add(CLASS_IS_OPEN);\n this._element.classList.remove(CLASS_IS_CLOSED);\n } else {\n window.requestAnimationFrame(() => this._animateOpen());\n }\n }\n\n /**\n * Close this Alert\n */\n close() {\n this._element.removeEventListener('click', this._clickHandler);\n this._element.style.height = `${this._content.offsetHeight}px`;\n this._animateClose();\n }\n\n /**\n * Animate closing of Alert\n */\n _animateClose() {\n clearTimeout(this.openingTimeout);\n // Loop until start height is set and correctly rendered\n if (window.getComputedStyle(this._element).height && this._element.style.height) {\n this._element.classList.remove(CLASS_IS_OPEN);\n this._element.classList.add(CLASS_IS_CLOSED);\n } else {\n window.requestAnimationFrame(() => this._animateClose());\n }\n }\n\n /**\n * Update Alert.\n * Equalize element height with containing content.\n */\n update() {\n this._element.style.height = `${this._content.offsetHeight}px`;\n }\n\n /**\n * Handle click of element.\n * @param {Event} event The event that fired.\n * @private\n */\n _onClick(event) {\n if (event.target.classList.contains(CLASS_CLOSE_BUTTON) || event.target.hasAttribute(ATTR_CLOSE)) {\n this.close();\n }\n }\n\n /**\n * Dispose component\n */\n dispose() {\n super.dispose();\n clearTimeout(this.openingTimeout);\n this._element.classList.remove(CLASS_IS_CLOSED);\n this._element.classList.remove(CLASS_IS_OPEN);\n this._element.removeEventListener('click', this._clickHandler);\n this._element.style.height = '';\n this.removeChild(this._closeButton);\n this.resizeObserver.resized.remove(this._resizedHandler);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/alert/alert.js\n **/","const CLASS_IS_UPGRADED = 'is-upgraded';\n\nconst SVG_NS = 'http://www.w3.org/2000/svg';\n\n/**\n * Class constructor for abstract AUI Component.\n * Implements AUI component design pattern defined at:\n * https://github.com/...\n *\n * @param {HTMLElement} element The element that will be upgraded.\n */\nexport default class Component {\n\n /**\n * Check if an element is upgraded.\n * @param {HTMLElement} element The element to test if its already be upgraded.\n * @returns {boolean} Returns true if element is already upgraded\n */\n static isElementUpgraded(element) {\n return element.classList.contains(CLASS_IS_UPGRADED);\n }\n\n /**\n * Constructor\n * @constructor\n * @param {HTMLElement} element The element of the AUI component.\n * @param {String} namespace The namespace of the AUI component, like `auiComponent`.\n */\n constructor(element, namespace) {\n this._element = element;\n\n if (this._element) {\n if (namespace) {\n this._element[namespace] = this;\n }\n this.init();\n }\n }\n\n /**\n * Initialize component\n */\n init() {\n this._element.classList.add(CLASS_IS_UPGRADED);\n }\n\n /**\n * Dispose component\n */\n dispose() {\n this._element.classList.remove(CLASS_IS_UPGRADED);\n }\n\n /**\n * Remove a child element from its parent.\n * @param {HTMLElement} childNode The element to remove.\n */\n removeChild(childNode) {\n if (childNode && childNode.parentNode) {\n if (this.isIE()) {\n childNode.removeNode(true);\n } else {\n childNode.remove();\n }\n }\n }\n\n /**\n * Creates an HTML element and sets the given CSS classes and attributes.\n * @param {string} tagName is a string that specifies the type of element to be created.\n * @param {Array} classes is an array of class names to set, e.g. ['aui-class-1', 'aui-class-2'].\n * @param {Object} attributes is an object with attributes to set, e.g. {width: 100}.\n * @returns {HTMLElement} The created element.\n */\n createElement(tagName, classes, attributes) {\n let element = document.createElement(tagName);\n if (classes && classes.length) {\n element.classList.add.apply(element.classList, classes);\n }\n for (var attr in attributes) {\n element.setAttribute(attr, attributes[attr]);\n }\n return element;\n }\n\n /**\n * Creates an SVG element and sets the given attributes.\n * @param {string} qualifiedName is a string that specifies the type of element to be created.\n * @param {Object} attributes is an object with attributes to set, e.g. {width: 100}.\n * @returns {SVGElement} The created element.\n */\n createSvgNode(qualifiedName, attributes) {\n let element = document.createElementNS(SVG_NS, qualifiedName);\n for (var attr in attributes) {\n element.setAttributeNS(\n null,\n // Replaces viewBox with view-box\n // attr.replace(/[A-Z]/g, function(match) {\n // return '-' + match.toLowerCase();\n // }),\n attr,\n attributes[attr]\n );\n }\n return element;\n }\n\n /**\n * Returns the HTMLElement of component.\n */\n get element() {\n return this._element;\n }\n\n /**\n * Returns boolean if browser is Internet Explorer. Other browser (also Edge) return false.\n */\n isIE() {\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older\n return true;\n }\n\n var trident = ua.indexOf('Trident/');\n if (trident > 0) {\n // IE 11\n var rv = ua.indexOf('rv:');\n return true;\n }\n\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+)\n return false;\n }\n\n // other browser\n return false;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/component/component.js\n **/","import Signal from '../util/signal';\n\nlet instance = null;\n\nexport default class ResizeObserver {\n\n constructor() {\n if (!instance) {\n instance = this;\n this.init();\n }\n\n return instance;\n }\n\n init() {\n this._ticking = false;\n\n this.resized = new Signal();\n\n window.addEventListener('resize', this._resizeHandler = (event) => this._onResize(event));\n }\n\n _onResize(event) {\n if (!this._ticking) {\n window.requestAnimationFrame(() => {\n this._ticking = false;\n this.resized.dispatch();\n });\n }\n this._ticking = true;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/util/resize-observer.js\n **/","// TODO Fork https://github.com/thomaseckhardt/js-signals translate to ES6\n\nclass SignalBinding {\n\n constructor(signal, listener, isOnce, priority) {\n // Handler function bound to the signal.\n this._listener = listener;\n\n // If binding should be executed just once.\n this._isOnce = isOnce;\n\n // Reference to Signal object that listener is currently bound to.\n this._signal = signal;\n\n // Listener priority\n this._priority = priority || 0;\n\n // If binding is active and should be executed.\n this._active = true;\n }\n\n _isBound() {\n return (!!this._signal && !!this._listener);\n }\n\n /**\n * Call listener passing arbitrary parameters.\n * If binding was added using `Signal.addOnce()` it will be automatically\n * removed from signal dispatch queue, this method is used internally for\n * the signal dispatch.\n * @param {Array} Array of parameters that should be passed to the listener\n * @return {*} Value returned by the listener.\n */\n execute(params) {\n let handlerReturn;\n if (this._active && !!this._listener) {\n handlerReturn = this._listener.apply(this._context, params);\n if (this._isOnce) {\n this.detach();\n }\n }\n return handlerReturn;\n }\n\n /**\n * Detach binding from signal.\n * - alias to: mySignal.remove(myBinding.getListener());\n * @return {Function|null} Handler function bound to the signal or `null` if binding was previously detached.\n */\n detach() {\n return this._isBound() ? this._signal.remove(this._listener) : null;\n }\n\n get isOnce() {\n return this._isOnce;\n }\n\n get listener() {\n return this._listener;\n }\n\n get signal() {\n return this._signal;\n }\n\n get priority() {\n return this._priority;\n }\n\n dispose() {\n delete this._signal;\n delete this._listener;\n }\n\n toString() {\n return '[SignalBinding isOnce:' + this._isOnce + ', isBound:' + this.isBound() + ', active:' + this._active + ']';\n }\n}\n\n\nclass Signal {\n\n constructor() {\n this._bindings = [];\n this._prevParams = null;\n this._active = true;\n }\n\n /**\n * Add a listener to the signal.\n * @param {Function} listener Signal handler function.\n * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function).\n * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0)\n * @return {SignalBinding} An Object representing the binding between the Signal and listener.\n */\n add(listener, priority) {\n this._validateListener(listener, 'add');\n return this._registerListener(listener, false, priority);\n }\n\n addOnce(listener, priority) {\n this._validateListener(listener, 'addOnce');\n return this._registerListener(listener, true, priority);\n }\n\n remove(listener) {\n this._validateListener(listener, 'remove');\n\n var i = this._indexOfListener(listener);\n if (i !== -1) {\n this._bindings[i].dispose(); //no reason to a SignalBinding exist if it isn't attached to a signal\n this._bindings.splice(i, 1);\n }\n return listener;\n }\n\n removeAll() {\n let n = this._bindings.length;\n while (n--) {\n this._bindings[n].dispose();\n }\n this._bindings.length = 0;\n }\n\n has(listener) {\n return this._indexOfListener(listener) !== -1;\n }\n\n dispatch() {\n if (!this._active) {\n return;\n }\n\n let n = this._bindings.length;\n if (!n) {\n return;\n }\n\n let params = Array.prototype.slice.call(arguments);\n let bindings;\n\n bindings = this._bindings.slice(); //clone array in case add/remove items during dispatch\n\n //execute all callbacks until end of the list or until a callback returns `false` or stops propagation\n //reverse loop since listeners with higher priority will be added at the end of the list\n do {\n n--;\n } while (bindings[n] && bindings[n].execute(params) !== false);\n }\n\n dispose() {\n this.removeAll();\n delete this._bindings;\n delete this._prevParams;\n }\n\n _registerListener(listener, isOnce, priority) {\n let prevIndex = this._indexOfListener(listener);\n let binding;\n\n if (prevIndex !== -1) {\n binding = this._bindings[prevIndex];\n if (binding.isOnce() !== isOnce) {\n throw new Error(`You cannot add${isOnce ? '' : 'Once'}() then add${!isOnce ? '' : 'Once'}() the same listener without removing the relationship first.`);\n }\n } else {\n binding = new SignalBinding(this, listener, isOnce, priority);\n this._addBinding(binding);\n }\n\n if (this.memorize && this._prevParams) {\n binding.execute(this._prevParams);\n }\n\n return binding;\n }\n\n _validateListener(listener, fnName) {\n if (typeof listener !== 'function') {\n throw new Error(`listener is a required param of ${fnName}() and should be a Function.`);\n }\n }\n\n _indexOfListener(listener) {\n let n = this._bindings.length;\n let current;\n while (n--) {\n current = this._bindings[n];\n if (current.listener === listener) {\n return n;\n }\n }\n return -1;\n }\n\n _addBinding(binding) {\n var n = this._bindings.length;\n do {\n --n;\n } while (this._bindings[n] && binding.priority <= this._bindings[n].priority);\n this._bindings.splice(n + 1, 0, binding);\n }\n}\n\nexport default Signal;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/util/signal.js\n **/","import Component from '../component/component';\nimport Popover from './../popover/popover';\n\nconst SELECTOR_COMPONENT = '.aui-audioplayer';\n\nexport default class Audioplayer extends Component {\n\n /**\n * Upgrades all Audioplayer components.\n * @returns {Array} Returns an array of all newly upgraded components.\n */\n static upgradeElements() {\n let components = [];\n Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => {\n if (!Component.isElementUpgraded(element)) {\n components.push(new Audioplayer(element));\n }\n });\n return components;\n };\n\n formatCurrentTime(currentTime) {\n return `${('0' + Math.floor(currentTime % 3600 / 60)).slice(-2)}:${('0' + Math.floor(currentTime % 3600 % 60)).slice(-2)}`;\n }\n\n init() {\n super.init();\n this.currentTrack = 0;\n this.scrobble = false;\n this.embed = this.element.querySelector('.aui-audioplayer__embed');\n this.embed.preload = true;\n this.tracks = JSON.parse(this.element.querySelector('.aui-audioplayer__tracks').value);\n this.embed.addEventListener('ended', (event) => {\n this.cancelProgress();\n if (this.tracks.length > 1) {\n this.next();\n } else {\n this.pause();\n this.element.classList.add('has-ended');\n }\n this.updateProgress();\n });\n this.embed.addEventListener('canplay', (event) => {\n this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.duration);\n });\n this.embed.addEventListener('timeupdate', (event) => {\n this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.currentTime);\n });\n let play = this.element.querySelector('.aui-audioplayer__play');\n if (play) {\n play.addEventListener('click', (event) => {\n if (this.isPlaying()) {\n this.pause();\n } else {\n this.play();\n }\n });\n }\n let mute = this.element.querySelector('.aui-audioplayer__mute');\n if (mute) {\n mute.addEventListener('click', (event) => {\n if (this.isMuted()) {\n this.unmute();\n } else {\n this.mute();\n }\n });\n }\n let next = this.element.querySelector('.aui-audioplayer__next');\n if (next) {\n next.addEventListener('click', (event) => {\n this.next();\n });\n }\n let previous = this.element.querySelector('.aui-audioplayer__previous');\n if (previous) {\n previous.addEventListener('click', (event) => {\n this.previous();\n });\n }\n window.setTimeout(() => {\n this.slider = this.element.querySelector('.aui-slider__target').noUiSlider;\n this.slider.on('start', () => {\n this.scrobble = true;\n });\n this.slider.on('end', () => {\n this.scrobble = false;\n });\n this.slider.on('change', (value) => {\n this.embed.currentTime = ((Math.abs(value) * this.embed.duration) / 100);\n });\n }, 400);\n }\n\n isMuted() {\n return this.embed.muted;\n }\n\n isPlaying() {\n return !this.embed.paused;\n }\n\n mute() {\n this.element.classList.add('is-mute');\n this.embed.muted = true;\n }\n\n next() {\n if (this.tracks.length > 1) {\n let restartPlayback = this.isPlaying();\n this.pause();\n\n if (this.currentTrack >= this.tracks.length - 1) {\n this.currentTrack = 0;\n } else {\n this.currentTrack = this.currentTrack + 1;\n }\n this.embed.src = this.tracks[this.currentTrack].src;\n this.embed.load();\n this.slider.set(0);\n this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.duration);\n if (restartPlayback) this.play();\n\n this.element.querySelector('.aui-audioplayer__time').innerHTML = '00:00';\n this.element.querySelector('.aui-audioplayer__title').innerHTML = this.tracks[this.currentTrack].title;\n let cover = this.element.querySelector('.aui-audioplayer__cover');\n if (cover) {\n cover.querySelector('.aui-audioplayer__cover-image').setAttribute('src', this.tracks[this.currentTrack].cover);\n }\n }\n }\n\n pause() {\n this.cancelProgress();\n this.element.classList.remove('is-playing');\n this.embed.pause();\n }\n\n play() {\n this.updateProgress();\n this.element.classList.add('is-playing');\n this.element.classList.remove('has-ended');\n this.embed.play();\n }\n\n previous() {\n if (this.tracks.length > 1) {\n let restartPlayback = this.isPlaying();\n this.pause();\n\n if (this.currentTrack === 0) {\n this.currentTrack = this.tracks.length - 1;\n } else {\n this.currentTrack = this.currentTrack - 1;\n }\n this.embed.src = this.tracks[this.currentTrack].src;\n this.embed.load();\n this.slider.set(0);\n this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.duration);\n if (restartPlayback) this.play();\n\n this.element.querySelector('.aui-audioplayer__time').innerHTML = '00:00';\n this.element.querySelector('.aui-audioplayer__title').innerHTML = this.tracks[this.currentTrack].title;\n let cover = this.element.querySelector('.aui-audioplayer__cover');\n if (cover) {\n cover.querySelector('.aui-audioplayer__cover-image').setAttribute('src', this.tracks[this.currentTrack].cover);\n }\n }\n }\n\n unmute() {\n this.element.classList.remove('is-mute');\n this.embed.muted = false;\n }\n\n cancelProgress() {\n if (this.tick) {\n window.cancelAnimationFrame(this.tick);\n this.tick = undefined;\n }\n }\n\n updateProgress() {\n this.tick = window.requestAnimationFrame(() => {\n if(!this.scrobble) this.slider.set(Math.abs((this.embed.currentTime * 100) / this.embed.duration));\n this.updateProgress();\n });\n }\n\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/audioplayer/audioplayer.js\n **/","import Component from '../component/component';\nimport reflow from '../util/reflow';\nimport closest from '../util/closest';\nimport transitionend from '../util/transition-end-event';\nimport Tether from 'tether';\n\nconst SELECTOR_COMPONENT = '.aui-js-popover';\nconst SELECTOR_DISMISS = '[data-dismiss=\"popover\"]';\nconst CLASS_ARROW = 'aui-popover__arrow';\nconst CLASS_ARROW_SHAPE = 'aui-popover__arrow-shape';\nconst CLASS_ACTIVE = 'is-active';\nconst CLASS_SHOWN = 'is-shown';\nconst CLASS_POPOVER_IS_OPEN = 'aui-popover-is-open';\nconst ARROW_SIZE = 20;\n\nconst AttachmentMap = {\n top: 'bottom center',\n right: 'middle left',\n bottom: 'top center',\n left: 'middle right'\n}\n\n/**\n * Class constructor for Popover AUI component.\n * Implements AUI component design pattern defined at:\n * https://github.com/...\n *\n * @param {HTMLElement} element The element that will be upgraded.\n */\nexport default class Popover extends Component {\n\n /**\n * Upgrades all Popover AUI components.\n * @returns {Array} Returns an array of all newly upgraded components.\n */\n static upgradeElements() {\n let components = [];\n Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => {\n if (!Component.isElementUpgraded(element)) {\n components.push(new Popover(element));\n }\n });\n return components;\n };\n\n /**\n * Initialize component\n */\n init() {\n super.init();\n\n this._body = document.querySelector('body');\n\n this._id = this._element.getAttribute('id');\n this._trigger = document.getElementById(this._element.getAttribute('for'));\n this._tether = null;\n const placement = this._element.hasAttribute('data-placement') ? this._element.getAttribute('data-placement') : 'top';\n this._attachement = AttachmentMap[placement.toLowerCase()];\n\n const content = this._element.querySelector('.aui-popover__content');\n const arrowColor = this._element.hasAttribute('data-arrow-color') ? this._element.getAttribute('data-arrow-color') : window.getComputedStyle(content).backgroundColor;\n this._arrow = this._addArrow(content, arrowColor);\n\n if (this._trigger) {\n this._trigger.addEventListener('click', this._boundClickHandler = (event) => this.toggle(event));\n }\n }\n\n /**\n * Dispose component\n */\n dispose() {\n super.dispose();\n\n this.hide();\n this.removeChild(this._arrow);\n\n if (this._trigger) {\n this._trigger.removeEventListener('click', this._boundClickHandler);\n }\n }\n\n /**\n * Toggle show/hide Popover\n * @param {Event} event Click event of trigger element (optional)\n */\n toggle(event) {\n const performToggle = () => {\n if (!this._element.classList.contains(CLASS_ACTIVE) && this._tether) {\n this.show();\n } else {\n this.hide();\n }\n };\n\n if (event) {\n event.preventDefault();\n\n if (this._tether === null) {\n this._tether = new Tether({\n element: this._element,\n target: event.currentTarget,\n attachment: this._attachement,\n classPrefix: 'aui-tether',\n // NOTE We set an offset in CSS, because this offset wouln't be\n // flipped as it should:\n // https://github.com/HubSpot/tether/issues/106\n offset: '0 0',\n constraints: [{\n to: 'window',\n pin: ['left', 'right'],\n attachment: 'together'\n }],\n optimizations: {\n gpu: false\n }\n });\n reflow(this._element); // REVIEW Do we need this anymore?\n this._tether.position();\n }\n performToggle();\n\n } else {\n performToggle();\n }\n }\n\n /**\n * Show Popover\n */\n show() {\n this._body.classList.add(CLASS_POPOVER_IS_OPEN);\n this._element.classList.add(CLASS_ACTIVE);\n this._element.classList.add(CLASS_SHOWN);\n setTimeout(() => {\n window.addEventListener('click', this._boundWindowClickHandler = (event) => this._onClickOutside(event));\n })\n }\n\n /**\n * Hide Popover\n */\n hide() {\n this._element.classList.remove(CLASS_SHOWN);\n this._element.addEventListener(transitionend, this._boundAnimationendHandler = (event) => this._onHideComplete(event));\n window.removeEventListener('click', this._boundWindowClickHandler);\n }\n\n /**\n * Clean up Tether instance\n * @private\n */\n _cleanupTether() {\n if (this._tether) {\n this._tether.destroy();\n this._tether = null;\n }\n this._element.removeAttribute('style');\n }\n\n /**\n * Handle click of window.\n * @param {Event} event The event that fired.\n * @private\n */\n _onClickOutside(event) {\n // Hide if target dismisses Popover\n if (closest(event.target, SELECTOR_DISMISS, this._element)) {\n this.hide();\n\n // Hide if target is not inside Popover and is not a trigger element\n } else if (!this._element.contains(event.target) && event.target !== this._trigger) {\n this.hide();\n }\n }\n\n /**\n * Handle hide transition complete.\n * @param {Event} event The event that fired.\n * @private\n */\n _onHideComplete(event) {\n this._body.classList.remove(CLASS_POPOVER_IS_OPEN);\n this._element.classList.remove(CLASS_ACTIVE);\n this._element.removeEventListener(transitionend, this._boundAnimationendHandler);\n this._cleanupTether();\n }\n\n /**\n * Adds an arrow SVG element\n * \n *\n * @param {HTMLElement} parent element to append arrow to.\n * @param {string} color used as value of fill property.\n * @returns {HTMLElement} the added arrow element.\n */\n _addArrow(parent, color) {\n const element = document.createElement('span');\n element.classList.add(CLASS_ARROW);\n const svg = this.createSvgNode('svg', {\n class: CLASS_ARROW_SHAPE,\n width: ARROW_SIZE,\n height: ARROW_SIZE,\n viewBox: `0 0 ${ARROW_SIZE} ${ARROW_SIZE}`\n });\n // Draw a diamond square ◆\n const path = this.createSvgNode('path', {\n d: `M${ARROW_SIZE / 2} 0 L ${ARROW_SIZE} ${ARROW_SIZE / 2} L ${ARROW_SIZE / 2} ${ARROW_SIZE} L 0 ${ARROW_SIZE / 2} Z`,\n fill: color\n });\n svg.appendChild(path);\n element.appendChild(svg);\n parent.appendChild(element);\n return element;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/popover/popover.js\n **/","/**\n * Trigger a reflow\n * @param {HTMLElement} element to trigger a reflow.\n */\nexport default function reflow(element) {\n new Function('bs', 'return bs')(element.offsetHeight);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/util/reflow.js\n **/","/**\n * Get the first element that matches the selector by testing the element itself\n * and traversing up through its ancestors in the DOM tree.\n * @param {HTMLElement} element to search wherefrom\n * @param {string} selector A string containing a selector expression to match elements against.\n * @param {HTMLElement} context A DOM element within which a matching element may be found.\n * @returns {HTMLElement} found element or null\n */\nexport default function closest(element, selector, context) {\n let matchesFn;\n\n ['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'].some(function(fn) {\n if (typeof document.body[fn] === 'function') {\n matchesFn = fn;\n return true;\n }\n return false;\n });\n\n let parent;\n\n // traverse parents\n parent = element;\n while (parent) {\n if (parent && parent[matchesFn](selector)) {\n return parent;\n }\n if (parent === context) {\n return null;\n }\n parent = parent.parentElement;\n }\n\n return null;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/util/closest.js\n **/","// From Modernizr\nfunction whichTransitionEvent() {\n var t;\n var el = document.createElement('fakeelement');\n var transitions = {\n 'transition': 'transitionend',\n 'OTransition': 'oTransitionEnd',\n 'MozTransition': 'transitionend',\n 'WebkitTransition': 'webkitTransitionEnd'\n }\n\n for (t in transitions) {\n if (el.style[t] !== undefined) {\n return transitions[t];\n }\n }\n}\n\nconst TRANSITION_EVENT = whichTransitionEvent();\n\nexport default TRANSITION_EVENT;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/eslint-loader!./src/util/transition-end-event.js\n **/","/*! tether 1.4.4 */\n\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.Tether = factory();\n }\n}(this, function() {\n\n'use strict';\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar TetherBase = undefined;\nif (typeof TetherBase === 'undefined') {\n TetherBase = { modules: [] };\n}\n\nvar zeroElement = null;\n\n// Same as native getBoundingClientRect, except it takes into account parent offsets\n// if the element lies within a nested document ( or