@glycanage/web-components 1.208.0 → 1.210.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/biological-age-rank-scatter.wc.js +1 -0
- package/dist/biological-age-rank.wc.js +3 -0
- package/dist/immune-resilience-index-scatter.wc.js +1 -0
- package/dist/immune-resilience-index.wc.js +1 -0
- package/dist/index.js +1 -1
- package/dist/index3.js +87 -0
- package/dist/scatter-plot-custom-clinical.wc.js +1 -1
- package/dist/scatter-plot-custom.wc.js +1 -1
- package/dist/scatter-plot.wc.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as D,S as M,i as W,f as A,s as H,e as E,b as I,n as F,p as z,g as k,q as O,u as $,k as P,o as V,A as Z}from"./index2.js";import{g as j}from"./globals.js";import{i as q}from"./index3.js";import{s as J}from"./helpers.js";const{document:K}=j;function Q(a){let e,r,l;return{c(){e=E("div"),r=I(),l=E("link"),F(e,"width","100%"),F(e,"height","100%"),F(e,"position","relative"),z(l,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),z(l,"rel","stylesheet")},m(o,m){k(o,e,m),a[5](e),k(o,r,m),O(K.head,l)},p:$,i:$,o:$,d(o){o&&(P(e),P(r)),a[5](null),P(l)}}}const h="#008F8C",U="rgba(0,143,140,0.35)";function X(a,e,r){let l,{type:o}=e,{lang:m}=e,{service:u=window.GaReportService}=e,G=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],g,T,v=0,c=0,i={},w="",p=0,x;const f=G.find(t=>t.name===o);function N(){x&&(i=q(x,null,{devicePixelRatio:4,renderer:"svg"}));const t=x.getBoundingClientRect();var y={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"#FFFFFF",grid:{top:36,left:64,right:32,bottom:52},dataset:[{source:T.data.map(d=>[d.x,d.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Chronological age",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[18,0,0,0]},nameLocation:"middle",axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!0,color:"#7A8794",fontSize:10,opacity:1,formatter(d){return d===0||d===100?"":d}},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},yAxis:{min:0,max:.6,name:"Biological age",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[0,0,28,0]},nameLocation:"middle",nameRotate:90,axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},series:[{type:"scatter",tooltip:{},symbolSize:5,itemStyle:{color:U,opacity:1,borderWidth:1}},{name:"Result",type:"scatter",data:[{x:p,y:c}],itemStyle:{color:h},symbolSize:8}],graphic:[],legend:{show:!1}};i.setOption(y),y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",p),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",p),y2:i.convertToPixel("yAxis",c)},style:{stroke:h,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",c),x2:i.convertToPixel("xAxis",p),y2:i.convertToPixel("yAxis",c)},style:{stroke:h,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",p),cy:i.convertToPixel("yAxis",c),r:4},style:{fill:h,stroke:"#FFFFFF",lineWidth:1.5},z:15});const C=i.convertToPixel("xAxis",p),L=i.convertToPixel("yAxis",c),s=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElement("div");s.setAttribute("width","80"),s.setAttribute("height","28"),s.setAttribute("viewBox","0 0 71 32"),s.setAttribute("fill","none"),s.setAttribute("xmlns","http://www.w3.org/2000/svg");const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),S.setAttribute("fill",h);const b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),b.setAttribute("fill",h),s.appendChild(S),s.appendChild(b),s.style.position="absolute",s.style.left=`${t.left+C+2}px`,s.style.top=`${t.top+L-14}px`,s.style.zIndex="8",n.innerText=l,n.style.position="absolute",n.style.left=`${t.left+C+20}px`,n.style.top=`${t.top+L-8}px`,n.style.font="bold 11px sans-serif",n.style.color="white",n.style.zIndex="999",n.style.fontFamily="Sen",n.style.paddingLeft="4px",document.body.appendChild(n),document.body.appendChild(s),i.setOption(y)}V(async()=>{g=await u.getReport(),w=g.sex,T=await u.getScatterData(o,w),await u.getLineData(o,w),p=Number(g.chronologicalage),f&&(r(4,v=Number(g[f.csvPerc])),c=Number(g[f.csvScore])),N()});function R(t){Z[t?"unshift":"push"](()=>{x=t,r(0,x)})}return a.$$set=t=>{"type"in t&&r(1,o=t.type),"lang"in t&&r(2,m=t.lang),"service"in t&&r(3,u=t.service)},a.$$.update=()=>{a.$$.dirty&16&&(l=(()=>{const t=Math.round(v||0),y=J(t,"english");return`${t}${y} pct`})())},[x,o,m,u,v,R]}class B extends M{constructor(e){super(),W(this,e,X,Q,H,{type:1,lang:2,service:3})}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),A()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),A()}get service(){return this.$$.ctx[3]}set service(e){this.$$set({service:e}),A()}}customElements.define("ga-biological-age-rank-scatter",D(B,{type:{},lang:{},service:{}},[],[],!1));export{B as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{c as W,S as F,i as G,f as J,s as K,a as O,e as o,m as f,b as $,p as t,n as u,g as P,q as e,r as D,u as I,k as Q}from"./index2.js";import{s as R,j as U}from"./helpers.js";function V(l){O(l,"svelte-l960iu",".biological-age-rank.svelte-l960iu{font-family:inherit}.title.svelte-l960iu{margin:0 0 0.5rem 0;font-size:0.8rem;color:#575756;text-align:center;width:100%}.title-percentile.svelte-l960iu{font-weight:600;margin:0 0.15rem}.graph-card.svelte-l960iu{font-family:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;width:560px;height:133px;padding:52px 1.25rem 1rem;background:#f5f5f5;border-radius:8px;border:1px solid #e0e0e0;box-sizing:border-box}.bubble.svelte-l960iu{position:absolute;bottom:18px;display:inline-block;transform:translateX(-50%)}.bubble-text.svelte-l960iu{display:block;padding:0.35rem 0.75rem;background:#008f8c;color:#fff;font-weight:bold;font-size:0.875rem;border-radius:6px;white-space:nowrap;box-shadow:0 1px 3px rgba(0, 0, 0, 0.15)}.bubble-arrow.svelte-l960iu{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #008f8c}.bar-wrap.svelte-l960iu{position:relative;width:-moz-fit-content;width:fit-content;max-width:100%;margin-bottom:8px}.slider-bar.svelte-l960iu{display:flex;gap:2px;width:-moz-fit-content;width:fit-content}.colorBox.svelte-l960iu,.colorBoxShort.svelte-l960iu{height:7px;flex-shrink:0;border-radius:24px}.colorBoxShort.svelte-l960iu{width:16px}.colorBox.svelte-l960iu{width:64px}.seg-1.svelte-l960iu{background-color:#005566}.seg-2.svelte-l960iu{background-color:#005566}.seg-3.svelte-l960iu{background-color:#119999}.seg-4.svelte-l960iu,.seg-5.svelte-l960iu{background-color:#66CCAA}.seg-6.svelte-l960iu{background-color:#EE6600}.seg-7.svelte-l960iu{background-color:#DD2222}.seg-8.svelte-l960iu{background-color:#DD2222}.median-triangle.svelte-l960iu{position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #5dade2;pointer-events:none;z-index:0}.marker-triangle.svelte-l960iu{position:absolute;bottom:-2px;transform:translateX(-50%);width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;pointer-events:none;z-index:1}.labels.svelte-l960iu{display:flex;gap:2px;width:-moz-fit-content;width:fit-content;font-size:0.7rem;color:#9e9e9e;align-items:center}.label.svelte-l960iu{text-align:center;flex-shrink:0;box-sizing:border-box;border-left:1px solid #d0d0d0;padding:0 4px}.label-worse.svelte-l960iu{border-right:1px solid #d0d0d0}.label-better.svelte-l960iu{width:148px}.label-average.svelte-l960iu{width:130px}.label-worse.svelte-l960iu{width:148px}")}function Y(l){let i,s,h,n,c=Math.round(l[1])+"",x,m,b,B,p,d,v,w,y=Math.round(l[1])+"",X,A,j,C,E,H,z,L,k,T,g,q,M,S;return{c(){i=o("div"),s=o("p"),h=f(`Biological age ranks in the
|
|
2
|
+
`),n=o("span"),x=f(c),m=f(l[3]),b=f(`
|
|
3
|
+
percentile:`),B=$(),p=o("div"),d=o("div"),v=o("div"),w=o("span"),X=f(y),A=f(l[3]),j=f(" percentile"),C=$(),E=o("div"),H=$(),z=o("div"),z.innerHTML='<div class="colorBoxShort seg-1 svelte-l960iu"></div> <div class="colorBox seg-2 svelte-l960iu"></div> <div class="colorBox seg-3 svelte-l960iu"></div> <div class="colorBox seg-4 svelte-l960iu"></div> <div class="colorBox seg-5 svelte-l960iu"></div> <div class="colorBox seg-6 svelte-l960iu"></div> <div class="colorBox seg-7 svelte-l960iu"></div> <div class="colorBoxShort seg-8 svelte-l960iu"></div>',L=$(),k=o("div"),T=$(),g=o("div"),q=$(),M=o("div"),M.innerHTML='<span class="label label-better svelte-l960iu">Better than peers</span> <span class="label label-average svelte-l960iu">Average/Median</span> <span class="label label-worse svelte-l960iu">Worse than peers</span>',t(n,"class","title-percentile svelte-l960iu"),u(n,"color",l[2]),t(s,"class","title svelte-l960iu"),t(w,"class","bubble-text svelte-l960iu"),t(E,"class","bubble-arrow svelte-l960iu"),t(v,"class","bubble svelte-l960iu"),u(v,"left",l[0]+"%"),t(z,"class","slider-bar svelte-l960iu"),t(k,"class","median-triangle svelte-l960iu"),u(k,"left","50%"),t(k,"aria-hidden","true"),t(k,"title","50th percentile (median)"),t(g,"class","marker-triangle svelte-l960iu"),u(g,"left",l[0]+"%"),u(g,"border-bottom-color",l[2]),t(g,"aria-hidden","true"),t(d,"class","bar-wrap svelte-l960iu"),t(M,"class","labels svelte-l960iu"),t(p,"class","graph-card svelte-l960iu"),t(p,"role","img"),t(p,"aria-label",S="Biological age rank in the "+Math.round(l[1])+l[3]+" percentile, from better than peers to worse than peers"),t(i,"class","biological-age-rank svelte-l960iu")},m(r,a){P(r,i,a),e(i,s),e(s,h),e(s,n),e(n,x),e(n,m),e(s,b),e(i,B),e(i,p),e(p,d),e(d,v),e(v,w),e(w,X),e(w,A),e(w,j),e(v,C),e(v,E),e(d,H),e(d,z),e(d,L),e(d,k),e(d,T),e(d,g),e(p,q),e(p,M)},p(r,[a]){a&2&&c!==(c=Math.round(r[1])+"")&&D(x,c),a&8&&D(m,r[3]),a&4&&u(n,"color",r[2]),a&2&&y!==(y=Math.round(r[1])+"")&&D(X,y),a&8&&D(A,r[3]),a&1&&u(v,"left",r[0]+"%"),a&1&&u(g,"left",r[0]+"%"),a&4&&u(g,"border-bottom-color",r[2]),a&10&&S!==(S="Biological age rank in the "+Math.round(r[1])+r[3]+" percentile, from better than peers to worse than peers")&&t(p,"aria-label",S)},i:I,o:I,d(r){r&&Q(i)}}}function Z(l,i,s){let h,n,c,x,m,{percentile:b=50}=i;return l.$$set=B=>{"percentile"in B&&s(4,b=B.percentile)},l.$$.update=()=>{l.$$.dirty&16&&s(1,h=typeof b=="string"?parseInt(b,10):Number(b)),l.$$.dirty&2&&s(3,n=R(Math.round(h),"english")),l.$$.dirty&2&&s(0,c=U(h)),l.$$.dirty&1&&s(5,x=c<34.5?"better":c<64.5?"average":"worse"),l.$$.dirty&32&&s(2,m=x==="worse"?"#d92429":"#008f8c")},[c,h,m,n,b,x]}class N extends F{constructor(i){super(),G(this,i,Z,Y,K,{percentile:4},V)}get percentile(){return this.$$.ctx[4]}set percentile(i){this.$$set({percentile:i}),J()}}customElements.define("ga-biological-age-rank",W(N,{percentile:{}},[],[],!0));export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as D,S as W,i as I,f as P,s as H,e as E,b as O,n as T,p as z,g as G,q as V,u as N,k as C,o as Z,A as q}from"./index2.js";import{g as j}from"./globals.js";import{i as J}from"./index3.js";const{document:K}=j;function Q(m){let t,r,x;return{c(){t=E("div"),r=O(),x=E("link"),T(t,"width","100%"),T(t,"height","100%"),T(t,"position","relative"),z(x,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),z(x,"rel","stylesheet")},m(l,v){G(l,t,v),m[5](t),G(l,r,v),V(K.head,x)},p:N,i:N,o:N,d(l){l&&(C(t),C(r)),m[5](null),C(x)}}}const g="#008F8C",U="rgba(0,143,140,0.35)";function Y(m,t,r){let x,{type:l}=t,{lang:v}=t,{service:w=window.GaReportService}=t,B=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],p,L,s=0,a=null,i={},S="",u=0,d;const F=B.find(e=>e.name===l);function R(){d&&(i=J(d,null,{devicePixelRatio:4,renderer:"svg"}));const e=d.getBoundingClientRect();var y={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"#FFFFFF",grid:{top:36,left:64,right:32,bottom:52},dataset:[{source:L.data.map(h=>[h.x,h.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Chronological age",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[18,0,0,0]},nameLocation:"middle",axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!0,color:"#7A8794",fontSize:10,opacity:1,formatter(h){return h===0||h===100?"":h}},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},yAxis:{min:0,max:.6,name:"Index score",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[0,0,28,0]},nameLocation:"middle",nameRotate:90,axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},series:[{type:"scatter",tooltip:{},symbolSize:5,itemStyle:{color:U,opacity:1,borderWidth:1}},{name:"Result",type:"scatter",data:a!==null&&Number.isFinite(s)&&s>0?[{x:u,y:s}]:[],itemStyle:{color:g},symbolSize:8}],graphic:[],legend:{show:!1}};i.setOption(y);const o=a!==null&&Number.isFinite(s)&&s>0;o&&(y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",u),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",u),y2:i.convertToPixel("yAxis",s)},style:{stroke:g,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",s),x2:i.convertToPixel("xAxis",u),y2:i.convertToPixel("yAxis",s)},style:{stroke:g,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",u),cy:i.convertToPixel("yAxis",s),r:4},style:{fill:g,stroke:"#FFFFFF",lineWidth:1.5},z:15}));const b=o?i.convertToPixel("xAxis",u):0,f=o?i.convertToPixel("yAxis",s):0,n=document.createElementNS("http://www.w3.org/2000/svg","svg"),c=document.createElement("div");n.setAttribute("width","80"),n.setAttribute("height","28"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const A=document.createElementNS("http://www.w3.org/2000/svg","path");A.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),A.setAttribute("fill",g);const $=document.createElementNS("http://www.w3.org/2000/svg","path");$.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),$.setAttribute("fill",g),n.appendChild(A),n.appendChild($),n.style.position="absolute",n.style.left=o?`${e.left+b+2}px`:"-9999px",n.style.top=o?`${e.top+f-14}px`:"-9999px",n.style.zIndex="8",c.innerText=x,c.style.position="absolute",c.style.left=o?`${e.left+b+20}px`:"-9999px",c.style.top=o?`${e.top+f-8}px`:"-9999px",c.style.font="bold 11px sans-serif",c.style.color="white",c.style.zIndex="999",c.style.fontFamily="Sen",c.style.paddingLeft="4px",document.body.appendChild(c),document.body.appendChild(n),i.setOption(y)}Z(async()=>{p=await w.getReport(),S=p.sex,L=await w.getScatterData(l,S),await w.getLineData(l,S),u=Number(p.chronologicalage),F&&(Number(p[F.csvPerc]),s=Number(p[F.csvScore]));const e=Number(p?.G0yourscore??0),y=Number(p?.G2yourscore??0);if(Number.isFinite(e)&&e!==0&&Number.isFinite(y)){const o=y/e;if(Number.isFinite(o)&&o>0){r(4,a=o);const b=0,f=.6;s=Math.min(Math.max(o,b),f)}else r(4,a=null)}else r(4,a=null);R()});function M(e){q[e?"unshift":"push"](()=>{d=e,r(0,d)})}return m.$$set=e=>{"type"in e&&r(1,l=e.type),"lang"in e&&r(2,v=e.lang),"service"in e&&r(3,w=e.service)},m.$$.update=()=>{m.$$.dirty&16&&(x=a!==null&&Number.isFinite(a)&&a>0?a.toFixed(3):"N/A")},[d,l,v,w,a,M]}class k extends W{constructor(t){super(),I(this,t,Y,Q,H,{type:1,lang:2,service:3})}get type(){return this.$$.ctx[1]}set type(t){this.$$set({type:t}),P()}get lang(){return this.$$.ctx[2]}set lang(t){this.$$set({lang:t}),P()}get service(){return this.$$.ctx[3]}set service(t){this.$$set({service:t}),P()}}customElements.define("ga-immune-resilience-index-scatter",D(k,{type:{},lang:{},service:{}},[],[],!1));export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as H,S as L,i as T,f as q,s as A,a as E,e as d,m as k,b as f,p as o,n as b,g as N,q as s,r as S,u as X,k as O}from"./index2.js";import{s as C,j as D}from"./helpers.js";function F(e){E(e,"svelte-e93mjh",".graph-card.svelte-e93mjh{font-family:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;width:560px;height:133px;padding:52px 1.25rem 1rem;background:#f5f5f5;border-radius:8px;border:1px solid #e0e0e0;box-sizing:border-box}.bubble.svelte-e93mjh{position:absolute;bottom:18px;display:inline-block;transform:translateX(-50%)}.bubble-text.svelte-e93mjh{display:block;padding:0.35rem 0.75rem;background:#008f8c;color:#fff;font-weight:bold;font-size:0.875rem;border-radius:6px;white-space:nowrap;box-shadow:0 1px 3px rgba(0, 0, 0, 0.15)}.bubble-arrow.svelte-e93mjh{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #008f8c}.bar-wrap.svelte-e93mjh{position:relative;width:-moz-fit-content;width:fit-content;max-width:100%;margin-bottom:8px}.slider-bar.svelte-e93mjh{display:flex;gap:2px;width:-moz-fit-content;width:fit-content}.colorBox.svelte-e93mjh,.colorBoxShort.svelte-e93mjh{height:7px;flex-shrink:0;border-radius:24px}.colorBoxShort.svelte-e93mjh{width:16px}.colorBox.svelte-e93mjh{width:64px}.seg-1.svelte-e93mjh{background-color:#b71c1c}.seg-2.svelte-e93mjh{background-color:#d92429}.seg-3.svelte-e93mjh{background-color:#f78d1e}.seg-4.svelte-e93mjh,.seg-5.svelte-e93mjh,.seg-6.svelte-e93mjh{background-color:#51c7b8}.seg-7.svelte-e93mjh{background-color:#008f8c}.seg-8.svelte-e93mjh{background-color:#005f6e}.median-triangle.svelte-e93mjh{position:absolute;bottom:-10px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:8px solid #5dade2;pointer-events:none;z-index:0}.marker-triangle.svelte-e93mjh{position:absolute;bottom:-2px;transform:translateX(-50%);width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;pointer-events:none;z-index:1}.labels.svelte-e93mjh{display:flex;gap:2px;width:-moz-fit-content;width:fit-content;font-size:0.7rem;color:#9e9e9e;align-items:center}.label.svelte-e93mjh{text-align:center;flex-shrink:0;box-sizing:border-box;border-left:1px solid #d0d0d0;padding:0 4px}.label-optimal.svelte-e93mjh{border-right:1px solid #d0d0d0}.label-suboptimal.svelte-e93mjh{width:148px}.label-average.svelte-e93mjh{width:130px}.label-optimal.svelte-e93mjh{width:148px}")}function P(e){let l,t,r,a,n=Math.round(e[1])+"",h,v,m,g,$,y,u,B,x,z,p,M,j,w;return{c(){l=d("div"),t=d("div"),r=d("div"),a=d("span"),h=k(n),v=k(e[3]),m=k(" percentile"),g=f(),$=d("div"),y=f(),u=d("div"),u.innerHTML='<div class="colorBoxShort seg-1 svelte-e93mjh"></div> <div class="colorBox seg-2 svelte-e93mjh"></div> <div class="colorBox seg-3 svelte-e93mjh"></div> <div class="colorBox seg-4 svelte-e93mjh"></div> <div class="colorBox seg-5 svelte-e93mjh"></div> <div class="colorBox seg-6 svelte-e93mjh"></div> <div class="colorBox seg-7 svelte-e93mjh"></div> <div class="colorBoxShort seg-8 svelte-e93mjh"></div>',B=f(),x=d("div"),z=f(),p=d("div"),M=f(),j=d("div"),j.innerHTML='<span class="label label-suboptimal svelte-e93mjh">Suboptimal</span> <span class="label label-average svelte-e93mjh">Average</span> <span class="label label-optimal svelte-e93mjh">Optimal</span>',o(a,"class","bubble-text svelte-e93mjh"),o($,"class","bubble-arrow svelte-e93mjh"),o(r,"class","bubble svelte-e93mjh"),b(r,"left",e[0]+"%"),o(u,"class","slider-bar svelte-e93mjh"),o(x,"class","median-triangle svelte-e93mjh"),b(x,"left","50%"),o(x,"aria-hidden","true"),o(x,"title","50th percentile (median)"),o(p,"class","marker-triangle svelte-e93mjh"),b(p,"left",e[0]+"%"),b(p,"border-bottom-color",e[2]),o(p,"aria-hidden","true"),o(t,"class","bar-wrap svelte-e93mjh"),o(j,"class","labels svelte-e93mjh"),o(l,"class","graph-card svelte-e93mjh"),o(l,"role","img"),o(l,"aria-label",w="Immune resilience index in the "+Math.round(e[1])+e[3]+" percentile, from suboptimal to optimal")},m(i,c){N(i,l,c),s(l,t),s(t,r),s(r,a),s(a,h),s(a,v),s(a,m),s(r,g),s(r,$),s(t,y),s(t,u),s(t,B),s(t,x),s(t,z),s(t,p),s(l,M),s(l,j)},p(i,[c]){c&2&&n!==(n=Math.round(i[1])+"")&&S(h,n),c&8&&S(v,i[3]),c&1&&b(r,"left",i[0]+"%"),c&1&&b(p,"left",i[0]+"%"),c&4&&b(p,"border-bottom-color",i[2]),c&10&&w!==(w="Immune resilience index in the "+Math.round(i[1])+i[3]+" percentile, from suboptimal to optimal")&&o(l,"aria-label",w)},i:X,o:X,d(i){i&&O(l)}}}function W(e,l,t){let r,a,n,h,v,{percentile:m=50}=l;return e.$$set=g=>{"percentile"in g&&t(4,m=g.percentile)},e.$$.update=()=>{e.$$.dirty&16&&t(1,r=typeof m=="string"?parseInt(m,10):Number(m)),e.$$.dirty&2&&t(3,a=C(Math.round(r),"english")),e.$$.dirty&2&&t(0,n=D(r)),e.$$.dirty&1&&t(5,h=n<34.5?"suboptimal":n<64.5?"average":"optimal"),e.$$.dirty&32&&t(2,v=h==="suboptimal"?"#d92429":"#008f8c")},[n,r,v,a,m,h]}class I extends L{constructor(l){super(),T(this,l,W,P,A,{percentile:4},F)}get percentile(){return this.$$.ctx[4]}set percentile(l){this.$$set({percentile:l}),q()}}customElements.define("ga-immune-resilience-index",H(I,{percentile:{}},[],[],!0));export{I as default};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./results-overview-custom.wc.js"),import("./results-overview-custom-clinical.wc.js"),import("./single-overview.wc.js"),import("./single-overview-custom.wc.js"),import("./single-overview-custom-clinical.wc.js"),import("./main-result.wc.js"),import("./main-result-custom.wc.js"),import("./main-result-custom-clinical.wc.js"),import("./main-result-three.wc.js"),import("./main-result-three-client.wc.js"),import("./results-overview-three.wc.js"),import("./results-overview-three-clp-ch.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.wc.js"),import("./insights-overview-three-clp-ch.wc.js"),import("./insights-overview-custom.wc.js"),import("./insights-overview-custom-clinical.wc.js"),import("./insights-overview-three-client.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./action-steps-three-clp.wc.js"),import("./action-steps-three-clp-ch.wc.js"),import("./action-steps-three-client.wc.js"),import("./arrow-graph.wc.js"),import("./arrow-graph-three.wc.js"),import("./overlap-title.wc.js"),import("./overlap-title-three.wc.js"),import("./scatter-plot.wc.js"),import("./scatter-plot-custom.wc.js"),import("./scatter-plot-custom-clinical.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./insights-overview-clp-ch.wc.js"),import("./main-result-clp.wc.js"),import("./main-result-clp-ch.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-clp-new-ch.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./arrow-graph-clp-ch.wc.js"),import("./overlap-title-clp.wc.js"),import("./overlap-title-clp-ch.wc.js"),import("./scatter-plot-clp.wc.js"),import("./scatter-plot-clp-ch.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.wc.js"),import("./over-time-indexes-clp-ch.wc.js")};export{t as default};
|
|
1
|
+
const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./results-overview-custom.wc.js"),import("./results-overview-custom-clinical.wc.js"),import("./single-overview.wc.js"),import("./single-overview-custom.wc.js"),import("./single-overview-custom-clinical.wc.js"),import("./main-result.wc.js"),import("./main-result-custom.wc.js"),import("./main-result-custom-clinical.wc.js"),import("./main-result-three.wc.js"),import("./main-result-three-client.wc.js"),import("./results-overview-three.wc.js"),import("./results-overview-three-clp-ch.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.wc.js"),import("./insights-overview-three-clp-ch.wc.js"),import("./insights-overview-custom.wc.js"),import("./insights-overview-custom-clinical.wc.js"),import("./insights-overview-three-client.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./action-steps-three-clp.wc.js"),import("./action-steps-three-clp-ch.wc.js"),import("./action-steps-three-client.wc.js"),import("./arrow-graph.wc.js"),import("./arrow-graph-three.wc.js"),import("./overlap-title.wc.js"),import("./overlap-title-three.wc.js"),import("./scatter-plot.wc.js"),import("./scatter-plot-custom.wc.js"),import("./scatter-plot-custom-clinical.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./insights-overview-clp-ch.wc.js"),import("./main-result-clp.wc.js"),import("./main-result-clp-ch.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-clp-new-ch.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./arrow-graph-clp-ch.wc.js"),import("./overlap-title-clp.wc.js"),import("./overlap-title-clp-ch.wc.js"),import("./scatter-plot-clp.wc.js"),import("./scatter-plot-clp-ch.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.wc.js"),import("./over-time-indexes-clp-ch.wc.js"),import("./biological-age-rank.wc.js"),import("./immune-resilience-index.wc.js"),import("./biological-age-rank-scatter.wc.js"),import("./immune-resilience-index-scatter.wc.js")};export{t as default};
|