{"version":3,"file":"ractive-legacy.min.js","sources":["ractive-legacy.js"],"sourcesContent":["/*\n\tRactive.js v0.8.12-edge\n\tMon Mar 13 2017 21:00:09 GMT+0000 (UTC) - commit 576b7e894bca04f772f11f428a135be41474ebd4\n\n\thttp://ractivejs.org\n\thttp://twitter.com/RactiveJS\n\n\tReleased under the MIT License.\n*/\n\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t((function() { var current = global.Ractive; var next = factory(); next.noConflict = function() { global.Ractive = current; return next; }; return global.Ractive = next; })());\n}(this, function () { 'use strict';\n\n\tvar defaults = {\n\t\t// render placement:\n\t\tel: void 0,\n\t\tappend:\t\t\t\t false,\n\n\t\t// template:\n\t\ttemplate: null,\n\n\t\t// parse:\n\t\tdelimiters: [ '{{', '}}' ],\n\t\ttripleDelimiters: [ '{{{', '}}}' ],\n\t\tstaticDelimiters: [ '[[', ']]' ],\n\t\tstaticTripleDelimiters: [ '[[[', ']]]' ],\n\t\tcsp: \t\t\t\t\ttrue,\n\t\tinterpolate: false,\n\t\tpreserveWhitespace: false,\n\t\tsanitize: false,\n\t\tstripComments: true,\n\t\tcontextLines: 0,\n\n\t\t// data & binding:\n\t\tdata: {},\n\t\tcomputed: {},\n\t\tmagic: false,\n\t\tmodifyArrays: false,\n\t\tadapt: [],\n\t\tisolated: false,\n\t\ttwoway: true,\n\t\tlazy: false,\n\n\t\t// transitions:\n\t\tnoIntro: false,\n\t\ttransitionsEnabled: true,\n\t\tcomplete: void 0,\n\n\t\t// css:\n\t\tcss: null,\n\t\tnoCssTransform: false\n\t};\n\n\t// These are a subset of the easing equations found at\n\t// https://raw.github.com/danro/easing-js - license info\n\t// follows:\n\n\t// --------------------------------------------------\n\t// easing.js v0.5.4\n\t// Generic set of easing functions with AMD support\n\t// https://github.com/danro/easing-js\n\t// This code may be freely distributed under the MIT license\n\t// http://danro.mit-license.org/\n\t// --------------------------------------------------\n\t// All functions adapted from Thomas Fuchs & Jeremy Kahn\n\t// Easing Equations (c) 2003 Robert Penner, BSD license\n\t// https://raw.github.com/danro/easing-js/master/LICENSE\n\t// --------------------------------------------------\n\n\t// In that library, the functions named easeIn, easeOut, and\n\t// easeInOut below are named easeInCubic, easeOutCubic, and\n\t// (you guessed it) easeInOutCubic.\n\t//\n\t// You can add additional easing functions to this list, and they\n\t// will be globally available.\n\n\n\tvar easing = {\n\t\tlinear: function ( pos ) { return pos; },\n\t\teaseIn: function ( pos ) { return Math.pow( pos, 3 ); },\n\t\teaseOut: function ( pos ) { return ( Math.pow( ( pos - 1 ), 3 ) + 1 ); },\n\t\teaseInOut: function ( pos ) {\n\t\t\tif ( ( pos /= 0.5 ) < 1 ) { return ( 0.5 * Math.pow( pos, 3 ) ); }\n\t\t\treturn ( 0.5 * ( Math.pow( ( pos - 2 ), 3 ) + 2 ) );\n\t\t}\n\t};\n\n\t/*global console, navigator */\n\n\tvar win = typeof window !== 'undefined' ? window : null;\n\tvar doc = win ? document : null;\n\n\tvar isClient = !!doc;\n\tvar isJsdom = ( typeof navigator !== 'undefined' && /jsDom/.test( navigator.appName ) );\n\tvar hasConsole = ( typeof console !== 'undefined' && typeof console.warn === 'function' && typeof console.warn.apply === 'function' );\n\n\tvar magicSupported;\n\ttry {\n\t\tObject.defineProperty({}, 'test', { value: 0 });\n\t\tmagicSupported = true;\n\t} catch ( e ) {\n\t\tmagicSupported = false;\n\t}\n\n\tvar svg = doc ?\n\t\tdoc.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1' ) :\n\t\tfalse;\n\n\tvar vendors = [ 'o', 'ms', 'moz', 'webkit' ];\n\n\tfunction noop () {}\n\n\tvar exportedShims;\n\n\tif ( !win ) {\n\t\texportedShims = null;\n\t} else {\n\t\texportedShims = {};\n\n\t\t// Shims for older browsers\n\n\t\tif ( !Date.now ) {\n\t\t\tDate.now = function () { return +new Date(); };\n\t\t}\n\n\t\tif ( !String.prototype.trim ) {\n\t\t\tString.prototype.trim = function () {\n\t\t\t\treturn this.replace(/^\\s+/, '').replace(/\\s+$/, '');\n\t\t\t};\n\t\t}\n\n\t\t// Polyfill for Object.create\n\t\tif ( !Object.create ) {\n\t\t\tObject.create = (function () {\n\t\t\t\tvar Temp = function () {};\n\t\t\t\treturn function ( prototype, properties ) {\n\t\t\t\t\tif ( typeof prototype !== 'object' ) {\n\t\t\t\t\t\tthrow new TypeError( 'Prototype must be an object' );\n\t\t\t\t\t}\n\t\t\t\t\tTemp.prototype = prototype;\n\t\t\t\t\tvar result = new Temp();\n\t\t\t\t\tdefineProperties( result, properties );\n\t\t\t\t\tTemp.prototype = null;\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t})();\n\t\t}\n\n\t\t// Polyfill Object.defineProperty\n\t\tif ( !Object.defineProperty ) {\n\t\t\tObject.defineProperty = defineProperty;\n\t\t}\n\n\t\tif ( !Object.freeze ) {\n\t\t\tObject.freeze = function () { 'LOL'; };\n\t\t}\n\n\t\t// Polyfill for Object.keys\n\t\t// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/keys\n\t\tif ( !Object.keys ) {\n\t\t\tObject.keys = (function () {\n\t\t\t\tvar hasOwnProperty = Object.prototype.hasOwnProperty,\n\t\t\t\t\thasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),\n\t\t\t\t\tdontEnums = [\n\t\t\t\t\t\t'toString',\n\t\t\t\t\t\t'toLocaleString',\n\t\t\t\t\t\t'valueOf',\n\t\t\t\t\t\t'hasOwnProperty',\n\t\t\t\t\t\t'isPrototypeOf',\n\t\t\t\t\t\t'propertyIsEnumerable',\n\t\t\t\t\t\t'constructor'\n\t\t\t\t\t],\n\t\t\t\t\tdontEnumsLength = dontEnums.length;\n\n\t\t\t\treturn function ( obj ) {\n\t\t\t\t\tif ( typeof obj !== 'object' && typeof obj !== 'function' || obj === null ) {\n\t\t\t\t\t\tthrow new TypeError( 'Object.keys called on non-object' );\n\t\t\t\t\t}\n\n\t\t\t\t\tvar result = [];\n\n\t\t\t\t\tfor ( var prop in obj ) {\n\t\t\t\t\t\tif ( hasOwnProperty.call( obj, prop ) ){\n\t\t\t\t\t\t\tresult.push( prop );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasDontEnumBug ) {\n\t\t\t\t\t\tfor ( var i=0; i < dontEnumsLength; i++ ) {\n\t\t\t\t\t\t\tif ( hasOwnProperty.call( obj, dontEnums[i] ) ){\n\t\t\t\t\t\t\t\tresult.push( dontEnums[i] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t}());\n\t\t}\n\n\t\t// TODO: use defineProperty to make these non-enumerable\n\n\t\t// Array extras\n\t\tif ( !Array.prototype.indexOf ) {\n\t\t\tArray.prototype.indexOf = function ( needle, i ) {\n\t\t\t\tvar this$1 = this;\n\n\t\t\t\tvar len;\n\n\t\t\t\tif ( i === undefined ) {\n\t\t\t\t\ti = 0;\n\t\t\t\t}\n\n\t\t\t\tif ( i < 0 ) {\n\t\t\t\t\ti+= this.length;\n\t\t\t\t}\n\n\t\t\t\tif ( i < 0 ) {\n\t\t\t\t\ti = 0;\n\t\t\t\t}\n\n\t\t\t\tfor ( len = this$1.length; i 1 ) {\n\t\t\t\t\tvalue = opt_initialValue;\n\t\t\t\t\tvalueIsSet = true;\n\t\t\t\t}\n\n\t\t\t\tfor ( i = 0; i < len; i += 1) {\n\t\t\t\t\tif ( this$1.hasOwnProperty( i ) ) {\n\t\t\t\t\t\tif ( valueIsSet ) {\n\t\t\t\t\t\t\tvalue = callback(value, this$1[i], i, this$1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = this$1[i];\n\t\t\t\t\t\tvalueIsSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !valueIsSet ) {\n\t\t\t\t\tthrow new TypeError( 'Reduce of empty array with no initial value' );\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t};\n\t\t}\n\n\t\tif ( !Array.prototype.filter ) {\n\t\t\tArray.prototype.filter = function ( filter, context ) {\n\t\t\t\tvar this$1 = this;\n\n\t\t\t\tvar i, len, filtered = [];\n\n\t\t\t\tfor ( i=0, len=this$1.length; i>> 0;\n\n\t\t\t\tif ( typeof iterator !== 'function' ) {\n\t\t\t\t\tthrow new TypeError();\n\t\t\t\t}\n\n\t\t\t\tfor ( i = 0; i < len; i += 1 ) {\n\t\t\t\t\tif ( i in t && !iterator.call( context, t[i], i, t) ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\n\t\tif ( typeof Function.prototype.bind !== 'function' ) {\n\t\t\tFunction.prototype.bind = function ( context ) {\n\t\t\t\tvar args, fn, Empty, bound, slice = [].slice;\n\n\t\t\t\tif ( typeof this !== 'function' ) {\n\t\t\t\t\tthrow new TypeError( 'Function.prototype.bind called on non-function' );\n\t\t\t\t}\n\n\t\t\t\targs = slice.call( arguments, 1 );\n\t\t\t\tfn = this;\n\t\t\t\tEmpty = function () {};\n\n\t\t\t\tbound = function () {\n\t\t\t\t\tvar ctx = this instanceof Empty && context ? this : context;\n\t\t\t\t\treturn fn.apply( ctx, args.concat( slice.call( arguments ) ) );\n\t\t\t\t};\n\n\t\t\t\tEmpty.prototype = this.prototype;\n\t\t\t\tbound.prototype = new Empty();\n\n\t\t\t\treturn bound;\n\t\t\t};\n\t\t}\n\n\t\t// https://gist.github.com/Rich-Harris/6010282 via https://gist.github.com/jonathantneal/2869388\n\t\t// addEventListener polyfill IE6+\n\t\tif ( !win.addEventListener ) {\n\t\t\t((function(win, doc) {\n\t\t\t\tvar Event, addEventListener, removeEventListener, head, style, origCreateElement;\n\n\t\t\t\t// because sometimes inquiring minds want to know\n\t\t\t\twin.appearsToBeIELessEqual8 = true;\n\n\t\t\t\tEvent = function ( e, element ) {\n\t\t\t\t\tvar property, instance = this;\n\n\t\t\t\t\tfor ( property in e ) {\n\t\t\t\t\t\tinstance[ property ] = e[ property ];\n\t\t\t\t\t}\n\n\t\t\t\t\tinstance.currentTarget = element;\n\t\t\t\t\tinstance.target = e.srcElement || element;\n\t\t\t\t\tinstance.timeStamp = +new Date();\n\n\t\t\t\t\tinstance.preventDefault = function () {\n\t\t\t\t\t\te.returnValue = false;\n\t\t\t\t\t};\n\n\t\t\t\t\tinstance.stopPropagation = function () {\n\t\t\t\t\t\te.cancelBubble = true;\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\taddEventListener = function ( type, listener ) {\n\t\t\t\t\tvar element = this, listeners, i;\n\n\t\t\t\t\tlisteners = element.listeners || ( element.listeners = [] );\n\t\t\t\t\ti = listeners.length;\n\n\t\t\t\t\tlisteners[i] = [ listener, function (e) {\n\t\t\t\t\t\tlistener.call( element, new Event( e, element ) );\n\t\t\t\t\t}];\n\n\t\t\t\t\telement.attachEvent( 'on' + type, listeners[i][1] );\n\t\t\t\t};\n\n\t\t\t\tremoveEventListener = function ( type, listener ) {\n\t\t\t\t\tvar element = this, listeners, i;\n\n\t\t\t\t\tif ( !element.listeners ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlisteners = element.listeners;\n\t\t\t\t\ti = listeners.length;\n\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif (listeners[i][0] === listener) {\n\t\t\t\t\t\t\telement.detachEvent( 'on' + type, listeners[i][1] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\twin.addEventListener = doc.addEventListener = addEventListener;\n\t\t\t\twin.removeEventListener = doc.removeEventListener = removeEventListener;\n\n\t\t\t\tif ( 'Element' in win ) {\n\t\t\t\t\twin.Element.prototype.addEventListener = addEventListener;\n\t\t\t\t\twin.Element.prototype.removeEventListener = removeEventListener;\n\t\t\t\t} else {\n\t\t\t\t\t// First, intercept any calls to document.createElement - this is necessary\n\t\t\t\t\t// because the CSS hack (see below) doesn't come into play until after a\n\t\t\t\t\t// node is added to the DOM, which is too late for a lot of Ractive setup work\n\t\t\t\t\torigCreateElement = doc.createElement;\n\n\t\t\t\t\tdoc.createElement = function ( tagName ) {\n\t\t\t\t\t\tvar el = origCreateElement( tagName );\n\t\t\t\t\t\tel.addEventListener = addEventListener;\n\t\t\t\t\t\tel.removeEventListener = removeEventListener;\n\t\t\t\t\t\treturn el;\n\t\t\t\t\t};\n\n\t\t\t\t\t// Then, mop up any additional elements that weren't created via\n\t\t\t\t\t// document.createElement (i.e. with innerHTML).\n\t\t\t\t\thead = doc.getElementsByTagName('head')[0];\n\t\t\t\t\tstyle = doc.createElement('style');\n\n\t\t\t\t\thead.insertBefore( style, head.firstChild );\n\n\t\t\t\t\t//style.styleSheet.cssText = '*{-ms-event-prototype:expression(!this.addEventListener&&(this.addEventListener=addEventListener)&&(this.removeEventListener=removeEventListener))}';\n\t\t\t\t}\n\t\t\t})( win, doc ));\n\t\t}\n\n\t\t// The getComputedStyle polyfill interacts badly with jQuery, so we don't attach\n\t\t// it to window. Instead, we export it for other modules to use as needed\n\n\t\t// https://github.com/jonathantneal/Polyfills-for-IE8/blob/master/getComputedStyle.js\n\t\tif ( !win.getComputedStyle ) {\n\t\t\texportedShims.getComputedStyle = (function () {\n\t\t\t\tvar borderSizes = {};\n\n\t\t\t\tfunction getPixelSize ( element, style, property, fontSize ) {\n\t\t\t\t\tvar sizeWithSuffix = style[property];\n\t\t\t\t\tvar size = parseFloat(sizeWithSuffix);\n\t\t\t\t\tvar suffix = sizeWithSuffix.split(/\\d/)[0];\n\n\t\t\t\t\tif ( isNaN( size ) ) {\n\t\t\t\t\t\tif ( /^thin|medium|thick$/.test( sizeWithSuffix ) ) {\n\t\t\t\t\t\t\tsize = getBorderPixelSize( sizeWithSuffix );\n\t\t\t\t\t\t\tsuffix = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// TODO...\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfontSize = fontSize != null ? fontSize : /%|em/.test(suffix) && element.parentElement ? getPixelSize(element.parentElement, element.parentElement.currentStyle, 'fontSize', null) : 16;\n\t\t\t\t\tvar rootSize = property == 'fontSize' ? fontSize : /width/i.test(property) ? element.clientWidth : element.clientHeight;\n\n\t\t\t\t\treturn (suffix == 'em') ? size * fontSize : (suffix == 'in') ? size * 96 : (suffix == 'pt') ? size * 96 / 72 : (suffix == '%') ? size / 100 * rootSize : size;\n\t\t\t\t}\n\n\t\t\t\tfunction getBorderPixelSize ( size ) {\n\t\t\t\t\tvar div, bcr;\n\n\t\t\t\t\t// `thin`, `medium` and `thick` vary between browsers. (Don't ever use them.)\n\t\t\t\t\tif ( !borderSizes[ size ] ) {\n\t\t\t\t\t\tdiv = doc.createElement( 'div' );\n\t\t\t\t\t\tdiv.style.display = 'block';\n\t\t\t\t\t\tdiv.style.position = 'fixed';\n\t\t\t\t\t\tdiv.style.width = div.style.height = '0';\n\t\t\t\t\t\tdiv.style.borderRight = size + ' solid black';\n\n\t\t\t\t\t\tdoc.getElementsByTagName( 'body' )[0].appendChild( div );\n\t\t\t\t\t\tbcr = div.getBoundingClientRect();\n\n\t\t\t\t\t\tborderSizes[ size ] = bcr.right - bcr.left;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn borderSizes[ size ];\n\t\t\t\t}\n\n\t\t\t\tfunction setShortStyleProperty(style, property) {\n\t\t\t\t\tvar borderSuffix = property == 'border' ? 'Width' : '';\n\t\t\t\t\tvar t = \"\" + property + \"Top\" + borderSuffix;\n\t\t\t\t\tvar r = \"\" + property + \"Right\" + borderSuffix;\n\t\t\t\t\tvar b = \"\" + property + \"Bottom\" + borderSuffix;\n\t\t\t\t\tvar l = \"\" + property + \"Left\" + borderSuffix;\n\n\t\t\t\t\tstyle[property] = (style[t] == style[r] == style[b] == style[l] ? [style[t]]\n\t\t\t\t\t: style[t] == style[b] && style[l] == style[r] ? [style[t], style[r]]\n\t\t\t\t\t: style[l] == style[r] ? [style[t], style[r], style[b]]\n\t\t\t\t\t: [style[t], style[r], style[b], style[l]]).join(' ');\n\t\t\t\t}\n\n\t\t\t\tvar normalProps = {\n\t\t\t\t\tfontWeight: 400,\n\t\t\t\t\tlineHeight: 1.2, // actually varies depending on font-family, but is generally close enough...\n\t\t\t\t\tletterSpacing: 0\n\t\t\t\t};\n\n\t\t\t\tfunction CSSStyleDeclaration(element) {\n\t\t\t\t\tvar currentStyle, style, fontSize, property;\n\n\t\t\t\t\tcurrentStyle = element.currentStyle;\n\t\t\t\t\tstyle = this;\n\t\t\t\t\tfontSize = getPixelSize(element, currentStyle, 'fontSize', null);\n\n\t\t\t\t\t// TODO tidy this up, test it, send PR to jonathantneal!\n\t\t\t\t\tfor (property in currentStyle) {\n\t\t\t\t\t\tif ( currentStyle[property] === 'normal' && normalProps.hasOwnProperty( property ) ) {\n\t\t\t\t\t\t\tstyle[ property ] = normalProps[ property ];\n\t\t\t\t\t\t} else if ( /width|height|margin.|padding.|border.+W/.test(property) ) {\n\t\t\t\t\t\t\tif ( currentStyle[ property ] === 'auto' ) {\n\t\t\t\t\t\t\t\tif ( /^width|height/.test( property ) ) {\n\t\t\t\t\t\t\t\t\t// just use clientWidth/clientHeight...\n\t\t\t\t\t\t\t\t\tstyle[ property ] = ( property === 'width' ? element.clientWidth : element.clientHeight ) + 'px';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\telse if ( /(?:padding)?Top|Bottom$/.test( property ) ) {\n\t\t\t\t\t\t\t\t\tstyle[ property ] = '0px';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstyle[ property ] = getPixelSize(element, currentStyle, property, fontSize) + 'px';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (property === 'styleFloat') {\n\t\t\t\t\t\t\tstyle.float = currentStyle[property];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstyle[property] = currentStyle[property];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tsetShortStyleProperty(style, 'margin');\n\t\t\t\t\tsetShortStyleProperty(style, 'padding');\n\t\t\t\t\tsetShortStyleProperty(style, 'border');\n\n\t\t\t\t\tstyle.fontSize = fontSize + 'px';\n\n\t\t\t\t\treturn style;\n\t\t\t\t}\n\n\t\t\t\tCSSStyleDeclaration.prototype = {\n\t\t\t\t\tconstructor: CSSStyleDeclaration,\n\t\t\t\t\tgetPropertyPriority: noop,\n\t\t\t\t\tgetPropertyValue: function ( prop ) {\n\t\t\t\t\t\treturn this[prop] || '';\n\t\t\t\t\t},\n\t\t\t\t\titem: noop,\n\t\t\t\t\tremoveProperty: noop,\n\t\t\t\t\tsetProperty: noop,\n\t\t\t\t\tgetPropertyCSSValue: noop\n\t\t\t\t};\n\n\t\t\t\tfunction getComputedStyle(element) {\n\t\t\t\t\treturn new CSSStyleDeclaration(element);\n\t\t\t\t}\n\n\t\t\t\treturn getComputedStyle;\n\t\t\t}());\n\t\t}\n\t}\n\n\tvar legacy = exportedShims;\n\n\tvar html = 'http://www.w3.org/1999/xhtml';\n\tvar mathml = 'http://www.w3.org/1998/Math/MathML';\n\tvar svg$1 = 'http://www.w3.org/2000/svg';\n\tvar xlink = 'http://www.w3.org/1999/xlink';\n\tvar xml = 'http://www.w3.org/XML/1998/namespace';\n\tvar xmlns = 'http://www.w3.org/2000/xmlns';\n\n\tvar namespaces = { html: html, mathml: mathml, svg: svg$1, xlink: xlink, xml: xml, xmlns: xmlns };\n\n\tvar createElement;\n\tvar matches;\n\tvar div;\n\tvar methodNames;\n\tvar unprefixed;\n\tvar prefixed;\n\tvar i;\n\tvar j;\n\tvar makeFunction;\n\t// Test for SVG support\n\tif ( !svg ) {\n\t\tcreateElement = function ( type, ns, extend ) {\n\t\t\tif ( ns && ns !== html ) {\n\t\t\t\tthrow 'This browser does not support namespaces other than http://www.w3.org/1999/xhtml. The most likely cause of this error is that you\\'re trying to render SVG in an older browser. See http://docs.ractivejs.org/latest/svg-and-older-browsers for more information';\n\t\t\t}\n\n\t\t\treturn extend ?\n\t\t\t\tdoc.createElement( type, extend ) :\n\t\t\t\tdoc.createElement( type );\n\t\t};\n\t} else {\n\t\tcreateElement = function ( type, ns, extend ) {\n\t\t\tif ( !ns || ns === html ) {\n\t\t\t\treturn extend ?\n\t\t\t\t\tdoc.createElement( type, extend ) :\n\t\t\t\t\tdoc.createElement( type );\n\t\t\t}\n\n\t\t\treturn extend ?\n\t\t\t\tdoc.createElementNS( ns, type, extend ) :\n\t\t\t\tdoc.createElementNS( ns, type );\n\t\t};\n\t}\n\n\tfunction createDocumentFragment () {\n\t\treturn doc.createDocumentFragment();\n\t}\n\n\tfunction getElement ( input ) {\n\t\tvar output;\n\n\t\tif ( !input || typeof input === 'boolean' ) { return; }\n\n\t\tif ( !win || !doc || !input ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// We already have a DOM node - no work to do. (Duck typing alert!)\n\t\tif ( input.nodeType ) {\n\t\t\treturn input;\n\t\t}\n\n\t\t// Get node from string\n\t\tif ( typeof input === 'string' ) {\n\t\t\t// try ID first\n\t\t\toutput = doc.getElementById( input );\n\n\t\t\t// then as selector, if possible\n\t\t\tif ( !output && doc.querySelector ) {\n\t\t\t\toutput = doc.querySelector( input );\n\t\t\t}\n\n\t\t\t// did it work?\n\t\t\tif ( output && output.nodeType ) {\n\t\t\t\treturn output;\n\t\t\t}\n\t\t}\n\n\t\t// If we've been given a collection (jQuery, Zepto etc), extract the first item\n\t\tif ( input[0] && input[0].nodeType ) {\n\t\t\treturn input[0];\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( !isClient ) {\n\t\tmatches = null;\n\t} else {\n\t\tdiv = createElement( 'div' );\n\t\tmethodNames = [ 'matches', 'matchesSelector' ];\n\n\t\tmakeFunction = function ( methodName ) {\n\t\t\treturn function ( node, selector ) {\n\t\t\t\treturn node[ methodName ]( selector );\n\t\t\t};\n\t\t};\n\n\t\ti = methodNames.length;\n\n\t\twhile ( i-- && !matches ) {\n\t\t\tunprefixed = methodNames[i];\n\n\t\t\tif ( div[ unprefixed ] ) {\n\t\t\t\tmatches = makeFunction( unprefixed );\n\t\t\t} else {\n\t\t\t\tj = vendors.length;\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\tprefixed = vendors[i] + unprefixed.substr( 0, 1 ).toUpperCase() + unprefixed.substring( 1 );\n\n\t\t\t\t\tif ( div[ prefixed ] ) {\n\t\t\t\t\t\tmatches = makeFunction( prefixed );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// IE8...\n\t\tif ( !matches ) {\n\t\t\tmatches = function ( node, selector ) {\n\t\t\t\tvar nodes, parentNode, i;\n\n\t\t\t\tparentNode = node.parentNode;\n\n\t\t\t\tif ( !parentNode ) {\n\t\t\t\t\t// empty dummy
\n\t\t\t\t\tdiv.innerHTML = '';\n\n\t\t\t\t\tparentNode = div;\n\t\t\t\t\tnode = node.cloneNode();\n\n\t\t\t\t\tdiv.appendChild( node );\n\t\t\t\t}\n\n\t\t\t\tnodes = parentNode.querySelectorAll( selector );\n\n\t\t\t\ti = nodes.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( nodes[i] === node ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}\n\t}\n\n\tfunction detachNode ( node ) {\n\t\tif ( node && typeof node.parentNode !== 'unknown' && node.parentNode ) {\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\n\t\treturn node;\n\t}\n\n\tfunction safeToStringValue ( value ) {\n\t\treturn ( value == null || !value.toString ) ? '' : '' + value;\n\t}\n\n\tfunction safeAttributeString ( string ) {\n\t\treturn safeToStringValue( string )\n\t\t\t.replace( /&/g, '&' )\n\t\t\t.replace( /\"/g, '"' )\n\t\t\t.replace( /'/g, ''' );\n\t}\n\n\tvar decamel = /[A-Z]/g;\n\tfunction decamelize ( string ) {\n\t\treturn string.replace( decamel, function ( s ) { return (\"-\" + (s.toLowerCase())); } );\n\t}\n\n\tvar create;\n\tvar defineProperty;\n\tvar defineProperties;\n\ttry {\n\t\tObject.defineProperty({}, 'test', { get: function() {}, set: function() {} });\n\n\t\tif ( doc ) {\n\t\t\tObject.defineProperty( createElement( 'div' ), 'test', { value: 0 });\n\t\t}\n\n\t\tdefineProperty = Object.defineProperty;\n\t} catch ( err ) {\n\t\t// Object.defineProperty doesn't exist, or we're in IE8 where you can\n\t\t// only use it with DOM objects (what were you smoking, MSFT?)\n\t\tdefineProperty = function ( obj, prop, desc ) {\n\t\t\tif ( desc.get ) obj[ prop ] = desc.get();\n\t\t\telse obj[ prop ] = desc.value;\n\t\t};\n\t}\n\n\ttry {\n\t\ttry {\n\t\t\tObject.defineProperties({}, { test: { value: 0 } });\n\t\t} catch ( err ) {\n\t\t\t// TODO how do we account for this? noMagic = true;\n\t\t\tthrow err;\n\t\t}\n\n\t\tif ( doc ) {\n\t\t\tObject.defineProperties( createElement( 'div' ), { test: { value: 0 } });\n\t\t}\n\n\t\tdefineProperties = Object.defineProperties;\n\t} catch ( err ) {\n\t\tdefineProperties = function ( obj, props ) {\n\t\t\tvar prop;\n\n\t\t\tfor ( prop in props ) {\n\t\t\t\tif ( props.hasOwnProperty( prop ) ) {\n\t\t\t\t\tdefineProperty( obj, prop, props[ prop ] );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\ttry {\n\t\tObject.create( null );\n\n\t\tcreate = Object.create;\n\t} catch ( err ) {\n\t\t// sigh\n\t\tcreate = (function () {\n\t\t\tvar F = function () {};\n\n\t\t\treturn function ( proto, props ) {\n\t\t\t\tvar obj;\n\n\t\t\t\tif ( proto === null ) {\n\t\t\t\t\treturn {};\n\t\t\t\t}\n\n\t\t\t\tF.prototype = proto;\n\t\t\t\tobj = new F();\n\n\t\t\t\tif ( props ) {\n\t\t\t\t\tObject.defineProperties( obj, props );\n\t\t\t\t}\n\n\t\t\t\treturn obj;\n\t\t\t};\n\t\t}());\n\t}\n\n\tfunction extendObj ( target ) {\n\t\tvar sources = [], len = arguments.length - 1;\n\t\twhile ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n\t\tvar prop;\n\n\t\tsources.forEach( function ( source ) {\n\t\t\tfor ( prop in source ) {\n\t\t\t\tif ( hasOwn.call( source, prop ) ) {\n\t\t\t\t\ttarget[ prop ] = source[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn target;\n\t}\n\n\tfunction fillGaps ( target ) {\n\t\tvar sources = [], len = arguments.length - 1;\n\t\twhile ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n\t\tsources.forEach( function ( s ) {\n\t\t\tfor ( var key in s ) {\n\t\t\t\tif ( hasOwn.call( s, key ) && !( key in target ) ) {\n\t\t\t\t\ttarget[ key ] = s[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn target;\n\t}\n\n\tvar hasOwn = Object.prototype.hasOwnProperty;\n\n\tvar toString = Object.prototype.toString;\n\t// thanks, http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/\n\tfunction isArray ( thing ) {\n\t\treturn toString.call( thing ) === '[object Array]';\n\t}\n\n\tfunction isEqual ( a, b ) {\n\t\tif ( a === null && b === null ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( typeof a === 'object' || typeof b === 'object' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn a === b;\n\t}\n\n\t// http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric\n\tfunction isNumeric ( thing ) {\n\t\treturn !isNaN( parseFloat( thing ) ) && isFinite( thing );\n\t}\n\n\tfunction isObject ( thing ) {\n\t\treturn ( thing && toString.call( thing ) === '[object Object]' );\n\t}\n\n\tvar alreadyWarned = {};\n\tvar log;\n\tvar printWarning;\n\tvar welcome;\n\tif ( hasConsole ) {\n\t\tvar welcomeIntro = [\n\t\t\t(\"%cRactive.js %c0.8.12-edge-576b7e894bca04f772f11f428a135be41474ebd4 %cin debug mode, %cmore...\"),\n\t\t\t'color: rgb(114, 157, 52); font-weight: normal;',\n\t\t\t'color: rgb(85, 85, 85); font-weight: normal;',\n\t\t\t'color: rgb(85, 85, 85); font-weight: normal;',\n\t\t\t'color: rgb(82, 140, 224); font-weight: normal; text-decoration: underline;'\n\t\t];\n\t\tvar welcomeMessage = \"You're running Ractive 0.8.12-edge-576b7e894bca04f772f11f428a135be41474ebd4 in debug mode - messages will be printed to the console to help you fix problems and optimise your application.\\n\\nTo disable debug mode, add this line at the start of your app:\\n Ractive.DEBUG = false;\\n\\nTo disable debug mode when your app is minified, add this snippet:\\n Ractive.DEBUG = /unminified/.test(function(){/*unminified*/});\\n\\nGet help and support:\\n http://docs.ractivejs.org\\n http://stackoverflow.com/questions/tagged/ractivejs\\n http://groups.google.com/forum/#!forum/ractive-js\\n http://twitter.com/ractivejs\\n\\nFound a bug? Raise an issue:\\n https://github.com/ractivejs/ractive/issues\\n\\n\";\n\n\t\twelcome = function () {\n\t\t\tif ( Ractive.WELCOME_MESSAGE === false ) {\n\t\t\t\twelcome = noop;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar message = 'WELCOME_MESSAGE' in Ractive ? Ractive.WELCOME_MESSAGE : welcomeMessage;\n\t\t\tvar hasGroup = !!console.groupCollapsed;\n\t\t\tif ( hasGroup ) console.groupCollapsed.apply( console, welcomeIntro );\n\t\t\tconsole.log( message );\n\t\t\tif ( hasGroup ) {\n\t\t\t\tconsole.groupEnd( welcomeIntro );\n\t\t\t}\n\n\t\t\twelcome = noop;\n\t\t};\n\n\t\tprintWarning = function ( message, args ) {\n\t\t\twelcome();\n\n\t\t\t// extract information about the instance this message pertains to, if applicable\n\t\t\tif ( typeof args[ args.length - 1 ] === 'object' ) {\n\t\t\t\tvar options = args.pop();\n\t\t\t\tvar ractive = options ? options.ractive : null;\n\n\t\t\t\tif ( ractive ) {\n\t\t\t\t\t// if this is an instance of a component that we know the name of, add\n\t\t\t\t\t// it to the message\n\t\t\t\t\tvar name;\n\t\t\t\t\tif ( ractive.component && ( name = ractive.component.name ) ) {\n\t\t\t\t\t\tmessage = \"<\" + name + \"> \" + message;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar node;\n\t\t\t\t\tif ( node = ( options.node || ( ractive.fragment && ractive.fragment.rendered && ractive.find( '*' ) ) ) ) {\n\t\t\t\t\t\targs.push( node );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconsole.warn.apply( console, [ '%cRactive.js: %c' + message, 'color: rgb(114, 157, 52);', 'color: rgb(85, 85, 85);' ].concat( args ) );\n\t\t};\n\n\t\tlog = function () {\n\t\t\tconsole.log.apply( console, arguments );\n\t\t};\n\t} else {\n\t\tprintWarning = log = welcome = noop;\n\t}\n\n\tfunction format ( message, args ) {\n\t\treturn message.replace( /%s/g, function () { return args.shift(); } );\n\t}\n\n\tfunction fatal ( message ) {\n\t\tvar args = [], len = arguments.length - 1;\n\t\twhile ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n\t\tmessage = format( message, args );\n\t\tthrow new Error( message );\n\t}\n\n\tfunction logIfDebug () {\n\t\tif ( Ractive.DEBUG ) {\n\t\t\tlog.apply( null, arguments );\n\t\t}\n\t}\n\n\tfunction warn ( message ) {\n\t\tvar args = [], len = arguments.length - 1;\n\t\twhile ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n\t\tmessage = format( message, args );\n\t\tprintWarning( message, args );\n\t}\n\n\tfunction warnOnce ( message ) {\n\t\tvar args = [], len = arguments.length - 1;\n\t\twhile ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n\t\tmessage = format( message, args );\n\n\t\tif ( alreadyWarned[ message ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyWarned[ message ] = true;\n\t\tprintWarning( message, args );\n\t}\n\n\tfunction warnIfDebug () {\n\t\tif ( Ractive.DEBUG ) {\n\t\t\twarn.apply( null, arguments );\n\t\t}\n\t}\n\n\tfunction warnOnceIfDebug () {\n\t\tif ( Ractive.DEBUG ) {\n\t\t\twarnOnce.apply( null, arguments );\n\t\t}\n\t}\n\n\t// Error messages that are used (or could be) in multiple places\n\tvar badArguments = 'Bad arguments';\n\tvar noRegistryFunctionReturn = 'A function was specified for \"%s\" %s, but no %s was returned';\n\tvar missingPlugin = function ( name, type ) { return (\"Missing \\\"\" + name + \"\\\" \" + type + \" plugin. You may need to download a plugin via http://docs.ractivejs.org/latest/plugins#\" + type + \"s\"); };\n\n\tfunction findInViewHierarchy ( registryName, ractive, name ) {\n\t\tvar instance = findInstance( registryName, ractive, name );\n\t\treturn instance ? instance[ registryName ][ name ] : null;\n\t}\n\n\tfunction findInstance ( registryName, ractive, name ) {\n\t\twhile ( ractive ) {\n\t\t\tif ( name in ractive[ registryName ] ) {\n\t\t\t\treturn ractive;\n\t\t\t}\n\n\t\t\tif ( ractive.isolated ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tractive = ractive.parent;\n\t\t}\n\t}\n\n\tfunction interpolate ( from, to, ractive, type ) {\n\t\tif ( from === to ) return null;\n\n\t\tif ( type ) {\n\t\t\tvar interpol = findInViewHierarchy( 'interpolators', ractive, type );\n\t\t\tif ( interpol ) return interpol( from, to ) || null;\n\n\t\t\tfatal( missingPlugin( type, 'interpolator' ) );\n\t\t}\n\n\t\treturn interpolators.number( from, to ) ||\n\t\t interpolators.array( from, to ) ||\n\t\t interpolators.object( from, to ) ||\n\t\t null;\n\t}\n\n\tfunction snap ( to ) {\n\t\treturn function () { return to; };\n\t}\n\n\tvar interpolators = {\n\t\tnumber: function ( from, to ) {\n\t\t\tvar delta;\n\n\t\t\tif ( !isNumeric( from ) || !isNumeric( to ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tfrom = +from;\n\t\t\tto = +to;\n\n\t\t\tdelta = to - from;\n\n\t\t\tif ( !delta ) {\n\t\t\t\treturn function () { return from; };\n\t\t\t}\n\n\t\t\treturn function ( t ) {\n\t\t\t\treturn from + ( t * delta );\n\t\t\t};\n\t\t},\n\n\t\tarray: function ( from, to ) {\n\t\t\tvar intermediate, interpolators, len, i;\n\n\t\t\tif ( !isArray( from ) || !isArray( to ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tintermediate = [];\n\t\t\tinterpolators = [];\n\n\t\t\ti = len = Math.min( from.length, to.length );\n\t\t\twhile ( i-- ) {\n\t\t\t\tinterpolators[i] = interpolate( from[i], to[i] );\n\t\t\t}\n\n\t\t\t// surplus values - don't interpolate, but don't exclude them either\n\t\t\tfor ( i=len; i elements caused the binding on the