Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

riot

Package Overview
Dependencies
Maintainers
4
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riot - npm Package Compare versions

Comparing version 3.0.0-alpha.8 to 3.0.0-alpha.9

28

lib/browser/tag/each.js
import { isArray } from './../common/util/check'
import { remAttr, getAttr, getOuterHTML, createDOMPlaceholder, createFrag, safeInsert } from './../common/util/dom'
import { remAttr, getAttr, getOuterHTML, createDOMPlaceholder, safeInsert, createFrag } from './../common/util/dom'
import { defineProperty, each } from './../common/util/misc'

@@ -180,7 +180,17 @@ import { tmpl } from 'riot-tmpl'

var items = tmpl(expr.val, parent),
// create a fragment to hold the new DOM nodes to inject in the parent tag
frag = createFrag()
parentNode,
frag,
placeholder
root = ref.parentNode
if (parentNode) {
placeholder = createDOMPlaceholder('')
parentNode.insertBefore(placeholder, root)
parentNode.removeChild(root)
} else {
frag = createFrag()
}
// object loop. any changes cause full redraw

@@ -235,3 +245,3 @@ if (!isArray(items)) {

if (mustAppend)
append.apply(tag, [frag, isVirtual])
append.apply(tag, [frag || root, isVirtual])
else

@@ -270,5 +280,2 @@ insert.apply(tag, [root, tags[i], isVirtual])

// insert the new nodes
if (frag.childNodes) root.insertBefore(frag, ref)
// #1374 FireFox bug in <option selected={expression}>

@@ -280,2 +287,9 @@ if (isOption && FIREFOX && !root.multiple) updateSelect(root)

if (frag) {
root.insertBefore(frag, ref)
} else {
parentNode.insertBefore(root, placeholder)
parentNode.removeChild(placeholder)
}
}

@@ -282,0 +296,0 @@

