Files
2019-11-17 19:14:07 +01:00

3 lines
35 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Riot v3.6.3, @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 mt.test(e)}function t(e){return typeof e===ot}function n(e){return e&&typeof e===it}function r(e){return typeof e===st}function i(e){return typeof e===rt}function s(e){return r(e)||null===e||""===e}function o(e){return Array.isArray(e)||e instanceof Array}function a(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return r(e[t])||n&&n.writable}function u(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function c(e,t){return(t||document).querySelector(e)}function l(){return document.createDocumentFragment()}function p(){return document.createTextNode("")}function f(e){return!!e.ownerSVGElement}function h(e){return"svg"===e?document.createElementNS(ut,e):document.createElement(e)}function d(e,t){if(r(e.innerHTML)){var n=(new DOMParser).parseFromString(t,"application/xml"),i=e.ownerDocument.importNode(n.documentElement,!0);e.appendChild(i)}else e.innerHTML=t}function g(e,t){e.style.display=t?"":"none",e.hidden=!t}function m(e,t){e.removeAttribute(t)}function v(e){return Object.keys(e).reduce(function(t,n){return t+" "+n+": "+e[n]+";"},"")}function x(e,t){return e.getAttribute(t)}function y(e,t,n){var r=ct.exec(t);r&&r[1]?e.setAttributeNS(at,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=dt.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function _(e,t,n){if(e){var r,i=t(e,n);if(!1===i)return;for(e=e.firstChild;e;)r=e.nextSibling,_(e,t,i),e=r}}function O(e,t){for(var n=e?e.length:0,r=0;r<n;++r)t(e[r],r);return e}function j(e,t){return-1!==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 C(e,t,n,r){return Object.defineProperty(e,t,S({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function S(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var i in t)a(e,i)&&(e[i]=t[i]);return e}function A(e,t,n){var r=this.__.parent,i=this.__.item;if(!i)for(;r&&!i;)i=r.__.item,r=r.__.parent;if(a(n,"currentTarget")&&(n.currentTarget=e),a(n,"target")&&(n.target=n.srcElement),a(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,t.call(this,n),kt.autoUpdate&&!n.preventUpdate){var s=ue(this);s.isMounted&&s.update()}}function T(e,t,n,r){var i,s=A.bind(r,n,t);n[e]=null,i=e.replace(ht,""),j(r.__.listeners,n)||r.__.listeners.push(n),n[nt]||(n[nt]={}),n[nt][e]&&n.removeEventListener(i,n[nt][e]),n[nt][e]=s,n.addEventListener(i,s,!1)}function k(e,t,n){var r,s=e.tag||e.dom._tag,o=(s?s.__:{}).head,a="VIRTUAL"===e.dom.tagName;s&&e.tagName===n?s.update():(s&&(a&&(r=p(),o.parentNode.insertBefore(r,o)),s.unmount(!0)),i(n)&&(e.impl=Ze[n],e.impl&&(e.tag=s=ae(e.impl,{root:e.dom,parent:t,tagName:n},e.dom.innerHTML,t),O(e.attrs,function(e){return y(s.root,e.name,e.value)}),e.tagName=n,s.mount(),a&&de(s,r||s.root),t.__.onUnmount=function(){var e=s.opts.dataIs;fe(s.parent.tags,e,s),fe(s.__.parent.tags,e,s),s.unmount()})))}function L(e){return e?(e=e.replace(Ke,""),gt[e]&&(e=gt[e]),e):null}function I(e){if(!this.root||!x(this.root,"virtualized")){var r,i,o,a=e.dom,u=L(e.attr),c=j([et,tt],u),l=e.root&&"VIRTUAL"===e.root.tagName,p=a&&(e.parent||a.parentNode),f="style"===u,h="class"===u;if(e._riot_id)e.__.wasCreated?e.update():(e.mount(),l&&de(e,e.root));else{if(e.update)return e.update();if(o=St(e.expr,c?S({},Object.create(this.parent),this):this),r=!s(o),(i=n(o))&&(i=!h&&!f,h?o=St(JSON.stringify(o),this):f&&(o=v(o))),!e.attr||e.isAttrRemoved&&r&&!1!==o||(m(a,e.attr),e.isAttrRemoved=!0),e.bool&&(o=!!o&&u),e.isRtag)return k(e,this,o);if((!e.wasParsedOnce||e.value!==o)&&(e.value=o,e.wasParsedOnce=!0,!i||c)){if(s(o)&&(o=""),!u)return o+="",void(p&&(e.parent=p,"TEXTAREA"===p.tagName?(p.value=o,vt||(a.nodeValue=o)):a.nodeValue=o));t(o)?T(u,o,a,this):c?g(a,u===tt?!o:o):(e.bool&&(a[u]=o),"value"===u&&a.value!==o&&(a.value=o),r&&!1!==o&&y(a,u,o),f&&a.hidden&&g(a,!1))}}}}function R(e){O(e,I.bind(this))}function M(e,t,n,r){var i=r?Object.create(r):{};return i[e.key]=t,e.pos&&(i[e.pos]=n),i}function $(e,t){for(var n=t.length,r=e.length;n>r;)n--,P.apply(t[n],[t,n])}function P(e,t){e.splice(t,1),this.unmount(),fe(this.parent,this,this.__.tagName,!0)}function F(e){var t=this;O(Object.keys(this.tags),function(n){oe.apply(t.tags[n],[n,e])})}function H(e,t,n){n?me.apply(this,[e,t]):b(e,this.root,t.root)}function z(e,t,n){n?ge.apply(this,[e,t]):b(e,this.root,t.root)}function U(e,t){t?ge.call(this,e):e.appendChild(this.root)}function V(e,t,n){var r,s=typeof x(e,Ye)!==rt||m(e,Ye),a=le(e),u=Ze[a],c=e.parentNode,f=p(),h=ie(e),d=x(e,Qe),g=[],v=!Ze[a],y="VIRTUAL"===e.tagName,b=[];return m(e,Xe),n=St.loopKeys(n),n.isLoop=!0,d&&m(e,Qe),c.insertBefore(f,e),c.removeChild(e),n.update=function(){n.value=St(n.val,t);var c=n.value,p=l(),m=!o(c)&&!i(c),x=f.parentNode;x&&(m?c=(r=c||!1)?Object.keys(c).map(function(e){return M(n,c[e],e)}):[]:r=!1,d&&(c=c.filter(function(e,r){return n.key&&!m?!!St(d,M(n,e,r,t)):!!St(d,S(Object.create(t),e))})),O(c,function(i,o){var l=s&&typeof i===it&&!r,f=b.indexOf(i),d=-1===f,m=!d&&l?f:o,w=g[m],_=o>=b.length,O=l&&d||!l&&!w;i=!r&&n.key?M(n,i,o):i,O?((w=new re(u,{parent:t,isLoop:!0,isAnonymous:v,tagName:a,root:e.cloneNode(v),item:i,index:o},e.innerHTML)).mount(),_?U.apply(w,[p||x,y]):z.apply(w,[x,g[o],y]),_||b.splice(o,0,i),g.splice(o,0,w),h&&pe(t.tags,a,w,!0)):m!==o&&l&&(j(c,b[m])&&(H.apply(w,[x,g[o],y]),g.splice(o,0,g.splice(m,1)[0]),b.splice(o,0,b.splice(m,1)[0])),n.pos&&(w[n.pos]=o),!h&&w.tags&&F.call(w,o)),w.__.item=i,w.__.index=o,w.__.parent=t,O||w.update(i)}),$(c,g),b=c.slice(),x.insertBefore(p,f))},n.unmount=function(){O(g,function(e){e.unmount()})},n}function B(e,t,n){var r=this;_(e,function(t,i){var s,o,a,u=t.nodeType,c=i.parent;if(!n&&t===e)return{parent:c};if(3===u&&"STYLE"!==t.parentNode.tagName&&St.hasExpr(t.nodeValue)&&c.children.push({dom:t,expr:t.nodeValue}),1!==u)return i;var l="VIRTUAL"===t.tagName;if(s=x(t,Xe))return l&&y(t,"loopVirtual",!0),c.children.push(V(t,r,s)),!1;if(s=x(t,Qe))return c.children.push(Object.create(Lt).init(t,r,s)),!1;if((o=x(t,Je))&&St.hasExpr(o))return c.children.push({isRtag:!0,expr:o,dom:t,attrs:[].slice.call(t.attributes)}),!1;if(a=ie(t),l&&(x(t,"virtualized")&&t.parentElement.removeChild(t),a||x(t,"virtualized")||x(t,"loopVirtual")||(a={tmpl:t.outerHTML})),a&&(t!==e||n)){if(!l||x(t,Je))return c.children.push(ae(a,{root:t,parent:r},t.innerHTML,r)),!1;y(t,"virtualized",!0);var p=new re({tmpl:t.outerHTML},{root:t,parent:r},t.innerHTML);c.children.push(p)}return q.apply(r,[t,t.attributes,function(e,t){t&&c.children.push(t)}]),{parent:c}},{parent:{children:t}})}function q(t,n,r){var i=this;O(n,function(n){if(!n)return!1;var s,o=n.name,a=e(o);j(We,o)?s=Object.create(It).init(t,i,o,n.value):St.hasExpr(n.value)&&(s={dom:t,expr:n.value,attr:o,bool:a}),r(n,s)})}function D(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 s=Ft[n];s&&1===i.childElementCount&&(i=c(s,i))}return i}function Z(e,t){if(!Rt.test(e))return e;var n={};return t=t&&t.replace($t,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(Pt,function(e,t,r){return n[t]||r||""}).replace(Mt,function(e,n){return t||n||""})}function G(e,t,n){var r=e&&e.match(/^\s*<([-\w]+)/),i=r&&r[1].toLowerCase(),s=h(n?Ut:zt);return e=Z(e,t),Ht.test(i)?s=D(s,e,i):d(s,e),s}function K(e,t){var n=this,r=n.name,i=n.tmpl,s=n.css,o=n.attrs,a=n.onCreate;return Ze[r]||(W(r,i,s,o,a),Ze[r].class=this.constructor),he(e,r,t,this),s&&Et.inject(),this}function W(e,n,r,i,s){return t(i)&&(s=i,/^[\w-]+\s?=/.test(r)?(i=r,r=""):i=""),r&&(t(r)?s=r:Et.add(r)),e=e.toLowerCase(),Ze[e]={name:e,tmpl:n,attrs:i,fn:s},e}function J(e,t,n,r,i){return n&&Et.add(n,e),Ze[e]={name:e,tmpl:t,attrs:r,fn:i},e}function Q(e,t,r){function s(e){if(e.tagName){var n,i=x(e,Je);t&&i!==t&&(i=t,y(e,Je,t)),(n=he(e,i||e.tagName.toLowerCase(),r))&&c.push(n)}else e.length&&O(e,s)}var o,a,c=[];if(Et.inject(),n(t)&&(r=t,t=0),o=i(e)?(e="*"===e?a=ve():e+ve(e.split(/, */)))?u(e):[]:e,"*"===t){if(t=a||ve(),o.tagName)o=u(t,o);else{var l=[];O(o,function(e){return l.push(u(t,e))}),o=l}t=0}return s(o),c}function X(e,i,s){if(n(e))X("__"+qt+++"__",e,!0);else{var o=s?Bt:Vt;if(!i){if(r(o[e]))throw new Error("Unregistered mixin: "+e);return o[e]}o[e]=t(i)?S(i.prototype,o[e]||{})&&i:S(o[e]||{},i)}}function Y(){return O(De,function(e){return e.update()})}function ee(e){Ze[e]=null}function te(e,t,n,r,i){if(!e||!n){var s=!n&&e?this:t||this;O(i,function(e){e.expr&&R.call(s,[e.expr]),r[E(e.name).replace(Ke,"")]=e.expr?e.expr.value:e.value})}}function ne(e){C(this,"isMounted",e)}function re(e,n,r){void 0===e&&(e={}),void 0===n&&(n={});var s,o=S({},n.opts),a=n.parent,u=n.isLoop,c=!!n.isAnonymous,l=kt.skipAnonymousTags&&c,p=n.item,h=n.index,g=[],v=[],x=[],b=n.root,_=n.tagName||le(b),E="virtual"===_,A=!E&&!e.tmpl,T=[];l||At(this),e.name&&b._tag&&b._tag.unmount(!0),ne.call(this,!1),C(this,"__",{isAnonymous:c,instAttrs:g,innerHTML:r,tagName:_,index:h,isLoop:u,isInline:A,listeners:[],virts:[],wasCreated:!1,tail:null,head:null,parent:null,item:null}),C(this,"_riot_id",++Zt),C(this,"root",b),S(this,{opts:o},p),C(this,"parent",a||null),C(this,"tags",{}),C(this,"refs",{}),A||u&&c?s=b:(E||(b.innerHTML=""),s=G(e.tmpl,r,f(b))),C(this,"update",function(e){var n={},r=this.isMounted&&!l;return S(this,e),te.apply(this,[u,a,c,n,g]),r&&this.isMounted&&t(this.shouldUpdate)&&!this.shouldUpdate(e,n)?this:(u&&c&&se.apply(this,[this.parent,T]),S(o,n),r&&this.trigger("update",e),R.call(this,x),r&&this.trigger("updated"),this)}.bind(this)),C(this,"mixin",function(){var e=this;return O(arguments,function(n){var r,s,o=[],a=["init","__proto__"];n=i(n)?X(n):n,r=t(n)?new n:n;var u=Object.getPrototypeOf(r);do{o=o.concat(Object.getOwnPropertyNames(s||r))}while(s=Object.getPrototypeOf(s||r));O(o,function(n){if(!j(a,n)){var i=Object.getOwnPropertyDescriptor(r,n)||Object.getOwnPropertyDescriptor(u,n),s=i&&(i.get||i.set);!e.hasOwnProperty(n)&&s?Object.defineProperty(e,n,i):e[n]=t(r[n])?r[n].bind(e):r[n]}}),r.init&&r.init.bind(e)()}),this}.bind(this)),C(this,"mount",function(){var t=this;b._tag=this,q.apply(a,[b,b.attributes,function(e,n){!c&&It.isPrototypeOf(n)&&(n.tag=t),e.expr=n,g.push(e)}]),v=[],w(e.attrs,function(e,t){v.push({name:e,value:t})}),q.apply(this,[b,v,function(e,t){t?x.push(t):y(b,e.name,e.value)}]),te.apply(this,[u,a,c,o,g]);var n=X(Ge);if(n&&!l)for(var r in n)n.hasOwnProperty(r)&&t.mixin(n[r]);if(e.fn&&e.fn.call(this,o),l||this.trigger("before-mount"),B.apply(this,[s,x,c]),this.update(p),!c&&!A)for(;s.firstChild;)b.appendChild(s.firstChild);if(C(this,"root",b),!l&&this.parent){var i=ue(this.parent);i.one(i.isMounted?"updated":"mount",function(){ne.call(t,!0),t.trigger("mount")})}else ne.call(this,!0),l||this.trigger("mount");return this.__.wasCreated=!0,this}.bind(this)),C(this,"unmount",function(t){var n,r=this,i=this.root,s=i.parentNode,o=De.indexOf(this);return l||this.trigger("before-unmount"),w(e.attrs,function(e){N(e,Ke)&&(e=e.slice(Ke.length)),m(b,e)}),this.__.listeners.forEach(function(e){Object.keys(e[nt]).forEach(function(t){e.removeEventListener(t,e[nt][t])})}),-1!==o&&De.splice(o,1),(s||E)&&(a?(n=ue(a),E?Object.keys(this.tags).forEach(function(e){fe(n.tags,e,r.tags[e])}):(fe(n.tags,_,this),a!==n&&fe(a.tags,_,this))):d(i,""),s&&!t&&s.removeChild(i)),this.__.virts&&O(this.__.virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),ce(x),O(g,function(e){return e.expr&&e.expr.unmount&&e.expr.unmount()}),this.__.onUnmount&&this.__.onUnmount(),l||(this.isMounted||this.trigger("mount"),this.trigger("unmount"),this.off("*")),C(this,"isMounted",!1),this.__.wasCreated=!1,delete this.root._tag,this}.bind(this))}function ie(e){return e.tagName&&Ze[x(e,Je)||x(e,Je)||e.tagName.toLowerCase()]}function se(e,t){var n=this;O(Object.keys(e),function(i){var s=j(t,i);(r(n[i])||s)&&(s||t.push(i),n[i]=e[i])})}function oe(e,t){var n,r=this.parent;r&&(o(n=r.tags[e])?n.splice(t,0,n.splice(n.indexOf(this),1)[0]):pe(r.tags,e,this))}function ae(e,t,n,r){var i=new re(e,t,n),s=t.tagName||le(t.root,!0),o=ue(r);return C(i,"parent",o),i.__.parent=r,pe(o.tags,s,i),o!==r&&pe(r.tags,s,i),i}function ue(e){for(var t=e;t.__.isAnonymous&&t.parent;)t=t.parent;return t}function ce(e){O(e,function(e){e instanceof re?e.unmount(!0):e.tagName?e.tag.unmount(!0):e.unmount&&e.unmount()})}function le(e,t){var n=ie(e),r=!t&&x(e,Je);return r&&!St.hasExpr(r)?r:n?n.name:e.tagName.toLowerCase()}function pe(e,t,n,i,s){var a=e[t],u=o(a),c=!r(s);if(!a||a!==n)if(!a&&i)e[t]=[n];else if(a)if(u){var l=a.indexOf(n);if(l===s)return;-1!==l&&a.splice(l,1),c?a.splice(s,0,n):a.push(n)}else e[t]=[a,n];else e[t]=n}function fe(e,t,n,r){if(o(e[t])){var i=e[t].indexOf(n);-1!==i&&e[t].splice(i,1),e[t].length?1!==e[t].length||r||(e[t]=e[t][0]):delete e[t]}else delete e[t]}function he(e,t,n,r){var i=Ze[t],s=Ze[t].class,o=r||(s?Object.create(s.prototype):{}),a=e._innerHTML=e._innerHTML||e.innerHTML,u=S({root:e,opts:n},{parent:n?n.parent:null});return i&&e&&re.apply(o,[i,u,a]),o&&o.mount&&(o.mount(!0),j(De,o)||De.push(o)),o}function de(e,t){var n=l();ge.call(e,n),t.parentNode.replaceChild(n,t)}function ge(e,t){var n,r,i=this,s=p(),o=p(),a=l();for(this.root.insertBefore(s,this.root.firstChild),this.root.appendChild(o),this.__.head=r=s,this.__.tail=o;r;)n=r.nextSibling,a.appendChild(r),i.__.virts.push(r),r=n;t?e.insertBefore(a,t.__.head):e.appendChild(a)}function me(e,t){for(var n,r=this,i=this.__.head,s=l();i;)if(n=i.nextSibling,s.appendChild(i),(i=n)===r.__.tail){s.appendChild(i),e.insertBefore(s,t.__.head);break}}function ve(e){if(!e){var t=Object.keys(Ze);return t+ve(t)}return e.filter(function(e){return!/[^-\w]/.test(e)}).reduce(function(e,t){var n=t.trim().toLowerCase();return e+",["+Je+'="'+n+'"]'},"")}function xe(e){var t=arguments,n=e.source,r=e.global?"g":"";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m");for(var i=1;i<arguments.length;i++)n=n.replace("@","\\"+t[i]);return new RegExp(n,r)}function ye(e,t,n){var r=/[`$\\]/g;for(r.lastIndex=t;r.exec(e);){var i=r.lastIndex,s=e[i-1];if("`"===s)return i;if("$"===s&&"{"===e[i])return n.push("`","}"),i+1;r.lastIndex++}throw new Error("Unclosed ES6 template")}function be(e,t){for(var n,r,i,s,o,a,u=new RegExp(cn,"g"),c=Ct.skipRegex,l=t|=0,p=[[]],f=[],h=u,d=h.lastIndex=l;a=h.exec(e);){if(s=a.index,o=h.lastIndex,r="",i=a[1]){if("{"===i)f.push("}");else if("}"===i){if(f.pop()!==i)throw new Error("Unexpected '}'");"`"===f[f.length-1]&&(i=f.pop())}else"/"===i&&(o=c(e,s))>s+1&&(r=e.slice(s,o));"`"===i&&(o=ye(e,o,f),r=e.slice(s,o),h=f.length?n||(n=new RegExp(ln,"g")):u)}else"/"===(r=a[0])[0]?(r="*"===r[1]?" ":"",e=e.slice(l,s)+r+e.slice(o),o=s+r.length,r=""):2===r.length&&(r="");r&&(p[0].push(e.slice(d,s)),p.push(r),d=o),h.lastIndex=o}return p[0].push(e.slice(d)),p}function we(e){var t,n=gn;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 _e(e,t){var n,r,i,s=[];for(dn.lastIndex=0,e=e.replace(/\s+/g," ");n=dn.exec(e);){var o=n[1].toLowerCase(),a=n[2];a?(a[0]!==Sn&&(a=Sn+(a[0]===An?a.slice(1,-1):a)+Sn),"type"===o&&wn.test(a)?r=a:(jn.test(a)&&("value"===o&&(i=1),~xn.indexOf(o)&&(o="riot-"+o)),s.push(o+"="+a))):s.push(o)}return r&&(i&&(r=Sn+t._bp[0]+An+r.slice(1,-1)+An+t._bp[1]+Sn),s.push("type="+r)),s.join(" ")}function Oe(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var i,s=t.expr&&(t.parser||t.type)?Ce:0,o=Ct.split(e,0,r),a=1;a<o.length;a+=2)"^"===(i=o[a])[0]?i=i.slice(1):s&&";"===(i=s(i,t).trim()).slice(-1)&&(i=i.slice(0,-1)),o[a]=Nn+(n.push(i)-1)+r[1];e=o.join("")}return e}function je(e,t){return t.length&&(e=e.replace(En,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,Cn)})),e}function Ee(e,t,n){if(!/\S/.test(e))return"";if(e=Oe(e,t,n).replace(mn,function(e,t,r,i){return t=t.toLowerCase(),i=i&&!yn.test(t)?"></"+t:"",r&&(t+=" "+_e(r,n)),"<"+t+i+">"}),!t.whitespace){var r=[];/<pre[\s>]/.test(e)&&(e=e.replace(bn,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(vn,"><$1")),je(e,n).replace(On,"")}function Ne(e){var t,n,r,i,s,o,a=[],u=RegExp,c=be(e);for(e=c.shift().join("<%>");t=e.match(Tn);)a.push(u.leftContext),r=function(e){for(var t=/[{}]/g,n=1;n&&t.exec(e);)"{"===e[t.lastIndex-1]?++n:--n;return n?e.length:t.lastIndex}(e=u.rightContext),i=t[1],s=t[2]||"",o=t[3],o=(n=!/^(?:if|while|for|switch|catch|function)$/.test(o))?t[0].replace(i,"this."+o+" ="+s+" function"):t[0],a.push(o,e.slice(0,r)),e=e.slice(r),n&&!/^\s*.\s*bind\b/.test(e)&&a.push(".bind(this)");return a.length&&(e=a.join("")+e),c.length&&(e=e.replace(/<%>/g,function(){return c.shift()})),e}function Ce(e,t,n,r,i){return/\S/.test(e)?(n||(n=t.type),(t.parser||n&&an._req("js."+n,!0)||Ne)(e,r,i).replace(/\r\n?/g,"\n").replace(On,"")):""}function Se(e,t){return t.replace(kn,function(t,n,r){return r?(r=r.replace(/[^,]+/g,function(t){var n=t.trim();return 0===n.indexOf(e)?t:n&&"from"!==n&&"to"!==n&&"%"!==n.slice(-1)?n=n.indexOf(":scope")<0?e+" "+n+',[data-is="'+e+'"] '+n:n.replace(":scope",e)+","+n.replace(":scope",'[data-is="'+e+'"]'):t}),n?n+" "+r:r):t})}function Ae(e,t,n,r){return r=r||{},n&&"css"!==n&&(e=an._req("css."+n,!0)(t,e,r.parserOpts||{},r.url)),e=e.replace(Ct.R_MLCOMMS,"").replace(/\s+/g," ").trim(),t&&(e=Se(t,e)),e}function Te(e,t){return e?(e=An+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+An,t&&~e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function ke(e,t,n,r,i,s,o){var a=o.debug?",\n ":", ",u="});";return i&&"\n"!==i.slice(-1)&&(u="\n"+u),s+"riot.tag2('"+e+An+a+Te(t,1)+a+Te(n)+a+Te(r)+", function(opts) {\n"+i+u}function Le(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;~n;){if(t=e.slice(n,r).match(Rn))return n+=t.index+t[0].length,"<-/>\n"===(t=e.slice(0,n)).slice(-5)&&(t=t.slice(0,-5)),[t,e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}function Ie(e){if(e){var t=e.match(Ln);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function Re(e,t){if(e){var n=e.match(RegExp("\\s"+t+In,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function Me(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}function $e(e){var t=Me(Re(e,"options"));return t?JSON.parse(t):null}function Pe(e,t,n,r){var i=Ie(n),s=Re(n,"src"),o=pn({},t.parserOptions.js);return!s&&Ce(e,t,i,pn(o,$e(n)),r)}function Fe(e,t,n,r,i){var s=pn({},t.parserOptions.style),o={parserOpts:pn(s,$e(n)),url:r};return Ae(e,i,Ie(n)||t.style,o)}function He(e,t,n,r){return an._req("html."+n,!0)(e,r,t)}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 Ue(e,t){if(typeof e===rt){var n=h("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function Ve(e,t){function n(){Ot.trigger("ready"),jt=!0,e&&e()}function r(e,t,r){Ue(Fn.compile(e,t,r),r),--s||n()}var i=u('script[type="riot/tag"]'),s=i.length;if(s)for(var o=0;o<i.length;++o){var a=i[o],c=S({template:x(a,"template")},t),l=x(a,"src")||x(a,"data-src");l?ze(l,r,c):r(a.innerHTML,c)}else n()}var Be,qe,De=[],Ze={},Ge="__global_mixin",Ke="riot-",We=["ref","data-ref"],Je="data-is",Qe="if",Xe="each",Ye="no-reorder",et="show",tt="hide",nt="__riot-events__",rt="string",it="object",st="undefined",ot="function",at="http://www.w3.org/1999/xlink",ut="http://www.w3.org/2000/svg",ct=/^xlink:(\w+)/,lt=typeof window===st?void 0:window,pt=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/,ft=/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,ht=/^on/,dt=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,gt={viewbox:"viewBox"},mt=/^(?: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)$/,vt=0|(lt&&lt.document||{}).documentMode,xt=Object.freeze({isBoolAttr:e,isFunction:t,isObject:n,isUndefined:r,isString:i,isBlank:s,isArray:o,isWritable:a}),yt=Object.freeze({$$:u,$:c,createFrag:l,createDOMPlaceholder:p,isSvg:f,mkEl:h,setInnerHTML:d,toggleVisibility:g,remAttr:m,styleObjectToString:v,getAttr:x,setAttr:y,safeInsert:b,walkAttrs:w,walkNodes:_}),bt={},wt=[],_t=!1;lt&&(Be=function(){var e=h("style");y(e,"type","text/css");var t=c("style[type=riot]");return t?(t.id&&(e.id=t.id),t.parentNode.replaceChild(e,t)):document.getElementsByTagName("head")[0].appendChild(e),e}(),qe=Be.styleSheet);var Ot,jt,Et={styleNode:Be,add:function(e,t){t?bt[t]=e:wt.push(e),_t=!0},inject:function(){if(lt&&_t){_t=!1;var e=Object.keys(bt).map(function(e){return bt[e]}).concat(wt).join("\n");qe?qe.cssText=e:Be.innerHTML=e}}},Nt=function(){function e(e,t){for(;--t>=0&&/\s/.test(e[t]););return t}var t="[{(,;:?=|&!^~>%*/",n=["case","default","do","else","in","instanceof","prefix","return","typeof","void","yield"],r=n.reduce(function(e,t){return e+t.slice(-1)},""),i=/^\/(?=[^*>/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,s=/[$\w]/;return function(o,a){var u=/.*/g,c=u.lastIndex=a++,l=u.exec(o)[0].match(i);if(l){var p=c+l[0].length,f=o[c=e(o,c)];if(c<0||~t.indexOf(f))return p;if("."===f)"."===o[c-1]&&(a=p);else if("+"===f||"-"===f)(o[--c]!==f||(c=e(o,c))<0||!s.test(o[c]))&&(a=p);else if(~r.indexOf(f)){for(var h=c+1;--c>=0&&s.test(o[c]););~n.indexOf(o.slice(c+1,h))&&(a=p)}}return a}}(),Ct=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?u:"")}function r(e){if(e===m)return v;var t=e.split(" ");if(2!==t.length||f.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(h,"\\").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]+")|"+d,u),t[8]=e,t}function i(e){return e instanceof RegExp?o(e):y[e]}function s(e){(e||(e=m))!==y[8]&&(y=r(e),o=e===m?t:n,y[9]=o(v[9])),x=e}var o,a,u="g",c=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,l=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,p=l.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?([^<]\/)[gim]*/.source,f=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),h=/(?=[[\]()*+?.^$|])/g,d=l.source+"|"+/(\/)(?![*\/])/.source,g={"(":RegExp("([()])|"+d,u),"[":RegExp("([[\\]])|"+d,u),"{":RegExp("([{}])|"+d,u)},m="{ }",v=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+d,u),m,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],x=void 0,y=[];return i.split=function(e,t,n){function r(e){d&&(e=d+e,d=""),t||o?p.push(e&&e.replace(n[5],"$1")):p.push(e)}function i(n,r,i){return i&&(r=Nt(e,n)),t&&r>n+2&&(c="⁗"+h.length+"~",h.push(e.slice(n,r)),d+=e.slice(a,n)+c,a=r),r}n||(n=y);var s,o,a,u,c,l,p=[],f=n[6],h=[],d="";for(o=a=f.lastIndex=0;s=f.exec(e);){if(l=f.lastIndex,u=s.index,o){if(s[2]){var m=s[2],v=g[m],x=1;for(v.lastIndex=l;s=v.exec(e);)if(s[1]){if(s[1]===m)++x;else if(!--x)break}else v.lastIndex=i(s.index,v.lastIndex,s[2]);f.lastIndex=x?e.length:v.lastIndex;continue}if(!s[3]){f.lastIndex=i(u,l,s[4]);continue}}s[1]||(r(e.slice(a,u)),a=f.lastIndex,(f=n[6+(o^=1)]).lastIndex=a)}return e&&a<e.length&&r(e.slice(a)),p.qblocks=h,p},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:function(e){var t;t=(e=e||{}).brackets,Object.defineProperty(e,"brackets",{set:s,get:function(){return x},enumerable:!0}),a=e,s(t)},get:function(){return a}}),i.settings="undefined"!=typeof riot&&riot.settings||{},i.set=s,i.skipRegex=Nt,i.R_STRINGS=l,i.R_MLCOMMS=c,i.S_QBLOCKS=p,i.S_QBLOCK2=d,i}(),St=function(){function e(e,r){return e?(o[e]||(o[e]=n(e))).call(r,t.bind({data:r,tmpl:e})):e}function t(t,n){t.riotData={tagName:n&&n.__&&n.__.tagName,_riot_id:n&&n._riot_id},e.errorHandler?e.errorHandler(t):"undefined"!=typeof console&&"function"==typeof console.error&&(console.error(t.message),console.log("<%s> %s",t.riotData.tagName||"Unknown tag",this.tmpl),console.log(this.data))}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=Ct.split(e.replace(a,'"'),1),r=n.qblocks;if(n.length>2||n[0]){var s,o,c=[];for(s=o=0;s<n.length;++s)(t=n[s])&&(t=1&s?i(t,1,r):'"'+t.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(c[o++]=t);t=o<2?c[0]:"["+c.join(",")+'].join("")'}else t=i(n[1],0,r);return r.length&&(t=t.replace(u,function(e,t){return r[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")})),t}function i(e,t,n){if(e=e.replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var r,i=[],o=0;e&&(r=e.match(c))&&!r.index;){var a,u,p=/,|([[{(])|$/g;for(e=RegExp.rightContext,a=r[2]?n[r[2]].slice(1,-1).trim().replace(/\s+/g," "):r[1];u=(r=p.exec(e))[1];)!function(t,n){var r,i=1,s=l[t];for(s.lastIndex=n.lastIndex;r=s.exec(e);)if(r[0]===t)++i;else if(!--i)break;n.lastIndex=i?e.length:s.lastIndex}(u,p);u=e.slice(0,r.index),e=RegExp.rightContext,i[o++]=s(u,1,a)}e=o?o>1?"["+i.join(",")+'].join(" ").trim()':i[0]:s(e,t)}return e}function s(e,t,n){var r;return e=e.replace(f,function(e,t,n,i,s){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+p+n,i&&(r="."===(s=s[i])||"("===s||"["===s)):i&&(r=!h.test(s.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.hasExpr=Ct.hasExpr,e.loopKeys=Ct.loopKeys,e.clearCache=function(){o={}},e.errorHandler=null;var a=/\u2057/g,u=/\u2057(\d+)~/g,c=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,l={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},p='"in this?this:'+("object"!=typeof window?"global":"window")+").",f=/[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,h=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=Ct.version="v3.0.8",e}(),At=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,s=t[n],o=0;i=s&&s[o];++o)i==r&&s.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,s,o,a=arguments,u=arguments.length-1,c=new Array(u);for(o=0;o<u;o++)c[o]=a[o+1];for(i=n.call(t[r]||[],0),o=0;s=i[o];++o)s.apply(e,c);return t["*"]&&"*"!=r&&e.trigger.apply(e,["*",r].concat(c)),e},enumerable:!1,writable:!1,configurable:!1}}),e},Tt=Object.freeze({each:O,contains:j,toCamel:E,startsWith:N,defineProperty:C,extend:S}),kt=S(Object.create(Ct.settings),{skipAnonymousTags:!0,autoUpdate:!0}),Lt={init:function(e,t,n){m(e,Qe),this.tag=t,this.expr=n,this.stub=p(),this.pristine=e;var r=e.parentNode;return r.insertBefore(this.stub,e),r.removeChild(e),this},update:function(){this.value=St(this.expr,this.tag),this.value&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=[],B.apply(this.tag,[this.current,this.expressions,!0])):!this.value&&this.current&&(ce(this.expressions),this.current._tag?this.current._tag.unmount():this.current.parentNode&&this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),this.value&&R.call(this.tag,this.expressions)},unmount:function(){ce(this.expressions||[])}},It={init:function(e,t,n,r){return this.dom=e,this.attr=n,this.rawValue=r,this.parent=t,this.hasExp=St.hasExpr(r),this},update:function(){var e=this.value,t=this.parent&&ue(this.parent),n=this.dom.__ref||this.tag||this.dom;this.value=this.hasExp?St(this.rawValue,this.parent):this.rawValue,!s(e)&&t&&fe(t.refs,e,n),!s(this.value)&&i(this.value)?(t&&pe(t.refs,this.value,n,null,this.parent.__.index),this.value!==e&&y(this.dom,this.attr,this.value)):m(this.dom,this.attr),this.dom.__ref||(this.dom.__ref=n)},unmount:function(){var e=this.tag||this.dom,t=this.parent&&ue(this.parent);!s(this.value)&&t&&fe(t.refs,this.value,e)}},Rt=/<yield\b/i,Mt=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,$t=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,Pt=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,Ft={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},Ht=vt&&vt<10?pt:ft,zt="div",Ut="svg",Vt={},Bt=Vt[Ge]={},qt=0,Dt=Object.freeze({Tag:K,tag:W,tag2:J,mount:Q,mixin:X,update:Y,unregister:ee,version:"v3.6.3"}),Zt=0,Gt=Object.freeze({getTag:ie,inheritFrom:se,moveChildTag:oe,initChildTag:ae,getImmediateCustomParentTag:ue,unmountAll:ce,getTagName:le,arrayishAdd:pe,arrayishRemove:fe,mountTo:he,makeReplaceVirtual:de,makeVirtual:ge,moveVirtual:me,selectTags:ve}),Kt=kt,Wt={tmpl:St,brackets:Ct,styleManager:Et,vdom:De,styleNode:Et.styleNode,dom:yt,check:xt,misc:Tt,tags:Gt},Jt=K,Qt=W,Xt=J,Yt=Q,en=X,tn=Y,nn=ee,rn=At,sn=S({},Dt,{observable:At,settings:Kt,util:Wt}),on=Object.freeze({settings:Kt,util:Wt,Tag:Jt,tag:Qt,tag2:Xt,mount:Yt,mixin:en,update:tn,unregister:nn,version:"v3.6.3",observable:rn,default:sn}),an=function(e){function t(t){var n=e[t];if(n)return n;throw new Error('Parser "'+t+'" not loaded.')}function n(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function r(e,r,i,s){return i=n({pretty:!0,filename:s,doctype:"html"},i),t(e).render(r,i)}var i={};return i.html={jade:function(e,t,n){return console.log('DEPRECATION WARNING: jade was renamed "pug" - The jade parser will be removed in riot@3.0.0!'),r("jade",e,t,n)},pug:function(e,t,n){return r("pug",e,t,n)}},i.css={less:function(e,r,i,s){var o;return i=n({sync:!0,syncImport:!0,filename:s},i),t("less").render(r,i,function(e,t){if(e)throw e;o=t.css}),o}},i.js={es6:function(e,r,i){return t("Babel").transform(e,n({plugins:[["transform-es2015-template-literals",{loose:!0}],"transform-es2015-literals","transform-es2015-function-name","transform-es2015-arrow-functions","transform-es2015-block-scoped-functions",["transform-es2015-classes",{loose:!0}],"transform-es2015-object-super","transform-es2015-shorthand-properties","transform-es2015-duplicate-keys",["transform-es2015-computed-properties",{loose:!0}],["transform-es2015-for-of",{loose:!0}],"transform-es2015-sticky-regex","transform-es2015-unicode-regex","check-es2015-constants",["transform-es2015-spread",{loose:!0}],"transform-es2015-parameters",["transform-es2015-destructuring",{loose:!0}],"transform-es2015-block-scoping","transform-es2015-typeof-symbol",["transform-es2015-modules-commonjs",{allowTopLevelThis:!0}],["transform-regenerator",{async:!1,asyncGenerators:!1}]]},r)).code},buble:function(e,r,i){return r=n({source:i,modules:!1},r),t("buble").transform(e,r).code},coffee:function(e,r){return t("CoffeeScript").compile(e,n({bare:!0},r))},livescript:function(e,r){return t("livescript").compile(e,n({bare:!0,header:!1},r))},typescript:function(e,n){return t("typescript")(e,n)},none:function(e){return e}},i.js.javascript=i.js.none,i.js.coffeescript=i.js.coffee,i._req=function(e){var t=e.split(".");if(2!==t.length)throw new Error("Bad format for parsers._req");var n=i[t[0]][t[1]];if(n)return n;throw new Error('Parser "'+e+'" not found.')},i.utils={extend:n},i}(window||global),un=/'[^'\n\r\\]*(?:\\(?:\r\n?|[\S\s])[^'\n\r\\]*)*'/.source,cn=[/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//.source,"//.*",un,un.replace(/'/g,'"'),"([/`])"].join("|"),ln=cn.slice(0,-2)+"{}])",pn=an.utils.extend,fn=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,hn=Ct.R_STRINGS.source,dn=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,gn=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+fn,"g"),mn=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'\/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"\/>]*)*)|\s*)(\/?)>/g,vn=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,xn=["style","src","d","value"],yn=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,bn=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,wn=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,_n=/^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm,On=/[ \t]+$/gm,jn=xe(/@#\d/,"x01"),En=xe(/@#(\d+)/g,"x01"),Nn="#",Cn="⁗",Sn='"',An="'",Tn=/^[ \t]*(((?:async|\*)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m,kn=RegExp("([{}]|^)[; ]*((?:[^@ ;{}][^{}]*)?[^@ ;{}:] ?)(?={)|"+fn,"g"),Ln=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,In="\\s*=\\s*("+hn+"|{[^}]+}|\\S+)",Rn=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,Mn=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"\/>]+(?:(?:@|\/[^>])[^'"\/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",hn),"gim"),$n=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,Pn=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi,Fn={compile:function(e,t,n){var r,i=[],s={template:{},js:{},style:{}};t||(t={}),t.parserOptions=pn(s,t.parserOptions||{}),r=t.exclude?function(e){return t.exclude.indexOf(e)<0}:function(){return 1},n||(n="");var o=Ct.array(t.brackets);return t.template&&(e=He(e,n,t.template,t.parserOptions.template)),e=we(e).replace(Mn,function(e,s,a,u,c,l){var p="",f="",h="",d="",g=[];if(g._bp=o,a=a.toLowerCase(),u=u&&r("attribs")?je(_e(Oe(u,t,g),g),g):"",(c||(c=l))&&/\S/.test(c))if(l)r("html")&&(h=Ee(l,t,g));else{var m=Le((c=(c=(c=c.replace(RegExp("^"+s,"gm"),"")).replace($n,function(e,i,s){if(r("js")){var o=Pe(s,t,i,n);o&&(p+=(p?"\n":"")+o)}return""})).replace(Pn,function(e,i,s){return r("css")&&(f+=(f?" ":"")+Fe(s,t,i,n,a)),""})).replace(On,""));r("html")&&(h=Ee(m[0],t,g)),r("js")&&((c=Ce(m[1],t,null,null,n))&&(p+=(p?"\n":"")+c),p=p.replace(_n,function(e){return d+=e.trim()+"\n",""}))}return p=/\S/.test(p)?p.replace(/\n{3,}/g,"\n\n"):"",t.entities?(i.push({tagName:a,html:h,css:f,attribs:u,js:p,imports:d}),""):ke(a,h,f,u,p,d,t)}),t.entities?i:e},compileHTML:function(e,t,n){return Array.isArray(t)?(n=t,t={}):(n||(n=[]),t||(t={})),n._bp=Ct.array(t.brackets),Ee(we(e),t,n)},compileCSS:function(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),Ae(e,n.tagName,t,n)},compileJS:function(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),Ce(e,t||{},n,r.parserOptions,r.url)},parsers:an,version:"v3.2.4"},Hn=Fn.parsers,zn=function(e,r,i){if(typeof e===rt){if(n(r)&&(i=r,r=!1),/^\s*</m.test(e)){var s=Fn.compile(e,i);return!0!==r&&Ue(s),t(r)&&r(s,e,i),s}ze(e,function(e,t,n){var i=Fn.compile(e,t,n);Ue(i,n),r&&r(i,e,t)},i)}else if(o(e)){var a=e.length;e.forEach(function(e){ze(e,function(e,t,n){var i=Fn.compile(e,t,n);Ue(i,n),!--a&&r&&r(i,e,t)},i)})}else{if(t(e)?(i=r,r=e):(i=e,r=void 0),jt)return r&&r();Ot?r&&Ot.on("ready",r):(Ot=At(),Ve(r,i))}};return S({},on,{mount:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n;return zn(function(){n=Yt.apply(on,e)}),n},compile:zn,parsers:Hn})});