{"version":3,"file":"ractive.runtime.min.js","sources":["ractive.runtime.js"],"sourcesContent":["/*\n\tRactive.js v0.9.0-edge\n\tSat Feb 11 2017 07:01:04 GMT+0000 (UTC) - commit e05df1d72b53b877c3b420de5a05e3900e4e55f8\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\nvar defaults = {\n\t// render placement:\n\tel: void 0,\n\tappend: false,\n\tdelegate: true,\n\n\t// template:\n\ttemplate: null,\n\n\t// parse:\n\tdelimiters: [ '{{', '}}' ],\n\ttripleDelimiters: [ '{{{', '}}}' ],\n\tstaticDelimiters: [ '[[', ']]' ],\n\tstaticTripleDelimiters: [ '[[[', ']]]' ],\n\tcsp: true,\n\tinterpolate: false,\n\tpreserveWhitespace: false,\n\tsanitize: false,\n\tstripComments: true,\n\tcontextLines: 0,\n\n\t// data & binding:\n\tdata: {},\n\tcomputed: {},\n\tsyncComputedChildren: false,\n\tresolveInstanceMembers: true,\n\twarnAboutAmbiguity: false,\n\tmagic: false,\n\tmodifyArrays: false,\n\tadapt: [],\n\tisolated: false,\n\ttwoway: true,\n\tlazy: false,\n\n\t// transitions:\n\tnoIntro: false,\n\tnoOutro: false,\n\ttransitionsEnabled: true,\n\tcomplete: void 0,\n\tnestedTransitions: true,\n\n\t// css:\n\tcss: null,\n\tnoCssTransform: false\n};\n\n// These are a subset of the easing equations found at\n// https://raw.github.com/danro/easing-js - license info\n// follows:\n\n// --------------------------------------------------\n// easing.js v0.5.4\n// Generic set of easing functions with AMD support\n// https://github.com/danro/easing-js\n// This code may be freely distributed under the MIT license\n// http://danro.mit-license.org/\n// --------------------------------------------------\n// All functions adapted from Thomas Fuchs & Jeremy Kahn\n// Easing Equations (c) 2003 Robert Penner, BSD license\n// https://raw.github.com/danro/easing-js/master/LICENSE\n// --------------------------------------------------\n\n// In that library, the functions named easeIn, easeOut, and\n// easeInOut below are named easeInCubic, easeOutCubic, and\n// (you guessed it) easeInOutCubic.\n//\n// You can add additional easing functions to this list, and they\n// will be globally available.\n\n\nvar easing = {\n\tlinear: function linear ( pos ) { return pos; },\n\teaseIn: function easeIn ( pos ) { return Math.pow( pos, 3 ); },\n\teaseOut: function easeOut ( pos ) { return ( Math.pow( ( pos - 1 ), 3 ) + 1 ); },\n\teaseInOut: function easeInOut ( pos ) {\n\t\tif ( ( pos /= 0.5 ) < 1 ) { return ( 0.5 * Math.pow( pos, 3 ) ); }\n\t\treturn ( 0.5 * ( Math.pow( ( pos - 2 ), 3 ) + 2 ) );\n\t}\n};\n\nvar toString$1$1 = Object.prototype.toString;\n\n\nfunction isEqual ( a, b ) {\n\tif ( a === null && b === null ) {\n\t\treturn true;\n\t}\n\n\tif ( typeof a === 'object' || typeof b === 'object' ) {\n\t\treturn false;\n\t}\n\n\treturn a === b;\n}\n\n// http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric\nfunction isNumeric ( thing ) {\n\treturn !isNaN( parseFloat( thing ) ) && isFinite( thing );\n}\n\nfunction isObject ( thing ) {\n\treturn ( thing && toString$1$1.call( thing ) === '[object Object]' );\n}\n\nfunction isObjectLike ( thing ) {\n\tif ( !thing ) { return false; }\n\tvar type = typeof thing;\n\tif ( type === 'object' || type === 'function' ) { return true; }\n}\n\n/* eslint no-console:\"off\" */\nvar win = typeof window !== 'undefined' ? window : null;\nvar doc = win ? document : null;\nvar isClient = !!doc;\nvar hasConsole = ( typeof console !== 'undefined' && typeof console.warn === 'function' && typeof console.warn.apply === 'function' );\n\nvar magic;\ntry {\n\tObject.defineProperty({}, 'test', { value: 0 });\n\tmagic = true;\n} catch ( e ) {\n\tmagic = false;\n}\n\nvar svg = doc ?\n\tdoc.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1' ) :\n\tfalse;\n\nvar vendors = [ 'o', 'ms', 'moz', 'webkit' ];\n\nvar noop = function () {};\n\n/* global console */\n/* eslint no-console:\"off\" */\n\nvar alreadyWarned = {};\nvar log;\nvar printWarning;\nvar welcome;\n\nif ( hasConsole ) {\n\tvar welcomeIntro = [\n\t\t\"%cRactive.js %c0.9.0-edge-e05df1d72b53b877c3b420de5a05e3900e4e55f8 %cin debug mode, %cmore...\",\n\t\t'color: rgb(114, 157, 52); font-weight: normal;',\n\t\t'color: rgb(85, 85, 85); font-weight: normal;',\n\t\t'color: rgb(85, 85, 85); font-weight: normal;',\n\t\t'color: rgb(82, 140, 224); font-weight: normal; text-decoration: underline;'\n\t];\n\tvar welcomeMessage = \"You're running Ractive 0.9.0-edge-e05df1d72b53b877c3b420de5a05e3900e4e55f8 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\twelcome = function () {\n\t\tif ( Ractive.WELCOME_MESSAGE === false ) {\n\t\t\twelcome = noop;\n\t\t\treturn;\n\t\t}\n\t\tvar message = 'WELCOME_MESSAGE' in Ractive ? Ractive.WELCOME_MESSAGE : welcomeMessage;\n\t\tvar hasGroup = !!console.groupCollapsed;\n\t\tif ( hasGroup ) { console.groupCollapsed.apply( console, welcomeIntro ); }\n\t\tconsole.log( message );\n\t\tif ( hasGroup ) {\n\t\t\tconsole.groupEnd( welcomeIntro );\n\t\t}\n\n\t\twelcome = noop;\n\t};\n\n\tprintWarning = function ( message, args ) {\n\t\twelcome();\n\n\t\t// extract information about the instance this message pertains to, if applicable\n\t\tif ( typeof args[ args.length - 1 ] === 'object' ) {\n\t\t\tvar options = args.pop();\n\t\t\tvar ractive = options ? options.ractive : null;\n\n\t\t\tif ( ractive ) {\n\t\t\t\t// if this is an instance of a component that we know the name of, add\n\t\t\t\t// it to the message\n\t\t\t\tvar name;\n\t\t\t\tif ( ractive.component && ( name = ractive.component.name ) ) {\n\t\t\t\t\tmessage = \"<\" + name + \"> \" + message;\n\t\t\t\t}\n\n\t\t\t\tvar node;\n\t\t\t\tif ( node = ( options.node || ( ractive.fragment && ractive.fragment.rendered && ractive.find( '*' ) ) ) ) {\n\t\t\t\t\targs.push( node );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconsole.warn.apply( console, [ '%cRactive.js: %c' + message, 'color: rgb(114, 157, 52);', 'color: rgb(85, 85, 85);' ].concat( args ) );\n\t};\n\n\tlog = function () {\n\t\tconsole.log.apply( console, arguments );\n\t};\n} else {\n\tprintWarning = log = welcome = noop;\n}\n\nfunction format ( message, args ) {\n\treturn message.replace( /%s/g, function () { return args.shift(); } );\n}\n\nfunction fatal ( message ) {\n\tvar args = [], len = arguments.length - 1;\n\twhile ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n\tmessage = format( message, args );\n\tthrow new Error( message );\n}\n\nfunction logIfDebug () {\n\tif ( Ractive.DEBUG ) {\n\t\tlog.apply( null, arguments );\n\t}\n}\n\nfunction warn ( message ) {\n\tvar args = [], len = arguments.length - 1;\n\twhile ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n\tmessage = format( message, args );\n\tprintWarning( message, args );\n}\n\nfunction warnOnce ( message ) {\n\tvar args = [], len = arguments.length - 1;\n\twhile ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n\tmessage = format( message, args );\n\n\tif ( alreadyWarned[ message ] ) {\n\t\treturn;\n\t}\n\n\talreadyWarned[ message ] = true;\n\tprintWarning( message, args );\n}\n\nfunction warnIfDebug () {\n\tif ( Ractive.DEBUG ) {\n\t\twarn.apply( null, arguments );\n\t}\n}\n\nfunction warnOnceIfDebug () {\n\tif ( Ractive.DEBUG ) {\n\t\twarnOnce.apply( null, arguments );\n\t}\n}\n\n// Error messages that are used (or could be) in multiple places\nvar badArguments = 'Bad arguments';\nvar noRegistryFunctionReturn = 'A function was specified for \"%s\" %s, but no %s was returned';\nvar 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\nfunction findInViewHierarchy ( registryName, ractive, name ) {\n\tvar instance = findInstance( registryName, ractive, name );\n\treturn instance ? instance[ registryName ][ name ] : null;\n}\n\nfunction findInstance ( registryName, ractive, name ) {\n\twhile ( ractive ) {\n\t\tif ( name in ractive[ registryName ] ) {\n\t\t\treturn ractive;\n\t\t}\n\n\t\tif ( ractive.isolated ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tractive = ractive.parent;\n\t}\n}\n\nfunction interpolate ( from, to, ractive, type ) {\n\tif ( from === to ) { return null; }\n\n\tif ( type ) {\n\t\tvar interpol = findInViewHierarchy( 'interpolators', ractive, type );\n\t\tif ( interpol ) { return interpol( from, to ) || null; }\n\n\t\tfatal( missingPlugin( type, 'interpolator' ) );\n\t}\n\n\treturn interpolators.number( from, to ) ||\n\t interpolators.array( from, to ) ||\n\t interpolators.object( from, to ) ||\n\t null;\n}\n\nfunction snap ( to ) {\n\treturn function () { return to; };\n}\n\nvar interpolators = {\n\tnumber: function number ( from, to ) {\n\t\tif ( !isNumeric( from ) || !isNumeric( to ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfrom = +from;\n\t\tto = +to;\n\n\t\tvar delta = to - from;\n\n\t\tif ( !delta ) {\n\t\t\treturn function () { return from; };\n\t\t}\n\n\t\treturn function ( t ) {\n\t\t\treturn from + ( t * delta );\n\t\t};\n\t},\n\n\tarray: function array ( from, to ) {\n\t\tvar len, i;\n\n\t\tif ( !Array.isArray( from ) || !Array.isArray( to ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar intermediate = [];\n\t\tvar interpolators = [];\n\n\t\ti = len = Math.min( from.length, to.length );\n\t\twhile ( i-- ) {\n\t\t\tinterpolators[i] = interpolate( from[i], to[i] );\n\t\t}\n\n\t\t// surplus values - don't interpolate, but don't exclude them either\n\t\tfor ( i=len; i elements caused the binding on the