PageSourceSearch

https://zara99.xyz/assets/CouponView-e62c2859.js

js zara99.xyz collected 2026-10-09 22:55:48 UTC 2,553 bytes, 1 lines download raw bytes

1import{d as C,u as _,B as g,C as y,r,W as T,w as u,f as k,y as x,o as b,c as I,a as d,k as i,i as p,Z as S}from"./index-0c2fc791.js";import{_ as V}from"./BaseInput.vue_vue_type_script_setup_true_lang-ddd66502.js";import{c as B}from"./codeValidate-0ee33c61.js";import{r as m}from"./resetForm-9e423046.js";const w="/assets/code-a7e40c9e.png",W={class:"code-wrapper h-auto sm:h-[45vh] md:h-auto overflow-auto"},z={class:"code-img"},A=["src","alt"],E={action:"",id:"coupon"},L={class:"grid my-3"},M=C({__name:"CouponView",setup(N){const{t:l}=_(),t=g(),e=y(),a=r(""),o=r(!1),f=r(!1);T(async()=>{t.setTitle("Coupon"),t.setWidth("680px"),window.addEventListener("resize",c),c(),await u.bankCodeList()}),k(()=>{t.setTitle(""),t.widthReset(),e.setTitle(""),e.setSubTitle("")}),x(e,()=>{e.isClicked&&f.value,e.setIsClicked(!1)});const c=()=>{t.title==="Coupon"&&(window.screen.height<400&&window.screen.width<=568&&window.screen.orientation.type==="landscape-primary"?t.setWidth("300px"):window.screen.height<400&&window.screen.width<=924&&window.screen.orientation.type==="landscape-primary"?t.setWidth("480px"):window.screen.width<600&&window.screen.orientation.type==="portrait-primary"?t.setWidth("600px"):t.setWidth("480px"))};async function h(){if(!o.value){o.value=!0;try{const n={kupong_koda:a.value},s=await u.coupon(n);s.code!==200&&s.error_code!==0?(e.setCompo("AlertView"),e.setType("error"),e.setTitle(l("Popup.SomeThingError")),e.setSubTitle(s.message),e.setIsCancel(!1),e.setIsSubmitted(!0),e.setIsClicked(!1),a.value="",m("coupon"),setTimeout(()=>{o.value=!1},500)):(e.setCompo("AlertView"),e.setType("success"),e.setIsClicked(!1),e.setTitle(l("Popup.success")),e.setSubTitle(s.message),e.setIsSubmitted(!0),e.setIsCancel(!1),a.value="",m("coupon"),setTimeout(()=>{o.value=!1},500)),a.value="",o.value=!1}catch(n){console.error(n),setTimeout(()=>{o.value=!1},500)}}}return(n,s)=>(b(),I("div",W,[d("div",z,[d("img",{loading:"lazy",src:i(w),alt:i(w),class:"w-[100px] md:w-36 mx-auto h-full landscape:w-[75px] landscape:lg:w-36 landscape:md:w-28"},null,8,A)]),d("form",E,[p(V,{title:i(l)("Coupon.input"),placeholder:i(l)("Coupon.input"),modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=v=>a.value=v),minletter:1,valid:i(B)},null,8,["title","placeholder","modelValue","valid"])]),d("div",L,[p(S,{title:`${i(l)("Confirm")}`,loading:o.value,disabled:!a.value||o.value,bg:"active",color:"white",class:"active my-3 !w-[70%] mx-auto text-center !h-9",onClick:s[1]||(s[1]=()=>{h()})},null,8,["title","loading","disabled"])])]))}});export{M 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.