1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[173],{5173:(e,t,n)=>{n.r(t),n.d(t,{GitHubCalendar:()=>d});var r=n(2115),a=n(9221),o=n(5155);let l={light:["#ebedf0","#9be9a8","#40c463","#30a14e","#216e39"],dark:["#161b22","#0e4429","#006d32","#26a641","#39d353"]},i=e=>"[object Object]"===Object.prototype.toString.call(e);async function c(e,t){let n=await fetch("".concat("https://github-contributions-api.jogruber.de/v4/").concat(e,"?y=").concat(String(t))),r=await n.json();if(!n.ok)throw Error('Fetching GitHub contribution data for "'.concat(e,'" failed: ').concat(r.error));return r}let d=(0,r.forwardRef)((e,t)=>{var n;let{username:d,year:s="last",labels:u,transformData:f,throwOnError:h=!1,errorMessage:m='Error â Fetching GitHub contribution data for "'.concat(d,'" failed.'),...g}=e,[p,v]=(0,r.useState)(null),[y,w]=(0,r.useState)(!1),[x,b]=(0,r.useState)(null),S=(0,r.useCallback)(()=>{w(!0),b(null),c(d,s).then(v).catch(e=>{e instanceof Error&&b(e)}).finally(()=>{w(!1)})},[d,s]);if((0,r.useEffect)(S,[S]),x)if(!h)return(0,o.jsx)("div",{children:m});else throw x;if(y||!p)return(0,o.jsx)(a.A,{...g,data:[],loading:!0});let D=null!=(n=g.theme)?n:l;return(0,o.jsx)(a.A,{data:((e,t)=>{if("function"!=typeof t)return e;let n=t(e);if(!Array.isArray(n))throw Error("transformData() function must return a list of Activity objects.");for(let e of n){if(!i(e))throw Error("transformData() must return a list of valid Activity objects.");if("number"!=typeof e.count||e.count<0)throw Error('Required property "count: number" missing or invalid. Got: '.concat(e.count));if("string"!=typeof e.date||!/\d{4}-\d{2}-\d{2}/.test(e.date))throw Error('Required property "date: YYYY-MM-DD" missing or invalid. Got: '.concat(e.date));if("number"!=typeof e.level||e.level<0||e.level>4)throw Error('Required property "level: 0 | 1 | 2 | 3 | 4" missing or invalid: Got: '.concat(e.level,"."))}return n})(p.contributions,f),labels:Object.assign({},{totalCount:"{{count}} contributions in ".concat("last"===s?"the last year":"{{year}}")},u),ref:t,...g,theme:D,loading:!!g.loading||y,maxLevel:4})});d.displayName="GitHubCalendar"},9221:(e,t,n)=>{n.d(t,{A:()=>z,g:()=>T});var r=n(2115);let a=Symbol.for("constructDateFrom");function o(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&a in e?e[a](t):e instanceof Date?new e.constructor(t):new Date(t)}function l(e,t){return o(t||e,e)}function i(e,t){var n;let r,a,i=()=>o(null==t?void 0:t.in,NaN),p=null!=(n=null==t?void 0:t.additionalDigits)?n:2,v=function(e){let t,n={},r=e.split(c.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],c.timeZoneDelimiter.test(n.date)&&(n.date=e.split(c.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){let e=c.timezone.exec(t);e?(n.time=t.replace(e[1],""),n.timezone=e[1]):n.time=t}return n}(e);if(v.date){let e=function(e,t){let n=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};let a=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:null===o?a:100*o,restDateString:e.slice((r[1]||r[2]).length)}}(v.date,p);r=function(e,t){var n,r,a,o,l,i,c;if(null===t)return new Date(NaN);let s=e.match(d);if(!s)return new Date(NaN);let u=!!s[4],h=f(s[1]),p=f(s[2])-1,v=f(s[3]),y=f(s[4]),w=f(s[5])-1;if(u){return(n=y,r=w,n>=1&&n<=53&&r>=0&&r<=6)?function(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let a=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+((t-1)*7+n+1-a)),r}(t,y,w):new Date(NaN)}{let e=new Date(0);return(a=t,o=p,l=v,o>=0&&o<=11&&l>=1&&l<=(m[o]||(g(a)?29:28))&&(i=t,(c=h)>=1&&c<=(g(i)?366:365)))?(e.setUTCFullYear(t,p,Math.max(h,v)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!r||isNaN(+r))return i();let y=+r,w=0;if(v.time&&isNaN(w=function(e){var t,n,r;let a=e.match(s);if(!a)return NaN;let o=h(a[1]),l=h(a[2]),i=h(a[3]);return(t=o,n=l,r=i,24===t?0===n&&0===r:r>=0&&r<60&&n>=0&&n<60&&t>=0&&t<25)?36e5*o+6e4*l+1e3*i:NaN}(v.time)))return i();if(v.timezone){if(isNaN(a=function(e){var t;if("Z"===e)return 0;let n=e.match(u);if(!n)return 0;let r="+"===n[1]?-1:1,a=parseInt(n[2]),o=n[3]&&parseInt(n[3])||0;return(t=o)>=0&&t<=59?r*(36e5*a+6e4*o):NaN}(v.timezone)))return i()}else{let e=new Date(y+w),n=l(0,null==t?void 0:t.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return l(y+w+a,null==t?void 0:t.in)}
1let c={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},d=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,s=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,u=/^([+-])(\d{2})(?::?(\d{2}))?$/;function f(e){return e?parseInt(e):1}function h(e){return e&&parseFloat(e.replace(",","."))||0}let m=[31,null,31,30,31,30,31,31,30,31,30,31];function g(e){return e%400==0||e%4==0&&e%100!=0}function p(e,t){return l(e,null==t?void 0:t.in).getDay()}function v(e,t,n){let r=l(e,null==n?void 0:n.in);return isNaN(t)?o((null==n?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function y(e){let t=l(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-n}function w(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let a=o.bind(null,e||n.find(e=>"object"==typeof e));return n.map(a)}function x(e,t){let n=l(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function b(e,t){var n;let{start:r,end:a}=function(e,t){let[n,r]=w(e,t.start,t.end);return{start:n,end:r}}(null==t?void 0:t.in,e),l=+r>+a,i=l?+r:+a,c=l?a:r;c.setHours(0,0,0,0);let d=null!=(n=null==t?void 0:t.step)?n:1;if(!d)return[];d<0&&(d=-d,l=!l);let s=[];for(;+c<=i;)s.push(o(r,c)),c.setDate(c.getDate()+d),c.setHours(0,0,0,0);return l?s.reverse():s}function S(e,t){let n=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+n}function D(e,t){var n,r;let a=l(e,null==t?void 0:t.in);if(isNaN(+a))throw RangeError("Invalid time value");let o=null!=(n=null==t?void 0:t.format)?n:"extended",i=null!=(r=null==t?void 0:t.representation)?r:"complete",c="",d="",s="extended"===o?"-":"";if("time"!==i){let e=S(a.getDate(),2),t=S(a.getMonth()+1,2),n=S(a.getFullYear(),4);c="".concat(n).concat(s).concat(t).concat(s).concat(e)}if("date"!==i){let e=a.getTimezoneOffset();if(0!==e){let t=Math.abs(e),n=S(Math.trunc(t/60),2),r=S(t%60,2);d="".concat(e<0?"+":"-").concat(n,":").concat(r)}else d="Z";let t=S(a.getHours(),2),n=S(a.getMinutes(),2),r=S(a.getSeconds(),2),l=""===c?"":"T",i=[t,n,r].join("extended"===o?":":"");c="".concat(c).concat(l).concat(i).concat(d)}return c}var N=n(5155);let k="react-activity-calendar",j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],E={months:j,weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],totalCount:"{{count}} activities in {{year}}",legend:{less:"Less",more:"More"}},C="(prefers-color-scheme: dark)",M="".concat(k,"--loading-animation"),L="(prefers-reduced-motion: reduce)";function T(e){return"".concat(k,"__").concat(e)}function F(e,t){let n=void 0===t?0:e,r=null!=t?t:e;if(r<=n)throw RangeError("Invalid range: to must be greater than from");return Array.from({length:r-n},(e,t)=>n+t)}let A={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function I(e,t){let[n,r,a]=e,{minLevel:o,maxLevel:l}=t;return F(o,l+1).map(e=>{if(e<0){if(e===o)return n;let t=(1-e/o)*100;return"color-mix(in oklab, ".concat(r," ").concat(parseFloat(t.toFixed(2)),"%, ").concat(n,")")}return 0===e?r:e===l?a:"color-mix(in oklab, ".concat(a," ").concat(parseFloat((e/l*100).toFixed(2)),"%, ").concat(r,")")})}function U(e){return 2===e.length}function R(e){return 3===e.length}let Y={container:e=>({width:"max-content",maxWidth:"100%",display:"flex",flexDirection:"column",gap:"8px",fontSize:"".concat(e,"px")}),scrollContainer:e=>({maxWidth:"100%",overflowX:"auto",overflowY:"hidden",paddingTop:Math.ceil(.1*e)}),calendar:{display:"block",overflow:"visible"},rect:e=>({stroke:"light"===e?"rgba(0, 0, 0, 0.08)":"rgba(255, 255, 255, 0.04)"}),footer:{container:{display:"flex",flexWrap:"wrap",gap:"4px 16px",whiteSpace:"nowrap"},legend:{marginLeft:"auto",display:"flex",alignItems:"center",gap:"3px"}}},H=(0,r.lazy)(()=>Promise.all([n.e(545),n.e(7)]).then(n.bind(n,3580)).then(e=>({default:e.Tooltip}))),z=(0,r.forwardRef)((e,t)=>{let{data:n,blockMargin:a=4,blockRadius:o=2,blockSize:c=12,className:d,colorScheme:s,fontSize:u=14,labels:f,loading:h=!1,minLevel:m=0,maxLevel:g=4,renderBlock:S,renderColorLegend:z,showColorLegend:G=!0,showMonthLabels:O=!0,showTotalCount:Z=!0,showWeekdayLabels:W=!1,style:_={},theme:B,tooltips:$={},weekStart:q=0}=e,[J,P]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{P(!0)},[]),m>=g)throw RangeError("Minimum activity level must be less than maximum level. Got ".concat(m," and ").concat(g,"."));let X={minLevel:m,maxLevel:g},K=function(e){var t,n,r;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{minLevel:0,maxLevel:4}
1,o={light:I(["hsl(0, 0%, 26%)","hsl(0, 0%, 92%)","hsl(0, 0%, 26%)"],t=a),dark:I(["hsl(0, 0%, 92%)","hsl(0, 0%, 22%)","hsl(0, 0%, 92%)"],t)};if(e){return function(e,t){let n="The number of colors must match the number of activity levels controlled by the `minLevel` and `maxLevel` properties.";if("object"!=typeof e||void 0===e.light&&void 0===e.dark)throw Error('The theme object must contain at least one of the fields "light" and "dark" with exactly 2 or '.concat(t," colors respectively. ").concat(n));if(e.light){let{length:r}=e.light;if(2!==r&&3!==r&&r!==t)throw Error("theme.light must contain exactly 2 or 3 or ".concat(t," colors, ").concat(r," passed. ").concat(n));for(let t of e.light)if("undefined"!=typeof window&&!CSS.supports("color",t))throw Error('Invalid color "'.concat(t,'" passed. All CSS color formats are accepted.'))}if(e.dark){let{length:r}=e.dark;if(2!==r&&3!==r&&r!==t)throw Error("theme.dark must contain exactly 2 or 3 or ".concat(t," colors, ").concat(r," passed. ").concat(n));for(let t of e.dark)if("undefined"!=typeof window&&!CSS.supports("color",t))throw Error('Invalid color "'.concat(t,'" passed. All CSS color formats are accepted.'))}}(e,a.maxLevel-a.minLevel+1),e.light=null!=(n=e.light)?n:o.light,e.dark=null!=(r=e.dark)?r:o.dark,{light:U(e.light)?I([e.light[1],e.light[0],e.light[1]],a):R(e.light)?I(e.light,a):e.light,dark:U(e.dark)?I([e.dark[1],e.dark[0],e.dark[1]],a):R(e.dark)?I(e.dark,a):e.dark}}return o}(B,X),Q=function(){let[e,t]=(0,r.useState)(()=>"undefined"==typeof window?"light":window.matchMedia(C).matches?"dark":"light"),n=e=>{t(e.matches?"dark":"light")};return(0,r.useEffect)(()=>{let e=window.matchMedia(C);return t(e.matches?"dark":"light"),e.addEventListener("change",n),()=>{e.removeEventListener("change",n)}},[]),e}(),V=null!=s?s:Q,ee=K[V],et=function(e,t){let[n,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let n="oklab(from ".concat(e," l a b)"),r="light"===t?"oklab(from ".concat(e," calc(l * 0.96) a b)"):"oklab(from ".concat(e," calc(l * 1.08) a b)"),o=document.createElement("style");o.innerHTML="\n @keyframes ".concat(M," {\n 0% {\n fill: ").concat(n,";\n }\n 50% {\n fill: ").concat(r,";\n }\n 100% {\n fill: ").concat(n,";\n }\n }\n ");let l=()=>{a(!0)};return document.head.appendChild(o),o.addEventListener("load",l),()=>{document.head.removeChild(o),o.removeEventListener("load",l),a(!1)}},[e,t]),n}(ee[0],V),en=!function(){let[e,t]=(0,r.useState)(()=>"undefined"==typeof window||window.matchMedia(L).matches);return(0,r.useEffect)(()=>{let e=window.matchMedia(L);t(e.matches);let n=e=>{t(e.matches)};return e.addEventListener("change",n),()=>{e.removeEventListener("change",n)}},[]),e}();if(h){if(en&&!et)return null;n=function(){let e=new Date().getFullYear();return b({start:new Date(e,0,1),end:new Date(e,11,31)}).map(e=>({date:D(e,{representation:"date"}),count:0,level:0}))}()}!function(e,t){let{minLevel:n,maxLevel:r}=t;if(0===e.length)throw Error("Activity data must not be empty.");for(let{date:t,level:a}of e){if(!function(e){return!(!(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof e||isNaN(+l(e)))}(i(t)))throw Error("Activity date '".concat(t,"' is not a valid ISO 8601 date string."));if(a<n||a>r)throw RangeError("Activity level ".concat(a," for ").concat(t," is out of range. It must be between ").concat(n," and ").concat(r,"."))}}(n,X);let er=l(i(n[0].date),void 0).getFullYear(),ea=function(e){var t,n,r;let a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,l=function(e){let t=new Map(e.map(e=>[e.date,e])),n=e[0],r=e[e.length-1];return b({start:i(n.date),end:i(r.date)}).map(e=>{let n=D(e,{representation:"date"});return t.has(n)?t.get(n):{date:n,count:0,level:0}})}(e),c=i(l[0].date),d=p(c)===o?c:(n=((a=o-p(c,void 0))<=0&&(a+=7),v(c,a,t)),r=0,v(n,-7,void 0)),s=[...Array(function(e,t,n){let[r,a]=w(void 0,e,t),o=x(r),l=x(a);return Math.round((o-y(o)-(l-y(l)))/864e5)}(c,d)).fill(void 0),...l];return F(Math.ceil(s.length/7)).map(e=>s.slice(7*e,7*e+7))}(n,q),eo=Object.assign({},E,f),el=O?u+8:0,ei=function(e,t){if(!e)return{byDayIndex:()=>!1,shouldShow:!1};if(!0===e)return{byDayIndex:e=>(7+e-t)%7%2!=0,shouldShow:!0}
1;let n=[];for(let t of e)n[A[t.toLowerCase()]]=!0;return{byDayIndex:e=>{var t;return null!=(t=n[e])&&t},shouldShow:e.length>0}}(W,q),ec=J&&ei.shouldShow?function(e,t,n){if(7!==e.length)throw Error("Exactly 7 labels, one for each weekday must be passed.");return e.reduce((e,r,a)=>t.byDayIndex(a)?Math.max(e,Math.ceil(function(e,t){if("undefined"==typeof document||"undefined"==typeof window)return{width:0,height:0};if(t<1)throw RangeError("fontSize must be positive");if(0===e.length)return{width:0,height:0};let n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg");r.style.position="absolute",r.style.visibility="hidden",r.style.fontFamily=window.getComputedStyle(document.body).fontFamily,r.style.fontSize="".concat(t,"px");let a=document.createElementNS(n,"text");a.textContent=e,r.appendChild(a),document.body.appendChild(r);let o=a.getBBox();return document.body.removeChild(r),{width:o.width,height:o.height}}(r,n).width)):e,0)}(eo.weekdays,ei,u)+8:void 0,{width:ed,height:es}={width:ea.length*(c+a)-a,height:el+(c+a)*7-a};return(0,N.jsxs)("article",{ref:t,className:"".concat(k," ").concat(null!=d?d:"").trim(),style:{..._,...Y.container(u)},children:[(0,N.jsx)("div",{className:T("scroll-container"),style:Y.scrollContainer(u),children:(0,N.jsxs)("svg",{width:ed,height:es,viewBox:"0 0 ".concat(ed," ").concat(es),className:T("calendar"),style:{...Y.calendar,marginLeft:ec},children:[!h&&(ei.shouldShow?(0,N.jsx)("g",{className:T("legend-weekday"),children:F(7).map(e=>{let t=(e+q)%7;return ei.byDayIndex(t)?(0,N.jsx)("text",{x:-8,y:el+(c+a)*e+c/2,dominantBaseline:"central",textAnchor:"end",fill:"currentColor",children:eo.weekdays[t]},e):null})}):null),!h&&(O?(0,N.jsx)("g",{className:T("legend-month"),children:(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j;return e.reduce((e,n,r)=>{let a=n.find(e=>void 0!==e);if(!a)throw Error("Unexpected error: Week ".concat(r+1," is empty."));let o=t[l(i(a.date),void 0).getMonth()];if(!o){let e=new Date(a.date).toLocaleString("en-US",{month:"short"});throw Error("Unexpected error: undefined month label for ".concat(e,"."))}let c=e[e.length-1];return 0===r||(null==c?void 0:c.label)!==o?[...e,{weekIndex:r,label:o}]:e},[]).filter((t,n,r)=>{let{weekIndex:a}=t;return 0===n?r[1]&&r[1].weekIndex-a>=3:n!==r.length-1||e.slice(a).length>=3})})(ea,eo.months).map(e=>{let{label:t,weekIndex:n}=e;return(0,N.jsx)("text",{x:(c+a)*n,y:0,dominantBaseline:"hanging",fill:"
1currentColor",children:t},n)})}):null),ea.map((e,t)=>e.map((e,n)=>{var l;if(!e)return null;let i=(0,N.jsx)("rect",{x:0,y:el+(c+a)*n,width:c,height:c,rx:o,ry:o,fill:ee[e.level-m],"data-date":e.date,"data-level":e.level,style:{...Y.rect(V),...h&&en?{animation:"".concat(M," 1.75s ease-in-out infinite"),animationDelay:"".concat(20*t+20*n,"ms")}:void 0}}),d=S?S(i,e):i;return(0,N.jsx)(r.Fragment,{children:$.activity?(0,N.jsx)(r.Suspense,{fallback:d,children:(0,N.jsx)(H,{text:$.activity.text(e),colorScheme:V,placement:null!=(l=$.activity.placement)?l:"top",hoverRestMs:$.activity.hoverRestMs,offset:$.activity.offset,transitionStyles:$.activity.transitionStyles,withArrow:$.activity.withArrow,children:d})}):d},e.date)})).map((e,t)=>(0,N.jsx)("g",{transform:"translate(".concat((c+a)*t,", 0)"),children:e},t))]})}),function(){if(!Z&&!G)return null;let e=n.reduce((e,t)=>e+t.count,0);return(0,N.jsxs)("footer",{className:T("footer"),style:{...Y.footer.container,marginLeft:ec},children:[h&&(0,N.jsx)("div",{children:"\xa0"}),!h&&Z&&(0,N.jsx)("div",{className:T("count"),children:eo.totalCount?eo.totalCount.replace("{{count}}",String(e)).replace("{{year}}",String(er)):"".concat(e," activities in ").concat(er)}),!h&&G&&(0,N.jsxs)("div",{className:T("legend-colors"),style:Y.footer.legend,children:[eo.legend.less&&(0,N.jsx)("span",{style:{marginRight:"0.4em"},children:eo.legend.less}),F(m,g+1).map(e=>{var t;let n=(0,N.jsx)("svg",{width:c,height:c,children:(0,N.jsx)("rect",{width:c,height:c,fill:ee[e-m],rx:o,ry:o,style:Y.rect(V)})},e),a=z?z(n,e):n;return(0,N.jsx)(r.Fragment,{children:$.colorLegend?(0,N.jsx)(r.Suspense,{fallback:a,children:(0,N.jsx)(H,{text:$.colorLegend.text(e),colorScheme:V,placement:null!=(t=$.colorLegend.placement)?t:"bottom",hoverRestMs:$.colorLegend.hoverRestMs,offset:$.colorLegend.offset,transitionStyles:$.colorLegend.transitionStyles,withArrow:$.colorLegend.withArrow,children:a})}):a},e)}),eo.legend.more&&(0,N.jsx)("span",{style:{marginLeft:"0.4em"},children:eo.legend.more})]})]})}()]})});z.displayName="ActivityCalendar"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.