forked from allevaton/starterupper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ractive-legacy.min.js
15 lines (12 loc) · 156 KB
/
ractive-legacy.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
ractive-legacy.min.js v0.5.8
2014-09-18 - commit 2e726021
http://ractivejs.org
http://twitter.com/RactiveJS
Released under the MIT License.
*/
!function(a){"use strict";var b=a.Ractive,c=function(){var a={el:void 0,append:!1,template:{v:1,t:[]},"yield":null,preserveWhitespace:!1,sanitize:!1,stripComments:!0,data:{},computed:{},magic:!1,modifyArrays:!0,adapt:[],isolated:!1,twoway:!0,lazy:!1,noIntro:!1,transitionsEnabled:!0,complete:void 0,noCssTransform:!1,debug:!1};return a}(),d={linear:function(a){return a},easeIn:function(a){return Math.pow(a,3)},easeOut:function(a){return Math.pow(a-1,3)+1},easeInOut:function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)}},e=[],f=Object.prototype.hasOwnProperty,g=function(){var a=Object.prototype.toString;return function(b){return"[object Array]"===a.call(b)}}(),h=function(){var a=Object.prototype.toString;return function(b){return b&&"[object Object]"===a.call(b)}}(),i=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},j=function(a,b,c,d,e){var f,g,h;return a.push(function(){g=a.interpolate}),h=/^([+-]?[0-9]+\.?(?:[0-9]+)?)(px|em|ex|%|in|cm|mm|pt|pc)$/,f={number:function(a,b){var c;return e(a)&&e(b)?(a=+a,b=+b,c=b-a,c?function(b){return a+b*c}:function(){return a}):null},array:function(a,b){var d,e,f,h;if(!c(a)||!c(b))return null;for(d=[],e=[],h=f=Math.min(a.length,b.length);h--;)e[h]=g(a[h],b[h]);for(h=f;h<a.length;h+=1)d[h]=a[h];for(h=f;h<b.length;h+=1)d[h]=b[h];return function(a){for(var b=f;b--;)d[b]=e[b](a);return d}},object:function(a,c){var e,f,h,i,j;if(!d(a)||!d(c))return null;e=[],i={},h={};for(j in a)b.call(a,j)&&(b.call(c,j)?(e.push(j),h[j]=g(a[j],c[j])):i[j]=a[j]);for(j in c)b.call(c,j)&&!b.call(a,j)&&(i[j]=c[j]);return f=e.length,function(a){for(var b,c=f;c--;)b=e[c],i[b]=h[b](a);return i}}}}(e,f,g,h,i),k=function(){var a;return a="undefined"==typeof document?!1:document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}(),l=function(){function a(a){var b,d,e,f,g,h="";if(!c[a]){for(e=[];h.length<a;)h+=1;for(b=parseInt(h,2),f=function(a){return"1"===a},g=0;b>=g;g+=1){for(d=g.toString(2);d.length<a;)d="0"+d;e[g]=Array.prototype.map.call(d,f)}c[a]=e}return c[a]}var b,c={};return b=function(b){var d,e,f,g,h,i;for(d=b.split("."),(e=c[d.length])||(e=a(d.length)),h=[],f=function(a,b){return a?"*":d[b]},g=e.length;g--;)i=e[g].map(f).join("."),h.hasOwnProperty(i)||(h.push(i),h[i]=!0);return h}}(),m=function(a){function b(d,e,f,g){var h=arguments[4];void 0===h&&(h=!1);var i,j,k=!0;for(j=e.length;j>=0;j--)i=d._subs[e[j]],i&&(k=c(d,i,f,g)&&k);if(d._parent&&k){if(h&&d.component){var l=d.component.name+"."+e[e.length-1];e=a(l),f&&(f.component=d)}b(d._parent,e,f,g)}}function c(a,b,c,d){var e=null,f=!1;c&&(d=[c].concat(d));for(var g=0,h=b.length;h>g;g+=1)b[g].apply(a,d)===!1&&(f=!0);return c&&f&&(e=c.original)&&(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()),!f}var d;return d=function(c,d){var e=arguments[2];if(void 0===e&&(e={}),d){var f=a(d);b(c,f,e.event,e.args,!0)}}}(l),n=function(a,b){var c=a.indexOf(b);-1!==c&&a.splice(c,1)},o=function(){function a(a){setTimeout(a,0)}function b(a,b){return function(){for(var c;c=a.shift();)c(b)}}function c(a,b,d,f){var g;if(b===a)throw new TypeError("A promise's fulfillment handler cannot return the same promise");if(b instanceof e)b.then(d,f);else if(!b||"object"!=typeof b&&"function"!=typeof b)d(b);else{try{g=b.then}catch(h){return void f(h)}if("function"==typeof g){var i,j,k;j=function(b){i||(i=!0,c(a,b,d,f))},k=function(a){i||(i=!0,f(a))};try{g.call(b,j,k)}catch(h){if(!i)return f(h),void(i=!0)}}else d(b)}}var d,e,f={},g={},h={};return"function"==typeof o?e=o:(e=function(d){var i,j,k,l,m,n,o=[],p=[],q=f;k=function(c){return function(d){q===f&&(i=d,q=c,j=b(q===g?o:p,i),a(j))}},l=k(g),m=k(h);try{d(l,m)}catch(r){m(r)}return n={then:function(b,d){var g=new e(function(e,h){var i=function(a,b,d){b.push("function"==typeof a?function(b){var d;try{d=a(b),c(g,d,e,h)}catch(f){h(f)}}:d)};i(b,o,e),i(d,p,h),q!==f&&a(j)});return g}},n["catch"]=function(a){return this.then(null,a)},n},e.all=function(a){return new e(function(b,c){var d,e,f,g=[];if(!a.length)return void b(g);for(f=function(e){a[e].then(function(a){g[e]=a,--d||b(g)},c)},d=e=a.length;e--;)f(e)})},e.resolve=function(a){return new e(function(b){b(a)})},e.reject=function(a){return new e(function(b,c){c(a)})}),d=e}(),p=function(){var a=/\[\s*(\*|[0-9]|[1-9][0-9]+)\s*\]/g;return function(b){return(b||"").replace(a,".$1")}}(),q=function(a){do if(void 0!==a.context)return a.context;while(a=a.parent);return""},r=function(a,b){return null===a&&null===b?!0:"object"==typeof a||"object"==typeof b?!1:a===b},s=function(a,b,c){var d;a.push(function(){return d=a.runloop});var e=function(a,b,c,d,e){this.root=a,this.keypath=b,this.priority=e,this.otherInstance=c,this.otherKeypath=d,this.bind(),this.value=this.root.viewmodel.get(this.keypath)};return e.prototype={setValue:function(a){var e=this;return this.updating||this.counterpart&&this.counterpart.updating?void(this.value=a):void(b(a)&&a._ractive&&a._ractive.setting||c(a,this.value)||(this.updating=!0,d.addViewmodel(this.otherInstance.viewmodel),this.otherInstance.viewmodel.set(this.otherKeypath,a),this.value=a,d.scheduleTask(function(){return e.updating=!1})))},bind:function(){this.root.viewmodel.register(this.keypath,this)},rebind:function(a){this.unbind(),this.keypath=a,this.counterpart.otherKeypath=a,this.bind()},unbind:function(){this.root.viewmodel.unregister(this.keypath,this)}},function(a,b,c,d){var f,g,h,i,j,k;f=c+"="+d,h=a.bindings,h[f]||(g=a.instance,i=a.parentFragment.priority,j=new e(b,c,g,d,i),h.push(j),g.twoway&&(k=new e(g,d,b,c,1),h.push(k),j.counterpart=k,k.counterpart=j),h[f]=j)}}(e,g,r),t=function(a,b,c){function d(a,b){var c;if("."===b)return a;if(c=a?a.split("."):[],"../"===b.substr(0,3)){for(;"../"===b.substr(0,3);){if(!c.length)throw new Error(f);c.pop(),b=b.substring(3)}return c.push(b),c.join(".")}return a?a+b.replace(/^\.\//,"."):b.replace(/^\.\/?/,"")}var e,f,g;return f='Could not resolve reference - too many "../" prefixes',g={evaluateWrapped:!0},e=function h(e,f,i){var j,k,l,m,n,o,p,q,r,s;if(f=a(f),"~/"===f.substr(0,2))return f.substring(2);if("."===f.charAt(0))return d(b(i),f);k=f.split(".")[0];do if(j=i.context,j&&(o=!0,n=e.viewmodel.get(j,g),n&&("object"==typeof n||"function"==typeof n)&&k in n))return j+"."+f;while(i=i.parent);if(k in e.data||k in e.viewmodel.computations)return f;if(e._parent&&!e.isolated){if(i=e.component.parentFragment,i.indexRefs&&void 0!==(l=i.indexRefs[f]))return e.component.indexRefBindings[f]=f,void e.viewmodel.set(f,l,!0);if(m=h(e._parent,f,i)){for(p=m.split("."),q=f.split(".");p.length>1&&q.length>1&&p[p.length-1]===q[q.length-1];)p.pop(),q.pop();return r=p.join("."),s=q.join("."),e.viewmodel.set(s,e._parent.viewmodel.get(r),!0),c(e.component,e._parent,r,s),f}}return o?void 0!==e.viewmodel.get(f)?f:void 0:f}}(p,q,s),u=function(a){function b(a){a.detach()}function c(a){a.detachNodes()}function d(a){!a.ready||a.outros.length||a.outroChildren||(a.outrosComplete||(a.parent?a.parent.decrementOutros(a):a.detachNodes(),a.outrosComplete=!0),a.intros.length||a.totalChildren||("function"==typeof a.callback&&a.callback(),a.parent&&a.parent.decrementTotal()))}var e=function(a,b){this.callback=a,this.parent=b,this.intros=[],this.outros=[],this.children=[],this.totalChildren=this.outroChildren=0,this.detachQueue=[],this.outrosComplete=!1,b&&b.addChild(this)};return e.prototype={addChild:function(a){this.children.push(a),this.totalChildren+=1,this.outroChildren+=1},decrementOutros:function(){this.outroChildren-=1,d(this)},decrementTotal:function(){this.totalChildren-=1,d(this)},add:function(a){var b=a.isIntro?this.intros:this.outros;b.push(a)},remove:function(b){var c=b.isIntro?this.intros:this.outros;a(c,b),d(this)},init:function(){this.ready=!0,d(this)},detachNodes:function(){this.detachQueue.forEach(b),this.children.forEach(c)}},e}(n),v=function(a,b,c,d,e,f){function g(){var a,c,d;for(a=0;a<k.viewmodels.length;a+=1)c=k.viewmodels[a],d=c.applyChanges(),d&&b(c.ractive,"change",{args:[d]});for(k.viewmodels.length=0,h(),a=0;a<k.views.length;a+=1)k.views[a].update();for(k.views.length=0,a=0;a<k.tasks.length;a+=1)k.tasks[a]();return k.tasks.length=0,k.viewmodels.length?g():void 0}function h(){var a,b,c,d;for(a=m.length;a--;)b=m[a],b.keypath&&m.splice(a,1),(c=e(b.root,b.ref,b.parentFragment))&&((d||(d=[])).push({item:b,keypath:c}),m.splice(a,1));d&&d.forEach(i)}function i(a){a.item.resolve(a.keypath)}var j,k,l,m=[];return l={start:function(a,b){var c,e;return b&&(c=new d(function(a){return e=a})),k={previousBatch:k,transitionManager:new f(e,k&&k.transitionManager),views:[],tasks:[],viewmodels:[]},a&&k.viewmodels.push(a.viewmodel),c},end:function(){g(),k.transitionManager.init(),k=k.previousBatch},addViewmodel:function(a){k?-1===k.viewmodels.indexOf(a)&&k.viewmodels.push(a):a.applyChanges()},registerTransition:function(a){a._manager=k.transitionManager,k.transitionManager.add(a)},addView:function(a){k.views.push(a)},addUnresolved:function(a){m.push(a)},removeUnresolved:function(a){c(m,a)},detachWhenReady:function(a){k.transitionManager.detachQueue.push(a)},scheduleTask:function(a){k?k.tasks.push(a):a()}},a.runloop=l,j=l}(e,m,n,o,t,u),w=function(){var a=/^\s*[0-9]+\s*$/;return function(b){return a.test(b)?[]:{}}}(),x=function(a,b,c){function d(b,c,d){function e(b){var d,e;b.value=c,b.updating||(e=b.ractive,d=b.keypath,b.updating=!0,a.start(e),e.viewmodel.mark(d),a.end(),b.updating=!1)}var f,g,h,i,j,k;if(f=b.obj,g=b.prop,d&&!d.configurable){if("length"===g)return;throw new Error('Cannot use magic mode with property "'+g+'" - object is not configurable')}d&&(h=d.get,i=d.set),j=h||function(){return c},k=function(a){i&&i(a),c=h?h():a,k._ractiveWrappers.forEach(e)},k._ractiveWrappers=[b],Object.defineProperty(f,g,{get:j,set:k,enumerable:!0,configurable:!0})}var e,f,g;try{Object.defineProperty({},"test",{value:0}),f={filter:function(a,b,d){var e,f,g,h,i;return b?(e=b.split("."),f=e.pop(),g=e.join("."),(h=d.viewmodel.wrapped[g])&&!h.magic?!1:(i=d.get(g),c(i)&&/^[0-9]+$/.test(f)?!1:i&&("object"==typeof i||"function"==typeof i))):!1},wrap:function(a,b,c){return new g(a,b,c)}},g=function(a,b,c){var e,f,g,h;return this.magic=!0,this.ractive=a,this.keypath=c,this.value=b,e=c.split("."),this.prop=e.pop(),f=e.join("."),this.obj=f?a.get(f):a.data,g=this.originalDescriptor=Object.getOwnPropertyDescriptor(this.obj,this.prop),g&&g.set&&(h=g.set._ractiveWrappers)?void(-1===h.indexOf(this)&&h.push(this)):void d(this,b,g)},g.prototype={get:function(){return this.value},reset:function(b){this.updating||(this.updating=!0,this.obj[this.prop]=b,a.addViewmodel(this.ractive.viewmodel),this.ractive.viewmodel.mark(this.keypath),this.updating=!1)},set:function(a,c){this.updating||(this.obj[this.prop]||(this.updating=!0,this.obj[this.prop]=b(a),this.updating=!1),this.obj[this.prop][a]=c)},teardown:function(){var a,b,c,d,e;return this.updating?!1:(a=Object.getOwnPropertyDescriptor(this.obj,this.prop),b=a&&a.set,void(b&&(d=b._ractiveWrappers,e=d.indexOf(this),-1!==e&&d.splice(e,1),d.length||(c=this.obj[this.prop],Object.defineProperty(this.obj,this.prop,this.originalDescriptor||{writable:!0,enumerable:!0,configurable:!0}),this.obj[this.prop]=c))))}}}catch(h){f=!1}return e=f}(v,w,g),y=function(a){return!!a}(x),z={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},A=function(a,b){var c;return c=a?function(a,c){return c&&c!==b.html?document.createElementNS(c,a):document.createElement(a)}:function(a,c){if(c&&c!==b.html)throw"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";return document.createElement(a)}}(k,z),B=function(){var a="object"==typeof document;return a}(),C=function(a){var b;try{Object.defineProperty({},"test",{value:0}),a&&Object.defineProperty(document.createElement("div"),"test",{value:0}),b=Object.defineProperty}catch(c){b=function(a,b,c){a[b]=c.value}}return b}(B),D=function(a,b,c){var d;try{try{Object.defineProperties({},{test:{value:0}})}catch(e){throw e}c&&Object.defineProperties(a("div"),{test:{value:0}}),d=Object.defineProperties}catch(e){d=function(a,c){var d;for(d in c)c.hasOwnProperty(d)&&b(a,d,c[d])}}return d}(A,C,B),E=function(a){return function(b,c,d){var e;if("string"!=typeof c||!a(d))throw new Error("Bad arguments");if(e=+b.get(c)||0,!a(e))throw new Error("Cannot add to a non-numeric value");return b.set(c,e+d)}}(i),F=function(a){return function(b,c){return a(this,b,void 0===c?1:+c)}}(E),G=function(a){var b=/^\.+/;return function(c){return a(c).replace(b,"")}}(p),H=["o","ms","moz","webkit"],I=function(a){var b;return"undefined"==typeof window?b=null:(!function(a,b,c){var d,e;if(!c.requestAnimationFrame){for(d=0;d<a.length&&!c.requestAnimationFrame;++d)c.requestAnimationFrame=c[a[d]+"RequestAnimationFrame"];c.requestAnimationFrame||(e=c.setTimeout,c.requestAnimationFrame=function(a){var c,d,f;return c=Date.now(),d=Math.max(0,16-(c-b)),f=e(function(){a(c+d)},d),b=c+d,f})}}(a,0,window),b=window.requestAnimationFrame),b}(H),J=function(){var a;return a="undefined"!=typeof window&&window.performance&&"function"==typeof window.performance.now?function(){return window.performance.now()}:function(){return Date.now()}}(),K=function(a,b,c){var d=[],e={tick:function(){var f,g,h;for(h=b(),c.start(),f=0;f<d.length;f+=1)g=d[f],g.tick(h)||d.splice(f--,1);c.end(),d.length?a(e.tick):e.running=!1},add:function(b){d.push(b),e.running||(e.running=!0,a(e.tick))},abort:function(a,b){for(var c,e=d.length;e--;)c=d[e],c.root===b&&c.keypath===a&&c.stop()}};return e}(I,J,v),L=function(){var a,b={};return a="undefined"!=typeof console&&"function"==typeof console.warn&&"function"==typeof console.warn.apply?function(a,c){if(!c){if(b[a])return;b[a]=!0}console.warn(a)}:function(){}}(),M=function(){function a(a){return a.trim?a.trim():a.replace(/^\s+/,"").replace(/\s+$/,"")}function b(a){return a.str}var c,d=/(?:^|\})?\s*([^\{\}]+)\s*\{/g,e=/\/\*.*?\*\//g,f=/((?:(?:\[[^\]+]\])|(?:[^\s\+\>\~:]))+)((?::[^\s\+\>\~]+)?\s*[\s\+\>\~]?)\s*/g,g=/^@media/,h=/\[data-rvcguid="[a-z0-9-]+"]/g;return c=function(c,i){var j,k;return k=function(a){var c,d,e,g,h,j,k,l,m=[];for(c=[];d=f.exec(a);)c.push({str:d[0],base:d[1],modifiers:d[2]});for(g='[data-rvcguid="'+i+'"]',h=c.map(b),l=c.length;l--;)k=h.slice(),e=c[l],k[l]=e.base+g+e.modifiers||"",j=h.slice(),j[l]=g+" "+j[l],m.push(k.join(" "),j.join(" "));return m.join(", ")},j=h.test(c)?c.replace(h,'[data-rvcguid="'+i+'"]'):c.replace(e,"").replace(d,function(b,c){var d,e;return g.test(c)?b:(d=c.split(",").map(a),e=d.map(k).join(", ")+" ",b.replace(c,e))})}}(),N=function(a){function b(a,b,d){var e,f=b.constructor._guid;(e=c(d.css,d,f)||c(a.css,a,f))&&(b.constructor.css=e)}function c(b,c,d){return b?c.noCssTransform?b:a(b,d):void 0}var d={name:"css",extend:b,init:function(){}};return d}(M),O=function(){function a(a,b){return"function"==typeof b&&/_super/.test(a)}var b;return b=function(b,c,d){return d||a(b,c)?function(){var a,d="_super"in this,e=this._super;return this._super=c,a=b.apply(this,arguments),d&&(this._super=e),a}:b}}(),P=function(a){function b(a,b,c){var d=c.data||{},e=f(a.prototype.data);return g(e,d)}function c(a,c,d){c.data=b(a,c,d)}function d(a,c,d){var e=d.data,f=b(a,c,d);return"function"==typeof f&&(f=f.call(c,e)||e),c.data=f||{}}function e(a){var b=this.init(a.constructor,a,a);return b?(a.data=b,!0):void 0}function f(a){if("function"!=typeof a||!Object.keys(a).length)return a;var b={};return h(a,b),g(a,b)}function g(a,b){return"function"==typeof b?k(b,a):"function"==typeof a?j(b,a):i(b,a)}function h(a,b,c){for(var d in a)c&&d in b||(b[d]=a[d])}function i(a,b){return a=a||{},b?(h(b,a,!0),a):a}function j(a,b){return function(c){var d;if(a){d=[];for(var e in a)c&&e in c||d.push(e)}return c=b.call(this,c)||c,d&&d.length&&(c=c||{},d.forEach(function(b){c[b]=a[b]})),c}}function k(b,c){var d;return d="function"!=typeof c?function(a){i(a,c)}:function(b){return c=a(c,function(){},!0),c.call(this,b)||b},a(b,d)}var l,m={name:"data",extend:c,init:d,reset:e};return l=m}(O),Q={missingParser:"Missing Ractive.parse - cannot parse template. Either preparse or use the version that includes the parser",mergeComparisonFail:"Merge operation: comparison failed. Falling back to identity checking",noComponentEventArguments:"Components currently only support simple events - you cannot include arguments. Sorry!",noTemplateForPartial:'Could not find template for partial "{name}"',noNestedPartials:"Partials ({{>{name}}}) cannot contain nested inline partials",evaluationError:'Error evaluating "{uniqueString}": {err}',badArguments:"Bad arguments \"{arguments}\". I'm not allowed to argue unless you've paid.",failedComputation:'Failed to compute "{key}": {err}',missingPlugin:'Missing "{name}" {plugin} plugin. You may need to download a {plugin} via http://docs.ractivejs.org/latest/plugins#{plugin}s',badRadioInputBinding:"A radio input can have two-way binding on its name attribute, or its checked attribute - not both",noRegistryFunctionReturn:'A function was specified for "{name}" {registry}, but no {registry} was returned',defaultElSpecified:"The <{name}/> component has a default `el` property; it has been disregarded",noElementProxyEventWildcards:'Only component proxy-events may contain "*" wildcards, <{element} on-{event}/> is not valid.'},R={TEXT:1,INTERPOLATOR:2,TRIPLE:3,SECTION:4,INVERTED:5,CLOSING:6,ELEMENT:7,PARTIAL:8,COMMENT:9,DELIMCHANGE:10,MUSTACHE:11,TAG:12,ATTRIBUTE:13,CLOSING_TAG:14,COMPONENT:15,NUMBER_LITERAL:20,STRING_LITERAL:21,ARRAY_LITERAL:22,OBJECT_LITERAL:23,BOOLEAN_LITERAL:24,GLOBAL:26,KEY_VALUE_PAIR:27,REFERENCE:30,REFINEMENT:31,MEMBER:32,PREFIX_OPERATOR:33,BRACKETED:34,CONDITIONAL:35,INFIX_OPERATOR:36,INVOCATION:40,SECTION_IF:50,SECTION_UNLESS:51,SECTION_EACH:52,SECTION_WITH:53},S=function(){var a;try{Object.create(null),a=Object.create}catch(b){a=function(){var a=function(){};return function(b,c){var d;return null===b?{}:(a.prototype=b,d=new a,c&&Object.defineProperties(d,c),d)}}()}return a}(),T={expectedExpression:"Expected a JavaScript expression",expectedParen:"Expected closing paren"},U=function(a){var b=/^(?:[+-]?)(?:(?:(?:0|[1-9]\d*)?\.\d+)|(?:(?:0|[1-9]\d*)\.)|(?:0|[1-9]\d*))(?:[eE][+-]?\d+)?/;return function(c){var d;return(d=c.matchPattern(b))?{t:a.NUMBER_LITERAL,v:d}:null}}(R),V=function(a){return function(b){var c=b.remaining();return"true"===c.substr(0,4)?(b.pos+=4,{t:a.BOOLEAN_LITERAL,v:"true"}):"false"===c.substr(0,5)?(b.pos+=5,{t:a.BOOLEAN_LITERAL,v:"false"}):null}}(R),W=function(){var a,b,c;return a=/^(?=.)[^"'\\]+?(?:(?!.)|(?=["'\\]))/,b=/^\\(?:['"\\bfnrt]|0(?![0-9])|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|(?=.)[^ux0-9])/,c=/^\\(?:\r\n|[\u000A\u000D\u2028\u2029])/,function(d){return function(e){var f,g,h,i;for(f=e.pos,g='"',h=!1;!h;)i=e.matchPattern(a)||e.matchPattern(b)||e.matchString(d),i?g+='"'===i?'\\"':"\\'"===i?"'":i:(i=e.matchPattern(c),i?g+="\\u"+("000"+i.charCodeAt(1).toString(16)).slice(-4):h=!0);return g+='"',JSON.parse(g)}}}(),X=function(a){return a('"')}(W),Y=function(a){return a("'")}(W),Z=function(a,b,c){return function(d){var e,f;return e=d.pos,d.matchString('"')?(f=c(d),d.matchString('"')?{t:a.STRING_LITERAL,v:f}:(d.pos=e,null)):d.matchString("'")?(f=b(d),d.matchString("'")?{t:a.STRING_LITERAL,v:f}:(d.pos=e,null)):null}}(R,X,Y),$={name:/^[a-zA-Z_$][a-zA-Z_$0-9]*/},_=function(a,b,c){var d=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;return function(e){var f;return(f=a(e))?d.test(f.v)?f.v:'"'+f.v.replace(/"/g,'\\"')+'"':(f=b(e))?f.v:(f=e.matchPattern(c.name))?f:void 0}}(Z,U,$),ab=function(a,b){return function(c){var d,e,f;return d=c.pos,c.allowWhitespace(),e=b(c),null===e?(c.pos=d,null):(c.allowWhitespace(),c.matchString(":")?(c.allowWhitespace(),f=c.readExpression(),null===f?(c.pos=d,null):{t:a.KEY_VALUE_PAIR,k:e,v:f}):(c.pos=d,null))}}(R,_),bb=function(a){return function b(c){var d,e,f,g;return d=c.pos,f=a(c),null===f?null:(e=[f],c.matchString(",")?(g=b(c),g?e.concat(g):(c.pos=d,null)):e)}}(ab),cb=function(a,b){return function(c){var d,e;return d=c.pos,c.allowWhitespace(),c.matchString("{")?(e=b(c),c.allowWhitespace(),c.matchString("}")?{t:a.OBJECT_LITERAL,m:e}:(c.pos=d,null)):(c.pos=d,null)}}(R,bb),db=function(a){return function b(c){function d(a){f.push(a)}var e,f,g,h;return e=c.pos,c.allowWhitespace(),g=c.readExpression(),null===g?null:(f=[g],c.allowWhitespace(),c.matchString(",")&&(h=b(c),null===h&&c.error(a.expectedExpression),h.forEach(d)),f)}}(T),eb=function(a,b){return function(c){var d,e;return d=c.pos,c.allowWhitespace(),c.matchString("[")?(e=b(c),c.matchString("]")?{t:a.ARRAY_LITERAL,m:e}:(c.pos=d,null)):(c.pos=d,null)}}(R,db),fb=function(a,b,c,d,e){return function(f){var g=a(f)||b(f)||c(f)||d(f)||e(f);return g}}(U,V,Z,cb,eb),gb=function(a,b){var c,d,e,f,g;return c=/^\.[a-zA-Z_$0-9]+/,e=function(a){var b=a.matchPattern(d);return b?"."+b:null},d=/^\[(0|[1-9][0-9]*)\]/,f=/^(?:Array|Date|RegExp|decodeURIComponent|decodeURI|encodeURIComponent|encodeURI|isFinite|isNaN|parseFloat|parseInt|JSON|Math|NaN|undefined|null)$/,g=/^(?:break|case|catch|continue|debugger|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|var|void|while|with)$/,function(d){var h,i,j,k,l,m,n;if(h=d.pos,d.matchString("~/"))i="~/";else for(i="";d.matchString("../");)i+="../";if(i||(k=d.matchString(".")||""),j=d.matchPattern(/^@(?:index|key)/)||d.matchPattern(b.name)||"",g.test(j))return d.pos=h,null;if(!i&&!k&&f.test(j))return{t:a.GLOBAL,v:j};if(l=(i||k)+j,!l)return null;for(;m=d.matchPattern(c)||e(d);)l+=m;return d.matchString("(")&&(n=l.lastIndexOf("."),-1!==n?(l=l.substr(0,n),d.pos=h+l.length):d.pos-=1),{t:a.REFERENCE,n:l.replace(/^this\./,"./").replace(/^this$/,".")}}}(R,$),hb=function(a,b){return function(c){var d,e;return d=c.pos,c.matchString("(")?(c.allowWhitespace(),e=c.readExpression(),e||c.error(b.expectedExpression),c.allowWhitespace(),c.matchString(")")||c.error(b.expectedParen),{t:a.BRACKETED,x:e}):null}}(R,T),ib=function(a,b,c){return function(d){return a(d)||b(d)||c(d)}}(fb,gb,hb),jb=function(a,b,c){return function(d){var e,f,g;if(e=d.pos,d.allowWhitespace(),d.matchString(".")){if(d.allowWhitespace(),f=d.matchPattern(c.name))return{t:a.REFINEMENT,n:f};d.error("Expected a property name")}return d.matchString("[")?(d.allowWhitespace(),g=d.readExpression(),g||d.error(b.expectedExpression),d.allowWhitespace(),d.matchString("]")||d.error("Expected ']'"),{t:a.REFINEMENT,x:g}):null}}(R,T,$),kb=function(a,b,c,d,e){return function(f){var g,h,i,j;if(h=b(f),!h)return null;for(;h;)if(g=f.pos,i=d(f))h={t:a.MEMBER,x:h,r:i};else{if(!f.matchString("("))break;f.allowWhitespace(),j=c(f),f.allowWhitespace(),f.matchString(")")||f.error(e.expectedParen),h={t:a.INVOCATION,x:h},j&&(h.o=j)}return h}}(R,ib,db,jb,T),lb=function(a,b,c){var d,e;return e=function(c,d){return function(e){var f;return(f=d(e))?f:e.matchString(c)?(e.allowWhitespace(),f=e.readExpression(),f||e.error(b.expectedExpression),{s:c,o:f,t:a.PREFIX_OPERATOR}):null}},function(){var a,b,f,g,h;for(g="! ~ + - typeof".split(" "),h=c,a=0,b=g.length;b>a;a+=1)f=e(g[a],h),h=f;d=h}(),d}(R,T,kb),mb=function(a,b){var c,d;return d=function(b,c){return function(d){var e,f,g;if(f=c(d),!f)return null;for(;;){if(e=d.pos,d.allowWhitespace(),!d.matchString(b))return d.pos=e,f;if("in"===b&&/[a-zA-Z_$0-9]/.test(d.remaining().charAt(0)))return d.pos=e,f;if(d.allowWhitespace(),g=c(d),!g)return d.pos=e,f;f={t:a.INFIX_OPERATOR,s:b,o:[f,g]}}}},function(){var a,e,f,g,h;for(g="* / % + - << >> >>> < <= > >= in instanceof == != === !== & ^ | && ||".split(" "),h=b,a=0,e=g.length;e>a;a+=1)f=d(g[a],h),h=f;c=h}(),c}(R,lb),nb=function(a,b,c){return function(d){var e,f,g,h;return(f=b(d))?(e=d.pos,d.allowWhitespace(),d.matchString("?")?(d.allowWhitespace(),g=d.readExpression(),g||d.error(c.expectedExpression),d.allowWhitespace(),d.matchString(":")||d.error('Expected ":"'),d.allowWhitespace(),h=d.readExpression(),h||d.error(c.expectedExpression),{t:a.CONDITIONAL,o:[f,g,h]}):(d.pos=e,f)):null}}(R,mb,T),ob=function(a,b){function c(a){return JSON.stringify(String(a))}function d(c,e){var f,g;if(c.t===a.REFERENCE&&-1===e.indexOf(c.n)&&e.unshift(c.n),g=c.o||c.m)if(b(g))d(g,e);else for(f=g.length;f--;)d(g[f],e);c.x&&d(c.x,e),c.r&&d(c.r,e),c.v&&d(c.v,e)}function e(b,d,f){var g=function(a){return e(b,a,f)};switch(d.t){case a.BOOLEAN_LITERAL:case a.GLOBAL:case a.NUMBER_LITERAL:return d.v;case a.STRING_LITERAL:return c(d.v);case a.ARRAY_LITERAL:return"["+(d.m?d.m.map(g).join(","):"")+"]";case a.OBJECT_LITERAL:return"{"+(d.m?d.m.map(g).join(","):"")+"}";case a.KEY_VALUE_PAIR:return d.k+":"+e(b,d.v,f);case a.PREFIX_OPERATOR:return("typeof"===d.s?"typeof ":d.s)+e(b,d.o,f);case a.INFIX_OPERATOR:return e(b,d.o[0],f)+("in"===d.s.substr(0,2)?" "+d.s+" ":d.s)+e(b,d.o[1],f);case a.INVOCATION:return e(b,d.x,f)+"("+(d.o?d.o.map(g).join(","):"")+")";case a.BRACKETED:return"("+e(b,d.x,f)+")";case a.MEMBER:return e(b,d.x,f)+e(b,d.r,f);case a.REFINEMENT:return d.n?"."+d.n:"["+e(b,d.x,f)+"]";case a.CONDITIONAL:return e(b,d.o[0],f)+"?"+e(b,d.o[1],f)+":"+e(b,d.o[2],f);case a.REFERENCE:return"_"+f.indexOf(d.n);default:b.error("Expected legal JavaScript")}}var f;return f=function(a){var b,c=[];return d(a,c),b={r:c,s:e(this,a,c)}}}(R,h),pb=function(a,b,c,d,e){var f,g,h=/^\s+/;return g=function(a){this.name="ParseError",this.message=a;try{throw new Error(a)}catch(b){this.stack=b.stack}},g.prototype=Error.prototype,f=function(a,b){var c,d,e=0;for(this.str=a,this.options=b||{},this.pos=0,this.lines=this.str.split("\n"),this.lineEnds=this.lines.map(function(a){var b=e+a.length+1;return e=b,b},0),this.init&&this.init(a,b),c=[];this.pos<this.str.length&&(d=this.read());)c.push(d);this.leftover=this.remaining(),this.result=this.postProcess?this.postProcess(c,b):c},f.prototype={read:function(a){var b,c,d,e;for(a||(a=this.converters),b=this.pos,d=a.length,c=0;d>c;c+=1)if(this.pos=b,e=a[c](this))return e;return null},readExpression:function(){return d(this)},flattenExpression:e,getLinePos:function(a){for(var b,c=0,d=0;a>=this.lineEnds[c];)d=this.lineEnds[c],c+=1;return b=a-d,[c+1,b+1]},error:function(a){var b,c,d,e,f,h;throw b=this.getLinePos(this.pos),c=b[0],d=b[1],e=this.lines[b[0]-1],f=e+"\n"+new Array(b[1]).join(" ")+"^----",h=new g(a+" at line "+c+" character "+d+":\n"+f),h.line=b[0],h.character=b[1],h.shortMessage=a,h},matchString:function(a){return this.str.substr(this.pos,a.length)===a?(this.pos+=a.length,a):void 0},matchPattern:function(a){var b;return(b=a.exec(this.remaining()))?(this.pos+=b[0].length,b[1]||b[0]):void 0},allowWhitespace:function(){this.matchPattern(h)},remaining:function(){return this.str.substring(this.pos)},nextChar:function(){return this.str.charAt(this.pos)}},f.extend=function(a){var d,e,g=this;d=function(a,b){f.call(this,a,b)},d.prototype=b(g.prototype);for(e in a)c.call(a,e)&&(d.prototype[e]=a[e]);return d.extend=f.extend,d},a.Parser=f,f}(e,S,f,nb,ob),qb=function(){var a=/^[^\s=]+/,b=/^\s+/;return function(c){var d,e,f;return c.matchString("=")?(d=c.pos,c.allowWhitespace(),(e=c.matchPattern(a))?c.matchPattern(b)?(f=c.matchPattern(a))?(c.allowWhitespace(),c.matchString("=")?[e,f]:(c.pos=d,null)):(c.pos=d,null):null:(c.pos=d,null)):null}}(),rb=[{delimiters:"delimiters",isTriple:!1,isStatic:!1},{delimiters:"tripleDelimiters",isTriple:!0,isStatic:!1},{delimiters:"staticDelimiters",isTriple:!1,isStatic:!0},{delimiters:"staticTripleDelimiters",isTriple:!0,isStatic:!0}],sb=function(a){var b={"#":a.SECTION,"^":a.INVERTED,"/":a.CLOSING,">":a.PARTIAL,"!":a.COMMENT,"&":a.TRIPLE};return function(a){var c=b[a.str.charAt(a.pos)];return c?(a.pos+=1,c):null}}(R),tb=function(a){return{"if":a.SECTION_IF,unless:a.SECTION_UNLESS,"with":a.SECTION_WITH,each:a.SECTION_EACH}}(R),ub=function(){var a,b,c;return"undefined"==typeof window?c=null:(a=window,b=a.document,c={},b||(c=null),Date.now||(Date.now=function(){return+new Date}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on non-object");var f=[];for(var g in e)a.call(e,g)&&f.push(g);if(b)for(var h=0;d>h;h++)a.call(e,c[h])&&f.push(c[h]);return f}}()),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;for(void 0===b&&(b=0),0>b&&(b+=this.length),0>b&&(b=0),c=this.length;c>b;b++)if(this.hasOwnProperty(b)&&this[b]===a)return b;return-1}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;for(c=0,d=this.length;d>c;c+=1)this.hasOwnProperty(c)&&a.call(b,this[c],c,this)}),Array.prototype.map||(Array.prototype.map=function(a,b){var c,d,e,f=this,g=[];for(f instanceof String&&(f=f.toString(),e=!0),c=0,d=f.length;d>c;c+=1)(f.hasOwnProperty(c)||e)&&(g[c]=a.call(b,f[c],c,f));return g}),"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){var c,d,e,f;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(e=this.length,f=!1,arguments.length>1&&(d=b,f=!0),c=0;e>c;c+=1)this.hasOwnProperty(c)?f&&(d=a(d,this[c],c,this)):(d=this[c],f=!0);if(!f)throw new TypeError("Reduce of empty array with no initial value");return d}),Array.prototype.filter||(Array.prototype.filter=function(a,b){var c,d,e=[];for(c=0,d=this.length;d>c;c+=1)this.hasOwnProperty(c)&&a.call(b,this[c],c,this)&&(e[e.length]=this[c]);return e}),Array.prototype.every||(Array.prototype.every=function(a,b){var c,d,e;if(null==this)throw new TypeError;if(c=Object(this),d=c.length>>>0,"function"!=typeof a)throw new TypeError;for(e=0;d>e;e+=1)if(e in c&&!a.call(b,c[e],e,c))return!1;return!0}),"function"!=typeof Function.prototype.bind&&(Function.prototype.bind=function(a){var b,c,d,e,f=[].slice;if("function"!=typeof this)throw new TypeError("Function.prototype.bind called on non-function");return b=f.call(arguments,1),c=this,d=function(){},e=function(){var e=this instanceof d&&a?this:a;return c.apply(e,b.concat(f.call(arguments)))},d.prototype=this.prototype,e.prototype=new d,e}),a.addEventListener||!function(a,b){var c,d,e,f,g,h;c=function(a,b){var c,d=this;for(c in a)d[c]=a[c];d.currentTarget=b,d.target=a.srcElement||b,d.timeStamp=+new Date,d.preventDefault=function(){a.returnValue=!1},d.stopPropagation=function(){a.cancelBubble=!0}},d=function(a,b){var d,e,f=this;d=f.listeners||(f.listeners=[]),e=d.length,d[e]=[b,function(a){b.call(f,new c(a,f))}],f.attachEvent("on"+a,d[e][1])},e=function(a,b){var c,d,e=this;if(e.listeners)for(c=e.listeners,d=c.length;d--;)c[d][0]===b&&e.detachEvent("on"+a,c[d][1])},a.addEventListener=b.addEventListener=d,a.removeEventListener=b.removeEventListener=e,"Element"in a?(a.Element.prototype.addEventListener=d,a.Element.prototype.removeEventListener=e):(h=b.createElement,b.createElement=function(a){var b=h(a);return b.addEventListener=d,b.removeEventListener=e,b},f=b.getElementsByTagName("head")[0],g=b.createElement("style"),f.insertBefore(g,f.firstChild))}(a,b),a.getComputedStyle||(c.getComputedStyle=function(){function a(c,d,e,f){var g,h=d[e],i=parseFloat(h),j=h.split(/\d/)[0];return isNaN(i)&&/^thin|medium|thick$/.test(h)&&(i=b(h),j=""),f=null!=f?f:/%|em/.test(j)&&c.parentElement?a(c.parentElement,c.parentElement.currentStyle,"fontSize",null):16,g="fontSize"==e?f:/width/i.test(e)?c.clientWidth:c.clientHeight,"em"==j?i*f:"in"==j?96*i:"pt"==j?96*i/72:"%"==j?i/100*g:i}function b(a){var b,c;return f[a]||(b=document.createElement("div"),b.style.display="block",b.style.position="fixed",b.style.width=b.style.height="0",b.style.borderRight=a+" solid black",document.getElementsByTagName("body")[0].appendChild(b),c=b.getBoundingClientRect(),f[a]=c.right-c.left),f[a]
}function c(a,b){var c="border"==b?"Width":"",d=b+"Top"+c,e=b+"Right"+c,f=b+"Bottom"+c,g=b+"Left"+c;a[b]=(a[d]==a[e]==a[f]==a[g]?[a[d]]:a[d]==a[f]&&a[g]==a[e]?[a[d],a[e]]:a[g]==a[e]?[a[d],a[e],a[f]]:[a[d],a[e],a[f],a[g]]).join(" ")}function d(b){var d,e,f,g;d=b.currentStyle,e=this,f=a(b,d,"fontSize",null);for(g in d)/width|height|margin.|padding.|border.+W/.test(g)?"auto"===d[g]?/^width|height/.test(g)?e[g]=("width"===g?b.clientWidth:b.clientHeight)+"px":/(?:padding)?Top|Bottom$/.test(g)&&(e[g]="0px"):e[g]=a(b,d,g,f)+"px":"styleFloat"===g?e.float=d[g]:e[g]=d[g];return c(e,"margin"),c(e,"padding"),c(e,"border"),e.fontSize=f+"px",e}function e(a){return new d(a)}var f={};return d.prototype={constructor:d,getPropertyPriority:function(){},getPropertyValue:function(a){return this[a]||""},item:function(){},removeProperty:function(){},setProperty:function(){},getPropertyCSSValue:function(){}},e}())),c}(),vb=function(a,b,c){function d(b,c,d){var f;if(c){for(;c.t===a.BRACKETED&&c.x;)c=c.x;return c.t===a.REFERENCE?d.r=c.n:c.t===a.NUMBER_LITERAL&&i.test(c.v)?d.r=c.v:(f=e(b,c))?d.rx=f:d.x=b.flattenExpression(c),d}}function e(b,c){for(var d,e=[];c.t===a.MEMBER&&c.r.t===a.REFINEMENT;)d=c.r,e.unshift(d.x?d.x.t===a.REFERENCE?d.x:b.flattenExpression(d.x):d.n),c=c.x;return c.t!==a.REFERENCE?null:{r:c.n,m:e}}var f,g,h=/^\s*:\s*([a-zA-Z_$][a-zA-Z_$0-9]*)/,i=/^[0-9][1-9]*$/,j=new RegExp("^("+Object.keys(c).join("|")+")\\b");return g=/^[a-zA-Z$_0-9]+(?:(\.[a-zA-Z$_0-9]+)|(\[[a-zA-Z$_0-9]+\]))*$/,f=function(c,e){var f,i,k,l,m,n,o,p,q,r;if(f=c.pos,k={},r=c[e.delimiters],e.isStatic&&(k.s=!0),e.isTriple)k.t=a.TRIPLE;else{if("!"===c.remaining()[0]){try{n=c.readExpression(),c.allowWhitespace(),c.remaining().indexOf(r[1])?n=null:k.t=a.INTERPOLATOR}catch(s){}if(!n)return q=c.remaining().indexOf(r[1]),~q?c.pos+=q:c.error("Expected closing delimiter ('"+r[1]+"')"),{t:a.COMMENT}}if(!n)if(l=b(c),k.t=l||a.INTERPOLATOR,l===a.SECTION)(m=c.matchPattern(j))&&(k.n=m),c.allowWhitespace();else if((l===a.COMMENT||l===a.CLOSING)&&(p=c.remaining(),q=p.indexOf(r[1]),-1!==q))return k.r=p.substr(0,q).split(" ")[0],c.pos+=q,k}if(!n){c.allowWhitespace(),n=c.readExpression();var t;if(k.t===a.PARTIAL&&n&&(t=c.readExpression())&&(k={contextPartialExpression:n},n=t),p=c.remaining(),p.substr(0,r[1].length)!==r[1]&&":"!==p.charAt(0)){if(i=c.pos,c.pos=f,p=c.remaining(),q=p.indexOf(r[1]),-1!==q)return k.r=p.substr(0,q).trim(),g.test(k.r)||c.error("Expected a legal Mustache reference"),c.pos+=q,k;c.pos=i}}return d(c,n,k),k.contextPartialExpression&&(k.contextPartialExpression=[d(c,k.contextPartialExpression,{t:a.PARTIAL})]),(o=c.matchPattern(h))&&(k.i=o),k}}(R,sb,tb,ub),wb=function(a,b,c,d,e){function f(a){var b;return a.interpolate[a.inside]===!1?null:(b=c.slice().sort(function(b,c){return a[c.delimiters][0].length-a[b.delimiters][0].length}),function d(c){return c?g(a,c)||d(b.shift()):null}(b.shift()))}function g(c,f){var g,i,j,l,n,o,p,q,r;if(g=c.pos,j=c[f.delimiters],!c.matchString(j[0]))return null;if(i=b(c))return c.matchString(j[1])?(c[f.delimiters]=i,m):null;if(c.allowWhitespace(),i=d(c,f),null===i)return c.pos=g,null;if(c.allowWhitespace(),c.matchString(j[1])||c.error("Expected closing delimiter '"+j[1]+"' after reference"),i.t===a.COMMENT&&(i.exclude=!0),i.t===a.CLOSING&&(c.sectionDepth-=1,c.sectionDepth<0&&(c.pos=g,c.error("Attempted to close a section that wasn't open"))),i.contextPartialExpression)i.f=i.contextPartialExpression,i.t=a.SECTION,i.n="with",delete i.contextPartialExpression;else if(k(i)){for(c.sectionDepth+=1,l=[],p=l,n=i.n;q=c.read();){if(q.t===a.CLOSING){n&&q.r!==n&&c.error("Expected {{/"+n+"}}");break}if(q.t===a.INTERPOLATOR&&"else"===q.r)switch(i.n){case"unless":c.error("{{else}} not allowed in {{#unless}}");break;case"with":c.error("{{else}} not allowed in {{#with}}");break;default:p=o=[];continue}p.push(q)}l.length&&(i.f=l,!i.i&&"each"===i.n&&(r=h(i.f))&&(i.i=r)),o&&o.length&&(i.l=o)}return c.includeLinePositions&&(i.p=c.getLinePos(g)),i.n?i.n=e[i.n]:i.t===a.INVERTED&&(i.t=a.SECTION,i.n=a.SECTION_UNLESS),i}function h(b){var c,d,e,f;if(b)for(c=b.length;c--;){if(d=b[c],d.t===a.ELEMENT){if(e=h(d.o&&d.o.d)||h(d.t0&&d.t0.d)||h(d.t1&&d.t1.d)||h(d.t2&&d.t2.d)||h(d.f))return e;for(f in d.v)if(d.v.hasOwnProperty(f)&&d.v[f].d&&(e=h(d.v[f].d)))return e;for(f in d.a)if(d.a.hasOwnProperty(f)&&(e=h(d.a[f])))return e}if(d.t===a.INTERPOLATOR||d.t===a.TRIPLE||d.t===a.SECTION){if(d.r&&n.test(d.r))return d.r;if(d.x&&(e=i(d.x)))return e;if(d.rx&&(e=j(d.rx)))return e}}}function i(a){var b;for(b=a.r.length;b--;)if(n.test(a.r[b]))return a.r[b]}function j(b){var c,d,e;for(c=b.m.length;c--;){if(e=b.m[c],e.r&&(d=i(e)))return d;if(e.t===a.REFERENCE&&n.test(e.n))return e.n}}function k(b){return b.t===a.SECTION||b.t===a.INVERTED}var l,m={t:a.DELIMCHANGE,exclude:!0},n=/^@(?:index|key)$/;return l=f}(R,qb,rb,vb,tb),xb=function(a){var b="<!--",c="-->";return function(d){var e,f,g,h,i;return e=d.pos,d.matchString(b)?(g=d.remaining(),h=g.indexOf(c),-1===h&&d.error("Illegal HTML - expected closing comment sequence ('-->')"),f=g.substr(0,h),d.pos+=h+3,i={t:a.COMMENT,c:f},d.includeLinePositions&&(i.p=d.getLinePos(e)),i):null}}(R),yb=function(){var a=/^(?:area|base|br|col|command|doctype|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i;return a}(),zb=function(a,b){var c,d,e;for(c=b.length;c--;){if(d=a.indexOf(b[c]),!d)return 0;-1!==d&&(!e||e>d)&&(e=d)}return e||-1},Ab=function(a){return function(b){var c,d,e,f;return d=b.remaining(),f=b.inside?"</"+b.inside:"<",b.inside&&!b.interpolate[b.inside]?c=d.indexOf(f):(e=[f,b.delimiters[0],b.tripleDelimiters[0],b.staticDelimiters[0],b.staticTripleDelimiters[0]],b.inAttribute===!0?e.push('"',"'","=",">","`"):b.inAttribute&&e.push(b.inAttribute),c=a(d,e)),c?(-1===c&&(c=d.length),b.pos+=c,d.substr(0,c)):null}}(zb),Bb=function(a){var b=/^([a-zA-Z]{1,}:?[a-zA-Z0-9\-]*)\s*\>/;return function(c){var d;return c.matchString("</")?(d=c.matchPattern(b))?{t:a.CLOSING_TAG,e:d}:(c.pos-=2,void c.error("Illegal closing tag")):null}}(R),Cb=function(){function a(a){return a?10===a?32:128>a?a:159>=a?d[a-128]:55296>a?a:57343>=a?65533:65535>=a?a:65533:65533}var b,c,d,e;return c={quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},d=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376],e=new RegExp("&(#?(?:x[\\w\\d]+|\\d+|"+Object.keys(c).join("|")+"));?","g"),b=function(b){return b.replace(e,function(b,d){var e;return e="#"!==d[0]?c[d]:"x"===d[1]?parseInt(d.substring(2),16):parseInt(d.substring(1),10),e?String.fromCharCode(a(e)):b})}}(ub),Db=function(a,b,c){function d(a){var b,c,d;return a.allowWhitespace(),(c=a.matchPattern(k))?(b={name:c},d=e(a),d&&(b.value=d),b):null}function e(a){var b,d,e,f;return b=a.pos,a.allowWhitespace(),a.matchString("=")?(a.allowWhitespace(),d=a.pos,e=a.sectionDepth,f=h(a,"'")||h(a,'"')||g(a),a.sectionDepth!==e&&(a.pos=d,a.error("An attribute value must contain as many opening section tags as closing section tags")),null===f?(a.pos=b,null):f.length?1===f.length&&"string"==typeof f[0]?c(f[0]):f:null):(a.pos=b,null)}function f(b){var c,d,e,f,g;return c=b.pos,(d=b.matchPattern(l))?(e=d,f=[b.delimiters[0],b.tripleDelimiters[0],b.staticDelimiters[0],b.staticTripleDelimiters[0]],-1!==(g=a(e,f))&&(d=d.substr(0,g),b.pos=c+d.length),d):null}function g(a){var c,d;for(a.inAttribute=!0,c=[],d=b(a)||f(a);null!==d;)c.push(d),d=b(a)||f(a);return c.length?(a.inAttribute=!1,c):null}function h(a,c){var d,e,f;if(d=a.pos,!a.matchString(c))return null;for(a.inAttribute=c,e=[],f=b(a)||i(a,c);null!==f;)e.push(f),f=b(a)||i(a,c);return a.matchString(c)?(a.inAttribute=!1,e):(a.pos=d,null)}function i(b,c){var d,e,f,g;return d=b.pos,f=b.remaining(),g=[c,b.delimiters[0],b.tripleDelimiters[0],b.staticDelimiters[0],b.staticTripleDelimiters[0]],e=a(f,g),-1===e&&b.error("Quoted attribute value must have a closing quote"),e?(b.pos+=e,f.substr(0,e)):null}var j,k=/^[^\s"'>\/=]+/,l=/^[^\s"'=<>`]+/;return j=d}(zb,wb,Cb),Eb=function(a,b,c){function d(a){var b,d,e;return a.allowWhitespace(),(b=c(a))?(e={key:b},a.allowWhitespace(),a.matchString(":")?(a.allowWhitespace(),(d=a.read())?(e.value=d.v,e):null):null):null}var e,f,g,h,i,j,k;return f={"true":!0,"false":!1,undefined:void 0,"null":null},g=new RegExp("^(?:"+Object.keys(f).join("|")+")"),h=/^(?:[+-]?)(?:(?:(?:0|[1-9]\d*)?\.\d+)|(?:(?:0|[1-9]\d*)\.)|(?:0|[1-9]\d*))(?:[eE][+-]?\d+)?/,i=/\$\{([^\}]+)\}/g,j=/^\$\{([^\}]+)\}/,k=/^\s*$/,e=a.extend({init:function(a,b){this.values=b.values,this.allowWhitespace()},postProcess:function(a){return 1===a.length&&k.test(this.leftover)?{value:a[0].v}:null},converters:[function(a){var b;return a.values?(b=a.matchPattern(j),b&&a.values.hasOwnProperty(b)?{v:a.values[b]}:void 0):null},function(a){var b;return(b=a.matchPattern(g))?{v:f[b]}:void 0},function(a){var b;return(b=a.matchPattern(h))?{v:+b}:void 0},function(a){var c,d=b(a);return d&&(c=a.values)?{v:d.v.replace(i,function(a,b){return b in c?c[b]:b})}:d},function(a){var b,c;if(!a.matchString("{"))return null;if(b={},a.allowWhitespace(),a.matchString("}"))return{v:b};for(;c=d(a);){if(b[c.key]=c.value,a.allowWhitespace(),a.matchString("}"))return{v:b};if(!a.matchString(","))return null}return null},function(a){var b,c;if(!a.matchString("["))return null;if(b=[],a.allowWhitespace(),a.matchString("]"))return{v:b};for(;c=a.read();){if(b.push(c.v),a.allowWhitespace(),a.matchString("]"))return{v:b};if(!a.matchString(","))return null;a.allowWhitespace()}return null}]}),function(a,b){var c=new e(a,{values:b});return c.result}}(pb,Z,_),Fb=function(a,b,c,d){var e,f=/^([a-zA-Z_$][a-zA-Z_$0-9]*)\(/;return e=a.extend({converters:[b]}),function(a){var b,g,h,i,j,k,l,m,n;if("string"==typeof a){if(g=f.exec(a))return b={m:g[1]},i="["+a.slice(b.m.length+1,-1)+"]",h=new e(i),b.a=c(h.result[0]),b;if(-1===a.indexOf(":"))return a.trim();a=[a]}for(b={},l=[],m=[];a.length;)if(j=a.shift(),"string"==typeof j){if(k=j.indexOf(":"),-1!==k){k&&l.push(j.substr(0,k)),j.length>k+1&&(m[0]=j.substring(k+1));break}l.push(j)}else l.push(j);return m=m.concat(a),m.length||"string"!=typeof l?(b={n:1===l.length&&"string"==typeof l[0]?l[0]:l},1===m.length&&"string"==typeof m[0]?(n=d("["+m[0]+"]"),b.a=n?n.value:m[0].trim()):b.d=m):b=l,b}}(pb,nb,ob,Eb),Gb=function(a,b,c,d,e,f,g,h){function i(c){var d,e,f,i,k,m,u,v,w,x,y;if(d=c.pos,c.inside)return null;if(!c.matchString("<"))return null;if("/"===c.nextChar())return null;if(e={t:a.ELEMENT},c.includeLinePositions&&(e.p=c.getLinePos(d)),c.matchString("!")&&(e.y=1),e.e=c.matchPattern(n),!e.e)return null;for(o.test(c.nextChar())||c.error("Illegal tag name"),m=function(a,b){var d=b.n||b;r.test(d)&&(c.pos-=d.length,c.error("Cannot use reserved event names (change, reset, teardown, update)")),e.v[a]=b};u=g(c);)(i=s[u.name])?e[i]=h(u.value):(k=q.exec(u.name))?(e.v||(e.v={}),v=h(u.value),m(k[1],v)):c.sanitizeEventAttributes&&p.test(u.name)||(e.a||(e.a={}),e.a[u.name]=u.value||0);if(c.allowWhitespace(),c.matchString("/")&&(w=!0),!c.matchString(">"))return null;if(f=e.e.toLowerCase(),!w&&!b.test(e.e)){for(("script"===f||"style"===f)&&(c.inside=f),x=[];j(f,c.remaining())&&(y=c.read(l))&&y.t!==a.CLOSING&&y.t!==a.CLOSING_TAG;)x.push(y);x.length&&(e.f=x)}return c.inside=null,c.sanitizeElements&&-1!==c.sanitizeElements.indexOf(f)?t:e}function j(a,b){var c,d;return c=/^<([a-zA-Z][a-zA-Z0-9]*)/.exec(b),d=m[a],c&&d?!~d.indexOf(c[1].toLowerCase()):!0}var k,l,m,n=/^[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/,o=/^[\s\n\/>]/,p=/^on/,q=/^on-([a-zA-Z\\*\\.$_][a-zA-Z\\*\\.$_0-9\-]+)$/,r=/^(?:change|reset|teardown|update)$/,s={"intro-outro":"t0",intro:"t1",outro:"t2",decorator:"o"},t={exclude:!0};return l=[c,d,i,e,f],m={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]},k=i}(R,yb,wb,xb,Ab,Bb,Db,Fb),Hb=function(){var a=/^[ \t\f\r\n]+/,b=/[ \t\f\r\n]+$/;return function(c,d,e){var f;d&&(f=c[0],"string"==typeof f&&(f=f.replace(a,""),f?c[0]=f:c.shift())),e&&(f=c[c.length-1],"string"==typeof f&&(f=f.replace(b,""),f?c[c.length-1]=f:c.pop()))}}(),Ib=function(a){function b(a){return"string"==typeof a}function c(b){return b.t===a.COMMENT||b.t===a.DELIMCHANGE}function d(b){return(b.t===a.SECTION||b.t===a.INVERTED)&&b.f}var e,f=/^\s*\r?\n/,g=/\r?\n\s*$/;return e=function(a){var e,h,i,j,k;for(e=1;e<a.length;e+=1)h=a[e],i=a[e-1],j=a[e-2],b(h)&&c(i)&&b(j)&&g.test(j)&&f.test(h)&&(a[e-2]=j.replace(g,"\n"),a[e]=h.replace(f,"")),d(h)&&b(i)&&g.test(i)&&b(h.f[0])&&f.test(h.f[0])&&(a[e-1]=i.replace(g,"\n"),h.f[0]=h.f[0].replace(f,"")),b(h)&&d(i)&&(k=i.f[i.f.length-1],b(k)&&g.test(k)&&f.test(h)&&(i.f[i.f.length-1]=k.replace(g,"\n"),a[e]=h.replace(f,"")));return a}}(R),Jb=function(){var a=/[-/\\^$*+?.()|[\]{}]/g;return function(b){return b.replace(a,"\\$&")}}(),Kb=function(a,b,c,d,e,f,g,h,i){function j(b,c,d,e,f,i){var k,l,m,n,s,t,u,v,w;for(h(b),k=b.length;k--;)l=b[k],l.exclude?b.splice(k,1):c&&l.t===a.COMMENT&&b.splice(k,1);for(g(b,e,f),k=b.length;k--;)if(l=b[k],l.f&&(s=d||l.t===a.ELEMENT&&p.test(l.e),s||(m=b[k-1],n=b[k+1],(!m||"string"==typeof m&&r.test(m))&&(t=!0),(!n||"string"==typeof n&&q.test(n))&&(u=!0)),j(l.f,c,s,t,u,i)),l.l&&(j(l.l,c,d,t,u,i),i&&(v={t:4,n:a.SECTION_UNLESS,f:l.l},l.r&&(v.r=l.r),l.x&&(v.x=l.x),l.rx&&(v.rx=l.rx),b.splice(k+1,0,v),delete l.l)),l.a)for(w in l.a)l.a.hasOwnProperty(w)&&"string"!=typeof l.a[w]&&j(l.a[w],c,d,t,u,i);for(k=b.length;k--;)"string"==typeof b[k]&&("string"==typeof b[k+1]&&(b[k]=b[k]+b[k+1],b.splice(k+1,1)),d||(b[k]=b[k].replace(o," ")),""===b[k]&&b.splice(k,1))}function k(a){var b=arguments[1];void 0===b&&(b=a),b.delimiters=a.delimiters||["{{","}}"],b.tripleDelimiters=a.tripleDelimiters||["{{{","}}}"],b.staticDelimiters=a.staticDelimiters||["[[","]]"],b.staticTripleDelimiters=a.staticTripleDelimiters||["[[[","]]]"]}var l,m,n,o=/[ \t\f\r\n]+/g,p=/^(?:pre|script|style|textarea)$/i,q=/^\s+/,r=/\s+$/;return m=b.extend({init:function(a,b){k(b,this),this.sectionDepth=0,this.interpolate={script:!b.interpolate||b.interpolate.script!==!1,style:!b.interpolate||b.interpolate.style!==!1},b.sanitize===!0&&(b.sanitize={elements:"applet base basefont body frame frameset head html isindex link meta noframes noscript object param script style title".split(" "),eventAttributes:!0}),this.sanitizeElements=b.sanitize&&b.sanitize.elements,this.sanitizeEventAttributes=b.sanitize&&b.sanitize.eventAttributes,this.includeLinePositions=b.includeLinePositions},postProcess:function(a,b){return this.sectionDepth>0&&this.error("A section was left open"),j(a,b.stripComments!==!1,b.preserveWhitespace,!b.preserveWhitespace,!b.preserveWhitespace,b.rewriteElse!==!1),a},converters:[c,d,e,f]}),n=function(a){var b=arguments[1];void 0===b&&(b={});var c,d,e,f,g,h,j,l;if(k(b),j=new RegExp("<!--\\s*"+i(b.delimiters[0])+"\\s*>\\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\\s*"+i(b.delimiters[1])+"\\s*-->"),l=new RegExp("<!--\\s*"+i(b.delimiters[0])+"\\s*\\/\\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\\s*"+i(b.delimiters[1])+"\\s*-->"),c={v:1},j.test(a)){for(d=a,a="";g=j.exec(d);){if(f=g[1],a+=d.substr(0,g.index),d=d.substring(g.index+g[0].length),h=l.exec(d),!h||h[1]!==f)throw new Error('Inline partials must have a closing delimiter, and cannot be nested. Expected closing for "'+f+'", but '+(h?'instead found "'+h[1]+'"':" no closing found"));(e||(e={}))[f]=new m(d.substr(0,h.index),b).result,d=d.substring(h.index+h[0].length)}a+=d,c.p=e}return c.t=new m(a,b).result,c},l=n}(R,pb,wb,xb,Gb,Ab,Hb,Ib,Jb),Lb=function(){return function(a,b){var c=a.map(b);return a.forEach(function(a,b){c[a]=c[b]}),c}}(ub),Mb=function(a){var b,c;return b=["preserveWhitespace","sanitize","stripComments","delimiters","tripleDelimiters","interpolate"],c=a(b,function(a){return a})}(Lb),Nb=function(a,b,c,d,e){function f(a){var b=d(l);return b.parse=function(b,c){return g(b,c||a)},b}function g(b,d){if(!c)throw new Error(a.missingParser);return c(b,d||this.options)}function h(a,c){var d;if(!b){if(c&&c.noThrow)return;throw new Error("Cannot retrieve template #"+a+" as Ractive is not running in a browser.")}if(i(a)&&(a=a.substring(1)),!(d=document.getElementById(a))){if(c&&c.noThrow)return;throw new Error("Could not find template element with id #"+a)}if("SCRIPT"!==d.tagName.toUpperCase()){if(c&&c.noThrow)return;throw new Error("Template element with id #"+a+", must be a <script> element")}return d.innerHTML}function i(a){return"#"===a.charAt(0)}function j(a){return!("string"==typeof a)}function k(a){return a.defaults&&(a=a.defaults),e.reduce(function(b,c){return b[c]=a[c],b},{})}var l={parse:g,fromId:h,isHashedId:i,isParsed:j,getParseOptions:k,createHelper:f};return l}(Q,B,Kb,S,Mb),Ob=function(a,b){function c(a){var b,c=a._config.template;if(c&&c.fn)return b=d(a,c.fn),b!==c.result?(c.result=b,b=e(b,a)):void 0}function d(b,c){var d=a.createHelper(a.getParseOptions(b));return c.call(b,b.data,d)}function e(c,d){if("string"==typeof c)"#"===c[0]&&(c=a.fromId(c)),c=b(c,a.getParseOptions(d));else if(1!==c.v)throw new Error("Mismatched template version! Please ensure you are using the latest version of Ractive.js in your build process as well as in your app");return c}function f(a,b,c){if(b)for(var d in b)(c||!a.hasOwnProperty(d))&&(a[d]=b[d])}var g={name:"template",extend:function(a,b,c){var d;"template"in c&&(d=c.template,b.template="function"==typeof d?d:e(d,b))},init:function(a,b,c){var g,h;g="template"in c?c.template:a.prototype.template,"function"==typeof g&&(h=g,g=d(b,h),b._config.template={fn:h,result:g}),g=e(g,b),b.template=g.t,g.p&&f(b.partials,g.p)},reset:function(a){var b,d=c(a);return d?(b=e(d,a),a.template=b.t,f(a.partials,b.p,!0),!0):void 0}};return g}(Nb,Kb),Pb=function(a){function b(a,b){this.name=a,this.useDefaults=b}function c(a,b){var d,e;return(d=b(a))?d:!a.isolated&&(e=a._parent)?c(e,b):void 0}return b.prototype={constructor:b,extend:function(a,b,c){this.configure(this.useDefaults?a.defaults:a,this.useDefaults?b:b.constructor,c)},init:function(a,b,c){this.configure(this.useDefaults?a.defaults:a,b,c)},configure:function(b,c,d){var e,f=this.name,g=d[f];e=a(b[f]);for(var h in g)e[h]=g[h];c[f]=e},reset:function(a){var b=a[this.name],c=!1;return Object.keys(b).forEach(function(a){var d=b[a];d._fn&&(d._fn.isOwner?b[a]=d._fn:delete b[a],c=!0)}),c},findOwner:function(a,b){return a[this.name].hasOwnProperty(b)?a:this.findConstructor(a.constructor,b)},findConstructor:function(a,b){return a?a[this.name].hasOwnProperty(b)?a:this.findConstructor(a._parent,b):void 0},find:function(a,b){var d=this;return c(a,function(a){return a[d.name][b]})},findInstance:function(a,b){var d=this;return c(a,function(a){return a[d.name][b]?a:void 0})}},b}(S,ub),Qb=function(a,b){var c=["adaptors","components","computed","decorators","easing","events","interpolators","partials","transitions"],d=a(c,function(a){return new b(a,"computed"===a)});return d}(Lb,Pb),Rb=function(){},Sb=function(a){function b(b,c){var d;if(c in b){var e=b[c];d="function"==typeof e?e:function(){return e}}else d=a;return d}var c;return c=function(a,c,d){if(!/_super/.test(d))return d;var e=function(){var a,f=b(e._parent,c),g="_super"in this,h=this._super;return this._super=f,a=d.apply(this,arguments),g?this._super=h:delete this._super,a};return e._parent=a,e._method=d,e}}(Rb),Tb=function(a,b){function c(b,c,e){if(c in b){if(e in b)throw new Error(d(c,e,!0));a(d(c,e)),b[e]=b[c]}}function d(a,b,c){return"options."+a+" has been deprecated in favour of options."+b+"."+(c?" You cannot specify both options, please use options."+b+".":"")}function e(a){c(a,"eventDefinitions","events")}function f(a){b(a.adaptors)&&c(a,"adaptors","adapt")}return function(a){e(a),f(a)}}(L,g),Ub=function(a,b,c,d,e,f,g,h){function i(a,b,c,d,e){k[b][a](c,d,e)}function j(a,b,d,e){h(e),i(a,"data",b,d,e),m.parseOptions.forEach(function(a){a in e&&(d[a]=e[a])});for(var f in e)if(f in c&&!(f in m.parseOptions)&&!(f in k)){var j=e[f];d[f]="function"==typeof j?g(b.prototype,f,j):j}m.registries.forEach(function(c){c[a](b,d,e)}),i(a,"template",b,d,e),i(a,"css",b,d,e)}var k,l,m;k={data:b,template:d,css:a},l=Object.keys(c).filter(function(a){return!f[a]&&!k[a]&&!e[a]}),m=[].concat(k.data,e,l,f,k.template,k.css);for(var n in k)m[n]=k[n];return m.keys=Object.keys(c).concat(f.map(function(a){return a.name})).concat(["css"]),m.parseOptions=e,m.registries=f,m.extend=function(a,b,c){j("extend",a,b,c)},m.init=function(a,b,c){j("init",a,b,c),b._config&&(b._config.options=c)},m.reset=function(a){return m.filter(function(b){return b.reset&&b.reset(a)}).map(function(a){return a.name})},m}(N,P,c,Ob,Mb,Qb,Sb,Tb),Vb=function(a,b,c,d){function e(a){return function(){return a}}var f,g=function(a,f,g,h){if(a===f)return e(f);if(h){var i=d.registries.interpolators.find(g,h);if(i)return i(a,f)||e(f);b('Missing "'+h+'" interpolator. You may need to download a plugin from [TODO]')}return c.number(a,f)||c.array(a,f)||c.object(a,f)||e(f)};return a.interpolate=g,f=g}(e,L,j,Ub),Wb=function(a,b,c){var d=function(a){var b;this.startTime=Date.now();for(b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);this.interpolator=c(this.from,this.to,this.root,this.interpolator),this.running=!0,this.tick()};return d.prototype={tick:function(){var c,d,e,f,g,h;return h=this.keypath,this.running?(f=Date.now(),c=f-this.startTime,c>=this.duration?(null!==h&&(b.start(this.root),this.root.viewmodel.set(h,this.to),b.end()),this.step&&this.step(1,this.to),this.complete(this.to),g=this.root._animations.indexOf(this),-1===g&&a("Animation was not found"),this.root._animations.splice(g,1),this.running=!1,!1):(d=this.easing?this.easing(c/this.duration):c/this.duration,null!==h&&(e=this.interpolator(d),b.start(this.root),this.root.viewmodel.set(h,e),b.end()),this.step&&this.step(d,e),!0)):!1},stop:function(){var b;this.running=!1,b=this.root._animations.indexOf(this),-1===b&&a("Animation was not found"),this.root._animations.splice(b,1)}},d}(L,v,Vb),Xb=function(a,b,c,d,e){function f(b,f,g,h){var j,k,l,m;return f&&(f=c(f)),null!==f&&(m=b.viewmodel.get(f)),d.abort(f,b),a(m,g)?(h.complete&&h.complete(h.to),i):(h.easing&&(j="function"==typeof h.easing?h.easing:b.easing[h.easing],"function"!=typeof j&&(j=null)),k=void 0===h.duration?400:h.duration,l=new e({keypath:f,from:m,to:g,root:b,duration:k,easing:j,interpolator:h.interpolator,step:h.step,complete:h.complete}),d.add(l),b._animations.push(l),l)}var g,h=function(){},i={stop:h};return g=function(a,c,d){var e,g,i,j,k,l,m,n,o,p,q,r,s,t;if(e=new b(function(a){g=a}),"object"==typeof a){d=c||{},l=d.easing,m=d.duration,k=[],n=d.step,o=d.complete,(n||o)&&(q={},d.step=null,d.complete=null,p=function(a){return function(b,c){q[a]=c}});for(i in a)a.hasOwnProperty(i)&&((n||o)&&(r=p(i),d={easing:l,duration:m},n&&(d.step=r)),d.complete=o?r:h,k.push(f(this,i,a[i],d)));return t={easing:l,duration:m},n&&(t.step=function(a){n(a,q)}),o&&e.then(function(a){o(a,q)}),t.complete=g,s=f(this,null,null,t),k.push(s),e.stop=function(){for(var a;a=k.pop();)a.stop();s&&s.stop()},e}return d=d||{},d.complete&&e.then(d.complete),d.complete=g,j=f(this,a,c,d),e.stop=function(){j.stop()},e}}(r,o,G,K,Wb),Yb=function(a){return function(){return this.detached?this.detached:(this.el&&a(this.el.__ractive_instances__,this),this.detached=this.fragment.detach(),this.detached)}}(n),Zb=function(a){return this.el?this.fragment.find(a):null},$b=function(a,b,c){var d,e,f,g,h,i,j,k;if(a){for(e=c("div"),f=["matches","matchesSelector"],k=function(a){return function(b,c){return b[a](c)}},i=f.length;i--&&!d;)if(g=f[i],e[g])d=k(g);else for(j=b.length;j--;)if(h=b[i]+g.substr(0,1).toUpperCase()+g.substring(1),e[h]){d=k(h);break}d||(d=function(a,b){var c,d,f;for(d=a.parentNode,d||(e.innerHTML="",d=e,a=a.cloneNode(),e.appendChild(a)),c=d.querySelectorAll(b),f=c.length;f--;)if(c[f]===a)return!0;return!1})}else d=null;return d}(B,H,A),_b=function(a){return function(b,c){var d=this._isComponentQuery?!this.selector||b.name===this.selector:a(b.node,this.selector);return d?(this.push(b.node||b.instance),c||this._makeDirty(),!0):void 0}}($b),ac=function(){var a,b,c;a=this._root[this._isComponentQuery?"liveComponentQueries":"liveQueries"],b=this.selector,c=a.indexOf(b),-1!==c&&(a.splice(c,1),a[b]=null)},bc=function(){function a(a){var b;return(b=a.parentFragment)?b.owner:a.component&&(b=a.component.parentFragment)?b.owner:void 0}function b(b){var c,d;for(c=[b],d=a(b);d;)c.push(d),d=a(d);return c}var c;return c=function(a,c){var d,e,f,g,h,i,j,k,l,m;for(d=b(a.component||a._ractive.proxy),e=b(c.component||c._ractive.proxy),f=d[d.length-1],g=e[e.length-1];f&&f===g;)d.pop(),e.pop(),h=f,f=d[d.length-1],g=e[e.length-1];if(f=f.component||f,g=g.component||g,l=f.parentFragment,m=g.parentFragment,l===m)return i=l.items.indexOf(f),j=m.items.indexOf(g),i-j||d.length-e.length;if(k=h.fragments)return i=k.indexOf(l),j=k.indexOf(m),i-j||d.length-e.length;throw new Error("An unexpected condition was met while comparing the position of two components. Please file an issue at https://github.com/RactiveJS/Ractive/issues - thanks!")}}(),cc=function(a){return function(b,c){var d;return b.compareDocumentPosition?(d=b.compareDocumentPosition(c),2&d?1:-1):a(b,c)}}(bc),dc=function(a,b){return function(){this.sort(this._isComponentQuery?b:a),this._dirty=!1}}(cc,bc),ec=function(a){return function(){var b=this;this._dirty||(this._dirty=!0,a.scheduleTask(function(){b._sort()}))}}(v),fc=function(a){var b=this.indexOf(this._isComponentQuery?a.instance:a);-1!==b&&this.splice(b,1)},gc=function(a,b,c,d,e,f){return function(g,h,i,j){var k=[];return a(k,{selector:{value:h},live:{value:i},_isComponentQuery:{value:j},_test:{value:b}}),i?(a(k,{cancel:{value:c},_root:{value:g},_sort:{value:d},_makeDirty:{value:e},_remove:{value:f},_dirty:{value:!1,writable:!0}}),k):k}}(D,_b,ac,dc,ec,fc),hc=function(a){return function(b,c){var d,e;return this.el?(c=c||{},d=this._liveQueries,(e=d[b])?c&&c.live?e:e.slice():(e=a(this,b,!!c.live,!1),e.live&&(d.push(b),d["_"+b]=e),this.fragment.findAll(b,e),e)):[]}}(gc),ic=function(a){return function(b,c){var d,e;return c=c||{},d=this._liveComponentQueries,(e=d[b])?c&&c.live?e:e.slice():(e=a(this,b,!!c.live,!0),e.live&&(d.push(b),d["_"+b]=e),this.fragment.findAllComponents(b,e),e)}}(gc),jc=function(a){return this.fragment.findComponent(a)},kc=function(a){return function(b){var c={args:Array.prototype.slice.call(arguments,1)};a(this,b,c)}}(m),lc=function(a){var b={capture:!0};return function(c){return c=a(c),this.viewmodel.get(c,b)}}(G),mc=function(a){var b;if(a&&"boolean"!=typeof a)return"undefined"!=typeof window&&document&&a?a.nodeType?a:"string"==typeof a&&(b=document.getElementById(a),!b&&document.querySelector&&(b=document.querySelector(a)),b&&b.nodeType)?b:a[0]&&a[0].nodeType?a[0]:null:null},nc=function(a){return function(b,c){if(!this.rendered)throw new Error("The API has changed - you must call `ractive.render(target[, anchor])` to render your Ractive instance. Once rendered you can use `ractive.insert()`.");if(b=a(b),c=a(c)||null,!b)throw new Error("You must specify a valid target to insert into");b.insertBefore(this.detach(),c),this.el=b,(b.__ractive_instances__||(b.__ractive_instances__=[])).push(this),this.detached=null}}(mc),oc=function(a,b,c){return function(d,e,f){var g,h;return d=c(d),g=this.viewmodel.get(d),b(g)&&b(e)?(h=a.start(this,!0),this.viewmodel.merge(d,g,e,f),a.end(),f&&f.complete&&h.then(f.complete),h):this.set(d,e,f&&f.complete)}}(v,g,G),pc=function(a,b){var c=function(a,b,c,d){this.root=a,this.keypath=b,this.callback=c,this.defer=d.defer,this.priority=0,this.context=d&&d.context?d.context:a};return c.prototype={init:function(a){this.value=this.root.viewmodel.get(this.keypath),a!==!1?this.update():this.oldValue=this.value},setValue:function(c){var d=this;b(c,this.value)||(this.value=c,this.defer&&this.ready?a.scheduleTask(function(){return d.update()}):this.update())},update:function(){this.updating||(this.updating=!0,this.callback.call(this.context,this.value,this.oldValue,this.keypath),this.oldValue=this.value,this.updating=!1)}},c}(v,r),qc=function(a){return function(b,c){function d(c,d){var e,f,g;e=b.viewmodel.wrapped[d]?b.viewmodel.wrapped[d].get():b.get(d);for(f in e)!e.hasOwnProperty(f)||"_ractive"===f&&a(e)||(g=d?d+"."+f:f,c.push(g));return c}function e(a){return function(b){return b?b+"."+a:a}}var f,g,h;for(f=c.split("."),h=[""];g=f.shift();)"*"===g?h=h.reduce(d,[]):""===h[0]?h[0]=g:h=h.map(e(g));return h}}(g),rc=function(a){return function(b,c){var d,e;return d=a(b,c),e={},d.forEach(function(a){e[a]=b.get(a)}),e}}(qc),sc=function(a,b,c){var d,e=/\*/,f=Array.prototype.slice;return d=function(a,b,c,d){this.root=a,this.callback=c,this.defer=d.defer,this.keypath=b,this.regex=new RegExp("^"+b.replace(/\./g,"\\.").replace(/\*/g,"([^\\.]+)")+"$"),this.values={},this.defer&&(this.proxies=[]),this.priority="pattern",this.context=d&&d.context?d.context:a},d.prototype={init:function(a){var b,d;if(b=c(this.root,this.keypath),a!==!1)for(d in b)b.hasOwnProperty(d)&&this.update(d);else this.values=b},update:function(b){var d,f=this;if(e.test(b)){d=c(this.root,b);for(b in d)d.hasOwnProperty(b)&&this.update(b)}else if(!this.root.viewmodel.implicitChanges[b])return this.defer&&this.ready?void a.scheduleTask(function(){return f.getProxy(b).update()}):void this.reallyUpdate(b)},reallyUpdate:function(a){var c,d,e;return c=this.root.viewmodel.get(a),this.updating?void(this.values[a]=c):(this.updating=!0,b(c,this.values[a])&&this.ready||(d=f.call(this.regex.exec(a),1),e=[c,this.values[a],a].concat(d),this.callback.apply(this.context,e),this.values[a]=c),void(this.updating=!1))
},getProxy:function(a){var b=this;return this.proxies[a]||(this.proxies[a]={update:function(){b.reallyUpdate(a)}}),this.proxies[a]}},d}(v,r,rc),tc=function(a,b,c){var d=/\*/,e={};return function(f,g,h,i){var j,k,l;return g=a(g),i=i||e,d.test(g)?(j=new c(f,g,h,i),f.viewmodel.patternObservers.push(j),k=!0):j=new b(f,g,h,i),f.viewmodel.register(g,j,k?"patternObservers":"observers"),j.init(i.init),j.ready=!0,{cancel:function(){var a;l||(k?(a=f.viewmodel.patternObservers.indexOf(j),f.viewmodel.patternObservers.splice(a,1),f.viewmodel.unregister(g,j,"patternObservers")):f.viewmodel.unregister(g,j,"observers"),l=!0)}}}}(G,pc,sc),uc=function(a,b){return function(c,d,e){var f,g,h,i;if(a(c)){e=d,g=c,f=[];for(c in g)g.hasOwnProperty(c)&&(d=g[c],f.push(this.observe(c,d,e)));return{cancel:function(){for(;f.length;)f.pop().cancel()}}}if("function"==typeof c)return e=d,d=c,c="",b(this,c,d,e);if(h=c.split(" "),1===h.length)return b(this,c,d,e);for(f=[],i=h.length;i--;)c=h[i],c&&f.push(b(this,c,d,e));return{cancel:function(){for(;f.length;)f.pop().cancel()}}}}(h,tc),vc=function(a){return a.trim()},wc=function(a){return""!==a},xc=function(a,b){return function(c,d){var e,f=this;if(c)e=c.split(" ").map(a).filter(b),e.forEach(function(a){var b,c;(b=f._subs[a])&&(d?(c=b.indexOf(d),-1!==c&&b.splice(c,1)):f._subs[a]=[])});else for(c in this._subs)delete this._subs[c];return this}}(vc,wc),yc=function(a,b){return function(c,d){var e,f,g,h=this,i=this;if("object"==typeof c){e=[];for(f in c)c.hasOwnProperty(f)&&e.push(this.on(f,c[f]));return{cancel:function(){for(var a;a=e.pop();)a.cancel()}}}return g=c.split(" ").map(a).filter(b),g.forEach(function(a){(h._subs[a]||(h._subs[a]=[])).push(d)}),{cancel:function(){i.off(c,d)}}}}(vc,wc),zc=function(a,b,c){switch(b){case"splice":return c;case"sort":case"reverse":return null;case"pop":return a.length?[-1]:null;case"push":return[a.length,0].concat(c);case"shift":return[0,1];case"unshift":return[0,0].concat(c)}},Ac=function(a,b){var c,d,e,f,g,h;return b?(c=+(b[0]<0?a.length+b[0]:b[0]),0>c?c=0:c>a.length&&(c=a.length),f=Math.max(0,b.length-2),g=void 0!==b[1]?b[1]:a.length-c,g=Math.min(g,a.length-c),h=f-g,e=a.length+h,d=h?Math.max(a.length,e):c+f,{rangeStart:c,rangeEnd:d,balance:h,added:f,removed:g}):null},Bc=function(a,b,c,d){var e=Array.prototype;return function(f){return function(g){var h,i,j,k,l,m=Array.prototype.slice,n=m.call(arguments,1);if(h=this.get(g),!a(h))throw new Error("Called ractive."+f+"('"+g+"'), but '"+g+"' does not refer to an array");return i=c(h,f,n),j=d(h,i),l=j?e.splice.apply(h,i):e[f].apply(h,n),k=b.start(this,!0),j?this.viewmodel.splice(g,j):this.viewmodel.mark(g),b.end(),("splice"===f||"pop"===f||"shift"===f)&&(k=k.then(function(){return l})),k}}}(g,v,zc,Ac),Cc=function(a){return a("pop")}(Bc),Dc=function(a){return a("push")}(Bc),Ec=function(a,b,c){var d,e,f,g,h,i,j,k="/* Ractive.js component styles */\n",l={},m=[];return b?(a.push(function(){f=a.runloop}),g=document.createElement("style"),g.type="text/css",h=document.getElementsByTagName("head")[0],j=!1,i=g.styleSheet,e=function(){var a;m.length?(a=k+m.join(" "),i?i.cssText=a:g.innerHTML=a,j||(h.appendChild(g),j=!0)):j&&(h.removeChild(g),j=!1)},d={add:function(a){a.css&&(l[a._guid]||(l[a._guid]=0,m.push(a.css),f.scheduleTask(e)),l[a._guid]+=1)},remove:function(a){a.css&&(l[a._guid]-=1,l[a._guid]||(c(m,a.css),f.scheduleTask(e)))}}):d=null,d}(e,B,n),Fc=function(a,b,c){function d(a){var b=e(a);for(a.init&&a.init(a._config.options);b.length;)d(b.shift());g[a._guid]=null}function e(a){return g[a._guid]||(g[a._guid]=[])}var f,g={},h={};return f=function(f,g){var i,j,k,l=this;if(h[this._guid]=!0,k=this.transitionsEnabled,this.noIntro&&(this.transitionsEnabled=!1),i=a.start(this,!0),this.rendered)throw new Error("You cannot call ractive.render() on an already rendered instance! Call ractive.unrender() first");return f=c(f)||this.el,g=c(g)||this.anchor,this.el=f,this.anchor=g,this.constructor.css&&b.add(this.constructor),f&&((j=f.__ractive_instances__)?j.push(this):f.__ractive_instances__=[this],g?f.insertBefore(this.fragment.render(),g):f.appendChild(this.fragment.render())),this._hasInited||(this._hasInited=!0,this._parent&&h[this._parent._guid]?e(this._parent).push(this):d(this)),h[this._guid]=!1,a.end(),this.rendered=!0,this.transitionsEnabled=k,this.complete&&i.then(function(){return l.complete()}),i}}(v,Ec,mc),Gc=function(){this.dirtyValue=this.dirtyArgs=!0,this.bound&&"function"==typeof this.owner.bubble&&this.owner.bubble()},Hc=function(){var a;return 1===this.items.length?this.items[0].detach():(a=document.createDocumentFragment(),this.items.forEach(function(b){a.appendChild(b.detach())}),a)},Ic=function(a){var b,c,d,e;if(this.items){for(c=this.items.length,b=0;c>b;b+=1)if(d=this.items[b],d.find&&(e=d.find(a)))return e;return null}},Jc=function(a,b){var c,d,e;if(this.items)for(d=this.items.length,c=0;d>c;c+=1)e=this.items[c],e.findAll&&e.findAll(a,b);return b},Kc=function(a,b){var c,d,e;if(this.items)for(d=this.items.length,c=0;d>c;c+=1)e=this.items[c],e.findAllComponents&&e.findAllComponents(a,b);return b},Lc=function(a){var b,c,d,e;if(this.items){for(b=this.items.length,c=0;b>c;c+=1)if(d=this.items[c],d.findComponent&&(e=d.findComponent(a)))return e;return null}},Mc=function(a){var b,c=a.index;return b=this.items[c+1]?this.items[c+1].firstNode():this.owner===this.root?this.owner.component?this.owner.component.findNextNode():null:this.owner.findNextNode(this)},Nc=function(){return this.items&&this.items[0]?this.items[0].firstNode():null},Oc=function(){var a=this;do if(a.pElement)return a.pElement.node;while(a=a.parent);return this.root.detached||this.root.el},Pc=function(a){function b(a,c,d,e){return e=e||0,a.map(function(a){var f,g,h;return a.text?a.text:a.fragments?a.fragments.map(function(a){return b(a.items,c,d,e)}).join(""):(f=d+"-"+e++,h=(g=a.root.viewmodel.wrapped[a.keypath])?g.value:a.getValue(),c[f]=h,"${"+f+"}")}).join("")}var c,d={};return c=function(){var c=arguments[0];void 0===c&&(c=d);var e,f,g,h,i,j,k;return e=c.args,i=e?"argsList":"value",j=e?"dirtyArgs":"dirtyValue",this[j]&&(g=b(this.items,f={},this.root._guid),h=a(e?"["+g+"]":g,f),k=h?h.value:e?[this.toString()]:this.toString(),this[i]=k,this[j]=!1),this[i]}}(Eb),Qc=function(){var a=/</g,b=/>/g;return function(c){return c.replace(a,"<").replace(b,">")}}(),Rc=function(a){return a&&a.parentNode&&a.parentNode.removeChild(a),a},Sc=function(a){return function(){return a(this.node)}}(Rc),Tc=function(a,b,c,d){var e=function(b){this.type=a.TEXT,this.text=b.template};return e.prototype={detach:c,firstNode:function(){return this.node},render:function(){return this.node||(this.node=document.createTextNode(d(this.text))),this.node},toString:function(a){return a?b(this.text):this.text},unrender:function(a){return a?this.detach():void 0}},e}(R,Qc,Sc,Cb),Uc=function(a){return function(){this.keypath?this.root.viewmodel.unregister(this.keypath,this):a.removeUnresolved(this),this.resolver&&this.resolver.unbind()}}(v),Vc=function(){return this.value},Wc=function(a){var b=function(b,c,d,e){this.root=b,this.ref=c,this.parentFragment=d,this.resolve=e,a.addUnresolved(this)};return b.prototype={unbind:function(){a.removeUnresolved(this)}},b}(v),Xc=function(a,b){return a&&b&&a.substr(0,b.length+1)===b+"."},Yc=function(a){return function(b,c,d){return b===c?void 0!==d?d:null:a(b,c)?null===d?d:b.replace(c+".",d+"."):void 0}}(Xc),Zc=function(a,b){function c(a){var c=b[a.message]||a.message||"";return d(c,a.args)}function d(a,b){return a.replace(/{([^{}]*)}/g,function(a,c){return b[c]})}var e={warn:function(a,b){(a.debug||b)&&this.logger(c(a),a.allowDuplicates)},error:function(a){this.errorOnly(a),a.debug||this.warn(a,!0)},errorOnly:function(a){a.debug&&this.critical(a)},critical:function(a){var b=a.err||new Error(c(a));this.thrower(b)},logger:a,thrower:function(a){throw a}};return e}(L,Q),$c=function(){var a={};return function(b,c){var d,e;if(a[b])return a[b];for(e=[];c--;)e[c]="_"+c;return d=new Function(e.join(","),"return("+b+")"),a[b]=d,d}}(),_c=function(a,b,c){var d,e;for(d=b.length;d--;)e=b[d],-1===c.indexOf(e)&&a.viewmodel.unregister(e,a,"computed");for(d=c.length;d--;)e=c[d],-1===b.indexOf(e)&&a.viewmodel.register(e,a,"computed");a.dependencies=c.slice()},ad=function(a,b,c,d,e){function f(a,b){var d,e,f;if(a._noWrap)return a;if(e="__ractive_"+b._guid,d=a[e])return d;if(/this/.test(a.toString())){c(a,e,{value:j.call(a,b)});for(f in a)a.hasOwnProperty(f)&&(a[e][f]=a[f]);return a[e]}return c(a,"__ractive_nowrap",{value:a}),a.__ractive_nowrap}function g(a){return"function"==typeof a?a():a}var h,i,j=Function.prototype.bind;return i=function(a,b,c,e,g,h){var i=this,j=a.viewmodel;i.root=a,i.viewmodel=j,i.uniqueString=c,i.keypath=b,i.priority=h,i.fn=d(e,g.length),i.explicitDependencies=[],i.dependencies=[],i.argumentGetters=g.map(function(b){var c,d;return b?b.indexRef?d=b.value:(c=b.keypath,i.explicitDependencies.push(c),j.register(c,i,"computed"),function(){var b=j.get(c);return"function"==typeof b?f(b,a):b}):void 0})},i.prototype={wake:function(){this.awake=!0},sleep:function(){this.awake=!1},getValue:function(){var b,c,d;if(b=this.argumentGetters.map(g),!this.updating){this.updating=!0,this.viewmodel.capture();try{c=this.fn.apply(null,b)}catch(f){this.root.debug&&a.warn({debug:this.root.debug,message:"evaluationError",args:{uniqueString:this.uniqueString,err:f.message||f}}),c=void 0}return d=this.viewmodel.release(),e(this,this.dependencies,d),this.updating=!1,c}},update:function(){var a=this.getValue();return b(a,this.value)||(this.value=a,this.root.viewmodel.mark(this.keypath)),this},teardown:function(){var a=this;this.explicitDependencies.concat(this.dependencies).forEach(function(b){return a.viewmodel.unregister(b,a,"computed")}),this.root.viewmodel.evaluators[this.keypath]=null}},h=i}(Zc,r,C,$c,_c,ub),bd=function(a,b,c,d,e){function f(a,b){return a.replace(/_([0-9]+)/g,function(a,c){var d=b[c];return d?d.indexRef?d.value:d.keypath:"undefined"})}function g(a){return"${"+a.replace(/[\.\[\]]/g,"-")+"}"}var h,i=function(d,e,f,g){var h,i,j,k=this;return h=d.root,this.root=h,this.callback=g,this.owner=d,this.str=f.s,this.args=j=[],this.unresolved=[],this.pending=0,i=e.indexRefs,f.r&&f.r.length?(f.r.forEach(function(d,f){var g,l,m;return i&&void 0!==(g=i[d])?void(j[f]={indexRef:d,value:g}):(l=b(h,d,e))?void(j[f]={keypath:l}):"."===d?void(j[f]={"":""}):(j[f]=null,k.pending+=1,m=new c(h,d,e,function(b){k.resolve(f,b),a(k.unresolved,m)}),void k.unresolved.push(m))}),this.ready=!0,void this.bubble()):(this.resolved=this.ready=!0,void this.bubble())};return i.prototype={bubble:function(){this.ready&&(this.uniqueString=f(this.str,this.args),this.keypath=g(this.uniqueString),this.createEvaluator(),this.callback(this.keypath))},unbind:function(){for(var a;a=this.unresolved.pop();)a.unbind()},resolve:function(a,b){this.args[a]={keypath:b},this.bubble(),this.resolved=!--this.pending},createEvaluator:function(){var a=this.root.viewmodel.evaluators[this.keypath];a||(a=new d(this.root,this.keypath,this.uniqueString,this.str,this.args,this.owner.priority),this.root.viewmodel.evaluators[this.keypath]=a),a.update()},rebind:function(a,b,c,d){var f;this.args.forEach(function(g){var h;g&&(g.keypath&&(h=e(g.keypath,c,d))?(g.keypath=h,f=!0):g.indexRef&&g.indexRef===a&&(g.value=b,f=!0))}),f&&this.bubble()}},h=i}(n,t,Wc,ad,Yc),cd=function(a,b,c,d,e){var f=function(d,f,g){var h,i,j,k,l,m=this;m.resolver=f,m.root=f.root,m.viewmodel=f.root.viewmodel,"string"==typeof d?m.value=d:d.t===a.REFERENCE?(h=m.ref=d.n,(i=g.indexRefs)&&void 0!==(j=i[h])?(m.indexRef=h,m.value=j):(k=f.root,(l=b(k,h,g))?m.resolve(l):m.unresolved=new c(k,h,g,function(a){m.unresolved=null,m.resolve(a)}))):new e(f,g,d,function(a){m.resolve(a)})};return f.prototype={resolve:function(a){this.keypath=a,this.value=this.viewmodel.get(a),this.bind(),this.resolver.bubble()},bind:function(){this.viewmodel.register(this.keypath,this)},rebind:function(a,b,c,e){var f;if(a&&this.indexRef===a){if(b!==this.value)return this.value=b,!0}else if(this.keypath&&(f=d(this.keypath,c,e)))return this.unbind(),this.keypath=f,this.value=this.root.viewmodel.get(f),this.bind(),!0},setValue:function(a){this.value=a,this.resolver.bubble()},unbind:function(){this.keypath&&this.root.viewmodel.unregister(this.keypath,this),this.unresolved&&this.unresolved.unbind()},forceResolution:function(){this.unresolved&&(this.unresolved.unbind(),this.unresolved=null,this.keypath=this.ref,this.value=this.viewmodel.get(this.ref),this.bind())}},f}(R,t,Wc,Yc,bd),dd=function(a,b,c){function d(a){return a.value}function e(a){return void 0!=a}function f(a){a.unbind()}var g=function(d,e,f){var g,h,i,j,k=this,l=this;j=d.parentFragment,l.root=g=d.root,l.mustache=d,l.priority=d.priority,l.ref=h=e.r,l.callback=f,l.unresolved=[],(i=a(g,h,j))?l.base=i:l.baseResolver=new b(g,h,j,function(a){l.base=a,l.baseResolver=null,l.bubble()}),l.members=e.m.map(function(a){return new c(a,k,j)}),l.ready=!0,l.bubble()};return g.prototype={getKeypath:function(){var a=this.members.map(d);return!a.every(e)||this.baseResolver?null:this.base+"."+a.join(".")},bubble:function(){this.ready&&!this.baseResolver&&this.callback(this.getKeypath())},unbind:function(){this.members.forEach(f)},rebind:function(a,b,c,d){var e;this.members.forEach(function(f){f.rebind(a,b,c,d)&&(e=!0)}),e&&this.bubble()},forceResolution:function(){this.baseResolver&&(this.base=this.ref,this.baseResolver.unbind(),this.baseResolver=null),this.members.forEach(function(a){return a.forceResolution()}),this.bubble()}},g}(t,Wc,cd),ed=function(a,b,c,d,e){return function(f,g){function h(a){var b=f.keypath;a!==b&&(f.resolve(a),void 0!==b&&f.fragments&&f.fragments.forEach(function(c){c.rebind(null,null,b,a)}))}var i,j,k,l,m,n;if(m=g.parentFragment,n=g.template,f.root=m.root,f.parentFragment=m,f.pElement=m.pElement,f.template=g.template,f.index=g.index||0,f.priority=m.priority,f.isStatic=g.template.s,f.type=g.template.t,i=n.r){if(k=m.indexRefs,k&&void 0!==(l=k[i]))return f.indexRef=i,void f.setValue(l);j=c(f.root,i,f.parentFragment),void 0!==j?f.resolve(j):(f.ref=i,b.addUnresolved(f))}g.template.x&&(f.resolver=new e(f,m,g.template.x,h)),g.template.rx&&(f.resolver=new d(f,g.template.rx,h)),f.template.n!==a.SECTION_UNLESS||f.hasOwnProperty("value")||f.setValue(void 0)}}(R,v,t,dd,bd),fd=function(a){var b,c,d;void 0!=this.keypath&&(this.root.viewmodel.unregister(this.keypath,this),b=!0),this.keypath=a,void 0!=a&&(c=this.root.viewmodel.get(a),this.root.viewmodel.register(a,this)),this.setValue(c),b&&(d=this.twowayBinding)&&d.rebound()},gd=function(a){return function(b,c,d,e){var f;this.fragments&&this.fragments.forEach(function(a){return a.rebind(b,c,d,e)}),this.resolver&&this.resolver.rebind(b,c,d,e),void 0!==this.keypath?(f=a(this.keypath,d,e),void 0!==f&&this.resolve(f)):void 0!==b&&this.indexRef===b&&this.setValue(c)}}(Yc),hd=function(a,b,c,d){return{getValue:a,init:b,resolve:c,rebind:d}}(Vc,ed,fd,gd),id=function(a,b,c,d,e,f,g,h){var i=function(b){this.type=a.INTERPOLATOR,g.init(this,b)};return i.prototype={update:function(){this.node.data=void 0==this.value?"":this.value},resolve:g.resolve,rebind:g.rebind,detach:h,unbind:f,render:function(){return this.node||(this.node=document.createTextNode(void 0!=this.value?this.value:"")),this.node},unrender:function(a){a&&d(this.node)},getValue:g.getValue,setValue:function(a){var c;(c=this.root.viewmodel.wrapped[this.keypath])&&(a=c.get()),e(a,this.value)||(this.value=a,this.parentFragment.bubble(),this.node&&b.addView(this))},firstNode:function(){return this.node},toString:function(a){var b=void 0!=this.value?""+this.value:"";return a?c(b):b}},i}(R,v,Qc,Rc,r,Uc,hd,Sc),jd=function(){this.parentFragment.bubble()},kd=function(){var a;return 1===this.fragments.length?this.fragments[0].detach():(a=document.createDocumentFragment(),this.fragments.forEach(function(b){a.appendChild(b.detach())}),a)},ld=function(a){var b,c,d;for(c=this.fragments.length,b=0;c>b;b+=1)if(d=this.fragments[b].find(a))return d;return null},md=function(a,b){var c,d;for(d=this.fragments.length,c=0;d>c;c+=1)this.fragments[c].findAll(a,b)},nd=function(a,b){var c,d;for(d=this.fragments.length,c=0;d>c;c+=1)this.fragments[c].findAllComponents(a,b)},od=function(a){var b,c,d;for(c=this.fragments.length,b=0;c>b;b+=1)if(d=this.fragments[b].findComponent(a))return d;return null},pd=function(a){return this.fragments[a.index+1]?this.fragments[a.index+1].firstNode():this.parentFragment.findNextNode(this)},qd=function(){var a,b,c;if(a=this.fragments.length)for(b=0;a>b;b+=1)if(c=this.fragments[b].firstNode())return c;return this.parentFragment.findNextNode(this)},rd=function(a,b){var c;return b.push(function(){c=b.Fragment}),function(b){var c,d,e,f,g,h,i,j,k=this;if(!this.unbound){if(c=this.parentFragment,g=[],b.forEach(function(a,b){var c,e,f,h;return a===b?void(g[a]=k.fragments[b]):(c=k.fragments[b],void 0===d&&(d=b),-1===a?(k.fragmentsToUnrender.push(c),void c.unbind()):(e=a-b,f=k.keypath+"."+b,h=k.keypath+"."+a,c.rebind(k.template.i,a,f,h),void(g[a]=c)))}),f=this.root.get(this.keypath).length,void 0===d){if(this.length===f)return;d=this.length}for(this.length=this.fragments.length=f,a.addView(this),h={template:this.template.f,root:this.root,owner:this},this.template.i&&(h.indexRef=this.template.i),e=d;f>e;e+=1)(i=g[e])?this.docFrag.appendChild(i.detach(!1)):this.fragmentsToCreate.push(e),this.fragments[e]=i;j=c.findNextNode(this),this.parentFragment.getNode().insertBefore(this.docFrag,j)}}}(v,e),sd=function(){var a;return a=this.docFrag=document.createDocumentFragment(),this.update(),this.rendered=!0,a},td=function(a,b,c,d,e){function f(d,e){var f={template:d.template.f,root:d.root,pElement:d.parentFragment.pElement,owner:d};if(d.subtype)switch(d.subtype){case a.SECTION_IF:return j(d,e,!1,f);case a.SECTION_UNLESS:return j(d,e,!0,f);case a.SECTION_WITH:return i(d,f);case a.SECTION_EACH:if(c(e))return h(d,e,f)}return d.ordered=!!b(e),d.ordered?g(d,e,f):c(e)||"function"==typeof e?d.template.i?h(d,e,f):i(d,f):j(d,e,!1,f)}function g(a,b,c){var d,e,f;if(e=b.length,e===a.length)return!1;if(e<a.length)a.fragmentsToUnrender=a.fragments.splice(e,a.length-e),a.fragmentsToUnrender.forEach(k);else if(e>a.length)for(d=a.length;e>d;d+=1)c.context=a.keypath+"."+d,c.index=d,a.template.i&&(c.indexRef=a.template.i),f=new n(c),a.fragmentsToRender.push(a.fragments[d]=f);return a.length=e,!0}function h(a,b,c){var d,e,f,g,h;for(f=a.hasKey||(a.hasKey={}),e=a.fragments.length;e--;)g=a.fragments[e],g.index in b||(h=!0,g.unbind(),a.fragmentsToUnrender.push(g),a.fragments.splice(e,1),f[g.index]=!1);for(d in b)f[d]||(h=!0,c.context=a.keypath+"."+d,c.index=d,a.template.i&&(c.indexRef=a.template.i),g=new n(c),a.fragmentsToRender.push(g),a.fragments.push(g),f[d]=!0);return a.length=a.fragments.length,h}function i(a,b){var c;return a.length?void 0:(b.context=a.keypath,b.index=0,c=new n(b),a.fragmentsToRender.push(a.fragments[0]=c),a.length=1,!0)}function j(a,c,d,e){var f,g,h;if(g=b(c)&&0===c.length,f=d?g||!c:c&&!g){if(!a.length)return e.index=0,h=new n(e),a.fragmentsToRender.push(a.fragments[0]=h),a.length=1,!0;if(a.length>1)return a.fragmentsToUnrender=a.fragments.splice(1),a.fragmentsToUnrender.forEach(k),!0}else if(a.length)return a.fragmentsToUnrender=a.fragments.splice(0,a.fragments.length).filter(l),a.fragmentsToUnrender.forEach(k),a.length=a.fragmentsToRender.length=0,!0}function k(a){a.unbind()}function l(a){return a.rendered}var m,n;return e.push(function(){n=e.Fragment}),m=function(a){var b,c,e=this;this.updating||(this.updating=!0,(b=this.root.viewmodel.wrapped[this.keypath])&&(a=b.get()),this.fragmentsToCreate.length?(c={template:this.template.f,root:this.root,pElement:this.pElement,owner:this,indexRef:this.template.i},this.fragmentsToCreate.forEach(function(a){var b;c.context=e.keypath+"."+a,c.index=a,b=new n(c),e.fragmentsToRender.push(e.fragments[a]=b)}),this.fragmentsToCreate.length=0):f(this,a)&&(this.bubble(),this.rendered&&d.addView(this)),this.value=a,this.updating=!1)}}(R,g,h,v,e),ud=function(a,b){function c(a){a.unbind()}function d(a,b){var c,d=[];for(c=a;b>c;c+=1)d.push(c);return d}function e(a,b,c,d){var e,f,g,h,i;for(g=a.template.i,e=b;c>e;e+=1)f=a.fragments[e],h=a.keypath+"."+(e-d),i=a.keypath+"."+e,f.index=e,f.rebind(g,e,h,i)}var f,g;return b.push(function(){g=b.Fragment}),f=function(b){var f,g,h,i,j,k=this;if(!this.unbound&&(f=b.balance)){if(a.addView(k),g=b.rangeStart,k.length+=f,0>f)return k.fragmentsToUnrender=k.fragments.splice(g,-f),k.fragmentsToUnrender.forEach(c),void e(k,g,k.length,f);h=g+b.removed,i=g+b.added,j=[h,0],j.length+=f,k.fragments.splice.apply(k.fragments,j),e(k,i,k.length,f),k.fragmentsToCreate=d(h,i)}}}(v,e),vd=function(a){var b,c,d;for(b="",c=0,d=this.length,c=0;d>c;c+=1)b+=this.fragments[c].toString(a);return b},wd=function(a){function b(a){a.unbind()}var c;return c=function(){this.fragments.forEach(b),a.call(this),this.length=0,this.unbound=!0}}(Uc),xd=function(){function a(a){a.unrender(!0)}function b(a){a.unrender(!1)}var c;return c=function(c){this.fragments.forEach(c?a:b)}}(),yd=function(){for(var a,b,c,d,e;a=this.fragmentsToUnrender.pop();)a.unrender(!0);if(this.fragmentsToRender.length){for(this.rendered&&(e=this.parentFragment.getNode());a=this.fragmentsToRender.shift();)b=a.render(),this.docFrag.appendChild(b),this.rendered&&this.ordered&&(c=this.fragments[a.index+1],c&&c.rendered&&e.insertBefore(this.docFrag,c.firstNode()||null));this.rendered&&this.docFrag.childNodes.length&&(d=this.parentFragment.findNextNode(this),e.insertBefore(this.docFrag,d))}},zd=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){var s=function(c){this.type=a.SECTION,this.subtype=c.template.n,this.inverted=this.subtype===a.SECTION_UNLESS,this.pElement=c.pElement,this.fragments=[],this.fragmentsToCreate=[],this.fragmentsToRender=[],this.fragmentsToUnrender=[],this.length=0,b.init(this,c)};return s.prototype={bubble:c,detach:d,find:e,findAll:f,findAllComponents:g,findComponent:h,findNextNode:i,firstNode:j,getValue:b.getValue,merge:k,rebind:b.rebind,render:l,resolve:b.resolve,setValue:m,splice:n,toString:o,unbind:p,unrender:q,update:r},s}(R,hd,jd,kd,ld,md,nd,od,pd,qd,rd,sd,td,ud,vd,wd,xd,yd),Ad=function(){var a,b;if(this.docFrag){for(a=this.nodes.length,b=0;a>b;b+=1)this.docFrag.appendChild(this.nodes[b]);return this.docFrag}},Bd=function(a){return function(b){var c,d,e,f;for(d=this.nodes.length,c=0;d>c;c+=1)if(e=this.nodes[c],1===e.nodeType){if(a(e,b))return e;if(f=e.querySelector(b))return f}return null}}($b),Cd=function(a){return function(b,c){var d,e,f,g,h,i;for(e=this.nodes.length,d=0;e>d;d+=1)if(f=this.nodes[d],1===f.nodeType&&(a(f,b)&&c.push(f),g=f.querySelectorAll(b)))for(h=g.length,i=0;h>i;i+=1)c.push(g[i])}}($b),Dd=function(){return this.rendered&&this.nodes[0]?this.nodes[0]:this.parentFragment.findNextNode(this)},Ed=function(a,b){function c(a){return g[a]||(g[a]=b(a))}var d,e,f,g={};try{b("table").innerHTML="foo"}catch(h){e=!0,f={TABLE:['<table class="x">',"</table>"],THEAD:['<table><thead class="x">',"</thead></table>"],TBODY:['<table><tbody class="x">',"</tbody></table>"],TR:['<table><tr class="x">',"</tr></table>"],SELECT:['<select class="x">',"</select>"]}}return d=function(b,d,g){var h,i,j,k,l,m=[];if(null!=b&&""!==b){for(e&&(i=f[d.tagName])?(h=c("DIV"),h.innerHTML=i[0]+b+i[1],h=h.querySelector(".x"),"SELECT"===h.tagName&&(j=h.options[h.selectedIndex])):d.namespaceURI===a.svg?(h=c("DIV"),h.innerHTML='<svg class="x">'+b+"</svg>",h=h.querySelector(".x")):(h=c(d.tagName),h.innerHTML=b);k=h.firstChild;)m.push(k),g.appendChild(k);if(e&&"SELECT"===d.tagName)for(l=m.length;l--;)m[l]!==j&&(m[l].selected=!1)}return m}}(z,A),Fd=function(a){for(var b=[],c=a.length;c--;)b[c]=a[c];return b},Gd=function(a){function b(a){return a.selected}var c;return c=function(c){var d,e,f;c&&"select"===c.name&&c.binding&&(d=a(c.node.options).filter(b),c.getAttribute("multiple")?f=d.map(function(a){return a.value}):(e=d[0])&&(f=e.value),void 0!==f&&c.binding.setValue(f),c.bubble())}}(Fd),Hd=function(a,b){return function(){if(this.rendered)throw new Error("Attempted to render an item that was already rendered");return this.docFrag=document.createDocumentFragment(),this.nodes=a(this.value,this.parentFragment.getNode(),this.docFrag),b(this.pElement),this.rendered=!0,this.docFrag}}(Ed,Gd),Id=function(a){return function(b){var c;(c=this.root.viewmodel.wrapped[this.keypath])&&(b=c.get()),b!==this.value&&(this.value=b,this.parentFragment.bubble(),this.rendered&&a.addView(this))}}(v),Jd=function(a){return function(){return void 0!=this.value?a(""+this.value):""}}(Cb),Kd=function(a){return function(b){this.rendered&&b&&(this.nodes.forEach(a),this.rendered=!1)}}(Rc),Ld=function(a,b){return function(){var c,d;if(this.rendered){for(;this.nodes&&this.nodes.length;)c=this.nodes.pop(),c.parentNode.removeChild(c);d=this.parentFragment.getNode(),this.nodes=a(this.value,d,this.docFrag),d.insertBefore(this.docFrag,this.parentFragment.findNextNode(this)),b(this.pElement)}}}(Ed,Gd),Md=function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(c){this.type=a.TRIPLE,b.init(this,c)};return m.prototype={detach:c,find:d,findAll:e,firstNode:f,getValue:b.getValue,rebind:b.rebind,render:g,resolve:b.resolve,setValue:h,toString:i,unbind:l,unrender:j,update:k},m}(R,hd,Ad,Bd,Cd,Dd,Hd,Id,Jd,Kd,Ld,Uc),Nd=function(){this.parentFragment.bubble()},Od=function(){var a,b=this.node;return b?((a=b.parentNode)&&a.removeChild(b),b):void 0},Pd=function(a){return function(b){return a(this.node,b)?this.node:this.fragment&&this.fragment.find?this.fragment.find(b):void 0}}($b),Qd=function(a,b){b._test(this,!0)&&b.live&&(this.liveQueries||(this.liveQueries=[])).push(b),this.fragment&&this.fragment.findAll(a,b)},Rd=function(a,b){this.fragment&&this.fragment.findAllComponents(a,b)},Sd=function(a){return this.fragment?this.fragment.findComponent(a):void 0},Td=function(){return null},Ud=function(){return this.node},Vd=function(a){return this.attributes&&this.attributes[a]?this.attributes[a].value:void 0},Wd=function(){var a,b,c,d;return a="altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath vkern".split(" "),b="attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits contentScriptType contentStyleType diffuseConstant edgeMode externalResourcesRequired filterRes filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" "),c=function(a){for(var b={},c=a.length;c--;)b[a[c].toLowerCase()]=a[c];return b},d=c(a.concat(b)),function(a){var b=a.toLowerCase();return d[b]||b}}(),Xd=function(a){return function(){var b=this.fragment.getValue();b!==this.value&&("id"===this.name&&this.value&&delete this.root.nodes[this.value],this.value=b,"value"===this.name&&this.node&&(this.node._ractive.value=b),this.rendered&&a.addView(this))}}(v),Yd=function(){var a=/^(allowFullscreen|async|autofocus|autoplay|checked|compact|controls|declare|default|defaultChecked|defaultMuted|defaultSelected|defer|disabled|draggable|enabled|formNoValidate|hidden|indeterminate|inert|isMap|itemScope|loop|multiple|muted|noHref|noResize|noShade|noValidate|noWrap|open|pauseOnExit|readOnly|required|reversed|scoped|seamless|selected|sortable|translate|trueSpeed|typeMustMatch|visible)$/i;return a}(),Zd=function(a,b){return function(c,d){var e,f;if(e=d.indexOf(":"),-1===e||(f=d.substr(0,e),"xmlns"===f))c.name=c.element.namespace!==a.html?b(d):d;else if(d=d.substring(e+1),c.name=b(d),c.namespace=a[f.toLowerCase()],!c.namespace)throw'Unknown namespace ("'+f+'")'}}(z,Wd),$d=function(a){return function(b){var c=b.fragment.items;if(1===c.length)return c[0].type===a.INTERPOLATOR?c[0]:void 0}}(R),_d=function(a,b){var c={"accept-charset":"acceptCharset",accesskey:"accessKey",bgcolor:"bgColor","class":"className",codebase:"codeBase",colspan:"colSpan",contenteditable:"contentEditable",datetime:"dateTime",dirname:"dirName","for":"htmlFor","http-equiv":"httpEquiv",ismap:"isMap",maxlength:"maxLength",novalidate:"noValidate",pubdate:"pubDate",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"};return function(d,e){var f;!d.pNode||d.namespace||e.pNode.namespaceURI&&e.pNode.namespaceURI!==a.html||(f=c[d.name]||d.name,void 0!==e.pNode[f]&&(d.propertyName=f),(b.test(f)||"value"===f)&&(d.useProperty=!0))}}(z,Yd),ae=function(a,b,c,d,e,f){var g;return f.push(function(){g=f.Fragment}),function(f){return this.type=a.ATTRIBUTE,this.element=f.element,this.root=f.root,c(this,f.name),f.value&&"string"!=typeof f.value?(this.parentFragment=this.element.parentFragment,this.fragment=new g({template:f.value,root:this.root,owner:this}),this.value=this.fragment.getValue(),this.interpolator=d(this),this.isBindable=!!this.interpolator&&!this.interpolator.isStatic,e(this,f),void(this.ready=!0)):void(this.value=b.test(this.name)?!0:f.value||"")}}(R,Yd,Zd,$d,_d,e),be=function(a,b,c,d){this.fragment&&this.fragment.rebind(a,b,c,d)},ce=function(a,b){var c={"accept-charset":"acceptCharset",accesskey:"accessKey",bgcolor:"bgColor","class":"className",codebase:"codeBase",colspan:"colSpan",contenteditable:"contentEditable",datetime:"dateTime",dirname:"dirName","for":"htmlFor","http-equiv":"httpEquiv",ismap:"isMap",maxlength:"maxLength",novalidate:"noValidate",pubdate:"pubDate",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",usemap:"useMap"};return function(d){var e;this.node=d,d.namespaceURI&&d.namespaceURI!==a.html||(e=c[this.name]||this.name,void 0!==d[e]&&(this.propertyName=e),(b.test(e)||"value"===e)&&(this.useProperty=!0),"value"===e&&(this.useProperty=!0,d._ractive.value=this.value)),this.rendered=!0,this.update()}}(z,Yd),de=function(a){function b(a){return a.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'")}var c;return c=function(){var c=(f=this).name,d=f.value,e=f.interpolator,f=f.fragment;if(("value"!==c||"select"!==this.element.name&&"textarea"!==this.element.name)&&("value"!==c||void 0===this.element.getAttribute("contenteditable")))return"name"===c&&"input"===this.element.name&&e?"name={{"+(e.keypath||e.ref)+"}}":a.test(c)?d?c:"":(f&&(d=f.toString()),d?c+'="'+b(d)+'"':c)}}(Yd),ee=function(){this.fragment&&this.fragment.unbind()},fe=function(){var a,b,c,d,e=this.value;if(!this.locked)for(this.node._ractive.value=e,a=this.node.options,d=a.length;d--;)if(b=a[d],c=b._ractive?b._ractive.value:b.value,c==e){b.selected=!0;break}},ge=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]==b)return!0;return!1},he=function(a,b){return function(){var c,d,e,f,g=this.value;for(b(g)||(g=[g]),c=this.node.options,d=c.length;d--;)e=c[d],f=e._ractive?e._ractive.value:e.value,e.selected=a(g,f)}}(ge,g),ie=function(){var a=(b=this).node,b=b.value;a.checked=b==a._ractive.value},je=function(a){return function(){var b,c,d,e,f=this.node;if(b=f.checked,f.value=this.element.getAttribute("value"),f.checked=this.element.getAttribute("value")===this.element.getAttribute("name"),b&&!f.checked&&this.element.binding&&(d=this.element.binding.siblings,e=d.length)){for(;e--;){if(c=d[e],!c.element.node)return;if(c.element.node.checked)return a.addViewmodel(c.root.viewmodel),c.handleChange()}a.addViewmodel(c.root.viewmodel),this.root.viewmodel.set(c.keypath,void 0)
}}}(v),ke=function(a){return function(){var b,c;b=this.node,c=this.value,b.checked=a(c)?-1!==c.indexOf(b._ractive.value):c==b._ractive.value}}(g),le=function(){var a,b;a=this.node,b=this.value,void 0===b&&(b=""),a.className=b},me=function(){var a,b;a=this.node,b=this.value,void 0!==b&&(this.root.nodes[b]=void 0),this.root.nodes[b]=a,a.id=b},ne=function(){var a,b;a=this.node,b=this.value,void 0===b&&(b=""),a.style.setAttribute("cssText",b)},oe=function(){var a=this.value;void 0===a&&(a=""),this.locked||(this.node.innerHTML=a)},pe=function(){var a=(b=this).node,b=b.value;a._ractive.value=b,this.locked||(a.value=void 0==b?"":b)},qe=function(){this.locked||(this.node[this.propertyName]=this.value)},re=function(a){return function(){var b=(f=this).node,c=f.namespace,d=f.name,e=f.value,f=f.fragment;c?b.setAttributeNS(c,d,(f||e).toString()):a.test(d)?e?b.setAttribute(d,""):b.removeAttribute(d):b.setAttribute(d,(f||e).toString())}}(Yd),se=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){return function(){var o,p,q=(s=this).name,r=s.element,s=s.node;"id"===q?p=i:"value"===q?"select"===r.name&&"value"===q?p=r.getAttribute("multiple")?d:c:"textarea"===r.name?p=l:null!=r.getAttribute("contenteditable")?p=k:"input"===r.name&&(o=r.getAttribute("type"),p="file"===o?b:"radio"===o&&r.binding&&"name"===r.binding.name?f:l):this.twoway&&"name"===q?"radio"===s.type?p=e:"checkbox"===s.type&&(p=g):"style"===q&&s.style.setAttribute?p=j:"class"!==q||s.namespaceURI&&s.namespaceURI!==a.html?this.useProperty&&(p=m):p=h,p||(p=n),this.update=p,this.update()}}(z,Rb,fe,he,ie,je,ke,le,me,ne,oe,pe,qe,re),te=function(a,b,c,d,e,f,g){var h=function(a){this.init(a)};return h.prototype={bubble:a,init:b,rebind:c,render:d,toString:e,unbind:f,update:g},h}(Xd,ae,be,ce,de,ee,se),ue=function(a){return function(b,c){var d,e,f=[];for(d in c)c.hasOwnProperty(d)&&(e=new a({element:b,name:d,value:c[d],root:b.root}),f.push(f[d]=e));return f}}(te),ve=function(a){for(var b,c,d=Array.prototype.slice,e=d.call(arguments,1);c=e.shift();)for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);return a},we=function(a,b,c,d,e){var f=function(a){var c,d,e;return this.element=a,this.root=a.root,this.attribute=a.attributes[this.name||"value"],c=this.attribute.interpolator,c.twowayBinding=this,c.keypath&&"${"===c.keypath.substr?(b("Two-way binding does not work with expressions: "+c.keypath),!1):(c.keypath||(c.ref&&c.resolve(c.ref),c.resolver&&c.resolver.forceResolution()),this.keypath=d=c.keypath,void(void 0===this.root.viewmodel.get(d)&&this.getInitialValue&&(e=this.getInitialValue(),void 0!==e&&this.root.viewmodel.set(d,e))))};return f.prototype={handleChange:function(){var b=this;a.start(this.root),this.attribute.locked=!0,this.root.viewmodel.set(this.keypath,this.getValue()),a.scheduleTask(function(){return b.attribute.locked=!1}),a.end()},rebound:function(){var a,b,c;b=this.keypath,c=this.attribute.interpolator.keypath,b!==c&&(e(this.root._twowayBindings[b],this),this.keypath=c,a=this.root._twowayBindings[c]||(this.root._twowayBindings[c]=[]),a.push(this))},unbind:function(){}},f.extend=function(a){var b,e=this;return b=function(a){f.call(this,a),this.init&&this.init()},b.prototype=c(e.prototype),d(b.prototype,a),b.extend=f.extend,b},f}(v,L,S,ve,n),xe=function(){this._ractive.binding.handleChange()},ye=function(a,b){var c=a.extend({getInitialValue:function(){return this.element.fragment?this.element.fragment.toString():""},render:function(){var a=this.element.node;a.addEventListener("change",b,!1),this.root.lazy||(a.addEventListener("input",b,!1),a.attachEvent&&a.addEventListener("keyup",b,!1))},unrender:function(){var a=this.element.node;a.removeEventListener("change",b,!1),a.removeEventListener("input",b,!1),a.removeEventListener("keyup",b,!1)},getValue:function(){return this.element.node.innerHTML}});return c}(we,xe),ze=function(){var a={};return function(b,c,d){var e=b+c+d;return a[e]||(a[e]=[])}}(),Ae=function(a,b,c,d,e){var f=c.extend({name:"checked",init:function(){this.siblings=d(this.root._guid,"radio",this.element.getAttribute("name")),this.siblings.push(this)},render:function(){var a=this.element.node;a.addEventListener("change",e,!1),a.attachEvent&&a.addEventListener("click",e,!1)},unrender:function(){var a=this.element.node;a.removeEventListener("change",e,!1),a.removeEventListener("click",e,!1)},handleChange:function(){a.start(this.root),this.siblings.forEach(function(a){a.root.viewmodel.set(a.keypath,a.getValue())}),a.end()},getValue:function(){return this.element.node.checked},unbind:function(){b(this.siblings,this)}});return f}(v,n,we,ze,xe),Be=function(a,b,c,d){var e=b.extend({name:"name",init:function(){this.siblings=d(this.root._guid,"radioname",this.keypath),this.siblings.push(this),this.radioName=!0,this.attribute.twoway=!0},getInitialValue:function(){return this.element.getAttribute("checked")?this.element.getAttribute("value"):void 0},render:function(){var a=this.element.node;a.name="{{"+this.keypath+"}}",a.checked=this.root.viewmodel.get(this.keypath)==this.element.getAttribute("value"),a.addEventListener("change",c,!1),a.attachEvent&&a.addEventListener("click",c,!1)},unrender:function(){var a=this.element.node;a.removeEventListener("change",c,!1),a.removeEventListener("click",c,!1)},getValue:function(){var a=this.element.node;return a._ractive?a._ractive.value:a.value},handleChange:function(){this.element.node.checked&&b.prototype.handleChange.call(this)},rebound:function(a,c,d,e){var f;b.prototype.rebound.call(this,a,c,d,e),(f=this.element.node)&&(f.name="{{"+this.keypath+"}}")},unbind:function(){a(this.siblings,this)}});return e}(n,we,xe,ze),Ce=function(a,b,c,d,e){function f(a){return a.isChecked}function g(a){return a.element.getAttribute("value")}var h=c.extend({name:"name",getInitialValue:function(){return this.noInitialValue=!0,[]},init:function(){var b,c,e;this.checkboxName=!0,this.siblings=d(this.root._guid,"checkboxes",this.keypath),this.siblings.push(this),this.noInitialValue&&(this.siblings.noInitialValue=!0),e=this.siblings.noInitialValue,b=this.root.viewmodel.get(this.keypath),c=this.element.getAttribute("value"),e?(this.isChecked=this.element.getAttribute("checked"),this.isChecked&&b.push(c)):this.isChecked=a(b)?-1!==b.indexOf(c):b===c},unbind:function(){b(this.siblings,this)},render:function(){var a=this.element.node;a.name="{{"+this.keypath+"}}",a.checked=this.isChecked,a.addEventListener("change",e,!1),a.attachEvent&&a.addEventListener("click",e,!1)},unrender:function(){var a=this.element.node;a.removeEventListener("change",e,!1),a.removeEventListener("click",e,!1)},changed:function(){var a=!!this.isChecked;return this.isChecked=this.element.node.checked,this.isChecked===a},handleChange:function(){this.isChecked=this.element.node.checked,c.prototype.handleChange.call(this)},getValue:function(){return this.siblings.filter(f).map(g)}});return h}(g,n,we,ze,xe),De=function(a,b){var c=a.extend({name:"checked",render:function(){var a=this.element.node;a.addEventListener("change",b,!1),a.attachEvent&&a.addEventListener("click",b,!1)},unrender:function(){var a=this.element.node;a.removeEventListener("change",b,!1),a.removeEventListener("click",b,!1)},getValue:function(){return this.element.node.checked}});return c}(we,xe),Ee=function(a,b,c){var d=b.extend({getInitialValue:function(){var a,b,c,d,e=this.element.options;if(void 0===this.element.getAttribute("value")&&(b=a=e.length,a)){for(;b--;)if(e[b].getAttribute("selected")){c=e[b].getAttribute("value"),d=!0;break}if(!d)for(;++b<a;)if(!e[b].getAttribute("disabled")){c=e[b].getAttribute("value");break}return void 0!==c&&(this.element.attributes.value.value=c),c}},render:function(){this.element.node.addEventListener("change",c,!1)},unrender:function(){this.element.node.removeEventListener("change",c,!1)},setValue:function(b){a.addViewmodel(this.root.viewmodel),this.root.viewmodel.set(this.keypath,b)},getValue:function(){var a,b,c,d,e;for(a=this.element.node.options,c=a.length,b=0;c>b;b+=1)if(d=a[b],a[b].selected)return e=d._ractive?d._ractive.value:d.value},forceUpdate:function(){var b=this,c=this.getValue();void 0!==c&&(this.attribute.locked=!0,a.addViewmodel(this.root.viewmodel),a.scheduleTask(function(){return b.attribute.locked=!1}),this.root.viewmodel.set(this.keypath,c))}});return d}(v,we,xe),Fe=function(a){return function(b,c){var d;if(!a(b)||!a(c))return!1;if(b.length!==c.length)return!1;for(d=b.length;d--;)if(b[d]!==c[d])return!1;return!0}}(g),Ge=function(a,b,c,d){var e=c.extend({getInitialValue:function(){return this.element.options.filter(function(a){return a.getAttribute("selected")}).map(function(a){return a.getAttribute("value")})},render:function(){var a;this.element.node.addEventListener("change",d,!1),a=this.root.viewmodel.get(this.keypath),void 0===a&&this.handleChange()},unrender:function(){this.element.node.removeEventListener("change",d,!1)},setValue:function(){throw new Error("TODO not implemented yet")},getValue:function(){var a,b,c,d,e,f;for(a=[],b=this.element.node.options,d=b.length,c=0;d>c;c+=1)e=b[c],e.selected&&(f=e._ractive?e._ractive.value:e.value,a.push(f));return a},handleChange:function(){var a,d,e;return a=this.attribute,d=a.value,e=this.getValue(),void 0!==d&&b(e,d)||c.prototype.handleChange.call(this),this},forceUpdate:function(){var b=this,c=this.getValue();void 0!==c&&(this.attribute.locked=!0,a.addViewmodel(this.root.viewmodel),a.scheduleTask(function(){return b.attribute.locked=!1}),this.root.viewmodel.set(this.keypath,c))},updateModel:function(){void 0!==this.attribute.value&&this.attribute.value.length||this.root.viewmodel.set(this.keypath,this.initialValue)}});return e}(v,Fe,Ee,xe),He=function(a,b){var c=a.extend({render:function(){this.element.node.addEventListener("change",b,!1)},unrender:function(){this.element.node.removeEventListener("change",b,!1)},getValue:function(){return this.element.node.files}});return c}(we,xe),Ie=function(a,b){function c(){var a;b.call(this),a=this._ractive.root.viewmodel.get(this._ractive.binding.keypath,f),this.value=void 0==a?"":a}var d,e,f;return f={evaluateWrapped:!0},e=a.extend({getInitialValue:function(){return""},getValue:function(){return this.element.node.value},render:function(){var a=this.element.node;a.addEventListener("change",b,!1),this.root.lazy||(a.addEventListener("input",b,!1),a.attachEvent&&a.addEventListener("keyup",b,!1)),a.addEventListener("blur",c,!1)},unrender:function(){var a=this.element.node;a.removeEventListener("change",b,!1),a.removeEventListener("input",b,!1),a.removeEventListener("keyup",b,!1),a.removeEventListener("blur",c,!1)}}),d=e}(we,xe),Je=function(a){return a.extend({getInitialValue:function(){return void 0},getValue:function(){var a=parseFloat(this.element.node.value);return isNaN(a)?void 0:a}})}(Ie),Ke=function(a,b,c,d,e,f,g,h,i,j,k){function l(a){return a&&a.isBindable}var m;return m=function(m){var n,o,p,q,r=m.attributes;return m.binding&&(m.binding.teardown(),m.binding=null),m.getAttribute("contenteditable")&&l(r.value)?o=b:"input"===m.name?(n=m.getAttribute("type"),"radio"===n||"checkbox"===n?(p=l(r.name),q=l(r.checked),p&&q&&a.error({message:"badRadioInputBinding"}),p?o="radio"===n?d:e:q&&(o="radio"===n?c:f)):"file"===n&&l(r.value)?o=i:l(r.value)&&(o="number"===n||"range"===n?j:k)):"select"===m.name&&l(r.value)?o=m.getAttribute("multiple")?h:g:"textarea"===m.name&&l(r.value)&&(o=k),o?new o(m):void 0}}(Zc,ye,Ae,Be,Ce,De,Ee,Ge,He,Je,Ie),Le=function(){var a=this.getAction();a&&!this.hasListener?this.listen():!a&&this.hasListener&&this.unrender()},Me=function(a){return function(b){a(this.root,this.getAction(),{event:b})}}(m),Ne=function(){return this.action.toString().trim()},Oe=function(a,b,c,d,e,f,g){function h(a){var b,c,d;if(b=this.root,"function"!=typeof b[this.method])throw new Error('Attempted to call a non-existent method ("'+this.method+'")');c=this.args.map(function(c){var d,e,f;if(!c)return void 0;if(c.indexRef)return c.value;if(c.eventObject){if(d=a,e=c.refinements.length)for(f=0;e>f;f+=1)d=d[c.refinements[f]]}else d=b.get(c.keypath);return d}),d=this.fn.apply(null,c),b[this.method].apply(b,d)}function i(a){f(this.root,this.getAction(),{event:a,args:this.params})}function j(a){var b=this.dynamicParams.getValue(m);"string"==typeof b&&(b=b.substr(1,b.length-2)),f(this.root,this.getAction(),{event:a,args:b})}var k,l,m={args:!0},n=/^event(?:\.(.+))?/;return e.push(function(){l=e.Fragment}),k=function(e,f,k){var m,o,p,q,r,s=this;s.element=e,s.root=e.root,s.name=f,-1!==f.indexOf("*")&&(g.error({debug:this.root.debug,message:"noElementProxyEventWildcards",args:{element:e.tagName,event:f}}),this.invalid=!0),k.m?(s.method=k.m,s.args=o=[],s.unresolved=[],s.refs=k.a.r,s.fn=b(k.a.s,s.refs.length),r=e.parentFragment,p=r.indexRefs,q=s.root,k.a.r.forEach(function(b,e){var f,g,h,i;return p&&void 0!==(f=p[b])?void(o[e]={indexRef:b,value:f}):(h=n.exec(b))?void(o[e]={eventObject:!0,refinements:h[1]?h[1].split("."):[]}):(g=c(q,b,r))?void(o[e]={keypath:g}):(o[e]=null,i=new d(q,b,r,function(b){s.resolve(e,b),a(s.unresolved,i)}),void s.unresolved.push(i))}),this.fire=h):(m=k.n||k,"string"!=typeof m&&(m=new l({template:m,root:this.root,owner:this})),this.action=m,k.d?(this.dynamicParams=new l({template:k.d,root:this.root,owner:this.element}),this.fire=j):k.a&&(this.params=k.a,this.fire=i))}}(n,$c,t,Wc,e,m,Zc),Pe=function(a){var b,c;b=this._ractive,c=b.events[a.type],c.fire({node:this,original:a,index:b.index,keypath:b.keypath,context:b.root.get(b.keypath)})},Qe=function(a,b,c){function d(a){return f[a]||(f[a]=function(b){var c=b.node._ractive;b.index=c.index,b.keypath=c.keypath,b.context=c.root.get(c.keypath),c.events[a].fire(b)}),f[a]}var e,f={};return e=function(){var e,f=this.name;this.invalid||((e=a.registries.events.find(this.root,f))?this.custom=e(this.node,d(f)):("on"+f in this.node||window&&"on"+f in window||c.error({debug:this.root.debug,message:"missingPlugin",args:{plugin:"event",name:f}}),this.node.addEventListener(f,b,!1)),this.hasListener=!0)}}(Ub,Pe,Zc),Re=function(a){return function(b,c,d,e){return this.method?void this.args.forEach(function(f){f.indexRef&&f.indexRef===b&&(f.value=c),f.keypath&&(e=a(f.keypath,d,e))&&(f.keypath=e)}):("string"!=typeof this.action&&this.action.rebind(b,c,d,e),void(this.dynamicParams&&this.dynamicParams.rebind(b,c,d,e)))}}(Yc),Se=function(){this.node=this.element.node,this.node._ractive.events[this.name]=this,(this.method||this.getAction())&&this.listen()},Te=function(a,b){this.args[a]={keypath:b}},Ue=function(){function a(a){a.teardown()}var b;return b=function(){return this.method?void this.unresolved.forEach(a):("string"!=typeof this.action&&this.action.unbind(),void(this.dynamicParams&&this.dynamicParams.unbind()))}}(),Ve=function(a){return function(){this.custom?this.custom.teardown():this.node.removeEventListener(this.name,a,!1),this.hasListener=!1}}(Pe),We=function(a,b,c,d,e,f,g,h,i,j){var k=function(a,b,c){this.init(a,b,c)};return k.prototype={bubble:a,fire:b,getAction:c,init:d,listen:e,rebind:f,render:g,resolve:h,unbind:i,unrender:j},k}(Le,Me,Ne,Oe,Qe,Re,Se,Te,Ue,Ve),Xe=function(a){return function(b,c){var d,e,f,g,h=[];for(e in c)if(c.hasOwnProperty(e))for(f=e.split("-"),d=f.length;d--;)g=new a(b,f[d],c[e]),h.push(g);return h}}(We),Ye=function(a,b,c){var d,e,f;return b.push(function(){d=b.Fragment}),e={args:!0},f=function(b,f){var g,h,i,j=this;j.element=b,j.root=g=b.root,h=f.n||f,"string"!=typeof h&&(i=new d({template:h,root:g,owner:b}),h=i.toString(),i.unbind()),f.a?j.params=f.a:f.d&&(j.fragment=new d({template:f.d,root:g,owner:b}),j.params=j.fragment.getValue(e),j.fragment.bubble=function(){this.dirtyArgs=this.dirtyValue=!0,j.params=this.getValue(e),j.ready&&j.update()}),j.fn=c.registries.decorators.find(g,h),j.fn||a.error({debug:g.debug,message:"missingPlugin",args:{plugin:"decorator",name:h}})},f.prototype={init:function(){var a,b,c,d=this;if(a=d.element.node,d.params?(c=[a].concat(d.params),b=d.fn.apply(d.root,c)):b=d.fn.call(d.root,a),!b||!b.teardown)throw new Error("Decorator definition must return an object with a teardown method");d.actual=b,d.ready=!0},update:function(){this.actual.update?this.actual.update.apply(this.root,this.params):(this.actual.teardown(!0),this.init())},rebind:function(a,b,c,d){this.fragment&&this.fragment.rebind(a,b,c,d)},teardown:function(a){this.actual.teardown(),!a&&this.fragment&&this.fragment.unbind()}},f}(Zc,e,Ub),Ze=function(a){function b(a,b){for(var c=a.length;c--;)if(a[c]==b)return!0}var c;return c=function(c){var d,e,f,g,h;d=c.node,d&&(g=a(d.options),e=c.getAttribute("value"),f=c.getAttribute("multiple"),void 0!==e?(g.forEach(function(a){var c,d;c=a._ractive?a._ractive.value:a.value,d=f?b(e,c):e==c,d&&(h=!0),a.selected=d}),h||(g[0]&&(g[0].selected=!0),c.binding&&c.binding.forceUpdate())):c.binding&&c.binding.forceUpdate())}}(Fd),$e=function(a,b){return function(){var c=this;this.dirty||(this.dirty=!0,a.scheduleTask(function(){b(c),c.dirty=!1})),this.parentFragment.bubble()}}(v,Ze),_e=function(a){do if("select"===a.name)return a;while(a=a.parent)},af=function(a){return function(b,c){b.select=a(b.parent),b.select&&(b.select.options.push(b),c.a||(c.a={}),c.a.value||c.a.hasOwnProperty("disabled")||(c.a.value=c.f),"selected"in c.a&&void 0!==b.select.getAttribute("value")&&delete c.a.selected)}}(_e),bf=function(a,b,c,d,e,f,g,h,i){var j;return i.push(function(){j=i.Fragment}),function(i){var k,l,m,n,o;this.type=a.ELEMENT,k=this.parentFragment=i.parentFragment,l=this.template=i.template,this.parent=i.pElement||k.pElement,this.root=m=k.root,this.index=i.index,this.name=b(l.e),"option"===this.name&&h(this,l),"select"===this.name&&(this.options=[],this.bubble=g),this.attributes=c(this,l.a),l.f&&(this.fragment=new j({template:l.f,root:m,owner:this,pElement:this})),m.twoway&&(n=d(this,l.a))&&(this.binding=n,o=this.root._twowayBindings[n.keypath]||(this.root._twowayBindings[n.keypath]=[]),o.push(n)),l.v&&(this.eventHandlers=e(this,l.v)),l.o&&(this.decorator=new f(this,l.o)),this.intro=l.t0||l.t1,this.outro=l.t0||l.t2}}(R,Wd,ue,Ke,Xe,Ye,$e,af,e),cf=function(a){return function(b,c){return b===c||a(b,c)}}(Xc),df=function(a,b){return function(c,d,e,f){var g=c[d];g&&!a(g,f)&&a(g,e)&&(c[d]=b(g,e,f))}}(cf,Yc),ef=function(a){return function(b,c,d,e){function f(a){a.rebind(b,c,d,e)}var g,h,i,j;if(this.attributes&&this.attributes.forEach(f),this.eventHandlers&&this.eventHandlers.forEach(f),this.decorator&&f(this.decorator),this.fragment&&f(this.fragment),i=this.liveQueries)for(j=this.root,g=i.length;g--;)i[g]._makeDirty();this.node&&(h=this.node._ractive)&&(a(h,"keypath",d,e),void 0!=b&&(h.index[b]=c))}}(df),ff=function(a){var b;(a.attributes.width||a.attributes.height)&&a.node.addEventListener("load",b=function(){var c=a.getAttribute("width"),d=a.getAttribute("height");void 0!==c&&a.node.setAttribute("width",c),void 0!==d&&a.node.setAttribute("height",d),a.node.removeEventListener("load",b,!1)},!1)},gf=function(a,b,c){var d,e={};return c.push(function(){d=c.Fragment}),function(c,f,g){var h,i,j,k=this;return k.element=c,k.root=h=c.root,k.isIntro=g,i=f.n||f,"string"!=typeof i&&(j=new d({template:i,root:h,owner:c}),i=j.toString(),j.unbind()),k.name=i,f.a?k.params=f.a:f.d&&(j=new d({template:f.d,root:h,owner:c}),k.params=j.getValue(e),j.unbind()),k._fn=b.registries.transitions.find(h,i),k._fn?void 0:void a.error({debug:h.debug,message:"missingPlugin",args:{plugin:"transition",name:i}})}}(Zc,Ub,e),hf=function(a){return a.replace(/-([a-zA-Z])/g,function(a,b){return b.toUpperCase()})},jf=function(a,b,c,d){var e,f,g;return a?(f={},g=c("div").style,e=function(a){var c,e,h;if(a=d(a),!f[a])if(void 0!==g[a])f[a]=a;else for(h=a.charAt(0).toUpperCase()+a.substring(1),c=b.length;c--;)if(e=b[c],void 0!==g[e+h]){f[a]=e+h;break}return f[a]}):e=null,e}(B,H,A,hf),kf=function(a,b,c,d){var e,f;return b?(f=window.getComputedStyle||a.getComputedStyle,e=function(a){var b,e,g,h,i;if(b=f(this.node),"string"==typeof a)return i=b[d(a)],"0px"===i&&(i=0),i;if(!c(a))throw new Error("Transition$getStyle must be passed a string, or an array of strings representing CSS properties");for(e={},g=a.length;g--;)h=a[g],i=b[d(h)],"0px"===i&&(i=0),e[h]=i;return e}):e=null,e}(ub,B,g,jf),lf=function(a){return function(b,c){var d;if("string"==typeof b)this.node.style[a(b)]=c;else for(d in b)b.hasOwnProperty(d)&&(this.node.style[a(d)]=b[d]);return this}}(jf),mf=function(a,b,c){function d(a){return a}var e,f=function(e){var f;this.duration=e.duration,this.step=e.step,this.complete=e.complete,"string"==typeof e.easing?(f=e.root.easing[e.easing],f||(a('Missing easing function ("'+e.easing+'"). You may need to download a plugin from [TODO]'),f=d)):f="function"==typeof e.easing?e.easing:d,this.easing=f,this.start=b(),this.end=this.start+this.duration,this.running=!0,c.add(this)};return f.prototype={tick:function(a){var b,c;return this.running?a>this.end?(this.step&&this.step(1),this.complete&&this.complete(1),!1):(b=a-this.start,c=this.easing(b/this.duration),this.step&&this.step(c),!0):!1},stop:function(){this.abort&&this.abort(),this.running=!1}},e=f}(L,J,K),nf=function(a){var b=new RegExp("^-(?:"+a.join("|")+")-");return function(a){return a.replace(b,"")}}(H),of=function(a){var b=new RegExp("^(?:"+a.join("|")+")([A-Z])");return function(a){var c;return a?(b.test(a)&&(a="-"+a),c=a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})):""}}(H),pf=function(a,b,c,d,e,f,g,h,i){var j,k,l,m,n,o,p,q,r={},s={};return a?(k=c("div").style,function(){void 0!==k.transition?(l="transition",m="transitionend",n=!0):void 0!==k.webkitTransition?(l="webkitTransition",m="webkitTransitionEnd",n=!0):n=!1}(),l&&(o=l+"Duration",p=l+"Property",q=l+"TimingFunction"),j=function(a,c,j,k,l){setTimeout(function(){var t,u,v,w,x;w=function(){u&&v&&(a.root.fire(a.name+":end",a.node,a.isIntro),l())},t=(a.node.namespaceURI||"")+a.node.tagName,a.node.style[p]=k.map(g).map(i).join(","),a.node.style[q]=i(j.easing||"linear"),a.node.style[o]=j.duration/1e3+"s",x=function(b){var c;c=k.indexOf(d(h(b.propertyName))),-1!==c&&k.splice(c,1),k.length||(a.node.removeEventListener(m,x,!1),v=!0,w())},a.node.addEventListener(m,x,!1),setTimeout(function(){for(var h,i,l,o,p,q=k.length,y=[];q--;)o=k[q],h=t+o,n&&!s[h]&&(a.node.style[g(o)]=c[o],r[h]||(i=a.getStyle(o),r[h]=a.getStyle(o)!=c[o],s[h]=!r[h],s[h]&&(a.node.style[g(o)]=i))),(!n||s[h])&&(void 0===i&&(i=a.getStyle(o)),l=k.indexOf(o),-1===l?b("Something very strange happened with transitions. If you see this message, please let @RactiveJS know. Thanks!"):k.splice(l,1),p=/[^\d]*$/.exec(c[o])[0],y.push({name:g(o),interpolator:e(parseFloat(i),parseFloat(c[o])),suffix:p}));y.length?new f({root:a.root,duration:j.duration,easing:d(j.easing||""),step:function(b){var c,d;for(d=y.length;d--;)c=y[d],a.node.style[c.name]=c.interpolator(b)+c.suffix},complete:function(){u=!0,w()}}):u=!0,k.length||(a.node.removeEventListener(m,x,!1),v=!0,w())},0)},j.delay||0)}):j=null,j}(B,L,A,hf,Vb,mf,jf,nf,of),qf=function(a){function b(){i.hidden=document[e]}function c(){i.hidden=!0}function d(){i.hidden=!1}var e,f,g,h,i;if("undefined"!=typeof document){if(e="hidden",i={},e in document)g="";else for(h=a.length;h--;)f=a[h],e=f+"Hidden",e in document&&(g=f);void 0!==g?(document.addEventListener(g+"visibilitychange",b),b()):("onfocusout"in document?(document.addEventListener("focusout",c),document.addEventListener("focusin",d)):(window.addEventListener("pagehide",c),window.addEventListener("blur",c),window.addEventListener("pageshow",d),window.addEventListener("focus",d)),i.hidden=!1)}return i}(H),rf=function(a,b,c,d,e,f,g){var h,i,j;return b?(i=window.getComputedStyle||a.getComputedStyle,h=function(a,b,h,k){var l,m=this;if(g.hidden)return this.setStyle(a,b),j||(j=d.resolve());"string"==typeof a?(l={},l[a]=b):(l=a,k=h,h=b),h||(c('The "'+m.name+'" transition does not supply an options object to `t.animateStyle()`. This will break in a future version of Ractive. For more info see https://github.com/RactiveJS/Ractive/issues/340'),h=m,k=m.complete);var n=new d(function(a){var b,c,d,g,j,k,n;if(!h.duration)return m.setStyle(l),void a();for(b=Object.keys(l),c=[],d=i(m.node),j={},k=b.length;k--;)n=b[k],g=d[e(n)],"0px"===g&&(g=0),g!=l[n]&&(c.push(n),m.node.style[e(n)]=g);return c.length?void f(m,l,h,c,a):void a()});return k&&(c("t.animateStyle returns a Promise as of 0.4.0. Transition authors should do t.animateStyle(...).then(callback)"),n.then(k)),n}):h=null,h}(ub,B,L,o,jf,pf,qf),sf=function(a,b){var c;for(c in b)!b.hasOwnProperty(c)||c in a||(a[c]=b[c]);return a},tf=function(a){return function(b,c){return"number"==typeof b?b={duration:b}:"string"==typeof b?b="slow"===b?{duration:600}:"fast"===b?{duration:200}:{duration:400}:b||(b={}),a(b,c)}}(sf),uf=function(){function a(a,b){b?a.setAttribute("style",b):(a.getAttribute("style"),a.removeAttribute("style"))}var b;return b=function(){var b,c,d=this;return b=d.node=d.element.node,c=b.getAttribute("style"),d.complete=function(e){!e&&d.isIntro&&a(b,c),b._ractive.transition=null,d._manager.remove(d)},d._fn?void d._fn.apply(d.root,[d].concat(d.params)):void d.complete()}}(),vf=function(a,b,c,d,e,f,g){var h,i;return g.push(function(){h=g.Fragment}),i=function(a,b,c){this.init(a,b,c)},i.prototype={init:a,start:f,getStyle:b,setStyle:c,animateStyle:d,processParams:e},i}(gf,kf,lf,rf,tf,uf,e),wf=function(a,b,c,d,e,f,g,h,i,j,k){function l(b){var c,d,e;return c=(d=b.getAttribute("xmlns"))?d:"svg"===b.name?a.svg:(e=b.parent)?"foreignObject"===e.name?a.html:e.node.namespaceURI:b.root.el.namespaceURI}function m(a){var c,d,e;if(a.select&&(d=a.select.getAttribute("value"),void 0!==d))if(c=a.getAttribute("value"),a.select.node.multiple&&b(d)){for(e=d.length;e--;)if(c==d[e]){a.node.selected=!0;break}}else a.node.selected=c==d}function n(a){var b,c,d,e,f;b=a.root;do for(c=b._liveQueries,d=c.length;d--;)e=c[d],f=c["_"+e],f._test(a)&&(a.liveQueries||(a.liveQueries=[])).push(f);while(b=b._parent)}var o,p,q;return p=function(){var a=this.node,b=this.fragment.toString(!1);if(a.styleSheet)a.styleSheet.cssText=b;else{for(;a.hasChildNodes();)a.removeChild(a.firstChild);a.appendChild(document.createTextNode(b))}},q=function(){this.node.type&&"text/javascript"!==this.node.type||c("Script tag was updated. This does not cause the code to be re-evaluated!"),this.node.text=this.fragment.toString(!1)},o=function(){var a,b,c=this,o=this.root;if(a=l(this),b=this.node=e(this.name,a),o.constructor.css&&this.parentFragment.getNode()===o.el&&this.node.setAttribute("data-rvcguid",o.constructor._guid),f(this.node,"_ractive",{value:{proxy:this,keypath:i(this.parentFragment),index:this.parentFragment.indexRefs,events:d(null),root:o}}),this.attributes.forEach(function(a){return a.render(b)}),this.fragment&&("script"===this.name?(this.bubble=q,this.node.text=this.fragment.toString(!1),this.fragment.unrender=g):"style"===this.name?(this.bubble=p,this.bubble(),this.fragment.unrender=g):this.binding&&this.getAttribute("contenteditable")?this.fragment.unrender=g:this.node.appendChild(this.fragment.render())),this.eventHandlers&&this.eventHandlers.forEach(function(a){return a.render()}),this.binding&&(this.binding.render(),this.node._ractive.binding=this.binding),"img"===this.name&&j(this),this.decorator&&this.decorator.fn&&h.scheduleTask(function(){c.decorator.init()}),o.transitionsEnabled&&this.intro){var r=new k(this,this.intro,!0);h.registerTransition(r),h.scheduleTask(function(){return r.start()})}return"option"===this.name&&m(this),this.node.autofocus&&h.scheduleTask(function(){return c.node.focus()}),n(this),this.node}}(z,g,L,S,A,C,Rb,v,q,ff,vf),xf=function(a,b,c){function d(a){var c,d,e;if(c=a.getAttribute("value"),void 0===c||!a.select)return!1;if(d=a.select.getAttribute("value"),d==c)return!0;if(a.select.getAttribute("multiple")&&b(d))for(e=d.length;e--;)if(d[e]==c)return!0}function e(a){var b,c,d,e;return b=a.attributes,c=b.type,d=b.value,e=b.name,c&&"radio"===c.value&&d&&e.interpolator&&d.value===e.interpolator.value?!0:void 0}function f(a){var b=a.toString();return b?" "+b:""}var g;return g=function(){var b,g;return b="<"+(this.template.y?"!DOCTYPE":this.template.e),b+=this.attributes.map(f).join(""),"option"===this.name&&d(this)&&(b+=" selected"),"input"===this.name&&e(this)&&(b+=" checked"),b+=">","textarea"===this.name&&void 0!==this.getAttribute("value")?b+=c(this.getAttribute("value")):void 0!==this.getAttribute("contenteditable")&&(b+=this.getAttribute("value")),this.fragment&&(g="script"!==this.name&&"style"!==this.name,b+=this.fragment.toString(g)),a.test(this.template.e)||(b+="</"+this.template.e+">"),b}}(yb,g,Qc),yf=function(a){return function(b){b.select&&a(b.select.options,b)}}(n),zf=function(a){function b(a){a.unbind()}var c;return c=function(){this.fragment&&this.fragment.unbind(),this.binding&&this.binding.unbind(),this.eventHandlers&&this.eventHandlers.forEach(b),"option"===this.name&&a(this),this.attributes.forEach(b)}}(yf),Af=function(a,b){function c(a){var b,c,d;for(d=a.liveQueries.length;d--;)b=a.liveQueries[d],c=b.selector,b._remove(a.node)}var d;return d=function(d){var e,f;if("option"===this.name?this.detach():d&&a.detachWhenReady(this),this.fragment&&this.fragment.unrender(!1),(e=this.binding)&&(this.binding.unrender(),this.node._ractive.binding=null,f=this.root._twowayBindings[e.keypath],f.splice(f.indexOf(e),1)),this.eventHandlers&&this.eventHandlers.forEach(function(a){return a.unrender()}),this.decorator&&this.decorator.teardown(),this.root.transitionsEnabled&&this.outro){var g=new b(this,this.outro,!1);a.registerTransition(g),a.scheduleTask(function(){return g.start()})}this.liveQueries&&c(this),this.node.id&&delete this.root.nodes[this.node.id]}}(v,vf),Bf=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=function(a){this.init(a)};return p.prototype={bubble:a,detach:b,find:c,findAll:d,findAllComponents:e,findComponent:f,findNextNode:g,firstNode:h,getAttribute:i,init:j,rebind:k,render:l,toString:m,unbind:n,unrender:o},p}(Nd,Od,Pd,Qd,Rd,Sd,Td,Ud,Vd,bf,ef,wf,xf,zf,Af),Cf=function(){function a(a,b){var c=d.exec(b)[0];return null===a||c.length<a.length?c:a}var b,c=/^\s*$/,d=/^\s*/;return b=function(b){var d,e,f,g;return d=b.split("\n"),e=d[0],void 0!==e&&c.test(e)&&d.shift(),f=d[d.length-1],void 0!==f&&c.test(f)&&d.pop(),g=d.reduce(a,null),g&&(b=d.map(function(a){return a.replace(g,"")}).join("\n")),b}}(),Df=function(a,b,c,d){function e(d,e){var f=b.registries.partials,g=f.findInstance(d,e);if(g){var h,i=g.partials[e];if("function"==typeof i&&(h=i.bind(g),h.isOwner=g.partials.hasOwnProperty(e),i=h(g.data,c)),!i)return void a.warn({debug:d.debug,message:"noRegistryFunctionReturn",args:{registry:"partial",name:e}});if(!c.isParsed(i)){var j=c.parse(i,c.getParseOptions(g));j.p&&a.warn({debug:d.debug,message:"noNestedPartials",args:{rname:e}});var k=h?g:f.findOwner(g,e);k.partials[e]=i=j.t}return h&&(i._fn=h),i.v?i.t:i}}var f;return f=function(b,f){var g;if(g=e(b,f))return g;if(g=c.fromId(f,{noThrow:!0})){g=d(g);var h=c.parse(g,c.getParseOptions(b));return b.partials[f]=h.t}return a.error({debug:b.debug,message:"noTemplateForPartial",args:{name:f}}),[]}}(Zc,Ub,Nb,Cf),Ef=function(a,b){var c;return b?c=a.split("\n").map(function(a,c){return c?b+a:a}).join("\n"):a},Ff=function(a,b,c,d,e,f,g,h){var i,j;return d.push(function(){j=d.Fragment}),i=function(b){var c=this.parentFragment=b.parentFragment;this.type=a.PARTIAL,this.name=b.template.r,this.index=b.index,this.root=c.root,f.init(this,b),this.update()},i.prototype={bubble:function(){this.parentFragment.bubble()},firstNode:function(){return this.fragment.firstNode()},findNextNode:function(){return this.parentFragment.findNextNode(this)},detach:function(){return this.fragment.detach()},render:function(){return this.update(),this.rendered=!0,this.fragment.render()},unrender:function(a){this.rendered&&(this.fragment.unrender(a),this.rendered=!1)},rebind:function(a,b,c,d){return this.fragment.rebind(a,b,c,d)},unbind:function(){this.fragment&&this.fragment.unbind()},toString:function(b){var d,e,f,g;return d=this.fragment.toString(b),e=this.parentFragment.items[this.index-1],e&&e.type===a.TEXT?(f=e.text.split("\n").pop(),(g=/^\s+$/.exec(f))?c(d,g[0]):d):d
},find:function(a){return this.fragment.find(a)},findAll:function(a,b){return this.fragment.findAll(a,b)},findComponent:function(a){return this.fragment.findComponent(a)},findAllComponents:function(a,b){return this.fragment.findAllComponents(a,b)},getValue:function(){return this.fragment.getValue()},resolve:f.resolve,setValue:function(a){this.value!==a&&(this.fragment&&this.rendered&&this.fragment.unrender(!0),this.fragment=null,this.value=a,this.rendered?e.addView(this):(this.update(),this.bubble()))},update:function(){var a,c,d,e;this.fragment||(a=this.name&&(g.registries.partials.findInstance(this.root,this.name)||h.fromId(this.name,{noThrow:!0}))?b(this.root,this.name):this.value?b(this.root,this.value):[],this.fragment=new j({template:a,root:this.root,owner:this,pElement:this.parentFragment.pElement}),this.rendered&&(d=this.parentFragment.getNode(),c=this.fragment.render(),e=this.parentFragment.findNextNode(this),d.insertBefore(c,e)))}},i}(R,Df,Ef,e,v,hd,Ub,Nb),Gf=function(a,b,c){var d;return c.push(function(){d=c.Ractive}),function e(c,d){var f,g=a.registries.components.findInstance(c,d);if(g&&(f=g.components[d],!f._parent)){var h=f.bind(g);if(h.isOwner=g.components.hasOwnProperty(d),f=h(g.data),!f)return void b.warn({debug:c.debug,message:"noRegistryFunctionReturn",args:{registry:"component",name:d}});"string"==typeof f&&(f=e(c,f)),f._fn=h,g.components[d]=f}return f}}(Ub,Zc,e),Hf=function(){return this.instance.fragment.detach()},If=function(a){return this.instance.fragment.find(a)},Jf=function(a,b){return this.instance.fragment.findAll(a,b)},Kf=function(a,b){b._test(this,!0),this.instance.fragment&&this.instance.fragment.findAllComponents(a,b)},Lf=function(a){return a&&a!==this.name?this.instance.fragment?this.instance.fragment.findComponent(a):null:this.instance},Mf=function(){return this.parentFragment.findNextNode(this)},Nf=function(){return this.rendered?this.instance.fragment.firstNode():null},Of=function(a,b){var c,d;return b.push(function(){c=b.Fragment}),d=function(a,b,d){this.parentFragment=a.parentFragment,this.component=a,this.key=b,this.fragment=new c({template:d,root:a.root,owner:this}),this.value=this.fragment.getValue()},d.prototype={bubble:function(){this.dirty||(this.dirty=!0,a.addView(this))},update:function(){var b=this.fragment.getValue();this.component.instance.viewmodel.set(this.key,b),a.addViewmodel(this.component.instance.viewmodel),this.value=b,this.dirty=!1},rebind:function(a,b,c,d){this.fragment.rebind(a,b,c,d)},unbind:function(){this.fragment.unbind()}},d}(v,e),Pf=function(a,b){var c=function(c,d,e,f){var g=this;this.root=c.root,this.parentFragment=c.parentFragment,this.ready=!1,this.hash=null,this.resolver=new a(this,e,function(a){g.binding||(g.binding=c.bindings[g.hash])?(c.bindings[g.hash]=null,g.binding.rebind(a),g.hash=a+"="+d,c.bindings[g.hash]):g.ready?b(c,c.root,a,d):f.push({childKeypath:d,parentKeypath:a}),g.value=c.root.viewmodel.get(a)})};return c.prototype={rebind:function(a,b,c,d){this.resolver.rebind(a,b,c,d)},unbind:function(){this.resolver.unbind()}},c}(dd,s),Qf=function(a,b,c,d,e){function f(f,g,h,i){var j,k,l,m,n,o;if(l=f.root,m=f.parentFragment,"string"==typeof h)return k=b(h),k?k.value:h;if(null===h)return!0;if(1===h.length&&h[0].t===a.INTERPOLATOR){if(h[0].r)return m.indexRefs&&void 0!==m.indexRefs[o=h[0].r]?(f.indexRefBindings[o]=g,m.indexRefs[o]):(n=c(l,h[0].r,m)||h[0].r,i.push({childKeypath:g,parentKeypath:n}),l.viewmodel.get(n));if(h[0].rx)return j=new e(f,g,h[0].rx,i),f.complexParameters.push(j),j.ready=!0,j.value}return j=new d(f,g,h),f.complexParameters.push(j),j.value}var g;return g=function(a,b,c,d){var e,g,h={};a.complexParameters=[];for(e in c)c.hasOwnProperty(e)&&(g=f(a,e,c[e],d),(void 0!==g||void 0===b[e])&&(h[e]=g));return h}}(R,Eb,t,Of,Pf),Rf=function(a){return function(b,c,d,e){var f,g,h,i;return g=b.parentFragment,i=b.root,h={content:e||[]},c.defaults.el&&a.warn({debug:i.debug,message:"defaultElSpecified",args:{name:b.name}}),f=new c({el:null,append:!0,data:d,partials:h,magic:i.magic||c.defaults.magic,modifyArrays:i.modifyArrays,_parent:i,_component:b,adapt:i.adapt,"yield":{template:e,instance:i}})}}(Zc),Sf=function(a){return function(b,c){c.forEach(function(c){var d,e;a(b,b.root,c.parentKeypath,c.childKeypath),d=b.instance.viewmodel.get(c.childKeypath),e=b.root.viewmodel.get(c.parentKeypath),void 0!==d&&void 0===e&&b.root.viewmodel.set(c.parentKeypath,d)})}}(s),Tf=function(a,b,c){function d(a,d,e,f){"string"!=typeof f&&c.error({debug:d.debug,message:"noComponentEventArguments"}),a.on(e,function(){var a,c;return arguments.length&&arguments[0].node&&(a=Array.prototype.shift.call(arguments)),c=Array.prototype.slice.call(arguments),b(d,f,{event:a,args:c}),!1})}var e,f;return a.push(function(){f=a.Fragment}),e=function(a,b){var c;for(c in b)b.hasOwnProperty(c)&&d(a.instance,a.root,c,b[c])}}(e,m,Zc),Uf=function(a){var b,c;for(b=a.root;b;)(c=b._liveComponentQueries["_"+a.name])&&c.push(a.instance),b=b._parent},Vf=function(a,b,c,d,e,f,g){return function(h,i){var j,k,l,m;if(j=this.parentFragment=h.parentFragment,k=j.root,this.root=k,this.type=a.COMPONENT,this.name=h.template.e,this.index=h.index,this.indexRefBindings={},this.bindings=[],this.yielder=null,!i)throw new Error('Component "'+this.name+'" not found');m=[],l=c(this,i.defaults.data||{},h.template.a,m),d(this,i,l,h.template.f),e(this,m),f(this,h.template.v),(h.template.t1||h.template.t2||h.template.o)&&b('The "intro", "outro" and "decorator" directives have no effect on components'),g(this)}}(R,L,Qf,Rf,Sf,Tf,Uf),Wf=function(a,b){return function(c,d,e,f){function g(a){a.rebind(c,d,e,f)}var h,i,j=this.instance,k=j._parent;this.bindings.forEach(function(a){var c;a.root===k&&(c=b(a.keypath,e,f))&&a.rebind(c)}),this.complexParameters.forEach(g),this.yielder&&g(this.yielder),(h=this.indexRefBindings[c])&&(a.addViewmodel(j.viewmodel),j.viewmodel.set(h,d)),(i=this.root._liveComponentQueries["_"+this.name])&&i._makeDirty()}}(v,Yc),Xf=function(){var a=this.instance;return a.render(this.parentFragment.getNode()),this.rendered=!0,a.fragment.detach()},Yf=function(){return this.instance.fragment.toString()},Zf=function(){function a(a){a.unbind()}function b(a){var b,c;b=a.root;do(c=b._liveComponentQueries["_"+a.name])&&c._remove(a);while(b=b._parent)}var c;return c=function(){this.complexParameters.forEach(a),this.bindings.forEach(a),b(this),this.instance.fragment.unbind()}}(),$f=function(a){return function(b){a(this.instance,"teardown"),this.shouldDestroy=b,this.instance.unrender()}}(m),_f=function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=function(a,b){this.init(a,b)};return n.prototype={detach:a,find:b,findAll:c,findAllComponents:d,findComponent:e,findNextNode:f,firstNode:g,init:h,rebind:i,render:j,toString:k,unbind:l,unrender:m},n}(Hf,If,Jf,Kf,Lf,Mf,Nf,Vf,Wf,Xf,Yf,Zf,$f),ag=function(a,b){var c=function(b){this.type=a.COMMENT,this.value=b.template.c};return c.prototype={detach:b,firstNode:function(){return this.node},render:function(){return this.node||(this.node=document.createComment(this.value)),this.node},toString:function(){return"<!--"+this.value+"-->"},unrender:function(a){a&&this.node.parentNode.removeChild(this.node)}},c}(R,Sc),bg=function(a){var b;a.push(function(){b=a.Fragment});var c=function(a){var c,d;if(c=a.parentFragment.root,this.component=d=c.component,this.surrogateParent=a.parentFragment,this.parentFragment=d.parentFragment,d.yielder)throw new Error("A component template can only have one {{yield}} declaration at a time");this.fragment=new b({owner:this,root:c.yield.instance,template:c.yield.template}),d.yielder=this};return c.prototype={detach:function(){return this.fragment.detach()},find:function(a){return this.fragment.find(a)},findAll:function(a,b){return this.fragment.findAll(a,b)},findComponent:function(a){return this.fragment.findComponent(a)},findAllComponents:function(a,b){return this.fragment.findAllComponents(a,b)},findNextNode:function(){return this.surrogateParent.findNextNode(this)},firstNode:function(){return this.fragment.firstNode()},getValue:function(a){return this.fragment.getValue(a)},render:function(){return this.fragment.render()},unbind:function(){this.fragment.unbind()},unrender:function(a){this.fragment.unrender(a),this.component.yielder=void 0},rebind:function(a,b,c,d){this.fragment.rebind(a,b,c,d)},toString:function(){return this.fragment.toString()}},c}(e),cg=function(a,b,c,d,e,f,g,h,i,j,k){return function(l){if("string"==typeof l.template)return new b(l);switch(l.template.t){case a.INTERPOLATOR:return"yield"===l.template.r?new k(l):new c(l);case a.SECTION:return new d(l);case a.TRIPLE:return new e(l);case a.ELEMENT:var m;return(m=h(l.parentFragment.root,l.template.e))?new i(l,m):new f(l);case a.PARTIAL:return new g(l);case a.COMMENT:return new j(l);default:throw new Error("Something very strange happened. Please file an issue at https://github.com/ractivejs/ractive/issues. Thanks!")}}}(R,Tc,id,zd,Md,Bf,Ff,Gf,_f,ag,bg),dg=function(a,b,c){return function(d){var e,f,g,h=this;if(this.owner=d.owner,e=this.parent=this.owner.parentFragment,this.root=d.root,this.pElement=d.pElement,this.context=d.context,this.owner.type===a.SECTION&&(this.index=d.index),e&&(f=e.indexRefs)){this.indexRefs=b(null);for(g in f)this.indexRefs[g]=f[g]}this.priority=e?e.priority+1:1,d.indexRef&&(this.indexRefs||(this.indexRefs={}),this.indexRefs[d.indexRef]=d.index),"string"==typeof d.template?d.template=[d.template]:d.template||(d.template=[]),this.items=d.template.map(function(a,b){return c({parentFragment:h,pElement:d.pElement,template:a,index:b})}),this.value=this.argsList=null,this.dirtyArgs=this.dirtyValue=!0,this.bound=!0}}(R,S,cg),eg=function(a){return function(b,c,d,e){a(this,"context",d,e),this.indexRefs&&void 0!==this.indexRefs[b]&&(this.indexRefs[b]=c),this.items.forEach(function(a){a.rebind&&a.rebind(b,c,d,e)})}}(df),fg=function(){var a;return 1===this.items.length?a=this.items[0].render():(a=document.createDocumentFragment(),this.items.forEach(function(b){a.appendChild(b.render())})),this.rendered=!0,a},gg=function(a){return this.items?this.items.map(function(b){return b.toString(a)}).join(""):""},hg=function(){function a(a){a.unbind&&a.unbind()}var b;return b=function(){this.bound&&(this.items.forEach(a),this.bound=!1)}}(),ig=function(a){if(!this.rendered)throw new Error("Attempted to unrender a fragment that was not rendered");this.items.forEach(function(b){return b.unrender(a)}),this.rendered=!1},jg=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r=function(a){this.init(a)};return r.prototype={bubble:a,detach:b,find:c,findAll:d,findAllComponents:e,findComponent:f,findNextNode:g,firstNode:h,getNode:i,getValue:j,init:k,rebind:l,render:m,toString:n,unbind:o,unrender:p},q.Fragment=r,r}(Gc,Hc,Ic,Jc,Kc,Lc,Mc,Nc,Oc,Pc,dg,eg,fg,gg,hg,ig,e),kg=function(a,b,c,d){var e=["template","partials","components","decorators","events"];return function(f,g){var h,i,j,k,l;if("function"!=typeof f||g?f=f||{}:(g=f,f={}),"object"!=typeof f)throw new Error("The reset method takes either no arguments, or an object containing new data");for((i=this.viewmodel.wrapped[""])&&i.reset?i.reset(f)===!1&&(this.data=f):this.data=f,j=d.reset(this),k=j.length;k--;)if(e.indexOf(j[k])>-1){l=!0;break}if(l){var m;this.viewmodel.mark(""),(m=this.component)&&(m.shouldDestroy=!0),this.unrender(),m&&(m.shouldDestroy=!1),this.fragment.template!==this.template&&(this.fragment.unbind(),this.fragment=new c({template:this.template,root:this,owner:this})),h=this.render(this.el,this.anchor)}else h=b.start(this,!0),this.viewmodel.mark(""),b.end();return a(this,"reset",{args:[f]}),g&&h.then(g),h}}(m,v,jg,Ub),lg=function(a,b){return function(c){var d,e;a.template.init(null,this,{template:c}),d=this.transitionsEnabled,this.transitionsEnabled=!1,(e=this.component)&&(e.shouldDestroy=!0),this.unrender(),e&&(e.shouldDestroy=!1),this.fragment.unbind(),this.fragment=new b({template:this.template,root:this,owner:this}),this.render(this.el,this.anchor),this.transitionsEnabled=d}}(Ub,jg),mg=function(a){return a("reverse")}(Bc),ng=function(a,b,c,d){var e=/\*/;return function(f,g,h){var i,j,k=this;if(j=a.start(this,!0),b(f)){i=f,h=g;for(f in i)i.hasOwnProperty(f)&&(g=i[f],f=c(f),this.viewmodel.set(f,g))}else f=c(f),e.test(f)?d(this,f).forEach(function(a){k.viewmodel.set(a,g)}):this.viewmodel.set(f,g);return a.end(),h&&j.then(h.bind(this)),j}}(v,h,G,qc),og=function(a){return a("shift")}(Bc),pg=function(a){return a("sort")}(Bc),qg=function(a){return a("splice")}(Bc),rg=function(a){return function(b,c){return a(this,b,void 0===c?-1:-c)}}(E),sg=function(a,b,c){return function(d){var e;return a(this,"teardown"),this.fragment.unbind(),this.viewmodel.teardown(),this.rendered&&this.el.__ractive_instances__&&b(this.el.__ractive_instances__,this),this.shouldDestroy=!0,e=this.rendered?this.unrender():c.resolve(),d&&e.then(d.bind(this)),e}}(m,n,o),tg=function(a){return function(b,c){var d;return"string"!=typeof b&&a.errorOnly({debug:this.debug,messsage:"badArguments",arg:{arguments:b}}),d=this.get(b),this.set(b,!d,c)}}(Zc),ug=function(){return this.fragment.toString(!0)},vg=function(a,b,c,d,e){return function(){var f,g,h=this;if(!this.rendered)return d.warn({debug:this.debug,message:"ractive.unrender() was called on a Ractive instance that was not rendered"}),e.resolve();for(f=b.start(this,!0),g=!this.component||this.component.shouldDestroy||this.shouldDestroy,this.constructor.css&&f.then(function(){c.remove(h.constructor)});this._animations[0];)this._animations[0].stop();return this.fragment.unrender(g),this.rendered=!1,a(this.el.__ractive_instances__,this),b.end(),f}}(n,v,Ec,Zc,o),wg=function(a){return a("unshift")}(Bc),xg=function(a,b){return function(c,d){var e;return"function"==typeof c?(d=c,c=""):c=c||"",e=b.start(this,!0),this.viewmodel.mark(c),b.end(),a(this,"update",{args:[c]}),d&&e.then(d.bind(this)),e}}(m,v),yg=function(a,b){function c(d,e,f,g){var h,i,j,k,l,m,n=[];if(h=d._twowayBindings[e],h&&(j=h.length))for(;j--;)k=h[j],(!k.radioName||k.element.node.checked)&&(k.checkboxName?n[k.keypath]||k.changed()||(n.push(k.keypath),n[k.keypath]=k):(l=k.attribute.value,m=k.getValue(),a(l,m)||b(l,m)||(f[e]=m)));if(n.length&&n.forEach(function(b){var c,d,e;c=n[b],d=c.attribute.value,e=c.getValue(),a(d,e)||(f[b]=e)}),g&&(i=d.viewmodel.depsMap["default"][e]))for(j=i.length;j--;)c(d,i[j],f,g)}var d;return d=function(a,b){var d;return"string"!=typeof a&&(a="",b=!0),c(this,a,d={},b),this.set(d)}}(Fe,r),zg=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F){return{add:a,animate:b,detach:c,find:d,findAll:e,findAllComponents:f,findComponent:g,fire:h,get:i,insert:j,merge:k,observe:l,off:m,on:n,pop:o,push:p,render:q,reset:r,resetTemplate:s,reverse:t,set:u,shift:v,sort:w,splice:x,subtract:y,teardown:z,toggle:A,toHTML:B,unrender:C,unshift:D,update:E,updateModel:F}}(F,Xb,Yb,Zb,hc,ic,jc,kc,lc,nc,oc,uc,xc,yc,Cc,Dc,Fc,kg,lg,mg,ng,og,pg,qg,rg,sg,tg,ug,vg,wg,xg,yg),Ag=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b,c;return b=16*Math.random()|0,c="x"==a?b:3&b|8,c.toString(16)})},Bg=function(){var a=0;return function(){return"r-"+a++}}(),Cg=function(a,b,c,d){var e=a.root,f=a.keypath;return"sort"===c||"reverse"===c?void e.viewmodel.set(f,b):void(d&&e.viewmodel.splice(f,d))},Dg=function(a,b,c,d,e){var f,g,h,i=[],j=["pop","push","reverse","shift","sort","splice","unshift"];return j.forEach(function(f){var g=function(){var b,g,h,i,j;for(b=c(this,f,Array.prototype.slice.call(arguments)),g=d(this,b),h=Array.prototype[f].apply(this,arguments),this._ractive.setting=!0,j=this._ractive.wrappers.length;j--;)i=this._ractive.wrappers[j],a.start(i.root),e(i,this,f,g),a.end();return this._ractive.setting=!1,h};b(i,f,{value:g})}),f={},f.__proto__?(g=function(a){a.__proto__=i},h=function(a){a.__proto__=Array.prototype}):(g=function(a){var c,d;for(c=j.length;c--;)d=j[c],b(a,d,{value:i[d],configurable:!0})},h=function(a){var b;for(b=j.length;b--;)delete a[j[b]]}),g.unpatch=h,g}(v,C,zc,Ac,Cg),Eg=function(a,b,c){var d,e,f;return d={filter:function(a){return b(a)&&(!a._ractive||!a._ractive.setting)},wrap:function(a,b,c){return new e(a,b,c)}},e=function(b,d,e){this.root=b,this.value=d,this.keypath=e,d._ractive||(a(d,"_ractive",{value:{wrappers:[],instances:[],setting:!1},configurable:!0}),c(d)),d._ractive.instances[b._guid]||(d._ractive.instances[b._guid]=0,d._ractive.instances.push(b)),d._ractive.instances[b._guid]+=1,d._ractive.wrappers.push(this)},e.prototype={get:function(){return this.value},teardown:function(){var a,b,d,e,g;if(a=this.value,b=a._ractive,d=b.wrappers,e=b.instances,b.setting)return!1;if(g=d.indexOf(this),-1===g)throw new Error(f);if(d.splice(g,1),d.length){if(e[this.root._guid]-=1,!e[this.root._guid]){if(g=e.indexOf(this.root),-1===g)throw new Error(f);e.splice(g,1)}}else delete a._ractive,c.unpatch(this.value)}},f="Something went wrong in a rather interesting way",d}(C,g,Dg),Fg=function(a,b){var c,d;return a&&(c={filter:function(c,d,e){return a.filter(c,d,e)&&b.filter(c)},wrap:function(a,b,c){return new d(a,b,c)}},d=function(c,d,e){this.value=d,this.magic=!0,this.magicWrapper=a.wrap(c,d,e),this.arrayWrapper=b.wrap(c,d,e)},d.prototype={get:function(){return this.value},teardown:function(){this.arrayWrapper.teardown(),this.magicWrapper.teardown()},reset:function(a){return this.magicWrapper.reset(a)}}),c}(x,Eg),Gg=function(a,b,c,d){function e(a,b){var c,d={};if(!b)return a;b+=".";for(c in a)a.hasOwnProperty(c)&&(d[b+c]=a[c]);return d}function f(a){var b;return h[a]||(b=a?a+".":"",h[a]=function(c,d){var f;return"string"==typeof c?(f={},f[b+c]=d,f):"object"==typeof c?b?e(c,a):c:void 0}),h[a]}var g,h={};return g=function(e,g){var h,i,j,k,l=this.ractive;for(h=l.adapt.length,i=0;h>i;i+=1){if(j=l.adapt[i],"string"==typeof j){var m=a.registries.adaptors.find(l,j);if(!m)throw new Error('Missing adaptor "'+j+'"');j=l.adapt[i]=m}if(j.filter(g,e,l))return k=this.wrapped[e]=j.wrap(l,g,e,f(e)),k.value=g,g}return l.magic?d.filter(g,e,l)?this.wrapped[e]=d.wrap(l,g,e):c.filter(g,e,l)&&(this.wrapped[e]=c.wrap(l,g,e)):l.modifyArrays&&b.filter(g,e,l)&&(this.wrapped[e]=b.wrap(l,g,e)),g}}(Ub,Eg,x,Fg),Hg=function(a){var b,c,d,e,f=[""];for(b=a.length;b--;)for(c=a[b],d=c.split(".");d.length>1;)d.pop(),e=d.join("."),-1===f.indexOf(e)&&f.push(e);return f},Ig=function(){function a(a){var b,d,e,f,g,h="";if(!c[a]){for(e=[];h.length<a;)h+=1;for(b=parseInt(h,2),f=function(a){return"1"===a},g=0;b>=g;g+=1){for(d=g.toString(2);d.length<a;)d="0"+d;e[g]=Array.prototype.map.call(d,f)}c[a]=e}return c[a]}var b,c={};return b=function(b){var c,d,e,f;return c=b.split("."),d=a(c.length),e=function(a,b){return a?"*":c[b]},f=d.map(function(a){return a.map(e).join(".")})}}(),Jg=function(a){function b(b,e,f){var g;d(b,e),f||(g=a(e),g.forEach(function(a){c(b,a,e)}))}function c(a,b,e){var g,h,i;g=a.depsMap.patternObservers,h=g[b],h&&h.forEach(function(b){var g=f.exec(b)[0];i=e?e+"."+g:g,d(a,i),c(a,b,i)})}function d(a,b){a.patternObservers.forEach(function(a){a.regex.test(b)&&a.update(b)})}var e,f=/[^\.]+$/;return e=b}(Ig),Kg=function(a,b){function c(a){a.update()}function d(a,b,c){var d,e;(d=f(a,b,c))&&(e=a.get(b),d.forEach(function(a){return a.setValue(e)}))}function e(a,b,c){function d(a){a.forEach(e),a.forEach(g)}function e(b){var d=f(a,b,c);d&&i.push({keypath:b,deps:d})}function g(b){var e;(e=a.depsMap[c][b])&&d(e)}function h(b){var c=a.get(b.keypath);b.deps.forEach(function(a){return a.setValue(c)})}var i=[];d(b),i.forEach(h)}function f(a,b,c){var d=a.deps[c];return d?d[b]:null}function g(a,b){b.forEach(function(b){-1===a.indexOf(b)&&a.push(b)})}var h,i=["observers","default"];return h=function(){var f,h,j,k,l,m=this,n=this,o=[],p={};if(this.changes.length){k=function(a){var b;(b=n.deps.computed[a])&&g(j,b)},l=function(a){var b;k(a),(b=n.depsMap.computed[a])&&b.forEach(l)};do f=this.changes,g(o,f),this.changes=[],j=[],h=a(f),h.forEach(k),f.forEach(l),j.forEach(c);while(this.changes.length);return h=a(o),this.patternObservers.length&&(h.forEach(function(a){return b(m,a,!0)}),o.forEach(function(a){return b(m,a)})),i.forEach(function(a){m.deps[a]&&(h.forEach(function(b){return d(m,b,a)}),e(m,o,a))}),o.forEach(function(a){p[a]=m.get(a)}),this.implicitChanges={},p}}}(Hg,Jg),Lg=function(){this.capturing=!0,this.captured=[]},Mg=function(a,b){var c,d,e;if(b||(d=this.wrapped[a])&&d.teardown()!==!1&&(this.wrapped[a]=null),(e=this.computations[a])&&e.compute(),this.cache[a]=void 0,c=this.cacheMap[a])for(;c.length;)this.clearCache(c.pop())},Ng={FAILED_LOOKUP:!0},Og=function(a,b){var c={},d=function(a,d){this.viewmodel=a,this.root=a.ractive,this.ref=d,this.parentFragment=c,a.unresolvedImplicitDependencies[d]=!0,a.unresolvedImplicitDependencies.push(this),b.addUnresolved(this)};return d.prototype={resolve:function(){this.viewmodel.mark(this.ref),this.viewmodel.unresolvedImplicitDependencies[this.ref]=!1,a(this.viewmodel.unresolvedImplicitDependencies,this)},teardown:function(){b.removeUnresolved(this)}},d}(n,v),Pg=function(a,b){function c(b,c){var d,e,f,g,h,i,j;return d=c.split("."),e=d.pop(),f=d.join("."),g=b.get(f),(j=b.wrapped[f])&&(g=j.get()),null!==g&&void 0!==g?((h=b.cacheMap[f])?-1===h.indexOf(c)&&h.push(c):b.cacheMap[f]=[c],"object"!=typeof g||e in g?(i=g[e],b.adapt(c,i,!1),b.cache[c]=i,i):b.cache[c]=a):void 0}var d,e={};return d=function(d){var f=arguments[1];void 0===f&&(f=e);var g,h,i,j,k=this.ractive,l=this.cache;return void 0===l[d]?((h=this.computations[d])?g=h.value:(i=this.wrapped[d])?g=i.value:d?g=(j=this.evaluators[d])?j.value:c(this,d):(this.adapt("",k.data),g=k.data),l[d]=g):g=l[d],f.evaluateWrapped&&(i=this.wrapped[d])&&(g=i.get()),f.capture&&this.capturing&&-1===this.captured.indexOf(d)&&(this.captured.push(d),g===a&&this.unresolvedImplicitDependencies[d]!==!0&&new b(this,d)),g===a?void 0:g}}(Ng,Og),Qg=function(a,b){b&&(this.implicitChanges[a]=!0),-1===this.changes.indexOf(a)&&(this.changes.push(a),this.clearCache(a))},Rg=function(a,b){var c,d,e,f;return c={},d=0,e=a.map(function(a,e){var g,h,i;h=d,i=b.length;do{if(g=b.indexOf(a,h),-1===g)return f=!0,-1;h=g+1}while(c[g]&&i>h);return g===d&&(d+=1),g!==e&&(f=!0),c[g]=!0,g}),e.unchanged=!f,e},Sg=function(a,b,c){function d(b){return"function"==typeof b.merge&&(!b.subtype||b.subtype===a.SECTION_EACH)}function e(a){return JSON.stringify(a)}function f(a){if(a===!0)return e;if("string"==typeof a)return h[a]||(h[a]=function(b){return b[a]}),h[a];if("function"==typeof a)return a;throw new Error("The `compare` option must be a function, or a string representing an identifying field (or `true` to use JSON.stringify)")}var g,h={};return g=function(a,e,g,h){var i,j,k,l,m,n=this;if(this.mark(a),h&&h.compare){k=f(h.compare);try{i=e.map(k),j=g.map(k)}catch(o){if(this.debug)throw o;b("Merge operation: comparison failed. Falling back to identity checking"),i=e,j=g}}else i=e,j=g;l=c(i,j),l.forEach(function(b,c){-1===b&&n.mark(a+"."+c)}),this.set(a,g,!0),(m=this.deps["default"][a])&&m.filter(d).forEach(function(a){return a.merge(l)}),e.length!==g.length&&this.mark(a+".length",!0)}}(R,L,Rg),Tg=function(){function a(a,b,c){var d,e,f,g;for(d=b.split(".");d.length;)d.pop(),e=d.join("."),f=a.depsMap[c]||(a.depsMap[c]={}),g=f[e]||(f[e]=[]),void 0===g[b]&&(g[b]=0,g.push(b)),g[b]+=1,b=e}var b;return b=function(b,c){var d=arguments[2];void 0===d&&(d="default");var e,f,g;c.isStatic||(e=this.deps[d]||(this.deps[d]={}),f=e[b]||(e[b]=[]),f.push(c),b&&((g=this.evaluators[b])&&(g.dependants||g.wake(),g.dependants+=1),a(this,b,d)))}}(),Ug=function(){return this.capturing=!1,this.captured},Vg=function(a,b){return function(c,d,e){var f,g,h,i,j,k,l,m;j=this.computations[c],j&&!j.setting&&(j.set(d),d=j.get()),a(this.cache[c],d)||(k=this.wrapped[c],l=this.evaluators[c],k&&k.reset&&(m=k.reset(d)!==!1,m&&(d=k.get())),l&&(l.value=d),j||l||m||(f=c.split("."),g=f.pop(),h=f.join("."),k=this.wrapped[h],k&&k.set?k.set(g,d):(i=k?k.get():this.get(h),i||(i=b(g),this.set(h,i,!0)),i[g]=d)),e?this.clearCache(c):this.mark(c))}}(r,w),Wg=function(a){function b(b){return b.type===a.SECTION&&(!b.subtype||b.subtype===a.SECTION_EACH)&&b.rendered}var c;return c=function(a,c){var d,e,f=this;for(d=c.rangeStart;d<c.rangeEnd;d+=1)f.mark(a+"."+d);c.balance&&f.mark(a+".length",!0),(e=f.deps["default"][a])&&e.filter(b).forEach(function(a){return a.splice(c)})}}(R),Xg=function(){var a,b=this;for(Object.keys(this.cache).forEach(function(a){return b.clearCache(a)});a=this.unresolvedImplicitDependencies.pop();)a.teardown()},Yg=function(){function a(a,b,c){var d,e,f,g;for(d=b.split(".");d.length;)d.pop(),e=d.join("."),f=a.depsMap[c],g=f[e],g[b]-=1,g[b]||(g.splice(g.indexOf(b),1),g[b]=void 0),b=e}var b;return b=function(b,c){var d=arguments[2];void 0===d&&(d="default");var e,f,g;if(!c.isStatic){if(e=this.deps[d][b],f=e.indexOf(c),-1===f)throw new Error("Attempted to remove a dependant that was no longer registered! This should not happen. If you are seeing this bug in development please raise an issue at https://github.com/RactiveJS/Ractive/issues - thanks");e.splice(f,1),b&&((g=this.evaluators[b])&&(g.dependants-=1,g.dependants||g.sleep()),a(this,b,d))}}}(),Zg=function(){function a(a){var b="var __ractive=this;return("+a.replace(c,function(a,b){return'__ractive.get("'+b+'")'})+")";return new Function(b)}var b,c=/\$\{([^\}]+)\}/g;return b=function(b){return"function"==typeof b?{get:b}:"string"==typeof b?{get:a(b)}:("object"==typeof b&&"string"==typeof b.get&&(b={get:a(b.get),set:b.set}),b)}}(),$g=function(a,b,c){var d=function(a,b,c){var d;this.ractive=a,this.viewmodel=a.viewmodel,this.key=b,this.getter=c.get,this.setter=c.set,this.dependencies=[],(d=a.viewmodel.get(b))&&this.set(d),this.update()};return d.prototype={get:function(){return this.compute(),this.value},set:function(a){if(this.setting)return void(this.value=a);if(!this.setter)throw new Error("Computed properties without setters are read-only. (This may change in a future version of Ractive!)");this.setter.call(this.ractive,a)},compute:function(){var b,d,e;b=this.ractive,b.viewmodel.capture();try{this.value=this.getter.call(b)}catch(f){a.warn({debug:b.debug,message:"failedComputation",args:{key:this.key,err:f.message||f}}),d=!0}return e=b.viewmodel.release(),c(this,this.dependencies,e),d?!1:!0},update:function(){var a=this.value;this.compute()&&!b(this.value,a)&&this.ractive.viewmodel.mark(this.key)}},d}(Zc,r,_c),_g=function(a,b){return function(c,d){var e,f;for(e in d)f=a(d[e]),c.viewmodel.computations[e]=new b(c,e,f)}}(Zg,$g),ah=function(){function a(a){return"string"==typeof a&&(a=[a]),a}var b={lookup:function(a,b){var c,d=a.adapt;if(!d||!d.length)return d;if(b&&Object.keys(b).length&&(c=d.length))for(;c--;){var e=d[c];"string"==typeof e&&(d[c]=b[e]||e)}return d},combine:function(b,c){return b=a(b),c=a(c),b&&b.length?c&&c.length?(b.forEach(function(a){-1===c.indexOf(a)&&c.push(a)}),c):b.slice():c}};return b}(),bh=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q;try{Object.defineProperty({},"test",{value:0})}catch(r){q=!0}var s=function(b){this.ractive=b,s.extend(b.constructor,b),this.cache={},this.cacheMap=a(null),this.deps={computed:{},"default":{}},this.depsMap={computed:{},"default":{}},this.patternObservers=[],this.wrapped=a(null),this.evaluators=a(null),this.computations=a(null),this.captured=null,this.unresolvedImplicitDependencies=[],this.changes=[],this.implicitChanges={}};return s.extend=function(a,b){if(b.magic&&q)throw new Error("Getters and setters (magic mode) are not supported in this browser");b.adapt=p.combine(a.prototype.adapt,b.adapt)||[],b.adapt=p.lookup(b,b.adaptors)},s.prototype={adapt:b,applyChanges:c,capture:d,clearCache:e,get:f,mark:g,merge:h,register:i,release:j,set:k,splice:l,teardown:m,unregister:n,compute:function(){o(this.ractive,this.ractive.computed)}},s}(S,Gg,Kg,Lg,Mg,Pg,Qg,Sg,Tg,Ug,Vg,Wg,Xg,Yg,_g,ah),ch=function(a,b,c,d,e,f){function g(a){var b;if(b=c(a.el)){if(b&&!a.append){if(b.__ractive_instances__)try{b.__ractive_instances__.splice(0,b.__ractive_instances__.length).forEach(function(a){return a.teardown()})}catch(d){}b.innerHTML=""}a.render(b,a.append)}}function h(a,c){a._guid=d(),a._subs=b(null),a._config={},a._twowayBindings=b(null),a._animations=[],a.nodes={},a._liveQueries=[],a._liveComponentQueries=[],c._parent&&c._component&&(a._parent=c._parent,a.component=c._component,c._component.instance=a)}var i;return i=function(b){var c=arguments[1];void 0===c&&(c={}),h(b,c),a.init(b.constructor,b,c),b.viewmodel=new e(b),b.viewmodel.compute(),b.template&&(b.fragment=new f({template:b.template,root:b,owner:b})),g(b)}}(Ub,S,mc,Bg,bh,jg),dh=function(a){return function(b,c,d){b.beforeInit&&b.beforeInit(d),a(b,d)}}(ch),eh=function(a,b,c,d){function e(b,c,d){for(var e in d)if(!(e in j)&&d.hasOwnProperty(e)){var f=d[e];"function"==typeof f&&(f=a(b,e,f)),c[e]=f}}function f(a){if(!(a.prototype instanceof i))return a;for(var c={};a;)l.forEach(function(b){g(b.useDefaults?a.prototype:a,c,b.name)}),Object.keys(a.prototype).forEach(function(d){if("computed"!==d){var e=a.prototype[d];if(d in c){if("function"==typeof c[d]&&"function"==typeof e&&c[d]._method){var f,g=e._method;g&&(e=e._method),f=b(c[d]._method,e),g&&(f._method=f),c[d]=f}}else c[d]=e._method?e._method:e}}),a=a._parent!==i?a._parent:!1;return c}function g(a,b,c){var d,e=Object.keys(a[c]);e.length&&((d=b[c])||(d=b[c]={}),e.filter(function(a){return!(a in d)}).forEach(function(b){return d[b]=a[c][b]}))}var h,i,j={_parent:!0,_component:!0},k={toPrototype:e,toOptions:f},l=c.registries;return c.keys.forEach(function(a){return j[a]=!0}),d.push(function(){i=d.Ractive}),h=k}(Sb,O,Ub,e),fh=function(a,b,c,d,e,f,g){return function h(){var i=arguments[0];void 0===i&&(i={});var j,k,l,m=this;return i=g.toOptions(i),j=function(a){e(this,j,a)},k=a(m.prototype),k.constructor=j,l={_guid:{value:c()},defaults:{value:k},extend:{value:h,writable:!0,configurable:!0},_parent:{value:m}},b(j,l),d.extend(m,k,i),f.extend(m,k),g.toPrototype(m.prototype,k,i),j.prototype=k,j}}(S,D,Ag,Ub,dh,bh,eh),gh=function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n,o;for(n=function(a){l(this,a)},o={extend:{value:j},parse:{value:k},Promise:{value:h},svg:{value:d},magic:{value:e},VERSION:{value:"0.5.8"},adaptors:{writable:!0,value:{}},components:{writable:!0,value:{}},decorators:{writable:!0,value:{}},easing:{writable:!0,value:b},events:{writable:!0,value:{}},interpolators:{writable:!0,value:c},partials:{writable:!0,value:{}},transitions:{writable:!0,value:{}}},f(n,o),n.prototype=i(g,a),n.prototype.constructor=n,n.defaults=n.prototype,m.Ractive=n;m.length;)m.pop()();var p="function";if(typeof Date.now!==p||typeof String.prototype.trim!==p||typeof Object.keys!==p||typeof Array.prototype.indexOf!==p||typeof Array.prototype.forEach!==p||typeof Array.prototype.map!==p||typeof Array.prototype.filter!==p||"undefined"!=typeof window&&typeof window.addEventListener!==p)throw new Error("It looks like you're attempting to use Ractive.js in an older browser. You'll need to use one of the 'legacy builds' in order to continue - see http://docs.ractivejs.org/latest/legacy-builds for more information.");return n}(c,d,j,k,y,D,zg,o,ve,fh,Kb,ch,e);"undefined"!=typeof module&&module.exports?module.exports=gh:"function"==typeof define&&define.amd&&define(function(){return gh}),a.Ractive=gh,gh.noConflict=function(){return a.Ractive=b,gh}}("undefined"!=typeof window?window:this);