You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
17 KiB

/*! For license information please see critical.js.LICENSE.txt */
(()=>{var t,e={846:(t,e,n)=>{window.riot=n(137)},323:()=>{},137:(t,e,n)=>{"use strict";n.r(e),n.d(e,{__:()=>te,component:()=>Xt,install:()=>Gt,mount:()=>Vt,pure:()=>Zt,register:()=>Yt,uninstall:()=>Wt,unmount:()=>qt,unregister:()=>Ft,version:()=>Qt,withTypes:()=>Jt});const r=new Map,o=Symbol("riot-component"),s=new Set,i="mount",u="update",a="unmount",c="shouldUpdate",l="onBeforeMount",h="onMounted",d="onBeforeUpdate",p="onUpdated",m="onBeforeUnmount",f="onUnmounted",b="props",g="state",v="slots",y="root",O=Symbol("pure"),j=Symbol("is_updating"),N=Symbol("parent"),w=Symbol("attributes"),x=Symbol("template"),M={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};function E(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function T(t,e){throw new Error(t,{cause:e})}function A(t){const e=new Map,n=n=>(e.has(n)||e.set(n,t.call(this,n)))&&e.get(n);return n.cache=e,n}function S(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&0===r:return Object.assign({},t,n);case 3===r:t.value=e.value;break;default:t[E(e.name)]=e.value}return t}),{})}function C(t,e){return typeof t===e}function k(t){const e=t.ownerSVGElement;return!!e||null===e}function D(t){return"template"===t.tagName.toLowerCase()}function P(t){return C(t,"function")}function L(t){return!_(t)&&t.constructor===Object}function _(t){return null==t}function I(){return this}function $(t){return P(t)?t.prototype&&t.prototype.constructor?new t:t():t}const B=Object.freeze({[i]:I,[u]:I,[a]:I}),U=Object.assign({},B,{clone:I,createDOM:I});function z(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const H=t=>t.remove(),K=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),R={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function Y(t,e,n,r){return void 0===r&&(r={}),Object.defineProperty(t,e,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),t}function F(t,e,n){return Object.entries(e).forEach((e=>{let[r,o]=e;Y(t,r,o,n)})),t}function V(t,e){return Object.entries(e).forEach((e=>{let[n,r]=e;t[n]||(t[n]=r)})),t}const q=Symbol(),G=Symbol();function W(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[q]=!0,e[G]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}const X=Symbol("unmount"),Z={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===X?null:this.evaluate(t),i=s?Array.from(s):[],{newChildrenMap:u,batches:a,futureNodes:c}=function(t,e,n,r){const{condition:o,template:s,childrenMap:i,itemName:u,getKey:a,indexName:c,root:l,isTemplateTag:h}=r,d=new Map,p=[],m=[];return t.forEach(((t,r)=>{const f=function(t,e){let{itemName:n,indexName:r,index:o,item:s}=e;Y(t,n,s),r&&Y(t,r,o);return t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),v=[];if(function(t,e){return!!t&&!t(e)}(o,f))return;const y=!g,O=g?g.template:s.clone(),j=O.el||l.cloneNode(),N=h&&y?W(O):O.meta;y?p.push((()=>O.mount(j,f,n,N))):p.push((()=>O.update(f,n))),h?v.push(...N.children):v.push(j),i.delete(b),m.push(...v),d.set(b,{nodes:v,template:O,context:f,index:r})})),{newChildrenMap:d,batches:p,futureNodes:m}}(i,t,e,this);return((t,e,n,r)=>{const o=e.length;let s=t.length,i=o,u=0,a=0,c=null;for(;u<s||a<i;)if(s===u){const t=i<o?a?n(e[a-1],-0).nextSibling:n(e[i-a],0):r;for(;a<i;)K(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||H(n(t[u],-1)),u++;else if(t[u]===e[a])u++,a++;else if(t[s-1]===e[i-1])s--,i--;else if(t[u]===e[i-1]&&e[a]===t[s-1]){const r=n(t[--s],-1).nextSibling;K(n(e[a++],1),n(t[u++],-1).nextSibling),K(n(e[--i],1),r),t[s]=e[i]}else{if(!c){c=new Map;let t=a;for(;t<i;)c.set(e[t],t++)}if(c.has(t[u])){const r=c.get(t[u]);if(a<r&&r<i){let o=u,d=1;for(;++o<s&&o<i&&c.get(t[o])===r+d;)d++;if(d>r-a){const o=n(t[u],0);for(;a<r;)K(n(e[a++],1),o)}else l=n(e[a++],1),(h=n(t[u++],-1))&&h.parentNode&&h.parentNode.replaceChild(l,h)}else u++}else H(n(t[u++],-1))}var l,h})(r,c,function(t,e){return(n,r)=>{if(r<0){const n=t[t.length-1];if(n){const{template:r,nodes:o,context:s}=n;o.pop(),o.length||(t.pop(),r.unmount(s,e,null))}}return n}}(Array.from(o.values()),e),n),a.forEach((t=>t())),this.childrenMap=u,this.nodes=c,this},unmount(t,e){return this.update(X,e),this}};const J={mount(t,e){return this.update(t,e)},update(t,e){const n=!!this.evaluate(t),r=!this.value&&n,o=this.value&&!n,s=()=>{const n=this.node.cloneNode();K(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,t,e)};switch(!0){case r:s();break;case o:this.unmount(t);break;default:n&&this.template.update(t,e)}return this.value=n,this},unmount(t,e){return this.template.unmount(t,e,!0),this}};const Q="undefined"==typeof Element?{}:Element.prototype,tt=A((t=>Q.hasOwnProperty(t)));function et(t,e,n,r){let{name:o}=e;if(!o)return r&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(t,n,r),void(n&&function(t,e){Object.entries(e).forEach((e=>{let[n,r]=e;return et(t,{name:n},r)}))}(t,n));!tt(o)&&(function(t){return C(t,"boolean")}(n)||L(n)||P(n))&&(t[o]=n),!function(t){return!t&&0!==t}(n)?function(t){return!0===t||["string","number"].includes(typeof t)}(n)&&t.setAttribute(o,function(t,e){return!0===e?t:e}(o,n)):t.removeAttribute(o)}const nt=/^on/,rt={handleEvent(t){this[t.type](t)}},ot=new WeakMap;function st(t){return _(t)?"":t}const it=(t,e)=>{const n=t.childNodes[e];if(n.nodeType===Node.COMMENT_NODE){const e=document.createTextNode("");return t.replaceChild(e,n),e}return n};const ut={0:et,1:function(t,e,n){let{name:r}=e;const o=r.replace(nt,""),s=ot.get(t)||(t=>{const e=Object.create(rt);return ot.set(t,e),e})(t),[i,u]=(t=>Array.isArray(t)?t:[t,!1])(n),a=s[o],c=i&&!a;a&&!i&&t.removeEventListener(o,s),c&&t.addEventListener(o,s,u),s[o]=i},2:function(t,e,n){t.data=st(n)},3:function(t,e,n){t.value=st(n)}},at={mount(t){return this.value=this.evaluate(t),ct(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(ct(this,e),this.value=e),this},unmount(){return 1===this.type&&ct(this,null),this}};function ct(t,e){return ut[t.type](t.node,t,e,t.value)}function lt(t,e){return Object.assign({},at,e,{node:2===e.type?it(t,e.childNodeIndex):t})}const ht=(t,e)=>t[N]||e,dt={attributes:[],getTemplateScope(t,e){return function(t,e,n){if(!t||!t.length)return n;const r=t.map((t=>Object.assign({},t,{value:t.evaluate(e)})));return Object.assign(Object.create(n||null),S(r))}(this.attributes,t,e)},mount(t,e){const n=!!t.slots&&t.slots.find((t=>{let{id:e}=t;return e===this.name})),{parentNode:r}=this.node,o=ht(t,e);return this.template=n&&jt(n.html,n.bindings).createDOM(r),this.template&&(z(this.node),this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes)),pt(this.node),H(this.node),this},update(t,e){if(this.template){const n=ht(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function pt(t){const e=t&&t.firstChild;e&&(K(e,t),pt(t))}function mt(t){return t.reduce(((t,e)=>{let{bindings:n}=e;return t.concat(n)}),[])}const ft={mount(t){return this.update(t)},update(t,e){const n=this.evaluate(t);return n&&n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=function(t,e,n){return void 0===e&&(e=[]),void 0===n&&(n=[]),t?t({slots:e,attributes:n}):jt(function(t){return t.reduce(((t,e)=>t+e.html),"")}(e),[...mt(e),{expressions:n.map((t=>Object.assign({type:0},t)))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,t)),this},unmount(t,e,n){return this.tag&&this.tag.unmount(n),this}};const bt={1:function(t,e){let{evaluate:n,template:r}=e;const o=document.createTextNode("");return K(o,t),H(t),Object.assign({},J,{node:t,evaluate:n,placeholder:o,template:r.createDOM(t)})},2:function(t,e){let{expressions:n}=e;return Object.assign({},(r=n.map((e=>lt(t,e))),["mount","update","unmount"].reduce(((t,e)=>Object.assign({},t,{[e]:t=>r.map((n=>n[e](t)))&&o})),{})));var r,o},0:function(t,e){let{evaluate:n,condition:r,itemName:o,indexName:s,getKey:i,template:u}=e;const a=document.createTextNode(""),c=t.cloneNode();return K(a,t),H(t),Object.assign({},Z,{childrenMap:new Map,node:t,root:c,condition:r,evaluate:n,isTemplateTag:D(c),template:u.createDOM(t),getKey:i,indexName:s,itemName:o,placeholder:a})},3:function(t,e){let{evaluate:n,getComponent:r,slots:o,attributes:s}=e;return Object.assign({},ft,{node:t,evaluate:n,slots:o,attributes:s,getComponent:r})},4:function(t,e){let{name:n,attributes:r}=e;return Object.assign({},dt,{attributes:r,node:t,name:n})}};function gt(t,e){return t.map((t=>2===t.type?Object.assign({},t,{childNodeIndex:t.childNodeIndex+e}):t))}function vt(t,e,n){const{selector:r,type:o,redundantAttribute:s,expressions:i}=e,u=r?t.querySelector(r):t;s&&u.removeAttribute(s);const a=i||[];return(bt[o]||bt[2])(u,Object.assign({},e,{expressions:n&&!r?gt(a,n):a}))}function yt(t,e){return k(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"application/xml").documentElement,!0)}(e,t):function(t,e){const n=D(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}const Ot={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?yt(t,e):e)}(t,this.html)||document.createDocumentFragment(),this},mount(t,e,n,r){void 0===r&&(r={}),t||T("Please provide DOM node to mount properly your template"),this.el&&this.unmount(e);const{fragment:o,children:s,avoidDOMInjection:i}=r,{parentNode:u}=s?s[0]:t,a=D(t),c=a?function(t,e,n){const r=Array.from(t.childNodes);return Math.max(r.indexOf(e),r.indexOf(n.head)+1,0)}(u,t,r):null;this.createDOM(t);const l=o||this.dom.cloneNode(!0);return this.el=a?u:t,this.children=a?s||Array.from(l.childNodes):null,!i&&l&&function(t,e){switch(!0){case k(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case D(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,l),this.bindings=this.bindingsData.map((t=>vt(this.el,t,c))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=r,this},update(t,e){return this.bindings.forEach((n=>n.update(t,e))),this},unmount(t,e,n){void 0===n&&(n=!1);const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(t,e,n))),!0){case r[O]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)H(t[e])}(this.children);break;case!n:z(r);break;case!!n:H(r)}return this.el=null,this},clone(){return Object.assign({},this,{meta:{},el:null})}};function jt(t,e){return void 0===e&&(e=[]),Object.assign({},Ot,{html:t,bindingsData:e})}const Nt=(t,e)=>t[o]=e;function wt(t){return[i,u,a].reduce(((e,n)=>(e[n]=t(n),e)),{})}function xt(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function Mt(t,e){return xt("string"==typeof t?(e||document).querySelectorAll(t):t)}const Et=Object.freeze({$(t){return Mt(t,this.root)[0]},$$(t){return Mt(t,this.root)}}),Tt=Object.freeze({[c]:I,[l]:I,[h]:I,[d]:I,[p]:I,[m]:I,[f]:I}),At=t=>1===t.length?t[0]:t;function St(t,e,n){const r="object"==typeof e?e:{[e]:n},o=Object.keys(r);return xt(t).forEach((t=>{o.forEach((e=>t.setAttribute(e,r[e])))})),t}function Ct(t,e){return function(t,e,n){const r="string"==typeof e?[e]:e;return At(xt(t).map((t=>At(r.map((e=>t[n](e)))))))}(t,e,"getAttribute")}const kt=new Map,Dt=()=>Pt||(St(Pt=Mt("style[riot]")[0]||document.createElement("style"),"type","text/css"),Pt.parentNode||document.head.appendChild(Pt),Pt);var Pt;const Lt={CSS_BY_NAME:kt,add(t,e){return kt.has(t)||(kt.set(t,e),this.inject()),this},inject(){return Dt().innerHTML=[...kt.values()].join("\n"),this},remove(t){return kt.has(t)&&(kt.delete(t),this.inject()),this}};function _t(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(r=[...n,...r]).length<t.length?_t(t,...r):t(...r)}}function It(t){return Ct(t,"is")||t.tagName.toLowerCase()}function $t(t,e){return Object.assign({},t,$(e))}function Bt(t,e){return void 0===e&&(e={}),Object.assign({},function(t){return Array.from(t.attributes).reduce(((t,e)=>(t[E(e.name)]=e.value,t)),{})}(t),$(e))}function Ut(t,e){let{slots:n,attributes:r,props:o}=e;return i=function(t){return[...s].reduce(((t,e)=>e(t)||t),t)}(F(L(t)?Object.create(t):t,{mount(e,s,i){return void 0===s&&(s={}),Y(e,O,!1),this[N]=i,this[w]=function(t,e){void 0===e&&(e=[]);const n=e.map((e=>lt(t,e))),r={};return Object.assign(r,Object.assign({expressions:n},wt((t=>e=>(n.forEach((n=>n[t](e))),r)))))}(e,r).mount(i),Y(this,b,Object.freeze(Object.assign({},Bt(e,o),S(this[w].expressions)))),this[g]=$t(this[g],s),this[x]=this.template.createDOM(e).clone(),Nt(e,this),t.name&&function(t,e){It(t)!==e&&St(t,"is",e)}(e,t.name),Y(this,y,e),Y(this,v,n),this[l](this[b],this[g]),this[x].mount(e,this,i),this[h](this[b],this[g]),this},update(t,e){void 0===t&&(t={}),e&&(this[N]=e,this[w].update(e));const n=S(this[w].expressions);if(!1!==this[c](n,this[b]))return Y(this,b,Object.freeze(Object.assign({},this[b],n))),this[g]=$t(this[g],t),this[d](this[b],this[g]),this[j]||(this[j]=!0,this[x].update(this,this[N])),this[p](this[b],this[g]),this[j]=!1,this},unmount(t){return this[m](this[b],this[g]),this[w].unmount(),this[x].unmount(this,this[N],null===t?null:!t),this[f](this[b],this[g]),this}})),Object.keys(t).filter((e=>P(t[e]))).forEach((t=>{i[t]=i[t].bind(i)})),i;var i}function zt(t){let{css:e,template:n,componentAPI:r,name:o}=t;return e&&o&&Lt.add(o,e),_t(Ut)(F(V(r,Object.assign({},Tt,{[b]:{},[g]:{}})),Object.assign({[v]:null,[y]:null},Et,{name:o,css:e,template:n})))}const Ht=t=>{const e=(void 0===(n=t.exports?t.exports.components:{})&&(n={}),Object.entries($(n)).reduce(((t,e)=>{let[n,r]=e;var o;return t[(o=n,o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=Rt(r),t}),{}));var n;return n=>n===t.name?Kt(t):e[n]||r.get(n)},Kt=A(Rt);function Rt(t){const{css:e,template:n,exports:r,name:o}=t,s=n?function(t,e,n){return t(jt,M,R,n)}(n,0,Ht(t)):U;return t=>{let{slots:u,attributes:a,props:c}=t;if(r&&r[O])return function(t,e){let{slots:n,attributes:r,props:o,css:s,template:u}=e;u&&T("Pure components can not have html"),s&&T("Pure components do not have css");const a=V(t({slots:n,attributes:r,props:o}),B);return wt((t=>function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(t===i){const[t]=n;Y(t,O,!0),Nt(t,a)}return a[t](...n),a}))}(r,{slots:u,attributes:a,props:c,css:e,template:n});const l=$(r)||{},h=zt({css:e,template:s,componentAPI:l,name:o})({slots:u,attributes:a,props:c});return{mount:(t,e,n)=>h.mount(t,n,e),update:(t,e)=>h.update(e,t),unmount:t=>h.unmount(t)}}}function Yt(t,e){let{css:n,template:o,exports:s}=e;return r.has(t)&&T(`The component "${t}" was already registered`),r.set(t,Rt({name:t,css:n,template:o,exports:s})),r}function Ft(t){return r.has(t)||T(`The component "${t}" was never registered`),r.delete(t),Lt.remove(t),r}function Vt(t,e,n){return Mt(t).map((t=>function(t,e,n,o){const s=n||It(t);return r.has(s)||T(`The component named "${s}" was never registered`),r.get(s)({props:e,slots:o}).mount(t)}(t,e,n)))}function qt(t,e){return Mt(t).map((t=>(t[o]&&t[o].unmount(e),t)))}function Gt(t){return P(t)||T("Plugins must be of type function"),s.has(t)&&T("This plugin was already installed"),s.add(t),s}function Wt(t){return s.has(t)||T("This plugin was never installed"),s.delete(t),s}function Xt(t){return function(e,n,r){let{slots:o,attributes:s,parentScope:i}=void 0===r?{}:r;return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(((t,e)=>function(){return t(e(...arguments))}))}((t=>t.mount(e,i)),(t=>t({props:n,slots:o,attributes:s})),Rt)(t)}}function Zt(t){return P(t)||T('riot.pure accepts only arguments of type "function"'),t[O]=!0,t}const Jt=t=>t,Qt="v7.1.0",te={cssManager:Lt,DOMBindings:{template:jt,createBinding:vt,createExpression:lt,bindingTypes:R,expressionTypes:M},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:o,PARENT_KEY_SYMBOL:N}}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var s=n[t]={exports:{}};return e[t](s,s.exports,r),s.exports}r.m=e,t=[],r.O=(e,n,o,s)=>{if(!n){var i=1/0;for(l=0;l<t.length;l++){for(var[n,o,s]=t[l],u=!0,a=0;a<n.length;a++)(!1&s||i>=s)&&Object.keys(r.O).every((t=>r.O[t](n[a])))?n.splice(a--,1):(u=!1,s<i&&(i=s));if(u){t.splice(l--,1);var c=o();void 0!==c&&(e=c)}}return e}s=s||0;for(var l=t.length;l>0&&t[l-1][2]>s;l--)t[l]=t[l-1];t[l]=[n,o,s]},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={275:0,33:0};r.O.j=e=>0===t[e];var e=(e,n)=>{var o,s,[i,u,a]=n,c=0;if(i.some((e=>0!==t[e]))){for(o in u)r.o(u,o)&&(r.m[o]=u[o]);if(a)var l=a(r)}for(e&&e(n);c<i.length;c++)s=i[c],r.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return r.O(l)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),r.O(void 0,[33],(()=>r(846)));var o=r.O(void 0,[33],(()=>r(323)));o=r.O(o)})();