1import{_ as O}from"./FormLists.vue.CwgJ3uNo.js";import{_ as I}from"./Button.vue.iuFX7ws9.js";import{_ as k}from"./ButtonList.vue.Gy0_Apc8.js";import{f as M,h as S,g as U,U as x,r as i,P as p,X as A,y as D,z as V,Y as $,o as j,c as q,a as c,s as m,j as e,b as l,A as F,w as y,d as g,t as z}from"./entry.t-Ufchk8.js";import{u as H,c as X}from"./useGMOPayment.DjiI06gA.js";import{u as Y}from"./useSnackbar.DIBJS4gZ.js";import{u as J}from"./useErrorHandler.Bd4zh1VL.js";import{c as s}from"./commonClass.Dw9dIX-c.js";import{j as d}from"./options.CaNdmmjX.js";import"./index.CS7R4WcE.js";import"./constants.J4al_Qog.js";import"./Selectbox.vue.ujW_6B5p.js";import"./FormField.vue.rvXVJBRQ.js";import"./InputErrorMessage.vue.Bx2Eyf2H.js";import"./Svg.vue.BsyQtV33.js";import"./TextField.vue.DtM0PU4i.js";import"./Link.vue.j4k1Np3W.js";import"./Loading.vue.tgtaQTtP.js";import"./index.C_vm0OP3.js";const ve=M({__name:"payment",props:{prevPage:{}},setup(K){const w=S();U();const n=w.query,u=x(),N=H(),b=X(),{success:f}=Y(),v=i(null),o=i(!1),E=Object.values(p),t=i(typeof n.type=="string"&&E.some(a=>n.type===a)?n.type:u.paymentGatewayType===A.GMO?p.GMO_CREDIT:p.STRIPE_CREDIT),_=typeof n.step=="string"?parseInt(n.step,10):NaN,r=i(isNaN(_)?1:_),P=i(0),R=D(()=>d.includes(t.value)?r.value===1?"飿ºãã":"確èªãã":"夿´ãã");V(()=>t.value,()=>{r.value=1,P.value=0});const h=async()=>{o.value=!0;try{if(t.value===p.GMO_CREDIT){const a=await N.updateGmoPayment(!0,`${window.location.origin}/payment/auth?retUrl=/%23/subscription/status`);if(a){location.href=a;return}f("夿´ãã¾ãã");return}if(t.value===p.CONVENIENCE_STORE){await b.updateConveniencePayment(),f("夿´ãã¾ãã");return}if(d.includes(t.value)&&r.value===1){await u.agreeAcceptPayment(v.value,t.value);return}throw new Error("å
¥åãã¦ããã ããå
容ã«ä¸åãããã¾ã")}catch(a){J(a)}finally{o.value=!1}};return $(async()=>{if(!(d.includes(t.value)&&r.value===2))return;if(await u.updateCashlessPayment(t.value,r,P)){f("ã¢ã«ã¦ã³ãã®é£æºãå®äºããæ±ºæ¸æ¹æ³ã夿´ãã¾ãã");return}}),(a,T)=>{const B=O,C=I,G=k;return j(),q("section",{class:m(e(s).contents())},[c("h1",{class:m(e(s).mainTitle())},"æ±ºæ¸æ
å ±",2),c("div",{class:m(e(s).innerNormal())},[c("div",{class:m(e(s).formCourse())},[l(B,{ref_key:"paymentFormListsRef",ref:v,"payment-type":e(t),"onUpdate:paymentType":T[0]||(T[0]=L=>F(t)?t.value=L:null),paymentTypesLists:e(u).paymentTypesLists},null,8,["payment-type","paymentTypesLists"])],2),c("div",{class:m([e(s).formCourse(),e(s).formCourseButton()])},[l(G,{length:2},{button1:y(()=>[l(C,{color:"cancel",to:a.prevPage,disabled:e(o)},{default:y(()=>[g("æ»ã")]),_:1},8,["to","disabled"])]),button2:y(()=>[l(C,{disabled:e(o),loading:e(o),onClick:h},{default:y(()=>[g(z(e(R)),1)]),_:1},8,["disabled","loading"])]),_:1})],2)],2)],2)}}});export{ve 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.