1import{_ as T,j,L as u,m as G,M as L,c as r,a as s,g as p,F as g,r as m,G as E,$ as N,y as h,B as f,D as y,W as P,o as n,q as _,n as V,d as I,b as z,w as A,bc as k,bd as D,Q as F}from"./index-D4lqpvgS.js";const M={class:"incentive-guide"},U={class:"stories-section"},q={class:"story-indicator"},Q=["src"],R={class:"navigation-buttons"},W={__name:"IncentiveGuide",setup(H){const{proxy:w}=j(),t=u([{src:"https://cdn.hypd.store/assets/img/a7a7first-screen--1.jpg"},{src:"https://cdn.hypd.store/assets/img/bb0dfirst-screen--2.jpg"}]),e=u(0),i=u(null),C=u(3e3),a=u(0),b=G(()=>a.value);function B(){(k("guide_visit")=="false"||!k("guide_visit"))&&D("guide_visit","true",365),F.replace({name:"AllIncentivePrograms"})}function $(){clearInterval(i.value),e.value==0?(a.value=0,o()):(e.value-=1,a.value=0,o())}function x(){clearInterval(i.value),e.value<t.value.length-1?(a.value=0,e.value+=1,o()):e.value==t.value.length-1&&(a.value=100)}function o(){if(e.value>=t.value.length){clearInterval(i.value);return}var c=5/(C.value/1e3);i.value=setInterval(()=>{a.value+=c,a.value>=100&&(clearInterval(i.value),a.value=100,e.value<t.value.length-1&&(e.value+=1,a.value=0,o()))},100)}async function S(){try{var c=await P({method:"GET",url:`${w.$entityURL}/api/campaign/stories`,withCredentials:!0,headers:{"Content-Type":"application/json"}});c.data.payload&&(t.value=[...c.data.payload],o())}catch(v){console.error("Error fetching stories",v)}}return L(async()=>{await S()}),(c,v)=>(n(),r("div",M,[v[0]||(v[0]=s("div",{class:"overlay"},null,-1)),s("div",U,[s("div",q,[(n(!0),r(g,null,m(t.value,(d,l)=>(n(),r("div",{class:V(["indicator",{completed:l<e.value}]),style:_({width:`calc(100% / ${t.value.length})`}),key:`${d}+${l}`},[e.value==l?(n(),r("div",{key:0,class:"timer-indicator",style:_({width:`${b.value}%`})},null,4)):I("",!0)],6))),128))]),(n(!0),r(g,null,m(t.value,(d,l)=>h((n(),r("div",{class:"story",key:l},[s("img",{src:d.Url},null,8,Q)])),[[y,e.value==l]])),128)),p(N,{name:"ease-in"},{default:E(()=>[e.value==t.value.length-1?(n(),z(A,{key:0,class:"proceed-btn",defaultText:"Proceed",type:"primary",onSubmit:B})):I("",!0)]),_:1})]),s("div",R,[s("div",{class:"navigation-button left",onClick:$},[p(f,{class:"white"})]),h(s("div",{class:"navigation-button right",onClick:x},[p(f,{class:"white"})],512),[[y,e.value<t.value.length]])])]))}},K=T(W,[["__scopeId","data-v-90c74dfe"]]);export{K 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.