1import{d as X,r as f,c as V,o as K,U as u,a3 as t,a4 as s,I as e,X as S,f as _,a7 as W,aa as Y,ag as J,i as Q,W as p,a5 as T,a8 as E,F as k,a6 as z,V as l,_ as Z,E as ee}from"./TQw2IepB.js";import{u as te,a as w,p as re}from"./_HPhvqE1.js";import{u as se,S as F}from"./7oq4Zzk2.js";import{u as ae}from"./Hl49adOe.js";import{G as C}from"./Dwb9p5Hk.js";import{L as oe}from"./CuR4vk_u.js";import{c as x}from"./DI9ZgL8O.js";import{T as j}from"./I8OpG6h2.js";import"./CGH6kDGM.js";/** 2 * @license lucide-vue-next v0.503.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const ie=x("chart-no-axes-column-increasing",[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]]);/** 7 * @license lucide-vue-next v0.503.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const ce=x("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 12 * @license lucide-vue-next v0.503.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const le=x("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 17 * @license lucide-vue-next v0.503.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const ne=x("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 22 * @license lucide-vue-next v0.503.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const de=x("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const ue={class:"relative min-h-screen overflow-hidden bg-[#080a12] px-3 py-8 text-white md:px-6 md:py-16"},me={class:"relative mx-auto w-full max-w-2xl"},he={class:"text-center"},be={class:"text-2xl font-semibold sm:text-3xl md:text-4xl"},pe={class:"mx-auto mt-3 max-w-xl text-sm leading-6 text-gray-400 md:text-base"},ge={class:"mt-10 border border-white/10 bg-[#10121c] p-5 sm:p-7","aria-labelledby":"redeem-code-title"},fe={class:"flex items-start gap-3"},_e={class:"flex size-11 shrink-0 items-center justify-center border border-rose-300/20 bg-rose-500/10 text-rose-200"},xe={id:"redeem-code-title",class:"text-lg font-semibold"},ye={class:"mt-1 text-sm leading-6 text-gray-400"},we={for:"voucher-code",class:"block text-sm font-medium text-gray-100"},ve=["disabled","placeholder","aria-invalid"],Ve={class:"mt-2 text-sm leading-5 text-gray-500"},ke=["disabled","aria-busy"],ze=["role"],Ce={key:1,class:"mt-4 grid grid-cols-2 gap-px overflow-hidden border border-white/10 bg-white/10 text-sm sm:grid-cols-4"},Ne={class:"min-w-0 bg-[#10121c] p-3"},Ie={class:"text-xs leading-5 text-gray-500"},Le={class:"mt-1 break-words font-mono font-semibold text-white"},Me={class:"min-w-0 bg-[#10121c] p-3"},Re={class:"text-xs leading-5 text-gray-500"},Se={class:"mt-1 break-words font-mono font-semibold text-white"},Te={class:"min-w-0 bg-[#10121c] p-3"},Ee={class:"text-xs leading-5 text-gray-500"},Fe={class:"mt-1 break-words font-mono font-semibold text-emerald-200"},je={class:"min-w-0 bg-[#10121c] p-3"},qe={class:"text-xs leading-5 text-gray-500"},De={class:"mt-1 break-words font-mono font-semibold text-white"},Ue={class:"mt-5 flex gap-3 border-l-2 border-amber-300/70 bg-amber-500/5 px-4 py-3 text-sm leading-6 text-amber-100"},Ae={class:"font-bold text-amber-300"},Be={class:"mt-1"},Oe={class:"mt-10","aria-labelledby":"voucher-guide-title"},Ge={class:"flex items-center gap-3"},He={class:"flex size-11 shrink-0 items-center justify-center border border-rose-300/20 bg-rose-500/10 text-rose-200"},$e={id:"voucher-guide-title",class:"text-xl font-semibold"},Pe={class:"mt-1 text-sm leading-6 text-gray-400"},Xe={class:"mt-5 grid gap-3 sm:grid-cols-3"},Ke={class:"flex size-8 items-center justify-center bg-rose-500/15 text-sm font-semibold text-rose-100"},We={class:"mt-3 text-sm leading-6 text-gray-300"},Ye={class:"mt-4 grid gap-3 sm:grid-cols-2"},Je=["href","onClick"],Qe={class:"mt-10","aria-labelledby":"voucher-rate-title"},Ze={class:"flex items-center gap-3"},et={class:"flex size-11 shrink-0 items-center justify-center border border-rose-300/20 bg-rose-500/10 text-rose-200"},tt={id:"voucher-rate-title",class:"text-xl font-semibold"},rt={class:"mt-1 text-sm leading-6 text-gray-400"}
26,st={class:"mt-5 divide-y divide-white/10 border border-white/10 bg-[#10121c] px-4 sm:px-6"},at={class:"min-w-0 text-gray-300"},ot={class:"whitespace-nowrap font-mono font-semibold tabular-nums text-[#ffcd58]"},gt=X({__name:"redeem",setup(it){const q=new Set([100001,100002,100009]),D={100110:"invalid",100111:"expired",100112:"notFound",100113:"used",100114:"inactive",100115:"empty",100116:"failed",100117:"unavailable"},{t:r}=ae(),y=te(),U=se(),n=f(""),m=f(!1),o=f(),v=f(),N=f(!1);r("rewarbleVoucher.seo.title"),r("rewarbleVoucher.seo.description");const A=V(()=>n.value.trim().length>0&&!m.value),B=V(()=>[{range:r("rewarbleVoucher.rates.under10.range"),rate:r("rewarbleVoucher.rates.under10.rate")},{range:r("rewarbleVoucher.rates.tenTo30.range"),rate:r("rewarbleVoucher.rates.tenTo30.rate")},{range:r("rewarbleVoucher.rates.thirtyTo80.range"),rate:r("rewarbleVoucher.rates.thirtyTo80.rate")},{range:r("rewarbleVoucher.rates.over80.range"),rate:r("rewarbleVoucher.rates.over80.rate")}]),O=V(()=>[{platform:"g2a",label:r("rewarbleVoucher.guide.g2a"),href:"https://www.g2a.com/rewarble-super-gift-card-20-usd-by-rewarble-key-united-states-i10000506957012",primary:!1},{platform:"seagm",label:r("rewarbleVoucher.guide.seagm"),href:"https://www.seagm.com/rewarble-gift-card-usd",primary:!0}]),G=c=>{if(c===100034)return r("rewarbleVoucher.errors.rateLimited");const i=D[c];return r(i?`rewarbleVoucher.errors.${i}`:"rewarbleVoucher.errors.generic")},I=c=>{const i=Number(c);return Number.isFinite(i)?new Intl.NumberFormat().format(i):"-"},L=(c,i="USD")=>{const h=Number(c);return Number.isFinite(h)?new Intl.NumberFormat(void 0,{style:"currency",currency:i}).format(h):"-"},M=()=>{n.value=n.value.toUpperCase().replace(/\s/g,"").slice(0,128),o.value=void 0},H=()=>{M(),!(!n.value||N.value)&&(N.value=!0,w("2u1135",{input_length:n.value.length}))},g=(c,i)=>{w("2u1139",{redeem_result:c,...Number.isFinite(i)?{response_code:i}:{}})},$=c=>{w("2u1131",{voucher_platform:c,entry:"redeem_page"})},P=async()=>{var h;M();const c=n.value;if(!c||m.value)return;if(w("2u1137",{redeem_source:"redeem_page"}),!y.isLogin){U.warning(r("rewarbleVoucher.loginRequired")),y.toggleLoginModal(!0,"voucher_redeem");return}m.value=!0,o.value=void 0;let i=!1;try{const d=await re.redeemVoucher({code:c}),a=Number(d==null?void 0:d.code);if(q.has(a)){g("login_required",a);return}if(a===100118){o.value={type:"pending",message:r("rewarbleVoucher.errors.pending")},g("pending",a);return}if(a!==1e5){o.value={type:"error",message:G(a)},g("failed",a),i=!0;return}const b=(d==null?void 0:d.data)||{},R=Number(b.balance);Number.isFinite(R)&&(y.credits={balance:R}),n.value="",o.value={type:"success",message:r("rewarbleVoucher.success.message"),data:b},g("success",a),await y.refreshAccountBalance()}catch{o.value={type:"error",message:r("rewarbleVoucher.errors.generic")},g("failed"),i=!0}finally{m.value=!1,i&&(await ee(),(h=v.value)==null||h.focus())}};return K(()=>{var c;return(c=v.value)==null?void 0:c.focus()}),(c,i)=>{var h,d;return l(),u("main",ue,[i[1]||(i[1]=t("div",{class:"pointer-events-none absolute inset-x-0 top-0 h-72 bg-rose-950/20","aria-hidden":"true"},null,-1)),t("div",me,[t("header",he,[t("h1",be,s(e(r)("rewarbleVoucher.title")),1),t("p",pe,s(e(r)("rewarbleVoucher.description")),1)]),t("section",ge,[t("div",fe,[t("span",_e,[_(e(C),{class:"size-5","aria-hidden":"true"})]),t("div",null,[t("h2",xe,s(e(r)("rewarbleVoucher.code.title")),1),t("p",ye,s(e(r)("rewarbleVoucher.code.description")),1)])]),t("form",{class:"mt-5",onSubmit:W(P,["prevent"])},[t("label",we,s(e(r)("rewarbleVoucher.code.label")),1),Y(t("input",{id:"voucher-code",ref_key:"codeInput",ref:v,"onUpdate:modelValue":i[0]||(i[0]=a=>Q(n)?n.value=a:null),type:"text",maxlength:"64",autocomplete:"off",autocapitalize:"characters",spellcheck:"false",disabled:e(m),placeholder:e(r)("rewarbleVoucher.code.placeholder"),"aria-invalid":((h=e(o))==null?void 0:h.type)==="error",class:"mt-2 h-12 w-full border border-white/15 bg-black/30 px-4 font-mono text-base uppercase text-white outline-none transition placeholder:normal-case placeholder:font-sans placeholder:text-gray-600 focus:border-rose-300 focus:ring-2 focus:ring-rose-300/20 disabled:cursor-not-allowed disabled:opacity-60",onInput:H},null,40,ve),[[J,e(n)]]),t("p",Ve,s(e(r)("rewarbleVoucher.code.hint")),1),t("button",{type:"submit",disabled:!e(A),"aria-busy":e(m),class:"mt-6 inline-flex min-h-12 w-full items-center justify-center gap-2 bg-gradient-to-r from-[#ff8b59] to-[#ff37e5] px-5 py-3 font-semibold text-white transition hover:opacity-90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-rose-200 disabled:cursor-not-allowed disabled:opacity-50"},[e(m)?(l(),p(e(oe),{key:0,class:"size-5 animate-spin motion-reduce:animate-none","aria-hidden":"true"})):(l(),p(e(C),{key:1,class:"size-5","aria-hidden":"true"})),T(" "+s(e(m)?e(r)("rewarbleVoucher.action.redeeming"):e(r)("rewarbleVoucher.action.redeem")),1)],8,ke)],32),e(o)?(l(),u("div",{key:0,class:E(["mt-5 flex gap-3 border p-4 text-sm leading-6",e(o).type==="success"?"border-emerald-400/40 bg-emerald-400/10 text-emerald-100":e(o).type==="pending"?"border-amber-300/40 bg-amber-300/10 text-amber-100":"border-red-400/40 bg-red-400/10 text-red-100"]),role:e(o).type==="error"?"alert":"status","aria-live":"polite"},[e(o).type==="success"?(l(),p(e(ce),{key:0,class:"mt-0.5 size-5 shrink-0","aria-hidden":"true"})):e(o).type==="pending"?(l(),p(e(j),{key:1,class:"mt-0.5 size-5 shrink-0","aria-hidden":"true"})):(l(),p(e(le),{key:2,class:"mt-0.5 size-5 shrink-0","aria-hidden":"true"})),t("p",null,s(e(o).message),1)],10,ze)):S("",!0),((d=e(o))==null?void 0:d.type)==="success"&&e(o).data?(l(),u("dl",Ce,[t("div",Ne,[t("dt",Ie,s(e(r)("rewarbleVoucher.success.faceValue")),1),t("dd",Le,s(L(e(o).data.face_value,e(o).data.currency_code)),1)]),t("div",Me,[t("dt",Re,s(e(r)("rewarbleVoucher.success.usdValue")),1),t("dd",Se,s(L(e(o).data.face_value_usd)),1)]),t("div",Te,[t("dt",Ee,s(e(r)("rewarbleVoucher.success.credits")),1),t("dd",Fe,"+"+s(I(e(o).data.credits)),1)]),t("div",je,[t("dt",qe,s(e(r)("rewarbleVoucher.success.balance")),1),t("dd",De,s(I(e(o).data.balance)),1)])])):S("",!0)]),t("aside",
26Ue,[_(e(j),{class:"mt-0.5 size-5 shrink-0 text-amber-300","aria-hidden":"true"}),t("div",null,[t("p",Ae,s(e(r)("rewarbleVoucher.code.noticeTitle")),1),t("p",Be,s(e(r)("rewarbleVoucher.code.noticeDescription")),1)])]),t("section",Oe,[t("div",Ge,[t("span",He,[_(e(F),{class:"size-5","aria-hidden":"true"})]),t("div",null,[t("h2",$e,s(e(r)("rewarbleVoucher.guide.title")),1),t("p",Pe,s(e(r)("rewarbleVoucher.guide.description")),1)])]),t("ol",Xe,[(l(!0),u(k,null,z([e(F),e(ne),e(C)],(a,b)=>(l(),u("li",{key:b,class:"border border-white/10 bg-white/[0.03] p-4"},[t("span",Ke,s(b+1),1),(l(),p(Z(a),{class:"mt-5 size-5 text-rose-200","aria-hidden":"true"})),t("p",We,s(e(r)(`rewarbleVoucher.guide.steps.${b+1}`)),1)]))),128))]),t("div",Ye,[(l(!0),u(k,null,z(e(O),a=>(l(),u("a",{key:a.href,href:a.href,target:"_blank",rel:"noopener noreferrer",class:E(["inline-flex min-h-12 items-center justify-center gap-2 border px-4 text-sm font-semibold transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-rose-200",a.primary?"border-rose-400 bg-rose-500 text-white shadow-[0_8px_24px_rgba(225,29,72,0.25)] hover:bg-rose-400":"border-white/25 bg-[#171a25] text-white shadow-[0_8px_20px_rgba(0,0,0,0.2)] hover:border-rose-200/70 hover:bg-[#202433]"]),onClick:b=>$(a.platform)},[T(s(a.label),1),_(e(de),{class:"size-4","aria-hidden":"true"})],10,Je))),128))])]),t("section",Qe,[t("div",Ze,[t("span",et,[_(e(ie),{class:"size-5","aria-hidden":"true"})]),t("div",null,[t("h2",tt,s(e(r)("rewarbleVoucher.rates.title")),1),t("p",rt,s(e(r)("rewarbleVoucher.rates.description")),1)])]),t("dl",st,[(l(!0),u(k,null,z(e(B),a=>(l(),u("div",{key:a.range,class:"grid grid-cols-[minmax(0,1fr)_auto] items-center gap-4 py-4 text-sm"},[t("dt",at,s(a.range),1),t("dd",ot,s(a.rate),1)]))),128))])])])])}}});export{gt 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.