Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/Program Files/Avast Software/Avast/gui_resources/default_av/ |
//{"name":"libs","version":"1.2.231","created":"2021-03-09T09:36:16.478Z"} var t,e,n,r,i,s,o,a,u,h,c,l,f,d,p,m,v={el:void 0,append:!1,template:{v:3,t:[]},preserveWhitespace:!1,sanitize:!1,stripComments:!0,delimiters:["{{","}}"],tripleDelimiters:["{{{","}}}"],interpolate:!1,data:{},computed:{},magic:!1,modifyArrays:!0,adapt:[],isolated:!1,twoway:!0,lazy:!1,noIntro:!1,transitionsEnabled:!0,complete:void 0,css:null,noCssTransform:!1},g={linear:function(t){return t},easeIn:function(t){return Math.pow(t,3)},easeOut:function(t){return Math.pow(t-1,3)+1},easeInOut:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)}};t="object"==typeof document,e="undefined"!=typeof navigator&&/jsDom/.test(navigator.appName),n="undefined"!=typeof console&&"function"==typeof console.warn&&"function"==typeof console.warn.apply;try{Object.defineProperty({},"test",{value:0}),r=!0}catch(uf){r=!1}function y(t){var e;if(t&&"boolean"!=typeof t)return"undefined"!=typeof window&&document&&t?t.nodeType?t:"string"==typeof t&&(!(e=document.getElementById(t))&&document.querySelector&&(e=document.querySelector(t)),e&&e.nodeType)?e:t[0]&&t[0].nodeType?t[0]:null:null}if(i={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/"},s="undefined"!=typeof document&&(document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")),o=["o","ms","moz","webkit"],a=s?function(t,e){return e&&e!==i.html?document.createElementNS(e,t):document.createElement(t)}:function(t,e){if(e&&e!==i.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(t)},t){for(h=a("div"),m=function(t){return function(e,n){return e[t](n)}},d=(c=["matches","matchesSelector"]).length;d--&&!u;)if(h[l=c[d]])u=m(l);else for(p=o.length;p--;)if(f=o[d]+l.substr(0,1).toUpperCase()+l.substring(1),h[f]){u=m(f);break}u||(u=function(t,e){var n,r,i;for((r=t.parentNode)||(h.innerHTML="",r=h,t=t.cloneNode(),h.appendChild(t)),i=(n=r.querySelectorAll(e)).length;i--;)if(n[i]===t)return!0;return!1})}else u=null;function b(t){return t&&"unknown"!=typeof t.parentNode&&t.parentNode&&t.parentNode.removeChild(t),t}function w(t){return null!=t&&t.toString?t:""}var x,k,E,_;try{Object.defineProperty({},"test",{value:0}),t&&Object.defineProperty(document.createElement("div"),"test",{value:0}),k=Object.defineProperty}catch(hf){k=function(t,e,n){t[e]=n.value}}try{try{Object.defineProperties({},{test:{value:0}})}catch(hf){throw hf}t&&Object.defineProperties(a("div"),{test:{value:0}}),E=Object.defineProperties}catch(hf){E=function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&k(t,n,e[n])}}try{Object.create(null),x=Object.create}catch(hf){_=function(){},x=function(t,e){var n;return null===t?{}:(_.prototype=t,n=new _,e&&Object.defineProperties(n,e),n)}}function A(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i,s;s=n.shift();)for(i in s)S.call(s,i)&&(t[i]=s[i]);return t}var S=Object.prototype.hasOwnProperty,C=Object.prototype.toString,O=/^\[object (?:Array|FileList)\]$/;function P(t){return"[object Array]"===C.call(t)}function T(t){return O.test(C.call(t))}function F(t,e){return null===t&&null===e||"object"!=typeof t&&"object"!=typeof e&&t===e}function R(t){return!isNaN(parseFloat(t))&&isFinite(t)}function j(t){return t&&"[object Object]"===C.call(t)}var N,D,I,L,V=function(){},M={};function U(t,e){return t.replace(/%s/g,(function(){return e.shift()}))}function W(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw t=U(t,n),new Error(t)}function z(){of.DEBUG&&N.apply(null,arguments)}function B(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];t=U(t,n),D(t,n)}function q(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];t=U(t,n),M[t]||(M[t]=!0,D(t,n))}function $(){of.DEBUG&&B.apply(null,arguments)}function Q(){of.DEBUG&&q.apply(null,arguments)}n?(L=["%cRactive.js %c0.7.3 %cin debug mode, %cmore...","color: rgb(114, 157, 52); font-weight: normal;","color: rgb(85, 85, 85); font-weight: normal;","color: rgb(85, 85, 85); font-weight: normal;","color: rgb(82, 140, 224); font-weight: normal; text-decoration: underline;"],I=function(){var t=!!console.groupCollapsed;console[t?"groupCollapsed":"log"].apply(console,L),console.log("You're running Ractive 0.7.3 in debug mode - messages will be printed to the console to help you fix problems and optimise your application.\n\nTo disable debug mode, add this line at the start of your app:\n Ractive.DEBUG = false;\n\nTo disable debug mode when your app is minified, add this snippet:\n Ractive.DEBUG = /unminified/.test(function(){/*unminified*/});\n\nGet help and support:\n http://docs.ractivejs.org\n http://stackoverflow.com/questions/tagged/ractivejs\n http://groups.google.com/forum/#!forum/ractive-js\n http://twitter.com/ractivejs\n\nFound a bug? Raise an issue:\n https://github.com/ractivejs/ractive/issues\n\n"),t&&console.groupEnd(L),I=V},D=function(t,e){if(I(),"object"==typeof e[e.length-1]){var n=e.pop(),r=n?n.ractive:null;if(r){var i,s=void 0;r.component&&(s=r.component.name)&&(t="<"+s+"> "+t),(i=n.node||r.fragment&&r.fragment.rendered&&r.find("*"))&&e.push(i)}}console.warn.apply(console,["%cRactive.js: %c"+t,"color: rgb(114, 157, 52);","color: rgb(85, 85, 85);"].concat(e))},N=function(){console.log.apply(console,arguments)}):D=N=I=V;var Z='A function was specified for "%s" %s, but no %s was returned',H=function(t,e){return'Missing "'+t+'" '+e+" plugin. You may need to download a plugin via http://docs.ractivejs.org/latest/plugins#"+e+"s"};function K(t,e,n){var r=G(t,e,n);return r?r[t][n]:null}function G(t,e,n){for(;e;){if(n in e[t])return e;if(e.isolated)return null;e=e.parent}}var Y=function(t,e,n,r){if(t===e)return J(e);if(r){var i=K("interpolators",n,r);if(i)return i(t,e)||J(e);W(H(r,"interpolator"))}return X.number(t,e)||X.array(t,e)||X.object(t,e)||J(e)};function J(t){return function(){return t}}var X={number:function(t,e){var n;return R(t)&&R(e)?(n=(e=+e)-(t=+t))?function(e){return t+e*n}:function(){return t}:null},array:function(t,e){var n,r,i,s;if(!P(t)||!P(e))return null;for(n=[],r=[],s=i=Math.min(t.length,e.length);s--;)r[s]=Y(t[s],e[s]);for(s=i;s<t.length;s+=1)n[s]=t[s];for(s=i;s<e.length;s+=1)n[s]=e[s];return function(t){for(var e=i;e--;)n[e]=r[e](t);return n}},object:function(t,e){var n,r,i,s,o;if(!j(t)||!j(e))return null;for(o in n=[],s={},i={},t)S.call(t,o)&&(S.call(e,o)?(n.push(o),i[o]=Y(t[o],e[o])):s[o]=t[o]);for(o in e)S.call(e,o)&&!S.call(t,o)&&(s[o]=e[o]);return r=n.length,function(t){for(var e,o=r;o--;)e=n[o],s[e]=i[e](t);return s}}},tt=function(t){var e,n,r,i,s,o;e=t.split("."),(n=et[e.length])||(n=function(t){var e,n,r,i,s,o,a,u,h="";if(!et[t]){for(r=[];h.length<t;)h+=1;for(e=parseInt(h,2),i=function(t){return"1"===t},s=0;s<=e;s+=1){for(n=s.toString(2);n.length<t;)n="0"+n;for(u=[],a=n.length,o=0;o<a;o++)u.push(i(n[o]));r[s]=u}et[t]=r}return et[t]}(e.length));s=[],r=function(t,n){return t?"*":e[n]},i=n.length;for(;i--;)o=n[i].map(r).join("."),s.hasOwnProperty(o)||(s.push(o),s[o]=!0);return s},et={};var nt=/\[\s*(\*|[0-9]|[1-9][0-9]+)\s*\]/g,rt=/\*/,it={},st=function(t){var e,n,r=t.split(".");this.str=t,"@"===t[0]&&(this.isSpecial=!0,this.value=(n=(e=t).slice(2),"i"===e[1]&&R(n)?+n:n)),this.firstKey=r[0],this.lastKey=r.pop(),this.isPattern=rt.test(t),this.parent=""===t?null:at(r.join(".")),this.isRoot=!t};function ot(t,e,n,r){var i=t[e];if(!i||!i.equalsOrStartsWith(r)&&i.equalsOrStartsWith(n))return t[e]=i?i.replace(n,r):r,!0}function at(t){return null==t?t:(it.hasOwnProperty(t)||(it[t]=new st(t)),it[t])}function ut(t,e){var n,r,i;for(n=e.str.split("."),i=[lt];r=n.shift();)"*"===r?i=i.reduce(s,[]):i[0]===lt?i[0]=at(r):i=i.map(ht(r));return i;function s(e,n){var r,i,s;return n.isRoot?s=[].concat(Object.keys(t.viewmodel.data),Object.keys(t.viewmodel.mappings),Object.keys(t.viewmodel.computations)):(r=t.viewmodel.wrapped[n.str],s=(i=r?r.get():t.viewmodel.get(n))?Object.keys(i):null),s&&s.forEach((function(t){"_ractive"===t&&P(i)||e.push(n.join(t))})),e}}function ht(t){return function(e){return e.join(t)}}function ct(t){return t?t.replace(nt,".$1"):""}st.prototype={equalsOrStartsWith:function(t){return t===this||this.startsWith(t)},join:function(t){return at(this.isRoot?String(t):this.str+"."+t)},replace:function(t,e){return this===t?e:this.startsWith(t)?null===e?e:at(this.str.replace(t.str+".",e.str+".")):void 0},startsWith:function(t){return!!t&&(t&&this.str.substr(0,t.str.length+1)===t.str+".")},toString:function(){throw new Error("Bad coercion")},valueOf:function(){throw new Error("Bad coercion")},wildcardMatches:function(){return this._wildcardMatches||(this._wildcardMatches=tt(this.str))}};var lt=at(""),ft=function(t,e,n){if("string"!=typeof e||!R(n))throw new Error("Bad arguments");var r,i=void 0;if(/\*/.test(e))return i={},ut(t,at(ct(e))).forEach((function(e){var r=t.viewmodel.get(e);if(!R(r))throw new Error("Cannot add to a non-numeric value");i[e.str]=r+n})),t.set(i);if(!R(r=t.get(e)))throw new Error("Cannot add to a non-numeric value");return t.set(e,+r+n)};var dt,pt=function(t,e){return ft(this,t,void 0===e?1:+e)};"undefined"==typeof window?dt=null:(!function(t,e,n){var r,i;if(!n.requestAnimationFrame){for(r=0;r<t.length&&!n.requestAnimationFrame;++r)n.requestAnimationFrame=n[t[r]+"RequestAnimationFrame"];n.requestAnimationFrame||(i=n.setTimeout,n.requestAnimationFrame=function(t){var n,r,s;return n=Date.now(),r=Math.max(0,16-(n-e)),s=i((function(){t(n+r)}),r),e=n+r,s})}}(o,0,window),dt=window.requestAnimationFrame);var mt=dt,vt="undefined"!=typeof window&&window.performance&&"function"==typeof window.performance.now?function(){return window.performance.now()}:function(){return Date.now()},gt={construct:{deprecated:"beforeInit",replacement:"onconstruct"},render:{deprecated:"init",message:'The "init" method has been deprecated and will likely be removed in a future release. You can either use the "oninit" method which will fire only once prior to, and regardless of, any eventual ractive instance being rendered, or if you need to access the rendered DOM, use "onrender" instead. See http://docs.ractivejs.org/latest/migrating for more information.'},complete:{deprecated:"complete",replacement:"oncomplete"}};function yt(t){this.event=t,this.method="on"+t,this.deprecate=gt[t]}yt.prototype.fire=function(t,e){!function(n){if(t[n])e?t[n](e):t[n]()}(this.method),e?t.fire(this.event,e):t.fire(this.event)};var bt=yt;function wt(t,e){-1===t.indexOf(e)&&t.push(e)}function xt(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]==e)return!0;return!1}function kt(t,e){var n;if(!P(t)||!P(e))return!1;if(t.length!==e.length)return!1;for(n=t.length;n--;)if(t[n]!==e[n])return!1;return!0}function Et(t){return"string"==typeof t?[t]:void 0===t?[]:t}function _t(t){return t[t.length-1]}function At(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}function St(t){for(var e=[],n=t.length;n--;)e[n]=t[n];return e}var Ct,Ot={},Pt={},Tt={};"function"==typeof Promise?Ct=Promise:((Ct=function(t){var e,n,r,i,s,o=[],a=[],u=Ot;r=(n=function(t){return function(n){u===Ot&&Rt(e=function(t,e){return function(){for(var n;n=t.shift();)n(e)}}((u=t)===Pt?o:a,n))}})(Pt),i=n(Tt);try{t(r,i)}catch(hf){i(hf)}return(s={then:function(t,n){var r=new Ct((function(i,s){var h=function(t,e,n){"function"==typeof t?e.push((function(e){var n;try{n=t(e),jt(r,n,i,s)}catch(hf){s(hf)}})):e.push(n)};h(t,o,i),h(n,a,s),u!==Ot&&Rt(e)}));return r}}).catch=function(t){return this.then(null,t)},s}).all=function(t){return new Ct((function(e,n){var r,i,s,o=[];if(t.length)for(s=function(t,i){t&&"function"==typeof t.then?t.then((function(t){o[i]=t,--r||e(o)}),n):(o[i]=t,--r||e(o))},r=i=t.length;i--;)s(t[i],i);else e(o)}))},Ct.resolve=function(t){return new Ct((function(e){e(t)}))},Ct.reject=function(t){return new Ct((function(e,n){n(t)}))});var Ft=Ct;function Rt(t){setTimeout(t,0)}function jt(t,e,n,r){var i;if(e===t)throw new TypeError("A promise's fulfillment handler cannot return the same promise");if(e instanceof Ct)e.then(n,r);else if(!e||"object"!=typeof e&&"function"!=typeof e)n(e);else{try{i=e.then}catch(uf){return void r(uf)}if("function"==typeof i){var s,o,a;o=function(e){s||(s=!0,jt(t,e,n,r))},a=function(t){s||(s=!0,r(t))};try{i.call(e,o,a)}catch(uf){if(!s)return r(uf),void(s=!0)}}else n(e)}}var Nt=function(t){do{if(void 0!==t.context)return t.context}while(t=t.parent);return lt},Dt=function(t,e,n){var r;"~/"===(e=ct(e)).substr(0,2)?(r=at(e.substring(2)),Lt(t,r.firstKey)):"."===e[0]?(r=function(t,e){var n;null!=t&&"string"!=typeof t&&(t=t.str);if("."===e)return at(t);if(n=t?t.split("."):[],"../"===e.substr(0,3)){for(;"../"===e.substr(0,3);){if(!n.length)throw new Error('Could not resolve reference - too many "../" prefixes');n.pop(),e=e.substring(3)}return n.push(e),at(n.join("."))}if(!t)return at(e.replace(/^\.\/?/,""));return at(t+e.replace(/^\.\//,"."))}(Nt(n),e))&&Lt(t,r.firstKey):r=It(t,at(e),n);return r};function It(t,e,n,r){var i,s,o,a,u;if(e.isRoot)return e;for(s=e.firstKey;n;)if(i=n.context,n=n.parent,i&&(a=!0,(o=t.viewmodel.get(i))&&("object"==typeof o||"function"==typeof o)&&s in o))return i.join(e.str);return Vt(t.viewmodel,s)?e:t.parent&&!t.isolated&&(a=!0,n=t.component.parentFragment,s=at(s),u=It(t.parent,s,n,!0))?(t.viewmodel.map(s,{origin:t.parent.viewmodel,keypath:u}),e):r||a?void 0:(t.viewmodel.set(e,void 0),e)}function Lt(t,e){var n;!t.parent||t.isolated||Vt(t.viewmodel,e)||(e=at(e),(n=It(t.parent,e,t.component.parentFragment,!0))&&t.viewmodel.map(e,{origin:t.parent.viewmodel,keypath:n}))}function Vt(t,e){return""===e||e in t.data||e in t.computations||e in t.mappings}function Mt(t){t.teardown()}function Ut(t){t.unbind()}function Wt(t){t.unrender()}function zt(t){t.cancel()}var Bt=function(t,e){this.callback=t,this.parent=e,this.intros=[],this.outros=[],this.children=[],this.totalChildren=this.outroChildren=0,this.detachQueue=[],this.decoratorQueue=[],this.outrosComplete=!1,e&&e.addChild(this)};function qt(t){t.detach()}function $t(t){t.detachNodes()}function Qt(t){!t.ready||t.outros.length||t.outroChildren||(t.outrosComplete||(t.parent?t.parent.decrementOutros(t):t.detachNodes(),t.outrosComplete=!0),t.intros.length||t.totalChildren||("function"==typeof t.callback&&t.callback(),t.parent&&t.parent.decrementTotal()))}Bt.prototype={addChild:function(t){this.children.push(t),this.totalChildren+=1,this.outroChildren+=1},decrementOutros:function(){this.outroChildren-=1,Qt(this)},decrementTotal:function(){this.totalChildren-=1,Qt(this)},add:function(t){(t.isIntro?this.intros:this.outros).push(t)},addDecorator:function(t){this.decoratorQueue.push(t)},remove:function(t){At(t.isIntro?this.intros:this.outros,t),Qt(this)},init:function(){this.ready=!0,Qt(this)},detachNodes:function(){this.decoratorQueue.forEach(Mt),this.detachQueue.forEach(qt),this.children.forEach($t)}};var Zt,Ht=Bt,Kt=[],Gt=new bt("change"),Yt={start:function(t,e){var n,r;return e&&(n=new Ft((function(t){return r=t}))),Zt={previousBatch:Zt,transitionManager:new Ht(r,Zt&&Zt.transitionManager),views:[],tasks:[],ractives:[],instance:t},t&&Zt.ractives.push(t),n},end:function(){Jt(),Zt.transitionManager.init(),!Zt.previousBatch&&Zt.instance&&(Zt.instance.viewmodel.changes=[]),Zt=Zt.previousBatch},addRactive:function(t){Zt&&wt(Zt.ractives,t)},registerTransition:function(t){t._manager=Zt.transitionManager,Zt.transitionManager.add(t)},registerDecorator:function(t){Zt.transitionManager.addDecorator(t)},addView:function(t){Zt.views.push(t)},addUnresolved:function(t){Kt.push(t)},removeUnresolved:function(t){At(Kt,t)},detachWhenReady:function(t){Zt.transitionManager.detachQueue.push(t)},scheduleTask:function(t,e){var n;if(Zt){for(n=Zt;e&&n.previousBatch;)n=n.previousBatch;n.tasks.push(t)}else t()}};function Jt(){for(var t,e,n;Zt.ractives.length;)(n=(e=Zt.ractives.pop()).viewmodel.applyChanges())&&Gt.fire(e,n);for(function(){var t,e,n,r;t=Kt.length;for(;t--;)(e=Kt[t]).keypath?Kt.splice(t,1):(n=Dt(e.root,e.ref,e.parentFragment))&&((r||(r=[])).push({item:e,keypath:n}),Kt.splice(t,1));r&&r.forEach(Xt)}(),t=0;t<Zt.views.length;t+=1)Zt.views[t].update();for(Zt.views.length=0,t=0;t<Zt.tasks.length;t+=1)Zt.tasks[t]();if(Zt.tasks.length=0,Zt.ractives.length)return Jt()}function Xt(t){t.item.resolve(t.keypath)}var te=[],ee={tick:function(){var t,e;for(e=vt(),Yt.start(),t=0;t<te.length;t+=1)te[t].tick(e)||te.splice(t--,1);Yt.end(),te.length?mt(ee.tick):ee.running=!1},add:function(t){te.push(t),ee.running||(ee.running=!0,mt(ee.tick))},abort:function(t,e){for(var n,r=te.length;r--;)(n=te[r]).root===e&&n.keypath===t&&n.stop()}},ne=ee,re=function(t){var e;for(e in this.startTime=Date.now(),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this.interpolator=Y(this.from,this.to,this.root,this.interpolator),this.running=!0,this.tick()};re.prototype={tick:function(){var t,e,n,r,i;return i=this.keypath,!!this.running&&((t=Date.now()-this.startTime)>=this.duration?(null!==i&&(Yt.start(this.root),this.root.viewmodel.set(i,this.to),Yt.end()),this.step&&this.step(1,this.to),this.complete(this.to),-1===(r=this.root._animations.indexOf(this))&&$("Animation was not found"),this.root._animations.splice(r,1),this.running=!1,!1):(e=this.easing?this.easing(t/this.duration):t/this.duration,null!==i&&(n=this.interpolator(e),Yt.start(this.root),this.root.viewmodel.set(i,n),Yt.end()),this.step&&this.step(e,n),!0))},stop:function(){var t;this.running=!1,-1===(t=this.root._animations.indexOf(this))&&$("Animation was not found"),this.root._animations.splice(t,1)}};var ie=re,se=function(t,e,n){var r,i,s,o,a,u,h,c,l,f,d,p,m,v;if(r=new Ft((function(t){return i=t})),"object"==typeof t){for(s in u=(n=e||{}).easing,h=n.duration,a=[],c=n.step,l=n.complete,(c||l)&&(d={},n.step=null,n.complete=null,f=function(t){return function(e,n){d[t]=n}}),t)t.hasOwnProperty(s)&&((c||l)&&(p=f(s),n={easing:u,duration:h},c&&(n.step=p)),n.complete=l?p:V,a.push(ae(this,s,t[s],n)));return v={easing:u,duration:h},c&&(v.step=function(t){return c(t,d)}),l&&r.then((function(t){return l(t,d)})),v.complete=i,m=ae(this,null,null,v),a.push(m),r.stop=function(){for(var t;t=a.pop();)t.stop();m&&m.stop()},r}(n=n||{}).complete&&r.then(n.complete);return n.complete=i,o=ae(this,t,e,n),r.stop=function(){return o.stop()},r},oe={stop:V};function ae(t,e,n,r){var i,s,o,a;return e&&(e=at(ct(e))),null!==e&&(a=t.viewmodel.get(e)),ne.abort(e,t),F(a,n)?(r.complete&&r.complete(r.to),oe):(r.easing&&"function"!=typeof(i="function"==typeof r.easing?r.easing:t.easing[r.easing])&&(i=null),s=void 0===r.duration?400:r.duration,o=new ie({keypath:e,from:a,to:n,root:t,duration:s,easing:i,interpolator:r.interpolator,step:r.step,complete:r.complete}),ne.add(o),t._animations.push(o),o)}var ue=function(){if(this.detached)return this.detached;this.el&&At(this.el.__ractive_instances__,this);return this.detached=this.fragment.detach(),he.fire(this),this.detached},he=new bt("detach");var ce=function(t){if(!this.el)return null;return this.fragment.find(t)};var le=function(t,e){var n;n=this._isComponentQuery?!this.selector||t.name===this.selector:t.node?u(t.node,this.selector):null;if(n)return this.push(t.node||t.instance),e||this._makeDirty(),!0};var fe=function(){var t,e,n;t=this._root[this._isComponentQuery?"liveComponentQueries":"liveQueries"],e=this.selector,-1!==(n=t.indexOf(e))&&(t.splice(n,1),t[e]=null)},de=function(t,e){var n,r,i,s,o,a,u,h;for(n=me(t.component||t._ractive.proxy),r=me(e.component||e._ractive.proxy),i=_t(n),s=_t(r);i&&i===s;)n.pop(),r.pop(),o=i,i=_t(n),s=_t(r);if(i=i.component||i,s=s.component||s,(u=i.parentFragment)===(h=s.parentFragment))return u.items.indexOf(i)-h.items.indexOf(s)||n.length-r.length;if(a=o.fragments)return a.indexOf(u)-a.indexOf(h)||n.length-r.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!")};function pe(t){var e;return(e=t.parentFragment)||t.component&&(e=t.component.parentFragment)?e.owner:void 0}function me(t){var e,n;for(e=[t],n=pe(t);n;)e.push(n),n=pe(n);return e}var ve=function(t,e){return t.compareDocumentPosition?2&t.compareDocumentPosition(e)?1:-1:de(t,e)},ge=function(){this.sort(this._isComponentQuery?de:ve),this._dirty=!1},ye=function(){var t=this;this._dirty||(this._dirty=!0,Yt.scheduleTask((function(){t._sort()})))},be=function(t){var e=this.indexOf(this._isComponentQuery?t.instance:t);-1!==e&&this.splice(e,1)},we=function(t,e,n,r){var i=[];if(E(i,{selector:{value:e},live:{value:n},_isComponentQuery:{value:r},_test:{value:le}}),!n)return i;return E(i,{cancel:{value:fe},_root:{value:t},_sort:{value:ge},_makeDirty:{value:ye},_remove:{value:be},_dirty:{value:!1,writable:!0}}),i};var xe=function(t,e){var n,r;if(!this.el)return[];if(e=e||{},n=this._liveQueries,r=n[t])return e&&e.live?r:r.slice();(r=we(this,t,!!e.live,!1)).live&&(n.push(t),n["_"+t]=r);return this.fragment.findAll(t,r),r};var ke=function(t,e){var n,r;if(e=e||{},n=this._liveComponentQueries,r=n[t])return e&&e.live?r:r.slice();(r=we(this,t,!!e.live,!0)).live&&(n.push(t),n["_"+t]=r);return this.fragment.findAllComponents(t,r),r};var Ee=function(t){return this.fragment.findComponent(t)};var _e=function(t){if(this.container)return this.container.component&&this.container.component.name===t?this.container:this.container.findContainer(t);return null};var Ae=function(t){if(this.parent)return this.parent.component&&this.parent.component.name===t?this.parent:this.parent.findParent(t);return null};var Se={enqueue:function(t,e){t.event&&(t._eventQueue=t._eventQueue||[],t._eventQueue.push(t.event)),t.event=e},dequeue:function(t){t._eventQueue&&t._eventQueue.length?t.event=t._eventQueue.pop():delete t.event}},Ce=function(t,e){var n=void 0===arguments[2]?{}:arguments[2];if(!e)return;n.event?n.event.name=e:n.event={name:e,_noArg:!0};var r=at(e).wildcardMatches();Oe(t,r,n.event,n.args,!0)};function Oe(t,e,n,r){var i,s,o=void 0!==arguments[4]&&arguments[4],a=!0;for(Se.enqueue(t,n),s=e.length;s>=0;s--)(i=t._subs[e[s]])&&(a=Pe(t,i,n,r)&&a);if(Se.dequeue(t),t.parent&&a){if(o&&t.component){var u=t.component.name+"."+e[e.length-1];e=at(u).wildcardMatches(),n&&(n.component=t)}Oe(t.parent,e,n,r)}}function Pe(t,e,n,r){var i=null,s=!1;n&&!n._noArg&&(r=[n].concat(r));for(var o=0,a=(e=e.slice()).length;o<a;o+=1)!1===e[o].apply(t,r)&&(s=!0);return n&&!n._noArg&&s&&(i=n.original)&&(i.preventDefault&&i.preventDefault(),i.stopPropagation&&i.stopPropagation()),!s}var Te=function(t){var e={args:Array.prototype.slice.call(arguments,1)};Ce(this,t,e)};var Fe=function(t){var e;t=at(ct(t)),void 0===(e=this.viewmodel.get(t,Re))&&this.parent&&!this.isolated&&Dt(this,t.str,this.component.parentFragment)&&(e=this.viewmodel.get(t));return e},Re={capture:!0,noUnwrap:!0,fullRootGet:!0};var je=function(t,e){if(!this.fragment.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(t=y(t),e=y(e)||null,!t)throw new Error("You must specify a valid target to insert into");t.insertBefore(this.detach(),e),this.el=t,(t.__ractive_instances__||(t.__ractive_instances__=[])).push(this),this.detached=null,De(this)},Ne=new bt("insert");function De(t){Ne.fire(t),t.findAllComponents("*").forEach((function(t){De(t.instance)}))}var Ie=function(t,e,n){var r,i;if(t=at(ct(t)),!P(r=this.viewmodel.get(t))||!P(e))return this.set(t,e,n&&n.complete);return i=Yt.start(this,!0),this.viewmodel.merge(t,r,e,n),Yt.end(),i};var Le=function(t,e,n,r){this.root=t,this.keypath=e,this.callback=n,this.defer=r.defer,this.context=r&&r.context?r.context:t};Le.prototype={init:function(t){this.value=this.root.get(this.keypath.str),!1!==t?this.update():this.oldValue=this.value},setValue:function(t){var e=this;F(t,this.value)||(this.value=t,this.defer&&this.ready?Yt.scheduleTask((function(){return e.update()})):this.update())},update:function(){this.updating||(this.updating=!0,this.callback.call(this.context,this.value,this.oldValue,this.keypath.str),this.oldValue=this.value,this.updating=!1)}};var Ve=Le,Me=function(t,e){var n,r;return n=ut(t,e),r={},n.forEach((function(e){r[e.str]=t.get(e.str)})),r};var Ue,We=Array.prototype.slice;(Ue=function(t,e,n,r){this.root=t,this.callback=n,this.defer=r.defer,this.keypath=e,this.regex=new RegExp("^"+e.str.replace(/\./g,"\\.").replace(/\*/g,"([^\\.]+)")+"$"),this.values={},this.defer&&(this.proxies=[]),this.context=r&&r.context?r.context:t}).prototype={init:function(t){var e,n;if(e=Me(this.root,this.keypath),!1!==t)for(n in e)e.hasOwnProperty(n)&&this.update(at(n));else this.values=e},update:function(t){var e,n=this;if(t.isPattern)for(t in e=Me(this.root,t))e.hasOwnProperty(t)&&this.update(at(t));else this.root.viewmodel.implicitChanges[t.str]||(this.defer&&this.ready?Yt.scheduleTask((function(){return n.getProxy(t).update()})):this.reallyUpdate(t))},reallyUpdate:function(t){var e,n,r,i;e=t.str,n=this.root.viewmodel.get(t),this.updating?this.values[e]=n:(this.updating=!0,F(n,this.values[e])&&this.ready||(r=We.call(this.regex.exec(e),1),i=[n,this.values[e],e].concat(r),this.values[e]=n,this.callback.apply(this.context,i)),this.updating=!1)},getProxy:function(t){var e=this;return this.proxies[t.str]||(this.proxies[t.str]={update:function(){return e.reallyUpdate(t)}}),this.proxies[t.str]}};var ze=Ue,Be=function(t,e,n,r){var i,s,o;e=at(ct(e)),r=r||qe,e.isPattern?(i=new ze(t,e,n,r),t.viewmodel.patternObservers.push(i),s=!0):i=new Ve(t,e,n,r);i.init(r.init),t.viewmodel.register(e,i,s?"patternObservers":"observers"),i.ready=!0;var a={cancel:function(){var n;o||(s?(n=t.viewmodel.patternObservers.indexOf(i),t.viewmodel.patternObservers.splice(n,1),t.viewmodel.unregister(e,i,"patternObservers")):t.viewmodel.unregister(e,i,"observers"),o=!0)}};return t._observers.push(a),a},qe={};var $e=function(t,e,n){var r,i,s,o;if(j(t)){for(t in n=e,r=[],i=t)i.hasOwnProperty(t)&&(e=i[t],r.push(this.observe(t,e,n)));return{cancel:function(){for(;r.length;)r.pop().cancel()}}}if("function"==typeof t)return n=e,e=t,Be(this,t="",e,n);if(1===(s=t.split(" ")).length)return Be(this,t,e,n);r=[],o=s.length;for(;o--;)(t=s[o])&&r.push(Be(this,t,e,n));return{cancel:function(){for(;r.length;)r.pop().cancel()}}};var Qe=function(t,e,n){var r=this.observe(t,(function(){e.apply(this,arguments),r.cancel()}),{init:!1,defer:n&&n.defer});return r};var Ze=function(t){return t.trim()},He=function(t){return""!==t},Ke=function(t,e){var n=this;if(t)t.split(" ").map(Ze).filter(He).forEach((function(t){var r,i;(r=n._subs[t])&&(e?-1!==(i=r.indexOf(e))&&r.splice(i,1):n._subs[t]=[])}));else for(t in this._subs)delete this._subs[t];return this};var Ge=function(t,e){var n,r,i=this;if("object"==typeof t){for(r in n=[],t)t.hasOwnProperty(r)&&n.push(this.on(r,t[r]));return{cancel:function(){for(var t;t=n.pop();)t.cancel()}}}return t.split(" ").map(Ze).filter(He).forEach((function(t){(i._subs[t]||(i._subs[t]=[])).push(e)})),{cancel:function(){return i.off(t,e)}}};var Ye=function(t,e){var n=this.on(t,(function(){e.apply(this,arguments),n.cancel()}));return n};var Je=function(t,e,n){var r,i,s,o,a,u,h=[];if(!(r=function(t,e,n){switch(e){case"splice":for(void 0!==n[0]&&n[0]<0&&(n[0]=t.length+Math.max(n[0],-t.length));n.length<2;)n.push(0);return n[1]=Math.min(n[1],t.length-n[0]),n;case"sort":case"reverse":return null;case"pop":return t.length?[t.length-1,1]:[0,0];case"push":return[t.length,0].concat(n);case"shift":return[0,t.length?1:0];case"unshift":return[0,0].concat(n)}}(t,e,n)))return null;for(i=t.length,a=r.length-2-r[1],s=Math.min(i,r[0]),o=s+r[1],u=0;u<s;u+=1)h.push(u);for(;u<o;u+=1)h.push(-1);for(;u<i;u+=1)h.push(u+a);h.touchedFrom=0!==a?r[0]:t.length;return h};var Xe,tn,en,nn,rn,sn,on=Array.prototype,an=function(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s,o,a,u=[];if(e=at(ct(e)),(s=this.viewmodel.get(e)).length,!P(s))throw new Error("Called ractive."+t+"('"+e.str+"'), but '"+e.str+"' does not refer to an array");return u=Je(s,t,r),a=on[t].apply(s,r),o=Yt.start(this,!0).then((function(){return a})),u?this.viewmodel.smartUpdate(e,s,u):this.viewmodel.mark(e),Yt.end(),o}},un=an("pop"),hn=an("push"),cn=[],ln=!1;t?((en=document.createElement("style")).type="text/css",nn=document.getElementsByTagName("head")[0],sn=!1,rn=en.styleSheet,tn=function(){var t="/* Ractive.js component styles */\n"+cn.map((function(t){return"\n/* {"+t.id+"} */\n"+t.styles})).join("\n");rn?rn.cssText=t:en.innerHTML=t,sn||(nn.appendChild(en),sn=!0)},Xe={add:function(t){cn.push(t),ln=!0},apply:function(){ln&&(tn(),ln=!1)}}):Xe={add:V,apply:V};var fn=Xe,dn=function(t,e){var n,r,i,s=this;i=this.transitionsEnabled,this.noIntro&&(this.transitionsEnabled=!1);if(n=Yt.start(this,!0),Yt.scheduleTask((function(){return pn.fire(s)}),!0),this.fragment.rendered)throw new Error("You cannot call ractive.render() on an already rendered instance! Call ractive.unrender() first");if(t=y(t)||this.el,e=y(e)||this.anchor,this.el=t,this.anchor=e,!this.append&&t){var o=t.__ractive_instances__;o&&o.length&&function(t){t.splice(0,t.length).forEach(Mt)}(o),t.innerHTML=""}this.cssId&&fn.apply();t&&((r=t.__ractive_instances__)?r.push(this):t.__ractive_instances__=[this],e?t.insertBefore(this.fragment.render(),e):t.appendChild(this.fragment.render()));return Yt.end(),this.transitionsEnabled=i,n.then((function(){return mn.fire(s)}))},pn=new bt("render"),mn=new bt("complete");var vn={extend:function(t,e,n){e.adapt=function(t,e){var n=t.slice(),r=e.length;for(;r--;)~n.indexOf(e[r])||n.push(e[r]);return n}(e.adapt,Et(n.adapt))},init:function(){}};var gn=function(t,e){var n,r,i;r='[data-ractive-css~="{'+e+'}"]',i=function(t){var e,n,i,s,o,a,u,h=[];for(e=[];n=wn.exec(t);)e.push({str:n[0],base:n[1],modifiers:n[2]});for(s=e.map(_n),u=e.length;u--;)a=s.slice(),i=e[u],a[u]=i.base+r+i.modifiers||"",(o=s.slice())[u]=r+" "+o[u],h.push(a.join(" "),o.join(" "));return h.join(", ")},n=kn.test(t)?t.replace(kn,r):t.replace(bn,"").replace(yn,(function(t,e){var n;return xn.test(e)?t:(n=e.split(",").map(En).map(i).join(", ")+" ",t.replace(e,n))}));return n},yn=/(?:^|\})?\s*([^\{\}]+)\s*\{/g,bn=/\/\*.*?\*\//g,wn=/((?:(?:\[[^\]+]\])|(?:[^\s\+\>\~:]))+)((?::[^\s\+\>\~\(]+(?:\([^\)]+\))?)?\s*[\s\+\>\~]?)\s*/g,xn=/^@media/,kn=/\[data-ractive-css~="\{[a-z0-9-]+\}"]/g;function En(t){return t.trim?t.trim():t.replace(/^\s+/,"").replace(/\s+$/,"")}function _n(t){return t.str}var An=1,Sn={name:"css",extend:function(t,e,n){if(n.css){var r=An++,i=n.noCssTransform?n.css:gn(n.css,r);e.cssId=r,fn.add({id:r,styles:i})}},init:function(){}};var Cn={name:"data",extend:function(t,e,n){var r=void 0,i=void 0;if(n.data&&j(n.data))for(r in n.data)(i=n.data[r])&&"object"==typeof i&&(j(i)||P(i))&&$("Passing a `data` option with object and array properties to Ractive.extend() is discouraged, as mutating them is likely to cause bugs. Consider using a data function instead:\n\n // this...\n data: function () {\n return {\n myObject: {}\n };\n })\n\n // instead of this:\n data: {\n myObject: {}\n }");e.data=On(e.data,n.data)},init:function(t,e,n){var r=On(t.prototype.data,n.data);return"function"==typeof r&&(r=r.call(e)),r||{}},reset:function(t){var e=this.init(t.constructor,t,t.viewmodel);return t.viewmodel.reset(e),!0}};function On(t,e){var n;(n=e)&&n.constructor!==Object&&("function"==typeof n||("object"!=typeof n?W("data option must be an object or a function, `"+n+"` is not valid"):$("If supplied, options.data should be a plain JavaScript object - using a non-POJO as the root object may work, but is discouraged")));var r="function"==typeof t,i="function"==typeof e;return e||r||(e={}),r||i?function(){return Tn(i?Pn(e,this):e,r?Pn(t,this):t)}:Tn(e,t)}function Pn(t,e){var n=t.call(e);if(n)return"object"!=typeof n&&W("Data function must return an object"),n.constructor!==Object&&Q("Data function returned something other than a plain JavaScript object. This might work, but is strongly discouraged"),n}function Tn(t,e){if(t&&e){for(var n in e)n in t||(t[n]=e[n]);return t}return t||e}var Fn,Rn,jn=/^\s+/;(Rn=function(t){this.name="ParseError",this.message=t;try{throw new Error(t)}catch(uf){this.stack=uf.stack}}).prototype=Error.prototype,(Fn=function(t,e){var n,r,i=0;for(this.str=t,this.options=e||{},this.pos=0,this.lines=this.str.split("\n"),this.lineEnds=this.lines.map((function(t){var e=i+t.length+1;return i=e,e}),0),this.init&&this.init(t,e),n=[];this.pos<this.str.length&&(r=this.read());)n.push(r);this.leftover=this.remaining(),this.result=this.postProcess?this.postProcess(n,e):n}).prototype={read:function(t){var e,n,r,i;for(t||(t=this.converters),e=this.pos,r=t.length,n=0;n<r;n+=1)if(this.pos=e,i=t[n](this))return i;return null},getLinePos:function(t){for(var e=0,n=0;t>=this.lineEnds[e];)n=this.lineEnds[e],e+=1;return[e+1,t-n+1,t]},error:function(t){var e=this.getLinePos(this.pos),n=e[0],r=e[1],i=this.lines[e[0]-1],s=0,o=i.replace(/\t/g,(function(t,n){return n<e[1]&&(s+=1)," "}))+"\n"+new Array(e[1]+s).join(" ")+"^----",a=new Rn(t+" at line "+n+" character "+r+":\n"+o);throw a.line=e[0],a.character=e[1],a.shortMessage=t,a},matchString:function(t){if(this.str.substr(this.pos,t.length)===t)return this.pos+=t.length,t},matchPattern:function(t){var e;if(e=t.exec(this.remaining()))return this.pos+=e[0].length,e[1]||e[0]},allowWhitespace:function(){this.matchPattern(jn)},remaining:function(){return this.str.substring(this.pos)},nextChar:function(){return this.str.charAt(this.pos)}},Fn.extend=function(t){var e,n;for(n in(e=function(t,e){Fn.call(this,t,e)}).prototype=x(this.prototype),t)S.call(t,n)&&(e.prototype[n]=t[n]);return e.extend=Fn.extend,e};var Nn=Fn,Dn=function(t){var e,n,r;if(!t.matchString("="))return null;if(e=t.pos,t.allowWhitespace(),!(n=t.matchPattern(In)))return t.pos=e,null;if(!t.matchPattern(Ln))return null;if(!(r=t.matchPattern(In)))return t.pos=e,null;if(t.allowWhitespace(),!t.matchString("="))return t.pos=e,null;return[n,r]},In=/^[^\s=]+/,Ln=/^\s+/;var Vn=function(t){var e;if(e=t.matchPattern(Mn))return{t:25,v:e};return null},Mn=/^(\/(?:[^\n\r\u2028\u2029/\\[]|\\.|\[(?:[^\n\r\u2028\u2029\]\\]|\\.)*])+\/(?:([gimuy])(?![a-z]*\2))*(?![a-zA-Z_$0-9]))/;var Un=function(t){var e,n;if(!1===t.interpolate[t.inside])return null;for(n=0;n<t.tags.length;n+=1)if(e=zn(t,t.tags[n]))return e},Wn={t:10,exclude:!0};function zn(t,e){var n,r,i;if(n=t.pos,t.matchString("\\"+e.open)){if(0===n||"\\"!==t.str[n-1])return e.open}else if(!t.matchString(e.open))return null;if(r=Dn(t))return t.matchString(e.close)?(e.open=r[0],e.close=r[1],t.sortMustacheTags(),Wn):null;if(t.allowWhitespace(),t.matchString("/")){t.pos-=1;var s=t.pos;Vn(t)?t.pos=s:(t.pos=s-e.close.length,t.error("Attempted to close a section that wasn't open"))}for(i=0;i<e.readers.length;i+=1)if(r=(0,e.readers[i])(t,e))return e.isStatic&&(r.s=!0),t.includeLinePositions&&(r.p=t.getLinePos(n)),r;return t.pos=n,null}var Bn="Expected a JavaScript expression",qn=function(t){var e;if(e=t.matchPattern($n))return{t:20,v:e};return null},$n=/^(?:[+-]?)0*(?:(?:(?:[1-9]\d*)?\.\d+)|(?:(?:0|[1-9]\d*)\.)|(?:0|[1-9]\d*))(?:[eE][+-]?\d+)?/;var Qn,Zn,Hn,Kn=function(t){var e=t.remaining();if("true"===e.substr(0,4))return t.pos+=4,{t:24,v:"true"};if("false"===e.substr(0,5))return t.pos+=5,{t:24,v:"false"};return null};Qn=/^(?=.)[^"'\\]+?(?:(?!.)|(?=["'\\]))/,Zn=/^\\(?:['"\\bfnrt]|0(?![0-9])|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|(?=.)[^ux0-9])/,Hn=/^\\(?:\r\n|[\u000A\u000D\u2028\u2029])/;var Gn=function(t){return function(e){var n,r,i;for(e.pos,n='"',r=!1;!r;)(i=e.matchPattern(Qn)||e.matchPattern(Zn)||e.matchString(t))?n+='"'===i?'\\"':"\\'"===i?"'":i:(i=e.matchPattern(Hn))?n+="\\u"+("000"+i.charCodeAt(1).toString(16)).slice(-4):r=!0;return n+='"',JSON.parse(n)}},Yn=Gn('"'),Jn=Gn("'"),Xn=function(t){var e,n;return e=t.pos,t.matchString('"')?(n=Jn(t),t.matchString('"')?{t:21,v:n}:(t.pos=e,null)):t.matchString("'")?(n=Yn(t),t.matchString("'")?{t:21,v:n}:(t.pos=e,null)):null},tr=/^[a-zA-Z_$][a-zA-Z_$0-9]*/,er=function(t){var e;if(e=Xn(t))return nr.test(e.v)?e.v:'"'+e.v.replace(/"/g,'\\"')+'"';if(e=qn(t))return e.v;if(e=t.matchPattern(tr))return e},nr=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;var rr=function(t){var e,n,r;if(e=t.pos,t.allowWhitespace(),null===(n=er(t)))return t.pos=e,null;if(t.allowWhitespace(),!t.matchString(":"))return t.pos=e,null;if(t.allowWhitespace(),null===(r=Er(t)))return t.pos=e,null;return{t:27,k:n,v:r}};var ir=function t(e){var n,r,i,s;if(n=e.pos,null===(i=rr(e)))return null;if(r=[i],e.matchString(","))return(s=t(e))?r.concat(s):(e.pos=n,null);return r};var sr=function t(e){var n,r,i;if(e.pos,e.allowWhitespace(),null===(r=Er(e)))return null;n=[r],e.allowWhitespace(),e.matchString(",")&&(null===(i=t(e))&&e.error(Bn),i.forEach((function(t){n.push(t)})));return n};var or=function(t){return qn(t)||Kn(t)||Xn(t)||function(t){var e,n;return e=t.pos,t.allowWhitespace(),t.matchString("{")?(n=ir(t),t.allowWhitespace(),t.matchString("}")?{t:23,m:n}:(t.pos=e,null)):(t.pos=e,null)}(t)||function(t){var e,n;return e=t.pos,t.allowWhitespace(),t.matchString("[")?(n=sr(t),t.matchString("]")?{t:22,m:n}:(t.pos=e,null)):(t.pos=e,null)}(t)||Vn(t)};var ar,ur,hr=function(t){var e,n,r,i,s,o;e=t.pos,(r=t.matchPattern(/^@(?:keypath|index|key)/))||(n=t.matchPattern(cr)||"",(r=!n&&t.relaxedNames&&t.matchPattern(fr)||t.matchPattern(lr))||"."!==n||(n="",r="."));if(!r)return null;if(!n&&!t.relaxedNames&&ur.test(r))return t.pos=e,null;if(!n&&ar.test(r))return i=ar.exec(r)[0],t.pos=e+i.length,{t:26,v:i};s=(n||"")+ct(r),t.matchString("(")&&(-1!==(o=s.lastIndexOf("."))?(s=s.substr(0,o),t.pos=e+s.length):t.pos-=1);return{t:30,n:s.replace(/^this\./,"./").replace(/^this$/,".")}},cr=/^(?:~\/|(?:\.\.\/)+|\.\/(?:\.\.\/)*|\.)/;ar=/^(?:Array|console|Date|RegExp|decodeURIComponent|decodeURI|encodeURIComponent|encodeURI|isFinite|isNaN|parseFloat|parseInt|JSON|Math|NaN|undefined|null)\b/,ur=/^(?: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)$/;var lr=/^[a-zA-Z$_0-9]+(?:(?:\.[a-zA-Z$_0-9]+)|(?:\[[0-9]+\]))*/,fr=/^[a-zA-Z_$][-a-zA-Z_$0-9]*/;var dr=function(t){var e;if(t.pos,!t.matchString("("))return null;t.allowWhitespace(),(e=Er(t))||t.error(Bn);t.allowWhitespace(),t.matchString(")")||t.error("Expected closing paren");return{t:34,x:e}};var pr=function(t){var e,n;if(t.pos,t.allowWhitespace(),t.matchString(".")){if(t.allowWhitespace(),e=t.matchPattern(tr))return{t:31,n:e};t.error("Expected a property name")}if(t.matchString("["))return t.allowWhitespace(),(n=Er(t))||t.error(Bn),t.allowWhitespace(),t.matchString("]")||t.error("Expected ']'"),{t:31,x:n};return null};var mr,vr,gr=function(t){var e,n,r;if(!(e=function(t){return or(t)||hr(t)||dr(t)}(t)))return null;for(;e;)if(t.pos,n=pr(t))e={t:32,x:e,r:n};else{if(!t.matchString("("))break;t.allowWhitespace(),r=sr(t),t.allowWhitespace(),t.matchString(")")||t.error("Expected closing paren"),e={t:40,x:e},r&&(e.o=r)}return e};vr=function(t,e){return function(n){var r;return(r=e(n))?r:n.matchString(t)?(n.allowWhitespace(),(r=Er(n))||n.error(Bn),{s:t,o:r,t:33}):null}},function(){var t,e,n,r;for(n="! ~ + - typeof".split(" "),r=gr,t=0,e=n.length;t<e;t+=1)r=vr(n[t],r);mr=r}();var yr,br,wr=mr;br=function(t,e){return function(n){var r,i,s;if(!(i=e(n)))return null;for(;;){if(r=n.pos,n.allowWhitespace(),!n.matchString(t))return n.pos=r,i;if("in"===t&&/[a-zA-Z_$0-9]/.test(n.remaining().charAt(0)))return n.pos=r,i;if(n.allowWhitespace(),!(s=e(n)))return n.pos=r,i;i={t:36,s:t,o:[i,s]}}}},function(){var t,e,n,r;for(n="* / % + - << >> >>> < <= > >= in instanceof == != === !== & ^ | && ||".split(" "),r=wr,t=0,e=n.length;t<e;t+=1)r=br(n[t],r);yr=r}();var xr=yr,kr=function(t){var e,n,r,i;if(!(n=xr(t)))return null;if(e=t.pos,t.allowWhitespace(),!t.matchString("?"))return t.pos=e,n;t.allowWhitespace(),(r=Er(t))||t.error(Bn);t.allowWhitespace(),t.matchString(":")||t.error('Expected ":"');t.allowWhitespace(),(i=Er(t))||t.error(Bn);return{t:35,o:[n,r,i]}};var Er=function(t){return kr(t)};var _r=function(t){var e;return Ar(t,e=[]),{r:e,s:n(t)};function n(t){switch(t.t){case 24:case 26:case 20:case 25:return t.v;case 21:return JSON.stringify(String(t.v));case 22:return"["+(t.m?t.m.map(n).join(","):"")+"]";case 23:return"{"+(t.m?t.m.map(n).join(","):"")+"}";case 27:return t.k+":"+n(t.v);case 33:return("typeof"===t.s?"typeof ":t.s)+n(t.o);case 36:return n(t.o[0])+("in"===t.s.substr(0,2)?" "+t.s+" ":t.s)+n(t.o[1]);case 40:return n(t.x)+"("+(t.o?t.o.map(n).join(","):"")+")";case 34:return"("+n(t.x)+")";case 32:return n(t.x)+n(t.r);case 31:return t.n?"."+t.n:"["+n(t.x)+"]";case 35:return n(t.o[0])+"?"+n(t.o[1])+":"+n(t.o[2]);case 30:return"_"+e.indexOf(t.n);default:throw new Error("Expected legal JavaScript")}}};function Ar(t,e){var n,r;if(30===t.t&&-1===e.indexOf(t.n)&&e.unshift(t.n),r=t.o||t.m)if(j(r))Ar(r,e);else for(n=r.length;n--;)Ar(r[n],e);t.x&&Ar(t.x,e),t.r&&Ar(t.r,e),t.v&&Ar(t.v,e)}var Sr=function(t,e){var n;if(t){for(;34===t.t&&t.x;)t=t.x;return 30===t.t?e.r=t.n:20===t.t&&Cr.test(t.v)?e.r=t.v:(n=function(t){var e,n=[];for(;32===t.t&&31===t.r.t;)(e=t.r).x?30===e.x.t?n.unshift(e.x):n.unshift(_r(e.x)):n.unshift(e.n),t=t.x;if(30!==t.t)return null;return{r:t.n,m:n}}(t))?e.rx=n:e.x=_r(t),e}},Cr=/^[0-9][1-9]*$/;var Or=function(t,e){var n,r=Er(t);if(!r)return null;t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'");return Sr(r,n={t:3}),n};var Pr=function(t,e){var n,r;if(!t.matchString("&"))return null;if(t.allowWhitespace(),!(n=Er(t)))return null;t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'");return Sr(n,r={t:3}),r};var Tr=function(t,e){var n,r,i;if(t.pos,!t.matchString(">"))return null;if(t.allowWhitespace(),t.pos,t.relaxedNames=!0,n=Er(t),t.relaxedNames=!1,t.allowWhitespace(),r=Er(t),t.allowWhitespace(),!n)return null;Sr(n,i={t:8}),t.allowWhitespace(),r&&Sr(r,i={t:4,n:53,f:[i]});t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'");return i};var Fr=function(t,e){var n;if(!t.matchString("!"))return null;if(-1!==(n=t.remaining().indexOf(e.close)))return t.pos+=n+e.close.length,{t:9}};var Rr=function(t,e){var n,r,i;if(n=t.pos,!(r=Er(t)))return null;for(i=0;i<e.length;i+=1)if(t.remaining().substr(0,e[i].length)===e[i])return r;return t.pos=n,hr(t)};var jr=function(t,e){var n,r,i,s;n=t.pos;try{r=Rr(t,[e.close])}catch(uf){s=uf}if(!r){if("!"===t.str.charAt(n))return t.pos=n,null;if(s)throw s}if(!t.matchString(e.close)&&(t.error("Expected closing delimiter '"+e.close+"' after reference"),!r)){if("!"===t.nextChar())return null;t.error("Expected expression or legal reference")}return Sr(r,i={t:2}),i};var Nr=function(t,e){var n,r;if(!t.matchPattern(Dr))return null;t.pos,n=t.matchPattern(/^[a-zA-Z_$][a-zA-Z_$0-9\-]*/),t.allowWhitespace(),t.matchString(e.close)||t.error("expected legal partial name");r={t:16},n&&(r.n=n);return r},Dr=/^yield\s*/;var Ir=function(t,e){var n,r,i,s;if(n=t.pos,!t.matchString(e.open))return null;if(t.allowWhitespace(),!t.matchString("/"))return t.pos=n,null;if(t.allowWhitespace(),r=t.remaining(),-1!==(i=r.indexOf(e.close)))return s={t:6,r:r.substr(0,i).split(" ")[0]},t.pos+=i,t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'"),s;return t.pos=n,null};var Lr=function(t,e){var n=t.pos;if(!t.matchString(e.open))return null;if(!t.matchPattern(Vr))return t.pos=n,null;t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'");return{t:60}},Vr=/^\s*else\s*/;var Mr=function(t,e){var n,r=t.pos;if(!t.matchString(e.open))return null;if(!t.matchPattern(Ur))return t.pos=r,null;n=Er(t),t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'");return{t:61,x:n}},Ur=/^\s*elseif\s+/;var Wr={each:52,if:50,"if-with":54,with:53,unless:51},zr=function(t,e){var n,r,i,s,o,a,u,h,c,l,f,d;if(n=t.pos,t.matchString("^"))i={t:4,f:[],n:51};else{if(!t.matchString("#"))return null;i={t:4,f:[]},t.matchString("partial")&&(t.pos=n-t.standardDelimiters[0].length,t.error("Partial definitions can only be at the top level of the template, or immediately inside components")),(u=t.matchPattern($r))&&(d=u,i.n=Wr[u])}t.allowWhitespace(),(r=Er(t))||t.error("Expected expression");if(f=t.matchPattern(Br)){var p;(p=t.matchPattern(qr))?i.i=f+","+p:i.i=f}t.allowWhitespace(),t.matchString(e.close)||t.error("Expected closing delimiter '"+e.close+"'");t.sectionDepth+=1,o=i.f,c=[];do{if(s=Ir(t,e))d&&s.r!==d&&t.error("Expected "+e.open+"/"+d+e.close),t.sectionDepth-=1,l=!0;else if(s=Mr(t,e))51===i.n&&t.error("{{else}} not allowed in {{#unless}}"),a&&t.error("illegal {{elseif...}} after {{else}}"),h||(h=Qr(r,i.n)),h.f.push({t:4,n:50,x:_r(Hr(c.concat(s.x))),f:o=[]}),c.push(Zr(s.x));else if(s=Lr(t,e))51===i.n&&t.error("{{else}} not allowed in {{#unless}}"),a&&t.error("there can only be one {{else}} block, at the end of a section"),a=!0,h?h.f.push({t:4,n:50,x:_r(Hr(c)),f:o=[]}):(h=Qr(r,i.n),o=h.f);else{if(!(s=t.read(fs)))break;o.push(s)}}while(!l);h&&(53===i.n&&(i.n=54),i.l=h);Sr(r,i),i.f.length||delete i.f;return i},Br=/^\s*:\s*([a-zA-Z_$][a-zA-Z_$0-9]*)/,qr=/^\s*,\s*([a-zA-Z_$][a-zA-Z_$0-9]*)/,$r=new RegExp("^("+Object.keys(Wr).join("|")+")\\b");function Qr(t,e){var n;return 53===e?(n={t:4,n:50,f:[]},Sr(Zr(t),n)):Sr(t,n={t:4,n:51,f:[]}),n}function Zr(t){return 33===t.t&&"!"===t.s?t.o:{t:33,s:"!",o:Kr(t)}}function Hr(t){return 1===t.length?t[0]:{t:36,s:"&&",o:[Kr(t[0]),Kr(Hr(t.slice(1)))]}}function Kr(t){return{t:34,x:t}}var Gr,Yr,Jr,Xr,ti,ei,ni,ri,ii=function(t){var e,n,r,i,s;if(e=t.pos,!t.matchString("\x3c!--"))return null;r=t.remaining(),-1===(i=r.indexOf("--\x3e"))&&t.error("Illegal HTML - expected closing comment sequence ('--\x3e')");n=r.substr(0,i),t.pos+=i+3,s={t:9,c:n},t.includeLinePositions&&(s.p=t.getLinePos(e));return s};function si(t){return t.replace(ti,(function(t,e){var n;return(n="#"!==e[0]?Jr[e]:"x"===e[1]?parseInt(e.substring(2),16):parseInt(e.substring(1),10))?String.fromCharCode(function(t){if(!t)return 65533;if(10===t)return 32;if(t<128)return t;if(t<=159)return Xr[t-128];if(t<55296)return t;if(t<=57343)return 65533;if(t<=65535)return t;return 65533}(n)):t}))}function oi(t){return t.replace(ri,"&").replace(ei,"<").replace(ni,">")}Gr=/^(allowFullscreen|async|autofocus|autoplay|checked|compact|controls|declare|default|defaultChecked|defaultMuted|defaultSelected|defer|disabled|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,Yr=/^(?:area|base|br|col|command|doctype|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i,Jr={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},Xr=[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],ti=new RegExp("&(#?(?:x[\\w\\d]+|\\d+|"+Object.keys(Jr).join("|")+"));?","g"),ei=/</g,ni=/>/g,ri=/&/g;var ai=/^\s*\r?\n/,ui=/\r?\n\s*$/;function hi(t){return"string"==typeof t}function ci(t){return(4===t.t||5===t.t)&&t.f}var li=function(t,e,n){var r;e&&"string"==typeof(r=t[0])&&((r=r.replace(e,""))?t[0]=r:t.shift()),n&&"string"==typeof(r=_t(t))&&((r=r.replace(n,""))?t[t.length-1]=r:t.pop())},fi=function t(e,n,r,i,s){var o,a,u,h,c,l,f,d;(function(t){var e,n,r,i,s,o;for(e=1;e<t.length;e+=1)n=t[e],r=t[e-1],i=t[e-2],hi(n)&&(9===(o=r).t||10===o.t)&&hi(i)&&ui.test(i)&&ai.test(n)&&(t[e-2]=i.replace(ui,"\n"),t[e]=n.replace(ai,"")),ci(n)&&hi(r)&&ui.test(r)&&hi(n.f[0])&&ai.test(n.f[0])&&(t[e-1]=r.replace(ui,"\n"),n.f[0]=n.f[0].replace(ai,"")),hi(n)&&ci(r)&&hi(s=_t(r.f))&&ui.test(s)&&ai.test(n)&&(r.f[r.f.length-1]=s.replace(ui,"\n"),t[e]=n.replace(ai,""))})(e),o=e.length;for(;o--;)((a=e[o]).exclude||n&&9===a.t)&&e.splice(o,1);li(e,i?mi:null,s?vi:null),o=e.length;for(;o--;){if((a=e[o]).f){var p=7===a.t&&pi.test(a.e);c=r||p,!r&&p&&li(a.f,gi,yi),c||(u=e[o-1],h=e[o+1],(!u||"string"==typeof u&&vi.test(u))&&(l=!0),(!h||"string"==typeof h&&mi.test(h))&&(f=!0)),t(a.f,n,c,l,f)}if(a.l&&(t(a.l.f,n,r,l,f),e.splice(o+1,0,a.l),delete a.l),a.a)for(d in a.a)a.a.hasOwnProperty(d)&&"string"!=typeof a.a[d]&&t(a.a[d],n,r,l,f);if(a.m&&t(a.m,n,r,l,f),a.v)for(d in a.v)a.v.hasOwnProperty(d)&&(P(a.v[d].n)&&t(a.v[d].n,n,r,l,f),P(a.v[d].d)&&t(a.v[d].d,n,r,l,f))}o=e.length;for(;o--;)"string"==typeof e[o]&&("string"==typeof e[o+1]&&(e[o]=e[o]+e[o+1],e.splice(o+1,1)),r||(e[o]=e[o].replace(di," ")),""===e[o]&&e.splice(o,1))},di=/[ \t\f\r\n]+/g,pi=/^(?:pre|script|style|textarea)$/i,mi=/^[ \t\f\r\n]+/,vi=/[ \t\f\r\n]+$/,gi=/^(?:\r\n|\r|\n)/,yi=/(?:\r\n|\r|\n)$/;var bi=function(t){var e,n;if(e=t.pos,!t.matchString("</"))return null;if(n=t.matchPattern(wi))return t.inside&&n!==t.inside?(t.pos=e,null):{t:14,e:n};t.pos-=2,t.error("Illegal closing tag")},wi=/^([a-zA-Z]{1,}:?[a-zA-Z0-9\-]*)\s*\>/;var xi,ki,Ei,_i,Ai,Si,Ci,Oi=function(t,e){var n,r,i;for(n=e.length;n--;){if(!(r=t.indexOf(e[n])))return 0;-1!==r&&((!i||r<i)&&(i=r))}return i||-1},Pi=function(t){var e,n,r;if(t.allowWhitespace(),!(n=t.matchPattern(Ti)))return null;e={name:n},null!=(r=function(t){var e,n,r,i;e=t.pos,/[=\/>\s]/.test(t.nextChar())||t.error("Expected `=`, `/`, `>` or whitespace");if(t.allowWhitespace(),!t.matchString("="))return t.pos=e,null;t.allowWhitespace(),n=t.pos,r=t.sectionDepth,null===(i=ji(t,"'")||ji(t,'"')||function(t){var e,n;t.inAttribute=!0,e=[],n=Un(t)||Ri(t);for(;null!==n;)e.push(n),n=Un(t)||Ri(t);if(!e.length)return null;return t.inAttribute=!1,e}(t))&&t.error("Expected valid attribute value");t.sectionDepth!==r&&(t.pos=n,t.error("An attribute value must contain as many opening section tags as closing section tags"));if(!i.length)return"";if(1===i.length&&"string"==typeof i[0])return si(i[0]);return i}(t))&&(e.value=r);return e},Ti=/^[^\s"'>\/=]+/,Fi=/^[^\s"'=<>`]+/;function Ri(t){var e,n,r,i,s;return e=t.pos,(n=t.matchPattern(Fi))?(r=n,i=t.tags.map((function(t){return t.open})),-1!==(s=Oi(r,i))&&(n=n.substr(0,s),t.pos=e+n.length),n):null}function ji(t,e){var n,r,i;if(n=t.pos,!t.matchString(e))return null;for(t.inAttribute=e,r=[],i=Un(t)||Ni(t,e);null!==i;)r.push(i),i=Un(t)||Ni(t,e);return t.matchString(e)?(t.inAttribute=!1,r):(t.pos=n,null)}function Ni(t,e){var n,r,i;return t.pos,r=t.remaining(),(i=t.tags.map((function(t){return t.open}))).push(e),-1===(n=Oi(r,i))&&t.error("Quoted attribute value must have a closing quote"),n?(t.pos+=n,r.substr(0,n)):null}function Di(t){var e,n,r;return t.allowWhitespace(),(e=er(t))?(r={key:e},t.allowWhitespace(),t.matchString(":")?(t.allowWhitespace(),(n=t.read())?(r.value=n.v,r):null):null):null}ki={true:!0,false:!1,undefined:void 0,null:null},Ei=new RegExp("^(?:"+Object.keys(ki).join("|")+")"),_i=/^(?:[+-]?)(?:(?:(?:0|[1-9]\d*)?\.\d+)|(?:(?:0|[1-9]\d*)\.)|(?:0|[1-9]\d*))(?:[eE][+-]?\d+)?/,Ai=/\$\{([^\}]+)\}/g,Si=/^\$\{([^\}]+)\}/,Ci=/^\s*$/,xi=Nn.extend({init:function(t,e){this.values=e.values,this.allowWhitespace()},postProcess:function(t){return 1===t.length&&Ci.test(this.leftover)?{value:t[0].v}:null},converters:[function(t){var e;return t.values?(e=t.matchPattern(Si))&&t.values.hasOwnProperty(e)?{v:t.values[e]}:void 0:null},function(t){var e;if(e=t.matchPattern(Ei))return{v:ki[e]}},function(t){var e;if(e=t.matchPattern(_i))return{v:+e}},function(t){var e,n=Xn(t);return n&&(e=t.values)?{v:n.v.replace(Ai,(function(t,n){return n in e?e[n]:n}))}:n},function(t){var e,n;if(!t.matchString("{"))return null;if(e={},t.allowWhitespace(),t.matchString("}"))return{v:e};for(;n=Di(t);){if(e[n.key]=n.value,t.allowWhitespace(),t.matchString("}"))return{v:e};if(!t.matchString(","))return null}return null},function(t){var e,n;if(!t.matchString("["))return null;if(e=[],t.allowWhitespace(),t.matchString("]"))return{v:e};for(;n=t.read();){if(e.push(n.v),t.allowWhitespace(),t.matchString("]"))return{v:e};if(!t.matchString(","))return null;t.allowWhitespace()}return null}]});var Ii,Li=function(t,e){return new xi(t,{values:e}).result},Vi=function(t,e){var n,r,i,s,o,a,u,h,c;if("string"==typeof t){if(r=Mi.exec(t)){var l=t.lastIndexOf(")");return Ui.test(t)||e.error("Invalid input after method call expression '"+t.slice(l+1)+"'"),n={m:r[1]},s="["+t.slice(n.m.length+1,l)+"]",i=new Ii(s),n.a=_r(i.result[0]),n}if(-1===t.indexOf(":"))return t.trim();t=[t]}if(n={},u=[],h=[],t){for(;t.length;)if("string"==typeof(o=t.shift())){if(-1!==(a=o.indexOf(":"))){a&&u.push(o.substr(0,a)),o.length>a+1&&(h[0]=o.substring(a+1));break}u.push(o)}else u.push(o);h=h.concat(t)}u.length?h.length||"string"!=typeof u?(n={n:1===u.length&&"string"==typeof u[0]?u[0]:u},1===h.length&&"string"==typeof h[0]?(c=Li("["+h[0]+"]"),n.a=c?c.value:h[0].trim()):n.d=h):n=u:n="";return n},Mi=/^([a-zA-Z_$][a-zA-Z_$0-9]*)\(/,Ui=/\)\s*$/;Ii=Nn.extend({converters:[Er]});var Wi,zi=/^[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/,Bi=/^[\s\n\/>]/,qi=/^on/,$i=/^on-([a-zA-Z\\*\\.$_][a-zA-Z\\*\\.$_0-9\-]+)$/,Qi=/^(?:change|reset|teardown|update|construct|config|init|render|unrender|detach|insert)$/,Zi={"intro-outro":"t0",intro:"t1",outro:"t2",decorator:"o"},Hi={exclude:!0};Wi={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"]};var Ki=function(t){var e,n,r,i,s,o,a,u,h,c,l,f,d,p,m,v;if(e=t.pos,t.inside||t.inAttribute)return null;if(!t.matchString("<"))return null;if("/"===t.nextChar())return null;n={},t.includeLinePositions&&(n.p=t.getLinePos(e));if(t.matchString("!"))return n.t=18,t.matchPattern(/^doctype/i)||t.error("Expected DOCTYPE declaration"),n.a=t.matchPattern(/^(.+?)>/),n;if(n.t=7,n.e=t.matchPattern(zi),!n.e)return null;Bi.test(t.nextChar())||t.error("Illegal tag name");s=function(e,r){var i=r.n||r;Qi.test(i)&&(t.pos-=i.length,t.error("Cannot use reserved event names (change, reset, teardown, update, construct, config, init, render, unrender, detach, insert)")),n.v[e]=r},t.allowWhitespace();for(;o=Un(t)||Pi(t);)o.name?(r=Zi[o.name])?n[r]=Vi(o.value,t):(i=$i.exec(o.name))?(n.v||(n.v={}),a=Vi(o.value,t),s(i[1],a)):t.sanitizeEventAttributes&&qi.test(o.name)||(n.a||(n.a={}),n.a[o.name]=o.value||(""===o.value?"":0)):(n.m||(n.m=[]),n.m.push(o)),t.allowWhitespace();t.allowWhitespace(),t.matchString("/")&&(u=!0);if(!t.matchString(">"))return null;var g=n.e.toLowerCase(),y=t.preserveWhitespace;if(!u&&!Yr.test(n.e)){t.elementStack.push(g),"script"!==g&&"style"!==g||(t.inside=g),h=[],c=x(null);do{if(p=t.pos,m=t.remaining(),Gi(g,m))if(v=bi(t)){d=!0;var b=v.e.toLowerCase();if(b!==g&&(t.pos=p,!~t.elementStack.indexOf(b))){var w="Unexpected closing tag";Yr.test(b)&&(w+=" (<"+b+"> is a void element - it cannot contain children)"),t.error(w)}}else(f=Ir(t,{open:t.standardDelimiters[0],close:t.standardDelimiters[1]}))?(d=!0,t.pos=p):(f=t.read(ds))?(c[f.n]&&(t.pos=p,t.error("Duplicate partial definition")),fi(f.f,t.stripComments,y,!y,!y),c[f.n]=f.f,l=!0):(f=t.read(fs))?h.push(f):d=!0;else d=!0}while(!d);h.length&&(n.f=h),l&&(n.p=c),t.elementStack.pop()}if(t.inside=null,t.sanitizeElements&&-1!==t.sanitizeElements.indexOf(g))return Hi;return n};function Gi(t,e){var n,r;return n=/^<([a-zA-Z][a-zA-Z0-9]*)/.exec(e),r=Wi[t],!n||!r||!~r.indexOf(n[1].toLowerCase())}var Yi=function(t){return t.replace(Ji,"\\$&")},Ji=/[-/\\^$*+?.()|[\]{}]/g;var Xi,ts=function(t){var e=t.pos,n=t.standardDelimiters[0],r=t.standardDelimiters[1],i=void 0,s=void 0;if(!t.matchPattern(es)||!t.matchString(n))return t.pos=e,null;var o=t.matchPattern(ns);if(Q("Inline partial comments are deprecated.\nUse this...\n {{#partial "+o+"}} ... {{/partial}}\n\n...instead of this:\n \x3c!-- {{>"+o+"}} --\x3e ... \x3c!-- {{/"+o+"}} --\x3e'"),!t.matchString(r)||!t.matchPattern(rs))return t.pos=e,null;i=[];var a=new RegExp("^\x3c!--\\s*"+Yi(n)+"\\s*\\/\\s*"+o+"\\s*"+Yi(r)+"\\s*--\x3e");do{t.matchPattern(a)?s=!0:((Xi=t.read(fs))||t.error("expected closing comment ('\x3c!-- "+n+"/"+o+r+" --\x3e')"),i.push(Xi))}while(!s);return{t:17,f:i,n:o}},es=/^<!--\s*/,ns=/s*>\s*([a-zA-Z_$][-a-zA-Z_$0-9]*)\s*/,rs=/\s*-->/;var is=function(t){var e,n,r,i,s;e=t.pos;var o=t.standardDelimiters;if(!t.matchString(o[0]))return null;if(!t.matchPattern(ss))return t.pos=e,null;(n=t.matchPattern(/^[a-zA-Z_$][a-zA-Z_$0-9\-]*/))||t.error("expected legal partial name");t.matchString(o[1])||t.error("Expected closing delimiter '"+o[1]+"'");r=[];do{(i=Ir(t,{open:t.standardDelimiters[0],close:t.standardDelimiters[1]}))?("partial"===!i.r&&t.error("Expected "+o[0]+"/partial"+o[1]),s=!0):((i=t.read(fs))||t.error("Expected "+o[0]+"/partial"+o[1]),r.push(i))}while(!s);return{t:17,n:n,f:r}},ss=/^#\s*partial\s+/;var os=function(t){var e=[],n=x(null),r=!1,i=t.preserveWhitespace;for(;t.pos<t.str.length;){var s,o=t.pos,a=void 0;(s=t.read(ds))?(n[s.n]&&(t.pos=o,t.error("Duplicated partial definition")),fi(s.f,t.stripComments,i,!i,!i),n[s.n]=s.f,r=!0):(a=t.read(fs))?e.push(a):t.error("Unexpected template content")}var u={v:3,t:e};r&&(u.p=n);return u};var as=function(t,e){return new ls(t,e||{}).result},us=[Tr,Pr,zr,Nr,jr,Fr],hs=[Or],cs=[Pr,zr,jr],ls=void 0;var fs=[Un,ii,Ki,function(t){var e,n,r,i;n=t.remaining(),i=t.inside?"</"+t.inside:"<",t.inside&&!t.interpolate[t.inside]?e=n.indexOf(i):(r=(r=t.tags.map((function(t){return t.open}))).concat(t.tags.map((function(t){return"\\"+t.open}))),!0===t.inAttribute?r.push('"',"'","=","<",">","`"):t.inAttribute?r.push(t.inAttribute):r.push(i),e=Oi(n,r));if(!e)return null;-1===e&&(e=n.length);return t.pos+=e,t.inside?n.substr(0,e):si(n.substr(0,e))}],ds=[ts,is];ls=Nn.extend({init:function(t,e){var n=e.tripleDelimiters||["{{{","}}}"],r=e.staticDelimiters||["[[","]]"],i=e.staticTripleDelimiters||["[[[","]]]"];this.standardDelimiters=e.delimiters||["{{","}}"],this.tags=[{isStatic:!1,isTriple:!1,open:this.standardDelimiters[0],close:this.standardDelimiters[1],readers:us},{isStatic:!1,isTriple:!0,open:n[0],close:n[1],readers:hs},{isStatic:!0,isTriple:!1,open:r[0],close:r[1],readers:cs},{isStatic:!0,isTriple:!0,open:i[0],close:i[1],readers:hs}],this.sortMustacheTags(),this.sectionDepth=0,this.elementStack=[],this.interpolate={script:!e.interpolate||!1!==e.interpolate.script,style:!e.interpolate||!1!==e.interpolate.style},!0===e.sanitize&&(e.sanitize={elements:"applet base basefont body frame frameset head html isindex link meta noframes noscript object param script style title".split(" "),eventAttributes:!0}),this.stripComments=!1!==e.stripComments,this.preserveWhitespace=e.preserveWhitespace,this.sanitizeElements=e.sanitize&&e.sanitize.elements,this.sanitizeEventAttributes=e.sanitize&&e.sanitize.eventAttributes,this.includeLinePositions=e.includeLinePositions},postProcess:function(t){return t.length?(this.sectionDepth>0&&this.error("A section was left open"),fi(t[0].t,this.stripComments,this.preserveWhitespace,!this.preserveWhitespace,!this.preserveWhitespace),t[0]):{t:[],v:3}},converters:[os],sortMustacheTags:function(){this.tags.sort((function(t,e){return e.open.length-t.open.length}))}});var ps=["preserveWhitespace","sanitize","stripComments","delimiters","tripleDelimiters","interpolate"],ms={fromId:function(e,n){var r;if(!t){if(n&&n.noThrow)return;throw new Error("Cannot retrieve template #"+e+" as Ractive is not running in a browser.")}gs(e)&&(e=e.substring(1));if(!(r=document.getElementById(e))){if(n&&n.noThrow)return;throw new Error("Could not find template element with id #"+e)}if("SCRIPT"!==r.tagName.toUpperCase()){if(n&&n.noThrow)return;throw new Error("Template element with id #"+e+", must be a <script> element")}return"textContent"in r?r.textContent:r.innerHTML},isHashedId:gs,isParsed:function(t){return!("string"==typeof t)},getParseOptions:function(t){t.defaults&&(t=t.defaults);return ps.reduce((function(e,n){return e[n]=t[n],e}),{})},createHelper:function(t){var e=x(ms);return e.parse=function(e,n){return vs(e,n||t)},e},parse:vs};function vs(t,e){if(!as)throw new Error("Missing Ractive.parse - cannot parse template. Either preparse or use the version that includes the parser");return as(t,e||this.options)}function gs(t){return t&&"#"===t[0]}var ys=ms;function bs(t,e){var n=function(t){var e=x(ys);return e.parse=function(e,n){return ys.parse(e,n||t)},e}(ys.getParseOptions(t));return e.call(t,n)}function ws(t,e){if("string"==typeof t)"#"===t[0]&&(t=ys.fromId(t)),t=as(t,ys.getParseOptions(e));else{if(null==t)throw new Error("The template cannot be "+t+".");if("number"!=typeof t.v)throw new Error("The template parser was passed a non-string template, but the template doesn't have a version. Make sure you're passing in the template you think you are.");if(3!==t.v)throw new Error("Mismatched template version (expected 3, got "+t.v+") Please ensure you are using the latest version of Ractive.js in your build process as well as in your app")}return t}function xs(t,e,n){if(e)for(var r in e)!n&&t.hasOwnProperty(r)||(t[r]=e[r])}var ks,Es,_s={name:"template",extend:function(t,e,n){var r;"template"in n&&(r=n.template,e.template="function"==typeof r?r:ws(r,e))},init:function(t,e,n){var r,i;"function"==typeof(r="template"in n?n.template:t.prototype.template)&&(r=bs(e,i=r),e._config.template={fn:i,result:r}),r=ws(r,e),e.template=r.t,r.p&&xs(e.partials,r.p)},reset:function(t){var e,n=function(t){var e,n=t._config.template;if(!n||!n.fn)return;if((e=bs(t,n.fn))!==n.result)return n.result=e,e=ws(e,t)}(t);if(n)return e=ws(n,t),t.template=e.t,xs(t.partials,e.p,!0),!0}};ks=["adaptors","components","computed","decorators","easing","events","interpolators","partials","transitions"],(Es=function(t,e){this.name=t,this.useDefaults=e}).prototype={constructor:Es,extend:function(t,e,n){this.configure(this.useDefaults?t.defaults:t,this.useDefaults?e:e.constructor,n)},init:function(){},configure:function(t,e,n){var r,i=this.name,s=n[i];for(var o in r=x(t[i]),s)r[o]=s[o];e[i]=r},reset:function(t){var e=t[this.name],n=!1;return Object.keys(e).forEach((function(t){var r=e[t];r._fn&&(r._fn.isOwner?e[t]=r._fn:delete e[t],n=!0)})),n}};var As=ks.map((function(t){return new Es(t,"computed"===t)})),Ss=function(t,e,n){if(!/_super/.test(n))return n;var r=function(){var t,i=Cs(r._parent,e),s="_super"in this,o=this._super;return this._super=i,t=n.apply(this,arguments),s?this._super=o:delete this._super,t};return r._parent=t,r._method=n,r};function Cs(t,e){var n;return e in t?"function"==typeof(n=t[e])?n:function(){return n}:V}var Os,Ps,Ts,Fs,Rs,js=function(t){Ds(t,"beforeInit","onconstruct"),Ds(t,"init","onrender"),Ds(t,"complete","oncomplete"),Ds(t,"eventDefinitions","events"),P(t.adaptors)&&Ds(t,"adaptors","adapt")};function Ns(t,e,n){return"options."+t+" has been deprecated in favour of options."+e+"."+(n?" You cannot specify both options, please use options."+e+".":"")}function Ds(t,e,n){if(e in t){if(n in t)throw new Error(Ns(e,n,!0));$(Ns(e,n)),t[n]=t[e]}}function Is(t,e,n,r){for(var i in js(r),r)if(Rs.hasOwnProperty(i)){var s=r[i];"el"!==i&&"function"==typeof s?$(i+" is a Ractive option that does not expect a function and will be ignored","init"===t?n:null):n[i]=s}As.forEach((function(i){i[t](e,n,r)})),vn[t](e,n,r),_s[t](e,n,r),Sn[t](e,n,r),function(t,e,n){for(var r in n)if(!Fs[r]&&n.hasOwnProperty(r)){var i=n[r];"function"==typeof i&&(i=Ss(t,r,i)),e[r]=i}}(e.prototype,n,r)}function Ls(t){var e={};return t.forEach((function(t){return e[t]=!0})),e}Ts={adapt:vn,css:Sn,data:Cn,template:_s},Ps=Object.keys(v),Rs=Ls(Ps.filter((function(t){return!Ts[t]}))),Fs=Ls(Ps.concat(As.map((function(t){return t.name}))));var Vs={extend:function(t,e,n){return Is("extend",t,e,n)},init:function(t,e,n){return Is("init",t,e,n)},reset:function(t){return Os.filter((function(e){return e.reset&&e.reset(t)})).map((function(t){return t.name}))},order:Os=[].concat(Ps.filter((function(t){return!As[t]&&!Ts[t]})),As,Ts.data,Ts.template,Ts.css)},Ms=function(){this.dirtyValue=this.dirtyArgs=!0,this.bound&&"function"==typeof this.owner.bubble&&this.owner.bubble()};var Us=function(){var t;if(1===this.items.length)return this.items[0].detach();return t=document.createDocumentFragment(),this.items.forEach((function(e){var n=e.detach();n&&t.appendChild(n)})),t};var Ws=function(t){var e,n,r,i;if(this.items){for(n=this.items.length,e=0;e<n;e+=1)if((r=this.items[e]).find&&(i=r.find(t)))return i;return null}};var zs=function(t,e){var n,r,i;if(this.items)for(r=this.items.length,n=0;n<r;n+=1)(i=this.items[n]).findAll&&i.findAll(t,e);return e};var Bs=function(t,e){var n,r,i;if(this.items)for(r=this.items.length,n=0;n<r;n+=1)(i=this.items[n]).findAllComponents&&i.findAllComponents(t,e);return e};var qs=function(t){var e,n,r,i;if(this.items){for(e=this.items.length,n=0;n<e;n+=1)if((r=this.items[n]).findComponent&&(i=r.findComponent(t)))return i;return null}};var $s=function(t){var e,n=t.index;e=this.items[n+1]?this.items[n+1].firstNode():this.owner===this.root?this.owner.component?this.owner.component.findNextNode():null:this.owner.findNextNode(this);return e};var Qs=function(){if(this.items&&this.items[0])return this.items[0].firstNode();return null};var Zs=function t(e,n,r,i){return i=i||0,e.map((function(e){var s,o,a;return e.text?e.text:e.fragments?e.fragments.map((function(e){return t(e.items,n,r,i)})).join(""):(s=r+"-"+i++,a=e.keypath&&(o=e.root.viewmodel.wrapped[e.keypath.str])?o.value:e.getValue(),n[s]=a,"${"+s+"}")})).join("")};var Hs=function(){var t,e,n,r;this.dirtyArgs&&(e=Zs(this.items,t={},this.root._guid),n=Li("["+e+"]",t),r=n?n.value:[this.toString()],this.argsList=r,this.dirtyArgs=!1);return this.argsList};var Ks=function(){var t=this;do{if(t.pElement)return t.pElement.node}while(t=t.parent);return this.root.detached||this.root.el};var Gs=function(){var t,e,n,r;this.dirtyValue&&(e=Zs(this.items,t={},this.root._guid),n=Li(e,t),r=n?n.value:this.toString(),this.value=r,this.dirtyValue=!1);return this.value};var Ys=function(){return b(this.node)},Js=function(t){this.type=1,this.text=t.template};Js.prototype={detach:Ys,firstNode:function(){return this.node},render:function(){return this.node||(this.node=document.createTextNode(this.text)),this.node},toString:function(t){return t?oi(this.text):this.text},unrender:function(t){if(t)return this.detach()}};var Xs=Js,to=function(){this.registered&&this.root.viewmodel.unregister(this.keypath,this);this.resolver&&this.resolver.unbind()};var eo=function(){return this.value};var no=function(t,e,n){var r;this.ref=e,this.resolved=!1,this.root=t.root,this.parentFragment=t.parentFragment,this.callback=n,null!=(r=Dt(t.root,e,t.parentFragment))?this.resolve(r):Yt.addUnresolved(this)};no.prototype={resolve:function(t){this.keypath&&!t&&Yt.addUnresolved(this),this.resolved=!0,this.keypath=t,this.callback(t)},forceResolution:function(){this.resolve(at(this.ref))},rebind:function(t,e){var n;null!=this.keypath&&void 0!==(n=this.keypath.replace(t,e))&&this.resolve(n)},unbind:function(){this.resolved||Yt.removeUnresolved(this)}};var ro=no,io=function(t,e,n){this.parentFragment=t.parentFragment,this.ref=e,this.callback=n,this.rebind()},so={"@keypath":{prefix:"c",prop:["context"]},"@index":{prefix:"i",prop:["index"]},"@key":{prefix:"k",prop:["key","index"]}};function oo(t,e){for(var n,r=0;r<e.prop.length;r++)if(void 0!==(n=t[e.prop[r]]))return n}io.prototype={rebind:function(){var t,e=this.ref,n=this.parentFragment,r=so[e];if(!r)throw new Error('Unknown special reference "'+e+'" - valid references are @index, @key and @keypath');if(this.cached)return this.callback(at("@"+r.prefix+oo(this.cached,r)));if(-1!==r.prop.indexOf("index")||-1!==r.prop.indexOf("key"))for(;n;){if(52===n.owner.currentSubtype&&void 0!==(t=oo(n,r)))return this.cached=n,n.registerIndexRef(this),this.callback(at("@"+r.prefix+t));n=!n.parent&&n.owner&&n.owner.component&&n.owner.component.parentFragment&&!n.owner.component.instance.isolated?n.owner.component.parentFragment:n.parent}else for(;n;){if(void 0!==(t=oo(n,r)))return this.callback(at("@"+r.prefix+t.str));n=n.parent}},unbind:function(){this.cached&&this.cached.unregisterIndexRef(this)}};var ao=io,uo=function(t,e,n){this.parentFragment=t.parentFragment,this.ref=e,this.callback=n,e.ref.fragment.registerIndexRef(this),this.rebind()};uo.prototype={rebind:function(){var t,e=this.ref.ref;void 0!==(t="k"===e.ref.t?"k"+e.fragment.key:"i"+e.fragment.index)&&this.callback(at("@"+t))},unbind:function(){this.ref.ref.fragment.unregisterIndexRef(this)}};var ho=uo,co=lo;function lo(t,e){var n,r,i,s,o,a={},u=!1;for(e||(a.refs=n={});t;){if((o=t.owner)&&(r=o.indexRefs)){if(e&&(i=o.getIndexRef(e)))return a.ref={fragment:t,ref:i},a;if(!e)for(s in r)n[(i=r[s]).n]||(u=!0,n[i.n]={fragment:t,ref:i})}!t.parent&&t.owner&&t.owner.component&&t.owner.component.parentFragment&&!t.owner.component.instance.isolated?(a.componentBoundary=!0,t=t.owner.component.parentFragment):t=t.parent}return u?a:void 0}lo.resolve=function(t){var e,n,r={};for(e in t.refs)r[(n=t.refs[e]).ref.n]="k"===n.ref.t?n.fragment.key:n.fragment.index;return r};var fo=function(t,e,n){var r;if("@"===e.charAt(0))return new ao(t,e,n);if(r=co(t.parentFragment,e))return new ho(t,r,n);return new ro(t,e,n)};var po=function(t,e){var n,r;if(mo[t])return mo[t];r=[];for(;e--;)r[e]="_"+e;return n=new Function(r.join(","),"return("+t+")"),mo[t]=n,n},mo={};var vo,go=Function.prototype.bind;(vo=function(t,e,n,r){var i,s=this;i=t.root,this.root=i,this.parentFragment=e,this.callback=r,this.owner=t,this.str=n.s,this.keypaths=[],this.pending=n.r.length,this.refResolvers=n.r.map((function(t,e){return fo(s,t,(function(t){s.resolve(e,t)}))})),this.ready=!0,this.bubble()}).prototype={bubble:function(){var t,e;this.ready&&(this.uniqueString=(t=this.str,e=this.keypaths,t.replace(/_([0-9]+)/g,(function(t,n){var r,i;return+n>=e.length?"_"+n:void 0===(r=e[n])?"undefined":r.isSpecial?"number"==typeof(i=r.value)?i:'"'+i+'"':r.str}))),this.keypath=at("${"+this.uniqueString.replace(/[\.\[\]]/g,"-").replace(/\*/,"#MUL#")+"}"),this.createEvaluator(),this.callback(this.keypath))},unbind:function(){for(var t;t=this.refResolvers.pop();)t.unbind()},resolve:function(t,e){this.keypaths[t]=e,this.bubble()},createEvaluator:function(){var t,e,n,r,i=this;n=this.keypath,this.root.viewmodel.computations[n.str]?this.root.viewmodel.mark(n):(r=po(this.str,this.refResolvers.length),t=this.keypaths.map((function(t){var e;return"undefined"===t?function(){}:t.isSpecial?(e=t.value,function(){return e}):function(){var e=i.root.viewmodel.get(t,{noUnwrap:!0,fullRootGet:!0});return"function"==typeof e&&(e=function(t,e){var n,r,i;if(t.__ractive_nowrap)return t;if(n=t[r="__ractive_"+e._guid])return n;if(/this/.test(t.toString())){for(i in k(t,r,{value:go.call(t,e),configurable:!0}),t)t.hasOwnProperty(i)&&(t[r][i]=t[i]);return e._boundFunctions.push({fn:t,prop:r}),t[r]}return k(t,"__ractive_nowrap",{value:t}),t.__ractive_nowrap}(e,i.root)),e}})),e={deps:this.keypaths.filter(wo),getter:function(){var e=t.map(bo);return r.apply(null,e)}},this.root.viewmodel.compute(n,e))},rebind:function(t,e){this.refResolvers.forEach((function(n){return n.rebind(t,e)}))}};var yo=vo;function bo(t){return t.call()}function wo(t){return void 0!==t&&"@"!==t[0]}var xo=function(t,e,n){var r=this;this.resolver=e,this.root=e.root,this.parentFragment=n,this.viewmodel=e.root.viewmodel,"string"==typeof t?this.value=t:30===t.t?this.refResolver=fo(this,t.n,(function(t){r.resolve(t)})):new yo(e,n,t,(function(t){r.resolve(t)}))};xo.prototype={resolve:function(t){this.keypath&&this.viewmodel.unregister(this.keypath,this),this.keypath=t,this.value=this.viewmodel.get(t),this.bind(),this.resolver.bubble()},bind:function(){this.viewmodel.register(this.keypath,this)},rebind:function(t,e){this.refResolver&&this.refResolver.rebind(t,e)},setValue:function(t){this.value=t,this.resolver.bubble()},unbind:function(){this.keypath&&this.viewmodel.unregister(this.keypath,this),this.refResolver&&this.refResolver.unbind()},forceResolution:function(){this.refResolver&&this.refResolver.forceResolution()}};var ko=xo,Eo=function(t,e,n){var r,i,s,o,a=this;this.parentFragment=o=t.parentFragment,this.root=r=t.root,this.mustache=t,this.ref=i=e.r,this.callback=n,this.unresolved=[],(s=Dt(r,i,o))?this.base=s:this.baseResolver=new ro(this,i,(function(t){a.base=t,a.baseResolver=null,a.bubble()})),this.members=e.m.map((function(t){return new ko(t,a,o)})),this.ready=!0,this.bubble()};function _o(t){return t.value}function Ao(t){return null!=t}function So(t){t.forceResolution()}Eo.prototype={getKeypath:function(){var t=this.members.map(_o);return!t.every(Ao)||this.baseResolver?null:this.base.join(t.join("."))},bubble:function(){this.ready&&!this.baseResolver&&this.callback(this.getKeypath())},unbind:function(){this.members.forEach(Ut)},rebind:function(t,e){var n;if(this.base){var r=this.base.replace(t,e);r&&r!==this.base&&(this.base=r,n=!0)}this.members.forEach((function(r){r.rebind(t,e)&&(n=!0)})),n&&this.bubble()},forceResolution:function(){this.baseResolver&&(this.base=at(this.ref),this.baseResolver.unbind(),this.baseResolver=null),this.members.forEach(So),this.bubble()}};var Co=Eo;var Oo=function(t,e){this.fragments&&this.fragments.forEach((function(n){return n.rebind(t,e)}));this.resolver&&this.resolver.rebind(t,e)};var Po={getValue:eo,init:function(t,e){var n,r,i;r=e.parentFragment,i=e.template,t.root=r.root,t.parentFragment=r,t.pElement=r.pElement,t.template=e.template,t.index=e.index||0,t.isStatic=e.template.s,t.type=e.template.t,t.registered=!1,(n=i.r)&&(t.resolver=fo(t,n,(function(e){t.resolve(e)})));e.template.x&&(t.resolver=new yo(t,r,e.template.x,s));e.template.rx&&(t.resolver=new Co(t,e.template.rx,s));51!==t.template.n||t.hasOwnProperty("value")||t.setValue(void 0);function s(e){var n=t.keypath;e!=n&&(t.resolve(e),void 0!==n&&t.fragments&&t.fragments.forEach((function(t){t.rebind(n,e)})))}},resolve:function(t){var e,n,r;if(t&&t.isSpecial)return this.keypath=t,void this.setValue(t.value);this.registered&&(this.root.viewmodel.unregister(this.keypath,this),this.registered=!1,e=!0);this.keypath=t,null!=t&&(n=this.root.viewmodel.get(t),this.root.viewmodel.register(t,this),this.registered=!0);this.setValue(n),e&&(r=this.twowayBinding)&&r.rebound()},rebind:Oo},To=function(t){this.type=2,Po.init(this,t)};To.prototype={update:function(){this.node.data=null==this.value?"":this.value},resolve:Po.resolve,rebind:Po.rebind,detach:Ys,unbind:to,render:function(){return this.node||(this.node=document.createTextNode(w(this.value))),this.node},unrender:function(t){t&&b(this.node)},getValue:Po.getValue,setValue:function(t){var e;this.keypath&&(e=this.root.viewmodel.wrapped[this.keypath.str])&&(t=e.get()),F(t,this.value)||(this.value=t,this.parentFragment.bubble(),this.node&&Yt.addView(this))},firstNode:function(){return this.node},toString:function(t){var e=""+w(this.value);return t?oi(e):e}};var Fo=To;var Ro=function(t){var e,n,r,i,s,o=this;if(this.shuffling||this.unbound||52!==this.currentSubtype)return;if(this.shuffling=!0,Yt.scheduleTask((function(){return o.shuffling=!1})),this.parentFragment,i=[],t.forEach((function(t,n){var r,s,a,u;if(t!==n){if(r=o.fragments[n],void 0===e&&(e=n),-1===t)return o.fragmentsToUnrender.push(r),void r.unbind();s=o.keypath.join(n),a=o.keypath.join(t),r.index=t,(u=r.registeredIndexRefs)&&u.forEach(jo),r.rebind(s,a),i[t]=r}else i[t]=o.fragments[n]})),r=this.root.viewmodel.get(this.keypath).length,void 0===e){if(this.length===r)return;e=this.length}this.length=this.fragments.length=r,this.rendered&&Yt.addView(this);for({template:this.template.f,root:this.root,owner:this},n=e;n<r;n+=1)(s=i[n])||this.fragmentsToCreate.push(n),this.fragments[n]=s};function jo(t){t.rebind("","")}var No=function(){var t=this;return this.docFrag=document.createDocumentFragment(),this.fragments.forEach((function(e){return t.docFrag.appendChild(e.render())})),this.renderedFragments=this.fragments.slice(),this.fragmentsToRender=[],this.rendered=!0,this.docFrag};var Do=function(t){var e,n,r=this;if(this.updating)return;this.updating=!0,this.keypath&&(e=this.root.viewmodel.wrapped[this.keypath.str])&&(t=e.get());this.fragmentsToCreate.length?(n={template:this.template.f||[],root:this.root,pElement:this.pElement,owner:this},this.fragmentsToCreate.forEach((function(t){var e;n.context=r.keypath.join(t),n.index=t,e=new Pl(n),r.fragmentsToRender.push(r.fragments[t]=e)})),this.fragmentsToCreate.length=0):function(t,e){var n={template:t.template.f||[],root:t.root,pElement:t.parentFragment.pElement,owner:t};if(t.hasContext=!0,t.subtype)switch(t.subtype){case 50:return t.hasContext=!1,Mo(t,e,!1,n);case 51:return t.hasContext=!1,Mo(t,e,!0,n);case 53:return Vo(t,n);case 54:return function(t,e,n){return e?Vo(t,n):Uo(t)}(t,e,n);case 52:if(j(e))return Io(t,t.subtype,!0),Lo(t,e,n)}if(t.ordered=!!T(e),t.ordered)return Io(t,52,!1),function(t,e,n){var r,i,s;if((i=e.length)===t.length)return!1;if(i<t.length)t.fragmentsToUnrender=t.fragments.splice(i,t.length-i),t.fragmentsToUnrender.forEach(Ut);else if(i>t.length)for(r=t.length;r<i;r+=1)n.context=t.keypath.join(r),n.index=r,s=new Pl(n),t.fragmentsToRender.push(t.fragments[r]=s);return t.length=i,!0}(t,e,n);if(j(e)||"function"==typeof e)return t.template.i?(Io(t,52,!0),Lo(t,e,n)):(Io(t,53,!1),Vo(t,n));return Io(t,50,!1),t.hasContext=!1,Mo(t,e,!1,n)}(this,t)&&(this.bubble(),this.rendered&&Yt.addView(this));this.value=t,this.updating=!1};function Io(t,e,n){if(52===e&&t.indexRefs&&t.indexRefs[0]){var r=t.indexRefs[0];(n&&"i"===r.t||!n&&"k"===r.t)&&(n||(t.length=0,t.fragmentsToUnrender=t.fragments.slice(0),t.fragmentsToUnrender.forEach((function(t){return t.unbind()})))),r.t=n?"k":"i"}t.currentSubtype=e}function Lo(t,e,n){var r,i,s,o,a,u;for(s=t.hasKey||(t.hasKey={}),i=t.fragments.length;i--;)(o=t.fragments[i]).key in e||(a=!0,o.unbind(),t.fragmentsToUnrender.push(o),t.fragments.splice(i,1),s[o.key]=!1);for(i=t.fragments.length;i--;)(o=t.fragments[i]).index!==i&&(o.index=i,(u=o.registeredIndexRefs)&&u.forEach(zo));for(r in i=t.fragments.length,e)s[r]||(a=!0,n.context=t.keypath.join(r),n.key=r,n.index=i++,o=new Pl(n),t.fragmentsToRender.push(o),t.fragments.push(o),s[r]=!0);return t.length=t.fragments.length,a}function Vo(t,e){var n;if(!t.length)return e.context=t.keypath,e.index=0,n=new Pl(e),t.fragmentsToRender.push(t.fragments[0]=n),t.length=1,!0}function Mo(t,e,n,r){var i,s,o,a;if(i=T(e)&&0===e.length,s=!1,!T(e)&&j(e))for(a in s=!0,e){s=!1;break}return(n?i||s||!e:e&&!i&&!s)?t.length?t.length>1?(t.fragmentsToUnrender=t.fragments.splice(1),t.fragmentsToUnrender.forEach(Ut),!0):void 0:(r.index=0,o=new Pl(r),t.fragmentsToRender.push(t.fragments[0]=o),t.length=1,!0):Uo(t)}function Uo(t){if(t.length)return t.fragmentsToUnrender=t.fragments.splice(0,t.fragments.length).filter(Wo),t.fragmentsToUnrender.forEach(Ut),t.length=t.fragmentsToRender.length=0,!0}function Wo(t){return t.rendered}function zo(t){t.rebind("","")}var Bo=function(t){var e,n,r;for(e="",n=0,r=this.length,n=0;n<r;n+=1)e+=this.fragments[n].toString(t);return e};var qo=function(){var t=this;this.fragments.forEach(Ut),this.fragmentsToRender.forEach((function(e){return At(t.fragments,e)})),this.fragmentsToRender=[],to.call(this),this.length=0,this.unbound=!0};var $o=function(t){this.fragments.forEach(t?Qo:Zo),this.renderedFragments=[],this.rendered=!1};function Qo(t){t.unrender(!0)}function Zo(t){t.unrender(!1)}var Ho=function(){var t,e,n,r,i,s,o;n=this.renderedFragments;for(;t=this.fragmentsToUnrender.pop();)t.unrender(!0),n.splice(n.indexOf(t),1);for(;t=this.fragmentsToRender.shift();)t.render();this.rendered&&(i=this.parentFragment.getNode());for(o=this.fragments.length,s=0;s<o;s+=1)t=this.fragments[s],(e=n.indexOf(t,s))!==s?(this.docFrag.appendChild(t.detach()),-1!==e&&n.splice(e,1),n.splice(s,0,t)):this.docFrag.childNodes.length&&(r=t.firstNode(),i.insertBefore(this.docFrag,r));this.rendered&&this.docFrag.childNodes.length&&(r=this.parentFragment.findNextNode(this),i.insertBefore(this.docFrag,r));this.renderedFragments=this.fragments.slice()};var Ko=function(t){this.type=4,this.subtype=this.currentSubtype=t.template.n,this.inverted=51===this.subtype,this.pElement=t.pElement,this.fragments=[],this.fragmentsToCreate=[],this.fragmentsToRender=[],this.fragmentsToUnrender=[],t.template.i&&(this.indexRefs=t.template.i.split(",").map((function(t,e){return{n:t,t:0===e?"k":"i"}}))),this.renderedFragments=[],this.length=0,Po.init(this,t)};Ko.prototype={bubble:function(){this.parentFragment.bubble()},detach:function(){var t;if(1===this.fragments.length)return this.fragments[0].detach();return t=document.createDocumentFragment(),this.fragments.forEach((function(e){t.appendChild(e.detach())})),t},find:function(t){var e,n,r;for(n=this.fragments.length,e=0;e<n;e+=1)if(r=this.fragments[e].find(t))return r;return null},findAll:function(t,e){var n,r;for(r=this.fragments.length,n=0;n<r;n+=1)this.fragments[n].findAll(t,e)},findAllComponents:function(t,e){var n,r;for(r=this.fragments.length,n=0;n<r;n+=1)this.fragments[n].findAllComponents(t,e)},findComponent:function(t){var e,n,r;for(n=this.fragments.length,e=0;e<n;e+=1)if(r=this.fragments[e].findComponent(t))return r;return null},findNextNode:function(t){if(this.fragments[t.index+1])return this.fragments[t.index+1].firstNode();return this.parentFragment.findNextNode(this)},firstNode:function(){var t,e,n;if(t=this.fragments.length)for(e=0;e<t;e+=1)if(n=this.fragments[e].firstNode())return n;return this.parentFragment.findNextNode(this)},getIndexRef:function(t){if(this.indexRefs)for(var e=this.indexRefs.length;e--;){var n=this.indexRefs[e];if(n.n===t)return n}},getValue:Po.getValue,shuffle:Ro,rebind:function(t,e){Po.rebind.call(this,t,e)},render:No,resolve:Po.resolve,setValue:Do,toString:Bo,unbind:qo,unrender:$o,update:Ho};var Go=Ko,Yo=function(){var t,e;if(this.docFrag){for(t=this.nodes.length,e=0;e<t;e+=1)this.docFrag.appendChild(this.nodes[e]);return this.docFrag}};var Jo=function(t){var e,n,r,i;for(n=this.nodes.length,e=0;e<n;e+=1)if(1===(r=this.nodes[e]).nodeType){if(u(r,t))return r;if(i=r.querySelector(t))return i}return null};var Xo=function(t,e){var n,r,i,s,o,a;for(r=this.nodes.length,n=0;n<r;n+=1)if(1===(i=this.nodes[n]).nodeType&&(u(i,t)&&e.push(i),s=i.querySelectorAll(t)))for(o=s.length,a=0;a<o;a+=1)e.push(s[a])};var ta=function(){if(this.rendered&&this.nodes[0])return this.nodes[0];return this.parentFragment.findNextNode(this)};var ea,na,ra={};try{a("table").innerHTML="foo"}catch(hf){ea=!0,na={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>"]}}var ia=function(t,e,n){var r,s,o,a,u,h=[];if(null!=t&&""!==t){for(ea&&(s=na[e.tagName])?((r=sa("DIV")).innerHTML=s[0]+t+s[1],"SELECT"===(r=r.querySelector(".x")).tagName&&(o=r.options[r.selectedIndex])):e.namespaceURI===i.svg?((r=sa("DIV")).innerHTML='<svg class="x">'+t+"</svg>",r=r.querySelector(".x")):((r=sa(e.tagName)).innerHTML=t,"SELECT"===r.tagName&&(o=r.options[r.selectedIndex]));a=r.firstChild;)h.push(a),n.appendChild(a);if("SELECT"===e.tagName)for(u=h.length;u--;)h[u]!==o&&(h[u].selected=!1)}return h};function sa(t){return ra[t]||(ra[t]=a(t))}var oa=function(t){var e,n,r;if(!t||"select"!==t.name||!t.binding)return;e=St(t.node.options).filter(aa),t.getAttribute("multiple")?r=e.map((function(t){return t.value})):(n=e[0])&&(r=n.value);void 0!==r&&t.binding.setValue(r);t.bubble()};function aa(t){return t.selected}var ua=function(){if(this.rendered)throw new Error("Attempted to render an item that was already rendered");return this.docFrag=document.createDocumentFragment(),this.nodes=ia(this.value,this.parentFragment.getNode(),this.docFrag),oa(this.pElement),this.rendered=!0,this.docFrag};var ha=function(t){var e;(e=this.root.viewmodel.wrapped[this.keypath.str])&&(t=e.get());t!==this.value&&(this.value=t,this.parentFragment.bubble(),this.rendered&&Yt.addView(this))};var ca=function(){return null!=this.value?si(""+this.value):""};var la=function(t){this.rendered&&t&&(this.nodes.forEach(b),this.rendered=!1)};var fa=function(){var t,e;if(!this.rendered)return;for(;this.nodes&&this.nodes.length;)(t=this.nodes.pop()).parentNode.removeChild(t);e=this.parentFragment.getNode(),this.nodes=ia(this.value,e,this.docFrag),e.insertBefore(this.docFrag,this.parentFragment.findNextNode(this)),oa(this.pElement)};var da=function(t){this.type=3,Po.init(this,t)};da.prototype={detach:Yo,find:Jo,findAll:Xo,firstNode:ta,getValue:Po.getValue,rebind:Po.rebind,render:ua,resolve:Po.resolve,setValue:ha,toString:ca,unbind:to,unrender:la,update:fa};var pa=da,ma=function(){var t,e=this.node;if(e)return(t=e.parentNode)&&t.removeChild(e),e};var va=function(){return null};var ga=function(){return this.node};var ya=function(t){if(!this.attributes||!this.attributes[t])return;return this.attributes[t].value};var ba,wa,xa,ka,Ea=/^true|on|yes|1$/i,_a=/^[0-9]+$/,Aa=function(){var t=this.useProperty||!this.rendered?this.fragment.getValue():this.fragment.toString();F(t,this.value)||("id"===this.name&&this.value&&delete this.root.nodes[this.value],this.value=t,"value"===this.name&&this.node&&(this.node._ractive.value=t),this.rendered&&Yt.addView(this))};ba="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(" "),wa="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(" "),xa=function(t){for(var e={},n=t.length;n--;)e[t[n].toLowerCase()]=t[n];return e},ka=xa(ba.concat(wa));var Sa=function(t){var e=t.toLowerCase();return ka[e]||e},Ca=function(t){var e=t.fragment.items;if(1!==e.length)return;if(2===e[0].type)return e[0]};var Oa=function(t){var e;this.node=t,t.namespaceURI&&t.namespaceURI!==i.html||(e=Pa[this.name]||this.name,void 0!==t[e]&&(this.propertyName=e),(this.isBoolean||this.isTwoway)&&(this.useProperty=!0),"value"===e&&(t._ractive.value=this.value));this.rendered=!0,this.update()},Pa={"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"};var Ta=function(){var t,e,n,r=this.value;if(!this.locked)for(this.node._ractive.value=r,t=this.node.options,n=t.length;n--;)if(e=t[n],(e._ractive?e._ractive.value:e.value)==r){e.selected=!0;break}};var Fa=function(){var t,e,n,r,i=this.value;P(i)||(i=[i]);t=this.node.options,e=t.length;for(;e--;)n=t[e],r=n._ractive?n._ractive.value:n.value,n.selected=xt(i,r)};var Ra=function(){var t=this.node,e=this.value;t.checked=e==t._ractive.value};var ja=function(){var t,e,n,r,i=this.node;if(t=i.checked,i.value=this.element.getAttribute("value"),i.checked=this.element.getAttribute("value")===this.element.getAttribute("name"),t&&!i.checked&&this.element.binding&&(n=this.element.binding.siblings,r=n.length)){for(;r--;){if(!(e=n[r]).element.node)return;if(e.element.node.checked)return Yt.addRactive(e.root),e.handleChange()}this.root.viewmodel.set(e.keypath,void 0)}};var Na=function(){var t,e,n=this,r=n.element,i=n.node,s=n.value,o=r.binding;if(t=r.getAttribute("value"),P(s)){for(e=s.length;e--;)if(t==s[e])return void(o.isChecked=i.checked=!0);o.isChecked=i.checked=!1}else o.isChecked=i.checked=s==t};var Da=function(){this.node.className=w(this.value)};var Ia=function(){var t=this.node,e=this.value;this.root.nodes[e]=t,t.id=e};var La=function(){var t,e;t=this.node,void 0===(e=this.value)&&(e="");t.style.setAttribute("cssText",e)};var Va=function(){var t=this.value;void 0===t&&(t="");this.locked||(this.node.innerHTML=t)};var Ma=function(){var t=this.node,e=this.value;t._ractive.value=e,this.locked||(t.value=null==e?"":e)};var Ua=function(){this.locked||(this.node[this.propertyName]=this.value)};var Wa=function(){var t=this,e=t.node,n=t.namespace,r=t.name,i=t.value,s=t.fragment;n?e.setAttributeNS(n,r,(s||i).toString()):this.isBoolean?i?e.setAttribute(r,""):e.removeAttribute(r):null==i?e.removeAttribute(r):e.setAttribute(r,(s||i).toString())};var za=function(t){this.init(t)};za.prototype={bubble:Aa,init:function(t){if(this.type=13,this.element=t.element,this.root=t.root,function(t,e){var n,r;if(-1===(n=e.indexOf(":"))||"xmlns"===(r=e.substr(0,n)))t.name=t.element.namespace!==i.html?Sa(e):e;else if(e=e.substring(n+1),t.name=Sa(e),t.namespace=i[r.toLowerCase()],t.namespacePrefix=r,!t.namespace)throw'Unknown namespace ("'+r+'")'}(this,t.name),this.isBoolean=Gr.test(this.name),!t.value||"string"==typeof t.value)return void(this.value=!!this.isBoolean||(t.value||""));this.parentFragment=this.element.parentFragment,this.fragment=new Pl({template:t.value,root:this.root,owner:this}),this.value=this.fragment.getValue(),this.interpolator=Ca(this),this.isBindable=!!this.interpolator&&!this.interpolator.isStatic,this.ready=!0},rebind:function(t,e){this.fragment&&this.fragment.rebind(t,e)},render:Oa,toString:function(){var t=this,e=t.name,n=t.namespacePrefix,r=t.value,i=t.interpolator,s=t.fragment;if("value"===e&&("select"===this.element.name||"textarea"===this.element.name))return;if("value"===e&&void 0!==this.element.getAttribute("contenteditable"))return;if("name"===e&&"input"===this.element.name&&i)return"name={{"+(i.keypath.str||i.ref)+"}}";if(this.isBoolean)return r?e:"";if(s){if(1===s.items.length&&null==s.items[0].value)return"";r=s.toString()}n&&(e=n+":"+e);return r?e+'="'+function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'")}(r)+'"':e},unbind:function(){this.fragment&&this.fragment.unbind();"id"===this.name&&delete this.root.nodes[this.value]},update:function(){var t,e,n=this,r=n.name,s=n.element,o=n.node;"id"===r?e=Ia:"value"===r?"select"===s.name&&"value"===r?e=s.getAttribute("multiple")?Fa:Ta:"textarea"===s.name?e=Ma:null!=s.getAttribute("contenteditable")?e=Va:"input"===s.name&&(t=s.getAttribute("type"),e="file"===t?V:"radio"===t&&s.binding&&"name"===s.binding.name?ja:Ma):this.isTwoway&&"name"===r?"radio"===o.type?e=Ra:"checkbox"===o.type&&(e=Na):"style"===r&&o.style.setAttribute?e=La:"class"!==r||o.namespaceURI&&o.namespaceURI!==i.html?this.useProperty&&(e=Ua):e=Da;e||(e=Wa);this.update=e,this.update()}};var Ba,qa=za;"undefined"!=typeof document&&(Ba=a("div"));var $a=function(t,e){this.element=t,this.root=t.root,this.parentFragment=t.parentFragment,this.attributes=[],this.fragment=new Pl({root:t.root,owner:this,template:[e]})};$a.prototype={bubble:function(){this.node&&this.update(),this.element.bubble()},rebind:function(t,e){this.fragment.rebind(t,e)},render:function(t){this.node=t,this.isSvg=t.namespaceURI===i.svg,this.update()},unbind:function(){this.fragment.unbind()},update:function(){var t,e,n=this;t=this.fragment.toString(),e=function(t,e){var n=e?"svg":"div";return Ba.innerHTML="<"+n+" "+t+"></"+n+">",St(Ba.childNodes[0].attributes)}(t,this.isSvg),this.attributes.filter((function(t){return function(t,e){var n=t.length;for(;n--;)if(t[n].name===e.name)return!1;return!0}(e,t)})).forEach((function(t){n.node.removeAttribute(t.name)})),e.forEach((function(t){n.node.setAttribute(t.name,t.value)})),this.attributes=e},toString:function(){return this.fragment.toString()}};var Qa=$a;var Za=function(t){var e,n,r,i;if(this.element=t,this.root=t.root,this.attribute=t.attributes[this.name||"value"],(e=this.attribute.interpolator).twowayBinding=this,n=e.keypath){if("}"===n.str.slice(-1))return Q("Two-way binding does not work with expressions (`%s` on <%s>)",e.resolver.uniqueString,t.name,{ractive:this.root}),!1;if(n.isSpecial)return Q("Two-way binding does not work with %s",e.resolver.ref,{ractive:this.root}),!1}else{$("The %s being used for two-way binding is ambiguous, and may cause unexpected results. Consider initialising your data to eliminate the ambiguity",e.template.r?"'"+e.template.r+"' reference":"expression",{ractive:this.root}),e.resolver.forceResolution(),n=e.keypath}this.attribute.isTwoway=!0,this.keypath=n,void 0===(r=this.root.viewmodel.get(n))&&this.getInitialValue&&void 0!==(r=this.getInitialValue())&&this.root.viewmodel.set(n,r),(i=function(t){for(;t=t.parent;)if("form"===t.name)return t}(t))&&(this.resetValue=r,i.formBindings.push(this))};Za.prototype={handleChange:function(){var t=this;Yt.start(this.root),this.attribute.locked=!0,this.root.viewmodel.set(this.keypath,this.getValue()),Yt.scheduleTask((function(){return t.attribute.locked=!1})),Yt.end()},rebound:function(){var t,e;(t=this.keypath)!==(e=this.attribute.interpolator.keypath)&&(At(this.root._twowayBindings[t.str],this),this.keypath=e,(this.root._twowayBindings[e.str]||(this.root._twowayBindings[e.str]=[])).push(this))},unbind:function(){}},Za.extend=function(t){var e;return A((e=function(t){Za.call(this,t),this.init&&this.init()}).prototype=x(this.prototype),t),e.extend=Za.extend,e};var Ha=Za;var Ka=function(){this._ractive.binding.handleChange()};var Ga=Ha.extend({getInitialValue:function(){return""},getValue:function(){return this.element.node.value},render:function(){var t,e=this.element.node,n=!1;this.rendered=!0,t=this.root.lazy,!0===this.element.lazy?t=!0:!1===this.element.lazy?t=!1:R(this.element.lazy)?(t=!1,n=+this.element.lazy):R(t||"")&&(n=+t,t=!1,this.element.lazy=n),this.handler=n?Ja:Ka,e.addEventListener("change",Ka,!1),t||(e.addEventListener("input",this.handler,!1),e.attachEvent&&e.addEventListener("keyup",this.handler,!1)),e.addEventListener("blur",Ya,!1)},unrender:function(){var t=this.element.node;this.rendered=!1,t.removeEventListener("change",Ka,!1),t.removeEventListener("input",this.handler,!1),t.removeEventListener("keyup",this.handler,!1),t.removeEventListener("blur",Ya,!1)}});function Ya(){var t;Ka.call(this),t=this._ractive.root.viewmodel.get(this._ractive.binding.keypath),this.value=null==t?"":t}function Ja(){var t=this._ractive.binding,e=this;t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout((function(){t.rendered&&Ka.call(e),t._timeout=void 0}),t.element.lazy)}var Xa=Ga.extend({getInitialValue:function(){return this.element.fragment?this.element.fragment.toString():""},getValue:function(){return this.element.node.innerHTML}}),tu=function(t,e,n){var r=t+e+n;return eu[r]||(eu[r]=[])},eu={};var nu=Ha.extend({name:"checked",init:function(){this.siblings=tu(this.root._guid,"radio",this.element.getAttribute("name")),this.siblings.push(this)},render:function(){var t=this.element.node;t.addEventListener("change",Ka,!1),t.attachEvent&&t.addEventListener("click",Ka,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",Ka,!1),t.removeEventListener("click",Ka,!1)},handleChange:function(){Yt.start(this.root),this.siblings.forEach((function(t){t.root.viewmodel.set(t.keypath,t.getValue())})),Yt.end()},getValue:function(){return this.element.node.checked},unbind:function(){At(this.siblings,this)}}),ru=Ha.extend({name:"name",init:function(){this.siblings=tu(this.root._guid,"radioname",this.keypath.str),this.siblings.push(this),this.radioName=!0},getInitialValue:function(){if(this.element.getAttribute("checked"))return this.element.getAttribute("value")},render:function(){var t=this.element.node;t.name="{{"+this.keypath.str+"}}",t.checked=this.root.viewmodel.get(this.keypath)==this.element.getAttribute("value"),t.addEventListener("change",Ka,!1),t.attachEvent&&t.addEventListener("click",Ka,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",Ka,!1),t.removeEventListener("click",Ka,!1)},getValue:function(){var t=this.element.node;return t._ractive?t._ractive.value:t.value},handleChange:function(){this.element.node.checked&&Ha.prototype.handleChange.call(this)},rebound:function(t,e){var n;Ha.prototype.rebound.call(this,t,e),(n=this.element.node)&&(n.name="{{"+this.keypath.str+"}}")},unbind:function(){At(this.siblings,this)}});function iu(t){return t.isChecked}function su(t){return t.element.getAttribute("value")}var ou=Ha.extend({name:"name",getInitialValue:function(){return this.noInitialValue=!0,[]},init:function(){var t,e;this.checkboxName=!0,this.siblings=tu(this.root._guid,"checkboxes",this.keypath.str),this.siblings.push(this),this.noInitialValue&&(this.siblings.noInitialValue=!0),this.siblings.noInitialValue&&this.element.getAttribute("checked")&&(t=this.root.viewmodel.get(this.keypath),e=this.element.getAttribute("value"),t.push(e))},unbind:function(){At(this.siblings,this)},render:function(){var t,e,n=this.element.node;t=this.root.viewmodel.get(this.keypath),e=this.element.getAttribute("value"),P(t)?this.isChecked=xt(t,e):this.isChecked=t==e,n.name="{{"+this.keypath.str+"}}",n.checked=this.isChecked,n.addEventListener("change",Ka,!1),n.attachEvent&&n.addEventListener("click",Ka,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",Ka,!1),t.removeEventListener("click",Ka,!1)},changed:function(){var t=!!this.isChecked;return this.isChecked=this.element.node.checked,this.isChecked===t},handleChange:function(){this.isChecked=this.element.node.checked,Ha.prototype.handleChange.call(this)},getValue:function(){return this.siblings.filter(iu).map(su)}}),au=Ha.extend({name:"checked",render:function(){var t=this.element.node;t.addEventListener("change",Ka,!1),t.attachEvent&&t.addEventListener("click",Ka,!1)},unrender:function(){var t=this.element.node;t.removeEventListener("change",Ka,!1),t.removeEventListener("click",Ka,!1)},getValue:function(){return this.element.node.checked}}),uu=Ha.extend({getInitialValue:function(){var t,e,n,r,i=this.element.options;if(void 0===this.element.getAttribute("value")&&(e=t=i.length,t)){for(;e--;)if(i[e].getAttribute("selected")){n=i[e].getAttribute("value"),r=!0;break}if(!r)for(;++e<t;)if(!i[e].getAttribute("disabled")){n=i[e].getAttribute("value");break}return void 0!==n&&(this.element.attributes.value.value=n),n}},render:function(){this.element.node.addEventListener("change",Ka,!1)},unrender:function(){this.element.node.removeEventListener("change",Ka,!1)},setValue:function(t){this.root.viewmodel.set(this.keypath,t)},getValue:function(){var t,e,n,r;for(n=(t=this.element.node.options).length,e=0;e<n;e+=1)if(r=t[e],t[e].selected)return r._ractive?r._ractive.value:r.value},forceUpdate:function(){var t=this,e=this.getValue();void 0!==e&&(this.attribute.locked=!0,Yt.scheduleTask((function(){return t.attribute.locked=!1})),this.root.viewmodel.set(this.keypath,e))}}),hu=uu.extend({getInitialValue:function(){return this.element.options.filter((function(t){return t.getAttribute("selected")})).map((function(t){return t.getAttribute("value")}))},render:function(){this.element.node.addEventListener("change",Ka,!1),void 0===this.root.viewmodel.get(this.keypath)&&this.handleChange()},unrender:function(){this.element.node.removeEventListener("change",Ka,!1)},setValue:function(){throw new Error("TODO not implemented yet")},getValue:function(){var t,e,n,r,i,s;for(t=[],r=(e=this.element.node.options).length,n=0;n<r;n+=1)(i=e[n]).selected&&(s=i._ractive?i._ractive.value:i.value,t.push(s));return t},handleChange:function(){var t,e;return t=this.attribute.value,e=this.getValue(),void 0!==t&&kt(e,t)||uu.prototype.handleChange.call(this),this},forceUpdate:function(){var t=this,e=this.getValue();void 0!==e&&(this.attribute.locked=!0,Yt.scheduleTask((function(){return t.attribute.locked=!1})),this.root.viewmodel.set(this.keypath,e))},updateModel:function(){void 0!==this.attribute.value&&this.attribute.value.length||this.root.viewmodel.set(this.keypath,this.initialValue)}}),cu=Ha.extend({render:function(){this.element.node.addEventListener("change",Ka,!1)},unrender:function(){this.element.node.removeEventListener("change",Ka,!1)},getValue:function(){return this.element.node.files}}),lu=Ga.extend({getInitialValue:function(){},getValue:function(){var t=parseFloat(this.element.node.value);return isNaN(t)?void 0:t}}),fu=function(t){var e,n,r,i,s,o=t.attributes;t.binding&&(t.binding.teardown(),t.binding=null);(t.getAttribute("contenteditable")||o.contenteditable&&du(o.contenteditable))&&du(o.value)?n=Xa:"input"===t.name?"radio"===(e=t.getAttribute("type"))||"checkbox"===e?(r=du(o.name),i=du(o.checked),r&&i&&$("A radio input can have two-way binding on its name attribute, or its checked attribute - not both",{ractive:t.root}),r?n="radio"===e?ru:ou:i&&(n="radio"===e?nu:au)):"file"===e&&du(o.value)?n=cu:du(o.value)&&(n="number"===e||"range"===e?lu:Ga):"select"===t.name&&du(o.value)?n=t.getAttribute("multiple")?hu:uu:"textarea"===t.name&&du(o.value)&&(n=Ga);if(n&&(s=new n(t))&&s.keypath)return s};function du(t){return t&&t.isBindable}var pu=function(t,e,n){var r,i,s=this;this.element=t,this.root=t.root,this.parentFragment=t.parentFragment,this.name=e,-1!==e.indexOf("*")&&(W('Only component proxy-events may contain "*" wildcards, <%s on-%s="..."/> is not valid',t.name,e),this.invalid=!0);n.m?(i=n.a.r,this.method=n.m,this.keypaths=[],this.fn=po(n.a.s,i.length),this.parentFragment=t.parentFragment,this.root,this.refResolvers=[],i.forEach((function(t,e){var n=void 0;(n=mu.exec(t))?s.keypaths[e]={eventObject:!0,refinements:n[1]?n[1].split("."):[]}:s.refResolvers.push(fo(s,t,(function(t){return s.resolve(e,t)})))})),this.fire=vu):("string"!=typeof(r=n.n||n)&&(r=new Pl({template:r,root:this.root,owner:this})),this.action=r,n.d?(this.dynamicParams=new Pl({template:n.d,root:this.root,owner:this.element}),this.fire=yu):n.a&&(this.params=n.a,this.fire=gu))},mu=/^event(?:\.(.+))?/;function vu(t){var e,n,r;if("function"!=typeof(e=this.root)[this.method])throw new Error('Attempted to call a non-existent method ("'+this.method+'")');n=this.keypaths.map((function(n){var r,i,s;if(void 0!==n){if(n.eventObject){if(r=t,i=n.refinements.length)for(s=0;s<i;s+=1)r=r[n.refinements[s]]}else r=e.viewmodel.get(n);return r}})),Se.enqueue(e,t),r=this.fn.apply(null,n),e[this.method].apply(e,r),Se.dequeue(e)}function gu(t){Ce(this.root,this.getAction(),{event:t,args:this.params})}function yu(t){var e=this.dynamicParams.getArgsList();"string"==typeof e&&(e=e.substr(1,e.length-2)),Ce(this.root,this.getAction(),{event:t,args:e})}var bu=function(t){var e,n,r,i={};e=this._ractive,n=e.events[t.type],(r=co(n.element.parentFragment))&&(i=co.resolve(r));n.fire({node:this,original:t,index:i,keypath:e.keypath.str,context:e.root.viewmodel.get(e.keypath)})};var wu=function(){var t,n=this.name;if(this.invalid)return;if(t=K("events",this.root,n))this.custom=t(this.node,function(t){xu[t]||(xu[t]=function(e){var n=e.node._ractive;e.index=n.index,e.keypath=n.keypath.str,e.context=n.root.viewmodel.get(n.keypath),n.events[t].fire(e)});return xu[t]}(n));else{if(!("on"+n in this.node||window&&"on"+n in window||e))return void(ku[n]||Q(H(n,"event"),{node:this.node}));this.node.addEventListener(n,bu,!1)}this.hasListener=!0},xu={},ku={touchstart:!0,touchmove:!0,touchend:!0,touchcancel:!0,touchleave:!0};var Eu=function(t,e,n){this.init(t,e,n)};Eu.prototype={bubble:function(){var t=this.getAction();t&&!this.hasListener?this.listen():!t&&this.hasListener&&this.unrender()},fire:function(t){Ce(this.root,this.getAction(),{event:t})},getAction:function(){return this.action.toString().trim()},init:pu,listen:wu,rebind:function(t,e){if(this.method)return this.element.parentFragment,void this.refResolvers.forEach(n);"string"!=typeof this.action&&n(this.action);this.dynamicParams&&n(this.dynamicParams);function n(n){n&&n.rebind(t,e)}},render:function(){this.node=this.element.node,this.node._ractive.events[this.name]=this,(this.method||this.getAction())&&this.listen()},resolve:function(t,e){this.keypaths[t]=e},unbind:function(){if(this.method)return void this.refResolvers.forEach(Ut);"string"!=typeof this.action&&this.action.unbind();this.dynamicParams&&this.dynamicParams.unbind()},unrender:function(){this.custom?this.custom.teardown():this.node.removeEventListener(this.name,bu,!1);this.hasListener=!1}};var _u=Eu,Au=function(t,e){var n,r,i,s=this;this.element=t,this.root=n=t.root,"string"!=typeof(r=e.n||e)&&(r=(i=new Pl({template:r,root:n,owner:t})).toString(),i.unbind(),""===r)||(e.a?this.params=e.a:e.d&&(this.fragment=new Pl({template:e.d,root:n,owner:t}),this.params=this.fragment.getArgsList(),this.fragment.bubble=function(){this.dirtyArgs=this.dirtyValue=!0,s.params=this.getArgsList(),s.ready&&s.update()}),this.fn=K("decorators",n,r),this.fn||W(H(r,"decorator")))};Au.prototype={init:function(){var t,e,n;if(t=this.element.node,this.params?(n=[t].concat(this.params),e=this.fn.apply(this.root,n)):e=this.fn.call(this.root,t),!e||!e.teardown)throw new Error("Decorator definition must return an object with a teardown method");this.actual=e,this.ready=!0},update:function(){this.actual.update?this.actual.update.apply(this.root,this.params):(this.actual.teardown(!0),this.init())},rebind:function(t,e){this.fragment&&this.fragment.rebind(t,e)},teardown:function(t){this.torndown=!0,this.ready&&this.actual.teardown(),!t&&this.fragment&&this.fragment.unbind()}};var Su=Au;function Cu(){var t=this;this.dirty||(this.dirty=!0,Yt.scheduleTask((function(){!function(t){var e,n,r,i,s;if(!(e=t.node))return;i=St(e.options),n=t.getAttribute("value"),r=t.getAttribute("multiple"),void 0!==n?(i.forEach((function(t){var e,i;e=t._ractive?t._ractive.value:t.value,(i=r?function(t,e){var n=t.length;for(;n--;)if(t[n]==e)return!0}(n,e):n==e)&&(s=!0),t.selected=i})),s||(i[0]&&(i[0].selected=!0),t.binding&&t.binding.forceUpdate())):t.binding&&t.binding.forceUpdate()}(t),t.dirty=!1}))),this.parentFragment.bubble()}var Ou=function(t){var e,n,r,i,s,o;this.type=7,e=this.parentFragment=t.parentFragment,n=this.template=t.template,this.parent=t.pElement||e.pElement,this.root=r=e.root,this.index=t.index,this.key=t.key,this.name=Sa(n.e),"option"===this.name&&function(t,e){t.select=function(t){if(t)do{if("select"===t.name)return t}while(t=t.parent)}(t.parent),t.select&&(t.select.options.push(t),e.a||(e.a={}),void 0!==e.a.value||e.a.hasOwnProperty("disabled")||(e.a.value=e.f),"selected"in e.a&&void 0!==t.select.getAttribute("value")&&delete e.a.selected)}(this,n);"select"===this.name&&(this.options=[],this.bubble=Cu);"form"===this.name&&(this.formBindings=[]);o=function(t,e){var n,r,i;return r={},void 0!==(n=(i=e.a||{}).twoway)&&(r.twoway=0===n||Ea.test(n)),void 0!==(n=i.lazy)&&(0!==n&&_a.test(n)?r.lazy=parseInt(n):r.lazy=0===n||Ea.test(n)),r}(0,n),this.attributes=function(t,e){var n,r,i=[];for(n in e)"twoway"!==n&&"lazy"!==n&&e.hasOwnProperty(n)&&(r=new qa({element:t,name:n,value:e[n],root:t.root}),i[n]=r,"value"!==n&&i.push(r));return(r=i.value)&&i.push(r),i}(this,n.a),this.conditionalAttributes=function(t,e){return e?e.map((function(e){return new Qa(t,e)})):[]}(this,n.m),n.f&&(this.fragment=new Pl({template:n.f,root:r,owner:this,pElement:this,cssIds:null}));s=r.twoway,!1===o.twoway?s=!1:!0===o.twoway&&(s=!0);this.twoway=s,this.lazy=o.lazy,s&&(i=fu(this,n.a))&&(this.binding=i,(this.root._twowayBindings[i.keypath.str]||(this.root._twowayBindings[i.keypath.str]=[])).push(i));n.v&&(this.eventHandlers=function(t,e){var n,r,i,s,o=[];for(r in e)if(e.hasOwnProperty(r))for(n=(i=r.split("-")).length;n--;)s=new _u(t,i[n],e[r]),o.push(s);return o}(this,n.v));n.o&&(this.decorator=new Su(this,n.o));this.intro=n.t0||n.t1,this.outro=n.t0||n.t2};var Pu=function(t,e){var n,r,i;this.attributes&&this.attributes.forEach(s);this.conditionalAttributes&&this.conditionalAttributes.forEach(s);this.eventHandlers&&this.eventHandlers.forEach(s);this.decorator&&s(this.decorator);this.fragment&&s(this.fragment);if(i=this.liveQueries)for(this.root,n=i.length;n--;)i[n]._makeDirty();this.node&&(r=this.node._ractive)&&ot(r,"keypath",t,e);function s(n){n.rebind(t,e)}};function Tu(){var t=this._ractive.proxy;Yt.start(),t.formBindings.forEach(Fu),Yt.end()}function Fu(t){t.root.viewmodel.set(t.keypath,t.resetValue)}var Ru=function(t,e,n){var r,i,s;if(this.element=t,this.root=r=t.root,this.isIntro=n,"string"!=typeof(i=e.n||e)&&(s=new Pl({template:i,root:r,owner:t}),i=s.toString(),s.unbind(),""===i))return;this.name=i,e.a?this.params=e.a:e.d&&(s=new Pl({template:e.d,root:r,owner:t}),this.params=s.getArgsList(),s.unbind());this._fn=K("transitions",r,i),this._fn||Q(H(i,"transition"),{ractive:this.root})};var ju,Nu,Du,Iu=function(t){return t.replace(/-([a-zA-Z])/g,(function(t,e){return e.toUpperCase()}))};t?(Nu={},Du=a("div").style,ju=function(t){var e,n,r;if(t=Iu(t),!Nu[t])if(void 0!==Du[t])Nu[t]=t;else for(r=t.charAt(0).toUpperCase()+t.substring(1),e=o.length;e--;)if(n=o[e],void 0!==Du[n+r]){Nu[t]=n+r;break}return Nu[t]}):ju=null;var Lu,Vu,Mu=ju;t?(Vu=window.getComputedStyle||null.getComputedStyle,Lu=function(t){var e,n,r,i,s;if(e=Vu(this.node),"string"==typeof t)return"0px"===(s=e[Mu(t)])&&(s=0),s;if(!P(t))throw new Error("Transition$getStyle must be passed a string, or an array of strings representing CSS properties");for(n={},r=t.length;r--;)i=t[r],"0px"===(s=e[Mu(i)])&&(s=0),n[i]=s;return n}):Lu=null;var Uu=Lu,Wu=function(t){var e;this.duration=t.duration,this.step=t.step,this.complete=t.complete,"string"==typeof t.easing?(e=t.root.easing[t.easing])||(Q(H(t.easing,"easing")),e=Bu):e="function"==typeof t.easing?t.easing:Bu,this.easing=e,this.start=vt(),this.end=this.start+this.duration,this.running=!0,ne.add(this)};Wu.prototype={tick:function(t){var e,n;return!!this.running&&(t>this.end?(this.step&&this.step(1),this.complete&&this.complete(1),!1):(e=t-this.start,n=this.easing(e/this.duration),this.step&&this.step(n),!0))},stop:function(){this.abort&&this.abort(),this.running=!1}};var zu=Wu;function Bu(t){return t}var qu,$u,Qu,Zu,Hu,Ku,Gu,Yu,Ju=new RegExp("^-(?:"+o.join("|")+")-"),Xu=new RegExp("^(?:"+o.join("|")+")([A-Z])"),th=function(t){return t?(Xu.test(t)&&(t="-"+t),t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))):""},eh={},nh={};t?(void 0!==($u=a("div").style).transition?(Qu="transition",Zu="transitionend",Hu=!0):void 0!==$u.webkitTransition?(Qu="webkitTransition",Zu="webkitTransitionEnd",Hu=!0):Hu=!1,Qu&&(Ku=Qu+"Duration",Gu=Qu+"Property",Yu=Qu+"TimingFunction"),qu=function(t,e,n,r,i){setTimeout((function(){var s,o,a,u,h;u=function(){o&&a&&(t.root.fire(t.name+":end",t.node,t.isIntro),i())},s=(t.node.namespaceURI||"")+t.node.tagName,t.node.style[Gu]=r.map(Mu).map(th).join(","),t.node.style[Yu]=th(n.easing||"linear"),t.node.style[Ku]=n.duration/1e3+"s",h=function(e){var n;-1!==(n=r.indexOf(Iu(e.propertyName.replace(Ju,""))))&&r.splice(n,1),r.length||(t.node.removeEventListener(Zu,h,!1),a=!0,u())},t.node.addEventListener(Zu,h,!1),setTimeout((function(){for(var i,c,l,f,d,p=r.length,m=[];p--;)f=r[p],i=s+f,Hu&&!nh[i]&&(t.node.style[Mu(f)]=e[f],eh[i]||(c=t.getStyle(f),eh[i]=t.getStyle(f)!=e[f],nh[i]=!eh[i],nh[i]&&(t.node.style[Mu(f)]=c))),Hu&&!nh[i]||(void 0===c&&(c=t.getStyle(f)),-1===(l=r.indexOf(f))?$("Something very strange happened with transitions. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!",{node:t.node}):r.splice(l,1),d=/[^\d]*$/.exec(e[f])[0],m.push({name:Mu(f),interpolator:Y(parseFloat(c),parseFloat(e[f])),suffix:d}));m.length?new zu({root:t.root,duration:n.duration,easing:Iu(n.easing||""),step:function(e){var n,r;for(r=m.length;r--;)n=m[r],t.node.style[n.name]=n.interpolator(e)+n.suffix},complete:function(){o=!0,u()}}):o=!0,r.length||(t.node.removeEventListener(Zu,h,!1),a=!0,u())}),0)}),n.delay||0)}):qu=null;var rh,ih,sh,oh,ah,uh=qu;if("undefined"!=typeof document){if(ah={},(rh="hidden")in document)sh="";else for(oh=o.length;oh--;)ih=o[oh],(rh=ih+"Hidden")in document&&(sh=ih);void 0!==sh?(document.addEventListener(sh+"visibilitychange",hh),hh()):("onfocusout"in document?(document.addEventListener("focusout",ch),document.addEventListener("focusin",lh)):(window.addEventListener("pagehide",ch),window.addEventListener("blur",ch),window.addEventListener("pageshow",lh),window.addEventListener("focus",lh)),ah.hidden=!1)}function hh(){ah.hidden=document[rh]}function ch(){ah.hidden=!0}function lh(){ah.hidden=!1}var fh,dh,ph,mh=ah;t?(dh=window.getComputedStyle||null.getComputedStyle,fh=function(t,e,n){var r,i=this;if(4===arguments.length)throw new Error("t.animateStyle() returns a promise - use .then() instead of passing a callback");if(mh.hidden)return this.setStyle(t,e),ph||(ph=Ft.resolve());"string"==typeof t?(r={})[t]=e:(r=t,n=e),n||(Q('The "%s" 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',this.name),n=this);var s=new Ft((function(t){var e,s,o,a,u,h;if(!n.duration)return i.setStyle(r),void t();for(e=Object.keys(r),s=[],o=dh(i.node),u=e.length;u--;)h=e[u],"0px"===(a=o[Mu(h)])&&(a=0),a!=r[h]&&(s.push(h),i.node.style[Mu(h)]=a);s.length?uh(i,r,n,s,t):t()}));return s}):fh=null;var vh=function(t,e,n){this.init(t,e,n)};vh.prototype={init:Ru,start:function(){var t,e,n,r=this;if(t=this.node=this.element.node,e=t.getAttribute("style"),this.complete=function(i){n||(!i&&r.isIntro&&function(t,e){e?t.setAttribute("style",e):(t.getAttribute("style"),t.removeAttribute("style"))}(t,e),t._ractive.transition=null,r._manager.remove(r),n=!0)},!this._fn)return void this.complete();this._fn.apply(this.root,[this].concat(this.params))},getStyle:Uu,setStyle:function(t,e){var n;if("string"==typeof t)this.node.style[Mu(t)]=e;else for(n in t)t.hasOwnProperty(n)&&(this.node.style[Mu(n)]=t[n]);return this},animateStyle:fh,processParams:function(t,e){return"number"==typeof t?t={duration:t}:"string"==typeof t?t="slow"===t?{duration:600}:"fast"===t?{duration:200}:{duration:400}:t||(t={}),function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.forEach((function(e){for(var n in e)e.hasOwnProperty(n)&&!(n in t)&&(t[n]=e[n])})),t}({},t,e)}};var gh,yh,bh=vh,wh=function(){var t,e,n,r=this,s=this.root;t=function(t){var e,n,r;e=(n=t.getAttribute("xmlns"))?n:"svg"===t.name?i.svg:(r=t.parent)?"foreignObject"===r.name?i.html:r.node.namespaceURI:t.root.el.namespaceURI;return e}(this),e=this.node=a(this.name,t),this.parentFragment.cssIds&&this.node.setAttribute("data-ractive-css",this.parentFragment.cssIds.map((function(t){return"{"+t+"}"})).join(" "));k(this.node,"_ractive",{value:{proxy:this,keypath:Nt(this.parentFragment),events:x(null),root:s}}),this.attributes.forEach((function(t){return t.render(e)})),this.conditionalAttributes.forEach((function(t){return t.render(e)})),this.fragment&&("script"===this.name?(this.bubble=yh,this.node.text=this.fragment.toString(!1),this.fragment.unrender=V):"style"===this.name?(this.bubble=gh,this.bubble(),this.fragment.unrender=V):this.binding&&this.getAttribute("contenteditable")?this.fragment.unrender=V:this.node.appendChild(this.fragment.render()));this.binding&&(this.binding.render(),this.node._ractive.binding=this.binding);this.eventHandlers&&this.eventHandlers.forEach((function(t){return t.render()}));"option"===this.name&&function(t){var e,n,r;if(!t.select)return;if(void 0===(n=t.select.getAttribute("value")))return;if(e=t.getAttribute("value"),t.select.node.multiple&&P(n)){for(r=n.length;r--;)if(e==n[r]){t.node.selected=!0;break}}else t.node.selected=e==n}(this);"img"===this.name?((o=this).attributes.width||o.attributes.height)&&o.node.addEventListener("load",u=function(){var t=o.getAttribute("width"),e=o.getAttribute("height");void 0!==t&&o.node.setAttribute("width",t),void 0!==e&&o.node.setAttribute("height",e),o.node.removeEventListener("load",u,!1)},!1):"form"===this.name?function(t){t.node.addEventListener("reset",Tu,!1)}(this):"input"===this.name||"textarea"===this.name?this.node.defaultValue=this.node.value:"option"===this.name&&(this.node.defaultSelected=this.node.selected);var o,u;this.decorator&&this.decorator.fn&&Yt.scheduleTask((function(){r.decorator.torndown||r.decorator.init()}),!0);s.transitionsEnabled&&this.intro&&(n=new bh(this,this.intro,!0),Yt.registerTransition(n),Yt.scheduleTask((function(){return n.start()}),!0),this.transition=n);this.node.autofocus&&Yt.scheduleTask((function(){return r.node.focus()}),!0);return function(t){var e,n,r,i,s;e=t.root;do{for(n=e._liveQueries,r=n.length;r--;)i=n[r],(s=n["_"+i])._test(t)&&(t.liveQueries||(t.liveQueries=[])).push(s)}while(e=e.parent)}(this),this.node};gh=function(){var t=this.node,e=this.fragment.toString(!1);if(window&&window.appearsToBeIELessEqual8&&(t.type="text/css"),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}},yh=function(){this.node.type&&"text/javascript"!==this.node.type||$("Script tag was updated. This does not cause the code to be re-evaluated!",{ractive:this.root}),this.node.text=this.fragment.toString(!1)};function xh(t){var e=t.toString();return e?" "+e:""}var kh=function(t){this.init(t)};kh.prototype={bubble:function(){this.parentFragment.bubble()},detach:ma,find:function(t){return this.node?u(this.node,t)?this.node:this.fragment&&this.fragment.find?this.fragment.find(t):void 0:null},findAll:function(t,e){e._test(this,!0)&&e.live&&(this.liveQueries||(this.liveQueries=[])).push(e),this.fragment&&this.fragment.findAll(t,e)},findAllComponents:function(t,e){this.fragment&&this.fragment.findAllComponents(t,e)},findComponent:function(t){if(this.fragment)return this.fragment.findComponent(t)},findNextNode:va,firstNode:ga,getAttribute:ya,init:Ou,rebind:Pu,render:wh,toString:function(){var t,e;return this.template.y?"<!DOCTYPE"+this.template.dd+">":(t="<"+this.template.e,t+=this.attributes.map(xh).join("")+this.conditionalAttributes.map(xh).join(""),"option"===this.name&&function(t){var e,n,r;if(void 0===(e=t.getAttribute("value"))||!t.select)return!1;if((n=t.select.getAttribute("value"))==e)return!0;if(t.select.getAttribute("multiple")&&P(n))for(r=n.length;r--;)if(n[r]==e)return!0}(this)&&(t+=" selected"),"input"===this.name&&function(t){var e,n,r,i;if(e=t.attributes,n=e.type,r=e.value,i=e.name,!n||"radio"!==n.value||!r||!i.interpolator)return;if(r.value===i.interpolator.value)return!0}(this)&&(t+=" checked"),t+=">","textarea"===this.name&&void 0!==this.getAttribute("value")?t+=oi(this.getAttribute("value")):void 0!==this.getAttribute("contenteditable")&&(t+=this.getAttribute("value")||""),this.fragment&&(e="script"!==this.name&&"style"!==this.name,t+=this.fragment.toString(e)),Yr.test(this.template.e)||(t+="</"+this.template.e+">"),t)},unbind:function(){this.fragment&&this.fragment.unbind();this.binding&&this.binding.unbind();this.eventHandlers&&this.eventHandlers.forEach(Ut);"option"===this.name&&(t=this).select&&At(t.select.options,t);var t;this.attributes.forEach(Ut),this.conditionalAttributes.forEach(Ut)},unrender:function(t){var e,n,r;(r=this.transition)&&r.complete();"option"===this.name?this.detach():t&&Yt.detachWhenReady(this);this.fragment&&this.fragment.unrender(!1);(e=this.binding)&&(this.binding.unrender(),this.node._ractive.binding=null,(n=this.root._twowayBindings[e.keypath.str]).splice(n.indexOf(e),1));this.eventHandlers&&this.eventHandlers.forEach(Wt);this.decorator&&Yt.registerDecorator(this.decorator);this.root.transitionsEnabled&&this.outro&&(r=new bh(this,this.outro,!1),Yt.registerTransition(r),Yt.scheduleTask((function(){return r.start()})));this.liveQueries&&function(t){var e,n;n=t.liveQueries.length;for(;n--;)(e=t.liveQueries[n]).selector,e._remove(t.node)}(this);"form"===this.name&&function(t){t.node.removeEventListener("reset",Tu,!1)}(this)}};var Eh=kh,_h=/^\s*$/,Ah=/^\s*/;function Sh(t,e){var n=Ah.exec(e)[0];return null===t||n.length<t.length?n:t}var Ch=function(t,e,n){var r;if(r=function(t,e,n){var r=void 0,i=Ph(e,n.owner);if(i)return i;var s=G("partials",t,e);if(!s)return;"function"==typeof(i=s.partials[e])&&((r=i.bind(s)).isOwner=s.partials.hasOwnProperty(e),i=r.call(t,ys));if(!i&&""!==i)return void $(Z,e,"partial","partial",{ractive:t});if(!ys.isParsed(i)){var o=ys.parse(i,ys.getParseOptions(s));o.p&&$("Partials ({{>%s}}) cannot contain nested inline partials",e,{ractive:t}),(r?s:function(t,e){return t.partials.hasOwnProperty(e)?t:Oh(t.constructor,e)}(s,e)).partials[e]=i=o.t}r&&(i._fn=r);return i.v?i.t:i}(t,e,n||{}))return r;if(r=ys.fromId(e,{noThrow:!0})){void 0!==(a=(o=(s=r).split("\n"))[0])&&_h.test(a)&&o.shift(),void 0!==(u=_t(o))&&_h.test(u)&&o.pop(),(h=o.reduce(Sh,null))&&(s=o.map((function(t){return t.replace(h,"")})).join("\n")),r=s;var i=ys.parse(r,ys.getParseOptions(t));return t.partials[e]=i.t}var s,o,a,u,h};function Oh(t,e){if(t)return t.partials.hasOwnProperty(e)?t:Oh(t._Parent,e)}function Ph(t,e){if(e){if(e.template&&e.template.p&&e.template.p[t])return e.template.p[t];if(e.parentFragment&&e.parentFragment.owner)return Ph(t,e.parentFragment.owner)}}var Th=function(t){var e,n;e=this.parentFragment=t.parentFragment,this.root=e.root,this.type=8,this.index=t.index,this.name=t.template.r,this.rendered=!1,this.fragment=this.fragmentToRender=this.fragmentToUnrender=null,Po.init(this,t),this.keypath||((n=Ch(this.root,this.name,e))?(to.call(this),this.isNamed=!0,this.setTemplate(n)):Q('Could not find template for partial "%s"',this.name))};Th.prototype={bubble:function(){this.parentFragment.bubble()},detach:function(){return this.fragment.detach()},find:function(t){return this.fragment.find(t)},findAll:function(t,e){return this.fragment.findAll(t,e)},findComponent:function(t){return this.fragment.findComponent(t)},findAllComponents:function(t,e){return this.fragment.findAllComponents(t,e)},firstNode:function(){return this.fragment.firstNode()},findNextNode:function(){return this.parentFragment.findNextNode(this)},getPartialName:function(){return this.isNamed&&this.name||void 0===this.value?this.name:this.value},getValue:function(){return this.fragment.getValue()},rebind:function(t,e){this.isNamed||Oo.call(this,t,e),this.fragment&&this.fragment.rebind(t,e)},render:function(){return this.docFrag=document.createDocumentFragment(),this.update(),this.rendered=!0,this.docFrag},resolve:Po.resolve,setValue:function(t){var e;void 0!==t&&t===this.value||(void 0!==t&&(e=Ch(this.root,""+t,this.parentFragment)),!e&&this.name&&(e=Ch(this.root,this.name,this.parentFragment))&&(to.call(this),this.isNamed=!0),e||Q('Could not find template for partial "%s"',this.name,{ractive:this.root}),this.value=t,this.setTemplate(e||[]),this.bubble(),this.rendered&&Yt.addView(this))},setTemplate:function(t){this.fragment&&(this.fragment.unbind(),this.rendered&&(this.fragmentToUnrender=this.fragment)),this.fragment=new Pl({template:t,root:this.root,owner:this,pElement:this.parentFragment.pElement}),this.fragmentToRender=this.fragment},toString:function(t){var e,n,r,i;return e=this.fragment.toString(t),(n=this.parentFragment.items[this.index-1])&&1===n.type?(r=n.text.split("\n").pop(),(i=/^\s+$/.exec(r))?function(t,e){return e?t.split("\n").map((function(t,n){return n?e+t:t})).join("\n"):t}(e,i[0]):e):e},unbind:function(){this.isNamed||to.call(this),this.fragment&&this.fragment.unbind()},unrender:function(t){this.rendered&&(this.fragment&&this.fragment.unrender(t),this.rendered=!1)},update:function(){var t,e;this.fragmentToUnrender&&(this.fragmentToUnrender.unrender(!0),this.fragmentToUnrender=null),this.fragmentToRender&&(this.docFrag.appendChild(this.fragmentToRender.render()),this.fragmentToRender=null),this.rendered&&(t=this.parentFragment.getNode(),e=this.parentFragment.findNextNode(this),t.insertBefore(this.docFrag,e))}};var Fh=Th,Rh=function t(e,n){var r,i=G("components",e,n);if(i&&!(r=i.components[n])._Parent){var s=r.bind(i);if(s.isOwner=i.components.hasOwnProperty(n),!(r=s()))return void $(Z,n,"component","component",{ractive:e});"string"==typeof r&&(r=t(e,r)),r._fn=s,i.components[n]=r}return r};var jh=function(){var t=this.instance.fragment.detach();return Nh.fire(this.instance),t},Nh=new bt("detach");var Dh=function(t){return this.instance.fragment.find(t)};var Ih=function(t,e){return this.instance.fragment.findAll(t,e)};var Lh=function(t,e){e._test(this,!0),this.instance.fragment&&this.instance.fragment.findAllComponents(t,e)};var Vh=function(t){if(!t||t===this.name)return this.instance;if(this.instance.fragment)return this.instance.fragment.findComponent(t);return null};var Mh=function(){return this.parentFragment.findNextNode(this)};var Uh=function(){if(this.rendered)return this.instance.fragment.firstNode();return null};var Wh,zh,Bh=function(t,e,n,r){var i=t.root,s=t.keypath;r?i.viewmodel.smartUpdate(s,e,r):i.viewmodel.mark(s)},qh=[],$h=["pop","push","reverse","shift","sort","splice","unshift"];$h.forEach((function(t){k(qh,t,{value:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i,s,o,a;for(i=Je(this,t,n),s=Array.prototype[t].apply(this,arguments),Yt.start(),this._ractive.setting=!0,a=this._ractive.wrappers.length;a--;)o=this._ractive.wrappers[a],Yt.addRactive(o.root),Bh(o,this,0,i);return Yt.end(),this._ractive.setting=!1,s}})})),{}.__proto__?(Wh=function(t){t.__proto__=qh},zh=function(t){t.__proto__=Array.prototype}):(Wh=function(t){var e,n;for(e=$h.length;e--;)n=$h[e],k(t,n,{value:qh[n],configurable:!0})},zh=function(t){var e;for(e=$h.length;e--;)delete t[$h[e]]}),Wh.unpatch=zh;var Qh,Zh,Hh,Kh=Wh;Qh={filter:function(t){return P(t)&&(!t._ractive||!t._ractive.setting)},wrap:function(t,e,n){return new Zh(t,e,n)}},(Zh=function(t,e,n){this.root=t,this.value=e,this.keypath=at(n),e._ractive||(k(e,"_ractive",{value:{wrappers:[],instances:[],setting:!1},configurable:!0}),Kh(e)),e._ractive.instances[t._guid]||(e._ractive.instances[t._guid]=0,e._ractive.instances.push(t)),e._ractive.instances[t._guid]+=1,e._ractive.wrappers.push(this)}).prototype={get:function(){return this.value},teardown:function(){var t,e,n,r,i;if(n=(e=(t=this.value)._ractive).wrappers,r=e.instances,e.setting)return!1;if(-1===(i=n.indexOf(this)))throw new Error(Hh);if(n.splice(i,1),n.length){if(r[this.root._guid]-=1,!r[this.root._guid]){if(-1===(i=r.indexOf(this.root)))throw new Error(Hh);r.splice(i,1)}}else delete t._ractive,Kh.unpatch(this.value)}},Hh="Something went wrong in a rather interesting way";var Gh,Yh,Jh=Qh,Xh=/^\s*[0-9]+\s*$/,tc=function(t){return Xh.test(t)?[]:{}};try{Object.defineProperty({},"test",{value:0}),Gh={filter:function(t,e,n){var r,i;return!!e&&(e=at(e),!((r=n.viewmodel.wrapped[e.parent.str])&&!r.magic)&&((!P(i=n.viewmodel.get(e.parent))||!/^[0-9]+$/.test(e.lastKey))&&(i&&("object"==typeof i||"function"==typeof i))))},wrap:function(t,e,n){return new Yh(t,e,n)}},(Yh=function(t,e,n){var r,i,s;n=at(n),this.magic=!0,this.ractive=t,this.keypath=n,this.value=e,this.prop=n.lastKey,r=n.parent,this.obj=r.isRoot?t.viewmodel.data:t.viewmodel.get(r),(i=this.originalDescriptor=Object.getOwnPropertyDescriptor(this.obj,this.prop))&&i.set&&(s=i.set._ractiveWrappers)?-1===s.indexOf(this)&&s.push(this):function(t,e,n){var r,i,s,o,a,u;if(r=t.obj,i=t.prop,n&&!n.configurable){if("length"===i)return;throw new Error('Cannot use magic mode with property "'+i+'" - object is not configurable')}n&&(s=n.get,o=n.set);function h(t){var n,r;t.value=e,t.updating||(r=t.ractive,n=t.keypath,t.updating=!0,Yt.start(r),r.viewmodel.mark(n),Yt.end(),t.updating=!1)}a=s||function(){return e},(u=function(t){o&&o(t),e=s?s():t,u._ractiveWrappers.forEach(h)})._ractiveWrappers=[t],Object.defineProperty(r,i,{get:a,set:u,enumerable:!0,configurable:!0})}(this,e,i)}).prototype={get:function(){return this.value},reset:function(t){if(!this.updating)return this.updating=!0,this.obj[this.prop]=t,Yt.addRactive(this.ractive),this.ractive.viewmodel.mark(this.keypath,{keepExistingWrapper:!0}),this.updating=!1,!0},set:function(t,e){this.updating||(this.obj[this.prop]||(this.updating=!0,this.obj[this.prop]=tc(t),this.updating=!1),this.obj[this.prop][t]=e)},teardown:function(){var t,e,n,r,i;if(this.updating)return!1;(e=(t=Object.getOwnPropertyDescriptor(this.obj,this.prop))&&t.set)&&(-1!==(i=(r=e._ractiveWrappers).indexOf(this))&&r.splice(i,1),r.length||(n=this.obj[this.prop],Object.defineProperty(this.obj,this.prop,this.originalDescriptor||{writable:!0,enumerable:!0,configurable:!0}),this.obj[this.prop]=n))}}}catch(hf){Gh=!1}var ec,nc,rc=Gh;rc&&(ec={filter:function(t,e,n){return rc.filter(t,e,n)&&Jh.filter(t)},wrap:function(t,e,n){return new nc(t,e,n)}},(nc=function(t,e,n){this.value=e,this.magic=!0,this.magicWrapper=rc.wrap(t,e,n),this.arrayWrapper=Jh.wrap(t,e,n)}).prototype={get:function(){return this.value},teardown:function(){this.arrayWrapper.teardown(),this.magicWrapper.teardown()},reset:function(t){return this.magicWrapper.reset(t)}});var ic=ec,sc=function(t,e){var n,r,i;if(!this.adaptors)return;for(n=this.adaptors.length,r=0;r<n;r+=1)if((i=this.adaptors[r]).filter(e,t,this.ractive))return void((this.wrapped[t]=i.wrap(this.ractive,e,t,ac(t))).value=e)},oc={};function ac(t){var e;return oc[t]||(e=t?t+".":"",oc[t]=function(n,r){var i;return"string"==typeof n?((i={})[e+n]=r,i):"object"==typeof n?e?function(t,e){var n,r={};if(!e)return t;for(n in e+=".",t)t.hasOwnProperty(n)&&(r[e+n]=t[n]);return r}(n,t):n:void 0}),oc[t]}var uc=function(t){var e,n,r=[lt];e=t.length;for(;e--;)for(n=t[e].parent;n&&!n.isRoot;)-1===t.indexOf(n)&&wt(r,n),n=n.parent;return r};var hc=function(t,e,n){if(lc(t,e),n)return;e.wildcardMatches().forEach((function(n){cc(t,n,e)}))};function cc(t,e,n){var r,i,s;e=e.str||e,(i=(r=t.depsMap.patternObservers)&&r[e])&&i.forEach((function(e){s=n.join(e.lastKey),lc(t,s),cc(t,e,s)}))}function lc(t,e){t.patternObservers.forEach((function(t){t.regex.test(e.str)&&t.update(e)}))}var fc=function(){var t,e,n,r=this,i=this,s={};if(!(t=this.changes).length)return;function o(e){var n=e.key;e.viewmodel===i?(i.clearCache(n.str),e.invalidate(),t.push(n),a(n)):e.viewmodel.mark(n)}function a(t){var e,n;i.noCascade.hasOwnProperty(t.str)||((n=i.deps.computed[t.str])&&n.forEach(o),(e=i.depsMap.computed[t.str])&&e.forEach(a))}t.slice().forEach(a),(e=uc(t)).forEach((function(e){var n;-1===t.indexOf(e)&&(n=i.deps.computed[e.str])&&n.forEach(o)})),this.changes=[],this.patternObservers.length&&(e.forEach((function(t){return hc(r,t,!0)})),t.forEach((function(t){return hc(r,t)})));this.deps.observers&&(e.forEach((function(t){return dc(r,null,t,"observers")})),pc(this,t,"observers"));this.deps.default&&(n=[],e.forEach((function(t){return dc(r,n,t,"default")})),n.length&&function(t,e,n){e.forEach((function(e){for(var r=!1,i=0,s=n.length,o=[];i<s;){var a=n[i];if(a===e.keypath){r=!0;break}a.slice(0,e.keypath.length)===e.keypath&&o.push(a),i++}r&&e.setValue(t.get(e.keypath)),o.length&&e.refineValue(o)}))}(this,n,t),pc(this,t,"default"));return t.forEach((function(t){s[t.str]=r.get(t)})),this.implicitChanges={},this.noCascade={},s};function dc(t,e,n,r){var i,s;(i=mc(t,n,r))&&(s=t.get(n),i.forEach((function(t){e&&t.refineValue?e.push(t):t.setValue(s)})))}function pc(t,e,n){var r=[];function i(t){t.forEach(s),t.forEach(o)}function s(e){var i=mc(t,e,n);i&&r.push({keypath:e,deps:i})}function o(e){var r;(r=t.depsMap[n][e.str])&&i(r)}i(e),r.forEach((function(e){var n=t.get(e.keypath);e.deps.forEach((function(t){return t.setValue(n)}))}))}function mc(t,e,n){var r=t.deps[n];return r?r[e.str]:null}var vc=function(){this.captureGroups.push([])};var gc=function(t,e){var n,r;e||(r=this.wrapped[t])&&!1!==r.teardown()&&(this.wrapped[t]=null);if(this.cache[t]=void 0,n=this.cacheMap[t])for(;n.length;)this.clearCache(n.pop())};var yc=function(t,e){this.computation=t,this.viewmodel=t.viewmodel,this.ref=e,this.root=this.viewmodel.ractive,this.parentFragment=this.root.component&&this.root.component.parentFragment};yc.prototype={resolve:function(t){this.computation.softDeps.push(t),this.computation.unresolvedDeps[t.str]=null,this.viewmodel.register(t,this.computation,"computed")}};var bc=yc,wc=function(t,e){this.key=t,this.getter=e.getter,this.setter=e.setter,this.hardDeps=e.deps||[],this.softDeps=[],this.unresolvedDeps={},this.depValues={},this._dirty=this._firstRun=!0};function xc(t,e){var n=e.firstKey;return!(n in t.data)&&!(n in t.computations)&&!(n in t.mappings)}wc.prototype={constructor:wc,init:function(t){var e,n=this;this.viewmodel=t,this.bypass=!0,e=t.get(this.key),t.clearCache(this.key.str),this.bypass=!1,this.setter&&void 0!==e&&this.set(e),this.hardDeps&&this.hardDeps.forEach((function(e){return t.register(e,n,"computed")}))},invalidate:function(){this._dirty=!0},get:function(){var t,e=this,n=!1;if(this.getting)return q("The "+this.key.str+" computation indirectly called itself. This probably indicates a bug in the computation. It is commonly caused by `array.sort(...)` - if that's the case, clone the array first with `array.slice().sort(...)`"),this.value;if(this.getting=!0,this._dirty){if(this._firstRun||!this.hardDeps.length&&!this.softDeps.length?n=!0:[this.hardDeps,this.softDeps].forEach((function(t){var r,i,s;if(!n)for(s=t.length;s--;)if(r=t[s],!F(i=e.viewmodel.get(r),e.depValues[r.str]))return e.depValues[r.str]=i,void(n=!0)})),n){this.viewmodel.capture();try{this.value=this.getter()}catch(hf){$('Failed to compute "%s"',this.key.str),z(hf.stack||hf),this.value=void 0}t=this.viewmodel.release(),this.updateDependencies(t)&&[this.hardDeps,this.softDeps].forEach((function(t){t.forEach((function(t){e.depValues[t.str]=e.viewmodel.get(t)}))}))}this._dirty=!1}return this.getting=this._firstRun=!1,this.value},set:function(t){if(this.setting)this.value=t;else{if(!this.setter)throw new Error("Computed properties without setters are read-only. (This may change in a future version of Ractive!)");this.setter(t)}},updateDependencies:function(t){var e,n,r,i,s;for(e=(n=this.softDeps).length;e--;)r=n[e],-1===t.indexOf(r)&&(i=!0,this.viewmodel.unregister(r,this,"computed"));for(e=t.length;e--;)r=t[e],-1!==n.indexOf(r)||this.hardDeps&&-1!==this.hardDeps.indexOf(r)||(i=!0,xc(this.viewmodel,r)&&!this.unresolvedDeps[r.str]?(s=new bc(this,r.str),t.splice(e,1),this.unresolvedDeps[r.str]=s,Yt.addUnresolved(s)):this.viewmodel.register(r,this,"computed"));return i&&(this.softDeps=t.slice()),i}};var kc=wc,Ec=function(t,e){var n=new kc(t,e);this.ready&&n.init(this);return this.computations[t.str]=n};var _c={FAILED_LOOKUP:!0},Ac=function(t,e){var n,r,i,s,o,a=this.cache,u=t.str;(e=e||Sc).capture&&(s=_t(this.captureGroups))&&(~s.indexOf(t)||s.push(t));if(S.call(this.mappings,t.firstKey))return this.mappings[t.firstKey].get(t,e);if(t.isSpecial)return t.value;void 0===a[u]?((r=this.computations[u])&&!r.bypass?(n=r.get(),this.adapt(u,n)):(i=this.wrapped[u])?n=i.value:t.isRoot?(this.adapt("",this.data),n=this.data):n=function(t,e){var n,r,i,s;n=t.get(e.parent),(s=t.wrapped[e.parent.str])&&(n=s.get());if(null==n)return;(r=t.cacheMap[e.parent.str])?-1===r.indexOf(e.str)&&r.push(e.str):t.cacheMap[e.parent.str]=[e.str];if("object"==typeof n&&!(e.lastKey in n))return t.cache[e.str]=_c;return i=n[e.lastKey],t.adapt(e.str,i,!1),t.cache[e.str]=i,i}(this,t),a[u]=n):n=a[u];!e.noUnwrap&&(i=this.wrapped[u])&&(n=i.get());if(t.isRoot&&e.fullRootGet)for(o in this.mappings)n[o]=this.mappings[o].getValue();return n===_c?void 0:n},Sc={};var Cc=function(){var t;for(t in this.computations)this.computations[t].init(this)};var Oc=function(t,e){var n=this.mappings[t.str]=new Pc(t,e);return n.initViewmodel(this),n};var Pc=function(t,e){this.localKey=t,this.keypath=e.keypath,this.origin=e.origin,this.deps=[],this.unresolved=[],this.resolved=!1};Pc.prototype={forceResolution:function(){this.keypath=this.localKey,this.setup()},get:function(t,e){if(this.resolved)return this.origin.get(this.map(t),e)},getValue:function(){if(this.keypath)return this.origin.get(this.keypath)},initViewmodel:function(t){this.local=t,this.setup()},map:function(t){return void 0===typeof this.keypath?this.localKey:t.replace(this.localKey,this.keypath)},register:function(t,e,n){this.deps.push({keypath:t,dep:e,group:n}),this.resolved&&this.origin.register(this.map(t),e,n)},resolve:function(t){void 0!==this.keypath&&this.unbind(!0),this.keypath=t,this.setup()},set:function(t,e){this.resolved||this.forceResolution(),this.origin.set(this.map(t),e)},setup:function(){var t=this;void 0!==this.keypath&&(this.resolved=!0,this.deps.length&&(this.deps.forEach((function(e){var n=t.map(e.keypath);if(t.origin.register(n,e.dep,e.group),e.dep.setValue)e.dep.setValue(t.origin.get(n));else{if(!e.dep.invalidate)throw new Error("An unexpected error occurred. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!");e.dep.invalidate()}})),this.origin.mark(this.keypath)))},setValue:function(t){if(!this.keypath)throw new Error("Mapping does not have keypath, cannot set value. Please raise an issue at https://github.com/ractivejs/ractive/issues - thanks!");this.origin.set(this.keypath,t)},unbind:function(t){var e=this;t||delete this.local.mappings[this.localKey],this.resolved&&(this.deps.forEach((function(t){e.origin.unregister(e.map(t.keypath),t.dep,t.group)})),this.tracker&&this.origin.unregister(this.keypath,this.tracker))},unregister:function(t,e,n){var r,i;if(this.resolved){for(i=(r=this.deps).length;i--;)if(r[i].dep===e){r.splice(i,1);break}this.origin.unregister(this.map(t),e,n)}}};var Tc=function(t,e,n,r){var i,s,o,a;if(this.mark(t),r&&r.compare){o=function(t){if(!0===t)return Rc;if("string"==typeof t)return Fc[t]||(Fc[t]=function(e){return e[t]}),Fc[t];if("function"==typeof t)return t;throw new Error("The `compare` option must be a function, or a string representing an identifying field (or `true` to use JSON.stringify)")}(r.compare);try{i=e.map(o),s=n.map(o)}catch(hf){$('merge(): "%s" comparison failed. Falling back to identity checking',t),i=e,s=n}}else i=e,s=n;a=function(t,e){var n,r;return n={},r=0,t.map((function(t,i){var s,o,a;o=r,a=e.length;do{if(-1===(s=e.indexOf(t,o)))return-1;o=s+1}while(n[s]&&o<a);return s===r&&(r+=1),n[s]=!0,s}))}(i,s),this.smartUpdate(t,n,a,e.length!==n.length)},Fc={};function Rc(t){return JSON.stringify(t)}function jc(t,e,n){for(var r,i,s;!e.isRoot;)void 0===(i=(r=t.depsMap[n])[e.parent.str]||(r[e.parent.str]=[]))["_"+(s=e.str)]&&(i["_"+s]=0,i.push(e)),i["_"+s]+=1,e=e.parent}function Nc(t,e,n){var r,i,s,o;s=function(){r.set?r.set(e.lastKey,n):(i=r.get(),o())},o=function(){i||(i=tc(e.lastKey),t.set(e.parent,i,{silent:!0})),i[e.lastKey]=n},(r=t.wrapped[e.parent.str])?s():(i=t.get(e.parent),(r=t.wrapped[e.parent.str])?s():o())}var Dc=function(t,e,n){var r,i,s,o=this;i=n.length,n.forEach((function(e,n){-1===e&&o.mark(t.join(n),Lc)})),this.set(t,e,{silent:!0}),(r=this.deps.default[t.str])&&r.filter(Vc).forEach((function(t){return t.shuffle(n,e)}));if(i!==e.length){for(this.mark(t.join("length"),Ic),s=n.touchedFrom;s<e.length;s+=1)this.mark(t.join(s));for(s=e.length;s<i;s+=1)this.mark(t.join(s),Lc)}},Ic={implicit:!0},Lc={noCascade:!0};function Vc(t){return"function"==typeof t.shuffle}function Mc(t,e,n){for(var r;!e.isRoot;)(r=t.depsMap[n][e.parent.str])["_"+e.str]-=1,r["_"+e.str]||(At(r,e),r["_"+e.str]=void 0),e=e.parent}var Uc=function(t){var e,n,r=t.adapt,i=t.data,s=t.ractive,o=t.computed,a=t.mappings;for(e in this.ractive=s,this.adaptors=r,this.onchange=t.onchange,this.cache={},this.cacheMap=x(null),this.deps={computed:x(null),default:x(null)},this.depsMap={computed:x(null),default:x(null)},this.patternObservers=[],this.specials=x(null),this.wrapped=x(null),this.computations=x(null),this.captureGroups=[],this.unresolvedImplicitDependencies=[],this.changes=[],this.implicitChanges={},this.noCascade={},this.data=i,this.mappings=x(null),a)this.map(at(e),a[e]);if(i)for(e in i)(n=this.mappings[e])&&void 0===n.getValue()&&n.setValue(i[e]);for(e in o)a&&e in a&&W("Cannot map to a computed property ('%s')",e),this.compute(at(e),o[e]);this.ready=!0};Uc.prototype={adapt:sc,applyChanges:fc,capture:vc,clearCache:gc,compute:Ec,get:Ac,init:Cc,map:Oc,mark:function(t,e){var n,r=t.str;e&&(e.implicit&&(this.implicitChanges[r]=!0),e.noCascade&&(this.noCascade[r]=!0));(n=this.computations[r])&&n.invalidate();-1===this.changes.indexOf(t)&&this.changes.push(t);var i=!!e&&e.keepExistingWrapper;this.clearCache(r,i),this.ready&&this.onchange()},merge:Tc,register:function(t,e){var n,r,i=void 0===arguments[2]?"default":arguments[2];if(e.isStatic)return;(n=this.mappings[t.firstKey])?n.register(t,e,i):(r=this.deps[i]||(this.deps[i]={}),(r[t.str]||(r[t.str]=[])).push(e),this.depsMap[i]||(this.depsMap[i]={}),t.isRoot||jc(this,t,i))},release:function(){return this.captureGroups.pop()},reset:function(t){this.data=t,this.clearCache("")},set:function(t,e){var n,r,i,s,o=void 0===arguments[2]?{}:arguments[2];if(!o.noMapping&&(n=this.mappings[t.firstKey]))return n.set(t,e);if(r=this.computations[t.str]){if(r.setting)return;r.set(e),e=r.get()}if(F(this.cache[t.str],e))return;(i=this.wrapped[t.str])&&i.reset&&(s=!1!==i.reset(e))&&(e=i.get());r||s||Nc(this,t,e);o.silent?this.clearCache(t.str):this.mark(t)},smartUpdate:Dc,teardown:function(){var t,e=this;Object.keys(this.cache).forEach((function(t){return e.clearCache(t)}));for(;t=this.unresolvedImplicitDependencies.pop();)t.teardown()},unregister:function(t,e){var n,r,i,s=void 0===arguments[2]?"default":arguments[2];if(e.isStatic)return;if(n=this.mappings[t.firstKey])return n.unregister(t,e,s);if(r=this.deps[s][t.str],-1===(i=r.indexOf(e)))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");if(r.splice(i,1),t.isRoot)return;Mc(this,t,s)}};var Wc=Uc;function zc(t){this.hook=new bt(t),this.inProcess={},this.queue={}}function Bc(t,e){return t[e._guid]||(t[e._guid]=[])}function qc(t,e){var n=Bc(t.queue,e);for(t.hook.fire(e);n.length;)qc(t,n.shift());delete t.queue[e._guid]}zc.prototype={constructor:zc,begin:function(t){this.inProcess[t._guid]=!0},end:function(t){var e=t.parent;e&&this.inProcess[e._guid]?Bc(this.queue,e).push(t):qc(this,t),delete this.inProcess[t._guid]}};var $c=zc,Qc=function(t,e){var n,r={};for(n in e)r[n]=Hc(t,n,e[n]);return r},Zc=/\$\{([^\}]+)\}/g;function Hc(t,e,n){var r,i;return"function"==typeof n&&(r=Gc(n,t)),"string"==typeof n&&(r=Kc(t,n)),"object"==typeof n&&("string"==typeof n.get?r=Kc(t,n.get):"function"==typeof n.get?r=Gc(n.get,t):W("`%s` computation must have a `get()` method",e),"function"==typeof n.set&&(i=Gc(n.set,t))),{getter:r,setter:i}}function Kc(t,e){var n,r,i;return n="return ("+e.replace(Zc,(function(t,e){return r=!0,'__ractive.get("'+e+'")'}))+");",r&&(n="var __ractive = this; "+n),i=new Function(n),r?i.bind(t):i}function Gc(t,e){return/this/.test(t.toString())?t.bind(e):t}var Yc=new bt("construct"),Jc=new bt("config"),Xc=new $c("init"),tl=0,el=["adaptors","components","decorators","easing","events","interpolators","partials","transitions"],nl=function(t){var e,n,r=void 0===arguments[1]?{}:arguments[1],i=void 0===arguments[2]?{}:arguments[2];of.DEBUG&&I();if(il(t,i),k(t,"data",{get:sl}),Yc.fire(t,r),el.forEach((function(e){t[e]=A(x(t.constructor[e]||null),r[e])})),n=new Wc({adapt:rl(t,t.adapt,r),data:Cn.init(t.constructor,t,r),computed:Qc(t,A(x(t.constructor.prototype.computed),r.computed)),mappings:i.mappings,ractive:t,onchange:function(){return Yt.addRactive(t)}}),t.viewmodel=n,n.init(),Vs.init(t.constructor,t,r),Jc.fire(t),Xc.begin(t),t.template){var s=void 0;(i.cssIds||t.cssId)&&(s=i.cssIds?i.cssIds.slice():[],t.cssId&&s.push(t.cssId)),t.fragment=new Pl({template:t.template,root:t,owner:t,cssIds:s})}if(Xc.end(t),e=y(t.el)){var o=t.render(e,t.append);of.DEBUG_PROMISES&&o.catch((function(e){throw Q("Promise debugging is enabled, to help solve errors that happen asynchronously. Some browsers will log unhandled promise rejections, in which case you can safely disable promise debugging:\n Ractive.DEBUG_PROMISES = false;"),$("An error happened during rendering",{ractive:t}),e.stack&&z(e.stack),e}))}};function rl(t,e,n){var i,s,o;if(i=function(t,e){var n=t.slice(),r=e.length;for(;r--;)~n.indexOf(e[r])||n.push(e[r]);return n}(e=e.map(a),i=Et(n.adapt).map(a)),s="magic"in n?n.magic:t.magic,o="modifyArrays"in n?n.modifyArrays:t.modifyArrays,s){if(!r)throw new Error("Getters and setters (magic mode) are not supported in this browser");o&&i.push(ic),i.push(rc)}return o&&i.push(Jh),i;function a(e){return"string"==typeof e&&((e=K("adaptors",t,e))||W(H(e,"adaptor"))),e}}function il(t,e){t._guid="r-"+tl++,t._subs=x(null),t._config={},t._twowayBindings=x(null),t._animations=[],t.nodes={},t._liveQueries=[],t._liveComponentQueries=[],t._boundFunctions=[],t._observers=[],e.component?(t.parent=e.parent,t.container=e.container||null,t.root=t.parent.root,t.component=e.component,e.component.instance=t,t._inlinePartials=e.inlinePartials):(t.root=t,t.parent=t.container=null)}function sl(){throw new Error("Using `ractive.data` is no longer supported - you must use the `ractive.get()` API instead")}function ol(t,e,n){this.parentFragment=t.parentFragment,this.callback=n,this.fragment=new Pl({template:e,root:t.root,owner:this}),this.update()}var al=ol;ol.prototype={bubble:function(){this.dirty||(this.dirty=!0,Yt.addView(this))},update:function(){this.callback(this.fragment.getValue()),this.dirty=!1},rebind:function(t,e){this.fragment.rebind(t,e)},unbind:function(){this.fragment.unbind()}};var ul=function(t,e,n,r,i){var s,o,a,u,h,c,l={},f={},d={},p=[];for(o=t.parentFragment,a=t.root,A(l,i=i||{}),i.content=r||[],l[""]=i.content,e.defaults.el&&$("The <%s/> component has a default `el` property; it has been disregarded",t.name),u=o;u;){if(16===u.owner.type){h=u.owner.container;break}u=u.parent}return n&&Object.keys(n).forEach((function(e){var r,i,o,a=n[e];if("string"==typeof a)r=Li(a),f[e]=r?r.value:a;else if(0===a)f[e]=!0;else{if(!P(a))throw new Error("erm wut");1===(o=a).length&&2===o[0].t?(d[e]={origin:t.root.viewmodel,keypath:void 0},i=function(t,e,n){var r;e.r?r=fo(t,e.r,n):e.x?r=new yo(t,t.parentFragment,e.x,n):e.rx&&(r=new Co(t,e.rx,n));return r}(t,a[0],(function(t){t.isSpecial?c?s.set(e,t.value):(f[e]=t.value,delete d[e]):c?s.viewmodel.mappings[e].resolve(t):d[e].keypath=t}))):i=new al(t,a,(function(t){c?s.set(e,t):f[e]=t})),p.push(i)}})),s=x(e.prototype),nl(s,{el:null,append:!0,data:f,partials:i,magic:a.magic||e.defaults.magic,modifyArrays:a.modifyArrays,adapt:a.adapt},{parent:a,component:t,container:h,mappings:d,inlinePartials:l,cssIds:o.cssIds}),c=!0,t.resolvers=p,s};var hl=function(t,e){var n;for(n in e)e.hasOwnProperty(n)&&cl(t.instance,t.root,n,e[n])};function cl(t,e,n,r){"string"!=typeof r&&W("Components currently only support simple events - you cannot include arguments. Sorry!"),t.on(n,(function(){var t,n;return arguments.length&&arguments[0]&&arguments[0].node&&(t=Array.prototype.shift.call(arguments)),n=Array.prototype.slice.call(arguments),Ce(e,r,{event:t,args:n}),!1}))}var ll=function(t,e){var n,r;if(!e)throw new Error('Component "'+this.name+'" not found');n=this.parentFragment=t.parentFragment,r=n.root,this.root=r,this.type=15,this.name=t.template.e,this.index=t.index,this.indexRefBindings={},this.yielders={},this.resolvers=[],ul(this,e,t.template.a,t.template.f,t.template.p),hl(this,t.template.v),(t.template.t0||t.template.t1||t.template.t2||t.template.o)&&$('The "intro", "outro" and "decorator" directives have no effect on components',{ractive:this.instance});!function(t){var e,n;for(e=t.root;e;)(n=e._liveComponentQueries["_"+t.name])&&n.push(t.instance),e=e.parent}(this)};var fl=function(t,e){var n;for(var r in this.resolvers.forEach(i),this.yielders)this.yielders[r][0]&&i(this.yielders[r][0]);(n=this.root._liveComponentQueries["_"+this.name])&&n._makeDirty();function i(n){n.rebind(t,e)}};var dl=function(){var t=this.instance;return t.render(this.parentFragment.getNode()),this.rendered=!0,t.fragment.detach()};var pl=function(){return this.instance.fragment.toString()};var ml=function(){var t=this.instance;this.resolvers.forEach(Ut),function(t){var e,n;e=t.root;do{(n=e._liveComponentQueries["_"+t.name])&&n._remove(t)}while(e=e.parent)}(this),t._observers.forEach(zt),t.fragment.unbind(),t.viewmodel.teardown(),t.fragment.rendered&&t.el.__ractive_instances__&&At(t.el.__ractive_instances__,t);vl.fire(t)},vl=new bt("teardown");var gl=function(t,e){this.init(t,e)};gl.prototype={detach:jh,find:Dh,findAll:Ih,findAllComponents:Lh,findComponent:Vh,findNextNode:Mh,firstNode:Uh,init:ll,rebind:fl,render:dl,toString:pl,unbind:ml,unrender:function(t){this.shouldDestroy=t,this.instance.unrender()}};var yl=gl,bl=function(t){this.type=9,this.value=t.template.c};bl.prototype={detach:Ys,firstNode:function(){return this.node},render:function(){return this.node||(this.node=document.createComment(this.value)),this.node},toString:function(){return"\x3c!--"+this.value+"--\x3e"},unrender:function(t){t&&this.node.parentNode.removeChild(this.node)}};var wl=bl,xl=function(t){var e,n;this.type=16,this.container=e=t.parentFragment.root,this.component=n=e.component,this.container=e,this.containerFragment=t.parentFragment,this.parentFragment=n.parentFragment;var r=this.name=t.template.n||"",i=e._inlinePartials[r];i||($('Could not find template for partial "'+r+'"',{ractive:t.root}),i=[]),this.fragment=new Pl({owner:this,root:e.parent,template:i,pElement:this.containerFragment.pElement}),P(n.yielders[r])?n.yielders[r].push(this):n.yielders[r]=[this],Yt.scheduleTask((function(){if(n.yielders[r].length>1)throw new Error("A component template can only have one {{yield"+(r?" "+r:"")+"}} declaration at a time")}))};xl.prototype={detach:function(){return this.fragment.detach()},find:function(t){return this.fragment.find(t)},findAll:function(t,e){return this.fragment.findAll(t,e)},findComponent:function(t){return this.fragment.findComponent(t)},findAllComponents:function(t,e){return this.fragment.findAllComponents(t,e)},findNextNode:function(){return this.containerFragment.findNextNode(this)},firstNode:function(){return this.fragment.firstNode()},getValue:function(t){return this.fragment.getValue(t)},render:function(){return this.fragment.render()},unbind:function(){this.fragment.unbind()},unrender:function(t){this.fragment.unrender(t),At(this.component.yielders[this.name],this)},rebind:function(t,e){this.fragment.rebind(t,e)},toString:function(){return this.fragment.toString()}};var kl=xl,El=function(t){this.declaration=t.template.a};El.prototype={init:V,render:V,unrender:V,teardown:V,toString:function(){return"<!DOCTYPE"+this.declaration+">"}};var _l=El;function Al(t){return t.toString()}function Sl(t){return t.toString(!0)}function Cl(t){t.unbind&&t.unbind()}var Ol=function(t){this.init(t)};Ol.prototype={bubble:Ms,detach:Us,find:Ws,findAll:zs,findAllComponents:Bs,findComponent:qs,findNextNode:$s,firstNode:Qs,getArgsList:Hs,getNode:Ks,getValue:Gs,init:function(t){var e=this;this.owner=t.owner,this.parent=this.owner.parentFragment,this.root=t.root,this.pElement=t.pElement,this.context=t.context,this.index=t.index,this.key=t.key,this.registeredIndexRefs=[],this.cssIds="cssIds"in t?t.cssIds:this.parent?this.parent.cssIds:null,this.items=t.template.map((function(n,r){return function(t){if("string"==typeof t.template)return new Xs(t);switch(t.template.t){case 16:return new kl(t);case 2:return new Fo(t);case 4:return new Go(t);case 3:return new pa(t);case 7:var e=void 0;return(e=Rh(t.parentFragment.root,t.template.e))?new yl(t,e):new Eh(t);case 8:return new Fh(t);case 9:return new wl(t);case 18:return new _l(t);default:throw new Error("Something very strange happened. Please file an issue at https://github.com/ractivejs/ractive/issues. Thanks!")}}({parentFragment:e,pElement:t.pElement,template:n,index:r})})),this.value=this.argsList=null,this.dirtyArgs=this.dirtyValue=!0,this.bound=!0},rebind:function(t,e){this.owner&&!this.owner.hasContext||ot(this,"context",t,e);this.items.forEach((function(n){n.rebind&&n.rebind(t,e)}))},registerIndexRef:function(t){var e=this.registeredIndexRefs;-1===e.indexOf(t)&&e.push(t)},render:function(){var t;1===this.items.length?t=this.items[0].render():(t=document.createDocumentFragment(),this.items.forEach((function(e){t.appendChild(e.render())})));return this.rendered=!0,t},toString:function(t){if(!this.items)return"";return this.items.map(t?Sl:Al).join("")},unbind:function(){if(!this.bound)return;this.items.forEach(Cl),this.bound=!1},unregisterIndexRef:function(t){var e=this.registeredIndexRefs;e.splice(e.indexOf(t),1)},unrender:function(t){if(!this.rendered)throw new Error("Attempted to unrender a fragment that was not rendered");this.items.forEach((function(e){return e.unrender(t)})),this.rendered=!1}};var Pl=Ol,Tl=function(t){var e,n,r,i,s;if("object"!=typeof(t=t||{}))throw new Error("The reset method takes either no arguments, or an object containing new data");(n=this.viewmodel.wrapped[""])&&n.reset?!1===n.reset(t)&&this.viewmodel.reset(t):this.viewmodel.reset(t);r=Vs.reset(this),i=r.length;for(;i--;)if(Fl.indexOf(r[i])>-1){s=!0;break}if(s){var o=void 0;this.viewmodel.mark(lt),(o=this.component)&&(o.shouldDestroy=!0),this.unrender(),o&&(o.shouldDestroy=!1),this.fragment.template!==this.template&&(this.fragment.unbind(),this.fragment=new Pl({template:this.template,root:this,owner:this})),e=this.render(this.el,this.anchor)}else e=Yt.start(this,!0),this.viewmodel.mark(lt),Yt.end();return Rl.fire(this,t),e},Fl=["template","partials","components","decorators","events"],Rl=new bt("reset");var jl=function(t){var e,n;_s.init(null,this,{template:t}),e=this.transitionsEnabled,this.transitionsEnabled=!1,(n=this.component)&&(n.shouldDestroy=!0);this.unrender(),n&&(n.shouldDestroy=!1);this.fragment.unbind(),this.fragment=new Pl({template:this.template,root:this,owner:this}),this.render(this.el,this.anchor),this.transitionsEnabled=e};var Nl=an("reverse"),Dl=function(t,e){var n,r;if(r=Yt.start(this,!0),j(t))for(t in n=t)n.hasOwnProperty(t)&&(e=n[t],Il(this,t,e));else Il(this,t,e);return Yt.end(),r};function Il(t,e,n){(e=at(ct(e))).isPattern?ut(t,e).forEach((function(e){t.viewmodel.set(e,n)})):t.viewmodel.set(e,n)}var Ll=an("shift"),Vl=an("sort"),Ml=an("splice"),Ul=function(t,e){return ft(this,t,void 0===e?-1:-e)};var Wl=function(){var t;this.fragment.unbind(),this.viewmodel.teardown(),this._observers.forEach(zt),this.fragment.rendered&&this.el.__ractive_instances__&&At(this.el.__ractive_instances__,this);return this.shouldDestroy=!0,t=this.fragment.rendered?this.unrender():Ft.resolve(),zl.fire(this),this._boundFunctions.forEach(Bl),t},zl=new bt("teardown");function Bl(t){delete t.fn[t.prop]}var ql=function(t){var e=this;if("string"!=typeof t)throw new TypeError("Bad arguments");var n=void 0;if(/\*/.test(t))return n={},ut(this,at(ct(t))).forEach((function(t){n[t.str]=!e.viewmodel.get(t)})),this.set(n);return this.set(t,!this.get(t))};var $l=function(){return this.fragment.toString(!0)};var Ql=function(){var t,e;if(!this.fragment.rendered)return $("ractive.unrender() was called on a Ractive instance that was not rendered"),Ft.resolve();t=Yt.start(this,!0),e=!this.component||this.component.shouldDestroy||this.shouldDestroy;for(;this._animations[0];)this._animations[0].stop();return this.fragment.unrender(e),At(this.el.__ractive_instances__,this),Zl.fire(this),Yt.end(),t},Zl=new bt("unrender");var Hl=an("unshift"),Kl=function(t){var e;return t=at(t)||lt,e=Yt.start(this,!0),this.viewmodel.mark(t),Yt.end(),Gl.fire(this,t),e},Gl=new bt("update");var Yl={add:pt,animate:se,detach:ue,find:ce,findAll:xe,findAllComponents:ke,findComponent:Ee,findContainer:_e,findParent:Ae,fire:Te,get:Fe,insert:je,merge:Ie,observe:$e,observeOnce:Qe,off:Ke,on:Ge,once:Ye,pop:un,push:hn,render:dn,reset:Tl,resetPartial:function(t,e){var n,r=[];return function e(n,r,i){i&&i.partials[t]||n.forEach((function(n){8===n.type&&n.getPartialName()===t&&r.push(n),n.fragment&&e(n.fragment.items,r,i),P(n.fragments)?e(n.fragments,r,i):P(n.items)?e(n.items,r,i):15===n.type&&n.instance&&e(n.instance.fragment.items,r,n.instance),7===n.type&&(P(n.attributes)&&e(n.attributes,r,i),P(n.conditionalAttributes)&&e(n.conditionalAttributes,r,i))}))}(this.fragment.items,r),this.partials[t]=e,n=Yt.start(this,!0),r.forEach((function(e){e.value=void 0,e.setValue(t)})),Yt.end(),n},resetTemplate:jl,reverse:Nl,set:Dl,shift:Ll,sort:Vl,splice:Ml,subtract:Ul,teardown:Wl,toggle:ql,toHTML:$l,toHtml:$l,unrender:Ql,unshift:Hl,update:Kl,updateModel:function(t,e){var n,r,i;if("string"!=typeof t||e)for(r in i=[],this._twowayBindings)t&&!at(r).equalsOrStartsWith(t)||i.push.apply(i,this._twowayBindings[r]);else i=this._twowayBindings[t];return n=function(t,e){var n={},r=[];e.forEach((function(t){var e,i;t.radioName&&!t.element.node.checked||(t.checkboxName?r[t.keypath.str]||t.changed()||(r.push(t.keypath),r[t.keypath.str]=t):kt(e=t.attribute.value,i=t.getValue())||F(e,i)||(n[t.keypath.str]=i))})),r.length&&r.forEach((function(t){var e,i;kt((e=r[t.str]).attribute.value,i=e.getValue())||(n[t.str]=i)}));return n}(0,i),this.set(n)}},Jl=function(t,e,n){return n||function(t,e){return"function"==typeof e&&/_super/.test(t)}(t,e)?function(){var n,r="_super"in this,i=this._super;return this._super=e,n=t.apply(this,arguments),r&&(this._super=i),n}:t};var Xl=function(t){var e={};for(;t;)tf(t,e),ef(t,e),t=t._Parent!==of&&t._Parent;return e};function tf(t,e){As.forEach((function(n){!function(t,e,n){var r,i=Object.keys(t[n]);if(!i.length)return;(r=e[n])||(r=e[n]={});i.filter((function(t){return!(t in r)})).forEach((function(e){return r[e]=t[n][e]}))}(n.useDefaults?t.prototype:t,e,n.name)}))}function ef(t,e){Object.keys(t.prototype).forEach((function(n){if("computed"!==n){var r=t.prototype[n];if(n in e){if("function"==typeof e[n]&&"function"==typeof r&&e[n]._method){var i=void 0,s=r._method;s&&(r=r._method),i=Jl(e[n]._method,r),s&&(i._method=i),e[n]=i}}else e[n]=r._method?r._method:r}}))}function nf(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length?e.reduce(rf,this):rf(this)}function rf(t){var e,n,r=void 0===arguments[1]?{}:arguments[1];return r.prototype instanceof of&&(r=Xl(r)),e=function(t){if(!(this instanceof e))return new e(t);nl(this,t)},(n=x(t.prototype)).constructor=e,E(e,{defaults:{value:n},extend:{value:nf,writable:!0,configurable:!0},_Parent:{value:t}}),Vs.extend(t,n,r),Cn.extend(t,n,r),r.computed&&(n.computed=A(x(t.prototype.computed),r.computed)),e.prototype=n,e}var sf;E(sf=function(t){if(!(this instanceof sf))return new sf(t);nl(this,t)},{DEBUG:{writable:!0,value:!0},DEBUG_PROMISES:{writable:!0,value:!0},extend:{value:nf},getNodeInfo:{value:function(t){var e,n,r={};return t&&(e=t._ractive)?(r.ractive=e.root,r.keypath=e.keypath.str,r.index={},(n=co(e.proxy.parentFragment))&&(r.index=co.resolve(n)),r):r}},parse:{value:as},Promise:{value:Ft},svg:{value:s},magic:{value:r},VERSION:{value:"0.7.3"},adaptors:{writable:!0,value:{}},components:{writable:!0,value:{}},decorators:{writable:!0,value:{}},easing:{writable:!0,value:g},events:{writable:!0,value:{}},interpolators:{writable:!0,value:X},partials:{writable:!0,value:{}},transitions:{writable:!0,value:{}}}),sf.prototype=A(Yl,v),sf.prototype.constructor=sf,sf.defaults=sf.prototype;if("function"!=typeof Date.now||"function"!=typeof String.prototype.trim||"function"!=typeof Object.keys||"function"!=typeof Array.prototype.indexOf||"function"!=typeof Array.prototype.forEach||"function"!=typeof Array.prototype.map||"function"!=typeof Array.prototype.filter||"undefined"!=typeof window&&"function"!=typeof window.addEventListener)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.");var of=sf;export default of;const af={name:"libs",version:"1.2.231",created:"2021-03-09T09:36:16.478Z"};export{af as metadata};