Anvil/assets/History-BuVIB1eV.js
André Jaenisch 754ebfe778
Updates
2024-07-27 14:18:38 +02:00

1 line
8.9 KiB
JavaScript

import{S as ee,c as te,a as le,d as L,e as V,m as q,b as g,t as E,f as U,h as T,q as F,u as R}from"./index-CP70Tq58.js";import{a as k,b as C,t as B,f as v,h as w,d,k as D,j as O,l as M,i as j,m as y,n as H,e as I,v as z}from"./lifecycle-D_bIUHQK.js";import{g as se}from"./globals-D0QH3NT1.js";import{e as S}from"./each-C4g42ehH.js";import{a as re,$ as ne}from"./runtime-CZkC8ltm.js";import{C as ie}from"./CommitBody-FH4xpO6b.js";import{C as oe}from"./CommitDate-19ChJWCX.js";import{N as ce}from"./ZoomOut24-450rB1Ps.js";function fe(f){let l,a,r,t,i,e=f[3](new Date("2023-04-23"))+"",s,n,o=f[4]("page.profile.history.activities.setup.summary")+"",p,u,c,m,h=f[4]("page.profile.history.activities.setup.description",{values:{created_with:f[0],instance:f[1],username:f[2]}})+"",N,A;return r=new ce({props:{fill:"currentColor"}}),{c(){l=k("span"),a=k("span"),L(r.$$.fragment),t=C(),i=k("span"),s=B(e),n=B(" - "),p=B(o),u=C(),c=k("span"),m=k("span"),N=B(h),this.h()},l(_){l=v(_,"SPAN",{class:!0});var b=w(l);a=v(b,"SPAN",{class:!0});var J=w(a);V(r.$$.fragment,J),J.forEach(d),t=D(b),i=v(b,"SPAN",{class:!0});var P=w(i);s=O(P,e),n=O(P," - "),p=O(P,o),P.forEach(d),b.forEach(d),u=D(_),c=v(_,"SPAN",{class:!0});var K=w(c);m=v(K,"SPAN",{class:!0});var Q=w(m);N=O(Q,h),Q.forEach(d),K.forEach(d),this.h()},h(){M(a,"class","absolute ltr:-left-3 rtl:-right-3"),M(i,"class","ms-4"),M(l,"class","relative"),M(m,"class","border box-decoration-clone px-4 py-2 leading-10"),M(c,"class","ms-6 mt-8")},m(_,b){j(_,l,b),y(l,a),q(r,a,null),y(l,t),y(l,i),y(i,s),y(i,n),y(i,p),j(_,u,b),j(_,c,b),y(c,m),y(m,N),A=!0},p(_,[b]){(!A||b&8)&&e!==(e=_[3](new Date("2023-04-23"))+"")&&H(s,e),(!A||b&16)&&o!==(o=_[4]("page.profile.history.activities.setup.summary")+"")&&H(p,o),(!A||b&23)&&h!==(h=_[4]("page.profile.history.activities.setup.description",{values:{created_with:_[0],instance:_[1],username:_[2]}})+"")&&H(N,h)},i(_){A||(g(r.$$.fragment,_),A=!0)},o(_){E(r.$$.fragment,_),A=!1},d(_){_&&(d(l),d(u),d(c)),U(r)}}}function ue(f,l,a){let r,t;T(f,re,n=>a(3,r=n)),T(f,ne,n=>a(4,t=n));let{created_with:i=""}=l,{instance:e=""}=l,{username:s=""}=l;return f.$$set=n=>{"created_with"in n&&a(0,i=n.created_with),"instance"in n&&a(1,e=n.instance),"username"in n&&a(2,s=n.username)},[i,e,s,r,t]}class ae extends ee{constructor(l){super(),te(this,l,ue,fe,le,{created_with:0,instance:1,username:2})}}ae.__docgen={version:3,name:"HistoryFallback.svelte",data:[{keywords:[],visibility:"public",description:"Service with which username was created on the instance.",name:"created_with",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{keywords:[],visibility:"public",description:"Instance to show in fallback.",name:"instance",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{keywords:[],visibility:"public",description:"Username to show in fallback.",name:"username",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const{Boolean:G}=se;function W(f,l,a){const r=f.slice();return r[6]=l[a],r}function X(f,l,a){const r=f.slice();return r[9]=l[a],r}function Y(f,l,a){const r=f.slice();return r[12]=l[a],r}function me(f){let l,a,r;return a=new ae({props:{created_with:f[1].user.created_with,instance:f[1].user.instance,username:f[1].user.username}}),{c(){l=k("li"),L(a.$$.fragment),this.h()},l(t){l=v(t,"LI",{class:!0});var i=w(l);V(a.$$.fragment,i),i.forEach(d),this.h()},h(){M(l,"class","flex flex-col ltr:border-l-2 rtl:border-r-2 ms-2")},m(t,i){j(t,l,i),q(a,l,null),r=!0},p(t,i){const e={};i&2&&(e.created_with=t[1].user.created_with),i&2&&(e.instance=t[1].user.instance),i&2&&(e.username=t[1].user.username),a.$set(e)},i(t){r||(g(a.$$.fragment,t),r=!0)},o(t){E(a.$$.fragment,t),r=!1},d(t){t&&d(l),U(a)}}}function he(f){let l,a,r=S(Object.entries(f[3](f[0]))),t=[];for(let e=0;e<r.length;e+=1)t[e]=x(W(f,r,e));const i=e=>E(t[e],1,1,()=>{t[e]=null});return{c(){for(let e=0;e<t.length;e+=1)t[e].c();l=I()},l(e){for(let s=0;s<t.length;s+=1)t[s].l(e);l=I()},m(e,s){for(let n=0;n<t.length;n+=1)t[n]&&t[n].m(e,s);j(e,l,s),a=!0},p(e,s){if(s&25){r=S(Object.entries(e[3](e[0])));let n;for(n=0;n<r.length;n+=1){const o=W(e,r,n);t[n]?(t[n].p(o,s),g(t[n],1)):(t[n]=x(o),t[n].c(),g(t[n],1),t[n].m(l.parentNode,l))}for(R(),n=r.length;n<t.length;n+=1)i(n);F()}},i(e){if(!a){for(let s=0;s<r.length;s+=1)g(t[s]);a=!0}},o(e){t=t.filter(G);for(let s=0;s<t.length;s+=1)E(t[s]);a=!1},d(e){e&&d(l),z(t,e)}}}function Z(f){let l,a,r,t;return a=new ie({props:{commit:f[12]}}),{c(){l=k("li"),L(a.$$.fragment),r=C(),this.h()},l(i){l=v(i,"LI",{class:!0});var e=w(l);V(a.$$.fragment,e),r=D(e),e.forEach(d),this.h()},h(){M(l,"class","ltr:border-l-2 rtl:border-r-2 ms-2")},m(i,e){j(i,l,e),q(a,l,null),y(l,r),t=!0},p(i,e){const s={};e&1&&(s.commit=i[12]),a.$set(s)},i(i){t||(g(a.$$.fragment,i),t=!0)},o(i){E(a.$$.fragment,i),t=!1},d(i){i&&d(l),U(a)}}}function $(f){let l,a,r,t,i,e,s;r=new oe({props:{commitDate:f[6][0],numberOfCommits:f[9][1].length,repoName:f[4](f[9][0])}});let n=S(f[9][1]),o=[];for(let u=0;u<n.length;u+=1)o[u]=Z(Y(f,n,u));const p=u=>E(o[u],1,1,()=>{o[u]=null});return{c(){l=k("li"),a=k("div"),L(r.$$.fragment),t=C(),i=k("ul");for(let u=0;u<o.length;u+=1)o[u].c();e=C(),this.h()},l(u){l=v(u,"LI",{class:!0});var c=w(l);a=v(c,"DIV",{class:!0});var m=w(a);V(r.$$.fragment,m),t=D(m),i=v(m,"UL",{});var h=w(i);for(let N=0;N<o.length;N+=1)o[N].l(h);h.forEach(d),m.forEach(d),e=D(c),c.forEach(d),this.h()},h(){M(a,"class","flex flex-col gap-6 ps-6"),M(l,"class","mb-8")},m(u,c){j(u,l,c),y(l,a),q(r,a,null),y(a,t),y(a,i);for(let m=0;m<o.length;m+=1)o[m]&&o[m].m(i,null);y(l,e),s=!0},p(u,c){const m={};if(c&1&&(m.commitDate=u[6][0]),c&1&&(m.numberOfCommits=u[9][1].length),c&1&&(m.repoName=u[4](u[9][0])),r.$set(m),c&9){n=S(u[9][1]);let h;for(h=0;h<n.length;h+=1){const N=Y(u,n,h);o[h]?(o[h].p(N,c),g(o[h],1)):(o[h]=Z(N),o[h].c(),g(o[h],1),o[h].m(i,null))}for(R(),h=n.length;h<o.length;h+=1)p(h);F()}},i(u){if(!s){g(r.$$.fragment,u);for(let c=0;c<n.length;c+=1)g(o[c]);s=!0}},o(u){E(r.$$.fragment,u),o=o.filter(G);for(let c=0;c<o.length;c+=1)E(o[c]);s=!1},d(u){u&&d(l),U(r),z(o,u)}}}function x(f){let l,a,r=S(Object.entries(f[6][1])),t=[];for(let e=0;e<r.length;e+=1)t[e]=$(X(f,r,e));const i=e=>E(t[e],1,1,()=>{t[e]=null});return{c(){for(let e=0;e<t.length;e+=1)t[e].c();l=I()},l(e){for(let s=0;s<t.length;s+=1)t[s].l(e);l=I()},m(e,s){for(let n=0;n<t.length;n+=1)t[n]&&t[n].m(e,s);j(e,l,s),a=!0},p(e,s){if(s&25){r=S(Object.entries(e[6][1]));let n;for(n=0;n<r.length;n+=1){const o=X(e,r,n);t[n]?(t[n].p(o,s),g(t[n],1)):(t[n]=$(o),t[n].c(),g(t[n],1),t[n].m(l.parentNode,l))}for(R(),n=r.length;n<t.length;n+=1)i(n);F()}},i(e){if(!a){for(let s=0;s<r.length;s+=1)g(t[s]);a=!0}},o(e){t=t.filter(G);for(let s=0;s<t.length;s+=1)E(t[s]);a=!1},d(e){e&&d(l),z(t,e)}}}function pe(f){let l,a=f[2]("page.profile.history.heading")+"",r,t,i,e,s,n;const o=[he,me],p=[];function u(c,m){return c[0].length>0?0:1}return e=u(f),s=p[e]=o[e](f),{c(){l=k("h2"),r=B(a),t=C(),i=k("ul"),s.c(),this.h()},l(c){l=v(c,"H2",{class:!0});var m=w(l);r=O(m,a),m.forEach(d),t=D(c),i=v(c,"UL",{});var h=w(i);s.l(h),h.forEach(d),this.h()},h(){M(l,"class","h2 font-semibold leading-tight text-base")},m(c,m){j(c,l,m),y(l,r),j(c,t,m),j(c,i,m),p[e].m(i,null),n=!0},p(c,[m]){(!n||m&4)&&a!==(a=c[2]("page.profile.history.heading")+"")&&H(r,a);let h=e;e=u(c),e===h?p[e].p(c,m):(R(),E(p[h],1,1,()=>{p[h]=null}),F(),s=p[e],s?s.p(c,m):(s=p[e]=o[e](c),s.c()),g(s,1),s.m(i,null))},i(c){n||(g(s),n=!0)},o(c){E(s),n=!1},d(c){c&&(d(l),d(t),d(i)),p[e].d()}}}function de(f,l,a){let r;T(f,ne,o=>a(2,r=o));let{commitsMap:t=[]}=l,{data:i={user:{created_with:"",instance:"",username:""}}}=l,{followingsMap:e=[]}=l;const s=function(o){const p={};return o.filter(u=>!!u.id).forEach(u=>{const{committed:c,context:m}=u,h=c.slice(0,c.indexOf("T"));p[h]||(p[h]={}),p[h][m]||(p[h][m]=[]),p[h][m].push(u)}),p},n=function(o){const p=e.find(u=>u.id===o);return(p==null?void 0:p.name)||""};return f.$$set=o=>{"commitsMap"in o&&a(0,t=o.commitsMap),"data"in o&&a(1,i=o.data),"followingsMap"in o&&a(5,e=o.followingsMap)},[t,i,r,s,n,e]}class _e extends ee{constructor(l){super(),te(this,l,de,pe,le,{commitsMap:0,data:1,followingsMap:5})}}_e.__docgen={version:3,name:"History.svelte",data:[{keywords:[],visibility:"public",description:"Array of commits to display by date and project.",name:"commitsMap",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}},{keywords:[],visibility:"public",description:"Required context for populating the template.",name:"data",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}},{keywords:[],visibility:"public",description:"Array of followings to look up.",name:"followingsMap",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};export{_e as H};