1import{r as mt,ax as xt,aw as gn,Y as m,j as yt,af as k,l as x,i,aB as uo,k as F,T as fo,h as I,a1 as w,U as ho,p as oe,ay as Xt,_ as po,F as L,a3 as X,ab as p,o as vt,b as go,aq as bo,a9 as mo,A as xo,ak as bn,aC as yo,x as vo,al as wo,M as ke,m as _o}from"./CaybM7gS.js";import{u as wt}from"./CfOA-LQy.js";import{u as _t}from"./Bq2fhhqZ.js";import{u as ko}from"./COPO4-hG.js";import{_ as Co}from"./DlAUqK2U.js";import Mo from"./BiYVrgUB.js";import So from"./29Q671Qy.js";import{_ as Do}from"./_-FEXMY9.js";import{L as Po}from"./Bbr1hMko.js";import{v as he,q as pe,c as Ie,E as re,K,m as kt,l as q,J as Le,P as N,j as Ao,N as $o,r as fe,R as mn,h as To,M as jo,D as Ro,A as Io,O as Me,u as xn,i as Ct,Q as ve,H as Re,g as Nt,T as yn,G as Eo,t as Vt,I as it,o as Ut,k as Bo,y as Lo,z as Oo,x as Ho,d as zo,f as Yo,C as Wo,e as Fo,p as Xo}from"./DDGg5ogn.js";import{u as vn}from"./Cs1w09T_.js";import{_ as No}from"./DfAj_3LY.js";import{u as Vo}from"./CktrrqRO.js";import"./C53JRSck.js";const Uo={class:"relative max-w-lg w-[90%]"},qo=["src"],Jo=mt({__name:"HomepageModal",async setup(t){let e,n;const{getMediaUrl:o}=wt(),{data:s}=([e,n]=xt(()=>_t("/home-popup",{query:{populate:"*"}},"$_gL9QkSfTQ")),e=await e,n(),e),a=I(()=>{const d=s.value?.data;return d?.image?o(d.image.url):null}),r=I(()=>{const d=s.value?.data;if(!d?.isActive)return!1;const c=new Date;return!(d.startDate&&c<new Date(d.startDate)||d.endDate&&c>new Date(d.endDate))}),l=w(!1);return gn(r,d=>{l.value=d},{immediate:!0}),(d,c)=>(m(),yt(fo,{to:"body"},[k(l)&&k(a)?(m(),x("div",{key:0,class:"fixed inset-0 z-[99999] flex items-center justify-center bg-black/50",onClick:c[1]||(c[1]=uo(f=>l.value=!1,["self"]))},[i("div",Uo,[i("button",{type:"button",class:"absolute -top-3 -right-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white text-gray-700 shadow-md hover:bg-gray-100 transition","aria-label":"Close modal",onClick:c[0]||(c[0]=f=>l.value=!1)},[...c[2]||(c[2]=[i("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[i("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])]),i("img",{src:k(a),alt:"Homepage announcement",class:"w-full rounded-2xl object-contain"},null,8,qo)])])):F("",!0)]))}}),Ko=Object.assign(Jo,{__name:"HomepageModal"}),Go={class:"relative aspect-[1762/734] bg-primary-100"},Qo={class:"absolute bottom-[50px] right-[88px] z-10 hidden sm:flex gap-[20px] items-center"},Zo=["href"],es={class:"content block absolute w-[250px] sm:w-[625px] top-1/2 -translate-y-1/2 transform left-[28px] sm:left-[100px]"},ts={class:"font-[900] text-[20px] sm:text-[55px] text-white"},ns={class:"font-[700] text-[12px] sm:text-[20px] text-white"},os=["src"],ss=["src"],as=mt({__name:"Carousel",props:{slides:{},enableLoop:{type:Boolean,default:!1},autoplayInterval:{default:30}},setup(t){const e=t,n=w(null),o=w(null),s=ko(n,{loop:e.enableLoop,autoplay:{delay:e.autoplayInterval?e.autoplayInterval*1e3:3e4,disableOnInteraction:!1},creativeEffect:{prev:{shadow:!0,translate:[0,0,-400]},next:{shadow:!0,translate:[0,0,-400]}}});ho(()=>{s.instance.value&&o.value&&(s.instance.value.params.pagination={el:o.value,clickable:!0,type:"bullets"},s.instance.value.pagination.init(),s.instance.value.pagination.render(),s.instance.value.pagination.update())});const{getMediaUrl:a}=wt(),r=l=>[".mp4",".webm",".ogg",".mov",".avi"].some(c=>l.toLowerCase().endsWith(c));return(l,d)=>{const c=go,f=po;return m(),x("div",Go,[i("div",Qo,[i("button",{class:"bg-white h-[40px] w-[40px] flex items-center justify-center rounded-[50px]",onClick:d[0]||(d[0]=h=>k(s).prev())},[...d[2]||(d[2]=[i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M17 12H7M7 12L11 8M7 12L11 16",stroke:"#6EBE46","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),i("div",{ref_key:"paginationRef",ref:o,class:"swiper-pagination swiper-pagination-custom"},null,512),i("button",{class:"bg-white h-[40px] w-[40px] flex items-center justify-center rounded-[50px]",onClick:d[1]||(d[1]=h=>k(s).next())},[...d[3]||(d[3]=[i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i("path",{d:"M7 12H17M17 12L13 8M17 12L13 16",stroke:"#6EBE46","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])]),oe(f,null,{default:Xt(()=>[i("swiper-container",{ref_key:"containerRef",ref:n,init:!1},[(m(!0),x(L,null,X(e.slides,(h,g)=>(m(),x("swiper-slide",{key:g,class:"aspect-[1762/734] bg-1-primary-green relative"},[i("a",{href:h.URL,target:"_blank"},[i("div",es,[i("p",ts,p(h.Title),1),i("p",ns,p(h.Description),1),h.CTA?(m(),yt(c,{key:0,class:"mt-[12px]"},{default:Xt(()=>[vt(p(h.CTA),1)]),_:2},1024)):F("",!0)]),h.DesktopImage?.url&&r(h.DesktopImage.url)?(m(),x("video",{key:0,class:"aspect-[1762/734]
1w-full object-contain sm:object-cover",src:k(a)(h.DesktopImage.url),playsinline:"",muted:"",autoplay:"",loop:""},null,8,os)):h.DesktopImage?.url?(m(),x("img",{key:1,class:"aspect-[1762/734] w-full object-contain sm:object-cover",src:k(a)(h.DesktopImage.url),alt:""},null,8,ss)):F("",!0)],8,Zo)]))),128))],512)]),_:1})])}}}),rs=Object.assign(Co(as,[["__scopeId","data-v-13e93408"]]),{__name:"Carousel"}),ls=""+new URL("calculator-v3.DMwnAHrd.png",import.meta.url).href;const qt={modes:{point(t,e){return Ee(t,e,{intersect:!0})},nearest(t,e,n){return cs(t,e,n)},x(t,e,n){return Ee(t,e,{intersect:n.intersect,axis:"x"})},y(t,e,n){return Ee(t,e,{intersect:n.intersect,axis:"y"})}}};function Mt(t,e,n){return(qt.modes[n.mode]||qt.modes.nearest)(t,e,n)}function is(t,e,n){return n!=="x"&&n!=="y"?t.inRange(e.x,e.y,"x",!0)||t.inRange(e.x,e.y,"y",!0):t.inRange(e.x,e.y,n,!0)}function ds(t,e,n){return n==="x"?{x:t.x,y:e.y}:n==="y"?{x:e.x,y:t.y}:e}function Ee(t,e,n){return t.filter(o=>n.intersect?o.inRange(e.x,e.y):is(o,e,n.axis))}function cs(t,e,n){let o=Number.POSITIVE_INFINITY;return Ee(t,e,n).reduce((s,a)=>{const r=a.getCenterPoint(),l=ds(e,r,n.axis),d=kt(e,l);return d<o?(s=[a],o=d):d===o&&s.push(a),s},[]).sort((s,a)=>s._index-a._index).slice(0,1)}function le(t,e,n){const o=Math.cos(n),s=Math.sin(n),a=e.x,r=e.y;return{x:a+o*(t.x-a)-s*(t.y-r),y:r+s*(t.x-a)+o*(t.y-r)}}const us=(t,e)=>e>t||t.length>e.length&&t.slice(0,e.length)===e,se=.001,Oe=(t,e,n)=>Math.min(n,Math.max(e,t)),wn=(t,e)=>t.value>=t.start-e&&t.value<=t.end+e;function fs(t,e,n){for(const o of Object.keys(t))t[o]=Oe(t[o],e,n);return t}function hs(t,e,n,o){return!t||!e||n<=0?!1:Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(n+o,2)}function _n(t,{x:e,y:n,x2:o,y2:s},a,{borderWidth:r,hitTolerance:l}){const d=(r+l)/2,c=t.x>=e-d-se&&t.x<=o+d+se,f=t.y>=n-d-se&&t.y<=s+d+se;return a==="x"?c:(a==="y"||c)&&f}function kn(t,{rect:e,center:n},o,{rotation:s,borderWidth:a,hitTolerance:r}){const l=le(t,n,K(-s));return _n(l,e,o,{borderWidth:a,hitTolerance:r})}function ie(t,e){const{centerX:n,centerY:o}=t.getProps(["centerX","centerY"],e);return{x:n,y:o}}function ps(t,e,n,o=!0){const s=n.split(".");let a=0;for(const r of e.split(".")){const l=s[a++];if(parseInt(r,10)<parseInt(l,10))break;if(us(l,r)){if(o)throw new Error(`${t} v${n} is not supported. v${e} or newer is required.`);return!1}}return!0}const Cn=t=>typeof t=="string"&&t.endsWith("%"),Mn=t=>parseFloat(t)/100,Sn=t=>Oe(Mn(t),0,1),we=(t,e)=>({x:t,y:e,x2:t,y2:e,width:0,height:0}),gs={box:t=>we(t.centerX,t.centerY),doughnutLabel:t=>we(t.centerX,t.centerY),ellipse:t=>({centerX:t.centerX,centerY:t.centerX,radius:0,width:0,height:0}),label:t=>we(t.centerX,t.centerY),line:t=>we(t.x,t.y),point:t=>({centerX:t.centerX,centerY:t.centerY,radius:0,width:0,height:0}),polygon:t=>we(t.centerX,t.centerY)};function St(t,e){return e==="start"?0:e==="end"?t:Cn(e)?Sn(e)*t:t/2}function te(t,e,n=!0){return typeof e=="number"?e:Cn(e)?(n?Sn(e):Mn(e))*t:t}function bs(t,e){const{x:n,width:o}=t,s=e.textAlign;return s==="center"?n+o/2:s==="end"||s==="right"?n+o:n}function Dn(t,e,{borderWidth:n,position:o,xAdjust:s,yAdjust:a},r){const l=he(r),d=e.width+(l?r.width:0)+n,c=e.height+(l?r.height:0)+n,f=Dt(o),h=Jt(t.x,d,s,f.x),g=Jt(t.y,c,a,f.y);return{x:h,y:g,x2:h+d,y2:g+c,width:d,height:c,centerX:h+d/2,centerY:g+c/2}}function Dt(t,e="center"){return he(t)?{x:Me(t.x,e),y:Me(t.y,e)}:(t=Me(t,e),{x:t,y:t})}const Pn=(t,e)=>t&&t.autoFit&&e<1;function An(t,e){const n=t.font,o=pe(n)?n:[n];return Pn(t,e)?o.map(function(s){const a=it(s);return a.size=Math.floor(s.size*e),a.lineHeight=s.lineHeight,it(a)}):o.map(s=>it(s))}function $n(t){return t&&(q(t.xValue)||q(t.yValue))}function Jt(t,e,n=0,o){return t-St(e,o)+n}function be(t,e,n){const o=n.init;if(o){if(o===!0)return jn(e,n)}else return;return ms(t,e,n)}function Tn(t,e,n){let o=!1;return e.forEach(s=>{fe(t[s])?(o=!0,n[s]=t[s]):q(n[s])&&delete n[s]}),o}function jn(t,e){const n=e.type||"line";return gs[n](t)}function ms(t,e,n){const o=Ct(n.init,[{chart:t,properties:e,options:n}]);if(o===!0)return jn(e,n);if(he(o))return o}const dt=new Map,xs=t=>isNaN(t)||t<=0,ys=t=>t.reduce(function(e,n){return e+=n.string,e},"");function He(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object HTMLImageElement]"||e==="[object HTMLCanvasElement]"}}function ze(t,{x:e,y:n},o){o&&(t.translate(e,n),t.rotate(K(o)),t.translate(-e,-n))}function J(t,e){if(e&&e.borderWidth)return t.lineCap=e.borderCapStyle||"butt",t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle||"miter",t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,!0}function me(t,e){t.shadowColor=e.backgroundShadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY}function Ye(t,e){const n=e.content;if(He(n))return{width:te(n.width,e.width),height:te(n.height,e.height)};const o=An(e),s=e.textStrokeWidth,a=pe(n)?n:[n],r=a.join()+ys(o)+s+(t._measureText?"-spriting":"");return dt.has(r)||dt.set(r,ks(t,a,o,s)),dt.get(r)}function Rn(t,e,n){const{x:o,y:s,width:a,height:r}=e;t.save(),me(t,n);const l=J(t,n);t.fillStyle=n.backgroundColor,t.beginPath(),To(t,{x:o,y:s,w:a,h:r,radius:fs(jo(n.borderRadius),0,Math.min(a,r)/2)}),t.closePath(),t.fill(),l&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore(
1)}function In(t,e,n,o){const s=n.content;if(He(s)){t.save(),t.globalAlpha=Ss(n.opacity,s.style.opacity),t.drawImage(s,e.x,e.y,e.width,e.height),t.restore();return}const a=pe(s)?s:[s],r=An(n,o),l=n.color,d=pe(l)?l:[l],c=bs(e,n),f=e.y+n.textStrokeWidth/2;t.save(),t.textBaseline="middle",t.textAlign=n.textAlign,vs(t,n)&&Cs(t,{x:c,y:f},a,r),Ms(t,{x:c,y:f},a,{fonts:r,colors:d}),t.restore()}function vs(t,e){if(e.textStrokeWidth>0)return t.lineJoin="round",t.miterLimit=2,t.lineWidth=e.textStrokeWidth,t.strokeStyle=e.textStrokeColor,!0}function ws(t,e,n,o){const{radius:s,options:a}=e,r=a.pointStyle,l=a.rotation;let d=(l||0)*mn;if(He(r)){t.save(),t.translate(n,o),t.rotate(d),t.drawImage(r,-r.width/2,-r.height/2,r.width,r.height),t.restore();return}xs(s)||_s(t,{x:n,y:o,radius:s,rotation:l,style:r,rad:d})}function _s(t,{x:e,y:n,radius:o,rotation:s,style:a,rad:r}){let l,d,c,f;switch(t.beginPath(),a){default:t.arc(e,n,o,0,yn),t.closePath();break;case"triangle":t.moveTo(e+Math.sin(r)*o,n-Math.cos(r)*o),r+=Nt,t.lineTo(e+Math.sin(r)*o,n-Math.cos(r)*o),r+=Nt,t.lineTo(e+Math.sin(r)*o,n-Math.cos(r)*o),t.closePath();break;case"rectRounded":f=o*.516,c=o-f,l=Math.cos(r+ve)*c,d=Math.sin(r+ve)*c,t.arc(e-l,n-d,f,r-N,r-Re),t.arc(e+d,n-l,f,r-Re,r),t.arc(e+l,n+d,f,r,r+Re),t.arc(e-d,n+l,f,r+Re,r+N),t.closePath();break;case"rect":if(!s){c=Math.SQRT1_2*o,t.rect(e-c,n-c,2*c,2*c);break}r+=ve;case"rectRot":l=Math.cos(r)*o,d=Math.sin(r)*o,t.moveTo(e-l,n-d),t.lineTo(e+d,n-l),t.lineTo(e+l,n+d),t.lineTo(e-d,n+l),t.closePath();break;case"crossRot":r+=ve;case"cross":l=Math.cos(r)*o,d=Math.sin(r)*o,t.moveTo(e-l,n-d),t.lineTo(e+l,n+d),t.moveTo(e+d,n-l),t.lineTo(e-d,n+l);break;case"star":l=Math.cos(r)*o,d=Math.sin(r)*o,t.moveTo(e-l,n-d),t.lineTo(e+l,n+d),t.moveTo(e+d,n-l),t.lineTo(e-d,n+l),r+=ve,l=Math.cos(r)*o,d=Math.sin(r)*o,t.moveTo(e-l,n-d),t.lineTo(e+l,n+d),t.moveTo(e+d,n-l),t.lineTo(e-d,n+l);break;case"line":l=Math.cos(r)*o,d=Math.sin(r)*o,t.moveTo(e-l,n-d),t.lineTo(e+l,n+d);break;case"dash":t.moveTo(e,n),t.lineTo(e+Math.cos(r)*o,n+Math.sin(r)*o);break}t.fill()}function ks(t,e,n,o){t.save();const s=e.length;let a=0,r=o;for(let l=0;l<s;l++){const d=n[Math.min(l,n.length-1)];t.font=d.string;const c=e[l];a=Math.max(a,t.measureText(c).width+o),r+=d.lineHeight}return t.restore(),{width:a,height:r}}function Cs(t,{x:e,y:n},o,s){t.beginPath();let a=0;o.forEach(function(r,l){const d=s[Math.min(l,s.length-1)],c=d.lineHeight;t.font=d.string,t.strokeText(r,e,n+c/2+a),a+=c}),t.stroke()}function Ms(t,{x:e,y:n},o,{fonts:s,colors:a}){let r=0;o.forEach(function(l,d){const c=a[Math.min(d,a.length-1)],f=s[Math.min(d,s.length-1)],h=f.lineHeight;t.beginPath(),t.font=f.string,t.fillStyle=c,t.fillText(l,e,n+h/2+r),r+=h,t.fill()})}function Ss(t,e){const n=Vt(t)?t:e;return Vt(n)?Oe(n,0,1):1}const En=["left","bottom","top","right"];function Ds(t,e){const{pointX:n,pointY:o,options:s}=e,a=s.callout,r=a&&a.display&&js(e,a);if(!r||Is(e,a,r))return;if(t.save(),t.beginPath(),!J(t,a))return t.restore();const{separatorStart:d,separatorEnd:c}=Ps(e,r),{sideStart:f,sideEnd:h}=$s(e,r,d);(a.margin>0||s.borderWidth===0)&&(t.moveTo(d.x,d.y),t.lineTo(c.x,c.y)),t.moveTo(f.x,f.y),t.lineTo(h.x,h.y);const g=le({x:n,y:o},e.getCenterPoint(),K(-e.rotation));t.lineTo(g.x,g.y),t.stroke(),t.restore()}function Ps(t,e){const{x:n,y:o,x2:s,y2:a}=t,r=As(t,e);let l,d;return e==="left"||e==="right"?(l={x:n+r,y:o},d={x:l.x,y:a}):(l={x:n,y:o+r},d={x:s,y:l.y}),{separatorStart:l,separatorEnd:d}}function As(t,e){const{width:n,height:o,options:s}=t,a=s.callout.margin+s.borderWidth/2;return e==="right"?n+a:e==="bottom"?o+a:-a}function $s(t,e,n){const{y:o,width:s,height:a,options:r}=t,l=r.callout.start,d=Ts(e,r.callout);let c,f;return e==="left"||e==="right"?(c={x:n.x,y:o+te(a,l)},f={x:c.x+d,y:c.y}):(c={x:n.x+te(s,l),y:n.y},f={x:c.x,y:c.y+d}),{sideStart:c,sideEnd:f}}function Ts(t,e){const n=e.side;return t==="left"||t==="top"?-n:n}function js(t,e){const n=e.position;return En.includes(n)?n:Rs(t,e)}function Rs(t,e){const{x:n,y:o,x2:s,y2:a,width:r,height:l,pointX:d,pointY:c,centerX:f,centerY:h,rotation:g}=t,C={x:f,y:h},S=e.start,P=te(r,S),O=te(l,S),y=[n,n+P,n+P,s],_=[o+O,a,o,a],v=[];for(let D=0;D<4;D++){const H=le({x:y[D],y:_[D]},C,K(g));v.push({position:En[D],distance:kt(H,{x:d,y:c})})}return v.sort((D,H)=>D.distance-H.distance)[0].position}function Is(t,e,n){const{pointX:o,pointY:s}=t,a=e.margin;let r=o,l=s;return n==="left"?r+=a:n==="right"?r-=a:n==="top"?l+=a:n==="bottom"&&(l
1-=a),t.inRange(r,l)}const Kt={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function ge(t,e,n){return e=typeof e=="number"?e:t.parse(e),xn(e)?t.getPixelForValue(e):n}function ae(t,e,n){const o=e[n];if(o||n==="scaleID")return o;const s=n.charAt(0),a=Object.values(t).filter(r=>r.axis&&r.axis===s);return a.length?a[0].id:s}function Bn(t,e){if(t){const n=t.options.reverse,o=ge(t,e.min,n?e.end:e.start),s=ge(t,e.max,n?e.start:e.end);return{start:o,end:s}}}function Ln(t,e){const{chartArea:n,scales:o}=t,s=o[ae(o,e,"xScaleID")],a=o[ae(o,e,"yScaleID")];let r=n.width/2,l=n.height/2;return s&&(r=ge(s,e.xValue,s.left+s.width/2)),a&&(l=ge(a,e.yValue,a.top+a.height/2)),{x:r,y:l}}function Pt(t,e){const n=t.scales,o=n[ae(n,e,"xScaleID")],s=n[ae(n,e,"yScaleID")];if(!o&&!s)return{};let{left:a,right:r}=o||t.chartArea,{top:l,bottom:d}=s||t.chartArea;const c=Gt(o,{min:e.xMin,max:e.xMax,start:a,end:r});a=c.start,r=c.end;const f=Gt(s,{min:e.yMin,max:e.yMax,start:d,end:l});return l=f.start,d=f.end,{x:a,y:l,x2:r,y2:d,width:r-a,height:d-l,centerX:a+(r-a)/2,centerY:l+(d-l)/2}}function On(t,e){if(!$n(e)){const n=Pt(t,e);let o=e.radius;(!o||isNaN(o))&&(o=Math.min(n.width,n.height)/2,e.radius=o);const s=o*2,a=n.centerX+e.xAdjust,r=n.centerY+e.yAdjust;return{x:a-o,y:r-o,x2:a+o,y2:r+o,centerX:a,centerY:r,width:s,height:s,radius:o}}return Bs(t,e)}function Es(t,e){const{scales:n,chartArea:o}=t,s=n[e.scaleID],a={x:o.left,y:o.top,x2:o.right,y2:o.bottom};return s?Ls(s,a,e):Os(n,a,e),a}function Hn(t,e){const n=Pt(t,e);return n.initProperties=be(t,n,e),n.elements=[{type:"label",optionScope:"label",properties:Ys(t,n,e),initProperties:n.initProperties}],n}function Bs(t,e){const n=Ln(t,e),o=e.radius*2;return{x:n.x-e.radius+e.xAdjust,y:n.y-e.radius+e.yAdjust,x2:n.x+e.radius+e.xAdjust,y2:n.y+e.radius+e.yAdjust,centerX:n.x+e.xAdjust,centerY:n.y+e.yAdjust,radius:e.radius,width:o,height:o}}function Gt(t,e){const n=Bn(t,e)||e;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function Ls(t,e,n){const o=ge(t,n.value,NaN),s=ge(t,n.endValue,o);t.isHorizontal()?(e.x=o,e.x2=s):(e.y=o,e.y2=s)}function Os(t,e,n){for(const o of Object.keys(Kt)){const s=t[ae(t,n,o)];if(s){const{min:a,max:r,start:l,end:d,startProp:c,endProp:f}=Kt[o],h=Bn(s,{min:n[a],max:n[r],start:s[l],end:s[d]});e[c]=h.start,e[f]=h.end}}}function Hs({properties:t,options:e},n,o,s){const{x:a,x2:r,width:l}=t;return zn({start:a,end:r,borderWidth:e.borderWidth},{position:o.x,padding:{start:s.left,end:s.right},adjust:e.label.xAdjust,size:n.width})}function zs({properties:t,options:e},n,o,s){const{y:a,y2:r,height:l}=t;return zn({start:a,end:r,borderWidth:e.borderWidth},{position:o.y,padding:{start:s.top,end:s.bottom},adjust:e.label.yAdjust,size:n.height})}function zn(t,e){const{start:n,end:o,borderWidth:s}=t,{position:a,padding:{start:r,end:l},adjust:d}=e,c=o-s-n-r-l-e.size;return n+s/2+d+St(c,a)}function Ys(t,e,n){const o=n.label;o.backgroundColor="transparent",o.callout.display=!1;const s=Dt(o.position),a=Le(o.padding),r=Ye(t.ctx,o),l=Hs({properties:e,options:n},r,s,a),d=zs({properties:e,options:n},r,s,a),c=r.width+a.width,f=r.height+a.height;return{x:l,y:d,x2:l+c,y2:d+f,width:c,height:f,centerX:l+c/2,centerY:d+f/2,rotation:o.rotation}}const ct=["enter","leave"],At=ct.concat("click");function Ws(t,e,n){e.listened=Tn(n,At,e.listeners),e.moveListened=!1,ct.forEach(o=>{fe(n[o])&&(e.moveListened=!0)}),(!e.listened||!e.moveListened)&&e.annotations.forEach(o=>{!e.listened&&fe(o.click)&&(e.listened=!0),e.moveListened||ct.forEach(s=>{fe(o[s])&&(e.listened=!0,e.moveListened=!0)})})}function Fs(t,e,n){if(t.listened)switch(e.type){case"mousemove":case"mouseout":return Xs(t,e,n);case"click":return Ns(t,e,n)}}function Xs(t,e,n){if(!t.moveListened)return;let o;e.type==="mousemove"?o=Mt(t.visibleElements,e,n.interaction):o=[];const s=t.hovered;t.hovered=o;const a={state:t,event:e};let r=Qt(a,"leave",s,o);return Qt(a,"enter",o,s)||r}function Qt({state:t,event:e},n,o,s){let a;for(const r of o)s.indexOf(r)<0&&(a=Yn(r.options[n]||t.listeners[n],r,e)||a);return a}
1function Ns(t,e,n){const o=t.listeners,s=Mt(t.visibleElements,e,n.interaction);let a;for(const r of s)a=Yn(r.options.click||o.click,r,e)||a;return a}function Yn(t,e,n){return Ct(t,[e.$context,n])===!0}const Be=["afterDraw","beforeDraw"];function Vs(t,e,n){const o=e.visibleElements;e.hooked=Tn(n,Be,e.hooks),e.hooked||o.forEach(s=>{e.hooked||Be.forEach(a=>{fe(s.options[a])&&(e.hooked=!0)})})}function Zt(t,e,n){if(t.hooked){const o=e.options[n]||t.hooks[n];return Ct(o,[e.$context])}}function Us(t,e,n){const o=Qs(t.scales,e,n);let s=en(e,o,"min","suggestedMin");s=en(e,o,"max","suggestedMax")||s,s&&fe(e.handleTickRangeOptions)&&e.handleTickRangeOptions()}function qs(t,e){for(const n of t)Ks(n,e)}function en(t,e,n,o){if(xn(e[n])&&!Js(t.options,n,o)){const s=t[n]!==e[n];return t[n]=e[n],s}}function Js(t,e,n){return q(t[e])||q(t[n])}function Ks(t,e){for(const n of["scaleID","xScaleID","yScaleID"]){const o=ae(e,t,n);o&&!e[o]&&Gs(t,n)&&console.warn(`No scale found with id '${o}' for annotation '${t.id}'`)}}function Gs(t,e){if(e==="scaleID")return!0;const n=e.charAt(0);for(const o of["Min","Max","Value"])if(q(t[n+o]))return!0;return!1}function Qs(t,e,n){const o=e.axis,s=e.id,a=o+"ScaleID",r={min:Me(e.min,Number.NEGATIVE_INFINITY),max:Me(e.max,Number.POSITIVE_INFINITY)};for(const l of n)l.scaleID===s?tn(l,e,["value","endValue"],r):ae(t,l,a)===s&&tn(l,e,[o+"Min",o+"Max",o+"Value"],r);return r}function tn(t,e,n,o){for(const s of n){const a=t[s];if(q(a)){const r=e.parse(a);o.min=Math.min(o.min,r),o.max=Math.max(o.max,r)}}}class xe extends re{inRange(e,n,o,s){const{x:a,y:r}=le({x:e,y:n},this.getCenterPoint(s),K(-this.options.rotation));return _n({x:a,y:r},this.getProps(["x","y","x2","y2"],s),o,this.options)}getCenterPoint(e){return ie(this,e)}draw(e){e.save(),ze(e,this.getCenterPoint(),this.options.rotation),Rn(e,this,this.options),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){return Hn(e,n)}}xe.id="boxAnnotation";xe.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,hitTolerance:0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};xe.defaultRoutes={borderColor:"color",backgroundColor:"color"};xe.descriptors={label:{_fallback:!0}};class We extends re{inRange(e,n,o,s){return kn({x:e,y:n},{rect:this.getProps(["x","y","x2","y2"],s),center:this.getCenterPoint(s)},o,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(e){return ie(this,e)}draw(e){const n=this.options;!n.display||!n.content||(sa(e,this),e.save(),ze(e,this.getCenterPoint(),this.rotation),In(e,this,n,this._fitRatio),e.restore())}resolveElementProperties(e,n){const o=Zs(e,n);if(!o)return{};const{controllerMeta:s,point:a,radius:r}=ta(e,n,o);let l=Ye(e.ctx,n);const d=na(l,r);Pn(n,d)&&(l={width:l.width*d,height:l.height*d});const{position:c,xAdjust:f,yAdjust:h}=n,g=Dn(a,l,{borderWidth:0,position:c,xAdjust:f,yAdjust:h});return{initProperties:be(e,g,n),...g,...s,rotation:n.rotation,_fitRatio:d}}}We.id="doughnutLabelAnnotation";We.defaults={autoFit:!0,autoHide:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderColor:"transparent",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:0,color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0};We.defaultRoutes={};function Zs(t,e){return t.getSortedVisibleDatasetMetas().reduce(function(n,o){const s=o.controller;return s instanceof Ro&&ea(t,e,o.data)&&(!n||s.innerRadius<n.controller.innerRadius)&&s.options.circumference>=90?o:n},void 0)}function ea(t,e,n){if(!e.autoHide)return!0;for(let o=0;o<n.length;o++)if(!n[o].hidden&&t.getDataVisibility(o))return!0}function ta({chartArea:t},e,n){const{left:o,top:s,right:a,bottom:r}=t,{innerRadius:l,offsetX:d,offsetY:c}=n.controller,f=(o+a)/2+d,h=(s+r)/2+c,g={left:Math.max(f-l,o),right:Math.min(f+l,a),top:Math.max(h-l,s),bottom:Math.min(h+l,r)},C={x:(g.left+g.right)/2,y:(g.top+g.bottom)/2},S=e.spacing+e.borderWidth/2,P=l-S,O=C.y>h,y=O?s+S:r-S,_=oa(y,f,h,P);return{controllerMeta:{_centerX:f,_centerY:h,_radius:P,_counterclockwise:O,..._},point:C,radius:Math.min(l,Math.min(g.right-g.left,g.bottom-g.top)/2)}}function na({width:t,height:e},n){const o=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));return n*2/o}function oa(t,e,n,o){const s=Math.pow(n-t,2),a=Math.pow(o,2),r=e*-2,l=Math.pow(e,2)+s-a,d=Math.pow(r,2)-4*l;if(d<=0)return{_startAngle:0,_endAngle:yn};const c=(-r-Math.sqrt(d))/2,f=(-r+Math.sqrt(d))/2;return{_startAngle:Ut({x:e,y:n},{x:c,y:t}).angle,_endAngle:Ut({x:e,y:n},{x:f,y:t}).angle}}function sa(t,e){const{_centerX:n,_centerY:o,_radius:s,_startAngle:a,_endAngle:r,_counterclockwise:l,options:d}=e;t.save();const c=J(t,d);t.fillStyle=d.backgroundColor,t.beginPath(),t.arc(n,o,s,a,r,l),t.closePath(),t.fill(),c&&t.stroke(),t.restore(
1)}class Se extends re{inRange(e,n,o,s){return kn({x:e,y:n},{rect:this.getProps(["x","y","x2","y2"],s),center:this.getCenterPoint(s)},o,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(e){return ie(this,e)}draw(e){const n=this.options,o=!q(this._visible)||this._visible;!n.display||!n.content||!o||(e.save(),ze(e,this.getCenterPoint(),this.rotation),Ds(e,this),Rn(e,this,n),In(e,aa(this),n),e.restore())}resolveElementProperties(e,n){let o;if($n(n))o=Ln(e,n);else{const{centerX:l,centerY:d}=Pt(e,n);o={x:l,y:d}}const s=Le(n.padding),a=Ye(e.ctx,n),r=Dn(o,a,n,s);return{initProperties:be(e,r,n),pointX:o.x,pointY:o.y,...r,rotation:n.rotation}}}Se.id="labelAnnotation";Se.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Se.defaultRoutes={borderColor:"color"};function aa({x:t,y:e,width:n,height:o,options:s}){const a=s.borderWidth/2,r=Le(s.padding);return{x:t+r.left+a,y:e+r.top+a,width:n-r.left-r.right-s.borderWidth,height:o-r.top-r.bottom-s.borderWidth}}const $t=(t,e,n)=>({x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}),ut=(t,e,n)=>$t(e,n,Math.abs((t-e.y)/(n.y-e.y))).x,nn=(t,e,n)=>$t(e,n,Math.abs((t-e.x)/(n.x-e.x))).y,Ce=t=>t*t,ra=(t,e,{x:n,y:o,x2:s,y2:a},r)=>r==="y"?{start:Math.min(o,a),end:Math.max(o,a),value:e}:{start:Math.min(n,s),end:Math.max(n,s),value:t},on=(t,e,n,o)=>(1-o)*(1-o)*t+2*(1-o)*o*e+o*o*n,ft=(t,e,n,o)=>({x:on(t.x,e.x,n.x,o),y:on(t.y,e.y,n.y,o)}),sn=(t,e,n,o)=>2*(1-o)*(e-t)+2*o*(n-e),an=(t,e,n,o)=>-Math.atan2(sn(t.x,e.x,n.x,o),sn(t.y,e.y,n.y,o))+.5*N;class De extends re{inRange(e,n,o,s){const a=(this.options.borderWidth+this.options.hitTolerance)/2;if(o!=="x"&&o!=="y"){const r={mouseX:e,mouseY:n},{path:l,ctx:d}=this;if(l){J(d,this.options),d.lineWidth+=this.options.hitTolerance;const{chart:f}=this.$context,h=e*f.currentDevicePixelRatio,g=n*f.currentDevicePixelRatio,C=d.isPointInStroke(l,h,g)||ht(this,r,s);
1return d.restore(),C}const c=Ce(a);return ca(this,r,c,s)||ht(this,r,s)}return la(this,{mouseX:e,mouseY:n},o,{hitSize:a,useFinalPosition:s})}getCenterPoint(e){return ie(this,e)}draw(e){const{x:n,y:o,x2:s,y2:a,cp:r,options:l}=this;if(e.save(),!J(e,l))return e.restore();me(e,l);const d=Math.sqrt(Math.pow(s-n,2)+Math.pow(a-o,2));if(l.curve&&r)return xa(e,this,r,d),e.restore();const{startOpts:c,endOpts:f,startAdjust:h,endAdjust:g}=Wn(this),C=Math.atan2(a-o,s-n);e.translate(n,o),e.rotate(C),e.beginPath(),e.moveTo(0+h,0),e.lineTo(d-g,0),e.shadowColor=l.borderShadowColor,e.stroke(),pt(e,0,h,c),pt(e,d,-g,f),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){const o=Es(e,n),{x:s,y:a,x2:r,y2:l}=o,d=ia(o,e.chartArea),c=d?da({x:s,y:a},{x:r,y:l},e.chartArea):{x:s,y:a,x2:r,y2:l,width:Math.abs(r-s),height:Math.abs(l-a)};if(c.centerX=(r+s)/2,c.centerY=(l+a)/2,c.initProperties=be(e,c,n),n.curve){const h={x:c.x,y:c.y},g={x:c.x2,y:c.y2};c.cp=ma(c,n,kt(h,g))}const f=ua(e,c,n.label);return f._visible=d,c.elements=[{type:"label",optionScope:"label",properties:f,initProperties:c.initProperties}],c}}De.id="lineAnnotation";const rn={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};De.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},rn),fill:!1,length:12,start:Object.assign({},rn),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,hitTolerance:0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},Se.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};De.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}};De.defaultRoutes={borderColor:"color"};function la(t,{mouseX:e,mouseY:n},o,{hitSize:s,useFinalPosition:a}){const r=ra(e,n,t.getProps(["x","y","x2","y2"],a),o);return wn(r,s)||ht(t,{mouseX:e,mouseY:n},a,o)}function ia({x:t,y:e,x2:n,y2:o},{top:s,right:a,bottom:r,left:l}){return!(t<l&&n<l||t>a&&n>a||e<s&&o<s||e>r&&o>r)}function ln({x:t,y:e},n,{top:o,right:s,bottom:a,left:r}){return t<r&&(e=nn(r,{x:t,y:e},n),t=r),t>s&&(e=nn(s,{x:t,y:e},n),t=s),e<o&&(t=ut(o,{x:t,y:e},n),e=o),e>a&&(t=ut(a,{x:t,y:e},n),e=a),{x:t,y:e}}function da(t,e,n){const{x:o,y:s}=ln(t,e,n),{x:a,y:r}=ln(e,t,n);return{x:o,y:s,x2:a,y2:r,width:Math.abs(a-o),height:Math.abs(r-s)}}function ca(t,{mouseX:e,mouseY:n},o=se,s){const{x:a,y:r,x2:l,y2:d}=t.getProps(["x","y","x2","y2"],s),c=l-a,f=d-r,h=Ce(c)+Ce(f),g=h===0?-1:((e-a)*c+(n-r)*f)/h;let C,S;return g<0?(C=a,S=r):g>1?(C=l,S=d):(C=a+g*c,S=r+g*f),Ce(e-C)+Ce(n-S)<=o}function ht(t,{mouseX:e,mouseY:n},o,s){const a=t.label;return a.options.display&&a.inRange(e,n,s,o)}function ua(t,e,n){const o=n.borderWidth,s=Le(n.padding),a=Ye(t.ctx,n),r=a.width+s.width+o,l=a.height+s.height+o;return ha(e,n,{width:r,height:l,padding:s},t.chartArea)}function fa(t){const{x:e,y:n,x2:o,y2:s}=t,a=Math.atan2(s-n,o-e);return a>N/2?a-N:a<N/-2?a+N:a}function ha(t,e,n,o){const{width:s,height:a,padding:r}=n,{xAdjust:l,yAdjust:d}=e,c={x:t.x,y:t.y},f={x:t.x2,y:t.y2},h=e.rotation==="auto"?fa(t):K(e.rotation),g=pa(s,a,h),C=ga(t,e,{labelSize:g,padding:r},o),S=t.cp?ft(c,t.cp,f,C):$t(c,f,C),P={size:g.w,min:o.left,max:o.right,padding:r.left},O={size:g.h,min:o.top,max:o.bottom,padding:r.top},y=cn(S.x,P)+l,_=cn(S.y,O)+d;return{x:y-s/2,y:_-a/2,x2:y+s/2,y2:_+a/2,centerX:y,centerY:_,pointX:S.x,pointY:S.y,width:s,height:a,rotation:Eo(h)}}function pa(t,e,n){const o=Math.cos(n),s=Math.sin(n);return{w:Math.abs(t*o)+Math.abs(e*s),h:Math.abs(t*s)+Math.abs(e*o)}}function ga(t,e,n,o){let s;const a=ba(t,o);return e.position==="start"?s=dn({w:t.x2-t.x,h:t.y2-t.y},n,e,a):e.position==="end"?s=1-dn({w:t.x-t.x2,h:t.y-t.y2},n,e,a):s=St(1,e.position),s}function dn(t,e,n,o){const{labelSize:s,padding:a}=e,r=t.w*o.dx,l=t.h*o.dy,d=r>0&&(s.w/2+a.left-o.x)/r,c=l>
10&&(s.h/2+a.top-o.y)/l;return Oe(Math.max(d,c),0,.25)}function ba(t,e){const{x:n,x2:o,y:s,y2:a}=t,r=Math.min(s,a)-e.top,l=Math.min(n,o)-e.left,d=e.bottom-Math.max(s,a),c=e.right-Math.max(n,o);return{x:Math.min(l,c),y:Math.min(r,d),dx:l<=c?1:-1,dy:r<=d?1:-1}}function cn(t,e){const{size:n,min:o,max:s,padding:a}=e,r=n/2;return n>s-o?(s+o)/2:(o>=t-a-r&&(t=o+a+r),s<=t+a+r&&(t=s-a-r),t)}function Wn(t){const e=t.options,n=e.arrowHeads&&e.arrowHeads.start,o=e.arrowHeads&&e.arrowHeads.end;return{startOpts:n,endOpts:o,startAdjust:un(t,n),endAdjust:un(t,o)}}function un(t,e){if(!e||!e.display)return 0;const{length:n,width:o}=e,s=t.options.borderWidth/2,a={x:n,y:o+s};return Math.abs(ut(0,a,{x:0,y:s}))}function pt(t,e,n,o){if(!o||!o.display)return;const{length:s,width:a,fill:r,backgroundColor:l,borderColor:d}=o,c=Math.abs(e-s)+n;t.beginPath(),me(t,o),J(t,o),t.moveTo(c,-a),t.lineTo(e+n,0),t.lineTo(c,a),r===!0?(t.fillStyle=l||d,t.closePath(),t.fill(),t.shadowColor="transparent"):t.shadowColor=o.borderShadowColor,t.stroke()}function ma(t,e,n){const{x:o,y:s,x2:a,y2:r,centerX:l,centerY:d}=t,c=Math.atan2(r-s,a-o),f=Dt(e.controlPoint,0),h={x:l+te(n,f.x,!1),y:d+te(n,f.y,!1)};return le(h,{x:l,y:d},c)}function fn(t,{x:e,y:n},{angle:o,adjust:s},a){!a||!a.display||(t.save(),t.translate(e,n),t.rotate(o),pt(t,0,-s,a),t.restore())}function xa(t,e,n,o){const{x:s,y:a,x2:r,y2:l,options:d}=e,{startOpts:c,endOpts:f,startAdjust:h,endAdjust:g}=Wn(e),C={x:s,y:a},S={x:r,y:l},P=an(C,n,S,0),O=an(C,n,S,1)-N,y=ft(C,n,S,h/o),_=ft(C,n,S,1-g/o),v=new Path2D;t.beginPath(),v.moveTo(y.x,y.y),v.quadraticCurveTo(n.x,n.y,_.x,_.y),t.shadowColor=d.borderShadowColor,t.stroke(v),e.path=v,e.ctx=t,fn(t,y,{angle:P,adjust:h},c),fn(t,_,{angle:O,adjust:g},f)}class Pe extends re{inRange(e,n,o,s){const a=this.options.rotation,r=(this.options.borderWidth+this.options.hitTolerance)/2;if(o!=="x"&&o!=="y")return ya({x:e,y:n},this.getProps(["width","height","centerX","centerY"],s),a,r);const{x:l,y:d,x2:c,y2:f}=this.getProps(["x","y","x2","y2"],s),h=o==="y"?{start:d,end:f}:{start:l,end:c},g=le({x:e,y:n},this.getCenterPoint(s),K(-a));return g[o]>=h.start-r-se&&g[o]<=h.end+r+se}getCenterPoint(e){return ie(this,e)}draw(e){const{width:n,height:o,centerX:s,centerY:a,options:r}=this;e.save(),ze(e,this.getCenterPoint(),r.rotation),me(e,this.options),e.beginPath(),e.fillStyle=r.backgroundColor;const l=J(e,r);e.ellipse(s,a,o/2,n/2,N/2,0,2*N),e.fill(),l&&(e.shadowColor=r.borderShadowColor,e.stroke()),e.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(e,n){return Hn(e,n)}}Pe.id="ellipseAnnotation";Pe.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},xe.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0};Pe.defaultRoutes={borderColor:"color",backgroundColor:"color"};Pe.descriptors={label:{_fallback:!0}};function ya(t,e,n,o){const{width:s,height:a,centerX:r,centerY:l}=e,d=s/2,c=a/2;if(d<=0||c<=0)return!1;const f=K(n||0),h=Math.cos(f),g=Math.sin(f),C=Math.pow(h*(t.x-r)+g*(t.y-l),2),S=Math.pow(g*(t.x-r)-h*(t.y-l),2);return C/Math.pow(d+o,2)+S/Math.pow(c+o,2)<=1.0001}class Fe extends re{inRange(e,n,o,s){const{x:a,y:r,x2:l,y2:d,width:c}=this.getProps(["x","y","x2","y2","width"],s),f=(this.options.borderWidth+this.options.hitTolerance)/2;return o!=="x"&&o!=="y"?hs({x:e,y:n},this.getCenterPoint(s),c/2,f):wn(o==="y"?{start:r,end:d,value:n}:{start:a,end:l,value:e},f)}getCenterPoint(e){return ie(this,e)}draw(e){const n=this.options,o=n.borderWidth;if(n.radius<.1)return;e.save(),e.fillStyle=n.backgroundColor,me(e,n);const s=J(e,n);ws(e,this,this.centerX,this.centerY),s&&!He(n.pointStyle)&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore(),n.borderWidth=o}resolveElementProperties(e,n){const o=On(e,n);return o.initProperties=be(e,o,n),o}}Fe.id="pointAnnotation";Fe.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Fe.defaultRoutes={borderColor:"color",backgroundColor:"color"};
1class Xe extends re{inRange(e,n,o,s){if(o!=="x"&&o!=="y")return this.options.radius>=.1&&this.elements.length>1&&wa(this.elements,e,n,s);const a=le({x:e,y:n},this.getCenterPoint(s),K(-this.options.rotation)),r=this.elements.map(c=>o==="y"?c.bY:c.bX),l=Math.min(...r),d=Math.max(...r);return a[o]>=l&&a[o]<=d}getCenterPoint(e){return ie(this,e)}draw(e){const{elements:n,options:o}=this;e.save(),e.beginPath(),e.fillStyle=o.backgroundColor,me(e,o);const s=J(e,o);let a=!0;for(const r of n)a?(e.moveTo(r.x,r.y),a=!1):e.lineTo(r.x,r.y);e.closePath(),e.fill(),s&&(e.shadowColor=o.borderShadowColor,e.stroke()),e.restore()}resolveElementProperties(e,n){const o=On(e,n),{sides:s,rotation:a}=n,r=[],l=2*N/s;let d=a*mn;for(let c=0;c<s;c++,d+=l){const f=va(o,n,d);f.initProperties=be(e,o,n),r.push(f)}return o.elements=r,o}}Xe.id="polygonAnnotation";Xe.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0};Xe.defaultRoutes={borderColor:"color",backgroundColor:"color"};function va({centerX:t,centerY:e},{radius:n,borderWidth:o,hitTolerance:s},a){const r=(o+s)/2,l=Math.sin(a),d=Math.cos(a),c={x:t+l*n,y:e-d*n};return{type:"point",optionScope:"point",properties:{x:c.x,y:c.y,centerX:c.x,centerY:c.y,bX:t+l*(n+r),bY:e-d*(n+r)}}}function wa(t,e,n,o){let s=!1,a=t[t.length-1].getProps(["bX","bY"],o);for(const r of t){const l=r.getProps(["bX","bY"],o);l.bY>n!=a.bY>n&&e<(a.bX-l.bX)*(n-l.bY)/(a.bY-l.bY)+l.bX&&(s=!s),a=l}return s}const ee={box:xe,doughnutLabel:We,ellipse:Pe,label:Se,line:De,point:Fe,polygon:Xe};Object.keys(ee).forEach(t=>{Bo.describe(`elements.${ee[t].id}`,{_fallback:"plugins.annotation.common"})});const _a={update:Object.assign},ka=At.concat(Be),hn=(t,e)=>he(e)?bt(t,e):t,gt=t=>t==="color"||t==="font";function Tt(t="line"){return ee[t]?t:(console.warn(`Unknown annotation type: '${t}', defaulting to 'line'`),"line")}function Ca(t,e,n,o){const s=Sa(t,n.animations,o),a=e.annotations,r=Aa(e.elements,a);for(let l=0;l<a.length;l++){const d=a[l],c=Fn(r,l,d.type),f=d.setContext(Pa(t,c,r,d)),h=c.resolveElementProperties(t,f);h.skip=Ma(h),"elements"in h&&(Da(c,h.elements,f,s),delete h.elements),q(c.x)||Object.assign(c,h),Object.assign(c,h.initProperties),h.options=Xn(f),s.update(c,h)}}function Ma(t){return isNaN(t.x)||isNaN(t.y)}function Sa(t,e,n){return n==="reset"||n==="none"||n==="resize"?_a:new Io(t,e)}function Da(t,e,n,o){const s=t.elements||(t.elements=[]);s.length=e.length;for(let a=0;a<e.length;a++){const r=e[a],l=r.properties,d=Fn(s,a,r.type,r.initProperties),c=n[r.optionScope].override(r);l.options=Xn(c),o.update(d,l)}}function Fn(t,e,n,o){const s=ee[Tt(n)];let a=t[e];return(!a||!(a instanceof s))&&(a=t[e]=new s,Object.assign(a,o)),a}function Xn(t){const e=ee[Tt(t.type)],n={};n.id=t.id,n.type=t.type,n.drawTime=t.drawTime,Object.assign(n,bt(t,e.defaults),bt(t,e.defaultRoutes));for(const o of ka)n[o]=t[o];return n}function bt(t,e){const n={};for(const o of Object.keys(e)){const s=e[o],a=t[o];gt(o)&&pe(a)?n[o]=a.map(r=>hn(r,s)):n[o]=hn(a,s)}return n}function Pa(t,e,n,o){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,get elements(){return n.filter(s=>s&&s.options)},id:o.id,type:"annotation"}))}function Aa(t,e){const n=e.length,o=t.length;if(o<n){const s=n-o;t.splice(o,0,...new Array(s))}else o>n&&t.splice(n,o-n);return t}var $a="3.1.0";const Z=new Map,pn=t=>t.type!=="doughnutLabel",Ta=At.concat(Be);var ja={id:"annotation",version:$a,beforeRegister(){ps("chart.js","4.0",Ie.version)},afterRegister(){Ie.register(ee)},afterUnregister(){Ie.unregister(ee)},beforeInit(t){Z.set(t,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(t,e,n){const o=Z.get(t),s=o.annotations=[];let a=n.annotations;
1he(a)?Object.keys(a).forEach(r=>{const l=a[r];he(l)&&(l.id=r,s.push(l))}):pe(a)&&s.push(...a),qs(s.filter(pn),t.scales)},afterDataLimits(t,e){const n=Z.get(t);Us(t,e.scale,n.annotations.filter(pn).filter(o=>o.display&&o.adjustScaleRange))},afterUpdate(t,e,n){const o=Z.get(t);Ws(t,o,n),Ca(t,o,n,e.mode),o.visibleElements=o.elements.filter(s=>!s.skip&&s.options.display),Vs(t,o,n)},beforeDatasetsDraw(t,e,n){_e(t,"beforeDatasetsDraw",n.clip)},afterDatasetsDraw(t,e,n){_e(t,"afterDatasetsDraw",n.clip)},beforeDatasetDraw(t,e,n){_e(t,e.index,n.clip)},beforeDraw(t,e,n){_e(t,"beforeDraw",n.clip)},afterDraw(t,e,n){_e(t,"afterDraw",n.clip)},beforeEvent(t,e,n){const o=Z.get(t);Fs(o,e.event,n)&&(e.changed=!0)},afterDestroy(t){Z.delete(t)},getAnnotations(t){const e=Z.get(t);return e?e.elements:[]},_getAnnotationElementsAtEventForMode(t,e,n){return Mt(t,e,n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"},colors:{properties:["backgroundColor","borderColor"],type:"color"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:t=>!Ta.includes(t)&&t!=="init",annotations:{_allKeys:!1,_fallback:(t,e)=>`elements.${ee[Tt(e.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:gt,_fallback:!0},_indexable:gt}},additionalOptionScopes:[""]};function _e(t,e,n){const{ctx:o,chartArea:s}=t,a=Z.get(t);n&&Ao(o,s);const r=Ra(a.visibleElements,e).sort((l,d)=>l.element.options.z-d.element.options.z);for(const l of r)Ia(o,s,a,l);n&&$o(o)}function Ra(t,e){const n=[];for(const o of t)if(o.options.drawTime===e&&n.push({element:o,main:!0}),o.elements&&o.elements.length)for(const s of o.elements)s.options.display&&s.options.drawTime===e&&n.push({element:s});return n}function Ia(t,e,n,o){const s=o.element;o.main?(Zt(n,s,"beforeDraw"),s.draw(t,e),Zt(n,s,"afterDraw")):s.draw(t,e)}function Ea(t){window[`ga-disable-${t}`]=!0}function Ba(t){const e=`ga-disable-${t}`;e in window&&delete window[e]}function La(){const t=bo().public.gtag,e=mo(t);let n;n=vo;const o=l=>{const d=[...e];let c=d.find(f=>f.id===l);return c||(l?(c={id:l,initCommands:t.initCommands,config:t.config},d.unshift(c)):c=d[0]),c||console.error("[nuxt-gtag] Missing Google tag ID"),{tag:c,tags:d}},s=l=>{{const{tag:d,tags:c}=o(l);if(!d)return;window.dataLayer||xo({tags:c}),document.head.querySelector("script[data-gtag]")||bn({script:[{src:yo(t.url,{id:d.id}),"data-gtag":""}]})}};function a(l){{const{tag:d}=o(l);d&&Ea(d.id)}}function r(l){{const{tag:d}=o(l);d&&Ba(d.id)}}return{gtag:n,initialize:s,disableAnalytics:a,enableAnalytics:r}}const Oa={class:"max-w-7xl mx-auto px-1 md:px-8 py-8 border border-[#B2B2B2] rounded-2xl bg-white mt-6"},Ha={class:"md:w-9/12 mx-auto mb-3"},za={class:"grid lg:grid-cols-12 lg:gap-8 items-start mt-10"},Ya={class:"bg-[#D1EBC1] h-full rounded-3xl p-8"},Wa={key:0,class:"h-full space-y-3"},Fa={class:"font-bold text-20 mb-8"},Xa={class:"gradient-border shadow-lg"},Na={class:"font-bold text-white text-18 text-left col-span-10"},Va={class:"gradient-border shadow-lg"},Ua={class:"font-bold text-white text-18 text-left col-span-10"},qa={class:"gradient-border shadow-lg"},Ja={class:"font-bold text-white text-18 text-left col-span-10"},Ka={key:1,class:"flex flex-col justify-between h-full"},Ga={class:"block text-dark-grey-100 font-bold mb-3 text-18"},Qa=["value"],Za={class:"text-[#0D2E36] text-18 font-bold mb-2"},er={class:"block text-dark-grey-100 font-bold mb-2 text-18"},tr={class:"text-dark-grey-100 text-14 mb-3"},nr=["value","placeholder","disabled"],or={class:"text-dark-grey-100 font-bold text-18 my-3"},sr={class:"mb-8"},ar={class:"block text-dark-grey-100 font-bold mb-2 text-18"},rr={class:"text-dark-grey-100 text-14 mb-3"},lr=["value","disabled"],ir={class:"mb-8"},dr={class:"block text-dark-grey-100 font-bold mb-3 text-18"},cr={class:"grid"},ur={class:"list-none [&::-webkit-details-marker]:hidden"},fr={key:0,class:"text-16 font-medium"},hr={key:1},pr={class:"font-bold text-20 mb-1"},gr={class:"text-14"},br={class:"grid gap-4 pt-4"},mr=["onClick"],xr={class:"font-bold text-20 mb-1"},yr={class:"text-14"},vr={key:0,class:"mb-8"},wr={class:"block text-gray-800 font-bold mb-2 text-18"},_r={key:0,class:"flex justify-between gap-4"},kr={class:"flex flex-col justify-center items-center w-full"},Cr={class:"text-16 text-center"},Mr={class:"border border-white py-3 px-2 rounded-lg w-full"},Sr={class:"text-center text-18 text-secondary-dark-100 font-extrabold"},Dr={class:"flex flex-col justify-center items-center w-full"},Pr={class:"text-16 text-center"},Ar={class:"border border-white py-3 px-2 rounded-lg w-full"},$r={class:"text-center text-18 text-secondary-dark-100 font-extrabold"},Tr={key:1,class:"border border-white py-3 px-2 rounded-lg mb-12"},jr={class:"text-center text-18 text-secondary-dark-100 font-extrabold"},Rr={class:"mb-6"},Ir={class:"block text-dark-grey-100 font-bold mb-3 text-18"},Er=["value"],Br={class:"mb-6"},Lr={class:"block text-dark-grey-100 font-bold mb-3 text-18"},Or=["value"],Hr={class:"mb-6"},zr={class:"block text-dark-grey-100 font-bold mb-3 text-18"},Yr=["placeholder","value"],Wr={key:0},Fr={class:"block text-gray-800 font-bold mb-2 text-18"},Xr={class:"border border-white py-3 px-2 rounded-lg mb-12"},Nr={class:"text-center text-18 text-secondary-dark-100 font-extrabold"},Vr={class:"mb-6"},Ur={class:"block text-dark-grey-100 font-bold mb-3 text-18"},qr=["value"],Jr={class:"mb-6"},Kr={class:"block text-dark-grey-100 font-bold mb-3 text-18"},Gr=["value"],Qr={class:"mb-6"},Zr={class:"block text-dark-grey-100 font-bold mb-3 text-18"},el=["value","placeholder"],tl={key:0},nl={class:"block text-gray-800 font-bold mb-2 text-18"},ol={class:"border border-white py-3 px-2 rounded-lg mb-12"},sl={class:"text-center text-18 text-secondary-dark-100 font-extrabold"},al={key:3,class:"mb-12"},rl={class:"block text-dark-grey-100 font-bold mb-3 text-18"},ll=["value"],il={class:"text-dark-grey-100 text-14"},dl=["disabled"],cl={key:5,class:"space-y-3"},ul=["disabled"],fl={key:0,class:"w-full flex justify-center"},hl=["src"],pl={key:1,class:"w-3/6",src:ls,alt:"calculator"},gl={key:1,class:"w-full h-full flex flex-col justify-between oveflow-x-scroll"},bl={class:"w-full"},ml={class:"text-2xl font-bold text-dark-grey-100 mb-6"},xl={class:"h-full overflow-x-scroll"},yl={class:"min-w-[600px] max-w-full bg-white rounded-2xl h-[500px] overflow-x-scroll"},vl={class:"mt-12 overflow-auto"},wl={class:"flex items-center gap-1 justify-between"},_l={class:"flex-1 text-center min-w-[90px]"},kl={class:"text-14 text-dark-grey-100"},Cl={class:"flex-1 text-center min-w-[90px]"},Ml={class:"text-14 text-dark-grey-100"},Sl={class:"flex-1 text-center min-w-[90px]"},Dl={class:"text-14 text-dark-grey-100"},Pl={class:"flex-1 text-center min-w-[90px]"},Al={class:"text-14 text-dark-grey-100"},$l={class:"flex items-center gap-1 justify-between mt-2"},Tl={class:"flex-1 shrink-1 min-w-[90px]"},jl={class:"border border-[#6EBE46] bg-logo rounded-xl px-2 py-4 w-full"},Rl={class:"text-18 md:text-20 font-bold text-[#1D4021] text-center"},Il={class:"flex-1 shrink-1 min-w-[90px]"},El={class:"border-1 border-[#6EBE46] bg-secondary-mid-100 rounded-xl px-2 py-4 w-full"},Bl={class:"text-18 md:text-20 font-bold text-white text-center"},Ll={class:"flex-1 shrink-1 min-w-[90px]"},Ol={class:"border-2 border-[#6EBE46] bg-primary-100 rounded-xl px-2 py-4 w-full"},Hl={class:"text-18 md:text-20 font-bold text-[#1D4021] text-center"},zl={class:"flex-1 shrink-1 min-w-[90px]"},Yl={class:"border-2 border-[#6EBE46] bg-primary-10 rounded-xl px-2 py-4 w-full"},Wl={class:"text-18 md:text-20 font-bold text-secondary-dark-100 text-center"},Fl={key:0,class:"bg-[linear-gradient(180deg,_#F8FCF6_0%,_#E8F3DE_100%)] flex rounded-2xl p-8 items-center gap-8 mt-24"},Xl={class:"text-20 font-bold text-dark-grey-100 mb-2 font-black"},Nl={class:"text-dark-grey-100 text-16 mb-4"},Vl={href:"https://www.thijari.com.my/",target:"_blank",class:"inline-block bg-primary-100 !text-white font-bold px-4 py-2 rounded-lg transition-colors text-14"},Ul={__name:"CalculatorTabungHajiV3",async setup(t){let e,n;Ie.register(Lo,Oo,Ho,zo,Yo,Wo,Fo,Xo,ja);const{locale:o,strapiLocale:s}=vn(),{t:a,setLocale:r}=wo();gn(o,u=>{r(u)},{immediate:!0});const l=w(1),d=w(!1),c=w(0),f=w(null),h=w(3e3),g=w("B40"),C=w("tempoh"),S=w(2028),P=w(null),O=w(null),y=w(null),_=w(3.5),v=w(0),D=w(15e3),H=w(null),G=w(null),Ae=w(33300),Ne=w(null),de=w([]),$e=w([]),Ve=w(!1),Ue=w(!1),qe=w(!1),Je=w(!1),Ke=w(!1),ye=I(()=>!H.value||!ne?.bayaranHaji?null:ne.bayaranHaji.find(u=>u.value.toString()===H.value)),Nn=u=>{H.value=u.value.toString(),Ne.value&&(Ne.value.open=!1)}
1,Te=w(0),Ge=w(0),Vn=w(0),Qe=w(0),Ze=w(0),et=w(0),je=w(0),tt=w(0),ne=([e,n]=xt(()=>_t("/calculator",{query:{populate:"*",locale:s.value}},"$cejVbPlr1w").then(u=>{const b=u?.data.value?.data;return b&&(_.value=b.agihanKeuntungan),b})),e=await e,n(),e),Q=u=>u?Number(u).toLocaleString("en-MY",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00",V=u=>u?Number(u).toLocaleString("en-MY"):"",nt=I(()=>Ve.value?h.value||"":Q(h.value)),Un=I(()=>Ue.value?v.value||"":Q(v.value)),qn=I(()=>qe.value?G.value||"":Q(G.value)),jt=I(()=>Je.value?D.value||"":Q(D.value)),ot=u=>{const M=u.target.value.replace(/[^\d.]/g,"");h.value=parseFloat(M)||null},st=()=>{Ve.value=!0},at=()=>{Ve.value=!1},Rt=u=>{const M=u.target.value.replace(/[^\d.]/g,"");D.value=parseFloat(M)||null},It=()=>{Je.value=!0},Et=()=>{Je.value=!1},Jn=u=>{const M=u.target.value.replace(/[^\d.]/g,"");v.value=parseFloat(M)||null},Kn=()=>{Ue.value=!0},Gn=()=>{Ue.value=!1},Qn=u=>{const M=u.target.value.replace(/[^\d.]/g,"");G.value=parseFloat(M)||null},Zn=()=>{qe.value=!0},eo=()=>{qe.value=!1},to=u=>{const M=u.target.value.replace(/[^\d.]/g,""),$=parseFloat(M);_.value=isNaN($)?null:$},Bt=I(()=>Ke.value?P.value||"":P.value?`${P.value} ${a("calculator.tahunPlaceholder")}`:""),Lt=u=>{const M=u.target.value.replace(/[^\d]/g,"");P.value=M?parseInt(M):null},Ot=()=>{Ke.value=!0},Ht=()=>{Ke.value=!1},{gtag:no}=La(),rt=u=>{f.value=u,l.value=2,no("event","calculator_option_selected",{event_category:"Calculator",event_label:`Option ${u}`,option_type:u,option_description:a(u==="A"?"calculator.optionA":u==="B"?"calculator.optionB":"calculator.optionC")})},oo=()=>{l.value=2,Ft()},so=()=>{l.value=1,d.value=!1,f.value=null,h.value=3e3,g.value="B40",C.value="tempoh",S.value=2028,P.value=null,O.value=null,y.value=null,_.value=3.5,v.value=0,G.value=0,D.value=15e3;const u=document.getElementById("calculator");u&&u.scrollIntoView({behavior:"smooth",block:"start"})},ce=I(()=>{if(C.value==="umur")return(Number(y.value)-Number(O.value))*12;if(C.value==="tahun"){const u=new Date,b=u.getFullYear(),M=u.getMonth(),$=Number(S.value)-b,T=12-M,B=$*12;return T+B}else if(C.value==="tempoh"){const u=P.value||Yt.value;return Number(u)*12}return 0}),ao=I(()=>(v.value||0)*(ce.value||0));function ue(u,b,M,$){const B=new Date().getMonth(),R=[];let E=0,j=u;if(u!=0)for(let A=0;A<B;A++)R.push({month:A,value:u});for(let A=0;A<M+1;A++){const z=(B+A)%12;A>0&&b>0&&(j+=b),z===3&&(j+=E),R.push({month:z,value:Math.round(j)}),z===11&&(E=R.slice(-12).reduce((Y,W)=>Y+W.value,0)/12*($/100),E=E)}return{finalBalance:R[R.length-1].value,accContribution:R}}const ro=I(()=>!v.value||!_.value?0:ue(0,v.value,ce.value,_.value).finalBalance),zt=I(()=>!h.value||!_.value?0:ue(h.value,0,ce.value,_.value).finalBalance),lt=I(()=>co((_.value||0)/100/12,ce.value||0,0,-((D.value||0)-(zt.value||0)),0,1.04)),Yt=I(()=>{if(!D.value||!v.value||!_.value)return null;const u=D.value;let b=0,M=600,$=null;for(;b<=M;){const T=Math.floor((b+M)/2),B=ue(0,v.value,T,_.value),R=ue(h.value||0,0,T,_.value);B.finalBalance+R.finalBalance>=u?($=T,M=T-1):b=T+1}return($/12).toFixed(1)}),Wt=I(()=>f.value==="A"?!h.value||!H.value||!G.value&&!P.value:f.value==="B"?!h.value||!v.value||!D.value:f.value==="C"?!h.value||!D.value||!P.value:!0),Ft=()=>{f.value==="A"?(D.value=ye.value.value,G.value<=0?v.value=lt.value:v.value=G.value):f.value==="C"&&(v.value=lt.value);const u=ue(0,v.value,ce.value,_.value);de.value=u.accContribution;const b=ue(h.value,0,ce.value,_.value);$e.value=b.accContribution,Te.value=h.value,Ge.value=v.value,Vn.value=P.value,Qe.value=ao.value,Ze.value=ro.value,et.value=zt.value,je.value=lt.value,tt.value=Math.floor(Yt.value),d.value=!0,c.value++},lo=I(()=>{const u=[],b=new Date().getFullYear(),M=new Date().getMonth();let $=-Ge.value*M;if(de.value.length>0&&$e.value.length>0)for(let j=0;j<de.value.length;j+=12){const A=de.value.slice(j,j+12),z=$e.value.slice(j,j+12);if(A.length>0&&z.length>0){const U=A.find(W=>W.month===11)||A[A.length-1],Y=z.find(W=>W.month===11)||z[z.length-1];$=$+A.length*Ge.value,u.push({total:U.value+Y.value,accYearlyContribution:$})}}const T=u.map((j,A)=>`${(b+A).toString().slice(-2)}`),B=[],R=[],E=[];return new Date().getMonth(),u.forEach(({total:j,accYearlyContribution:A},z)=>{const U=Te.value||0,Y=j-U-A;B.push(U),R.push(A),E.push(Math.max(0,Y))}),{labels:T,datasets:[{label:a("calculator.simpananSemasa"),data:B,backgroundColor:"#52DE56",borderColor:"transparent",borderWidth:0,fill:!0,tension:.4,pointRadius:0,pointHoverRadius:0},{label:a("calculator.sumbanganBulanan"),data:R,backgroundColor:"#4A9437",borderColor:"transparent",borderWidth:0,fill:!0,tension:.4,pointRadius:0,pointHoverRadius:0},{label:a("calculator.agihanKeuntungan"),data:E,backgroundColor:"#6EBE46",borderColor:"transparent",borderWidth:0,fill:!0,tension:.4,pointRadius:0,pointHoverRadius:0}]}}),io=I(()=>{const u=ye.value?ye.value.value:15e3,b=Ae.value,M=de.value.length>0?Math.max(...de.value.map((Y,W)=>Y.value+($e.value[W]?.value||0))):0,$=Math.max(b*1.2,M*1.1),B=$/6,R=Math.pow(10,Math.floor(Math.log10(B))),E=B/R;let j;E<=1?j=1:E<=2?j=2:E<=2.5?j=2.5:E<=5?j=5:j=10;const A=j*R,z=Math.ceil($/A)*A,U=f.value==="C"?D.value:u;return{responsive:!0,maintainAspectRatio:!1,layout:{padding:{top:20,bottom:20,left
1:10,right:10}},plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(Y){let W=Y.dataset.label||"";return W&&(W+=": "),W+="RM "+Q(Y.parsed.y),W}}},annotation:{annotations:{simpananLayakHaji:{type:"line",xMin:0,yMin:Ae.value,yMax:Ae.value,borderColor:"#0e6736",borderWidth:2,borderDash:[5,5],label:{display:!0,content:`RM ${V(Ae.value)} (${a("calculator.kosHajiSemasa")})`,position:"start",backgroundColor:"transparent",color:"#0e6736",font:{size:12,weight:"bold"},xAdjust:0,yAdjust:-10}},targetSaving:["A","C"].includes(f.value)?{type:"line",xMin:0,yMin:U,yMax:U,borderColor:"#1e3f21",borderWidth:2,borderDash:[5,5],label:{display:!0,content:`RM ${V(U)} (${a("calculator.sasaranSimpanan")})`,position:"start",backgroundColor:"transparent",color:"#1e3f21",font:{size:12,weight:"bold"},xAdjust:0,yAdjust:10}}:void 0}}},scales:{x:{stacked:!0,grid:{display:!1},title:{display:!0,text:a("calculator.tahunPlaceholder"),font:{size:12,weight:"bold"},color:"#2A2B2E"},ticks:{font:{size:12},color:"#2A2B2E"}},y:{stacked:!0,beginAtZero:!0,max:z,border:{display:!1},grid:{color:"#E0E0E0",borderDash:[2,2]},ticks:{stepSize:A,precision:0,callback:function(Y){return"RM "+Q(Y)},font:{size:12},color:"#808080"}}}}});function co(u,b,M,$,T,B=1){let R;if(u===0)R=-(M+$)/b;else{const E=Math.pow(1+u,b);R=u/(E-1)*-(M*E+$)}return Math.ceil(R*B/10)*10}return(u,b)=>{const M=Mo,$=So;return m(),x("div",Oa,[i("div",Ha,[oe(M,{content:k(ne).header},null,8,["content"])]),i("div",za,[i("div",{class:ke([d.value?"lg:col-span-4":"lg:col-span-5 h-full"])},[i("div",Ya,[l.value===1?(m(),x("div",Wa,[i("p",Fa,p(u.$t("calculator.sayaIngin")),1),i("div",Xa,[i("button",{onClick:b[0]||(b[0]=T=>rt("A")),class:"bg-dark-grey-100 grid grid-cols-12 items-center py-3 px-5 rounded-xl w-full"},[b[3]||(b[3]=i("div",{class:"chip-mask bg-primary-100 text-white !w-8 !h-8 font-bold col-span-2"},"A",-1)),i("p",Na,p(u.$t("calculator.optionA")),1)])]),i("div",Va,[i("button",{onClick:b[1]||(b[1]=T=>rt("B")),class:"bg-dark-grey-100 grid grid-cols-12 items-center py-3 px-5 rounded-xl w-full"},[b[4]||(b[4]=i("div",{class:"chip-mask bg-primary-100 text-white !w-8 !h-8 font-bold col-span-2"},"B",-1)),i("p",Ua,p(u.$t("calculator.optionB")),1)])]),i("div",qa,[i("button",{onClick:b[2]||(b[2]=T=>rt("C")),class:"bg-dark-grey-100 grid grid-cols-12 items-center py-3 px-5 rounded-xl w-full"},[b[5]||(b[5]=i("div",{class:"chip-mask bg-primary-100 text-white !w-8 !h-8 font-bold col-span-2"},"C",-1)),i("p",Ja,p(u.$t("calculator.optionC")),1)])])])):l.value===2?(m(),x("div",Ka,[f.value==="A"?(m(),x(L,{key:0},[i("label",Ga,p(u.$t("calculator.jumlahSimpananSemasa")),1),i("input",{type:"text",value:nt.value,onInput:ot,onFocus:st,onBlur:at,placeholder:"RM 0.00",class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-16 focus:outline-none focus:ring-2 focus:ring-primary-100"},null,40,Qa),b[6]||(b[6]=i("hr",{class:"border-black-30 my-4"},null,-1)),i("div",null,[i("p",Za,p(u.$t("calculator.isikanSalahSatu")),1),i("label",er,p(u.$t("calculator.tempohSimpanan")),1),i("p",tr,p(u.$t("calculator.untukMengetahuiJumlah")),1),i("input",{type:"text",value:Bt.value,onInput:Lt,onFocus:Ot,onBlur:Ht,placeholder:u.$t("calculator.tahunPlaceholder"),disabled:G.value>0,class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-16 focus:outline-none focus:ring-2 focus:ring-primary-100 disabled:bg-gray-200 disabled:cursor-not-allowed"},null,40,nr)]),i("p",or,p(u.$t("calculator.atau")),1),i("div",sr,[i("label",ar,p(u.$t("calculator.jumlahSimpananBulanan")),1),i("p",rr,p(u.$t("calculator.untukMengetahuiTempoh")),1),i("input",{type:"text",value:qn.value,onInput:Qn,onFocus:Zn,onBlur:eo,placeholder:"RM 0.00",disabled:P.value>0,class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-16 focus:outline-none focus:ring-2 focus:ring-primary-100 disabled:bg-gray-200 disabled:cursor-not-allowed"},null,40,lr)]),i("div",ir,[i("label",dr,p(u.$t("calculator.pilihSasaran")),1),i("div",cr,[i("details",{ref_key:"detailsElement",ref:Ne},[i("summary",ur,[i("div",{class:ke(["cursor-pointer px-5 py-5 rounded-xl flex justify-between items-center",{"bg-white text-dark-grey-50":!H.value,"bg-secondary-mid-100 text-white shadow":H.value}])},[H.value==null?(m(),x("span",fr,p(u.$t("calculator.pilihan")),1)):(m(),x("div",hr,[i("p",pr,"RM"+p(Q(ye.value?.value)),1),i("p",gr,p(ye.value?.description),1)])),oe($,{name:"mdi:chevron-down"})],2)]),i("div",br,[(m(!0),x(L,null,X(k(ne).bayaranHaji,T=>(m(),x("div",{key:T.value,class:"gradient-border shadow-lg"},[i("button",{onClick:B=>
1Nn(T),class:ke(["py-6 px-4 rounded-xl text-left h-full w-full",H.value===T.value.toString()?"bg-secondary-mid-100 text-white":"bg-dark-grey-100 text-white"])},[i("p",xr,"RM"+p(Q(T.value)),1),i("p",yr,p(T.description),1)],10,mr)]))),128))])],512)])]),d.value?(m(),x("div",vr,[i("label",wr,p(P.value>0?u.$t("calculator.jumlahYangPerluDisimpan"):u.$t("calculator.jumlahTempohSimpanan")),1),P.value>0?(m(),x("div",_r,[i("div",kr,[i("p",Cr,p(u.$t("calculator.bulanan")),1),i("div",Mr,[i("p",Sr," RM "+p(V(je.value)),1)])]),i("div",Dr,[i("p",Pr,p(u.$t("calculator.tahunan")),1),i("div",Ar,[i("p",$r," RM "+p(V(je.value*12)),1)])])])):(m(),x("div",Tr,[i("p",jr,p(tt.value)+" "+p(u.$t("calculator.tahun")),1)]))])):F("",!0)],64)):F("",!0),f.value==="B"?(m(),x(L,{key:1},[i("div",Rr,[i("label",Ir,p(u.$t("calculator.jumlahSimpananSemasa")),1),i("input",{type:"text",value:nt.value,onInput:ot,onFocus:st,onBlur:at,placeholder:"RM 0.00",class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-dark-grey-100 text-16 focus:outline-none focus:ring-2 focus:ring-primary-100"},null,40,Er)]),i("div",Br,[i("label",Lr,p(u.$t("calculator.jumlahSimpananBulanan")),1),i("input",{type:"text",value:Un.value,onInput:Jn,onFocus:Kn,onBlur:Gn,placeholder:"RM 0.00",class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-dark-grey-100 text-16 focus:outline-none focus:ring-2 focus:ring-primary-100"},null,40,Or)]),i("div",Hr,[i("label",zr,p(u.$t("calculator.jumlahSasaranSimpanan")),1),i("input",{type:"text",placeholder:u.$t("calculator.tahunPlaceholder"),value:jt.value,onInput:Rt,onFocus:It,onBlur:Et,class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-dark-grey-100 text-16 focus:outline-none focus:ring-2 focus:ring-primary-100"},null,40,Yr)]),d.value?(m(),x("div",Wr,[i("label",Fr,p(u.$t("calculator.tempohSimpananResult")),1),i("div",Xr,[i("p",Nr,p(tt.value)+" "+p(u.$t("calculator.tahun")),1)])])):F("",!0)],64)):F("",!0),f.value==="C"?(m(),x(L,{key:2},[i("div",Vr,[i("label",Ur,p(u.$t("calculator.jumlahSimpananSemasa")),1),i("input",{type:"text",value:nt.value,onInput:ot,onFocus:st,onBlur:at,placeholder:"RM 0.00",class:"w-full bg-white border-0 py-3 px-5 rounded-xl text-dark-grey-100 text-16 focus:outline-none focus:ring-2 focus:ring-primary-100"},null,40,qr)]),i("div",Jr,[i("label",Kr,p(u.$t("calculator.jumlahSasaranSimpanan")),1),i("input",{type:"text",value:jt.value,onInput:Rt,onFocus:It,onBlur:Et,placeholder:"RM 0.00",class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-dark-grey-100 text-16 focus:outline-none focus:ring-2 focus:ring-primary-100"},null,40,Gr)]),i("div",Qr,[i("label",Zr,p(u.$t("calculator.tempohSimpanan")),1),i("input",{value:Bt.value,onInput:Lt,onFocus:Ot,onBlur:Ht,type:"text",placeholder:u.$t("calculator.tahunPlaceholder"),class:"w-full bg-white border-0 py-2 px-5 rounded-xl text-dark-grey-100 text-16 focus:outline-none focus:ring-2 focus:ring-primary-100"},null,40,el)]),d.value?(m(),x("div",tl,[i("label",nl,p(u.$t("calculator.jumlahBulananYangPerluDisimpan")),1),i("div",ol,[i("p",sl," RM "+p(V(je.value)),1)])])):F("",!0)],64)):F("",!0),d.value?(m(),x("div",al,[i("label",rl,[vt(p(u.$t("calculator.kadarAgihanKeuntungan"))+" ",1),b[7]||(b[7]=i("b",null,"TH",-1))]),i("input",{type:"text",value:_.value,onInput:to,placeholder:"3.25%",class:"w-full bg-white border-0 py-3 px-5 rounded-xl text-16 focus:outline-none focus:ring-2 focus:ring-primary-100 mb-2"},null,40,ll),i("p",il,p(u.$t("calculator.andaianKadarAgihan",{rate:k(ne).agihanKeuntungan})),1)])):F("",!0),d.value?(m(),x("div",cl,[i("button",{onClick:Ft,disabled:Wt.value,class:"w-full border border-dark-grey-100 text-dark-grey-100 py-2 rounded-xl font-bold text-16 transition-colors"},p(u.$t("calculator.kiraSemula")),9,ul),i("button",{onClick:so,class:"w-full bg-dark-grey-100 text-white py-2 rounded-xl font-bold text-16 transition-colors"},p(u.$t("calculator.semula")),1)])):(m(),x("button",{key:4,onClick:oo,disabled:Wt.value,class:"w-full bg-dark-grey-100 text-white py-2 rounded-xl font-bold text-16 transition-colors mt-auto disabled:bg-gray-400 disabled:cursor-not-allowed"},p(u.$t("calculator.seterusnya")),9,dl))])):F("",!0)])],2),i("div",{class:ke([{"bg-[#F0F8EC] lg:col-span-7":!d.value,"lg:col-span-8 w-full overflow-hidden":d.value},"mt-6 lg:mt-0 lg:px-12 flex items-center justify-center min-h-[500px] h-full"])},[d.value?(m(),x("div",gl,[i("div",null,[i("div",bl,[i("h3",ml,p(u.$t("calculator.perincianSimpanan")),1),i("div",xl,[i("div",yl,[(m(),yt(k(Po),{key:c.value,data:lo.value,options:io.value},null,8,["data","options"]))])])]),i("div",vl,[i("div",wl,[i("div",_l,[i("p",kl,p(u.$t("calculator.simpananSemasa")),1)]),b[8]||(b[8]=i("div",{class:"min-w-8"},null,-1)),i("div",Cl,[i("p",Ml,p(u.$t("calculator.sumbanganBulananKeseluruhan")),1)]),b[9]||(b[9]=i("div",{class:"min-w-8"},null,-1)),i("div",Sl,[i("p",Dl,p(u.$t("calculator.anggaranAgihanKeuntungan")),1)]),b[10]||(b[10]=i("div",{class:"min-w-8"},null,-1)),i("div",Pl,[i("p",Al,p(u.$t("calculator.simpananKeseluruhanAnda")),1)])]),i("div",$l,[i("div",Tl,[
1i("div",jl,[i("p",Rl," RM "+p(V(Te.value)),1)])]),b[11]||(b[11]=i("div",{class:"w-8 flex justify-center shrink-0"},[i("span",{class:"text-2xl font-bold text-dark-grey-100"},"+")],-1)),i("div",Il,[i("div",El,[i("p",Bl," RM "+p(V(Qe.value)),1)])]),b[12]||(b[12]=i("div",{class:"w-8 flex justify-center shrink-0"},[i("span",{class:"text-2xl font-bold text-dark-grey-100"},"+")],-1)),i("div",Ll,[i("div",Ol,[i("p",Hl," RM "+p(V(Ze.value-Qe.value+et.value-Te.value)),1)])]),b[13]||(b[13]=i("div",{class:"w-8 flex justify-center shrink-0"},[i("span",{class:"text-2xl font-bold text-dark-grey-100"},"=")],-1)),i("div",zl,[i("div",Yl,[i("p",Wl," RM "+p(V(Ze.value+et.value)),1)])])])])]),d.value?(m(),x("div",Fl,[b[14]||(b[14]=i("img",{src:Do,alt:"TH JARI",class:"w-[100px] mb-4"},null,-1)),i("div",null,[i("h4",Xl,p(u.$t("calculator.berkenaan")),1),i("p",Nl,p(u.$t("calculator.kemaskiniSumbangan")),1),i("a",Vl,p(u.$t("calculator.keThijari")),1)])])):F("",!0)])):(m(),x("div",fl,[k(ne).placeholder?(m(),x("img",{key:0,class:"w-3/6",src:k(ne).placeholder.url,alt:"calculator"},null,8,hl)):(m(),x("img",pl))]))],2)])])}}},ql=""+new URL("TH-monogram.C2M94SW0.png",import.meta.url).href,Jl=""+new URL("ripple-bg.CnengW2M.png",import.meta.url).href,Kl={class:"container mx-auto py-7 md:py-20"},Gl={class:"md:px-[60px]"},Ql={class:"font-[900] text-[24px] md:text-[50px] text-dark-grey whitespace-pre-line"},Zl={class:"text-dark-grey font-[500] text-[18px] md:text-[20px] mt-[17px]"},ei={class:"w-full mt-[50px] bg-white rounded-[40px] border border-dark-grey border-opacity-20 overflow-hidden hidden lg:block"},ti={class:"flex gap-[68px] px-[50px] pt-[56px]"},ni={class:"flex flex-col w-full"},oi={class:"w-full font-[900] text-[30px] border-b border-secondary-mid-100"},si={class:"flex mt-[24px] gap-[16px] items-start"},ai=["src"],ri={class:"grid md:grid-cols-1 xl:grid-cols-2 gap-4 auto-rows-fr"},li=["href"],ii={class:"font-[900] text-[18px] text-secondary-mid-100"},di={class:"font-[400] text-[16px] text-secondary-mid-100 line-clamp-1"},ci=["href"],ui={class:"text-dark-grey-100"},fi={class:"flex gap-[68px] px-[60px] pt-[27px] mt-[27px] bg-[#00000008] min-h-[200px]"},hi={class:"flex flex-col w-full justify-between"},pi={class:"w-full font-[900] text-[20px] border-b border-black border-opacity-20"},gi={class:"grid md:grid-cols-1 xl:grid-cols-2 gap-4 auto-rows-fr mt-[22px]"},bi=["href"],mi={class:"font-[800] text-[18px] text-[#000000CC] whitespace-nowrap"},xi={class:"font-[400] text-[16px] text-[#000000CC] line-clamp-1"},yi=["href"],vi={class:"text-dark-grey-100"},wi={class:"lg:hidden border border-[#E5E5E5] rounded-[20px] px-9 shadow-[0px_5px_10px_0px_#0000000d] mt-6"},_i={class:"w-full mx-auto"},ki={class:"flex justify-between items-center py-5 cursor-pointer list-none font-semibold text-xl text-gray-700 hover:text-gray-900 transition-colors duration-200 [&::-webkit-details-marker]:hidden border-b border-[#52DE56] [details[open]_&]:border-[#E5E5E5]"},Ci={class:"flex-1 font-[900] text-[20px]"},Mi={class:"p-2 text-gray-500 leading-relaxed animate-[slideDown_0.2s_ease-out] rounded-[0_0_20px_20px]"},Si=["href"],Di={class:"font-[800] text-[18px] text-[#000000CC] whitespace-nowrap"},Pi={class:"font-[400] text-[16px] text-[#000000CC]"},Ai=["href"],$i={class:"text-dark-grey-100"},Ti={class:"w-full mx-auto pb-4"},ji={class:"flex-1 font-[900] text-[20px]"},Ri={class:"p-2 text-gray-500 leading-relaxed animate-[slideDown_0.2s_ease-out] rounded-[0_0_20px_20px]"},Ii=["href"],Ei={class:"font-[800] text-[18px] text-[#000000CC] whitespace-nowrap"},Bi={class:"font-[400] text-[16px] text-[#000000CC]"},Li=["href"],Oi={class:"text-dark-grey-100"},Hi={id:"calculator",class:"container mx-auto py-7 md:py-20"},zi={class:"font-[900] text-[24px] md:text-[50px] text-dark-grey whitespace-pre-line text-center uppercase"},Yi={class:"flex flex-col lg:flex-row bg-1-primary-green px-[50px] md:px-[140px] py-[58px] lg:py-[163px] mt-10 gap-[60px] items-center relative overflow-hidden"},Wi={class:"relative w-[350px] md:w-[483px] flex-shrink-0"},Fi=["src"],Xi={class:"relative z-10"},Ni={class:"font-[900] text-white text-[24px] md:text-[40px]"},Vi={class:"font-[700] text-white text-[16px] md:text-[20px] mt-[24px]"},Ui={href:"/tentang-kami",class:"font-[700] !text-white text-[18px] mt-[20px] block cursor-pointer"},qi={class:"article pt-[74px] pb-[64px] relative"},Ji={class:"container mx-auto relative z-10"},Ki={class:"font-[900] text-[24px] md:text-[40px] mb-[30px] w-[80%] md:w-full text-center md:text-left mx-auto"},Gi={class:"grid grid-cols-2 lg:grid-cols-4 gap-12"},Qi={class:"grid justify-center items-center"},Zi=["src","alt"],ed={class:"text-16 md:text-20 font-black text-center uppercase"},td=["href"],bd=mt({__name:"index",async setup(t){let e,n;const{strapiLocale:o}=vn();bn({title:"Home"});const s=["HomepageCarousel.HeroItems","HomepageCarousel.HeroItems.DesktopImage","HomepageCarousel.HeroItems.MobileImage","FirstFold","ProductRow1.Product","ProductRow1.ProductCoverImage.Upload","ProductRow2.Product","CTA.CTA_cover","SiaranAkhbar","SiaranAkhbar.SiaranAkhbarSlot","SiaranAkhbar.SiaranAkhbarSlot.image"],a={};
1s.forEach((h,g)=>a[`populate[${g}]`]=h);const{enabled:r}=Vo(),{data:l,error:d}=([e,n]=xt(()=>_t("/homepage",{headers:{"strapi-encode-source-maps":r.value?"true":"false"},query:{...a,locale:o.value}},"$RJzUtpZ_Pa")),e=await e,n(),e);if(d.value||!l.value?.data)throw console.error("errorrr",d.value),_o({statusCode:404,statusMessage:"Page Not Found",fatal:!0});const c=I(()=>l.value?.data),{getMediaUrl:f}=wt();return(h,g)=>{const C=Ko,S=rs,P=Ul,O=No;return m(),x(L,null,[oe(C),oe(S,{autoplayInterval:k(c)?.HomepageCarousel?.autoplayInterval,slides:k(c)?.HomepageCarousel?.HeroItems,"enable-loop":!0},null,8,["autoplayInterval","slides"]),i("section",Kl,[i("div",Gl,[i("h1",Ql,p(k(c)?.FirstFold?.Title),1),i("p",Zl,p(k(c)?.FirstFold?.Description),1)]),i("div",ei,[i("div",ti,[(m(!0),x(L,null,X(k(c)?.ProductRow1,(y,_)=>(m(),x("div",ni,[i("p",oi,p(y.Title),1),i("div",si,[i("img",{src:k(f)(y?.ProductCoverImage?.Upload?.url),alt:"Masked Image",class:"h-[210px] w-[170px] object-cover [mask-image:url('/assets/masks/TH_mask.svg')] [mask-repeat:no-repeat] [mask-size:100%_100%] [mask-position:center] [-webkit-mask-image:url('/assets/masks/TH_mask.svg')] [-webkit-mask-repeat:no-repeat] [-webkit-mask-size:100%_100%] [-webkit-mask-position:center]"},null,8,ai),i("div",ri,[(m(!0),x(L,null,X(y.Product,(v,D)=>(m(),x("div",{class:"productButton flex gap-[16px] p-[8px] h-full",key:D},[i("a",{href:v.URL,class:"flex flex-col block w-full"},[i("p",ii,p(v.Name),1),i("p",di,p(v.Description),1)],8,li)]))),128))])]),i("a",{href:y.URL,class:"mt-5 font-14 font-bold space-x-2"},[i("span",ui,p(y.CategoryLink),1),g[0]||(g[0]=i("span",{class:"text-primary-100"},"â",-1))],8,ci)]))),256))]),i("div",fi,[(m(!0),x(L,null,X(k(c)?.ProductRow2,(y,_)=>(m(),x("div",hi,[i("div",null,[i("p",pi,p(y.Title),1),i("div",gi,[(m(!0),x(L,null,X(y.Product,(v,D)=>(m(),x("div",{class:"productButton flex gap-[16px] p-[8px] h-full",key:D},[i("a",{href:v.URL,class:"flex flex-col block w-full"},[i("p",mi,p(v.Name),1),i("p",xi,p(v.Description),1)],8,bi),g[1]||(g[1]=i("div",{class:"h-[24px] w-[24px]"},null,-1))]))),128))])]),i("a",{href:y.URL,class:"mt-5 font-14 font-bold space-x-2 mb-12"},[i("span",vi,p(y.CategoryLink),1),g[2]||(g[2]=i("span",{class:"text-primary-100"},"â",-1))],8,yi)]))),256))])]),i("div",wi,[i("div",_i,[(m(!0),x(L,null,X(k(c)?.ProductRow1,(y,_)=>(m(),x("details",{key:_},[i("summary",ki,[i("span",Ci,p(y.Title),1),g[3]||(g[3]=i("span",{class:"text-2xl font-light text-gray-500 transition-transform duration-200"},[i("span",{class:"[details[open]_&]:hidden"},"+"),i("span",{class:"hidden [details[open]_&]:inline-block"},"-")],-1))]),i("div",Mi,[(m(!0),x(L,null,X(y.Product,(v,D)=>(m(),x("div",{class:"productButton flex gap-[16px] p-[8px] h-full",key:D},[i("a",{href:v.URL,class:"flex flex-col block w-full"},[i("p",Di,p(v.Name),1),i("p",Pi,p(v.Description),1)],8,Si),g[4]||(g[4]=i("div",{class:"h-[24px] w-[24px]"},null,-1))]))),128)),i("a",{href:y.URL,class:"mt-5 font-14 font-bold space-x-2 p-2 block"},[i("span",$i,p(y.CategoryLink),1),g[5]||(g[5]=i("span",{class:"text-primary-100"},"â",-1))],8,Ai)])]))),128))]),i("div",Ti,[(m(!0),x(L,null,X(k(c)?.ProductRow2,(y,_)=>(m(),x("details",{key:_},[i("summary",{class:ke(["flex justify-between items-center py-5 cursor-pointer list-none font-semibold text-xl text-gray-700 hover:text-gray-900 transition-colors duration-200 [&::-webkit-details-marker]:hidden border-b border-[#52DE56] [details[open]_&]:border-[#E5E5E5] last:!border-b-0",_===(k(c)?.ProductRow2?.length??0)-1?"border-b-[transparent]":""])},[i("span",ji,p(y.Title),1),g[6]||(g[6]=i("span",{class:"text-2xl font-light text-gray-500 transition-transform duration-200"},[i("span",{class:"[details[open]_&]:hidden"},"+"),i("span",{class:"hidden [details[open]_&]:inline-block"},"-")],-1))],2),i("div",Ri,[(m(!0),x(L,null,X(y.Product,(v,D)=>(m(),x("div",{class:"productButton flex gap-[16px] p-[8px] h-full",key:D},[i("a",{href:v.URL,class:"flex flex-col block w-full"},[i("p",Ei,p(v.Name),1),i("p",Bi,p(v.Description),1)],8,Ii),g[7]||(g[7]=i("div",{class:"h-[24px] w-[24px]"},null,-1))]))),128)),i("a",{href:y.URL,class:"mt-5 font-14 font-bold space-x-2 p-2 block"},[i("span",Oi,p(y.CategoryLink),1),g[8]||(g[8]=i("span",{class:"text-primary-100"},"â",-1))],8,Li)])]))),128))])])]),i("section",Hi,[i("h2",zi,p(h.$t("calculator.rancangSimpanan")),1),oe(P)]),i("section",Yi,[g[10]||(g[10]=i("img",{class:"absolute h-[40%] md:h-[90%] right-[-10%] md:right-[-2%] bottom-[2%] sm:bottom-auto",src:ql,alt:""},null,-1)),i("div",Wi,[i("img",{class:"w-[82%] aspect-[397/486] mx-auto object-cover [mask-image:url('/assets/masks/TH_mask.svg')] [mask-repeat:no-repeat] [mask-size:100%_100%] [mask-position:center] [-webkit-mask-image:url('/assets/masks/TH_mask.svg')] [-webkit-mask-repeat:no-repeat] [-webkit-mask-size:100%_100%] [-webkit-mask-position:center]",src:k(f)(k(c)?.CTA?.CTA_cover?.url)},null,8,Fi)]),i("div",Xi,[i("p",Ni,p(k(c)?.CTA?.Title),1),i("p",Vi,[oe(O,{content:k(c)?.CTA?.Description},null,8,["content"])]),i("a",Ui,[vt(p(k(c)?.CTA?.CTA)+" ",1),g[9]||(g[9]=i("span",null,"â",-1))])])]),i("section",qi,[g[11]||(g[11
1]=i("img",{class:"absolute top-0 left-0 w-full h-full",src:Jl,alt:"ripple"},null,-1)),i("div",Ji,[i("p",Ki,p(k(c)?.SiaranAkhbar?.title||"Siaran Akhbar"),1),i("div",Gi,[(m(!0),x(L,null,X(k(c)?.SiaranAkhbar?.SiaranAkhbarSlot,y=>(m(),x("div",Qi,[i("img",{class:"mb-5 w-full object-contain",src:k(f)(y.image?.url),alt:y.title},null,8,Zi),i("p",ed,p(y.title),1),i("a",{class:"bg-[linear-gradient(180deg,_#6EBE46_0%,_#4A9437_100%)] w-fit mx-auto px-5 py-3 rounded-lg !text-white mt-2 md:mt-5",href:y.link},p(h.$t("homepage.bacaArtikel")),9,td)]))),256))])])])],64)}}});export{bd as default};
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.