From 3086b1a53ddfe5f26973c0358e1e6ac49b1661eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Szikszai?= Date: Fri, 15 Jan 2021 11:05:19 +0100 Subject: [PATCH] Make sure there is a space between the return and the normalize event call. --- shard.yml | 5 +++-- src/assets/runtime.js | 2 +- src/compilers/component.cr | 10 +++++----- src/compilers/html_attribute.cr | 2 ++ src/compilers/module_access.cr | 2 ++ src/compilers/next_call.cr | 2 ++ src/compilers/parallel.cr | 8 +++++++- src/compilers/sequence.cr | 6 +++++- src/compilers/test.cr | 2 ++ src/compilers/top_level.cr | 2 +- src/compilers/try.cr | 2 ++ src/compilers/variable.cr | 4 ++++ src/formatters/function.cr | 2 +- src/formatters/if.cr | 2 ++ src/formatters/inline_function.cr | 2 +- src/formatters/style.cr | 4 +++- src/installer.cr | 6 ++---- src/js.cr | 2 ++ src/message.cr | 4 ++++ src/messages/installer_failed_to_install.cr | 2 ++ src/parsers/case.cr | 2 ++ src/parsers/component.cr | 2 ++ src/parsers/enum.cr | 2 ++ src/parsers/module.cr | 2 ++ src/parsers/parallel.cr | 2 ++ src/parsers/provider.cr | 2 ++ src/parsers/routes.cr | 2 ++ src/parsers/sequence.cr | 2 ++ src/parsers/store.cr | 2 ++ src/parsers/suite.cr | 2 ++ src/parsers/top_level.cr | 2 ++ src/parsers/try.cr | 2 ++ src/parsers/where.cr | 2 ++ src/style_builder.cr | 2 ++ src/test_runner.cr | 2 ++ src/type_checkers/case.cr | 2 ++ src/type_checkers/case_branch.cr | 2 ++ src/type_checkers/component.cr | 2 ++ src/type_checkers/enum.cr | 2 ++ src/type_checkers/enum_id.cr | 2 ++ src/type_checkers/js.cr | 2 ++ src/type_checkers/next_call.cr | 2 ++ src/type_checkers/scope.cr | 12 ++++++++++-- src/type_checkers/statement.cr | 2 ++ src/type_checkers/string_literal.cr | 2 ++ 45 files changed, 111 insertions(+), 20 deletions(-) diff --git a/shard.yml b/shard.yml index 70af29f27..aa7a172ae 100644 --- a/shard.yml +++ b/shard.yml @@ -1,8 +1,9 @@ name: mint version: 0.12.0-devel -authors: - - Szikszai Gusztáv +targets: + mint: + main: src/mint.cr dependencies: string_inflection: diff --git a/src/assets/runtime.js b/src/assets/runtime.js index 04e423fc9..b6935e9f1 100644 --- a/src/assets/runtime.js +++ b/src/assets/runtime.js @@ -1 +1 @@ -var Mint=function(){"use strict";var t,e,n,r,o,i={},a=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function u(t,e){for(var n in e)t[n]=e[n];return t}function c(t){var e=t.parentNode;e&&e.removeChild(t)}function l(t,e,n){var r,o=arguments,i={};for(r in e)"key"!==r&&"ref"!==r&&(i[r]=e[r]);if(arguments.length>3)for(n=[n],r=3;r1&&S(o,e,n),e=w(n,o,o,t.__k,null,o.__e,e),"function"==typeof t.type&&(t.__d=e)))}function T(e,n,r,o,i,a,s,c,l){var h,p,_,m,y,v,w,b,k,x,T,E=n.type;if(void 0!==n.constructor)return null;(h=t.__b)&&h(n);try{t:if("function"==typeof E){if(b=n.props,k=(h=E.contextType)&&o[h.__c],x=h?k?k.props.value:h.__:o,r.__c?w=(p=n.__c=r.__c).__=p.__E:("prototype"in E&&E.prototype.render?n.__c=p=new E(b,x):(n.__c=p=new d(b,x),p.constructor=E,p.render=D),k&&k.sub(p),p.props=b,p.state||(p.state={}),p.context=x,p.__n=o,_=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=E.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=u({},p.__s)),u(p.__s,E.getDerivedStateFromProps(b,p.__s))),m=p.props,y=p.state,_)null==E.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==E.getDerivedStateFromProps&&b!==m&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,x),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,x)||n.__v===r.__v){p.props=b,p.state=p.__s,n.__v!==r.__v&&(p.__d=!1),p.__v=n,n.__e=r.__e,n.__k=r.__k,p.__h.length&&s.push(p),S(n,c,e);break t}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,x),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(m,y,v)}))}p.context=x,p.props=b,p.state=p.__s,(h=t.__r)&&h(n),p.__d=!1,p.__v=n,p.__P=e,h=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(o=u(u({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(m,y)),T=null!=h&&h.type==f&&null==h.key?h.props.children:h,g(e,Array.isArray(T)?T:[T],n,r,o,i,a,s,c,l),p.base=n.__e,p.__h.length&&s.push(p),w&&(p.__E=p.__=null),p.__e=!1}else null==a&&n.__v===r.__v?(n.__k=r.__k,n.__e=r.__e):n.__e=P(r.__e,n,r,o,i,a,s,l);(h=t.diffed)&&h(n)}catch(e){n.__v=null,t.__e(e,n,r)}return n.__e}function E(e,n){t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(t){t.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function P(t,e,n,r,o,s,u,c){var l,h,f,d,p,_=n.props,m=e.props;if(o="svg"===e.type||o,null!=s)for(l=0;l3;)n.pop()();if(n[1]1?"s":"")+" required, but only "+e.length+" present")}function ut(t){st(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function ct(t,e){st(2,arguments);var n=ut(t),r=at(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}function lt(t,e){st(2,arguments);var n=ut(t).getTime(),r=at(e);return new Date(n+r)}function ht(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,i=null==o?0:at(o),a=null==n.weekStartsOn?i:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=ut(t),u=s.getDay(),c=(u0?(6e4+ft(e))%6e4:ft(e))}function pt(t){st(1,arguments);var e=ut(t);return e.setHours(0,0,0,0),e}function _t(t,e){st(2,arguments);var n=ut(t),r=ut(e),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function mt(t){st(1,arguments);var e=ut(t);return!isNaN(e)}function yt(t,e){st(2,arguments);var n=ut(t),r=ut(e);return n.getTime()-r.getTime()}function gt(t,e){st(2,arguments);var n=yt(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}function vt(t,e){st(1,arguments);var n=t||{},r=ut(n.start),o=ut(n.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var a=[],s=r;s.setHours(0,0,0,0);var u=e&&"step"in e?Number(e.step):1;if(u<1||isNaN(u))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=i;)a.push(ut(s)),s.setDate(s.getDate()+u),s.setHours(0,0,0,0);return a}function wt(t){st(1,arguments);var e=ut(t);return e.setDate(1),e.setHours(0,0,0,0),e}function bt(t){st(1,arguments);var e=ut(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function kt(t){st(1,arguments);var e=ut(t);return e.setHours(23,59,59,999),e}function xt(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,i=null==o?0:at(o),a=null==n.weekStartsOn?i:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=ut(t),u=s.getDay(),c=6+(u0?"in "+r:r+" ago":r},formatLong:Et,formatRelative:function(t,e,n,r){return Pt[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ct({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ct({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Ct({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ct({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ct({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Dt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},o=n.match(Dt.matchPattern);if(!o)return null;var i=o[0],a=n.match(Dt.parsePattern);if(!a)return null;var s=Dt.valueCallback?Dt.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(i.length)}}),era:Mt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Mt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Mt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Mt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function At(t,e){st(2,arguments);var n=at(e);return lt(t,-n)}function Nt(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length=o.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Wt(t){st(1,arguments);var e=jt(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Ut(n);return r}function Lt(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,i=null==o?0:at(o),a=null==n.weekStartsOn?i:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=ut(t),u=s.getUTCDay(),c=(u=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=Lt(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=Lt(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function Ft(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.firstWeekContainsDate,i=null==o?1:at(o),a=null==n.firstWeekContainsDate?i:at(n.firstWeekContainsDate),s=Rt(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var c=Lt(u,e);return c}var Yt={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Nt("yy"===e?r%100:r,e.length)}(t,e)},Y:function(t,e,n,r){var o=Rt(t,r),i=o>0?o:1-o;return"YY"===e?Nt(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):Nt(i,e.length)},R:function(t,e){return Nt(jt(t),e.length)},u:function(t,e){return Nt(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Nt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Nt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Nt(n+1,2)}(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Nt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var o=function(t,e){st(1,arguments);var n=ut(t),r=Lt(n,e).getTime()-Ft(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(o,{unit:"week"}):Nt(o,e.length)},I:function(t,e,n){var r=function(t){st(1,arguments);var e=ut(t),n=Ut(e).getTime()-Wt(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Nt(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return Nt(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,n){var r=function(t){st(1,arguments);var e=ut(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),o=n-r;return Math.floor(o/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Nt(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var o=t.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Nt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var o=t.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Nt(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),o=0===r?7:r;switch(e){case"i":return String(o);case"ii":return Nt(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,o=t.getUTCHours();switch(r=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,o=t.getUTCHours();switch(r=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return function(t,e){return Nt(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return Nt(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Nt(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Nt(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return Nt(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return Nt(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Nt(Math.floor(r*Math.pow(10,n-3)),e.length)}(t,e)},X:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return qt(o);case"XXXX":case"XX":return Ht(o);case"XXXXX":case"XXX":default:return Ht(o,":")}},x:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return qt(o);case"xxxx":case"xx":return Ht(o);case"xxxxx":case"xxx":default:return Ht(o,":")}},O:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+It(o,":");case"OOOO":default:return"GMT"+Ht(o,":")}},z:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+It(o,":");case"zzzz":default:return"GMT"+Ht(o,":")}},t:function(t,e,n,r){var o=r._originalDate||t;return Nt(Math.floor(o.getTime()/1e3),e.length)},T:function(t,e,n,r){return Nt((r._originalDate||t).getTime(),e.length)}};function It(t,e){var n=t>0?"-":"+",r=Math.abs(t),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=e||"";return n+String(o)+a+Nt(i,2)}function qt(t,e){return t%60==0?(t>0?"-":"+")+Nt(Math.abs(t)/60,2):Ht(t,e)}function Ht(t,e){var n=e||"",r=t>0?"-":"+",o=Math.abs(t);return r+Nt(Math.floor(o/60),2)+n+Nt(o%60,2)}function $t(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function zt(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var Xt={p:zt,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),o=r[1],i=r[2];if(!i)return $t(t,e);switch(o){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",$t(o,e)).replace("{{time}}",zt(i,e))}},Bt=["D","DD"],Gt=["YY","YYYY"];function Qt(t){return-1!==Bt.indexOf(t)}function Jt(t){return-1!==Gt.indexOf(t)}function Vt(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var Kt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,te=/^'([^]*?)'?$/,ee=/''/g,ne=/[a-zA-Z]/;function re(t,e,n){st(2,arguments);var r=String(e),o=n||{},i=o.locale||Ot,a=i.options&&i.options.firstWeekContainsDate,s=null==a?1:at(a),u=null==o.firstWeekContainsDate?s:at(o.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=i.options&&i.options.weekStartsOn,l=null==c?0:at(c),h=null==o.weekStartsOn?l:at(o.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!i.localize)throw new RangeError("locale must contain localize property");if(!i.formatLong)throw new RangeError("locale must contain formatLong property");var f=ut(t);if(!mt(f))throw new RangeError("Invalid time value");var d=dt(f),p=At(f,d),_={firstWeekContainsDate:u,weekStartsOn:h,locale:i,_originalDate:f},m=r.match(Zt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Xt[e])(t,i.formatLong,_):t})).join("").match(Kt).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return oe(n);var a=Yt[r];if(a)return!o.useAdditionalWeekYearTokens&&Jt(n)&&Vt(n,e,t),!o.useAdditionalDayOfYearTokens&&Qt(n)&&Vt(n,e,t),a(p,n,i.localize,_);if(r.match(ne))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return m}function oe(t){return t.match(te)[1].replace(ee,"'")}function ie(t){return function(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e=e||{})e.hasOwnProperty(n)&&(t[n]=e[n]);return t}({},t)}function ae(t,e,n){st(2,arguments);var r=n||{},o=r.locale||Ot;if(!o.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var i=_t(t,e);if(isNaN(i))throw new RangeError("Invalid time value");var a,s,u=ie(r);u.addSuffix=Boolean(r.addSuffix),u.comparison=i,i>0?(a=ut(e),s=ut(t)):(a=ut(t),s=ut(e));var c,l=null==r.roundingMethod?"round":String(r.roundingMethod);if("floor"===l)c=Math.floor;else if("ceil"===l)c=Math.ceil;else{if("round"!==l)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");c=Math.round}var h,f=gt(s,a),d=(dt(s)-dt(a))/1e3,p=c((f-d)/60);if("second"===(h=null==r.unit?p<1?"second":p<60?"minute":p<1440?"hour":p<43200?"day":p<525600?"month":"year":String(r.unit)))return o.formatDistance("xSeconds",f,u);if("minute"===h)return o.formatDistance("xMinutes",p,u);if("hour"===h){var _=c(p/60);return o.formatDistance("xHours",_,u)}if("day"===h){var m=c(p/1440);return o.formatDistance("xDays",m,u)}if("month"===h){var y=c(p/43200);return o.formatDistance("xMonths",y,u)}if("year"===h){var g=c(p/525600);return o.formatDistance("xYears",g,u)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}const se=Symbol("Mint.Equals"),ue=Symbol.for("react.element"),ce=(t,e)=>void 0===t&&void 0===e||null===t&&null===e||(null!=t&&null!=t&&t[se]?t[se](e):null!=e&&null!=e&&e[se]?e[se](t):(t&&t.$$typeof===ue||e&&e.$$typeof===ue||console.warn("Comparing entites with === because there is no comparison function defined:",t,e),t===e)),le=(t,e)=>{if(t instanceof Object&&e instanceof Object){const n=new Set(Object.keys(t).concat(Object.keys(e)));for(let r of n)if(!ce(t[r],e[r]))return!1;return!0}return console.warn("Comparing entites with === because there is no comparison function defined:",t,e),t===e};class Record{constructor(t){for(let e in t)this[e]=t[e]}[se](t){if(!(t instanceof Record))return!1;if(Object.keys(this).length!==Object.keys(t).length)return!1;for(let e in this)if(!ce(t[e],this[e]))return!1;return!0}}const he=(t,e)=>n=>{const r=class extends Record{};return r.mappings=n,r.encode=t=>{const e={};for(let r in n){const[o,i,a]=n[r];e[o]=a?a(t[r]):t[r]}return e},r.decode=o=>{const{ok:i,err:a}=e,s={};for(let e in n){const[r,i]=n[e],u=t.field(r,i)(o);if(u instanceof a)return u;s[e]=u._0}return new i(new r(s))},r},fe=(t,e)=>{const n=Object.assign(Object.create(null),t,e);return t instanceof Record?new t.constructor(n):new Record(n)},de=(t,e=!0)=>{window.location.pathname+window.location.search+window.location.hash!==t&&(window.history.pushState({},"",t),e&&dispatchEvent(new PopStateEvent("popstate")))},pe=t=>{let e=document.createElement("style");document.head.appendChild(e),e.innerHTML=t},_e=t=>(e,n)=>{const{just:r,nothing:o}=t;return e.length>=n+1&&n>=0?new r(e[n]):new o};class me{constructor(){this.effectAllowed="none",this.dropEffect="none",this.files=[],this.types=[],this.cache={}}getData(t){return this.cache[t]||""}setData(t,e){return this.cache[t]=e,null}clearData(){return this.cache={},null}}const ye=t=>new Proxy(t,{get:function(t,e){if(e in t){const n=t[e];return n instanceof Function?()=>t[e]():n}switch(e){case"clipboardData":case"dataTransfer":return new me;case"data":return"";case"altKey":return!1;case"charCode":return-1;case"ctrlKey":return!1;case"key":return"";case"keyCode":return-1;case"locale":return"";case"location":return-1;case"metaKey":case"repeat":case"shiftKey":return!1;case"which":case"button":case"buttons":case"clientX":case"clientY":case"pageX":case"pageY":case"screenX":case"screenY":case"detail":case"deltaMode":case"deltaX":case"deltaY":case"deltaZ":return-1;case"animationName":case"pseudoElement":return"";case"elapsedTime":return-1;case"propertyName":return"";default:return}}}),ge=(t,e)=>{const n=Object.getOwnPropertyDescriptors(Reflect.getPrototypeOf(t));for(let r in n){if(e&&e[r])continue;const o=n[r].value;"function"==typeof o&&(t[r]=o.bind(t))}},ve=(t,e)=>{if(!e)return;const n={};Object.keys(e).forEach(t=>{let r=null;n[t]={get:()=>(r||(r=e[t]()),r)}}),Object.defineProperties(t,n)},we=function(){let t=Array.from(arguments);return Array.isArray(t[0])&&1===t.length?t[0]:t},be=function(t){const e={};for(let n of t)if("string"==typeof n)n.split(";").forEach(t=>{const[n,r]=t.split(":");n&&r&&(e[n]=r)});else if(n instanceof Map)for(let[t,r]of n)e[t]=r;else if(n instanceof Array)for(let[t,r]of n)e[t]=r;else for(let t in n)e[t]=n[t];return e};class ke extends d{render(){const t=[];for(let e in this.props.globals)t.push(l(this.props.globals[e],{ref:t=>t._persist(),key:e}));return l("div",{},[...t,...this.props.children])}}ke.displayName="Mint.Root";class xe{constructor(t){t&&t instanceof Node&&t!==document.body?this.root=t:(this.root=document.createElement("div"),document.body.appendChild(this.root))}render(t,e){void 0!==t&&O(l(ke,{globals:e},[l(t,{key:"$MAIN"})]),this.root)}}class Se{constructor(t,e){this.teardown=e,this.subject=t,this.steps=[]}async run(){let t;try{t=await new Promise(this.next.bind(this))}finally{this.teardown&&this.teardown()}return t}async next(t,e){requestAnimationFrame(async()=>{let n=this.steps.shift();if(n)try{this.subject=await n(this.subject)}catch(t){return e(t)}this.steps.length?this.next(t,e):t(this.subject)})}step(t){return this.steps.push(t),this}}const Te=["componentWillMount","render","getSnapshotBeforeUpdate","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","setState","forceUpdate","constructor"];class Ee extends d{constructor(t){super(t),ge(this,Te)}shouldComponentUpdate(t,e){let n=!le(this.props,t),r=!le(this.state,e);return n||r}_d(t,e){ve(this,e);const n={};Object.keys(t).forEach(e=>{const[r,o]=t[e],i=r||e;n[e]={get:()=>i in this.props?this.props[i]:o}}),Object.defineProperties(this,n)}}class Pe{constructor(){ge(this),this.subscriptions=new Map,this.state={}}setState(t,e){this.state=Object.assign({},this.state,t),e()}_d(t){ve(this,t)}_subscribe(t,e){const n=this.subscriptions.get(t);null==e||null!=n&&le(n,e)||(this.subscriptions.set(t,e),this._update())}_unsubscribe(t){this.subscriptions.has(t)&&(this.subscriptions.delete(t),this._update())}_update(){this.update()}get _subscriptions(){return Array.from(this.subscriptions.values())}update(){}}function Ce(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Me,De=(function(t,e){var n=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,10],r=[1,11],o=[1,12],i=[5,11,12,13,14,15],a={trace:function(){},yy:{},symbols_:{error:2,root:3,expressions:4,EOF:5,expression:6,optional:7,literal:8,splat:9,param:10,"(":11,")":12,LITERAL:13,SPLAT:14,PARAM:15,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",11:"(",12:")",13:"LITERAL",14:"SPLAT",15:"PARAM"},productions_:[0,[3,2],[3,1],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[7,3],[8,1],[9,1],[10,1]],performAction:function(t,e,n,r,o,i,a){var s=i.length-1;switch(o){case 1:return new r.Root({},[i[s-1]]);case 2:return new r.Root({},[new r.Literal({value:""})]);case 3:this.$=new r.Concat({},[i[s-1],i[s]]);break;case 4:case 5:this.$=i[s];break;case 6:this.$=new r.Literal({value:i[s]});break;case 7:this.$=new r.Splat({name:i[s]});break;case 8:this.$=new r.Param({name:i[s]});break;case 9:this.$=new r.Optional({},[i[s-1]]);break;case 10:this.$=t;break;case 11:case 12:this.$=t.slice(1)}},table:[{3:1,4:2,5:[1,3],6:4,7:5,8:6,9:7,10:8,11:e,13:n,14:r,15:o},{1:[3]},{5:[1,13],6:14,7:5,8:6,9:7,10:8,11:e,13:n,14:r,15:o},{1:[2,2]},t(i,[2,4]),t(i,[2,5]),t(i,[2,6]),t(i,[2,7]),t(i,[2,8]),{4:15,6:4,7:5,8:6,9:7,10:8,11:e,13:n,14:r,15:o},t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),{1:[2,1]},t(i,[2,3]),{6:14,7:5,8:6,9:7,10:8,11:e,12:[1,16],13:n,14:r,15:o},t(i,[2,9])],defaultActions:{3:[2,2],13:[2,1]},parseError:function(t,e){if(!e.recoverable){function n(t,e){this.message=t,this.hash=e}throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[null],o=[],i=this.table,a="",s=0,u=0,c=2,l=1,h=o.slice.call(arguments,1),f=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);f.setInput(t,d.yy),d.yy.lexer=f,d.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var _=f.yylloc;o.push(_);var m=f.options&&f.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,g,v,w,b,k,x,S,T=function(){var t;return"number"!=typeof(t=f.lex()||l)&&(t=e.symbols_[t]||t),t},E={};;){if(g=n[n.length-1],this.defaultActions[g]?v=this.defaultActions[g]:(null==y&&(y=T()),v=i[g]&&i[g][y]),void 0===v||!v.length||!v[0]){var P="";for(b in S=[],i[g])this.terminals_[b]&&b>c&&S.push("'"+this.terminals_[b]+"'");P=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(s+1)+": Unexpected "+(y==l?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(P,{text:f.match,token:this.terminals_[y]||y,line:f.yylineno,loc:_,expected:S})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+y);switch(v[0]){case 1:n.push(y),r.push(f.yytext),o.push(f.yylloc),n.push(v[1]),y=null,u=f.yyleng,a=f.yytext,s=f.yylineno,_=f.yylloc;break;case 2:if(k=this.productions_[v[1]][1],E.$=r[r.length-k],E._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},m&&(E._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(E,[a,u,s,d.yy,v[1],r,o].concat(h))))return w;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[v[1]][0]),r.push(E.$),o.push(E._$),x=i[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0}},s={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in o)this[i]=o[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;ie[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,o[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,o[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return"(";case 1:return")";case 2:return"SPLAT";case 3:return"PARAM";case 4:case 5:return"LITERAL";case 6:return"EOF"}},rules:[/^(?:\()/,/^(?:\))/,/^(?:\*+\w+)/,/^(?::+\w+)/,/^(?:[\w%\-~\n]+)/,/^(?:.)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};function u(){this.yy={}}return a.lexer=s,u.prototype=a,a.Parser=u,new u}();void 0!==Ce&&(e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)})}(Me={path:void 0,exports:{},require:function(t,e){return Ce(null==e&&Me.path)}},Me.exports),Me.exports);function Oe(t){return function(e,n){return{displayName:t,props:e,children:n||[]}}}De.parser,De.Parser,De.parse;var Ae={Root:Oe("Root"),Concat:Oe("Concat"),Literal:Oe("Literal"),Splat:Oe("Splat"),Param:Oe("Param"),Optional:Oe("Optional")},Ne=De.parser;Ne.yy=Ae;var Ue=Ne,je=Object.keys(Ae),We=function(t){return je.forEach((function(e){if(void 0===t[e])throw new Error("No handler defined for "+e.displayName)})),{visit:function(t,e){return this.handlers[t.displayName].call(this,t,e)},handlers:t}},Le=/[\-{}\[\]+?.,\\\^$|#\s]/g;function Re(t){this.captures=t.captures,this.re=t.re}Re.prototype.match=function(t){var e=this.re.exec(t),n={};if(e)return this.captures.forEach((function(t,r){void 0===e[r+1]?n[t]=void 0:n[t]=decodeURIComponent(e[r+1])})),n};var Fe=We({Concat:function(t){return t.children.reduce(function(t,e){var n=this.visit(e);return{re:t.re+n.re,captures:t.captures.concat(n.captures)}}.bind(this),{re:"",captures:[]})},Literal:function(t){return{re:t.props.value.replace(Le,"\\$&"),captures:[]}},Splat:function(t){return{re:"([^?]*?)",captures:[t.props.name]}},Param:function(t){return{re:"([^\\/\\?]+)",captures:[t.props.name]}},Optional:function(t){var e=this.visit(t.children[0]);return{re:"(?:"+e.re+")?",captures:e.captures}},Root:function(t){var e=this.visit(t.children[0]);return new Re({re:new RegExp("^"+e.re+"(?=\\?|$)"),captures:e.captures})}}),Ye=We({Concat:function(t,e){var n=t.children.map(function(t){return this.visit(t,e)}.bind(this));return!n.some((function(t){return!1===t}))&&n.join("")},Literal:function(t){return decodeURI(t.props.value)},Splat:function(t,e){return!!e[t.props.name]&&e[t.props.name]},Param:function(t,e){return!!e[t.props.name]&&e[t.props.name]},Optional:function(t,e){return this.visit(t.children[0],e)||""},Root:function(t,e){e=e||{};var n=this.visit(t.children[0],e);return!!n&&encodeURI(n)}});function Ie(t){var e;if(e=this?this:Object.create(Ie.prototype),void 0===t)throw new Error("A route spec is required");return e.spec=t,e.ast=Ue.parse(t),e}Ie.prototype=Object.create(null),Ie.prototype.match=function(t){return Fe.visit(this.ast).match(t)||!1},Ie.prototype.reverse=function(t){return Ye.visit(this.ast,t)};var qe=Ie;Event.prototype.propagationPath=function(){var t=function(){var t=this.target||null,e=[t];if(!t||!t.parentElement)return[];for(;t.parentElement;)t=t.parentElement,e.unshift(t);return e}.bind(this);return this.path||this.composedPath&&this.composedPath()||t()};class He extends d{handleClick(t,e){if(!t.defaultPrevented&&!t.ctrlKey)for(let e of t.propagationPath())if("A"===e.tagName){let n=e.pathname,r=e.origin,o=e.search,i=e.hash;if(r===window.location.origin)for(let e of this.props.routes){let r=window.location.pathname+window.location.search,a=n+o,s=a+i,u=new qe(e.path);if("*"==e.path||u.match(s))return r!=a&&t.preventDefault(),void de(s)}}}render(){const t=[];for(let e in this.props.globals)t.push(l(this.props.globals[e],{ref:t=>t._persist(),key:e}));return l("div",{onClick:this.handleClick.bind(this)},[...t,...this.props.children])}}He.displayName="Mint.Root";var $e=t=>class{constructor(){this.root=document.createElement("div"),document.body.appendChild(this.root),this.routes=[],window.addEventListener("popstate",()=>{this.handlePopState()})}handlePopState(){for(let e of this.routes)if("*"===e.path)e.handler();else{let n=new qe(e.path).match(window.location.pathname+window.location.search+window.location.hash);if(n)try{let r=e.mapping.map((r,o)=>{const i=n[r],a=e.decoders[o](i);if(a instanceof t.ok)return a._0;throw""});e.handler.apply(null,r);break}catch(t){}}}render(t,e){void 0!==t&&(O(l(He,{routes:this.routes,globals:e},[l(t,{key:"$MAIN"})]),this.root),requestAnimationFrame(()=>{this.handlePopState()}))}addRoutes(t){this.routes=this.routes.concat(t)}};const ze=t=>{let e=JSON.stringify(t,"",2);return void 0===e&&(e="undefined"),((t,e=1,n)=>{if(n={indent:" ",includeEmptyLines:!1,...n},"string"!=typeof t)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if("number"!=typeof e)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if("string"!=typeof n.indent)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n.indent}\``);if(0===e)return t;const r=n.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(r,n.indent.repeat(e))})(e)};class Xe{constructor(t,e=[]){this.message=t,this.object=null,this.path=e}push(t){this.path.unshift(t)}toString(){const t=this.message.trim(),e=this.path.reduce((t,e)=>{if(t.length)switch(e.type){case"FIELD":return`${t}.${e.value}`;case"ARRAY":return`${t}[${e.value}]`}else switch(e.type){case"FIELD":return e.value;case"ARRAY":return"[$(item.value)]"}},"");return e.length&&this.object?t+"\n\n"+Be.trim().replace("{value}",ze(this.object)).replace("{path}",e):t}}const Be="\nThe input is in this object:\n\n{value}\n\nat: {path}\n",Ge=t=>e=>{const{ok:n,err:r}=t;return"string"!=typeof e?new r(new Xe("\nI was trying to decode the value:\n\n{value}\n\nas a String, but could not.\n".replace("{value}",ze(e)))):new n(e)},Qe=t=>e=>{const{ok:n,err:r}=t;let o=NaN;return o="number"==typeof e?new Date(e):Date.parse(e),Number.isNaN(o)?new r(new Xe("\nI was trying to decode the value:\n\n{value}\n\nas a Time, but could not.\n".replace("{value}",ze(e)))):new n(new Date(o))},Je=t=>e=>{const{ok:n,err:r}=t;let o=parseFloat(e);return isNaN(o)?new r(new Xe("\nI was trying to decode the value:\n\n{value}\n\nas a Number, but could not.\n".replace("{value}",ze(e)))):new n(o)},Ve=t=>e=>{const{ok:n,err:r}=t;return"boolean"!=typeof e?new r(new Xe("\nI was trying to decode the value:\n\n{value}\n\nas a Bool, but could not.\n".replace("{value}",ze(e)))):new n(e)},Ke=t=>(e,n)=>{const{err:r,nothing:o}=t;return t=>{if(null==t||null==t||"object"!=typeof t||Array.isArray(t)){const n='\nI was trying to decode the field "{field}" from the object:\n\n{value}\n\nbut I could not because it\'s not an object.\n'.replace("{field}",e).replace("{value}",ze(t));return new r(new Xe(n))}{const o=t[e],i=n(o);return i instanceof r&&(i._0.push({type:"FIELD",value:e}),i._0.object=t),i}}},Ze=t=>e=>n=>{const{ok:r,err:o}=t;if(!Array.isArray(n))return new o(new Xe("\nI was trying to decode the value:\n\n{value}\n\nas an Array, but could not.\n".replace("{value}",ze(n))));let i=[],a=0;for(let t of n){let r=e(t);if(r instanceof o)return r._0.push({type:"ARRAY",value:a}),r._0.object=n,r;i.push(r._0),a++}return new r(i)},tn=t=>e=>n=>{const{ok:r,just:o,nothing:i,err:a}=t;if(null==n||null==n)return new r(new i);{const t=e(n);return t instanceof a?t:new r(new o(t._0))}},en=t=>e=>n=>{const{ok:r,err:o}=t;if(null==n||null==n||"object"!=typeof n||Array.isArray(n)){const t="\nI was trying to decode the value:\n\n{value}\n\nas a Map, but could not.\n".replace("{value}",ze(n));return new o(new Xe(t))}{const t=[];for(let r in n){const i=e(n[r]);if(i instanceof o)return i;t.push([r,i._0])}return new r(t)}},nn=t=>e=>new t.ok(e),rn=t=>t,on=t=>+t,an=t=>e=>e.map(e=>t?t(e):e),sn=t=>e=>{const n={};for(let r of e)n[r[0]]=t?t(r[1]):r[1];return n},un=t=>e=>n=>n instanceof t.just?e?e(n._0):n._0:null;var cn=t=>({maybe:un(t),identity:rn,array:an,time:on,map:sn});class ln{constructor(){ge(this)}_d(t){ve(this,t)}}class hn{constructor(){ge(this),this.listeners=new Set,this.state={}}setState(t,e){this.state=Object.assign({},this.state,t);for(let t of this.listeners)t.forceUpdate();e()}_d(t){ve(this,t)}_subscribe(t){this.listeners.add(t)}_unsubscribe(t){this.listeners.delete(t)}}class fn{[se](t){if(!(t instanceof this.constructor))return!1;if(t.length!==this.length)return!1;for(let e=0;e{const e=(t=>({boolean:Ve(t),object:nn(t),number:Je(t),string:Ge(t),field:Ke(t),array:Ze(t),maybe:tn(t),time:Qe(t),map:en(t)}))(t);return{program:new($e(t)),normalizeEvent:ye,insertStyles:pe,navigate:de,compare:ce,update:fe,array:we,style:be,at:_e(t),EmbeddedProgram:xe,TestContext:Se,Component:Ee,Provider:Pe,Module:ln,Store:hn,Decoder:e,Encoder:cn(t),DateFNS:{format:re,startOfMonth:wt,startOfWeek:ht,startOfDay:pt,endOfMonth:bt,endOfWeek:xt,endOfDay:kt,addMonths:ct,eachDay:vt,distanceInWordsStrict:ae},Record:Record,Enum:fn,Nothing:t.nothing,Just:t.just,Err:t.err,Ok:t.ok,createRecord:he(e,t),createPortal:Z,createElement:l,React:{Fragment:f},ReactDOM:{unmountComponentAtNode:t=>O(null,t),render:O},Symbols:{Equals:se}}}}(); +var Mint=function(){"use strict";var t,e,n,r,o,i={},a=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function u(t,e){for(var n in e)t[n]=e[n];return t}function c(t){var e=t.parentNode;e&&e.removeChild(t)}function l(t,e,n){var r,o=arguments,i={};for(r in e)"key"!==r&&"ref"!==r&&(i[r]=e[r]);if(arguments.length>3)for(n=[n],r=3;r1&&S(o,e,n),e=w(n,o,o,t.__k,null,o.__e,e),"function"==typeof t.type&&(t.__d=e)))}function T(e,n,r,o,i,a,s,c,l){var h,p,_,m,y,v,w,b,k,x,T,P=n.type;if(void 0!==n.constructor)return null;(h=t.__b)&&h(n);try{t:if("function"==typeof P){if(b=n.props,k=(h=P.contextType)&&o[h.__c],x=h?k?k.props.value:h.__:o,r.__c?w=(p=n.__c=r.__c).__=p.__E:("prototype"in P&&P.prototype.render?n.__c=p=new P(b,x):(n.__c=p=new d(b,x),p.constructor=P,p.render=D),k&&k.sub(p),p.props=b,p.state||(p.state={}),p.context=x,p.__n=o,_=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=P.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=u({},p.__s)),u(p.__s,P.getDerivedStateFromProps(b,p.__s))),m=p.props,y=p.state,_)null==P.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==P.getDerivedStateFromProps&&b!==m&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,x),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,x)||n.__v===r.__v){p.props=b,p.state=p.__s,n.__v!==r.__v&&(p.__d=!1),p.__v=n,n.__e=r.__e,n.__k=r.__k,p.__h.length&&s.push(p),S(n,c,e);break t}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,x),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(m,y,v)}))}p.context=x,p.props=b,p.state=p.__s,(h=t.__r)&&h(n),p.__d=!1,p.__v=n,p.__P=e,h=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(o=u(u({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(m,y)),T=null!=h&&h.type==f&&null==h.key?h.props.children:h,g(e,Array.isArray(T)?T:[T],n,r,o,i,a,s,c,l),p.base=n.__e,p.__h.length&&s.push(p),w&&(p.__E=p.__=null),p.__e=!1}else null==a&&n.__v===r.__v?(n.__k=r.__k,n.__e=r.__e):n.__e=E(r.__e,n,r,o,i,a,s,l);(h=t.diffed)&&h(n)}catch(e){n.__v=null,t.__e(e,n,r)}return n.__e}function P(e,n){t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(t){t.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function E(t,e,n,r,o,s,u,c){var l,h,f,d,p,_=n.props,m=e.props;if(o="svg"===e.type||o,null!=s)for(l=0;l3;)n.pop()();if(n[1]1?"s":"")+" required, but only "+e.length+" present")}function ut(t){st(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function ct(t,e){st(2,arguments);var n=ut(t),r=at(e);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var a=i.getDate();return o>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}function lt(t,e){st(2,arguments);var n=ut(t).getTime(),r=at(e);return new Date(n+r)}function ht(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,i=null==o?0:at(o),a=null==n.weekStartsOn?i:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=ut(t),u=s.getDay(),c=(u0?(6e4+ft(e))%6e4:ft(e))}function pt(t){st(1,arguments);var e=ut(t);return e.setHours(0,0,0,0),e}function _t(t,e){st(2,arguments);var n=ut(t),r=ut(e),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function mt(t){st(1,arguments);var e=ut(t);return!isNaN(e)}function yt(t,e){st(2,arguments);var n=ut(t),r=ut(e);return n.getTime()-r.getTime()}function gt(t,e){st(2,arguments);var n=yt(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}function vt(t,e){st(1,arguments);var n=t||{},r=ut(n.start),o=ut(n.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var a=[],s=r;s.setHours(0,0,0,0);var u=e&&"step"in e?Number(e.step):1;if(u<1||isNaN(u))throw new RangeError("`options.step` must be a number greater than 1");for(;s.getTime()<=i;)a.push(ut(s)),s.setDate(s.getDate()+u),s.setHours(0,0,0,0);return a}function wt(t){st(1,arguments);var e=ut(t);return e.setDate(1),e.setHours(0,0,0,0),e}function bt(t){st(1,arguments);var e=ut(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function kt(t){st(1,arguments);var e=ut(t);return e.setHours(23,59,59,999),e}function xt(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,i=null==o?0:at(o),a=null==n.weekStartsOn?i:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=ut(t),u=s.getDay(),c=6+(u0?"in "+r:r+" ago":r},formatLong:Pt,formatRelative:function(t,e,n,r){return Et[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ct({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ct({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return Number(t)-1}}),month:Ct({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ct({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ct({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Dt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t,e){var n=String(t),r=e||{},o=n.match(Dt.matchPattern);if(!o)return null;var i=o[0],a=n.match(Dt.parsePattern);if(!a)return null;var s=Dt.valueCallback?Dt.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(i.length)}}),era:Mt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Mt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Mt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Mt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function At(t,e){st(2,arguments);var n=at(e);return lt(t,-n)}function Nt(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length=o.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Wt(t){st(1,arguments);var e=jt(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Ut(n);return r}function Lt(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,i=null==o?0:at(o),a=null==n.weekStartsOn?i:at(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=ut(t),u=s.getUTCDay(),c=(u=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=Lt(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=Lt(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function Ft(t,e){st(1,arguments);var n=e||{},r=n.locale,o=r&&r.options&&r.options.firstWeekContainsDate,i=null==o?1:at(o),a=null==n.firstWeekContainsDate?i:at(n.firstWeekContainsDate),s=Rt(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var c=Lt(u,e);return c}var Yt={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Nt("yy"===e?r%100:r,e.length)}(t,e)},Y:function(t,e,n,r){var o=Rt(t,r),i=o>0?o:1-o;return"YY"===e?Nt(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):Nt(i,e.length)},R:function(t,e){return Nt(jt(t),e.length)},u:function(t,e){return Nt(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Nt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Nt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Nt(n+1,2)}(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Nt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var o=function(t,e){st(1,arguments);var n=ut(t),r=Lt(n,e).getTime()-Ft(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(o,{unit:"week"}):Nt(o,e.length)},I:function(t,e,n){var r=function(t){st(1,arguments);var e=ut(t),n=Ut(e).getTime()-Wt(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Nt(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return Nt(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,n){var r=function(t){st(1,arguments);var e=ut(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),o=n-r;return Math.floor(o/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Nt(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var o=t.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Nt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var o=t.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Nt(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),o=0===r?7:r;switch(e){case"i":return String(o);case"ii":return Nt(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,o=t.getUTCHours();switch(r=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,o=t.getUTCHours();switch(r=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return function(t,e){return Nt(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return Nt(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Nt(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Nt(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return Nt(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return Nt(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Nt(Math.floor(r*Math.pow(10,n-3)),e.length)}(t,e)},X:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return qt(o);case"XXXX":case"XX":return Ht(o);case"XXXXX":case"XXX":default:return Ht(o,":")}},x:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return qt(o);case"xxxx":case"xx":return Ht(o);case"xxxxx":case"xxx":default:return Ht(o,":")}},O:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+It(o,":");case"OOOO":default:return"GMT"+Ht(o,":")}},z:function(t,e,n,r){var o=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+It(o,":");case"zzzz":default:return"GMT"+Ht(o,":")}},t:function(t,e,n,r){var o=r._originalDate||t;return Nt(Math.floor(o.getTime()/1e3),e.length)},T:function(t,e,n,r){return Nt((r._originalDate||t).getTime(),e.length)}};function It(t,e){var n=t>0?"-":"+",r=Math.abs(t),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=e||"";return n+String(o)+a+Nt(i,2)}function qt(t,e){return t%60==0?(t>0?"-":"+")+Nt(Math.abs(t)/60,2):Ht(t,e)}function Ht(t,e){var n=e||"",r=t>0?"-":"+",o=Math.abs(t);return r+Nt(Math.floor(o/60),2)+n+Nt(o%60,2)}function $t(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function zt(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var Xt={p:zt,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),o=r[1],i=r[2];if(!i)return $t(t,e);switch(o){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",$t(o,e)).replace("{{time}}",zt(i,e))}},Bt=["D","DD"],Gt=["YY","YYYY"];function Qt(t){return-1!==Bt.indexOf(t)}function Jt(t){return-1!==Gt.indexOf(t)}function Vt(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var Kt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,te=/^'([^]*?)'?$/,ee=/''/g,ne=/[a-zA-Z]/;function re(t,e,n){st(2,arguments);var r=String(e),o=n||{},i=o.locale||Ot,a=i.options&&i.options.firstWeekContainsDate,s=null==a?1:at(a),u=null==o.firstWeekContainsDate?s:at(o.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=i.options&&i.options.weekStartsOn,l=null==c?0:at(c),h=null==o.weekStartsOn?l:at(o.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!i.localize)throw new RangeError("locale must contain localize property");if(!i.formatLong)throw new RangeError("locale must contain formatLong property");var f=ut(t);if(!mt(f))throw new RangeError("Invalid time value");var d=dt(f),p=At(f,d),_={firstWeekContainsDate:u,weekStartsOn:h,locale:i,_originalDate:f},m=r.match(Zt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Xt[e])(t,i.formatLong,_):t})).join("").match(Kt).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return oe(n);var a=Yt[r];if(a)return!o.useAdditionalWeekYearTokens&&Jt(n)&&Vt(n,e,t),!o.useAdditionalDayOfYearTokens&&Qt(n)&&Vt(n,e,t),a(p,n,i.localize,_);if(r.match(ne))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return m}function oe(t){return t.match(te)[1].replace(ee,"'")}function ie(t){return function(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e=e||{})e.hasOwnProperty(n)&&(t[n]=e[n]);return t}({},t)}function ae(t,e,n){st(2,arguments);var r=n||{},o=r.locale||Ot;if(!o.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var i=_t(t,e);if(isNaN(i))throw new RangeError("Invalid time value");var a,s,u=ie(r);u.addSuffix=Boolean(r.addSuffix),u.comparison=i,i>0?(a=ut(e),s=ut(t)):(a=ut(t),s=ut(e));var c,l=null==r.roundingMethod?"round":String(r.roundingMethod);if("floor"===l)c=Math.floor;else if("ceil"===l)c=Math.ceil;else{if("round"!==l)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");c=Math.round}var h,f=gt(s,a),d=(dt(s)-dt(a))/1e3,p=c((f-d)/60);if("second"===(h=null==r.unit?p<1?"second":p<60?"minute":p<1440?"hour":p<43200?"day":p<525600?"month":"year":String(r.unit)))return o.formatDistance("xSeconds",f,u);if("minute"===h)return o.formatDistance("xMinutes",p,u);if("hour"===h){var _=c(p/60);return o.formatDistance("xHours",_,u)}if("day"===h){var m=c(p/1440);return o.formatDistance("xDays",m,u)}if("month"===h){var y=c(p/43200);return o.formatDistance("xMonths",y,u)}if("year"===h){var g=c(p/525600);return o.formatDistance("xYears",g,u)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}const se=Symbol("Mint.Equals"),ue=Symbol.for("react.element"),ce=(t,e)=>void 0===t&&void 0===e||null===t&&null===e||(null!=t&&null!=t&&t[se]?t[se](e):null!=e&&null!=e&&e[se]?e[se](t):(t&&t.$$typeof===ue||e&&e.$$typeof===ue||console.warn("Comparing entites with === because there is no comparison function defined:",t,e),t===e)),le=(t,e)=>{if(t instanceof Object&&e instanceof Object){const n=new Set(Object.keys(t).concat(Object.keys(e)));for(let r of n)if(!ce(t[r],e[r]))return!1;return!0}return console.warn("Comparing entites with === because there is no comparison function defined:",t,e),t===e};class Record{constructor(t){for(let e in t)this[e]=t[e]}[se](t){if(!(t instanceof Record))return!1;if(Object.keys(this).length!==Object.keys(t).length)return!1;for(let e in this)if(!ce(t[e],this[e]))return!1;return!0}}const he=(t,e)=>n=>{const r=class extends Record{};return r.mappings=n,r.encode=t=>{const e={};for(let r in n){const[o,i,a]=n[r];e[o]=a?a(t[r]):t[r]}return e},r.decode=o=>{const{ok:i,err:a}=e,s={};for(let e in n){const[r,i]=n[e],u=t.field(r,i)(o);if(u instanceof a)return u;s[e]=u._0}return new i(new r(s))},r},fe=(t,e)=>{const n=Object.assign(Object.create(null),t,e);return t instanceof Record?new t.constructor(n):new Record(n)},de=(t,e=!0)=>{window.location.pathname+window.location.search+window.location.hash!==t&&(window.history.pushState({},"",t),e&&dispatchEvent(new PopStateEvent("popstate")))},pe=t=>{let e=document.createElement("style");document.head.appendChild(e),e.innerHTML=t},_e=t=>(e,n)=>{const{just:r,nothing:o}=t;return e.length>=n+1&&n>=0?new r(e[n]):new o},me=t=>new Proxy(t,{get:function(t,e){if(e in t){const n=t[e];return n instanceof Function?()=>t[e]():n}switch(e){case"clipboardData":case"dataTransfer":return new DataTransfer;case"data":return"";case"altKey":return!1;case"charCode":return-1;case"ctrlKey":return!1;case"key":return"";case"keyCode":return-1;case"locale":return"";case"location":return-1;case"metaKey":case"repeat":case"shiftKey":return!1;case"which":case"button":case"buttons":case"clientX":case"clientY":case"pageX":case"pageY":case"screenX":case"screenY":case"detail":case"deltaMode":case"deltaX":case"deltaY":case"deltaZ":return-1;case"animationName":case"pseudoElement":return"";case"elapsedTime":return-1;case"propertyName":return"";default:return}}}),ye=(t,e)=>{const n=Object.getOwnPropertyDescriptors(Reflect.getPrototypeOf(t));for(let r in n){if(e&&e[r])continue;const o=n[r].value;"function"==typeof o&&(t[r]=o.bind(t))}},ge=(t,e)=>{if(!e)return;const n={};Object.keys(e).forEach(t=>{let r=null;n[t]={get:()=>(r||(r=e[t]()),r)}}),Object.defineProperties(t,n)},ve=function(){let t=Array.from(arguments);return Array.isArray(t[0])&&1===t.length?t[0]:t},we=function(t){const e={};for(let n of t)if("string"==typeof n)n.split(";").forEach(t=>{const[n,r]=t.split(":");n&&r&&(e[n]=r)});else if(n instanceof Map)for(let[t,r]of n)e[t]=r;else if(n instanceof Array)for(let[t,r]of n)e[t]=r;else for(let t in n)e[t]=n[t];return e};class be extends d{render(){const t=[];for(let e in this.props.globals)t.push(l(this.props.globals[e],{ref:t=>t._persist(),key:e}));return l("div",{},[...t,...this.props.children])}}be.displayName="Mint.Root";class ke{constructor(t){t&&t instanceof Node&&t!==document.body?this.root=t:(this.root=document.createElement("div"),document.body.appendChild(this.root))}render(t,e){void 0!==t&&O(l(be,{globals:e},[l(t,{key:"$MAIN"})]),this.root)}}class xe{constructor(t,e){this.teardown=e,this.subject=t,this.steps=[]}async run(){let t;try{t=await new Promise(this.next.bind(this))}finally{this.teardown&&this.teardown()}return t}async next(t,e){requestAnimationFrame(async()=>{let n=this.steps.shift();if(n)try{this.subject=await n(this.subject)}catch(t){return e(t)}this.steps.length?this.next(t,e):t(this.subject)})}step(t){return this.steps.push(t),this}}const Se=["componentWillMount","render","getSnapshotBeforeUpdate","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","setState","forceUpdate","constructor"];class Te extends d{constructor(t){super(t),ye(this,Se)}shouldComponentUpdate(t,e){let n=!le(this.props,t),r=!le(this.state,e);return n||r}_d(t,e){ge(this,e);const n={};Object.keys(t).forEach(e=>{const[r,o]=t[e],i=r||e;n[e]={get:()=>i in this.props?this.props[i]:o}}),Object.defineProperties(this,n)}}class Pe{constructor(){ye(this),this.subscriptions=new Map,this.state={}}setState(t,e){this.state=Object.assign({},this.state,t),e()}_d(t){ge(this,t)}_subscribe(t,e){const n=this.subscriptions.get(t);null==e||null!=n&&le(n,e)||(this.subscriptions.set(t,e),this._update())}_unsubscribe(t){this.subscriptions.has(t)&&(this.subscriptions.delete(t),this._update())}_update(){this.update()}get _subscriptions(){return Array.from(this.subscriptions.values())}update(){}}function Ee(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Ce,Me=(function(t,e){var n=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,10],r=[1,11],o=[1,12],i=[5,11,12,13,14,15],a={trace:function(){},yy:{},symbols_:{error:2,root:3,expressions:4,EOF:5,expression:6,optional:7,literal:8,splat:9,param:10,"(":11,")":12,LITERAL:13,SPLAT:14,PARAM:15,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",11:"(",12:")",13:"LITERAL",14:"SPLAT",15:"PARAM"},productions_:[0,[3,2],[3,1],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[7,3],[8,1],[9,1],[10,1]],performAction:function(t,e,n,r,o,i,a){var s=i.length-1;switch(o){case 1:return new r.Root({},[i[s-1]]);case 2:return new r.Root({},[new r.Literal({value:""})]);case 3:this.$=new r.Concat({},[i[s-1],i[s]]);break;case 4:case 5:this.$=i[s];break;case 6:this.$=new r.Literal({value:i[s]});break;case 7:this.$=new r.Splat({name:i[s]});break;case 8:this.$=new r.Param({name:i[s]});break;case 9:this.$=new r.Optional({},[i[s-1]]);break;case 10:this.$=t;break;case 11:case 12:this.$=t.slice(1)}},table:[{3:1,4:2,5:[1,3],6:4,7:5,8:6,9:7,10:8,11:e,13:n,14:r,15:o},{1:[3]},{5:[1,13],6:14,7:5,8:6,9:7,10:8,11:e,13:n,14:r,15:o},{1:[2,2]},t(i,[2,4]),t(i,[2,5]),t(i,[2,6]),t(i,[2,7]),t(i,[2,8]),{4:15,6:4,7:5,8:6,9:7,10:8,11:e,13:n,14:r,15:o},t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),{1:[2,1]},t(i,[2,3]),{6:14,7:5,8:6,9:7,10:8,11:e,12:[1,16],13:n,14:r,15:o},t(i,[2,9])],defaultActions:{3:[2,2],13:[2,1]},parseError:function(t,e){if(!e.recoverable){function n(t,e){this.message=t,this.hash=e}throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[null],o=[],i=this.table,a="",s=0,u=0,c=2,l=1,h=o.slice.call(arguments,1),f=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);f.setInput(t,d.yy),d.yy.lexer=f,d.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var _=f.yylloc;o.push(_);var m=f.options&&f.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,g,v,w,b,k,x,S,T=function(){var t;return"number"!=typeof(t=f.lex()||l)&&(t=e.symbols_[t]||t),t},P={};;){if(g=n[n.length-1],this.defaultActions[g]?v=this.defaultActions[g]:(null==y&&(y=T()),v=i[g]&&i[g][y]),void 0===v||!v.length||!v[0]){var E="";for(b in S=[],i[g])this.terminals_[b]&&b>c&&S.push("'"+this.terminals_[b]+"'");E=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(s+1)+": Unexpected "+(y==l?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(E,{text:f.match,token:this.terminals_[y]||y,line:f.yylineno,loc:_,expected:S})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+y);switch(v[0]){case 1:n.push(y),r.push(f.yytext),o.push(f.yylloc),n.push(v[1]),y=null,u=f.yyleng,a=f.yytext,s=f.yylineno,_=f.yylloc;break;case 2:if(k=this.productions_[v[1]][1],P.$=r[r.length-k],P._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},m&&(P._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(P,[a,u,s,d.yy,v[1],r,o].concat(h))))return w;k&&(n=n.slice(0,-1*k*2),r=r.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[v[1]][0]),r.push(P.$),o.push(P._$),x=i[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0}},s={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in o)this[i]=o[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;ie[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,o[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,o[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return"(";case 1:return")";case 2:return"SPLAT";case 3:return"PARAM";case 4:case 5:return"LITERAL";case 6:return"EOF"}},rules:[/^(?:\()/,/^(?:\))/,/^(?:\*+\w+)/,/^(?::+\w+)/,/^(?:[\w%\-~\n]+)/,/^(?:.)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};function u(){this.yy={}}return a.lexer=s,u.prototype=a,a.Parser=u,new u}();void 0!==Ee&&(e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)})}(Ce={path:void 0,exports:{},require:function(t,e){return Ee(null==e&&Ce.path)}},Ce.exports),Ce.exports);function De(t){return function(e,n){return{displayName:t,props:e,children:n||[]}}}Me.parser,Me.Parser,Me.parse;var Oe={Root:De("Root"),Concat:De("Concat"),Literal:De("Literal"),Splat:De("Splat"),Param:De("Param"),Optional:De("Optional")},Ae=Me.parser;Ae.yy=Oe;var Ne=Ae,Ue=Object.keys(Oe),je=function(t){return Ue.forEach((function(e){if(void 0===t[e])throw new Error("No handler defined for "+e.displayName)})),{visit:function(t,e){return this.handlers[t.displayName].call(this,t,e)},handlers:t}},We=/[\-{}\[\]+?.,\\\^$|#\s]/g;function Le(t){this.captures=t.captures,this.re=t.re}Le.prototype.match=function(t){var e=this.re.exec(t),n={};if(e)return this.captures.forEach((function(t,r){void 0===e[r+1]?n[t]=void 0:n[t]=decodeURIComponent(e[r+1])})),n};var Re=je({Concat:function(t){return t.children.reduce(function(t,e){var n=this.visit(e);return{re:t.re+n.re,captures:t.captures.concat(n.captures)}}.bind(this),{re:"",captures:[]})},Literal:function(t){return{re:t.props.value.replace(We,"\\$&"),captures:[]}},Splat:function(t){return{re:"([^?]*?)",captures:[t.props.name]}},Param:function(t){return{re:"([^\\/\\?]+)",captures:[t.props.name]}},Optional:function(t){var e=this.visit(t.children[0]);return{re:"(?:"+e.re+")?",captures:e.captures}},Root:function(t){var e=this.visit(t.children[0]);return new Le({re:new RegExp("^"+e.re+"(?=\\?|$)"),captures:e.captures})}}),Fe=je({Concat:function(t,e){var n=t.children.map(function(t){return this.visit(t,e)}.bind(this));return!n.some((function(t){return!1===t}))&&n.join("")},Literal:function(t){return decodeURI(t.props.value)},Splat:function(t,e){return!!e[t.props.name]&&e[t.props.name]},Param:function(t,e){return!!e[t.props.name]&&e[t.props.name]},Optional:function(t,e){return this.visit(t.children[0],e)||""},Root:function(t,e){e=e||{};var n=this.visit(t.children[0],e);return!!n&&encodeURI(n)}});function Ye(t){var e;if(e=this?this:Object.create(Ye.prototype),void 0===t)throw new Error("A route spec is required");return e.spec=t,e.ast=Ne.parse(t),e}Ye.prototype=Object.create(null),Ye.prototype.match=function(t){return Re.visit(this.ast).match(t)||!1},Ye.prototype.reverse=function(t){return Fe.visit(this.ast,t)};var Ie=Ye;Event.prototype.propagationPath=function(){var t=function(){var t=this.target||null,e=[t];if(!t||!t.parentElement)return[];for(;t.parentElement;)t=t.parentElement,e.unshift(t);return e}.bind(this);return this.path||this.composedPath&&this.composedPath()||t()};class qe extends d{handleClick(t,e){if(!t.defaultPrevented&&!t.ctrlKey)for(let e of t.propagationPath())if("A"===e.tagName){let n=e.pathname,r=e.origin,o=e.search,i=e.hash;if(r===window.location.origin)for(let e of this.props.routes){let r=window.location.pathname+window.location.search,a=n+o,s=a+i,u=new Ie(e.path);if("*"==e.path||u.match(s))return r!=a&&t.preventDefault(),void de(s)}}}render(){const t=[];for(let e in this.props.globals)t.push(l(this.props.globals[e],{ref:t=>t._persist(),key:e}));return l("div",{onClick:this.handleClick.bind(this)},[...t,...this.props.children])}}qe.displayName="Mint.Root";var He=t=>class{constructor(){this.root=document.createElement("div"),document.body.appendChild(this.root),this.routes=[],window.addEventListener("popstate",()=>{this.handlePopState()})}handlePopState(){for(let e of this.routes)if("*"===e.path)e.handler();else{let n=new Ie(e.path).match(window.location.pathname+window.location.search+window.location.hash);if(n)try{let r=e.mapping.map((r,o)=>{const i=n[r],a=e.decoders[o](i);if(a instanceof t.ok)return a._0;throw""});e.handler.apply(null,r);break}catch(t){}}}render(t,e){void 0!==t&&(O(l(qe,{routes:this.routes,globals:e},[l(t,{key:"$MAIN"})]),this.root),requestAnimationFrame(()=>{this.handlePopState()}))}addRoutes(t){this.routes=this.routes.concat(t)}};const $e=t=>{let e=JSON.stringify(t,"",2);return void 0===e&&(e="undefined"),((t,e=1,n)=>{if(n={indent:" ",includeEmptyLines:!1,...n},"string"!=typeof t)throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if("number"!=typeof e)throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if("string"!=typeof n.indent)throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n.indent}\``);if(0===e)return t;const r=n.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(r,n.indent.repeat(e))})(e)};class ze{constructor(t,e=[]){this.message=t,this.object=null,this.path=e}push(t){this.path.unshift(t)}toString(){const t=this.message.trim(),e=this.path.reduce((t,e)=>{if(t.length)switch(e.type){case"FIELD":return`${t}.${e.value}`;case"ARRAY":return`${t}[${e.value}]`}else switch(e.type){case"FIELD":return e.value;case"ARRAY":return"[$(item.value)]"}},"");return e.length&&this.object?t+"\n\n"+Xe.trim().replace("{value}",$e(this.object)).replace("{path}",e):t}}const Xe="\nThe input is in this object:\n\n{value}\n\nat: {path}\n",Be=t=>e=>{const{ok:n,err:r}=t;return"string"!=typeof e?new r(new ze("\nI was trying to decode the value:\n\n{value}\n\nas a String, but could not.\n".replace("{value}",$e(e)))):new n(e)},Ge=t=>e=>{const{ok:n,err:r}=t;let o=NaN;return o="number"==typeof e?new Date(e):Date.parse(e),Number.isNaN(o)?new r(new ze("\nI was trying to decode the value:\n\n{value}\n\nas a Time, but could not.\n".replace("{value}",$e(e)))):new n(new Date(o))},Qe=t=>e=>{const{ok:n,err:r}=t;let o=parseFloat(e);return isNaN(o)?new r(new ze("\nI was trying to decode the value:\n\n{value}\n\nas a Number, but could not.\n".replace("{value}",$e(e)))):new n(o)},Je=t=>e=>{const{ok:n,err:r}=t;return"boolean"!=typeof e?new r(new ze("\nI was trying to decode the value:\n\n{value}\n\nas a Bool, but could not.\n".replace("{value}",$e(e)))):new n(e)},Ve=t=>(e,n)=>{const{err:r,nothing:o}=t;return t=>{if(null==t||null==t||"object"!=typeof t||Array.isArray(t)){const n='\nI was trying to decode the field "{field}" from the object:\n\n{value}\n\nbut I could not because it\'s not an object.\n'.replace("{field}",e).replace("{value}",$e(t));return new r(new ze(n))}{const o=t[e],i=n(o);return i instanceof r&&(i._0.push({type:"FIELD",value:e}),i._0.object=t),i}}},Ke=t=>e=>n=>{const{ok:r,err:o}=t;if(!Array.isArray(n))return new o(new ze("\nI was trying to decode the value:\n\n{value}\n\nas an Array, but could not.\n".replace("{value}",$e(n))));let i=[],a=0;for(let t of n){let r=e(t);if(r instanceof o)return r._0.push({type:"ARRAY",value:a}),r._0.object=n,r;i.push(r._0),a++}return new r(i)},Ze=t=>e=>n=>{const{ok:r,just:o,nothing:i,err:a}=t;if(null==n||null==n)return new r(new i);{const t=e(n);return t instanceof a?t:new r(new o(t._0))}},tn=t=>e=>n=>{const{ok:r,err:o}=t;if(null==n||null==n||"object"!=typeof n||Array.isArray(n)){const t="\nI was trying to decode the value:\n\n{value}\n\nas a Map, but could not.\n".replace("{value}",$e(n));return new o(new ze(t))}{const t=[];for(let r in n){const i=e(n[r]);if(i instanceof o)return i;t.push([r,i._0])}return new r(t)}},en=t=>e=>new t.ok(e),nn=t=>t,rn=t=>+t,on=t=>e=>e.map(e=>t?t(e):e),an=t=>e=>{const n={};for(let r of e)n[r[0]]=t?t(r[1]):r[1];return n},sn=t=>e=>n=>n instanceof t.just?e?e(n._0):n._0:null;var un=t=>({maybe:sn(t),identity:nn,array:on,time:rn,map:an});class cn{constructor(){ye(this)}_d(t){ge(this,t)}}class ln{constructor(){ye(this),this.listeners=new Set,this.state={}}setState(t,e){this.state=Object.assign({},this.state,t);for(let t of this.listeners)t.forceUpdate();e()}_d(t){ge(this,t)}_subscribe(t){this.listeners.add(t)}_unsubscribe(t){this.listeners.delete(t)}}class hn{[se](t){if(!(t instanceof this.constructor))return!1;if(t.length!==this.length)return!1;for(let e=0;e{const e=(t=>({boolean:Je(t),object:en(t),number:Qe(t),string:Be(t),field:Ve(t),array:Ke(t),maybe:Ze(t),time:Ge(t),map:tn(t)}))(t);return{program:new(He(t)),normalizeEvent:me,insertStyles:pe,navigate:de,compare:ce,update:fe,array:ve,style:we,at:_e(t),EmbeddedProgram:ke,TestContext:xe,Component:Te,Provider:Pe,Module:cn,Store:ln,Decoder:e,Encoder:un(t),DateFNS:{format:re,startOfMonth:wt,startOfWeek:ht,startOfDay:pt,endOfMonth:bt,endOfWeek:xt,endOfDay:kt,addMonths:ct,eachDay:vt,distanceInWordsStrict:ae},Record:Record,Enum:hn,Nothing:t.nothing,Just:t.just,Err:t.err,Ok:t.ok,createRecord:he(e,t),createPortal:Z,createElement:l,React:{Fragment:f},ReactDOM:{unmountComponentAtNode:t=>O(null,t),render:O},Symbols:{Equals:se}}}}(); diff --git a/src/compilers/component.cr b/src/compilers/component.cr index bca3bc049..dc4da9387 100644 --- a/src/compilers/component.cr +++ b/src/compilers/component.cr @@ -110,7 +110,7 @@ module Mint def compile_component_store_data(node : Ast::Component) : Array(Codegen::Node) node.connects.reduce([] of Codegen::Node) do |memo, item| - store = ast.stores.find(&.name.==(item.store)) + store = ast.stores.find { |entity| entity.name == item.store } if store item.keys.map do |key| @@ -122,11 +122,11 @@ module Mint name = js.variable_of(key) case - when store.constants.any?(&.name.==(original)), - store.gets.any?(&.name.value.==(original)), + when store.constants.any? { |constant| constant.name == original }, + store.gets.any? { |get| get.name.value == original }, store.states.find(&.name.value.==(original)) memo << js.get(name, Codegen.join ["return ", store_name, ".", id, ";"]) - when store.functions.any?(&.name.value.==(original)) + when store.functions.any? { |func| func.name.value == original } memo << Codegen.join [name, " (...params) { return ", store_name, ".", id, "(...params); }"] end end @@ -193,7 +193,7 @@ module Mint function.keep_name = true if function # If the user defined the same function the code goes after it. - if function && !value.empty? + if function && value.any? compile function, js.statements(value) elsif !value.empty? js.function(key, %w[], js.statements(value)) diff --git a/src/compilers/html_attribute.cr b/src/compilers/html_attribute.cr index 1792ae938..d0afcccac 100644 --- a/src/compilers/html_attribute.cr +++ b/src/compilers/html_attribute.cr @@ -14,6 +14,8 @@ module Mint end when "ref" value = Codegen.join ["(ref => { ref ? ", value, ".call(this, ref) : null })"] + else + # ignore end if downcase_name == "readonly" && is_element diff --git a/src/compilers/module_access.cr b/src/compilers/module_access.cr index e0aac843c..713b75a0d 100644 --- a/src/compilers/module_access.cr +++ b/src/compilers/module_access.cr @@ -9,6 +9,8 @@ module Mint if node.variable.value == "subscriptions" return Codegen.join [name, "._subscriptions"] end + else + # ignore end variable = diff --git a/src/compilers/next_call.cr b/src/compilers/next_call.cr index adebf6430..4ee4aa684 100644 --- a/src/compilers/next_call.cr +++ b/src/compilers/next_call.cr @@ -16,6 +16,8 @@ module Mint entity .states .find(&.name.value.==(item.key.value)) + else + # ignore end if field diff --git a/src/compilers/parallel.cr b/src/compilers/parallel.cr index 1d10ec75a..fa007becc 100644 --- a/src/compilers/parallel.cr +++ b/src/compilers/parallel.cr @@ -31,7 +31,7 @@ module Mint if type.name.in?("Promise", "Result") && type.parameters[0] node .catches - .select(&.type.==(type.parameters[0].name)) + .select { |item| item.type == type.parameters[0].name } .map { |item| compile(item) } end else @@ -73,7 +73,11 @@ module Mint "") end end + else + # ignore end + else + # ignore end || js.asynciif do prefix.call(Codegen.join ["await ", expression]) end @@ -107,6 +111,8 @@ module Mint target.parameters.map do |variable| js.let(Codegen.symbol_mapped(variable, js.variable_of(variable)), "null") end + else + # ignore end end.flatten.compact diff --git a/src/compilers/sequence.cr b/src/compilers/sequence.cr index 7fb2d7c14..f7258f3af 100644 --- a/src/compilers/sequence.cr +++ b/src/compilers/sequence.cr @@ -39,7 +39,7 @@ module Mint if type.name.in?("Promise", "Result") && type.parameters[0] node .catches - .select(&.type.==(type.parameters[0].name)) + .select { |item| item.type == type.parameters[0].name } .map { |item| compile(item) } else [] of Codegen::Node @@ -83,7 +83,11 @@ module Mint end.as(Codegen::Node) prefix.call(Codegen.join ["await ", try]) end + else + # ignore end + else + # ignore end || prefix.call(Codegen.join ["await ", expression]) end diff --git a/src/compilers/test.cr b/src/compilers/test.cr index 9fc184ee7..a33f01786 100644 --- a/src/compilers/test.cr +++ b/src/compilers/test.cr @@ -33,6 +33,8 @@ module Mint })(constants)", ] end + else + # ignore end expression = compile raw_expression unless expression diff --git a/src/compilers/top_level.cr b/src/compilers/top_level.cr index 0f5afadba..b0b217d2c 100644 --- a/src/compilers/top_level.cr +++ b/src/compilers/top_level.cr @@ -202,7 +202,7 @@ module Mint const _normalizeEvent = function (event) { return JS1 - ), + ) + " ", from_event_call, ( <<-JS2 diff --git a/src/compilers/try.cr b/src/compilers/try.cr index 0744af4b8..a3932384d 100644 --- a/src/compilers/try.cr +++ b/src/compilers/try.cr @@ -71,6 +71,8 @@ module Mint js.statements(catched.compact) end end + else + # ignore end if catches && !Codegen.empty?(catches) diff --git a/src/compilers/variable.cr b/src/compilers/variable.cr index c76fba585..2ec33df26 100644 --- a/src/compilers/variable.cr +++ b/src/compilers/variable.cr @@ -21,6 +21,8 @@ module Mint when Ast::State then entity.name.value when Ast::Get then entity.name.value when Ast::Constant then entity.name + else + # ignore end if store @@ -35,6 +37,8 @@ module Mint end end end + else + # ignore end result = diff --git a/src/formatters/function.cr b/src/formatters/function.cr index e8edb3c62..c07eb3eec 100644 --- a/src/formatters/function.cr +++ b/src/formatters/function.cr @@ -17,7 +17,7 @@ module Mint value = format node.arguments - if value.sum { |string| replace_skipped(string).size } > 50 + if value.map { |string| replace_skipped(string) }.map(&.size).sum > 50 "(\n#{indent(value.join(",\n"))}\n)" else "(#{value.join(", ")})" diff --git a/src/formatters/if.cr b/src/formatters/if.cr index f30589dec..3cc579823 100644 --- a/src/formatters/if.cr +++ b/src/formatters/if.cr @@ -29,6 +29,8 @@ module Mint list falsy_item + node.falsy_head_comments + node.falsy_tail_comments when Ast::Node list [falsy_item] + node.falsy_head_comments + node.falsy_tail_comments + else + # ignore end " else {\n#{indent(body)}\n}" if body diff --git a/src/formatters/inline_function.cr b/src/formatters/inline_function.cr index 497b76232..cab06eecd 100644 --- a/src/formatters/inline_function.cr +++ b/src/formatters/inline_function.cr @@ -8,7 +8,7 @@ module Mint format node.arguments arguments = - if value.sum { |string| replace_skipped(string).size } > 50 + if value.map { |string| replace_skipped(string) }.map(&.size).sum > 50 "\n#{indent(value.join(",\n"))}\n" else value.join(", ") diff --git a/src/formatters/style.cr b/src/formatters/style.cr index d8b892368..f07a64844 100644 --- a/src/formatters/style.cr +++ b/src/formatters/style.cr @@ -12,7 +12,9 @@ module Mint value = format node.arguments - if value.sum { |string| replace_skipped(string).size } > 50 + if value + .map { |string| replace_skipped(string) } + .map(&.size).sum > 50 "(\n#{indent(value.join(",\n"))}\n) " else "(#{value.join(", ")}) " diff --git a/src/installer.cr b/src/installer.cr index e5d7d3b90..d9ba6f2ea 100644 --- a/src/installer.cr +++ b/src/installer.cr @@ -141,10 +141,8 @@ module Mint unless @resolved[dependency]? eliminated = @eliminated - .select(&.[0][:name].==(dependency)) - .map do |item| - "#{item[0][:version]} by #{item[2]} from #{item[1][:name]}:#{item[1][:version]}" - end + .select { |item| item[0][:name] == dependency } + .map { |item| "#{item[0][:version]} by #{item[2]} from #{item[1][:name]}:#{item[1][:version]}" } raise InstallerFailedToInstall, { "package" => "#{base[:name]}:#{base[:version]}", diff --git a/src/js.cr b/src/js.cr index 8cf61edaa..68d63b5f9 100644 --- a/src/js.cr +++ b/src/js.cr @@ -316,6 +316,8 @@ module Mint case node when Ast::Function return node.name.value if node.keep_name? + else + # ignore end @cache[node] ||= next_variable diff --git a/src/message.cr b/src/message.cr index 04c721695..95b87ab26 100644 --- a/src/message.cr +++ b/src/message.cr @@ -341,9 +341,13 @@ module Mint bold item.value when Code code item.value + else + # ignore end end end + else + # ignore end end diff --git a/src/messages/installer_failed_to_install.cr b/src/messages/installer_failed_to_install.cr index 5f690607d..53e5cca20 100644 --- a/src/messages/installer_failed_to_install.cr +++ b/src/messages/installer_failed_to_install.cr @@ -29,5 +29,7 @@ message InstallerFailedToInstall do bold name end end + else + # ignore end end diff --git a/src/parsers/case.cr b/src/parsers/case.cr index 8d9a58fa9..ba9e47a1a 100644 --- a/src/parsers/case.cr +++ b/src/parsers/case.cr @@ -39,6 +39,8 @@ module Mint branches << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/parsers/component.cr b/src/parsers/component.cr index 2465839b2..d92f774af 100644 --- a/src/parsers/component.cr +++ b/src/parsers/component.cr @@ -73,6 +73,8 @@ module Mint gets << item when Ast::Use uses << item + else + # ignore end end diff --git a/src/parsers/enum.cr b/src/parsers/enum.cr index a6e637fe7..f9d325c0e 100644 --- a/src/parsers/enum.cr +++ b/src/parsers/enum.cr @@ -45,6 +45,8 @@ module Mint options << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/parsers/module.cr b/src/parsers/module.cr index e31c120d5..d5ea05f09 100644 --- a/src/parsers/module.cr +++ b/src/parsers/module.cr @@ -32,6 +32,8 @@ module Mint constants << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/parsers/parallel.cr b/src/parsers/parallel.cr index b71af925d..a730dfe6c 100644 --- a/src/parsers/parallel.cr +++ b/src/parsers/parallel.cr @@ -40,6 +40,8 @@ module Mint statements << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/parsers/provider.cr b/src/parsers/provider.cr index e854f471f..cae62b017 100644 --- a/src/parsers/provider.cr +++ b/src/parsers/provider.cr @@ -53,6 +53,8 @@ module Mint comments << item when Ast::Get gets << item + else + # ignore end end diff --git a/src/parsers/routes.cr b/src/parsers/routes.cr index dfbf18807..7edd77c00 100644 --- a/src/parsers/routes.cr +++ b/src/parsers/routes.cr @@ -29,6 +29,8 @@ module Mint routes << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/parsers/sequence.cr b/src/parsers/sequence.cr index 2d4aaa9c0..422748c3a 100644 --- a/src/parsers/sequence.cr +++ b/src/parsers/sequence.cr @@ -37,6 +37,8 @@ module Mint statements << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/parsers/store.cr b/src/parsers/store.cr index e970397e4..cd5c39d28 100644 --- a/src/parsers/store.cr +++ b/src/parsers/store.cr @@ -45,6 +45,8 @@ module Mint states << item when Ast::Get gets << item + else + # ignore end end diff --git a/src/parsers/suite.cr b/src/parsers/suite.cr index 62229f7a8..f920dcb4c 100644 --- a/src/parsers/suite.cr +++ b/src/parsers/suite.cr @@ -41,6 +41,8 @@ module Mint constants << item when Ast::Test tests << item + else + # ignore end end diff --git a/src/parsers/top_level.cr b/src/parsers/top_level.cr index 13afcc1b6..55395695d 100644 --- a/src/parsers/top_level.cr +++ b/src/parsers/top_level.cr @@ -51,6 +51,8 @@ module Mint @ast.enums << item when Ast::Comment @ast.comments << item + else + # ignore end end end diff --git a/src/parsers/try.cr b/src/parsers/try.cr index 9a728b41e..05a6b9cfd 100644 --- a/src/parsers/try.cr +++ b/src/parsers/try.cr @@ -36,6 +36,8 @@ module Mint statements << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/parsers/where.cr b/src/parsers/where.cr index add74a6a5..938e832d0 100644 --- a/src/parsers/where.cr +++ b/src/parsers/where.cr @@ -29,6 +29,8 @@ module Mint statements << item when Ast::Comment comments << item + else + # ignore end end diff --git a/src/style_builder.cr b/src/style_builder.cr index e2f40b8a0..458a5d2da 100644 --- a/src/style_builder.cr +++ b/src/style_builder.cr @@ -272,6 +272,8 @@ module Mint when Ast::If ifs[{style_node, selector}] ||= [] of Ast::If ifs[{style_node, selector}] << item + else + # ignore end end end diff --git a/src/test_runner.cr b/src/test_runner.cr index 234bb460d..bb6cb88e5 100644 --- a/src/test_runner.cr +++ b/src/test_runner.cr @@ -344,6 +344,8 @@ module Mint when "FAILED" @reporter.failed data.name, data.result @failed << data + else + # ignore end end end diff --git a/src/type_checkers/case.cr b/src/type_checkers/case.cr index 472427b83..ecb1d6711 100644 --- a/src/type_checkers/case.cr +++ b/src/type_checkers/case.cr @@ -110,6 +110,8 @@ module Mint "node" => node, } end + else + # ignore end first diff --git a/src/type_checkers/case_branch.cr b/src/type_checkers/case_branch.cr index 7498ce8fe..130a3133f 100644 --- a/src/type_checkers/case_branch.cr +++ b/src/type_checkers/case_branch.cr @@ -52,6 +52,8 @@ module Mint {variable.value, condition.parameters[0], variable} when Ast::Spread {variable.variable.value, condition, variable.variable} + else + # ignore end end diff --git a/src/type_checkers/component.cr b/src/type_checkers/component.cr index e97a1a6f2..ebb97c106 100644 --- a/src/type_checkers/component.cr +++ b/src/type_checkers/component.cr @@ -203,6 +203,8 @@ module Mint "node" => function, "got" => type, } unless Comparer.compare(type, VOID_FUNCTION) + else + # ignore end end end diff --git a/src/type_checkers/enum.cr b/src/type_checkers/enum.cr index f6a02b1d6..d447b9f21 100644 --- a/src/type_checkers/enum.cr +++ b/src/type_checkers/enum.cr @@ -42,6 +42,8 @@ module Mint } unless param used_parameters.add param + else + # ignore end end end diff --git a/src/type_checkers/enum_id.cr b/src/type_checkers/enum_id.cr index ab7678e5e..4e82c735e 100644 --- a/src/type_checkers/enum_id.cr +++ b/src/type_checkers/enum_id.cr @@ -73,6 +73,8 @@ module Mint end when Variable extracted[node.name] = Comparer.prune(node) + else + # ignore end extracted diff --git a/src/type_checkers/js.cr b/src/type_checkers/js.cr index e74a4718d..33fa150e0 100644 --- a/src/type_checkers/js.cr +++ b/src/type_checkers/js.cr @@ -5,6 +5,8 @@ module Mint case item when Ast::Node resolve item + else + # ignore end end diff --git a/src/type_checkers/next_call.cr b/src/type_checkers/next_call.cr index f0337ade2..7d9d4ecab 100644 --- a/src/type_checkers/next_call.cr +++ b/src/type_checkers/next_call.cr @@ -28,6 +28,8 @@ module Mint entity .states .find(&.name.value.==(item.key.value)) + else + # ignore end raise NextCallStateNotFound, { diff --git a/src/type_checkers/scope.cr b/src/type_checkers/scope.cr index c90507c6d..a646251ca 100644 --- a/src/type_checkers/scope.cr +++ b/src/type_checkers/scope.cr @@ -89,8 +89,8 @@ module Mint def current_top_level_entity? @levels.find do |item| - item.is_a?(Ast::Store) || - item.is_a?(Ast::Provider) || + item.is_a?(Ast::Store) || 0 + item.is_a?(Ast::Provider) || item.is_a?(Ast::Component) end.as(Ast::Node?) end @@ -123,6 +123,8 @@ module Mint target.parameters.find(&.value.==(variable)).try do |item| {node, target.parameters.index(item).not_nil!} end + else + # ignore end end @@ -134,6 +136,8 @@ module Mint target.parameters.find(&.value.==(variable)).try do |item| {node, target.parameters.index(item).not_nil!} end + else + # ignore end end @@ -195,6 +199,8 @@ module Mint case node when Ast::Function, Ast::Get @functions[node]? + else + # ignore end if node.is_a?(Ast::Component) || @@ -238,6 +244,8 @@ module Mint end when Ast::HtmlElement memo[variable.value] = item + else + # ignore end memo diff --git a/src/type_checkers/statement.cr b/src/type_checkers/statement.cr index e51f101a7..8f68ceb93 100644 --- a/src/type_checkers/statement.cr +++ b/src/type_checkers/statement.cr @@ -21,6 +21,8 @@ module Mint "got" => type, } if type.parameters.size < target.parameters.size end + else + # ignore end types[node] = type diff --git a/src/type_checkers/string_literal.cr b/src/type_checkers/string_literal.cr index 80bc3b2ab..d0a160dc9 100644 --- a/src/type_checkers/string_literal.cr +++ b/src/type_checkers/string_literal.cr @@ -14,6 +14,8 @@ module Mint "got" => item_type, "node" => item, } unless Comparer.matches_any?(item_type, [STRING, NUMBER]) + else + # ignore end end