@glycanage/web-components 1.209.0 → 1.211.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/immune-resilience-index-scatter.wc.js +1 -0
- package/dist/immune-resilience-index.wc.js +3 -1
- package/dist/index.js +1 -1
- package/dist/init.js +1 -1
- package/dist/scatter-plot-custom-clinical.wc.js +1 -1
- package/dist/scatter-plot-custom.wc.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as R,S as D,i as M,f as C,s as W,e as L,b as H,n as b,p as E,g as z,q as I,u as A,k as F,o as O,A as V}from"./index2.js";import{g as Z}from"./globals.js";import{i as q}from"./index3.js";import{s as j}from"./helpers.js";const{document:J}=Z;function K(c){let t,r,l;return{c(){t=L("div"),r=H(),l=L("link"),b(t,"width","100%"),b(t,"height","100%"),b(t,"position","relative"),E(l,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),E(l,"rel","stylesheet")},m(o,a){z(o,t,a),c[4](t),z(o,r,a),I(J.head,l)},p:A,i:A,o:A,d(o){o&&(F(t),F(r)),c[4](null),F(l)}}}const m="#008F8C",Q="rgba(0,143,140,0.35)";function _(c,t,r){let l,{type:o}=t,{service:a=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"}],u,$,g=0,p=0,i={},v="",y=0,h;const w=B.find(e=>e.name===o);function G(){h&&(i=q(h,null,{devicePixelRatio:4,renderer:"svg"}));const e=h.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"#FFFFFF",grid:{top:36,left:64,right:32,bottom:52},dataset:[{source:$.data.map(x=>[x.x,x.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(x){return x===0||x===100?"":x}},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:Q,opacity:1,borderWidth:1}},{name:"Result",type:"scatter",data:[{x:y,y:p}],itemStyle:{color:m},symbolSize:8}],graphic:[],legend:{show:!1}};i.setOption(d),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",y),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:m,lineDash:[8,8],lineWidth:2},z:8}),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",p),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:m,lineDash:[8,8],lineWidth:2},z:8}),d.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",y),cy:i.convertToPixel("yAxis",p),r:4},style:{fill:m,stroke:"#FFFFFF",lineWidth:1.5},z:15});const P=i.convertToPixel("xAxis",y),T=i.convertToPixel("yAxis",p),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 f=document.createElementNS("http://www.w3.org/2000/svg","path");f.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"),f.setAttribute("fill",m);const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),S.setAttribute("fill",m),s.appendChild(f),s.appendChild(S),s.style.position="absolute",s.style.left=`${e.left+P+2}px`,s.style.top=`${e.top+T-14}px`,s.style.zIndex="8",n.innerText=l,n.style.position="absolute",n.style.left=`${e.left+P+20}px`,n.style.top=`${e.top+T-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(d)}O(async()=>{u=await a.getReport(),v=u.sex,$=await a.getScatterData(o,v),await a.getLineData(o,v),y=Number(u.chronologicalage),w&&(r(3,g=Number(u[w.csvPerc])),p=Number(u[w.csvScore])),G()});function N(e){V[e?"unshift":"push"](()=>{h=e,r(0,h)})}return c.$$set=e=>{"type"in e&&r(1,o=e.type),"service"in e&&r(2,a=e.service)},c.$$.update=()=>{c.$$.dirty&8&&(l=(()=>{const e=Math.round(g||0),d=j(e,"english");return`${e}${d} pct`})())},[h,o,a,g,N]}class k extends D{constructor(t){super(),M(this,t,_,K,W,{type:1,service:2})}get type(){return this.$$.ctx[1]}set type(t){this.$$set({type:t}),C()}get service(){return this.$$.ctx[2]}set service(t){this.$$set({service:t}),C()}}customElements.define("ga-biological-age-rank-scatter",R(k,{type:{},service:{}},[],[],!1));export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as M,S as O,i as W,f as D,s as G,e as b,b as T,n as t,p as L,g as k,q as f,u as C,k as P,o as I,A as B}from"./index2.js";import{g as H}from"./globals.js";import{f as g}from"./helpers.js";const{document:V}=H;function q(w){let o,x,h,s,d,e,i,y;return{c(){o=b("div"),x=b("div"),h=T(),s=b("div"),s.textContent="Age",d=T(),e=b("div"),e.textContent="Immune resilience index",i=T(),y=b("link"),t(x,"width","100%"),t(x,"height","100%"),t(s,"position","absolute"),t(s,"bottom","3px"),t(s,"left","50%"),t(s,"transform","translateX(-50%)"),t(s,"font-family","Sen, sans-serif"),t(s,"font-size","12px"),t(s,"color","#09341F"),t(s,"opacity","0.8"),t(e,"position","absolute"),t(e,"top","50%"),t(e,"right","83%"),t(e,"transform","translateY(-50%) rotate(-90deg)"),t(e,"font-family","Sen, sans-serif"),t(e,"font-size","12px"),t(e,"color","#09341F"),t(e,"opacity","0.8"),t(e,"white-space","nowrap"),t(o,"width","100%"),t(o,"height","100%"),t(o,"position","relative"),L(y,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),L(y,"rel","stylesheet")},m(n,v){k(n,o,v),f(o,x),w[2](x),f(o,h),f(o,s),f(o,d),f(o,e),k(n,i,v),f(V.head,y)},p:C,i:C,o:C,d(n){n&&(P(o),P(i)),w[2](null),P(y)}}}function Z(w,o,x){let{service:h=window.GaReportService}=o,s,d,e=0,i={},y="",n=0,v=0,$=0,u,l=0;function R(){u&&(i=echarts.init(u,null,{devicePixelRatio:4,renderer:"svg"}));const r=u.getBoundingClientRect();var m={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"65px",left:"50px",right:"55px",bottom:"40px"},dataset:[{source:d.data.map(c=>[c.x,c.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",opacity:.8,formatter(c){return c===0||c===100?"":c}},splitLine:{show:!0}},yAxis:{min:0,max:2,nameTextStyle:{color:"#09341F",opacity:.8},axisLine:{show:!1,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!1,color:"#09341F",opacity:.8,formatter(c){return c===0||c===.6?"":c}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Resilience index",type:"scatter",data:[{x:n,y:e}],itemStyle:{color:g(l)}}],graphic:[]};i.setOption(m),m.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",n),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",n),y2:i.convertToPixel("yAxis",e)},style:{stroke:g(l),lineDash:[8,8],lineWidth:1},z:8}),m.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",e),x2:i.convertToPixel("xAxis",n),y2:i.convertToPixel("yAxis",e)},style:{stroke:g(l),lineDash:[8,8],lineWidth:1},z:8}),m.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",n),cy:i.convertToPixel("yAxis",e),r:6},style:{fill:g(l),stroke:"#FFFFFF",lineWidth:1},z:15});const A=i.convertToPixel("xAxis",n),z=i.convertToPixel("yAxis",e),a=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=document.createElement("div");a.setAttribute("width","71"),a.setAttribute("height","32"),a.setAttribute("viewBox","0 0 71 32"),a.setAttribute("fill","none"),a.setAttribute("xmlns","http://www.w3.org/2000/svg");const F=document.createElementNS("http://www.w3.org/2000/svg","path");F.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"),F.setAttribute("fill",g(l));const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),S.setAttribute("fill",g(l)),a.appendChild(F),a.appendChild(S),a.style.position="absolute",a.style.left=`${r.left+A+10}px`,a.style.top=`${r.top+z-15}px`,a.style.zIndex="8",p.innerText=`${Number.parseFloat(e).toFixed(3)}`,p.style.position="absolute",p.style.left=`${r.left+A+28}px`,p.style.top=`${r.top+z-8}px`,p.style.font="bold 16px sans-serif",p.style.color="white",p.style.zIndex="999",p.style.fontFamily="Sen",document.body.appendChild(p),document.body.appendChild(a),i.setOption(m)}I(async()=>{s=await h.getReport(),y=s.sex,d=await h.getResilienceData(y),$=Number(s.G0yourscore),v=Number(s.G2yourscore),n=Number(s.chronologicalage),e=Number((v/$).toFixed(3));let r=d.data.filter(A=>A.y<e).length,m=d.data.length;l=Math.round(r/m*100),(l===100||l===0)&&(l=l===100?99:1),R()});function E(r){B[r?"unshift":"push"](()=>{u=r,x(0,u)})}return w.$$set=r=>{"service"in r&&x(1,h=r.service)},[u,h,E]}class N extends O{constructor(o){super(),W(this,o,Z,q,G,{service:1})}get service(){return this.$$.ctx[1]}set service(o){this.$$set({service:o}),D()}}customElements.define("ga-immune-resilience-index-scatter",M(N,{service:{}},[],[],!1));export{N as default};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as je,S as be,i as we,f as ye,s as Be,a as ke,d as Fe,g as pe,u as xe,k as ue,o as Ce,e as o,m as w,b as d,v as U,n as i,p as t,q as e,r as V}from"./index2.js";import{s as W,f as m,j as S}from"./helpers.js";function ze(r){ke(r,"svelte-8jht07",".main.svelte-8jht07{height:100%;width:100%;display:flex;flex-direction:column}.label.svelte-8jht07{height:15%;width:100%;display:flex;justify-content:center}.graph.svelte-8jht07{height:85%;width:100%;display:flex;align-items:center;justify-content:center;border:1px solid #09341F33;border-radius:10px}.graph-container.svelte-8jht07{width:85%;height:100%;display:flex;align-items:center;justify-content:space-between;position:relative}.colorBox.svelte-8jht07{height:7px;width:14.3%;border-radius:24px}.colorBoxShort.svelte-8jht07{height:7px;width:5%;border-radius:24px}.slider.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%;max-height:70px}.slider-number.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -120%);width:24%;font-size:0.71rem;color:white}.text-left.svelte-8jht07{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:62%;left:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-middle.svelte-8jht07{position:absolute;height:15%;top:62%;left:35%;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.text-right.svelte-8jht07{position:absolute;height:15%;border-left:1px solid #09341F33;border-right:1px solid #09341F33;top:62%;right:0;display:flex;align-items:center;justify-content:center;font-size:0.8rem;color:#09341F80}.slider-triangle.svelte-8jht07{display:flex;flex-direction:column;align-items:center;position:absolute;transform:translate(-50%, -90%);width:24%}")}function me(r){let n,l,a,c,f,y,$,p,B,g=W(r[0],"english")+"",k,j,R,F,s,_,ee,q,te,E,se,I,le,O,ie,Z,oe,H,re,J,ne,C,x,b,K,ae,z,D,X,P,Q=W(r[0],"english")+"",Y,ce,he,A,u,N,T,de,G,ve,L,ge,M;return{c(){n=o("div"),l=o("div"),a=w(`Immune resilience index ranks in the\xA0
|
|
2
|
+
`),c=o("span"),f=o("b"),y=w(r[0]),$=d(),p=o("sup"),B=o("b"),k=w(g),j=w(`
|
|
3
|
+
\xA0percentile:`),R=d(),F=o("div"),s=o("div"),_=o("div"),ee=d(),q=o("div"),te=d(),E=o("div"),se=d(),I=o("div"),le=d(),O=o("div"),ie=d(),Z=o("div"),oe=d(),H=o("div"),re=d(),J=o("div"),ne=d(),C=o("div"),x=U("svg"),b=U("rect"),ae=d(),z=o("div"),D=o("b"),X=w(r[0]),P=o("sup"),Y=w(Q),ce=w(" percentile"),he=d(),A=o("div"),u=U("svg"),N=U("path"),de=d(),G=o("div"),G.textContent="Suboptimal",ve=d(),L=o("div"),L.textContent="Average",ge=d(),M=o("div"),M.textContent="Optimal",i(c,"color",m(r[0])),i(c,"height","80%"),i(c,"display","flex"),i(p,"color",m(r[0])),i(p,"font-size","0.65rem"),t(l,"class","label svelte-8jht07"),t(_,"class","colorBoxShort svelte-8jht07"),i(_,"background-color","#DF2120"),t(q,"class","colorBox svelte-8jht07"),i(q,"background-color","#DF2120"),t(E,"class","colorBox svelte-8jht07"),i(E,"background-color","#F2800D"),t(I,"class","colorBox svelte-8jht07"),i(I,"background-color","#66CCAA"),t(O,"class","colorBox svelte-8jht07"),i(O,"background-color","#66CCAA"),t(Z,"class","colorBox svelte-8jht07"),i(Z,"background-color","#13A195"),t(H,"class","colorBox svelte-8jht07"),i(H,"background-color","#015566"),t(J,"class","colorBoxShort svelte-8jht07"),i(J,"background-color","#015566"),t(b,"width","100"),t(b,"height","24"),t(b,"rx","4"),t(b,"fill",K=m(r[0])),t(x,"width","100"),t(x,"height","24"),t(x,"viewBox","0 0 100 24"),t(x,"fill","none"),t(x,"xmlns","http://www.w3.org/2000/svg"),t(C,"class","slider svelte-8jht07"),i(C,"left",S(r[0])+"%"),i(P,"font-size","0.5rem"),t(z,"class","slider-number svelte-8jht07"),i(z,"left",S(r[0])+"%"),t(N,"d","M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L0 8.07577e-07L12 0L6.8 6.93333Z"),t(N,"fill",T=m(r[0])),t(u,"width","12"),t(u,"height","8"),t(u,"viewBox","0 0 12 8"),t(u,"fill","none"),t(u,"xmlns","http://www.w3.org/2000/svg"),t(A,"class","slider-triangle svelte-8jht07"),i(A,"left",S(r[0])+"%"),t(G,"class","text-left svelte-8jht07"),i(G,"width","34.7%"),t(L,"class","text-middle svelte-8jht07"),i(L,"width","29.5%"),t(M,"class","text-right svelte-8jht07"),i(M,"width","34.7%"),t(s,"class","graph-container svelte-8jht07"),t(F,"class","graph svelte-8jht07"),t(n,"class","main svelte-8jht07")},m(h,v){pe(h,n,v),e(n,l),e(l,a),e(l,c),e(c,f),e(f,y),e(l,$),e(l,p),e(p,B),e(B,k),e(l,j),e(n,R),e(n,F),e(F,s),e(s,_),e(s,ee),e(s,q),e(s,te),e(s,E),e(s,se),e(s,I),e(s,le),e(s,O),e(s,ie),e(s,Z),e(s,oe),e(s,H),e(s,re),e(s,J),e(s,ne),e(s,C),e(C,x),e(x,b),e(s,ae),e(s,z),e(z,D),e(D,X),e(D,P),e(P,Y),e(D,ce),e(s,he),e(s,A),e(A,u),e(u,N),e(s,de),e(s,G),e(s,ve),e(s,L),e(s,ge),e(s,M)},p(h,v){v&1&&V(y,h[0]),v&1&&i(c,"color",m(h[0])),v&1&&g!==(g=W(h[0],"english")+"")&&V(k,g),v&1&&i(p,"color",m(h[0])),v&1&&K!==(K=m(h[0]))&&t(b,"fill",K),v&1&&i(C,"left",S(h[0])+"%"),v&1&&V(X,h[0]),v&1&&Q!==(Q=W(h[0],"english")+"")&&V(Y,Q),v&1&&i(z,"left",S(h[0])+"%"),v&1&&T!==(T=m(h[0]))&&t(N,"fill",T),v&1&&i(A,"left",S(h[0])+"%")},d(h){h&&ue(n)}}}function Ae(r){let n,l=r[1]&&me(r);return{c(){l&&l.c(),n=Fe()},m(a,c){l&&l.m(a,c),pe(a,n,c)},p(a,[c]){a[1]?l?l.p(a,c):(l=me(a),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i:xe,o:xe,d(a){a&&ue(n),l&&l.d(a)}}}function Se(r,n,l){let{service:a=window.GaReportService}=n,c,f,y="",$=0,p=0,B=0,g=0,k=!1;return Ce(async()=>{c=await a.getReport(),y=c.sex,f=await a.getResilienceData(y),p=Number(c.G0yourscore),$=Number(c.G2yourscore),B=Number($/p);let j=f.data.filter(F=>F.y<B).length,R=f.data.length;l(0,g=Math.round(j/R*100)),(g===100||g===0)&&l(0,g=g===100?99:1),l(1,k=!0)}),r.$$set=j=>{"service"in j&&l(2,a=j.service)},[g,k,a]}class fe extends be{constructor(n){super(),we(this,n,Se,Ae,Be,{service:2},ze)}get service(){return this.$$.ctx[2]}set service(n){this.$$set({service:n}),ye()}}customElements.define("ga-immune-resilience-index",je(fe,{service:{}},[],[],!0));export{fe 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"),import("./biological-age-rank.wc.js"),import("./immune-resilience-index.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};
|
package/dist/init.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
class t{getReport(){return Promise.resolve(!0)}getScatterData(e,r){return Promise.resolve(!0)}getLineData(e,r){return Promise.resolve(!0)}getOverTimeData(){return Promise.resolve(!0)}getOverTimeDataIndexes(){return Promise.resolve(!0)}}function o(){window.GaWebComponentService=new t}export{o as init};
|
|
1
|
+
class t{getReport(){return Promise.resolve(!0)}getScatterData(e,r){return Promise.resolve(!0)}getResilienceData(e){return Promise.resolve(!0)}getLineData(e,r){return Promise.resolve(!0)}getOverTimeData(){return Promise.resolve(!0)}getOverTimeDataIndexes(){return Promise.resolve(!0)}}function o(){window.GaWebComponentService=new t}export{o as init};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,S as B,i as I,f as b,s as M,e as L,b as H,n as A,p as G,g as k,q as V,u as P,k as F,o as Z,A as q}from"./index2.js";import{g as X}from"./globals.js";import{
|
|
1
|
+
import{c as W,S as B,i as I,f as b,s as M,e as L,b as H,n as A,p as G,g as k,q as V,u as P,k as F,o as Z,A as q}from"./index2.js";import{g as X}from"./globals.js";import{a as E,f as _,h as j}from"./helpers.js";const{document:J}=X;function K(h){let e,a,t;return{c(){e=L("div"),a=H(),t=L("link"),A(e,"width","100%"),A(e,"height","100%"),A(e,"position","relative"),G(t,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),G(t,"rel","stylesheet")},m(r,c){k(r,e,c),h[4](e),k(r,a,c),V(J.head,t)},p:P,i:P,o:P,d(r){r&&(F(e),F(a)),h[4](null),F(t)}}}function Q(h,e,a){let{type:t}=e,{lang:r}=e,{service:c=window.GaReportService}=e,R=[{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"}],u,$,T,f=0,p=0,i={},v="",y=0,x;const g=R.find(o=>o.name===t);function m(){if(t=="shield"||t=="youth"||t=="median")return _(f);if(t=="mature"||t=="lifestyle")return j(f)}function D(){x&&(i=echarts.init(x,null,{devicePixelRatio:4,renderer:"svg"}));const o=x.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"34px",left:"37px",right:"44px",bottom:"28px"},dataset:[{source:$.data.map(s=>[s.x,s.y])},{source:T.data.map(s=>[s.x,s.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:E(r,"AGE"),nameTextStyle:{color:"#09341F",opacity:.8,fontSize:8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",fontSize:8,opacity:.8,formatter(s){return s===0||s===100?"":s}},splitLine:{show:!0}},yAxis:{min:0,max:.6,name:E(r,"INDEX_SCORE"),nameTextStyle:{color:"#09341F",opacity:.8,fontSize:8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",fontSize:8,opacity:.8,formatter(s){return s===0||s===.6?"":s}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},symbolSize:5,itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Result",type:"scatter",data:[{x:y,y:p}],itemStyle:{color:m()}},{name:"Average population",type:"line",smooth:!0,datasetIndex:1,symbol:"line",lineStyle:{name:"line",type:"line",color:"#09341F",opacity:.5,symbol:"none",width:2},showSymbol:!1}],graphic:[],legend:{show:!0,right:"50%",top:"1%",left:"67%",itemGap:.2,itemWidth:10,itemHeight:6,textStyle:{color:"#09341F",opacity:.8,fontSize:8},selected:{"Measured result":!0,"Population average":!0},inactiveColor:"#fff"}};i.setOption(d),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",y),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:m(),lineDash:[8,8],lineWidth:1.7},z:8}),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",p),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:m(),lineDash:[8,8],lineWidth:1.7},z:8}),d.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",y),cy:i.convertToPixel("yAxis",p),r:4},style:{fill:m(),stroke:"#FFFFFF",lineWidth:1},z:15});const z=i.convertToPixel("xAxis",y),C=i.convertToPixel("yAxis",p),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),l=document.createElement("div");n.setAttribute("width","52"),n.setAttribute("height","18"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.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"),w.setAttribute("fill",m());const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),S.setAttribute("fill",m()),n.appendChild(w),n.appendChild(S),n.style.position="absolute",n.style.left=`${o.left+z-95}px`,n.style.top=`${o.top+C-10}px`,n.style.zIndex="8",l.innerText=`${Number.parseFloat(p).toFixed(3)}`,l.style.position="absolute",l.style.left=`${o.left+z-79}px`,l.style.top=`${o.top+C-7}px`,l.style.font="bold 10px sans-serif",l.style.color="white",l.style.zIndex="999",l.style.fontFamily="Sen",document.body.appendChild(l),document.body.appendChild(n),i.setOption(d)}Z(async()=>{u=await c.getReport(),v=u.sex,$=await c.getScatterData(t,v),T=await c.getLineData(t,v),y=Number(u.chronologicalage),g&&(f=Number(u[g.csvPerc]),p=Number(u[g.csvScore])),D()});function O(o){q[o?"unshift":"push"](()=>{x=o,a(0,x)})}return h.$$set=o=>{"type"in o&&a(1,t=o.type),"lang"in o&&a(2,r=o.lang),"service"in o&&a(3,c=o.service)},[x,t,r,c,O]}class N extends B{constructor(e){super(),I(this,e,Q,K,M,{type:1,lang:2,service:3})}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),b()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),b()}get service(){return this.$$.ctx[3]}set service(e){this.$$set({service:e}),b()}}customElements.define("ga-scatter-plot-custom-clinical",W(N,{type:{},lang:{},service:{}},[],[],!1));export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,S as B,i as I,f as
|
|
1
|
+
import{c as W,S as B,i as I,f as b,s as M,e as L,b as H,n as A,p as G,g as k,q as j,u as P,k as F,o as V,A as Z}from"./index2.js";import{g as q}from"./globals.js";import{a as E,f as X,h as _}from"./helpers.js";const{document:J}=q;function K(m){let e,a,t;return{c(){e=L("div"),a=H(),t=L("link"),A(e,"width","100%"),A(e,"height","100%"),A(e,"position","relative"),G(t,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),G(t,"rel","stylesheet")},m(r,c){k(r,e,c),m[4](e),k(r,a,c),j(J.head,t)},p:P,i:P,o:P,d(r){r&&(F(e),F(a)),m[4](null),F(t)}}}function Q(m,e,a){let{type:t}=e,{lang:r}=e,{service:c=window.GaReportService}=e,R=[{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"}],u,$,T,f=0,p=0,i={},v="",y=0,x;const g=R.find(s=>s.name===t);function h(){if(t=="shield"||t=="youth"||t=="median")return X(f);if(t=="mature"||t=="lifestyle")return _(f)}function D(){x&&(i=echarts.init(x,null,{devicePixelRatio:4,renderer:"svg"}));const s=x.getBoundingClientRect();var d={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"transparent",grid:{top:"34px",left:"37px",right:"44px",bottom:"28px"},dataset:[{source:$.data.map(o=>[o.x,o.y])},{source:T.data.map(o=>[o.x,o.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:E(r,"AGE"),nameTextStyle:{color:"#09341F",opacity:.8,fontSize:8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[8]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",fontSize:8,opacity:.8,formatter(o){return o===0||o===100?"":o}},splitLine:{show:!0}},yAxis:{min:0,max:.6,name:E(r,"INDEX_SCORE"),nameTextStyle:{color:"#09341F",opacity:.8,fontSize:8},axisLine:{show:!0,lineStyle:{color:"#09341F",opacity:.1},symbol:["none","arrow"],symbolSize:[5,10],symbolOffset:[5]},axisTick:{show:!1},axisLabel:{show:!0,color:"#09341F",fontSize:8,opacity:.8,formatter(o){return o===0||o===.6?"":o}},splitLine:{show:!0}},series:[{type:"scatter",tooltip:{},itemStyle:{color:"#09341F",opacity:.1,borderWidth:1}},{name:"Rezultat",type:"scatter",data:[{x:y,y:p}],itemStyle:{color:h()}},{name:"Prosje\u010Dna populacija",type:"line",smooth:!0,datasetIndex:1,symbol:"line",lineStyle:{name:"line",type:"line",color:"#09341F",opacity:.5,symbol:"none",width:5},showSymbol:!1}],graphic:[],legend:{show:!0,right:"50%",top:"1%",left:"67%",itemGap:.2,itemWidth:10,itemHeight:6,textStyle:{color:"#09341F",opacity:.8,fontSize:8},selected:{"Measured result":!0,"Population average":!0},inactiveColor:"#fff"}};i.setOption(d),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",y),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:h(),lineDash:[8,8],lineWidth:1.7},z:8}),d.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",p),x2:i.convertToPixel("xAxis",y),y2:i.convertToPixel("yAxis",p)},style:{stroke:h(),lineDash:[8,8],lineWidth:1.7},z:8}),d.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",y),cy:i.convertToPixel("yAxis",p),r:4},style:{fill:h(),stroke:"#FFFFFF",lineWidth:1},z:15});const z=i.convertToPixel("xAxis",y),C=i.convertToPixel("yAxis",p),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),l=document.createElement("div");n.setAttribute("width","52"),n.setAttribute("height","18"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const w=document.createElementNS("http://www.w3.org/2000/svg","path");w.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"),w.setAttribute("fill",h());const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),S.setAttribute("fill",h()),n.appendChild(w),n.appendChild(S),n.style.position="absolute",n.style.left=`${s.left+z-95}px`,n.style.top=`${s.top+C-10}px`,n.style.zIndex="8",l.innerText=`${Number.parseFloat(p).toFixed(3)}`,l.style.position="absolute",l.style.left=`${s.left+z-79}px`,l.style.top=`${s.top+C-7}px`,l.style.font="bold 10px sans-serif",l.style.color="white",l.style.zIndex="999",l.style.fontFamily="Sen",document.body.appendChild(l),document.body.appendChild(n),i.setOption(d)}V(async()=>{u=await c.getReport(),v=u.sex,$=await c.getScatterData(t,v),T=await c.getLineData(t,v),y=Number(u.chronologicalage),g&&(f=Number(u[g.csvPerc]),p=Number(u[g.csvScore])),D()});function O(s){Z[s?"unshift":"push"](()=>{x=s,a(0,x)})}return m.$$set=s=>{"type"in s&&a(1,t=s.type),"lang"in s&&a(2,r=s.lang),"service"in s&&a(3,c=s.service)},[x,t,r,c,O]}class N extends B{constructor(e){super(),I(this,e,Q,K,M,{type:1,lang:2,service:3})}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),b()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),b()}get service(){return this.$$.ctx[3]}set service(e){this.$$set({service:e}),b()}}customElements.define("ga-scatter-plot-custom",W(N,{type:{},lang:{},service:{}},[],[],!1));export{N as default};
|