{
"name": "riot",
"version": "3.0.0-alpha.8",
"version": "3.0.0-alpha.9",
"description": "A React-like user interface micro-library",

@@ -5,0 +5,0 @@ "homepage": "http://riotjs.com/",

@@ -1,2 +0,2 @@

/* Riot v3.0.0-alpha.8, @license MIT */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.riot=t.riot||{})}(this,function(t){"use strict";function e(t){return It.test(t)}function n(t){return $t.test(t)}function r(t){return typeof t===jt||!1}function i(t){return t&&typeof t===Lt}function o(t){return typeof t===Et}function a(t){return typeof t===Tt}function s(t){return o(t)||null===t||""===t}function u(t){return Array.isArray(t)||t instanceof Array}function l(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return o(t[e])||n&&n.writable}function c(t){return Ht.test(t)}function p(t,e){return(e||document).querySelectorAll(t)}function f(t,e){return(e||document).querySelector(t)}function h(){return document.createDocumentFragment()}function d(){return document.createTextNode("")}function g(t,e){return e?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(t)}function m(t){if(t.outerHTML)return t.outerHTML;var e=g("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}function v(t,e){if(o(t.innerHTML)){var n=(new DOMParser).parseFromString(e,"application/xml"),r=t.ownerDocument.importNode(n.documentElement,!0);t.appendChild(r)}else t.innerHTML=e}function y(t,e){t.removeAttribute(e)}function b(t,e){return t.getAttribute(e)}function x(t,e,n){var r=At.exec(e);r&&r[1]?t.setAttributeNS(Mt,r[1],n):t.setAttribute(e,n)}function w(t,e,n){t.insertBefore(e,n.parentNode&&n)}function _(t,e){if(t)for(var n;n=Pt.exec(t);)e(n[1].toLowerCase(),n[2]||n[3]||n[4])}function C(t,e,n){if(t){var r,i=e(t,n);if(i===!1)return;for(t=t.firstChild;t;)r=t.nextSibling,C(t,e,i),t=r}}function N(t){return Object.assign?Object.assign({},t):M({},t)}function O(t,e){for(var n,r=t?t.length:0,i=0;i<r;++i)n=t[i],e(n,i)===!1&&i--;return t}function T(t,e){return~t.indexOf(e)}function L(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}function E(t,e){return t.slice(0,e.length)===e}function j(t,e,n,r){return Object.defineProperty(t,e,M({value:n,enumerable:!1,writable:!1,configurable:!0},r)),t}function M(t){for(var e,n=arguments,r=1;r<n.length;++r)if(e=n[r])for(var i in e)l(t,i)&&(t[i]=e[i]);return t}function A(t,e,n){var r=this._parent,i=this._item;if(!i)for(;r&&!i;)i=r._item,r=r._parent;l(n,"currentTarget")&&(n.currentTarget=t),l(n,"target")&&(n.target=n.srcElement),l(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,e.call(this,n),n.preventUpdate||ut(this).update()}function S(t,e,n,r){var i,o=A.bind(r,n,e);return n.addEventListener?(i=t.replace(Wt,""),r._internal.eventHandlers[i]&&n.removeEventListener(i,r._internal.eventHandlers[i]),r._internal.eventHandlers[i]=o,void n.addEventListener(i,o,!1)):void(n[t]=o)}function R(t,e){var n,r=qt(t.value,e);if(t.tag&&t.tagName===r)return void t.tag.update();if(t.tag){var i=t.tag.opts.dataIs,o=t.tag._parent.tags;ht(o,i,t.tag)}t.impl=_t[r],n={root:t.dom,parent:e,hasImpl:!0,tagName:r},t.tag=st(t.impl,n,t.dom.innerHTML,e),t.tagName=r,t.tag.mount(),t.tag.update(),e.on("unmount",function(){var e=t.tag.opts.dataIs,n=t.tag.parent.tags,r=t.tag._parent.tags;ht(n,e,t.tag),ht(r,e,t.tag),t.tag.unmount()})}function k(t){var e,n=t.dom,i=t.attr,a=qt(t.expr,this),s="value"===i,u=t.root&&"VIRTUAL"===t.root.tagName,l=n&&(t.parent||n.parentNode);if(t.bool?a=!!a&&i:(o(a)||null===a)&&(a=""),t._riot_id){if(t.isMounted)t.update();else if(t.mount(),u){var c=document.createDocumentFragment();mt.call(t,c),t.root.parentElement.replaceChild(c,t.root)}}else{if(e=t.value,t.value=a,t.update)return void t.update();if(e!==a){if(t.isRtag&&a)return R(t,this);if(!s||n.value!==a){if(!i)return a+="",void(l&&(t.parent=l,"TEXTAREA"===l.tagName?(l.value=a,Bt||(n.nodeValue=a)):n.nodeValue=a));if(y(n,i),r(a))S(i,a,n,this);else if(/^(show|hide)$/.test(i))"hide"===i&&(a=!a),n.style.display=a?"":"none";else if(s)n.value=a;else if(E(i,Nt)&&i!==Ot)a&&x(n,i.slice(Nt.length),a);else{if("selected"===i&&l&&/^(SELECT|OPTGROUP)$/.test(l.nodeName)&&a&&(l.value=n.value),t.bool&&(n[i]=a,!a))return;(0===a||a&&typeof a!==Lt)&&x(n,i,a)}}}}}function H(t){O(t,k.bind(this))}function I(t,e,n,r){var i=r?Object.create(r):{};return i[t.key]=e,t.pos&&(i[t.pos]=n),i}function P(t,e,n,r){for(var i,o=e.length,a=t.length;o>a;)i=e[--o],e.splice(o,1),i.unmount(),ht(r.tags,n,i,!0)}function $(t){var e=this;O(Object.keys(this.tags),function(n){var r=e.tags[n];u(r)?O(r,function(e){at.apply(e,[n,t])}):at.apply(r,[n,t])})}function B(t,e,n){n?vt.apply(this,[t,e]):w(t,this.root,e.root)}function F(t,e,n){n?mt.apply(this,[t,e]):w(t,this.root,e.root)}function D(t,e){e?mt.call(this,t):t.appendChild(this.root)}function V(t){for(var e=0;e<t.length;e++)if(t[e].__riot1374){t.selectedIndex=e,delete t[e].__riot1374;break}}function U(t,e,n){y(t,"each");var r,i=typeof b(t,"no-reorder")!==Tt||y(t,"no-reorder"),o=ct(t),a=_t[o]||{tmpl:m(t)},s=Rt.test(o),l=t.parentNode,c=d(),p=it(t),f=b(t,"if"),g="option"===o.toLowerCase(),v=[],x=[],w=!0,_=!_t[o],C="VIRTUAL"===t.tagName;return n=qt.loopKeys(n),n.isLoop=!0,f&&y(t,"if"),l.insertBefore(c,t),l.removeChild(t),n.update=function(){var d=qt(n.val,e),m=h();l=c.parentNode,u(d)||(r=d||!1,d=r?Object.keys(d).map(function(t){return I(n,t,d[t])}):[]),f&&(d=d.filter(function(t,r){var i=I(n,t,r,e);return!!qt(f,i)})),O(d,function(u,c){var f=i&&typeof u===Lt&&!r,h=x.indexOf(u),d=~h&&f?h:c,g=v[d];if(u=!r&&n.key?I(n,u,c):u,!f&&!g||f&&!~h||!g){var y=c===v.length;g=new rt(a,{parent:e,isLoop:w,isAnonymous:_,root:s?l:t.cloneNode(),item:u},t.innerHTML),g.mount(),y?D.apply(g,[m,C]):F.apply(g,[l,v[c],C]),y||x.splice(c,0,u),v.splice(c,0,g),p&&ft(e.tags,o,g,!0),d=c}else g.update(u);d!==c&&f&&(B.apply(g,[l,v[c],C]),n.pos&&(g[n.pos]=c),v.splice(c,0,v.splice(d,1)[0]),x.splice(c,0,x.splice(d,1)[0]),!p&&g.tags&&$.call(g,c)),g._item=u,j(g,"_parent",e)}),P(d,v,o,e),m.childNodes&&l.insertBefore(m,c),g&&Ft&&!l.multiple&&V(l),x=d.slice()},n.unmount=function(){O(v,function(t){t.unmount()})},n}function z(t,e,n){var r=this,i={parent:{children:e}};C(t,function(e,i){var o,a,s,u=e.nodeType,l=i.parent;if(!n&&e===t)return{parent:l};if(3===u&&"STYLE"!==e.parentNode.tagName&&qt.hasExpr(e.nodeValue)&&l.children.push({dom:e,expr:e.nodeValue}),1!==u)return i;if(o=b(e,"each"))return l.children.push(U(e,r,o)),!1;if(o=b(e,"if"))return l.children.push(Object.create(Xt).init(e,r,o)),!1;if((a=b(e,Ot))&&qt.hasExpr(a))return l.children.push({isRtag:!0,expr:a,dom:e}),!1;if(s=it(e),s&&(e!==t||n)){var c={root:e,parent:r,hasImpl:!0};return l.children.push(st(s,c,e.innerHTML,r)),!1}return G.apply(r,[e,e.attributes,function(t,e){e&&l.children.push(e)}]),{parent:l}},i)}function G(t,e,r){var i=this;O(e,function(e){var o,a=e.name,s=n(a);~["ref","data-ref"].indexOf(a)?o=Object.create(Yt).init(t,a,e.value,i):qt.hasExpr(e.value)&&(o={dom:t,expr:e.value,attr:e.name,bool:s}),r(e,o)})}function K(t,e,n){var r="o"===n[0],i=r?"select>":"table>";if(t.innerHTML="<"+i+e.trim()+"</"+i,i=t.firstChild,r)i.selectedIndex=-1;else{var o=re[n];o&&1===i.childElementCount&&(i=f(o,i))}return i}function q(t,e){if(!Jt.test(t))return t;var n={};return e=e&&e.replace(ee,function(t,e,r){return n[e]=n[e]||r,""}).trim(),t.replace(ne,function(t,e,r){return n[e]||r||""}).replace(te,function(t,n){return e||n||""})}function Z(t,n){var r=t&&t.match(/^\s*<([-\w]+)/),i=r&&r[1].toLowerCase(),o=g(oe,e(i));return t=q(t,n),ie.test(i)?o=K(o,t,i):v(o,t),o.stub=!0,o}function Q(t,e){var n=this,r=n.name,i=n.tmpl,o=n.css,a=n.attrs,s=n.onCreate;return _t[r]||(W(r,i,o,a,s),_t[r].class=this.constructor),gt(t,r,e,this),this}function W(t,e,n,i,o){return r(i)&&(o=i,/^[\w\-]+\s?=/.test(n)?(i=n,n=""):i=""),n&&(r(n)?o=n:Gt.add(n)),t=t.toLowerCase(),_t[t]={name:t,tmpl:e,attrs:i,fn:o},t}function X(t,e,n,r,i){n&&Gt.add(n,t);var o=!!_t[t];return _t[t]={name:t,tmpl:e,attrs:r,fn:i},o&&riot.util.hotReloader&&riot.util.hotReloader(t),t}function Y(t,e,n){function r(t){if(t.tagName){var i=b(t,Ot);e&&i!==e&&(i=e,x(t,Ot,e));var a=gt(t,i||t.tagName.toLowerCase(),n);a&&o.push(a)}else t.length&&O(t,r)}var o=[];Gt.inject(),i(e)&&(n=e,e=0);var s,u;if(a(t)?(t="*"===t?u=yt():t+yt(t.split(/, */)),s=t?p(t):[]):s=t,"*"===e){if(e=u||yt(),s.tagName)s=p(e,s);else{var l=[];O(s,function(t){return l.push(p(e,t))}),s=l}e=0}return r(s),o}function J(t,e,n){if(i(t))return void J("__unnamed_"+ue++,t,!0);var a=n?se:ae;if(!e){if(o(a[t]))throw new Error("Unregistered mixin: "+t);return a[t]}a[t]=r(e)?M(e.prototype,a[t]||{})&&e:M(a[t]||{},e)}function tt(){return O(wt,function(t){return t.update()})}function et(t){delete _t[t]}function nt(t,e,n,r,i){if(!t||!n){var o=!n&&t?this:e||this;O(i,function(t){t.expr&&H.call(o,[t.expr]),r[L(t.name)]=t.expr?t.expr.value:t.value})}}function rt(t,e,n){var i,o=N(e.opts),s=e.parent,u=e.isLoop,l=e.isAnonymous,c=pt(e.item),p=[],f=[],h=[],d=e.root,g=e.tagName||d.tagName.toLowerCase(),m=[];Qt(this),t.name&&d._tag&&d._tag.unmount(!0),this.isMounted=!1,d.isLoop=u,j(this,"_internal",{isAnonymous:l,instAttrs:p,innerHTML:n,eventHandlers:{},virts:[],tail:null,head:null}),j(this,"_riot_id",++le),M(this,{parent:s,root:d,opts:o},c),j(this,"tags",{}),j(this,"refs",{}),i=Z(t.tmpl,n),j(this,"update",function(t){if(!r(this.shouldUpdate)||this.shouldUpdate())return t=pt(t),u&&l&&ot.apply(this,[this.parent,m]),M(this,t),nt.apply(this,[u,s,l,o,p]),this.isMounted&&this.trigger("update",t),H.call(this,h),this.isMounted&&this.trigger("updated"),this}),j(this,"mixin",function(){var t=this;return O(arguments,function(e){var n,i,o=[];e=a(e)?J(e):e,n=r(e)?new e:e;var s=Object.getPrototypeOf(n);do o=o.concat(Object.getOwnPropertyNames(i||n));while(i=Object.getPrototypeOf(i||n));O(o,function(e){if("init"!==e){var i=Object.getOwnPropertyDescriptor(n,e)||Object.getOwnPropertyDescriptor(s,e),o=i&&(i.get||i.set);!t.hasOwnProperty(e)&&o?Object.defineProperty(t,e,i):t[e]=r(n[e])?n[e].bind(t):n[e]}}),n.init&&n.init.bind(t)()}),this}),j(this,"mount",function(){var e=this;d._tag=this;var n=J(Ct);if(n)for(var r in n)n.hasOwnProperty(r)&&e.mixin(n[r]);if(G.apply(s,[d,d.attributes,function(t,n){!l&&Yt.isPrototypeOf(n)&&(n.tag=e),t.expr=n,p.push(t)}]),this._parent&&l&&ot.apply(this,[this._parent,m]),nt.apply(this,[u,s,l,o,p]),t.fn&&t.fn.call(this,o),this.trigger("before-mount"),f=[],_(t.attrs,function(t,e){f.push({name:t,value:e})}),G.apply(this,[d,f,function(t,e){e?h.push(e):x(d,t.name,t.value)}]),z.apply(this,[i,h,!1]),this.update(c),u&&l)this.root=d=i.firstChild;else{for(;i.firstChild;)d.appendChild(i.firstChild);d.stub&&(d=s.root)}j(this,"root",d),this.isMounted=!0,!this.parent||this.parent.isMounted?this.trigger("mount"):this.parent.one("mount",function(){e.trigger("mount")})}),j(this,"unmount",function(t){var e,n=this,r=this.root,i=r.parentNode,o=wt.indexOf(this);if(this.trigger("before-unmount"),O(Object.keys(this._internal.eventHandlers),function(t){n.root.removeEventListener(t,n._internal.eventHandlers[t])}),~o&&wt.splice(o,1),i){if(s)e=ut(s),ht(e.tags,g,this);else for(;r.firstChild;)r.removeChild(r.firstChild);t?y(i,Ot):i.removeChild(r)}this._internal.virts&&O(this._internal.virts,function(t){t.parentNode&&t.parentNode.removeChild(t)}),lt(h),O(p,function(t){return t.expr&&t.expr.unmount&&t.expr.unmount()}),this.trigger("unmount"),this.off("*"),this.isMounted=!1,delete this.root._tag})}function it(t){return t.tagName&&_t[b(t,Ot)||b(t,Ot)||t.tagName.toLowerCase()]}function ot(t,e){var n=this;O(Object.keys(t),function(r){var i=!c(r)&&T(e,r);(o(n[r])||i)&&(i||e.push(r),n[r]=t[r])})}function at(t,e){var n,r=this.parent;r&&(n=r.tags[t],u(n)?n.splice(e,0,n.splice(n.indexOf(this),1)[0]):ft(r.tags,t,this))}function st(t,e,n,r){var i=new rt(t,e,n),o=e.tagName||ct(e.root,!0),a=ut(r);return i.parent=a,i._parent=r,ft(a.tags,o,i),a!==r&&ft(r.tags,o,i),e.root.innerHTML="",i}function ut(t){for(var e=t;e._internal.isAnonymous&&e.parent;)e=e.parent;return e}function lt(t){O(t,function(t){t instanceof rt?t.unmount(!0):t.unmount&&t.unmount()})}function ct(t,e){var n=it(t),r=!e&&b(t,"name"),i=r&&!qt.hasExpr(r)?r:n?n.name:t.tagName.toLowerCase();return i}function pt(t){if(!(t instanceof rt||t&&typeof t.trigger===jt))return t;var e={};for(var n in t)Ht.test(n)||(e[n]=t[n]);return e}function ft(t,e,n,r){var i=t[e],o=u(i);i&&i===n||(!i&&r?t[e]=[n]:i?(!o||o&&!T(i,n))&&(o?i.push(n):t[e]=[i,n]):t[e]=n)}function ht(t,e,n,r){u(t[e])?(O(t[e],function(r,i){r===n&&t[e].splice(i,1)}),t[e].length?1!==t[e].length||r||(t[e]=t[e][0]):delete t[e]):delete t[e]}function dt(t){for(;t;){if(t.inStub)return!0;t=t.parentNode}return!1}function gt(t,e,n,r){var i=_t[e],o=_t[e].class,a=r||(o?Object.create(o.prototype):{}),s=t._innerHTML=t._innerHTML||t.innerHTML;t.innerHTML="";var u={root:t,opts:n};return n&&n.parent&&(u.parent=n.parent),i&&t&&rt.apply(a,[i,u,s]),a&&a.mount&&(a.mount(!0),T(wt,a)||wt.push(a)),a}function mt(t,e){var n,r,i=this,o=d(),a=d(),s=h();for(this._internal.head=this.root.insertBefore(o,this.root.firstChild),this._internal.tail=this.root.appendChild(a),r=this._internal.head;r;)n=r.nextSibling,s.appendChild(r),i._internal.virts.push(r),r=n;e?t.insertBefore(s,e._internal.head):t.appendChild(s)}function vt(t,e){for(var n,r=this,i=this._internal.head,o=h();i;)if(n=i.nextSibling,o.appendChild(i),i=n,i===r._internal.tail){o.appendChild(i),t.insertBefore(o,e._internal.head);break}}function yt(t){if(!t){var e=Object.keys(_t);return e+yt(e)}return t.filter(function(t){return!/[^-\w]/.test(t)}).reduce(function(t,e){var n=e.trim().toLowerCase();return t+",["+Ot+'="'+n+'"]'},"")}var bt,xt,wt=[],_t={},Ct="__global_mixin",Nt="riot-",Ot="data-is",Tt="string",Lt="object",Et="undefined",jt="function",Mt="http://www.w3.org/1999/xlink",At=/^xlink:(\w+)/,St=typeof window===Et?void 0:window,Rt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,kt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,Ht=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,It=/^(altGlyph|animate(?:Color)?|circle|clipPath|defs|ellipse|fe(?:Blend|ColorMatrix|ComponentTransfer|Composite|ConvolveMatrix|DiffuseLighting|DisplacementMap|Flood|GaussianBlur|Image|Merge|Morphology|Offset|SpecularLighting|Tile|Turbulence)|filter|font|foreignObject|g(?:lyph)?(?:Ref)?|image|line(?:arGradient)?|ma(?:rker|sk)|missing-glyph|path|pattern|poly(?:gon|line)|radialGradient|rect|stop|svg|switch|symbol|text(?:Path)?|tref|tspan|use)$/,Pt=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,$t=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,Bt=0|(St&&St.document||{}).documentMode,Ft=St&&!!St.InstallTrigger,Dt=Object.freeze({isSVGTag:e,isBoolAttr:n,isFunction:r,isObject:i,isUndefined:o,isString:a,isBlank:s,isArray:u,isWritable:l,isReservedName:c}),Vt=Object.freeze({$$:p,$:f,createFrag:h,createDOMPlaceholder:d,mkEl:g,getOuterHTML:m,setInnerHTML:v,remAttr:y,getAttr:b,setAttr:x,safeInsert:w,walkAttrs:_,walkNodes:C}),Ut={},zt=[];St&&(bt=function(){var t=g("style");x(t,"type","text/css");var e=f("style[type=riot]");return e?(e.id&&(t.id=e.id),e.parentNode.replaceChild(t,e)):document.getElementsByTagName("head")[0].appendChild(t),t}(),xt=bt.styleSheet);var Gt={styleNode:bt,add:function(t,e){e?Ut[e]=t:zt.push(t)},inject:function(){if(St){var t=Object.keys(Ut).map(function(t){return Ut[t]}).concat(zt).join("\n");xt?xt.cssText=t:bt.innerHTML=t}}},Kt=function(t){function e(t){return t}function n(t,e){return e||(e=b),new RegExp(t.source.replace(/{/g,e[2]).replace(/}/g,e[3]),t.global?l:"")}function r(t){if(t===m)return v;var e=t.split(" ");if(2!==e.length||h.test(t))throw new Error('Unsupported brackets "'+t+'"');return e=e.concat(t.replace(d,"\\").split(" ")),e[4]=n(e[1].length>1?/{[\S\s]*?}/:v[4],e),e[5]=n(t.length>3?/\\({|})/g:v[5],e),e[6]=n(v[6],e),e[7]=RegExp("\\\\("+e[3]+")|([[({])|("+e[3]+")|"+f,l),e[8]=t,e}function i(t){return t instanceof RegExp?s(t):b[t]}function o(t){(t||(t=m))!==b[8]&&(b=r(t),s=t===m?e:n,b[9]=s(v[9])),y=t}function a(t){var e;t=t||{},e=t.brackets,Object.defineProperty(t,"brackets",{set:o,get:function(){return y},enumerable:!0}),u=t,o(e)}var s,u,l="g",c=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,p=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,f=p.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,h=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,g={"(":RegExp("([()])|"+f,l),"[":RegExp("([[\\]])|"+f,l),"{":RegExp("([{}])|"+f,l)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+f,l),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],y=t,b=[];return i.split=function(t,e,n){function r(t){e||a?l.push(t&&t.replace(n[5],"$1")):l.push(t)}function i(t,e,n){var r,i=g[e];for(i.lastIndex=n,n=1;(r=i.exec(t))&&(!r[1]||(r[1]===e?++n:--n)););return n?t.length:i.lastIndex}n||(n=b);var o,a,s,u,l=[],c=n[6];for(a=s=c.lastIndex=0;o=c.exec(t);){if(u=o.index,a){if(o[2]){c.lastIndex=i(t,o[2],c.lastIndex);continue}if(!o[3])continue}o[1]||(r(t.slice(s,u)),s=c.lastIndex,c=n[6+(a^=1)],c.lastIndex=s)}return t&&s<t.length&&r(t.slice(s)),l},i.hasExpr=function(t){return b[4].test(t)},i.loopKeys=function(t){var e=t.match(b[9]);return e?{key:e[1],pos:e[2],val:b[0]+e[3].trim()+b[1]}:{val:t.trim()}},i.array=function(t){return t?r(t):b},Object.defineProperty(i,"settings",{set:a,get:function(){return u}}),i.settings="undefined"!=typeof riot&&riot.settings||{},i.set=o,i.R_STRINGS=p,i.R_MLCOMMS=c,i.S_QBLOCKS=f,i}(),qt=function(){function t(t,r){return t?(a[t]||(a[t]=n(t))).call(r,e):t}function e(e,n){t.errorHandler&&(e.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},t.errorHandler(e))}function n(t){var e=r(t);return"try{return "!==e.slice(0,11)&&(e="return "+e),new Function("E",e+";")}function r(t){var e,n=[],r=Kt.split(t.replace(c,'"'),1);if(r.length>2||r[0]){var o,a,s=[];for(o=a=0;o<r.length;++o)e=r[o],e&&(e=1&o?i(e,1,n):'"'+e.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(s[a++]=e);e=a<2?s[0]:"["+s.join(",")+'].join("")'}else e=i(r[1],0,n);return n[0]&&(e=e.replace(p,function(t,e){return n[e].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),e}function i(t,e,n){function r(e,n){var r,i=1,o=f[e];for(o.lastIndex=n.lastIndex;r=o.exec(t);)if(r[0]===e)++i;else if(!--i)break;n.lastIndex=i?t.length:o.lastIndex}if(t=t.replace(l,function(t,e){return t.length>2&&!e?s+(n.push(t)-1)+"~":t}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var i,a=[],c=0;t&&(i=t.match(u))&&!i.index;){var p,h,d=/,|([[{(])|$/g;for(t=RegExp.rightContext,p=i[2]?n[i[2]].slice(1,-1).trim().replace(/\s+/g," "):i[1];h=(i=d.exec(t))[1];)r(h,d);h=t.slice(0,i.index),t=RegExp.rightContext,a[c++]=o(h,1,p)}t=c?c>1?"["+a.join(",")+'].join(" ").trim()':a[0]:o(t,e)}return t}function o(t,e,n){var r;return t=t.replace(d,function(t,e,n,i,o){return n&&(i=r?0:i+t.length,"this"!==n&&"global"!==n&&"window"!==n?(t=e+'("'+n+h+n,i&&(r="."===(o=o[i])||"("===o||"["===o)):i&&(r=!g.test(o.slice(i)))),t}),r&&(t="try{return "+t+"}catch(e){E(e,this)}"),n?t=(r?"function(){"+t+"}.call(this)":"("+t+")")+'?"'+n+'":""':e&&(t="function(v){"+(r?t.replace("return ","v="):"v=("+t+")")+';return v||v===0?v:""}.call(this)'),t}var a={};t.haveRaw=Kt.hasRaw,t.hasExpr=Kt.hasExpr,t.loopKeys=Kt.loopKeys,t.clearCache=function(){a={}},t.errorHandler=null;var s="⁗",u=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,l=RegExp(Kt.S_QBLOCKS,"g"),c=/\u2057/g,p=/\u2057(\d+)~/g,f={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},h='"in this?this:'+("object"!=typeof window?"global":"window")+").",d=/[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,g=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return t.version=Kt.version="v2.4.1",t}(),Zt=Object.freeze({inherit:N,each:O,contains:T,toCamel:L,startsWith:E,defineProperty:j,extend:M}),Qt=function(t){t=t||{};var e={},n=Array.prototype.slice;return Object.defineProperties(t,{on:{value:function(n,r){return"function"==typeof r&&(e[n]=e[n]||[]).push(r),t},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,o=e[n],a=0;i=o&&o[a];++a)i==r&&o.splice(a--,1);else delete e[n];else e={};return t},enumerable:!1,writable:!1,configurable:!1},one:{value:function(e,n){function r(){t.off(e,r),n.apply(t,arguments)}return t.on(e,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,o,a,s=arguments,u=arguments.length-1,l=new Array(u);for(a=0;a<u;a++)l[a]=s[a+1];for(i=n.call(e[r]||[],0),a=0;o=i[a];++a)o.apply(t,l),i[a]!==o&&a--;return e["*"]&&"*"!=r&&t.trigger.apply(t,["*",r].concat(l)),t},enumerable:!1,writable:!1,configurable:!1}}),t},Wt=/^on/,Xt={init:function(t,e,n){y(t,"if"),this.parentTag=e,this.expr=n,this.stub=document.createTextNode(""),this.pristine=t;var r=t.parentNode;return r.insertBefore(this.stub,t),r.removeChild(t),this},update:function(){var t=qt(this.expr,this.parentTag);t&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],z.apply(this.parentTag,[this.current,this.expressions,!0])):!t&&this.current&&(lt(this.expressions),this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),t&&H.call(this.parentTag,this.expressions)},unmount:function(){lt(this.expressions||[]),delete this.pristine,delete this.parentNode,delete this.stub}},Yt={init:function(t,e,n,r){return this.dom=t,this.attr=e,this.rawValue=n,this.parent=r,this.hasExp=qt.hasExpr(n),this.firstRun=!0,this},update:function(){var t=this.rawValue;if(this.hasExp&&(t=qt(this.rawValue,this.parent)),this.firstRun||t!==this.value){var e=this.parent&&ut(this.parent),n=this.tag||this.dom;!s(this.value)&&e&&ht(e.refs,this.value,n),s(t)?y(this.dom,this.attr):(e&&ft(e.refs,t,n),x(this.dom,this.attr,t)),this.value=t,this.firstRun=!1}},unmount:function(){var t=this.tag||this.dom,e=this.parent&&ut(this.parent);!s(this.value)&&e&&ht(e.refs,this.value,t),delete this.dom,delete this.parent}},Jt=/<yield\b/i,te=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,ee=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,ne=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,re={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},ie=Bt&&Bt<10?Rt:kt,oe="div",ae={},se=ae[Ct]={},ue=0,le=0,ce=Object.freeze({getTag:it,inheritFrom:ot,moveChildTag:at,initChildTag:st,getImmediateCustomParentTag:ut,unmountAll:lt,getTagName:ct,cleanUpData:pt,arrayishAdd:ft,arrayishRemove:ht,isInStub:dt,mountTo:gt,makeVirtual:mt,moveVirtual:vt,selectTags:yt}),pe=Object.create(Kt.settings),fe={tmpl:qt,brackets:Kt,styleManager:Gt,vdom:wt,styleNode:Gt.styleNode,dom:Vt,check:Dt,misc:Zt,tags:ce};t.settings=pe,t.util=fe,t.observable=Qt,t.Tag=Q,t.tag=W,t.tag2=X,t.mount=Y,t.mixin=J,t.update=tt,t.unregister=et,Object.defineProperty(t,"__esModule",{value:!0})});
/* Riot v3.0.0-alpha.9, @license MIT */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.riot=t.riot||{})}(this,function(t){"use strict";function e(t){return It.test(t)}function n(t){return $t.test(t)}function r(t){return typeof t===jt||!1}function i(t){return t&&typeof t===Lt}function o(t){return typeof t===Et}function a(t){return typeof t===Tt}function s(t){return o(t)||null===t||""===t}function u(t){return Array.isArray(t)||t instanceof Array}function l(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return o(t[e])||n&&n.writable}function c(t){return Ht.test(t)}function p(t,e){return(e||document).querySelectorAll(t)}function f(t,e){return(e||document).querySelector(t)}function h(){return document.createDocumentFragment()}function d(){return document.createTextNode("")}function g(t,e){return e?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(t)}function m(t){if(t.outerHTML)return t.outerHTML;var e=g("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}function v(t,e){if(o(t.innerHTML)){var n=(new DOMParser).parseFromString(e,"application/xml"),r=t.ownerDocument.importNode(n.documentElement,!0);t.appendChild(r)}else t.innerHTML=e}function y(t,e){t.removeAttribute(e)}function b(t,e){return t.getAttribute(e)}function x(t,e,n){var r=At.exec(e);r&&r[1]?t.setAttributeNS(Mt,r[1],n):t.setAttribute(e,n)}function w(t,e,n){t.insertBefore(e,n.parentNode&&n)}function _(t,e){if(t)for(var n;n=Pt.exec(t);)e(n[1].toLowerCase(),n[2]||n[3]||n[4])}function C(t,e,n){if(t){var r,i=e(t,n);if(i===!1)return;for(t=t.firstChild;t;)r=t.nextSibling,C(t,e,i),t=r}}function N(t){return Object.assign?Object.assign({},t):M({},t)}function O(t,e){for(var n,r=t?t.length:0,i=0;i<r;++i)n=t[i],e(n,i)===!1&&i--;return t}function T(t,e){return~t.indexOf(e)}function L(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}function E(t,e){return t.slice(0,e.length)===e}function j(t,e,n,r){return Object.defineProperty(t,e,M({value:n,enumerable:!1,writable:!1,configurable:!0},r)),t}function M(t){for(var e,n=arguments,r=1;r<n.length;++r)if(e=n[r])for(var i in e)l(t,i)&&(t[i]=e[i]);return t}function A(t,e,n){var r=this._parent,i=this._item;if(!i)for(;r&&!i;)i=r._item,r=r._parent;l(n,"currentTarget")&&(n.currentTarget=t),l(n,"target")&&(n.target=n.srcElement),l(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,e.call(this,n),n.preventUpdate||ut(this).update()}function S(t,e,n,r){var i,o=A.bind(r,n,e);return n.addEventListener?(i=t.replace(Wt,""),r._internal.eventHandlers[i]&&n.removeEventListener(i,r._internal.eventHandlers[i]),r._internal.eventHandlers[i]=o,void n.addEventListener(i,o,!1)):void(n[t]=o)}function R(t,e){var n,r=qt(t.value,e);if(t.tag&&t.tagName===r)return void t.tag.update();if(t.tag){var i=t.tag.opts.dataIs,o=t.tag._parent.tags;ht(o,i,t.tag)}t.impl=_t[r],n={root:t.dom,parent:e,hasImpl:!0,tagName:r},t.tag=st(t.impl,n,t.dom.innerHTML,e),t.tagName=r,t.tag.mount(),t.tag.update(),e.on("unmount",function(){var e=t.tag.opts.dataIs,n=t.tag.parent.tags,r=t.tag._parent.tags;ht(n,e,t.tag),ht(r,e,t.tag),t.tag.unmount()})}function k(t){var e,n=t.dom,i=t.attr,a=qt(t.expr,this),s="value"===i,u=t.root&&"VIRTUAL"===t.root.tagName,l=n&&(t.parent||n.parentNode);if(t.bool?a=!!a&&i:(o(a)||null===a)&&(a=""),t._riot_id){if(t.isMounted)t.update();else if(t.mount(),u){var c=document.createDocumentFragment();mt.call(t,c),t.root.parentElement.replaceChild(c,t.root)}}else{if(e=t.value,t.value=a,t.update)return void t.update();if(e!==a){if(t.isRtag&&a)return R(t,this);if(!s||n.value!==a){if(!i)return a+="",void(l&&(t.parent=l,"TEXTAREA"===l.tagName?(l.value=a,Bt||(n.nodeValue=a)):n.nodeValue=a));if(y(n,i),r(a))S(i,a,n,this);else if(/^(show|hide)$/.test(i))"hide"===i&&(a=!a),n.style.display=a?"":"none";else if(s)n.value=a;else if(E(i,Nt)&&i!==Ot)a&&x(n,i.slice(Nt.length),a);else{if("selected"===i&&l&&/^(SELECT|OPTGROUP)$/.test(l.nodeName)&&a&&(l.value=n.value),t.bool&&(n[i]=a,!a))return;(0===a||a&&typeof a!==Lt)&&x(n,i,a)}}}}}function H(t){O(t,k.bind(this))}function I(t,e,n,r){var i=r?Object.create(r):{};return i[t.key]=e,t.pos&&(i[t.pos]=n),i}function P(t,e,n,r){for(var i,o=e.length,a=t.length;o>a;)i=e[--o],e.splice(o,1),i.unmount(),ht(r.tags,n,i,!0)}function $(t){var e=this;O(Object.keys(this.tags),function(n){var r=e.tags[n];u(r)?O(r,function(e){at.apply(e,[n,t])}):at.apply(r,[n,t])})}function B(t,e,n){n?vt.apply(this,[t,e]):w(t,this.root,e.root)}function F(t,e,n){n?mt.apply(this,[t,e]):w(t,this.root,e.root)}function D(t,e){e?mt.call(this,t):t.appendChild(this.root)}function V(t){for(var e=0;e<t.length;e++)if(t[e].__riot1374){t.selectedIndex=e,delete t[e].__riot1374;break}}function U(t,e,n){y(t,"each");var r,i=typeof b(t,"no-reorder")!==Tt||y(t,"no-reorder"),o=ct(t),a=_t[o]||{tmpl:m(t)},s=Rt.test(o),l=t.parentNode,c=d(),p=it(t),f=b(t,"if"),g="option"===o.toLowerCase(),v=[],x=[],w=!0,_=!_t[o],C="VIRTUAL"===t.tagName;return n=qt.loopKeys(n),n.isLoop=!0,f&&y(t,"if"),l.insertBefore(c,t),l.removeChild(t),n.update=function(){var m,y,b,N=qt(n.val,e);l=c.parentNode,m?(b=d(""),m.insertBefore(b,l),m.removeChild(l)):y=h(),u(N)||(r=N||!1,N=r?Object.keys(N).map(function(t){return I(n,t,N[t])}):[]),f&&(N=N.filter(function(t,r){var i=I(n,t,r,e);return!!qt(f,i)})),O(N,function(u,c){var f=i&&typeof u===Lt&&!r,h=x.indexOf(u),d=~h&&f?h:c,g=v[d];if(u=!r&&n.key?I(n,u,c):u,!f&&!g||f&&!~h||!g){var m=c===v.length;g=new rt(a,{parent:e,isLoop:w,isAnonymous:_,root:s?l:t.cloneNode(),item:u},t.innerHTML),g.mount(),m?D.apply(g,[y||l,C]):F.apply(g,[l,v[c],C]),m||x.splice(c,0,u),v.splice(c,0,g),p&&ft(e.tags,o,g,!0),d=c}else g.update(u);d!==c&&f&&(B.apply(g,[l,v[c],C]),n.pos&&(g[n.pos]=c),v.splice(c,0,v.splice(d,1)[0]),x.splice(c,0,x.splice(d,1)[0]),!p&&g.tags&&$.call(g,c)),g._item=u,j(g,"_parent",e)}),P(N,v,o,e),g&&Ft&&!l.multiple&&V(l),x=N.slice(),y?l.insertBefore(y,c):(m.insertBefore(l,b),m.removeChild(b))},n.unmount=function(){O(v,function(t){t.unmount()})},n}function z(t,e,n){var r=this,i={parent:{children:e}};C(t,function(e,i){var o,a,s,u=e.nodeType,l=i.parent;if(!n&&e===t)return{parent:l};if(3===u&&"STYLE"!==e.parentNode.tagName&&qt.hasExpr(e.nodeValue)&&l.children.push({dom:e,expr:e.nodeValue}),1!==u)return i;if(o=b(e,"each"))return l.children.push(U(e,r,o)),!1;if(o=b(e,"if"))return l.children.push(Object.create(Xt).init(e,r,o)),!1;if((a=b(e,Ot))&&qt.hasExpr(a))return l.children.push({isRtag:!0,expr:a,dom:e}),!1;if(s=it(e),s&&(e!==t||n)){var c={root:e,parent:r,hasImpl:!0};return l.children.push(st(s,c,e.innerHTML,r)),!1}return G.apply(r,[e,e.attributes,function(t,e){e&&l.children.push(e)}]),{parent:l}},i)}function G(t,e,r){var i=this;O(e,function(e){var o,a=e.name,s=n(a);~["ref","data-ref"].indexOf(a)?o=Object.create(Yt).init(t,a,e.value,i):qt.hasExpr(e.value)&&(o={dom:t,expr:e.value,attr:e.name,bool:s}),r(e,o)})}function K(t,e,n){var r="o"===n[0],i=r?"select>":"table>";if(t.innerHTML="<"+i+e.trim()+"</"+i,i=t.firstChild,r)i.selectedIndex=-1;else{var o=re[n];o&&1===i.childElementCount&&(i=f(o,i))}return i}function q(t,e){if(!Jt.test(t))return t;var n={};return e=e&&e.replace(ee,function(t,e,r){return n[e]=n[e]||r,""}).trim(),t.replace(ne,function(t,e,r){return n[e]||r||""}).replace(te,function(t,n){return e||n||""})}function Z(t,n){var r=t&&t.match(/^\s*<([-\w]+)/),i=r&&r[1].toLowerCase(),o=g(oe,e(i));return t=q(t,n),ie.test(i)?o=K(o,t,i):v(o,t),o.stub=!0,o}function Q(t,e){var n=this,r=n.name,i=n.tmpl,o=n.css,a=n.attrs,s=n.onCreate;return _t[r]||(W(r,i,o,a,s),_t[r].class=this.constructor),gt(t,r,e,this),this}function W(t,e,n,i,o){return r(i)&&(o=i,/^[\w\-]+\s?=/.test(n)?(i=n,n=""):i=""),n&&(r(n)?o=n:Gt.add(n)),t=t.toLowerCase(),_t[t]={name:t,tmpl:e,attrs:i,fn:o},t}function X(t,e,n,r,i){n&&Gt.add(n,t);var o=!!_t[t];return _t[t]={name:t,tmpl:e,attrs:r,fn:i},o&&riot.util.hotReloader&&riot.util.hotReloader(t),t}function Y(t,e,n){function r(t){if(t.tagName){var i=b(t,Ot);e&&i!==e&&(i=e,x(t,Ot,e));var a=gt(t,i||t.tagName.toLowerCase(),n);a&&o.push(a)}else t.length&&O(t,r)}var o=[];Gt.inject(),i(e)&&(n=e,e=0);var s,u;if(a(t)?(t="*"===t?u=yt():t+yt(t.split(/, */)),s=t?p(t):[]):s=t,"*"===e){if(e=u||yt(),s.tagName)s=p(e,s);else{var l=[];O(s,function(t){return l.push(p(e,t))}),s=l}e=0}return r(s),o}function J(t,e,n){if(i(t))return void J("__unnamed_"+ue++,t,!0);var a=n?se:ae;if(!e){if(o(a[t]))throw new Error("Unregistered mixin: "+t);return a[t]}a[t]=r(e)?M(e.prototype,a[t]||{})&&e:M(a[t]||{},e)}function tt(){return O(wt,function(t){return t.update()})}function et(t){delete _t[t]}function nt(t,e,n,r,i){if(!t||!n){var o=!n&&t?this:e||this;O(i,function(t){t.expr&&H.call(o,[t.expr]),r[L(t.name)]=t.expr?t.expr.value:t.value})}}function rt(t,e,n){var i,o=N(e.opts),s=e.parent,u=e.isLoop,l=e.isAnonymous,c=pt(e.item),p=[],f=[],h=[],d=e.root,g=e.tagName||d.tagName.toLowerCase(),m=[];Qt(this),t.name&&d._tag&&d._tag.unmount(!0),this.isMounted=!1,d.isLoop=u,j(this,"_internal",{isAnonymous:l,instAttrs:p,innerHTML:n,eventHandlers:{},virts:[],tail:null,head:null}),j(this,"_riot_id",++le),M(this,{parent:s,root:d,opts:o},c),j(this,"tags",{}),j(this,"refs",{}),i=Z(t.tmpl,n),j(this,"update",function(t){if(!r(this.shouldUpdate)||this.shouldUpdate())return t=pt(t),u&&l&&ot.apply(this,[this.parent,m]),M(this,t),nt.apply(this,[u,s,l,o,p]),this.isMounted&&this.trigger("update",t),H.call(this,h),this.isMounted&&this.trigger("updated"),this}),j(this,"mixin",function(){var t=this;return O(arguments,function(e){var n,i,o=[];e=a(e)?J(e):e,n=r(e)?new e:e;var s=Object.getPrototypeOf(n);do o=o.concat(Object.getOwnPropertyNames(i||n));while(i=Object.getPrototypeOf(i||n));O(o,function(e){if("init"!==e){var i=Object.getOwnPropertyDescriptor(n,e)||Object.getOwnPropertyDescriptor(s,e),o=i&&(i.get||i.set);!t.hasOwnProperty(e)&&o?Object.defineProperty(t,e,i):t[e]=r(n[e])?n[e].bind(t):n[e]}}),n.init&&n.init.bind(t)()}),this}),j(this,"mount",function(){var e=this;d._tag=this;var n=J(Ct);if(n)for(var r in n)n.hasOwnProperty(r)&&e.mixin(n[r]);if(G.apply(s,[d,d.attributes,function(t,n){!l&&Yt.isPrototypeOf(n)&&(n.tag=e),t.expr=n,p.push(t)}]),this._parent&&l&&ot.apply(this,[this._parent,m]),nt.apply(this,[u,s,l,o,p]),t.fn&&t.fn.call(this,o),this.trigger("before-mount"),f=[],_(t.attrs,function(t,e){f.push({name:t,value:e})}),G.apply(this,[d,f,function(t,e){e?h.push(e):x(d,t.name,t.value)}]),z.apply(this,[i,h,!1]),this.update(c),u&&l)this.root=d=i.firstChild;else{for(;i.firstChild;)d.appendChild(i.firstChild);d.stub&&(d=s.root)}j(this,"root",d),this.isMounted=!0,!this.parent||this.parent.isMounted?this.trigger("mount"):this.parent.one("mount",function(){e.trigger("mount")})}),j(this,"unmount",function(t){var e,n=this,r=this.root,i=r.parentNode,o=wt.indexOf(this);if(this.trigger("before-unmount"),O(Object.keys(this._internal.eventHandlers),function(t){n.root.removeEventListener(t,n._internal.eventHandlers[t])}),~o&&wt.splice(o,1),i){if(s)e=ut(s),ht(e.tags,g,this);else for(;r.firstChild;)r.removeChild(r.firstChild);t?y(i,Ot):i.removeChild(r)}this._internal.virts&&O(this._internal.virts,function(t){t.parentNode&&t.parentNode.removeChild(t)}),lt(h),O(p,function(t){return t.expr&&t.expr.unmount&&t.expr.unmount()}),this.trigger("unmount"),this.off("*"),this.isMounted=!1,delete this.root._tag})}function it(t){return t.tagName&&_t[b(t,Ot)||b(t,Ot)||t.tagName.toLowerCase()]}function ot(t,e){var n=this;O(Object.keys(t),function(r){var i=!c(r)&&T(e,r);(o(n[r])||i)&&(i||e.push(r),n[r]=t[r])})}function at(t,e){var n,r=this.parent;r&&(n=r.tags[t],u(n)?n.splice(e,0,n.splice(n.indexOf(this),1)[0]):ft(r.tags,t,this))}function st(t,e,n,r){var i=new rt(t,e,n),o=e.tagName||ct(e.root,!0),a=ut(r);return i.parent=a,i._parent=r,ft(a.tags,o,i),a!==r&&ft(r.tags,o,i),e.root.innerHTML="",i}function ut(t){for(var e=t;e._internal.isAnonymous&&e.parent;)e=e.parent;return e}function lt(t){O(t,function(t){t instanceof rt?t.unmount(!0):t.unmount&&t.unmount()})}function ct(t,e){var n=it(t),r=!e&&b(t,"name"),i=r&&!qt.hasExpr(r)?r:n?n.name:t.tagName.toLowerCase();return i}function pt(t){if(!(t instanceof rt||t&&typeof t.trigger===jt))return t;var e={};for(var n in t)Ht.test(n)||(e[n]=t[n]);return e}function ft(t,e,n,r){var i=t[e],o=u(i);i&&i===n||(!i&&r?t[e]=[n]:i?(!o||o&&!T(i,n))&&(o?i.push(n):t[e]=[i,n]):t[e]=n)}function ht(t,e,n,r){u(t[e])?(O(t[e],function(r,i){r===n&&t[e].splice(i,1)}),t[e].length?1!==t[e].length||r||(t[e]=t[e][0]):delete t[e]):delete t[e]}function dt(t){for(;t;){if(t.inStub)return!0;t=t.parentNode}return!1}function gt(t,e,n,r){var i=_t[e],o=_t[e].class,a=r||(o?Object.create(o.prototype):{}),s=t._innerHTML=t._innerHTML||t.innerHTML;t.innerHTML="";var u={root:t,opts:n};return n&&n.parent&&(u.parent=n.parent),i&&t&&rt.apply(a,[i,u,s]),a&&a.mount&&(a.mount(!0),T(wt,a)||wt.push(a)),a}function mt(t,e){var n,r,i=this,o=d(),a=d(),s=h();for(this._internal.head=this.root.insertBefore(o,this.root.firstChild),this._internal.tail=this.root.appendChild(a),r=this._internal.head;r;)n=r.nextSibling,s.appendChild(r),i._internal.virts.push(r),r=n;e?t.insertBefore(s,e._internal.head):t.appendChild(s)}function vt(t,e){for(var n,r=this,i=this._internal.head,o=h();i;)if(n=i.nextSibling,o.appendChild(i),i=n,i===r._internal.tail){o.appendChild(i),t.insertBefore(o,e._internal.head);break}}function yt(t){if(!t){var e=Object.keys(_t);return e+yt(e)}return t.filter(function(t){return!/[^-\w]/.test(t)}).reduce(function(t,e){var n=e.trim().toLowerCase();return t+",["+Ot+'="'+n+'"]'},"")}var bt,xt,wt=[],_t={},Ct="__global_mixin",Nt="riot-",Ot="data-is",Tt="string",Lt="object",Et="undefined",jt="function",Mt="http://www.w3.org/1999/xlink",At=/^xlink:(\w+)/,St=typeof window===Et?void 0:window,Rt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,kt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,Ht=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,It=/^(altGlyph|animate(?:Color)?|circle|clipPath|defs|ellipse|fe(?:Blend|ColorMatrix|ComponentTransfer|Composite|ConvolveMatrix|DiffuseLighting|DisplacementMap|Flood|GaussianBlur|Image|Merge|Morphology|Offset|SpecularLighting|Tile|Turbulence)|filter|font|foreignObject|g(?:lyph)?(?:Ref)?|image|line(?:arGradient)?|ma(?:rker|sk)|missing-glyph|path|pattern|poly(?:gon|line)|radialGradient|rect|stop|svg|switch|symbol|text(?:Path)?|tref|tspan|use)$/,Pt=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,$t=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,Bt=0|(St&&St.document||{}).documentMode,Ft=St&&!!St.InstallTrigger,Dt=Object.freeze({isSVGTag:e,isBoolAttr:n,isFunction:r,isObject:i,isUndefined:o,isString:a,isBlank:s,isArray:u,isWritable:l,isReservedName:c}),Vt=Object.freeze({$$:p,$:f,createFrag:h,createDOMPlaceholder:d,mkEl:g,getOuterHTML:m,setInnerHTML:v,remAttr:y,getAttr:b,setAttr:x,safeInsert:w,walkAttrs:_,walkNodes:C}),Ut={},zt=[];St&&(bt=function(){var t=g("style");x(t,"type","text/css");var e=f("style[type=riot]");return e?(e.id&&(t.id=e.id),e.parentNode.replaceChild(t,e)):document.getElementsByTagName("head")[0].appendChild(t),t}(),xt=bt.styleSheet);var Gt={styleNode:bt,add:function(t,e){e?Ut[e]=t:zt.push(t)},inject:function(){if(St){var t=Object.keys(Ut).map(function(t){return Ut[t]}).concat(zt).join("\n");xt?xt.cssText=t:bt.innerHTML=t}}},Kt=function(t){function e(t){return t}function n(t,e){return e||(e=b),new RegExp(t.source.replace(/{/g,e[2]).replace(/}/g,e[3]),t.global?l:"")}function r(t){if(t===m)return v;var e=t.split(" ");if(2!==e.length||h.test(t))throw new Error('Unsupported brackets "'+t+'"');return e=e.concat(t.replace(d,"\\").split(" ")),e[4]=n(e[1].length>1?/{[\S\s]*?}/:v[4],e),e[5]=n(t.length>3?/\\({|})/g:v[5],e),e[6]=n(v[6],e),e[7]=RegExp("\\\\("+e[3]+")|([[({])|("+e[3]+")|"+f,l),e[8]=t,e}function i(t){return t instanceof RegExp?s(t):b[t]}function o(t){(t||(t=m))!==b[8]&&(b=r(t),s=t===m?e:n,b[9]=s(v[9])),y=t}function a(t){var e;t=t||{},e=t.brackets,Object.defineProperty(t,"brackets",{set:o,get:function(){return y},enumerable:!0}),u=t,o(e)}var s,u,l="g",c=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,p=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,f=p.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,h=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,g={"(":RegExp("([()])|"+f,l),"[":RegExp("([[\\]])|"+f,l),"{":RegExp("([{}])|"+f,l)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+f,l),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],y=t,b=[];return i.split=function(t,e,n){function r(t){e||a?l.push(t&&t.replace(n[5],"$1")):l.push(t)}function i(t,e,n){var r,i=g[e];for(i.lastIndex=n,n=1;(r=i.exec(t))&&(!r[1]||(r[1]===e?++n:--n)););return n?t.length:i.lastIndex}n||(n=b);var o,a,s,u,l=[],c=n[6];for(a=s=c.lastIndex=0;o=c.exec(t);){if(u=o.index,a){if(o[2]){c.lastIndex=i(t,o[2],c.lastIndex);continue}if(!o[3])continue}o[1]||(r(t.slice(s,u)),s=c.lastIndex,c=n[6+(a^=1)],c.lastIndex=s)}return t&&s<t.length&&r(t.slice(s)),l},i.hasExpr=function(t){return b[4].test(t)},i.loopKeys=function(t){var e=t.match(b[9]);return e?{key:e[1],pos:e[2],val:b[0]+e[3].trim()+b[1]}:{val:t.trim()}},i.array=function(t){return t?r(t):b},Object.defineProperty(i,"settings",{set:a,get:function(){return u}}),i.settings="undefined"!=typeof riot&&riot.settings||{},i.set=o,i.R_STRINGS=p,i.R_MLCOMMS=c,i.S_QBLOCKS=f,i}(),qt=function(){function t(t,r){return t?(a[t]||(a[t]=n(t))).call(r,e):t}function e(e,n){t.errorHandler&&(e.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},t.errorHandler(e))}function n(t){var e=r(t);return"try{return "!==e.slice(0,11)&&(e="return "+e),new Function("E",e+";")}function r(t){var e,n=[],r=Kt.split(t.replace(c,'"'),1);if(r.length>2||r[0]){var o,a,s=[];for(o=a=0;o<r.length;++o)e=r[o],e&&(e=1&o?i(e,1,n):'"'+e.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(s[a++]=e);e=a<2?s[0]:"["+s.join(",")+'].join("")'}else e=i(r[1],0,n);return n[0]&&(e=e.replace(p,function(t,e){return n[e].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),e}function i(t,e,n){function r(e,n){var r,i=1,o=f[e];for(o.lastIndex=n.lastIndex;r=o.exec(t);)if(r[0]===e)++i;else if(!--i)break;n.lastIndex=i?t.length:o.lastIndex}if(t=t.replace(l,function(t,e){return t.length>2&&!e?s+(n.push(t)-1)+"~":t}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var i,a=[],c=0;t&&(i=t.match(u))&&!i.index;){var p,h,d=/,|([[{(])|$/g;for(t=RegExp.rightContext,p=i[2]?n[i[2]].slice(1,-1).trim().replace(/\s+/g," "):i[1];h=(i=d.exec(t))[1];)r(h,d);h=t.slice(0,i.index),t=RegExp.rightContext,a[c++]=o(h,1,p)}t=c?c>1?"["+a.join(",")+'].join(" ").trim()':a[0]:o(t,e)}return t}function o(t,e,n){var r;return t=t.replace(d,function(t,e,n,i,o){return n&&(i=r?0:i+t.length,"this"!==n&&"global"!==n&&"window"!==n?(t=e+'("'+n+h+n,i&&(r="."===(o=o[i])||"("===o||"["===o)):i&&(r=!g.test(o.slice(i)))),t}),r&&(t="try{return "+t+"}catch(e){E(e,this)}"),n?t=(r?"function(){"+t+"}.call(this)":"("+t+")")+'?"'+n+'":""':e&&(t="function(v){"+(r?t.replace("return ","v="):"v=("+t+")")+';return v||v===0?v:""}.call(this)'),t}var a={};t.haveRaw=Kt.hasRaw,t.hasExpr=Kt.hasExpr,t.loopKeys=Kt.loopKeys,t.clearCache=function(){a={}},t.errorHandler=null;var s="⁗",u=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,l=RegExp(Kt.S_QBLOCKS,"g"),c=/\u2057/g,p=/\u2057(\d+)~/g,f={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},h='"in this?this:'+("object"!=typeof window?"global":"window")+").",d=/[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,g=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return t.version=Kt.version="v2.4.1",t}(),Zt=Object.freeze({inherit:N,each:O,contains:T,toCamel:L,startsWith:E,defineProperty:j,extend:M}),Qt=function(t){t=t||{};var e={},n=Array.prototype.slice;return Object.defineProperties(t,{on:{value:function(n,r){return"function"==typeof r&&(e[n]=e[n]||[]).push(r),t},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,o=e[n],a=0;i=o&&o[a];++a)i==r&&o.splice(a--,1);else delete e[n];else e={};return t},enumerable:!1,writable:!1,configurable:!1},one:{value:function(e,n){function r(){t.off(e,r),n.apply(t,arguments)}return t.on(e,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,o,a,s=arguments,u=arguments.length-1,l=new Array(u);for(a=0;a<u;a++)l[a]=s[a+1];for(i=n.call(e[r]||[],0),a=0;o=i[a];++a)o.apply(t,l),i[a]!==o&&a--;return e["*"]&&"*"!=r&&t.trigger.apply(t,["*",r].concat(l)),t},enumerable:!1,writable:!1,configurable:!1}}),t},Wt=/^on/,Xt={init:function(t,e,n){y(t,"if"),this.parentTag=e,this.expr=n,this.stub=document.createTextNode(""),this.pristine=t;var r=t.parentNode;return r.insertBefore(this.stub,t),r.removeChild(t),this},update:function(){var t=qt(this.expr,this.parentTag);t&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],z.apply(this.parentTag,[this.current,this.expressions,!0])):!t&&this.current&&(lt(this.expressions),this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),t&&H.call(this.parentTag,this.expressions)},unmount:function(){lt(this.expressions||[]),delete this.pristine,delete this.parentNode,delete this.stub}},Yt={init:function(t,e,n,r){return this.dom=t,this.attr=e,this.rawValue=n,this.parent=r,this.hasExp=qt.hasExpr(n),this.firstRun=!0,this},update:function(){var t=this.rawValue;if(this.hasExp&&(t=qt(this.rawValue,this.parent)),this.firstRun||t!==this.value){var e=this.parent&&ut(this.parent),n=this.tag||this.dom;!s(this.value)&&e&&ht(e.refs,this.value,n),s(t)?y(this.dom,this.attr):(e&&ft(e.refs,t,n),x(this.dom,this.attr,t)),this.value=t,this.firstRun=!1}},unmount:function(){var t=this.tag||this.dom,e=this.parent&&ut(this.parent);!s(this.value)&&e&&ht(e.refs,this.value,t),delete this.dom,delete this.parent}},Jt=/<yield\b/i,te=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,ee=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,ne=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,re={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},ie=Bt&&Bt<10?Rt:kt,oe="div",ae={},se=ae[Ct]={},ue=0,le=0,ce=Object.freeze({getTag:it,inheritFrom:ot,moveChildTag:at,initChildTag:st,getImmediateCustomParentTag:ut,unmountAll:lt,getTagName:ct,cleanUpData:pt,arrayishAdd:ft,arrayishRemove:ht,isInStub:dt,mountTo:gt,makeVirtual:mt,moveVirtual:vt,selectTags:yt}),pe=Object.create(Kt.settings),fe={tmpl:qt,brackets:Kt,styleManager:Gt,vdom:wt,styleNode:Gt.styleNode,dom:Vt,check:Dt,misc:Zt,tags:ce};t.settings=pe,t.util=fe,t.observable=Qt,t.Tag=Q,t.tag=W,t.tag2=X,t.mount=Y,t.mixin=J,t.update=tt,t.unregister=et,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -1,3 +0,3 @@

/* Riot v3.0.0-alpha.8, @license MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.riot=t()}(this,function(){"use strict";function e(e){return ut.test(e)}function t(e){return lt.test(e)}function n(e){return typeof e===tt||!1}function r(e){return e&&typeof e===Ye}function i(e){return typeof e===et}function a(e){return typeof e===Xe}function o(e){return i(e)||null===e||""===e}function s(e){return Array.isArray(e)||e instanceof Array}function u(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return i(e[t])||n&&n.writable}function c(e){return st.test(e)}function l(e,t){return(t||document).querySelectorAll(e)}function p(e,t){return(t||document).querySelector(e)}function f(){return document.createDocumentFragment()}function h(){return document.createTextNode("")}function d(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(e)}function g(e){if(e.outerHTML)return e.outerHTML;var t=d("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function m(e,t){if(i(e.innerHTML)){var n=(new DOMParser).parseFromString(t,"application/xml"),r=e.ownerDocument.importNode(n.documentElement,!0);e.appendChild(r)}else e.innerHTML=t}function v(e,t){e.removeAttribute(t)}function x(e,t){return e.getAttribute(t)}function y(e,t,n){var r=rt.exec(t);r&&r[1]?e.setAttributeNS(nt,r[1],n):e.setAttribute(t,n)}function b(e,t,n){e.insertBefore(t,n.parentNode&&n)}function w(e,t){if(e)for(var n;n=ct.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function C(e,t,n){if(e){var r,i=t(e,n);if(i===!1)return;for(e=e.firstChild;e;)r=e.nextSibling,C(e,t,i),e=r}}function O(e){return Object.assign?Object.assign({},e):T({},e)}function _(e,t){for(var n,r=e?e.length:0,i=0;i<r;++i)n=e[i],t(n,i)===!1&&i--;return e}function S(e,t){return~e.indexOf(t)}function E(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function N(e,t){return e.slice(0,t.length)===t}function j(e,t,n,r){return Object.defineProperty(e,t,T({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function T(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var i in t)u(e,i)&&(e[i]=t[i]);return e}function L(e,t,n){var r=this._parent,i=this._item;if(!i)for(;r&&!i;)i=r._item,r=r._parent;u(n,"currentTarget")&&(n.currentTarget=e),u(n,"target")&&(n.target=n.srcElement),u(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,t.call(this,n),n.preventUpdate||se(this).update()}function M(e,t,n,r){var i,a=L.bind(r,n,t);return n.addEventListener?(i=e.replace(_t,""),r._internal.eventHandlers[i]&&n.removeEventListener(i,r._internal.eventHandlers[i]),r._internal.eventHandlers[i]=a,void n.addEventListener(i,a,!1)):void(n[e]=a)}function A(e,t){var n,r=wt(e.value,t);if(e.tag&&e.tagName===r)return void e.tag.update();if(e.tag){var i=e.tag.opts.dataIs,a=e.tag._parent.tags;fe(a,i,e.tag)}e.impl=qe[r],n={root:e.dom,parent:t,hasImpl:!0,tagName:r},e.tag=oe(e.impl,n,e.dom.innerHTML,t),e.tagName=r,e.tag.mount(),e.tag.update(),t.on("unmount",function(){var t=e.tag.opts.dataIs,n=e.tag.parent.tags,r=e.tag._parent.tags;fe(n,t,e.tag),fe(r,t,e.tag),e.tag.unmount()})}function R(e){var t,r=e.dom,a=e.attr,o=wt(e.expr,this),s="value"===a,u=e.root&&"VIRTUAL"===e.root.tagName,c=r&&(e.parent||r.parentNode);if(e.bool?o=!!o&&a:(i(o)||null===o)&&(o=""),e._riot_id){if(e.isMounted)e.update();else if(e.mount(),u){var l=document.createDocumentFragment();ge.call(e,l),e.root.parentElement.replaceChild(l,e.root)}}else{if(t=e.value,e.value=o,e.update)return void e.update();if(t!==o){if(e.isRtag&&o)return A(e,this);if(!s||r.value!==o){if(!a)return o+="",void(c&&(e.parent=c,"TEXTAREA"===c.tagName?(c.value=o,pt||(r.nodeValue=o)):r.nodeValue=o));if(v(r,a),n(o))M(a,o,r,this);else if(/^(show|hide)$/.test(a))"hide"===a&&(o=!o),r.style.display=o?"":"none";else if(s)r.value=o;else if(N(a,Je)&&a!==We)o&&y(r,a.slice(Je.length),o);else{if("selected"===a&&c&&/^(SELECT|OPTGROUP)$/.test(c.nodeName)&&o&&(c.value=r.value),e.bool&&(r[a]=o,!o))return;(0===o||o&&typeof o!==Ye)&&y(r,a,o)}}}}}function I(e){_(e,R.bind(this))}function k(e,t,n,r){var i=r?Object.create(r):{};return i[e.key]=t,e.pos&&(i[e.pos]=n),i}function H(e,t,n,r){for(var i,a=t.length,o=e.length;a>o;)i=t[--a],t.splice(a,1),i.unmount(),fe(r.tags,n,i,!0)}function $(e){var t=this;_(Object.keys(this.tags),function(n){var r=t.tags[n];s(r)?_(r,function(t){ae.apply(t,[n,e])}):ae.apply(r,[n,e])})}function F(e,t,n){n?me.apply(this,[e,t]):b(e,this.root,t.root)}function P(e,t,n){n?ge.apply(this,[e,t]):b(e,this.root,t.root)}function B(e,t){t?ge.call(this,e):e.appendChild(this.root)}function z(e){for(var t=0;t<e.length;t++)if(e[t].__riot1374){e.selectedIndex=t,delete e[t].__riot1374;break}}function D(e,t,n){v(e,"each");var r,i=typeof x(e,"no-reorder")!==Xe||v(e,"no-reorder"),a=ce(e),o=qe[a]||{tmpl:g(e)},u=at.test(a),c=e.parentNode,l=h(),p=re(e),d=x(e,"if"),m="option"===a.toLowerCase(),y=[],b=[],w=!0,C=!qe[a],O="VIRTUAL"===e.tagName;return n=wt.loopKeys(n),n.isLoop=!0,d&&v(e,"if"),c.insertBefore(l,e),c.removeChild(e),n.update=function(){var h=wt(n.val,t),g=f();c=l.parentNode,s(h)||(r=h||!1,h=r?Object.keys(h).map(function(e){return k(n,e,h[e])}):[]),d&&(h=h.filter(function(e,r){var i=k(n,e,r,t);return!!wt(d,i)})),_(h,function(s,l){var f=i&&typeof s===Ye&&!r,h=b.indexOf(s),d=~h&&f?h:l,m=y[d];if(s=!r&&n.key?k(n,s,l):s,!f&&!m||f&&!~h||!m){var v=l===y.length;m=new ne(o,{parent:t,isLoop:w,isAnonymous:C,root:u?c:e.cloneNode(),item:s},e.innerHTML),m.mount(),v?B.apply(m,[g,O]):P.apply(m,[c,y[l],O]),v||b.splice(l,0,s),y.splice(l,0,m),p&&pe(t.tags,a,m,!0),d=l}else m.update(s);d!==l&&f&&(F.apply(m,[c,y[l],O]),n.pos&&(m[n.pos]=l),y.splice(l,0,y.splice(d,1)[0]),b.splice(l,0,b.splice(d,1)[0]),!p&&m.tags&&$.call(m,l)),m._item=s,j(m,"_parent",t)}),H(h,y,a,t),g.childNodes&&c.insertBefore(g,l),m&&ft&&!c.multiple&&z(c),b=h.slice()},n.unmount=function(){_(y,function(e){e.unmount()})},n}function U(e,t,n){var r=this,i={parent:{children:t}};C(e,function(t,i){var a,o,s,u=t.nodeType,c=i.parent;if(!n&&t===e)return{parent:c};if(3===u&&"STYLE"!==t.parentNode.tagName&&wt.hasExpr(t.nodeValue)&&c.children.push({dom:t,expr:t.nodeValue}),1!==u)return i;if(a=x(t,"each"))return c.children.push(D(t,r,a)),!1;if(a=x(t,"if"))return c.children.push(Object.create(St).init(t,r,a)),!1;if((o=x(t,We))&&wt.hasExpr(o))return c.children.push({isRtag:!0,expr:o,dom:t}),!1;if(s=re(t),s&&(t!==e||n)){var l={root:t,parent:r,hasImpl:!0};return c.children.push(oe(s,l,t.innerHTML,r)),!1}return V.apply(r,[t,t.attributes,function(e,t){t&&c.children.push(t)}]),{parent:c}},i)}function V(e,n,r){var i=this;_(n,function(n){var a,o=n.name,s=t(o);~["ref","data-ref"].indexOf(o)?a=Object.create(Et).init(e,o,n.value,i):wt.hasExpr(n.value)&&(a={dom:e,expr:n.value,attr:n.name,bool:s}),r(n,a)})}function Z(e,t,n){var r="o"===n[0],i=r?"select>":"table>";if(e.innerHTML="<"+i+t.trim()+"</"+i,i=e.firstChild,r)i.selectedIndex=-1;else{var a=Mt[n];a&&1===i.childElementCount&&(i=p(a,i))}return i}function G(e,t){if(!Nt.test(e))return e;var n={};return t=t&&t.replace(Tt,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(Lt,function(e,t,r){return n[t]||r||""}).replace(jt,function(e,n){return t||n||""})}function K(t,n){var r=t&&t.match(/^\s*<([-\w]+)/),i=r&&r[1].toLowerCase(),a=d(Rt,e(i));return t=G(t,n),At.test(i)?a=Z(a,t,i):m(a,t),a.stub=!0,a}function q(e,t){var n=this,r=n.name,i=n.tmpl,a=n.css,o=n.attrs,s=n.onCreate;return qe[r]||(Q(r,i,a,o,s),qe[r].class=this.constructor),de(e,r,t,this),this}function Q(e,t,r,i,a){return n(i)&&(a=i,/^[\w\-]+\s?=/.test(r)?(i=r,r=""):i=""),r&&(n(r)?a=r:yt.add(r)),e=e.toLowerCase(),qe[e]={name:e,tmpl:t,attrs:i,fn:a},e}function J(e,t,n,r,i){n&&yt.add(n,e);var a=!!qe[e];return qe[e]={name:e,tmpl:t,attrs:r,fn:i},a&&zt.util.hotReloader&&zt.util.hotReloader(e),e}function W(e,t,n){function i(e){if(e.tagName){var r=x(e,We);t&&r!==t&&(r=t,y(e,We,t));var a=de(e,r||e.tagName.toLowerCase(),n);a&&o.push(a)}else e.length&&_(e,i)}var o=[];yt.inject(),r(t)&&(n=t,t=0);var s,u;if(a(e)?(e="*"===e?u=ve():e+ve(e.split(/, */)),s=e?l(e):[]):s=e,"*"===t){if(t=u||ve(),s.tagName)s=l(t,s);else{var c=[];_(s,function(e){return c.push(l(t,e))}),s=c}t=0}return i(s),o}function X(e,t,a){if(r(e))return void X("__unnamed_"+Ht++,e,!0);var o=a?kt:It;if(!t){if(i(o[e]))throw new Error("Unregistered mixin: "+e);return o[e]}o[e]=n(t)?T(t.prototype,o[e]||{})&&t:T(o[e]||{},t)}function Y(){return _(Ke,function(e){return e.update()})}function ee(e){delete qe[e]}function te(e,t,n,r,i){if(!e||!n){var a=!n&&e?this:t||this;_(i,function(e){e.expr&&I.call(a,[e.expr]),r[E(e.name)]=e.expr?e.expr.value:e.value})}}function ne(e,t,r){var i,o=O(t.opts),s=t.parent,u=t.isLoop,c=t.isAnonymous,l=le(t.item),p=[],f=[],h=[],d=t.root,g=t.tagName||d.tagName.toLowerCase(),m=[];Ot(this),e.name&&d._tag&&d._tag.unmount(!0),this.isMounted=!1,d.isLoop=u,j(this,"_internal",{isAnonymous:c,instAttrs:p,innerHTML:r,eventHandlers:{},virts:[],tail:null,head:null}),j(this,"_riot_id",++$t),T(this,{parent:s,root:d,opts:o},l),j(this,"tags",{}),j(this,"refs",{}),i=K(e.tmpl,r),j(this,"update",function(e){if(!n(this.shouldUpdate)||this.shouldUpdate())return e=le(e),u&&c&&ie.apply(this,[this.parent,m]),T(this,e),te.apply(this,[u,s,c,o,p]),this.isMounted&&this.trigger("update",e),I.call(this,h),this.isMounted&&this.trigger("updated"),this}),j(this,"mixin",function(){var e=this;return _(arguments,function(t){var r,i,o=[];t=a(t)?X(t):t,r=n(t)?new t:t;var s=Object.getPrototypeOf(r);do o=o.concat(Object.getOwnPropertyNames(i||r));while(i=Object.getPrototypeOf(i||r));_(o,function(t){if("init"!==t){var i=Object.getOwnPropertyDescriptor(r,t)||Object.getOwnPropertyDescriptor(s,t),a=i&&(i.get||i.set);!e.hasOwnProperty(t)&&a?Object.defineProperty(e,t,i):e[t]=n(r[t])?r[t].bind(e):r[t]}}),r.init&&r.init.bind(e)()}),this}),j(this,"mount",function(){var t=this;d._tag=this;var n=X(Qe);if(n)for(var r in n)n.hasOwnProperty(r)&&t.mixin(n[r]);if(V.apply(s,[d,d.attributes,function(e,n){!c&&Et.isPrototypeOf(n)&&(n.tag=t),e.expr=n,p.push(e)}]),this._parent&&c&&ie.apply(this,[this._parent,m]),te.apply(this,[u,s,c,o,p]),e.fn&&e.fn.call(this,o),this.trigger("before-mount"),f=[],w(e.attrs,function(e,t){f.push({name:e,value:t})}),V.apply(this,[d,f,function(e,t){t?h.push(t):y(d,e.name,e.value)}]),U.apply(this,[i,h,!1]),this.update(l),u&&c)this.root=d=i.firstChild;else{for(;i.firstChild;)d.appendChild(i.firstChild);d.stub&&(d=s.root)}j(this,"root",d),this.isMounted=!0,!this.parent||this.parent.isMounted?this.trigger("mount"):this.parent.one("mount",function(){t.trigger("mount")})}),j(this,"unmount",function(e){var t,n=this,r=this.root,i=r.parentNode,a=Ke.indexOf(this);if(this.trigger("before-unmount"),_(Object.keys(this._internal.eventHandlers),function(e){n.root.removeEventListener(e,n._internal.eventHandlers[e])}),~a&&Ke.splice(a,1),i){if(s)t=se(s),fe(t.tags,g,this);else for(;r.firstChild;)r.removeChild(r.firstChild);e?v(i,We):i.removeChild(r)}this._internal.virts&&_(this._internal.virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),ue(h),_(p,function(e){return e.expr&&e.expr.unmount&&e.expr.unmount()}),this.trigger("unmount"),this.off("*"),this.isMounted=!1,delete this.root._tag})}function re(e){return e.tagName&&qe[x(e,We)||x(e,We)||e.tagName.toLowerCase()]}function ie(e,t){var n=this;_(Object.keys(e),function(r){var a=!c(r)&&S(t,r);(i(n[r])||a)&&(a||t.push(r),n[r]=e[r])})}function ae(e,t){var n,r=this.parent;r&&(n=r.tags[e],s(n)?n.splice(t,0,n.splice(n.indexOf(this),1)[0]):pe(r.tags,e,this))}function oe(e,t,n,r){var i=new ne(e,t,n),a=t.tagName||ce(t.root,!0),o=se(r);return i.parent=o,i._parent=r,pe(o.tags,a,i),o!==r&&pe(r.tags,a,i),t.root.innerHTML="",i}function se(e){for(var t=e;t._internal.isAnonymous&&t.parent;)t=t.parent;return t}function ue(e){_(e,function(e){e instanceof ne?e.unmount(!0):e.unmount&&e.unmount()})}function ce(e,t){var n=re(e),r=!t&&x(e,"name"),i=r&&!wt.hasExpr(r)?r:n?n.name:e.tagName.toLowerCase();return i}function le(e){if(!(e instanceof ne||e&&typeof e.trigger===tt))return e;var t={};for(var n in e)st.test(n)||(t[n]=e[n]);return t}function pe(e,t,n,r){var i=e[t],a=s(i);i&&i===n||(!i&&r?e[t]=[n]:i?(!a||a&&!S(i,n))&&(a?i.push(n):e[t]=[i,n]):e[t]=n)}function fe(e,t,n,r){s(e[t])?(_(e[t],function(r,i){r===n&&e[t].splice(i,1)}),e[t].length?1!==e[t].length||r||(e[t]=e[t][0]):delete e[t]):delete e[t]}function he(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function de(e,t,n,r){var i=qe[t],a=qe[t].class,o=r||(a?Object.create(a.prototype):{}),s=e._innerHTML=e._innerHTML||e.innerHTML;e.innerHTML="";var u={root:e,opts:n};return n&&n.parent&&(u.parent=n.parent),i&&e&&ne.apply(o,[i,u,s]),o&&o.mount&&(o.mount(!0),S(Ke,o)||Ke.push(o)),o}function ge(e,t){var n,r,i=this,a=h(),o=h(),s=f();for(this._internal.head=this.root.insertBefore(a,this.root.firstChild),this._internal.tail=this.root.appendChild(o),r=this._internal.head;r;)n=r.nextSibling,s.appendChild(r),i._internal.virts.push(r),r=n;t?e.insertBefore(s,t._internal.head):e.appendChild(s)}function me(e,t){for(var n,r=this,i=this._internal.head,a=f();i;)if(n=i.nextSibling,a.appendChild(i),i=n,i===r._internal.tail){a.appendChild(i),e.insertBefore(a,t._internal.head);break}}function ve(e){if(!e){var t=Object.keys(qe);return t+ve(t)}return e.filter(function(e){return!/[^-\w]/.test(e)}).reduce(function(e,t){var n=t.trim().toLowerCase();return e+",["+We+'="'+n+'"]'},"")}function xe(e){var t,n=Gt;for(~e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),n.lastIndex=0;t=n.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,n.lastIndex=t[3]+1);return e}function ye(e,t){var n,r,i,a=[];for(Zt.lastIndex=0,e=e.replace(/\s+/g," ");n=Zt.exec(e);){var o=n[1].toLowerCase(),s=n[2];s?(s[0]!==an&&(s=an+(s[0]===on?s.slice(1,-1):s)+an),"type"===o&&Xt.test(s)?r=s:(en.test(s)&&("value"===o?i=1:~Qt.indexOf(o)&&(o="riot-"+o)),a.push(o+"="+s))):a.push(o)}return r&&(i&&(r=an+t._bp[0]+on+r.slice(1,-1)+on+t._bp[1]+an),a.push("type="+r)),a.join(" ")}function be(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var i,a=t.expr&&(t.parser||t.type)?Se:0,o=bt.split(e,0,r),s=1;s<o.length;s+=2)i=o[s],"^"===i[0]?i=i.slice(1):a&&(i=a(i,t).trim(),";"===i.slice(-1)&&(i=i.slice(0,-1))),o[s]=nn+(n.push(i)-1)+r[1];e=o.join("")}return e}function we(e,t){return t.length&&(e=e.replace(tn,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,rn)})),e}function Ce(e,t,n){if(e=be(e,t,n).replace(Kt,function(e,t,r,i){return t=t.toLowerCase(),i=i&&!Jt.test(t)?"></"+t:"",r&&(t+=" "+ye(r,n)),"<"+t+i+">"}),!t.whitespace){var r=[];/<pre[\s>]/.test(e)&&(e=e.replace(Wt,function(e){return r.push(e),""})),e=e.trim().replace(/\s+/g," "),r.length&&(e=e.replace(/\u0002/g,function(){return r.shift()}))}return t.compact&&(e=e.replace(qt,"><$1")),we(e,n).replace(Yt,"")}function Oe(e,t,n){return Array.isArray(t)?(n=t,t={}):(n||(n=[]),t||(t={})),n._bp=bt.array(t.brackets),Ce(xe(e),t,n)}function _e(e){function t(e,t,n){for(t.lastIndex=0;n=t.exec(e);)"/"!==n[0][0]||n[1]||n[2]||(e=u.leftContext+" "+u.rightContext,t.lastIndex=n[3]+1);return e}function n(e,t){var n,r=1;for(t.lastIndex=0;r&&(n=t.exec(e));)"{"===n[0]?++r:"}"===n[0]&&--r;return r?e.length:t.lastIndex}var r,i,a,o,s=[],u=RegExp;for(~e.indexOf("/")&&(e=t(e,cn));r=e.match(sn);)s.push(u.leftContext),e=u.rightContext,a=n(e,un),o=r[1],i=!/^(?:if|while|for|switch|catch|function)$/.test(o),o=i?r[0].replace(o,"this."+o+" = function"):r[0],s.push(o,e.slice(0,a)),e=e.slice(a),i&&!/^\s*.\s*bind\b/.test(e)&&s.push(".bind(this)");return s.length?s.join("")+e:e}function Se(e,t,n,r,i){if(!/\S/.test(e))return"";n||(n=t.type);var a=t.parser||(n?Dt.js[n]:_e);if(!a)throw new Error('JS parser not found: "'+n+'"');return a(e,r,i).replace(/\r\n?/g,"\n").replace(Yt,"")}function Ee(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),Se(e,t||{},n,r.parserOptions,r.url)}function Ne(e,t){var n=":scope";return t.replace(ln,function(t,r,i){return i?(i=i.replace(/[^,]+/g,function(t){var r=t.trim();return r&&"from"!==r&&"to"!==r&&"%"!==r.slice(-1)?r=r.indexOf(n)<0?e+" "+r+',[riot-tag="'+e+'"] '+r+',[data-is="'+e+'"] '+r:r.replace(n,e)+","+r.replace(n,'[riot-tag="'+e+'"]')+","+r.replace(n,'[data-is="'+e+'"]'):t}),r?r+" "+i:i):t})}function je(e,t,n,r){var i=(r||(r={})).scoped;if(n)if("scoped-css"===n)i=!0;else if(Dt.css[n])e=Dt.css[n](t,e,r.parserOpts||{},r.url);else if("css"!==n)throw new Error('CSS parser not found: "'+n+'"');if(e=e.replace(bt.R_MLCOMMS,"").replace(/\s+/g," ").trim(),i){if(!t)throw new Error("Can not parse scoped CSS without a tagName");e=Ne(t,e)}return e}function Te(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),je(e,n.tagName,t,n)}function Le(e,t){return e?(e=on+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+on,t&&~e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function Me(e,t,n,r,i,a){var o=a.debug?",\n ":", ",s="});";return i&&"\n"!==i.slice(-1)&&(s="\n"+s),"riot.tag2('"+e+on+o+Le(t,1)+o+Le(n)+o+Le(r)+", function(opts) {\n"+i+s}function Ae(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;~n;){if(t=e.slice(n,r).match(hn))return n+=t.index+t[0].length,[e.slice(0,n),e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}function Re(e){if(e){var t=e.match(pn);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function Ie(e,t){if(e){var n=e.match(RegExp("\\s"+t+fn,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function ke(e){return e.replace("&amp;",/&/g).replace("&lt;",/</g).replace("&gt;",/>/g).replace("&quot;",/"/g).replace("&#039;",/'/g)}function He(e){var t=ke(Ie(e,"options"));return t?JSON.parse(t):null}function $e(e,t,n,r){var i=Re(n),a=Ie(n,"src");return!a&&Se(e,t,i,He(n),r)}function Fe(e,t,n,r,i){var a={parserOpts:He(n),scoped:n&&/\sscoped(\s|=|$)/i.test(n),url:r};return je(e,i,Re(n)||t.style,a)}function Pe(e,t,n,r){var i=Dt.html[n];if(!i)throw new Error('Template parser not found: "'+n+'"');return i(e,r,t)}function Be(e,t,n){var r,i=[];t||(t={}),r=t.exclude?function(e){return t.exclude.indexOf(e)<0}:function(){return 1},n||(n="");var a=bt.array(t.brackets);return t.template&&(e=Pe(e,n,t.template,t.templateOptions)),e=xe(e).replace(dn,function(e,o,s,u,c,l){var p="",f="",h="",d=[];if(d._bp=a,s=s.toLowerCase(),u=u&&r("attribs")?we(ye(be(u,t,d),d),d):"",(c||(c=l))&&/\S/.test(c))if(l)r("html")&&(h=Ce(l,t,d));else{c=c.replace(RegExp("^"+o,"gm"),""),c=c.replace(mn,function(e,i,a){return r("css")&&(f+=(f?" ":"")+Fe(a,t,i,n,s)),""}),c=c.replace(gn,function(e,i,a){if(r("js")){var o=$e(a,t,i,n);o&&(p+=(p?"\n":"")+o)}return""});var g=Ae(c.replace(Yt,""));r("html")&&(h=Ce(g[0],t,d)),r("js")&&(c=Se(g[1],t,null,null,n),c&&(p+=(p?"\n":"")+c))}return p=/\S/.test(p)?p.replace(/\n{3,}/g,"\n\n"):"",t.entities?(i.push({tagName:s,html:h,css:f,attribs:u,js:p}),""):Me(s,h,f,u,p,t)}),t.entities?i:e}function ze(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status||!r.status&&r.responseText.length)&&t(r.responseText,n,e)},r.open("GET",e,!0),r.send("")}function De(e,t){if(typeof e===Xe){var n=d("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function Ue(e,t){function n(){vt.trigger("ready"),xt=!0,e&&e()}function r(e,t,r){var i=xn.compile(e,t,r);De(i,r),--a||n()}var i=l('script[type="riot/tag"]'),a=i.length;if(a)for(var o=0;o<i.length;++o){var s=i[o],u=T({template:x(s,"template")},t),c=x(s,"src");c?ze(c,r,u):r(s.innerHTML,u)}else n()}function Ve(e,t,n){var r;return bn(function(){r=W(e,t,n)}),r}var Ze,Ge,Ke=[],qe={},Qe="__global_mixin",Je="riot-",We="data-is",Xe="string",Ye="object",et="undefined",tt="function",nt="http://www.w3.org/1999/xlink",rt=/^xlink:(\w+)/,it=typeof window===et?void 0:window,at=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,ot=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,st=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,ut=/^(altGlyph|animate(?:Color)?|circle|clipPath|defs|ellipse|fe(?:Blend|ColorMatrix|ComponentTransfer|Composite|ConvolveMatrix|DiffuseLighting|DisplacementMap|Flood|GaussianBlur|Image|Merge|Morphology|Offset|SpecularLighting|Tile|Turbulence)|filter|font|foreignObject|g(?:lyph)?(?:Ref)?|image|line(?:arGradient)?|ma(?:rker|sk)|missing-glyph|path|pattern|poly(?:gon|line)|radialGradient|rect|stop|svg|switch|symbol|text(?:Path)?|tref|tspan|use)$/,ct=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,lt=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,pt=0|(it&&it.document||{}).documentMode,ft=it&&!!it.InstallTrigger,ht=Object.freeze({isSVGTag:e,isBoolAttr:t,isFunction:n,isObject:r,isUndefined:i,isString:a,isBlank:o,isArray:s,isWritable:u,isReservedName:c}),dt=Object.freeze({$$:l,$:p,createFrag:f,createDOMPlaceholder:h,mkEl:d,getOuterHTML:g,setInnerHTML:m,remAttr:v,getAttr:x,setAttr:y,safeInsert:b,walkAttrs:w,walkNodes:C}),gt={},mt=[];it&&(Ze=function(){var e=d("style");y(e,"type","text/css");var t=p("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),Ge=Ze.styleSheet);var vt,xt,yt={styleNode:Ze,add:function(e,t){t?gt[t]=e:mt.push(e)},inject:function(){if(it){var e=Object.keys(gt).map(function(e){return gt[e]}).concat(mt).join("\n");Ge?Ge.cssText=e:Ze.innerHTML=e}}},bt=function(e){function t(e){return e}function n(e,t){return t||(t=y),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?c:"")}function r(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||h.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(d,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=n(e.length>3?/\\({|})/g:v[5],t),t[6]=n(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+f,c),t[8]=e,t}function i(e){return e instanceof RegExp?s(e):y[e]}function a(e){(e||(e=m))!==y[8]&&(y=r(e),s=e===m?t:n,y[9]=s(v[9])),x=e}function o(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:a,get:function(){return x},enumerable:!0}),u=e,a(t)}var s,u,c="g",l=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,p=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,f=p.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,h=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,g={"(":RegExp("([()])|"+f,c),"[":RegExp("([[\\]])|"+f,c),"{":RegExp("([{}])|"+f,c)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+f,c),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],x=e,y=[];return i.split=function(e,t,n){function r(e){t||o?c.push(e&&e.replace(n[5],"$1")):c.push(e)}function i(e,t,n){var r,i=g[t];for(i.lastIndex=n,n=1;(r=i.exec(e))&&(!r[1]||(r[1]===t?++n:--n)););return n?e.length:i.lastIndex}n||(n=y);var a,o,s,u,c=[],l=n[6];for(o=s=l.lastIndex=0;a=l.exec(e);){if(u=a.index,o){if(a[2]){l.lastIndex=i(e,a[2],l.lastIndex);continue}if(!a[3])continue}a[1]||(r(e.slice(s,u)),s=l.lastIndex,l=n[6+(o^=1)],l.lastIndex=s)}return e&&s<e.length&&r(e.slice(s)),c},i.hasExpr=function(e){return y[4].test(e)},i.loopKeys=function(e){var t=e.match(y[9]);return t?{key:t[1],pos:t[2],val:y[0]+t[3].trim()+y[1]}:{val:e.trim()}},i.array=function(e){return e?r(e):y},Object.defineProperty(i,"settings",{set:o,get:function(){return u}}),i.settings="undefined"!=typeof zt&&zt.settings||{},i.set=a,i.R_STRINGS=p,i.R_MLCOMMS=l,i.S_QBLOCKS=f,i}(),wt=function(){function e(e,r){return e?(o[e]||(o[e]=n(e))).call(r,t):e}function t(t,n){e.errorHandler&&(t.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},e.errorHandler(t))}function n(e){var t=r(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function r(e){var t,n=[],r=bt.split(e.replace(l,'"'),1);if(r.length>2||r[0]){var a,o,s=[];for(a=o=0;a<r.length;++a)t=r[a],t&&(t=1&a?i(t,1,n):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(s[o++]=t);t=o<2?s[0]:"["+s.join(",")+'].join("")'}else t=i(r[1],0,n);return n[0]&&(t=t.replace(p,function(e,t){return n[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){function r(t,n){var r,i=1,a=f[t];for(a.lastIndex=n.lastIndex;r=a.exec(e);)if(r[0]===t)++i;else if(!--i)break;n.lastIndex=i?e.length:a.lastIndex}if(e=e.replace(c,function(e,t){return e.length>2&&!t?s+(n.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var i,o=[],l=0;e&&(i=e.match(u))&&!i.index;){var p,h,d=/,|([[{(])|$/g;for(e=RegExp.rightContext,p=i[2]?n[i[2]].slice(1,-1).trim().replace(/\s+/g," "):i[1];h=(i=d.exec(e))[1];)r(h,d);h=e.slice(0,i.index),e=RegExp.rightContext,o[l++]=a(h,1,p)}e=l?l>1?"["+o.join(",")+'].join(" ").trim()':o[0]:a(e,t)}return e}function a(e,t,n){var r;return e=e.replace(d,function(e,t,n,i,a){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+h+n,i&&(r="."===(a=a[i])||"("===a||"["===a)):i&&(r=!g.test(a.slice(i)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var o={};e.haveRaw=bt.hasRaw,e.hasExpr=bt.hasExpr,e.loopKeys=bt.loopKeys,e.clearCache=function(){o={}},e.errorHandler=null;var s="⁗",u=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,c=RegExp(bt.S_QBLOCKS,"g"),l=/\u2057/g,p=/\u2057(\d+)~/g,f={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},h='"in this?this:'+("object"!=typeof window?"global":"window")+").",d=/[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,g=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=bt.version="v2.4.1",e}(),Ct=Object.freeze({inherit:O,each:_,contains:S,toCamel:E,startsWith:N,defineProperty:j,extend:T}),Ot=function(e){e=e||{};var t={},n=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(n,r){return"function"==typeof r&&(t[n]=t[n]||[]).push(r),e},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,a=t[n],o=0;i=a&&a[o];++o)i==r&&a.splice(o--,1);else delete t[n];else t={};return e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,a,o,s=arguments,u=arguments.length-1,c=new Array(u);for(o=0;o<u;o++)c[o]=s[o+1];for(i=n.call(t[r]||[],0),o=0;a=i[o];++o)a.apply(e,c),i[o]!==a&&o--;return t["*"]&&"*"!=r&&e.trigger.apply(e,["*",r].concat(c)),e},enumerable:!1,writable:!1,configurable:!1}}),e},_t=/^on/,St={init:function(e,t,n){v(e,"if"),this.parentTag=t,this.expr=n,this.stub=document.createTextNode(""),this.pristine=e;var r=e.parentNode;return r.insertBefore(this.stub,e),r.removeChild(e),this},update:function(){var e=wt(this.expr,this.parentTag);e&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],U.apply(this.parentTag,[this.current,this.expressions,!0])):!e&&this.current&&(ue(this.expressions),this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),e&&I.call(this.parentTag,this.expressions)},unmount:function(){ue(this.expressions||[]),delete this.pristine,delete this.parentNode,delete this.stub}},Et={init:function(e,t,n,r){return this.dom=e,this.attr=t,this.rawValue=n,this.parent=r,this.hasExp=wt.hasExpr(n),this.firstRun=!0,this},update:function(){var e=this.rawValue;if(this.hasExp&&(e=wt(this.rawValue,this.parent)),this.firstRun||e!==this.value){var t=this.parent&&se(this.parent),n=this.tag||this.dom;!o(this.value)&&t&&fe(t.refs,this.value,n),o(e)?v(this.dom,this.attr):(t&&pe(t.refs,e,n),y(this.dom,this.attr,e)),this.value=e,this.firstRun=!1}},unmount:function(){var e=this.tag||this.dom,t=this.parent&&se(this.parent);!o(this.value)&&t&&fe(t.refs,this.value,e),delete this.dom,delete this.parent}},Nt=/<yield\b/i,jt=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,Tt=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,Lt=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,Mt={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},At=pt&&pt<10?at:ot,Rt="div",It={},kt=It[Qe]={},Ht=0,$t=0,Ft=Object.freeze({getTag:re,inheritFrom:ie,moveChildTag:ae,initChildTag:oe,getImmediateCustomParentTag:se,unmountAll:ue,getTagName:ce,cleanUpData:le,arrayishAdd:pe,arrayishRemove:fe,isInStub:he,mountTo:de,makeVirtual:ge,moveVirtual:me,selectTags:ve}),Pt=Object.create(bt.settings),Bt={tmpl:wt,brackets:bt,styleManager:yt,vdom:Ke,styleNode:yt.styleNode,dom:dt,check:ht,misc:Ct,tags:Ft},zt=Object.freeze({settings:Pt,util:Bt,observable:Ot,Tag:q,tag:Q,tag2:J,mount:W,mixin:X,update:Y,unregister:ee}),Dt=function(){function e(e){var t=window[e];if(t)return t;throw new Error(e+" parser not found.")}function t(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var n={html:{jade:function(n,r,i){return r=t({pretty:!0,filename:i,doctype:"html"},r),e("jade").render(n,r)}},css:{less:function(n,r,i,a){var o;return i=t({sync:!0,syncImport:!0,filename:a},i),e("less").render(r,i,function(e,t){if(e)throw e;o=t.css}),o}},js:{es6:function(n,r){return r=t({blacklist:["useStrict","strict","react"],sourceMaps:!1,comments:!1},r),e("babel").transform(n,r).code},babel:function(n,r,i){return e("babel").transform(n,t({filename:i},r)).code},coffee:function(n,r){return e("CoffeeScript").compile(n,t({bare:!0},r))},livescript:function(n,r){return e("livescript").compile(n,t({bare:!0,header:!1},r))},typescript:function(t,n){return e("typescript")(t,n)},none:function(e){return e}}};return n.js.javascript=n.js.none,n.js.coffeescript=n.js.coffee,n}(),Ut=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,Vt=bt.R_STRINGS.source,Zt=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,Gt=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+Ut,"g"),Kt=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'\/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"\/>]*)*)|\s*)(\/?)>/g,qt=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,Qt=["style","src","d"],Jt=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,Wt=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,Xt=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,Yt=/[ \t]+$/gm,en=/\x01#\d/,tn=/\x01#(\d+)/g,nn="#",rn="⁗",an='"',on="'",sn=/^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m,un=RegExp("[{}]|"+bt.S_QBLOCKS,"g"),cn=RegExp(bt.R_MLCOMMS.source+"|//[^\r\n]*|"+bt.S_QBLOCKS,"g"),ln=RegExp("([{}]|^)[ ;]*([^@ ;{}][^{}]*)(?={)|"+Ut,"g"),pn=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,fn="\\s*=\\s*("+Vt+"|{[^}]+}|\\S+)",hn=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,dn=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"\/>]+(?:(?:@|\/[^>])[^'"\/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",Vt),"gim"),gn=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,mn=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi,vn="v3.0.0-alpha.1",xn={compile:Be,compileHTML:Oe,compileCSS:Te,compileJS:Ee,parsers:Dt,version:vn},yn=xn.parsers,bn=function(e,t,i){if(typeof e===Xe){if(r(t)&&(i=t,t=!1),/^\s*</m.test(e)){var a=xn.compile(e,i);return t!==!0&&De(a),n(t)&&t(a,e,i),a}ze(e,function(e,n,r){var i=xn.compile(e,n,r);De(i,r),t&&t(i,e,n)},i)}else if(s(e)){var o=e.length;e.forEach(function(e){ze(e,function(e,n,r){var i=xn.compile(e,n,r);De(i,r),o--,!o&&t&&t(i,e,n)},i)})}else{if(n(e)?(i=t,t=e):(i=e,t=void 0),xt)return t&&t();vt?t&&vt.on("ready",t):(vt=Ot(),Ue(t,i))}},wn=T({},zt,{mount:Ve,compile:bn,parsers:yn
});return wn});
/* Riot v3.0.0-alpha.9, @license MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.riot=t()}(this,function(){"use strict";function e(e){return ut.test(e)}function t(e){return lt.test(e)}function n(e){return typeof e===tt||!1}function r(e){return e&&typeof e===Ye}function i(e){return typeof e===et}function a(e){return typeof e===Xe}function o(e){return i(e)||null===e||""===e}function s(e){return Array.isArray(e)||e instanceof Array}function u(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return i(e[t])||n&&n.writable}function c(e){return st.test(e)}function l(e,t){return(t||document).querySelectorAll(e)}function p(e,t){return(t||document).querySelector(e)}function f(){return document.createDocumentFragment()}function h(){return document.createTextNode("")}function d(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg","svg"):document.createElement(e)}function g(e){if(e.outerHTML)return e.outerHTML;var t=d("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function m(e,t){if(i(e.innerHTML)){var n=(new DOMParser).parseFromString(t,"application/xml"),r=e.ownerDocument.importNode(n.documentElement,!0);e.appendChild(r)}else e.innerHTML=t}function v(e,t){e.removeAttribute(t)}function x(e,t){return e.getAttribute(t)}function y(e,t,n){var r=rt.exec(t);r&&r[1]?e.setAttributeNS(nt,r[1],n):e.setAttribute(t,n)}function b(e,t,n){e.insertBefore(t,n.parentNode&&n)}function w(e,t){if(e)for(var n;n=ct.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function C(e,t,n){if(e){var r,i=t(e,n);if(i===!1)return;for(e=e.firstChild;e;)r=e.nextSibling,C(e,t,i),e=r}}function O(e){return Object.assign?Object.assign({},e):T({},e)}function _(e,t){for(var n,r=e?e.length:0,i=0;i<r;++i)n=e[i],t(n,i)===!1&&i--;return e}function S(e,t){return~e.indexOf(t)}function E(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function j(e,t){return e.slice(0,t.length)===t}function N(e,t,n,r){return Object.defineProperty(e,t,T({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function T(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var i in t)u(e,i)&&(e[i]=t[i]);return e}function L(e,t,n){var r=this._parent,i=this._item;if(!i)for(;r&&!i;)i=r._item,r=r._parent;u(n,"currentTarget")&&(n.currentTarget=e),u(n,"target")&&(n.target=n.srcElement),u(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,t.call(this,n),n.preventUpdate||se(this).update()}function M(e,t,n,r){var i,a=L.bind(r,n,t);return n.addEventListener?(i=e.replace(_t,""),r._internal.eventHandlers[i]&&n.removeEventListener(i,r._internal.eventHandlers[i]),r._internal.eventHandlers[i]=a,void n.addEventListener(i,a,!1)):void(n[e]=a)}function A(e,t){var n,r=wt(e.value,t);if(e.tag&&e.tagName===r)return void e.tag.update();if(e.tag){var i=e.tag.opts.dataIs,a=e.tag._parent.tags;fe(a,i,e.tag)}e.impl=qe[r],n={root:e.dom,parent:t,hasImpl:!0,tagName:r},e.tag=oe(e.impl,n,e.dom.innerHTML,t),e.tagName=r,e.tag.mount(),e.tag.update(),t.on("unmount",function(){var t=e.tag.opts.dataIs,n=e.tag.parent.tags,r=e.tag._parent.tags;fe(n,t,e.tag),fe(r,t,e.tag),e.tag.unmount()})}function R(e){var t,r=e.dom,a=e.attr,o=wt(e.expr,this),s="value"===a,u=e.root&&"VIRTUAL"===e.root.tagName,c=r&&(e.parent||r.parentNode);if(e.bool?o=!!o&&a:(i(o)||null===o)&&(o=""),e._riot_id){if(e.isMounted)e.update();else if(e.mount(),u){var l=document.createDocumentFragment();ge.call(e,l),e.root.parentElement.replaceChild(l,e.root)}}else{if(t=e.value,e.value=o,e.update)return void e.update();if(t!==o){if(e.isRtag&&o)return A(e,this);if(!s||r.value!==o){if(!a)return o+="",void(c&&(e.parent=c,"TEXTAREA"===c.tagName?(c.value=o,pt||(r.nodeValue=o)):r.nodeValue=o));if(v(r,a),n(o))M(a,o,r,this);else if(/^(show|hide)$/.test(a))"hide"===a&&(o=!o),r.style.display=o?"":"none";else if(s)r.value=o;else if(j(a,Je)&&a!==We)o&&y(r,a.slice(Je.length),o);else{if("selected"===a&&c&&/^(SELECT|OPTGROUP)$/.test(c.nodeName)&&o&&(c.value=r.value),e.bool&&(r[a]=o,!o))return;(0===o||o&&typeof o!==Ye)&&y(r,a,o)}}}}}function I(e){_(e,R.bind(this))}function k(e,t,n,r){var i=r?Object.create(r):{};return i[e.key]=t,e.pos&&(i[e.pos]=n),i}function H(e,t,n,r){for(var i,a=t.length,o=e.length;a>o;)i=t[--a],t.splice(a,1),i.unmount(),fe(r.tags,n,i,!0)}function $(e){var t=this;_(Object.keys(this.tags),function(n){var r=t.tags[n];s(r)?_(r,function(t){ae.apply(t,[n,e])}):ae.apply(r,[n,e])})}function F(e,t,n){n?me.apply(this,[e,t]):b(e,this.root,t.root)}function P(e,t,n){n?ge.apply(this,[e,t]):b(e,this.root,t.root)}function B(e,t){t?ge.call(this,e):e.appendChild(this.root)}function z(e){for(var t=0;t<e.length;t++)if(e[t].__riot1374){e.selectedIndex=t,delete e[t].__riot1374;break}}function D(e,t,n){v(e,"each");var r,i=typeof x(e,"no-reorder")!==Xe||v(e,"no-reorder"),a=ce(e),o=qe[a]||{tmpl:g(e)},u=at.test(a),c=e.parentNode,l=h(),p=re(e),d=x(e,"if"),m="option"===a.toLowerCase(),y=[],b=[],w=!0,C=!qe[a],O="VIRTUAL"===e.tagName;return n=wt.loopKeys(n),n.isLoop=!0,d&&v(e,"if"),c.insertBefore(l,e),c.removeChild(e),n.update=function(){var g,v,x,S=wt(n.val,t);c=l.parentNode,g?(x=h(""),g.insertBefore(x,c),g.removeChild(c)):v=f(),s(S)||(r=S||!1,S=r?Object.keys(S).map(function(e){return k(n,e,S[e])}):[]),d&&(S=S.filter(function(e,r){var i=k(n,e,r,t);return!!wt(d,i)})),_(S,function(s,l){var f=i&&typeof s===Ye&&!r,h=b.indexOf(s),d=~h&&f?h:l,g=y[d];if(s=!r&&n.key?k(n,s,l):s,!f&&!g||f&&!~h||!g){var m=l===y.length;g=new ne(o,{parent:t,isLoop:w,isAnonymous:C,root:u?c:e.cloneNode(),item:s},e.innerHTML),g.mount(),m?B.apply(g,[v||c,O]):P.apply(g,[c,y[l],O]),m||b.splice(l,0,s),y.splice(l,0,g),p&&pe(t.tags,a,g,!0),d=l}else g.update(s);d!==l&&f&&(F.apply(g,[c,y[l],O]),n.pos&&(g[n.pos]=l),y.splice(l,0,y.splice(d,1)[0]),b.splice(l,0,b.splice(d,1)[0]),!p&&g.tags&&$.call(g,l)),g._item=s,N(g,"_parent",t)}),H(S,y,a,t),m&&ft&&!c.multiple&&z(c),b=S.slice(),v?c.insertBefore(v,l):(g.insertBefore(c,x),g.removeChild(x))},n.unmount=function(){_(y,function(e){e.unmount()})},n}function U(e,t,n){var r=this,i={parent:{children:t}};C(e,function(t,i){var a,o,s,u=t.nodeType,c=i.parent;if(!n&&t===e)return{parent:c};if(3===u&&"STYLE"!==t.parentNode.tagName&&wt.hasExpr(t.nodeValue)&&c.children.push({dom:t,expr:t.nodeValue}),1!==u)return i;if(a=x(t,"each"))return c.children.push(D(t,r,a)),!1;if(a=x(t,"if"))return c.children.push(Object.create(St).init(t,r,a)),!1;if((o=x(t,We))&&wt.hasExpr(o))return c.children.push({isRtag:!0,expr:o,dom:t}),!1;if(s=re(t),s&&(t!==e||n)){var l={root:t,parent:r,hasImpl:!0};return c.children.push(oe(s,l,t.innerHTML,r)),!1}return V.apply(r,[t,t.attributes,function(e,t){t&&c.children.push(t)}]),{parent:c}},i)}function V(e,n,r){var i=this;_(n,function(n){var a,o=n.name,s=t(o);~["ref","data-ref"].indexOf(o)?a=Object.create(Et).init(e,o,n.value,i):wt.hasExpr(n.value)&&(a={dom:e,expr:n.value,attr:n.name,bool:s}),r(n,a)})}function Z(e,t,n){var r="o"===n[0],i=r?"select>":"table>";if(e.innerHTML="<"+i+t.trim()+"</"+i,i=e.firstChild,r)i.selectedIndex=-1;else{var a=Mt[n];a&&1===i.childElementCount&&(i=p(a,i))}return i}function G(e,t){if(!jt.test(e))return e;var n={};return t=t&&t.replace(Tt,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(Lt,function(e,t,r){return n[t]||r||""}).replace(Nt,function(e,n){return t||n||""})}function K(t,n){var r=t&&t.match(/^\s*<([-\w]+)/),i=r&&r[1].toLowerCase(),a=d(Rt,e(i));return t=G(t,n),At.test(i)?a=Z(a,t,i):m(a,t),a.stub=!0,a}function q(e,t){var n=this,r=n.name,i=n.tmpl,a=n.css,o=n.attrs,s=n.onCreate;return qe[r]||(Q(r,i,a,o,s),qe[r].class=this.constructor),de(e,r,t,this),this}function Q(e,t,r,i,a){return n(i)&&(a=i,/^[\w\-]+\s?=/.test(r)?(i=r,r=""):i=""),r&&(n(r)?a=r:yt.add(r)),e=e.toLowerCase(),qe[e]={name:e,tmpl:t,attrs:i,fn:a},e}function J(e,t,n,r,i){n&&yt.add(n,e);var a=!!qe[e];return qe[e]={name:e,tmpl:t,attrs:r,fn:i},a&&zt.util.hotReloader&&zt.util.hotReloader(e),e}function W(e,t,n){function i(e){if(e.tagName){var r=x(e,We);t&&r!==t&&(r=t,y(e,We,t));var a=de(e,r||e.tagName.toLowerCase(),n);a&&o.push(a)}else e.length&&_(e,i)}var o=[];yt.inject(),r(t)&&(n=t,t=0);var s,u;if(a(e)?(e="*"===e?u=ve():e+ve(e.split(/, */)),s=e?l(e):[]):s=e,"*"===t){if(t=u||ve(),s.tagName)s=l(t,s);else{var c=[];_(s,function(e){return c.push(l(t,e))}),s=c}t=0}return i(s),o}function X(e,t,a){if(r(e))return void X("__unnamed_"+Ht++,e,!0);var o=a?kt:It;if(!t){if(i(o[e]))throw new Error("Unregistered mixin: "+e);return o[e]}o[e]=n(t)?T(t.prototype,o[e]||{})&&t:T(o[e]||{},t)}function Y(){return _(Ke,function(e){return e.update()})}function ee(e){delete qe[e]}function te(e,t,n,r,i){if(!e||!n){var a=!n&&e?this:t||this;_(i,function(e){e.expr&&I.call(a,[e.expr]),r[E(e.name)]=e.expr?e.expr.value:e.value})}}function ne(e,t,r){var i,o=O(t.opts),s=t.parent,u=t.isLoop,c=t.isAnonymous,l=le(t.item),p=[],f=[],h=[],d=t.root,g=t.tagName||d.tagName.toLowerCase(),m=[];Ot(this),e.name&&d._tag&&d._tag.unmount(!0),this.isMounted=!1,d.isLoop=u,N(this,"_internal",{isAnonymous:c,instAttrs:p,innerHTML:r,eventHandlers:{},virts:[],tail:null,head:null}),N(this,"_riot_id",++$t),T(this,{parent:s,root:d,opts:o},l),N(this,"tags",{}),N(this,"refs",{}),i=K(e.tmpl,r),N(this,"update",function(e){if(!n(this.shouldUpdate)||this.shouldUpdate())return e=le(e),u&&c&&ie.apply(this,[this.parent,m]),T(this,e),te.apply(this,[u,s,c,o,p]),this.isMounted&&this.trigger("update",e),I.call(this,h),this.isMounted&&this.trigger("updated"),this}),N(this,"mixin",function(){var e=this;return _(arguments,function(t){var r,i,o=[];t=a(t)?X(t):t,r=n(t)?new t:t;var s=Object.getPrototypeOf(r);do o=o.concat(Object.getOwnPropertyNames(i||r));while(i=Object.getPrototypeOf(i||r));_(o,function(t){if("init"!==t){var i=Object.getOwnPropertyDescriptor(r,t)||Object.getOwnPropertyDescriptor(s,t),a=i&&(i.get||i.set);!e.hasOwnProperty(t)&&a?Object.defineProperty(e,t,i):e[t]=n(r[t])?r[t].bind(e):r[t]}}),r.init&&r.init.bind(e)()}),this}),N(this,"mount",function(){var t=this;d._tag=this;var n=X(Qe);if(n)for(var r in n)n.hasOwnProperty(r)&&t.mixin(n[r]);if(V.apply(s,[d,d.attributes,function(e,n){!c&&Et.isPrototypeOf(n)&&(n.tag=t),e.expr=n,p.push(e)}]),this._parent&&c&&ie.apply(this,[this._parent,m]),te.apply(this,[u,s,c,o,p]),e.fn&&e.fn.call(this,o),this.trigger("before-mount"),f=[],w(e.attrs,function(e,t){f.push({name:e,value:t})}),V.apply(this,[d,f,function(e,t){t?h.push(t):y(d,e.name,e.value)}]),U.apply(this,[i,h,!1]),this.update(l),u&&c)this.root=d=i.firstChild;else{for(;i.firstChild;)d.appendChild(i.firstChild);d.stub&&(d=s.root)}N(this,"root",d),this.isMounted=!0,!this.parent||this.parent.isMounted?this.trigger("mount"):this.parent.one("mount",function(){t.trigger("mount")})}),N(this,"unmount",function(e){var t,n=this,r=this.root,i=r.parentNode,a=Ke.indexOf(this);if(this.trigger("before-unmount"),_(Object.keys(this._internal.eventHandlers),function(e){n.root.removeEventListener(e,n._internal.eventHandlers[e])}),~a&&Ke.splice(a,1),i){if(s)t=se(s),fe(t.tags,g,this);else for(;r.firstChild;)r.removeChild(r.firstChild);e?v(i,We):i.removeChild(r)}this._internal.virts&&_(this._internal.virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),ue(h),_(p,function(e){return e.expr&&e.expr.unmount&&e.expr.unmount()}),this.trigger("unmount"),this.off("*"),this.isMounted=!1,delete this.root._tag})}function re(e){return e.tagName&&qe[x(e,We)||x(e,We)||e.tagName.toLowerCase()]}function ie(e,t){var n=this;_(Object.keys(e),function(r){var a=!c(r)&&S(t,r);(i(n[r])||a)&&(a||t.push(r),n[r]=e[r])})}function ae(e,t){var n,r=this.parent;r&&(n=r.tags[e],s(n)?n.splice(t,0,n.splice(n.indexOf(this),1)[0]):pe(r.tags,e,this))}function oe(e,t,n,r){var i=new ne(e,t,n),a=t.tagName||ce(t.root,!0),o=se(r);return i.parent=o,i._parent=r,pe(o.tags,a,i),o!==r&&pe(r.tags,a,i),t.root.innerHTML="",i}function se(e){for(var t=e;t._internal.isAnonymous&&t.parent;)t=t.parent;return t}function ue(e){_(e,function(e){e instanceof ne?e.unmount(!0):e.unmount&&e.unmount()})}function ce(e,t){var n=re(e),r=!t&&x(e,"name"),i=r&&!wt.hasExpr(r)?r:n?n.name:e.tagName.toLowerCase();return i}function le(e){if(!(e instanceof ne||e&&typeof e.trigger===tt))return e;var t={};for(var n in e)st.test(n)||(t[n]=e[n]);return t}function pe(e,t,n,r){var i=e[t],a=s(i);i&&i===n||(!i&&r?e[t]=[n]:i?(!a||a&&!S(i,n))&&(a?i.push(n):e[t]=[i,n]):e[t]=n)}function fe(e,t,n,r){s(e[t])?(_(e[t],function(r,i){r===n&&e[t].splice(i,1)}),e[t].length?1!==e[t].length||r||(e[t]=e[t][0]):delete e[t]):delete e[t]}function he(e){for(;e;){if(e.inStub)return!0;e=e.parentNode}return!1}function de(e,t,n,r){var i=qe[t],a=qe[t].class,o=r||(a?Object.create(a.prototype):{}),s=e._innerHTML=e._innerHTML||e.innerHTML;e.innerHTML="";var u={root:e,opts:n};return n&&n.parent&&(u.parent=n.parent),i&&e&&ne.apply(o,[i,u,s]),o&&o.mount&&(o.mount(!0),S(Ke,o)||Ke.push(o)),o}function ge(e,t){var n,r,i=this,a=h(),o=h(),s=f();for(this._internal.head=this.root.insertBefore(a,this.root.firstChild),this._internal.tail=this.root.appendChild(o),r=this._internal.head;r;)n=r.nextSibling,s.appendChild(r),i._internal.virts.push(r),r=n;t?e.insertBefore(s,t._internal.head):e.appendChild(s)}function me(e,t){for(var n,r=this,i=this._internal.head,a=f();i;)if(n=i.nextSibling,a.appendChild(i),i=n,i===r._internal.tail){a.appendChild(i),e.insertBefore(a,t._internal.head);break}}function ve(e){if(!e){var t=Object.keys(qe);return t+ve(t)}return e.filter(function(e){return!/[^-\w]/.test(e)}).reduce(function(e,t){var n=t.trim().toLowerCase();return e+",["+We+'="'+n+'"]'},"")}function xe(e){var t,n=Gt;for(~e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),n.lastIndex=0;t=n.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,n.lastIndex=t[3]+1);return e}function ye(e,t){var n,r,i,a=[];for(Zt.lastIndex=0,e=e.replace(/\s+/g," ");n=Zt.exec(e);){var o=n[1].toLowerCase(),s=n[2];s?(s[0]!==an&&(s=an+(s[0]===on?s.slice(1,-1):s)+an),"type"===o&&Xt.test(s)?r=s:(en.test(s)&&("value"===o?i=1:~Qt.indexOf(o)&&(o="riot-"+o)),a.push(o+"="+s))):a.push(o)}return r&&(i&&(r=an+t._bp[0]+on+r.slice(1,-1)+on+t._bp[1]+an),a.push("type="+r)),a.join(" ")}function be(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var i,a=t.expr&&(t.parser||t.type)?Se:0,o=bt.split(e,0,r),s=1;s<o.length;s+=2)i=o[s],"^"===i[0]?i=i.slice(1):a&&(i=a(i,t).trim(),";"===i.slice(-1)&&(i=i.slice(0,-1))),o[s]=nn+(n.push(i)-1)+r[1];e=o.join("")}return e}function we(e,t){return t.length&&(e=e.replace(tn,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,rn)})),e}function Ce(e,t,n){if(e=be(e,t,n).replace(Kt,function(e,t,r,i){return t=t.toLowerCase(),i=i&&!Jt.test(t)?"></"+t:"",r&&(t+=" "+ye(r,n)),"<"+t+i+">"}),!t.whitespace){var r=[];/<pre[\s>]/.test(e)&&(e=e.replace(Wt,function(e){return r.push(e),""})),e=e.trim().replace(/\s+/g," "),r.length&&(e=e.replace(/\u0002/g,function(){return r.shift()}))}return t.compact&&(e=e.replace(qt,"><$1")),we(e,n).replace(Yt,"")}function Oe(e,t,n){return Array.isArray(t)?(n=t,t={}):(n||(n=[]),t||(t={})),n._bp=bt.array(t.brackets),Ce(xe(e),t,n)}function _e(e){function t(e,t,n){for(t.lastIndex=0;n=t.exec(e);)"/"!==n[0][0]||n[1]||n[2]||(e=u.leftContext+" "+u.rightContext,t.lastIndex=n[3]+1);return e}function n(e,t){var n,r=1;for(t.lastIndex=0;r&&(n=t.exec(e));)"{"===n[0]?++r:"}"===n[0]&&--r;return r?e.length:t.lastIndex}var r,i,a,o,s=[],u=RegExp;for(~e.indexOf("/")&&(e=t(e,cn));r=e.match(sn);)s.push(u.leftContext),e=u.rightContext,a=n(e,un),o=r[1],i=!/^(?:if|while|for|switch|catch|function)$/.test(o),o=i?r[0].replace(o,"this."+o+" = function"):r[0],s.push(o,e.slice(0,a)),e=e.slice(a),i&&!/^\s*.\s*bind\b/.test(e)&&s.push(".bind(this)");return s.length?s.join("")+e:e}function Se(e,t,n,r,i){if(!/\S/.test(e))return"";n||(n=t.type);var a=t.parser||(n?Dt.js[n]:_e);if(!a)throw new Error('JS parser not found: "'+n+'"');return a(e,r,i).replace(/\r\n?/g,"\n").replace(Yt,"")}function Ee(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),Se(e,t||{},n,r.parserOptions,r.url)}function je(e,t){var n=":scope";return t.replace(ln,function(t,r,i){return i?(i=i.replace(/[^,]+/g,function(t){var r=t.trim();return r&&"from"!==r&&"to"!==r&&"%"!==r.slice(-1)?r=r.indexOf(n)<0?e+" "+r+',[riot-tag="'+e+'"] '+r+',[data-is="'+e+'"] '+r:r.replace(n,e)+","+r.replace(n,'[riot-tag="'+e+'"]')+","+r.replace(n,'[data-is="'+e+'"]'):t}),r?r+" "+i:i):t})}function Ne(e,t,n,r){var i=(r||(r={})).scoped;if(n)if("scoped-css"===n)i=!0;else if(Dt.css[n])e=Dt.css[n](t,e,r.parserOpts||{},r.url);else if("css"!==n)throw new Error('CSS parser not found: "'+n+'"');if(e=e.replace(bt.R_MLCOMMS,"").replace(/\s+/g," ").trim(),i){if(!t)throw new Error("Can not parse scoped CSS without a tagName");e=je(t,e)}return e}function Te(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),Ne(e,n.tagName,t,n)}function Le(e,t){return e?(e=on+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+on,t&&~e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function Me(e,t,n,r,i,a){var o=a.debug?",\n ":", ",s="});";return i&&"\n"!==i.slice(-1)&&(s="\n"+s),"riot.tag2('"+e+on+o+Le(t,1)+o+Le(n)+o+Le(r)+", function(opts) {\n"+i+s}function Ae(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;~n;){if(t=e.slice(n,r).match(hn))return n+=t.index+t[0].length,[e.slice(0,n),e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}function Re(e){if(e){var t=e.match(pn);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function Ie(e,t){if(e){var n=e.match(RegExp("\\s"+t+fn,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function ke(e){return e.replace("&amp;",/&/g).replace("&lt;",/</g).replace("&gt;",/>/g).replace("&quot;",/"/g).replace("&#039;",/'/g)}function He(e){var t=ke(Ie(e,"options"));return t?JSON.parse(t):null}function $e(e,t,n,r){var i=Re(n),a=Ie(n,"src");return!a&&Se(e,t,i,He(n),r)}function Fe(e,t,n,r,i){var a={parserOpts:He(n),scoped:n&&/\sscoped(\s|=|$)/i.test(n),url:r};return Ne(e,i,Re(n)||t.style,a)}function Pe(e,t,n,r){var i=Dt.html[n];if(!i)throw new Error('Template parser not found: "'+n+'"');return i(e,r,t)}function Be(e,t,n){var r,i=[];t||(t={}),r=t.exclude?function(e){return t.exclude.indexOf(e)<0}:function(){return 1},n||(n="");var a=bt.array(t.brackets);return t.template&&(e=Pe(e,n,t.template,t.templateOptions)),e=xe(e).replace(dn,function(e,o,s,u,c,l){var p="",f="",h="",d=[];if(d._bp=a,s=s.toLowerCase(),u=u&&r("attribs")?we(ye(be(u,t,d),d),d):"",(c||(c=l))&&/\S/.test(c))if(l)r("html")&&(h=Ce(l,t,d));else{c=c.replace(RegExp("^"+o,"gm"),""),c=c.replace(mn,function(e,i,a){return r("css")&&(f+=(f?" ":"")+Fe(a,t,i,n,s)),""}),c=c.replace(gn,function(e,i,a){if(r("js")){var o=$e(a,t,i,n);o&&(p+=(p?"\n":"")+o)}return""});var g=Ae(c.replace(Yt,""));r("html")&&(h=Ce(g[0],t,d)),r("js")&&(c=Se(g[1],t,null,null,n),c&&(p+=(p?"\n":"")+c))}return p=/\S/.test(p)?p.replace(/\n{3,}/g,"\n\n"):"",t.entities?(i.push({tagName:s,html:h,css:f,attribs:u,js:p}),""):Me(s,h,f,u,p,t)}),t.entities?i:e}function ze(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status||!r.status&&r.responseText.length)&&t(r.responseText,n,e)},r.open("GET",e,!0),r.send("")}function De(e,t){if(typeof e===Xe){var n=d("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function Ue(e,t){function n(){vt.trigger("ready"),xt=!0,e&&e()}function r(e,t,r){var i=xn.compile(e,t,r);De(i,r),--a||n()}var i=l('script[type="riot/tag"]'),a=i.length;if(a)for(var o=0;o<i.length;++o){var s=i[o],u=T({template:x(s,"template")},t),c=x(s,"src");c?ze(c,r,u):r(s.innerHTML,u)}else n()}function Ve(e,t,n){var r;return bn(function(){r=W(e,t,n)}),r}var Ze,Ge,Ke=[],qe={},Qe="__global_mixin",Je="riot-",We="data-is",Xe="string",Ye="object",et="undefined",tt="function",nt="http://www.w3.org/1999/xlink",rt=/^xlink:(\w+)/,it=typeof window===et?void 0:window,at=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,ot=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,st=/^(?:_(?:item|id|parent)|update|root|(?:un)?mount|mixin|is(?:Mounted|Loop)|tags|parent|opts|trigger|o(?:n|ff|ne))$/,ut=/^(altGlyph|animate(?:Color)?|circle|clipPath|defs|ellipse|fe(?:Blend|ColorMatrix|ComponentTransfer|Composite|ConvolveMatrix|DiffuseLighting|DisplacementMap|Flood|GaussianBlur|Image|Merge|Morphology|Offset|SpecularLighting|Tile|Turbulence)|filter|font|foreignObject|g(?:lyph)?(?:Ref)?|image|line(?:arGradient)?|ma(?:rker|sk)|missing-glyph|path|pattern|poly(?:gon|line)|radialGradient|rect|stop|svg|switch|symbol|text(?:Path)?|tref|tspan|use)$/,ct=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,lt=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,pt=0|(it&&it.document||{}).documentMode,ft=it&&!!it.InstallTrigger,ht=Object.freeze({isSVGTag:e,isBoolAttr:t,isFunction:n,isObject:r,isUndefined:i,isString:a,isBlank:o,isArray:s,isWritable:u,isReservedName:c}),dt=Object.freeze({$$:l,$:p,createFrag:f,createDOMPlaceholder:h,mkEl:d,getOuterHTML:g,setInnerHTML:m,remAttr:v,getAttr:x,setAttr:y,safeInsert:b,walkAttrs:w,walkNodes:C}),gt={},mt=[];it&&(Ze=function(){var e=d("style");y(e,"type","text/css");var t=p("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),Ge=Ze.styleSheet);var vt,xt,yt={styleNode:Ze,add:function(e,t){t?gt[t]=e:mt.push(e)},inject:function(){if(it){var e=Object.keys(gt).map(function(e){return gt[e]}).concat(mt).join("\n");Ge?Ge.cssText=e:Ze.innerHTML=e}}},bt=function(e){function t(e){return e}function n(e,t){return t||(t=y),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?c:"")}function r(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||h.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(d,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:v[4],t),t[5]=n(e.length>3?/\\({|})/g:v[5],t),t[6]=n(v[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+f,c),t[8]=e,t}function i(e){return e instanceof RegExp?s(e):y[e]}function a(e){(e||(e=m))!==y[8]&&(y=r(e),s=e===m?t:n,y[9]=s(v[9])),x=e}function o(e){var t;e=e||{},t=e.brackets,Object.defineProperty(e,"brackets",{set:a,get:function(){return x},enumerable:!0}),u=e,a(t)}var s,u,c="g",l=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,p=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'/g,f=p.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?(\/)[gim]*/.source,h=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),d=/(?=[[\]()*+?.^$|])/g,g={"(":RegExp("([()])|"+f,c),"[":RegExp("([[\\]])|"+f,c),"{":RegExp("([{}])|"+f,c)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+f,c),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],x=e,y=[];return i.split=function(e,t,n){function r(e){t||o?c.push(e&&e.replace(n[5],"$1")):c.push(e)}function i(e,t,n){var r,i=g[t];for(i.lastIndex=n,n=1;(r=i.exec(e))&&(!r[1]||(r[1]===t?++n:--n)););return n?e.length:i.lastIndex}n||(n=y);var a,o,s,u,c=[],l=n[6];for(o=s=l.lastIndex=0;a=l.exec(e);){if(u=a.index,o){if(a[2]){l.lastIndex=i(e,a[2],l.lastIndex);continue}if(!a[3])continue}a[1]||(r(e.slice(s,u)),s=l.lastIndex,l=n[6+(o^=1)],l.lastIndex=s)}return e&&s<e.length&&r(e.slice(s)),c},i.hasExpr=function(e){return y[4].test(e)},i.loopKeys=function(e){var t=e.match(y[9]);return t?{key:t[1],pos:t[2],val:y[0]+t[3].trim()+y[1]}:{val:e.trim()}},i.array=function(e){return e?r(e):y},Object.defineProperty(i,"settings",{set:o,get:function(){return u}}),i.settings="undefined"!=typeof zt&&zt.settings||{},i.set=a,i.R_STRINGS=p,i.R_MLCOMMS=l,i.S_QBLOCKS=f,i}(),wt=function(){function e(e,r){return e?(o[e]||(o[e]=n(e))).call(r,t):e}function t(t,n){e.errorHandler&&(t.riotData={tagName:n&&n.root&&n.root.tagName,_riot_id:n&&n._riot_id},e.errorHandler(t))}function n(e){var t=r(e);return"try{return "!==t.slice(0,11)&&(t="return "+t),new Function("E",t+";")}function r(e){var t,n=[],r=bt.split(e.replace(l,'"'),1);if(r.length>2||r[0]){var a,o,s=[];for(a=o=0;a<r.length;++a)t=r[a],t&&(t=1&a?i(t,1,n):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(s[o++]=t);t=o<2?s[0]:"["+s.join(",")+'].join("")'}else t=i(r[1],0,n);return n[0]&&(t=t.replace(p,function(e,t){return n[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){function r(t,n){var r,i=1,a=f[t];for(a.lastIndex=n.lastIndex;r=a.exec(e);)if(r[0]===t)++i;else if(!--i)break;n.lastIndex=i?e.length:a.lastIndex}if(e=e.replace(c,function(e,t){return e.length>2&&!t?s+(n.push(e)-1)+"~":e}).replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var i,o=[],l=0;e&&(i=e.match(u))&&!i.index;){var p,h,d=/,|([[{(])|$/g;for(e=RegExp.rightContext,p=i[2]?n[i[2]].slice(1,-1).trim().replace(/\s+/g," "):i[1];h=(i=d.exec(e))[1];)r(h,d);h=e.slice(0,i.index),e=RegExp.rightContext,o[l++]=a(h,1,p)}e=l?l>1?"["+o.join(",")+'].join(" ").trim()':o[0]:a(e,t)}return e}function a(e,t,n){var r;return e=e.replace(d,function(e,t,n,i,a){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+h+n,i&&(r="."===(a=a[i])||"("===a||"["===a)):i&&(r=!g.test(a.slice(i)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var o={};e.haveRaw=bt.hasRaw,e.hasExpr=bt.hasExpr,e.loopKeys=bt.loopKeys,e.clearCache=function(){o={}},e.errorHandler=null;var s="⁗",u=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,c=RegExp(bt.S_QBLOCKS,"g"),l=/\u2057/g,p=/\u2057(\d+)~/g,f={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},h='"in this?this:'+("object"!=typeof window?"global":"window")+").",d=/[,{][$\w]+(?=:)|(^ *|[^$\w\.])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,g=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=bt.version="v2.4.1",e}(),Ct=Object.freeze({inherit:O,each:_,contains:S,toCamel:E,startsWith:j,defineProperty:N,extend:T}),Ot=function(e){e=e||{};var t={},n=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(n,r){return"function"==typeof r&&(t[n]=t[n]||[]).push(r),e},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,a=t[n],o=0;i=a&&a[o];++o)i==r&&a.splice(o--,1);else delete t[n];else t={};return e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,a,o,s=arguments,u=arguments.length-1,c=new Array(u);for(o=0;o<u;o++)c[o]=s[o+1];for(i=n.call(t[r]||[],0),o=0;a=i[o];++o)a.apply(e,c),i[o]!==a&&o--;return t["*"]&&"*"!=r&&e.trigger.apply(e,["*",r].concat(c)),e},enumerable:!1,writable:!1,configurable:!1}}),e},_t=/^on/,St={init:function(e,t,n){v(e,"if"),this.parentTag=t,this.expr=n,this.stub=document.createTextNode(""),this.pristine=e;var r=e.parentNode;return r.insertBefore(this.stub,e),r.removeChild(e),this},update:function(){var e=wt(this.expr,this.parentTag);e&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],U.apply(this.parentTag,[this.current,this.expressions,!0])):!e&&this.current&&(ue(this.expressions),this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),e&&I.call(this.parentTag,this.expressions)},unmount:function(){ue(this.expressions||[]),delete this.pristine,delete this.parentNode,delete this.stub}},Et={init:function(e,t,n,r){return this.dom=e,this.attr=t,this.rawValue=n,this.parent=r,this.hasExp=wt.hasExpr(n),this.firstRun=!0,this},update:function(){var e=this.rawValue;if(this.hasExp&&(e=wt(this.rawValue,this.parent)),this.firstRun||e!==this.value){var t=this.parent&&se(this.parent),n=this.tag||this.dom;!o(this.value)&&t&&fe(t.refs,this.value,n),o(e)?v(this.dom,this.attr):(t&&pe(t.refs,e,n),y(this.dom,this.attr,e)),this.value=e,this.firstRun=!1}},unmount:function(){var e=this.tag||this.dom,t=this.parent&&se(this.parent);!o(this.value)&&t&&fe(t.refs,this.value,e),delete this.dom,delete this.parent}},jt=/<yield\b/i,Nt=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,Tt=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,Lt=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,Mt={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},At=pt&&pt<10?at:ot,Rt="div",It={},kt=It[Qe]={},Ht=0,$t=0,Ft=Object.freeze({getTag:re,inheritFrom:ie,moveChildTag:ae,initChildTag:oe,getImmediateCustomParentTag:se,unmountAll:ue,getTagName:ce,cleanUpData:le,arrayishAdd:pe,arrayishRemove:fe,isInStub:he,mountTo:de,makeVirtual:ge,moveVirtual:me,selectTags:ve}),Pt=Object.create(bt.settings),Bt={tmpl:wt,brackets:bt,styleManager:yt,vdom:Ke,styleNode:yt.styleNode,dom:dt,check:ht,misc:Ct,tags:Ft},zt=Object.freeze({settings:Pt,util:Bt,observable:Ot,Tag:q,tag:Q,tag2:J,mount:W,mixin:X,update:Y,unregister:ee}),Dt=function(){function e(e){var t=window[e];if(t)return t;throw new Error(e+" parser not found.")}function t(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var n={html:{jade:function(n,r,i){return r=t({pretty:!0,filename:i,doctype:"html"},r),e("jade").render(n,r)}},css:{less:function(n,r,i,a){var o;return i=t({sync:!0,syncImport:!0,filename:a},i),e("less").render(r,i,function(e,t){if(e)throw e;o=t.css}),o}},js:{es6:function(n,r){return r=t({blacklist:["useStrict","strict","react"],sourceMaps:!1,comments:!1},r),e("babel").transform(n,r).code},babel:function(n,r,i){return e("babel").transform(n,t({filename:i},r)).code},coffee:function(n,r){return e("CoffeeScript").compile(n,t({bare:!0},r))},livescript:function(n,r){return e("livescript").compile(n,t({bare:!0,header:!1},r))},typescript:function(t,n){return e("typescript")(t,n)},none:function(e){return e}}};return n.js.javascript=n.js.none,n.js.coffeescript=n.js.coffee,n}(),Ut=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,Vt=bt.R_STRINGS.source,Zt=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,Gt=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+Ut,"g"),Kt=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'\/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"\/>]*)*)|\s*)(\/?)>/g,qt=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,Qt=["style","src","d"],Jt=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,Wt=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,Xt=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,Yt=/[ \t]+$/gm,en=/\x01#\d/,tn=/\x01#(\d+)/g,nn="#",rn="⁗",an='"',on="'",sn=/^[ \t]*([$_A-Za-z][$\w]*)\s*\([^()]*\)\s*{/m,un=RegExp("[{}]|"+bt.S_QBLOCKS,"g"),cn=RegExp(bt.R_MLCOMMS.source+"|//[^\r\n]*|"+bt.S_QBLOCKS,"g"),ln=RegExp("([{}]|^)[ ;]*([^@ ;{}][^{}]*)(?={)|"+Ut,"g"),pn=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,fn="\\s*=\\s*("+Vt+"|{[^}]+}|\\S+)",hn=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,dn=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"\/>]+(?:(?:@|\/[^>])[^'"\/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",Vt),"gim"),gn=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,mn=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi,vn="v3.0.0-alpha.1",xn={compile:Be,compileHTML:Oe,compileCSS:Te,compileJS:Ee,parsers:Dt,version:vn},yn=xn.parsers,bn=function(e,t,i){if(typeof e===Xe){if(r(t)&&(i=t,t=!1),/^\s*</m.test(e)){var a=xn.compile(e,i);return t!==!0&&De(a),n(t)&&t(a,e,i),a}ze(e,function(e,n,r){var i=xn.compile(e,n,r);De(i,r),t&&t(i,e,n)},i)}else if(s(e)){var o=e.length;e.forEach(function(e){ze(e,function(e,n,r){var i=xn.compile(e,n,r);De(i,r),o--,!o&&t&&t(i,e,n)},i)})}else{if(n(e)?(i=t,t=e):(i=e,t=void 0),xt)return t&&t();
vt?t&&vt.on("ready",t):(vt=Ot(),Ue(t,i))}},wn=T({},zt,{mount:Ve,compile:bn,parsers:yn});return wn});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc