PageSourceSearch

https://neoalexandria.com/_nuxt/d7k_yIqg.js

js neoalexandria.com collected 2026-10-02 01:38:13 UTC 16,076 bytes, 1 lines download raw bytes

1import{e as Be,g as Ie,f as Ae,k as Te,u as De,D as m,r as y,l as Ne,m as xe,U as Ee,c as r,a as e,q as B,t as a,h as t,F as N,G,I as H,s as K,V as Me,y as z,N as Ue,o as c,b as $e,w as Re,v as Ye,d as j,A as Fe,T as Oe,a2 as Ve}from"./xxf4anHk.js";import{u as qe}from"./CEviVuPD.js";import{u as Ge}from"./5wPs2Y0o.js";import{_ as He}from"./DlAUqK2U.js";import"./x6CGG3O9.js";const Ke={class:"subscribe-page"},ze={class:"container"},je={class:"page-header"},Je=["aria-label"],Xe={key:1,class:"plans-section"},We={class:"section-desc"},Ze={class:"plan-list"},Qe=["onClick"],et={key:0,class:"plan-badge"},tt={class:"plan-info"},st={class:"plan-name"},nt={class:"plan-desc"},at={class:"plan-price"},ot={class:"plan-check"},lt={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},it={key:1,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},rt={key:0,class:"payment-section"},ct={class:"payment-info"},ut={class:"info-row"},dt={class:"label"},pt={class:"value"},yt={class:"info-row"},bt={class:"label"},mt={class:"value"},vt={class:"info-row"},gt={class:"label"},ht={class:"value highlight"},_t={key:0,class:"group-input-row"},ft={class:"label"},Pt={class:"number-input"},Ct=["disabled"],wt={class:"unit"},kt={key:0,class:"notice-box"},St={key:1,class:"notice-box"},Lt={class:"notice-intro"},Bt={class:"notice-list"},It={class:"notice-contact"},At={href:"https://pf.kakao.com/_CylxdG",target:"_blank",rel:"noopener noreferrer"},Tt={class:"notice-sub"},Dt={class:"agree-label"},Nt=["disabled"],xt={key:2,class:"plans-section overseas-section"},Et={class:"section-desc"},Mt={class:"plan-list overseas-plan-list"},Ut=["onClick"],$t={class:"plan-info"},Rt={class:"plan-name"},Yt={class:"plan-desc"},Ft={class:"plan-price"},Ot={class:"plan-check"},Vt={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},qt={key:1,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Gt={class:"payment-section overseas-payment-section"},Ht={class:"payment-info"},Kt={class:"info-row"},zt={class:"label"},jt={class:"value"},Jt={class:"info-row currency-row"},Xt={class:"label"},Wt=["disabled"],Zt=["value"],Qt={class:"info-row"},es={class:"label"},ts={class:"value highlight"},ss={class:"notice-box"},ns={key:0,class:"paypal-loading"},as={key:1,class:"paypal-error"},os=Be({__name:"index",props:{enablePaypalTest:{type:Boolean,default:!0}},setup(J){const I=J,{t:o}=Ie(),x=Ae(),w=Te(),{isLoggedIn:ce}=qe(),{apiFetch:X}=Ge();De({title:m(()=>`${o("subscribe.pageTitle")} | ${o("title")}`)});const h=y("domestic"),p=y(""),A=y(!1),E=y(!1),T=y(!1),v=y(10),W=y([]),M=y(""),Z=y(!1),_=y("MONTHLY"),f=y("USD"),U=y(!1),$=y(!1),P=y("");let k=0,S=null,O=null;const V=new Map,i=(n,s)=>String(o(`subscribe.${n}`,s||{})),R=n=>n.toLocaleString(),ue=n=>{try{return new Intl.NumberFormat("en-US",{style:"currency",currency:n}).resolvedOptions().maximumFractionDigits}catch{return 2}},de=(n,s)=>{const l=ue(s);return`${new Intl.NumberFormat("en-US",{minimumFractionDigits:l,maximumFractionDigits:l}).format(n)} ${s}`};Ne(async()=>{if(!ce.value){w.showAlert(i("alerts.loginRequired")),x.push("/login");return}I.enablePaypalTest&&await ye()});const Q=m(()=>[{id:"annual",name:i("plans.annual.name"),price:99e3,priceLabel:i("amount.annual",{amount:R(99e3)}),description:i("plans.annual.description"),badge:""},{id:"monthly",name:i("plans.monthly.name"),price:9900,priceLabel:i("amount.monthly",{amount:R(9900)}),description:i("plans.monthly.description"),badge:""},{id:"group",name:i("plans.group.name"),price:6900,priceLabel:i("amount.monthlyPerPerson",{amount:R(6900)}),description:i("plans.group.description"),badge:i("plans.group.badge")}]),D=m(()=>Q.value.find(n=>n.id===p.value)),ee=m(()=>[{id:"MONTHLY",name:i("paypal.monthlyName"),description:i("paypal.monthlyDescription")},{id:"ANNUAL",name:i("paypal.annualName"),description:i("paypal.annualDescription")}]),pe=m(()=>ee.value.find(n=>n.id===_.value)),Y=m(()=>W.value.filter(n=>n.billingCycle===_.value)),te=m(()=>Y.value.find(n=>n.currencyCode===f.value)),se=m(()=>{const n=te.value;return n?typeof n.amount=="number"&&Number.isFinite(n.amount)?de(n.amount,n.currencyCode):n.amountLabel||n.currencyCode:""}),ne=()=>{Y.value.find(n=>n.currencyCode===f.value)||(f.value=Y.value[0]?.currencyCode||"USD")},ye=async()=>{U.value=!0;try{const n=await X("/api/payment/paypal/plans");M.value=n.clientId||"",Z.value=!!(n.isConfigured&&n.clientId),W.value=[...n.plans||[]].sort((s,l)=>s.billingCycle===l.billingCycle?s.currencyCode.localeCompare(l.currencyCode):s.billingCycle.localeCompare(l.billingCycle)),ne()}catch(n){console.error("Failed to load PayPal plans:",n),P.value=i("paypal.errors.loadPlans")}finally{U.value=!1}},ae=async n=>{n==="overseas"&&!I.enablePaypalTest||(h.value=n,T.value=!1,n==="overseas"&&(p.value="",F()))},be=n=>{_.value=n,ne(),F()},me=n=>{p.value=n,T.value=!1},q=n=>{v.value=Math.max(10,n)},oe=m(()=>v.value*6900),le=m(()=>i("amount.monthly",{amount:R(oe.value)})),ve=m(()=>p.value==="annual"?i("interval.oneYear"):i("interval.thirtyDays")),ge=m(()=>_.value==="ANNUAL"?i("interval.oneYear"):i("interval.oneMonth")),he=async()=>
1{if(!p.value){w.showAlert(i("alerts.selectPlan"));return}if(!A.value){T.value=!0,w.showAlert(i("alerts.agreeAutoPay"));return}E.value=!0,T.value=!1;try{const n=localStorage.getItem("user");if(!n){w.showAlert(i("alerts.loginRequired")),x.push("/login");return}const s=JSON.parse(n),l=D.value;if(!l)return;const u=p.value==="group"?oe.value:l.price;localStorage.setItem("totalAmount",u.toString()),p.value==="group"&&localStorage.setItem("groupCount",v.value.toString());const{loadTossPayments:L}=await Ve(async()=>{const{loadTossPayments:b}=await import("./DoLH1Wzf.js");return{loadTossPayments:b}},[],import.meta.url),d=await L("live_ck_LlDJaYngroXv27yvqlDl8ezGdRpX"),C=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;let g=i("order.monthly");l.id==="annual"?g=i("order.annual"):l.id==="group"&&(g=i("order.group",{count:v.value})),await d.requestBillingAuth("카드",{customerKey:s.uid,amount:u,orderId:C,orderName:g,successUrl:`${window.location.origin}/subscribe/success`,failUrl:`${window.location.origin}/subscribe/fail`,customerEmail:s.email})}catch(n){console.error("Payment error:",n),n.code==="USER_CANCEL"||w.showAlert(i("alerts.paymentError"))}finally{E.value=!1}},_e=()=>{const n=localStorage.getItem("user");if(!n)return null;try{return JSON.parse(n)}catch{return null}},ie=()=>{try{O?.close?.()}catch{}O=null;const n=document.getElementById("paypal-button-container");n&&(n.innerHTML="")},fe=n=>`paypal${n.toUpperCase()}`,Pe=async n=>{const s=fe(n),l=window;if(l[s]?.Buttons)return l[s];const u=V.get(s);if(u)return u;const L=document.querySelector(`script[data-calvin-paypal-sdk="true"][data-namespace="${s}"]`);L&&L.remove();const d=document.createElement("script");d.dataset.calvinPaypalSdk="true",d.dataset.currency=n,d.dataset.namespace=s,d.src=`https://www.paypal.com/sdk/js?client-id=${encodeURIComponent(M.value)}&components=buttons&vault=true&intent=subscription&currency=${encodeURIComponent(n)}`,d.async=!0;const C=new Promise((g,b)=>{d.onload=()=>{const re=l[s];re?.Buttons?g(re):b(new Error(`PayPal SDK is not ready for ${n}`))},d.onerror=()=>b(new Error("PayPal SDK load failed")),document.head.appendChild(d)}).finally(()=>{V.delete(s)});return V.set(s,C),C},Ce=n=>String(n?.message||n||"").includes("zoid destroyed"),we=async(n=++k)=>{if(!I.enablePaypalTest||h.value!=="overseas")return;const s=te.value;if(!s)return;const l=s.currencyCode,u=s.billingCycle;if(ie(),P.value="",!Z.value||!M.value){P.value=i("paypal.errors.notConfigured");return}const L=_e();if(!L?.uid){P.value=i("alerts.loginRequired");return}$.value=!0;try{const d=await Pe(l);if(await Ue(),n!==k||h.value!=="overseas"||f.value!==l||_.value!==u)return;if(!d?.Buttons)throw new Error("PayPal SDK is not ready");const C=d.Buttons({style:{shape:"rect",color:"gold",layout:"vertical",label:"subscribe"},createSubscription(g,b){return b.subscription.create({plan_id:s.planId,custom_id:L.uid,application_context:{shipping_preference:"NO_SHIPPING"}})},async onApprove(g){if(!g.subscriptionID)throw new Error("PayPal subscription id is missing");const b=await X("/api/payment/paypal/confirm",{method:"POST",body:{subscriptionId:g.subscriptionID}});w.setBilledYn(b.billedYn||"Y"),localStorage.setItem("BILLING_DAY",b.paymentDay||""),localStorage.setItem("CURRENT_PAYMENT",String(b.totalAmount||0)),localStorage.setItem("PAYMENT_PROVIDER","paypal"),localStorage.setItem("PAYMENT_CURRENCY",b.currencyCode||s.currencyCode),localStorage.setItem("PAYMENT_BILLING_CYCLE",b.billingCycle||s.billingCycle),w.showAlert(i("paypal.alerts.completed")),await x.push("/mypage/subscription")},onError(g){console.error("PayPal subscription error:",g),P.value=i("paypal.errors.processing")},onCancel(){P.value=""}});if(n!==k||h.value!=="overseas"||f.value!==l||_.value!==u){try{C?.close?.()}catch{}return}O=C,await C.render("#paypal-button-container")}catch(d){if(n!==k)return;if(Ce(d)){F();return}console.error("PayPal button render error:",d),P.value=i("paypal.errors.buttonLoad")}finally{n===k&&($.value=!1)}},F=()=>{!I.enablePaypalTest||h.value!=="overseas"||(S&&clearTimeout(S),$.value=!0,S=setTimeout(()=>{S=null,we(++k)},120))};xe([f,h,M,_],()=>{I.enablePaypalTest&&h.value==="overseas"&&F()}),Ee(()=>{k+=1,S&&(clearTimeout(S),S=null),ie()});const ke=n=>{const s=n;
1if(!s.parentElement)return;const u=s.offsetTop;s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.width="100%",s.style.top=`${u}px`},Se=n=>{const s=n;s.style.position="",s.style.left="",s.style.right="",s.style.width="",s.style.top=""},Le=()=>{x.back()};return(n,s)=>(c(),r("div",Ke,[e("div",ze,[e("header",je,[e("button",{class:"back-btn",onClick:Le},[...s[8]||(s[8]=[e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[e("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),e("h1",null,a(t(o)("subscribe.header")),1),s[9]||(s[9]=e("div",{class:"spacer"},null,-1))]),J.enablePaypalTest?(c(),r("div",{key:0,class:"payment-region-tabs",role:"tablist","aria-label":t(o)("subscribe.regionTabs")},[e("button",{type:"button",class:N({active:t(h)==="domestic"}),onClick:s[0]||(s[0]=l=>ae("domestic"))},a(t(o)("subscribe.domesticPayment")),3),e("button",{type:"button",class:N({active:t(h)==="overseas"}),onClick:s[1]||(s[1]=l=>ae("overseas"))},a(t(o)("subscribe.overseasPayment")),3)],8,Je)):B("",!0),t(h)==="domestic"?(c(),r("section",Xe,[e("h2",null,a(t(o)("subscribe.planSelection")),1),e("p",We,a(t(o)("subscribe.planDescription")),1),e("div",Ze,[(c(!0),r(G,null,H(t(Q),l=>(c(),r("div",{key:l.id,class:"plan-item"},[e("div",{class:N(["plan-card",{selected:t(p)===l.id}]),onClick:u=>me(l.id)},[l.badge?(c(),r("div",et,a(l.badge),1)):B("",!0),e("div",tt,[e("h3",st,a(l.name),1),e("p",nt,a(l.description),1)]),e("div",at,a(l.priceLabel),1),e("div",ot,[t(p)===l.id?(c(),r("svg",lt,[...s[10]||(s[10]=[e("circle",{cx:"12",cy:"12",r:"12",fill:"#1A70B8"},null,-1),e("path",{d:"M8 12L11 15L16 9",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(c(),r("svg",it,[...s[11]||(s[11]=[e("circle",{cx:"12",cy:"12",r:"11",stroke:"#DDD","stroke-width":"2"},null,-1)])]))])],10,Qe),$e(Oe,{name:"payment-fade",onBeforeLeave:ke,onAfterLeave:Se},{default:Re(()=>[t(D)&&t(p)===l.id?(c(),r("section",rt,[e("h2",null,a(t(o)("subscribe.paymentInfo")),1),e("div",ct,[e("div",ut,[e("span",dt,a(t(o)("subscribe.labels.subscriptionName")),1),e("span",pt,a(t(o)("subscribe.autoPaymentName",{name:t(D).name})),1)]),e("div",yt,[e("span",bt,a(t(o)("subscribe.labels.paymentMethod")),1),e("span",mt,a(t(o)("subscribe.creditDebitCard")),1)]),e("div",vt,[e("span",gt,a(t(o)("subscribe.labels.paymentAmount")),1),e("span",ht,a(t(p)==="group"?t(le):t(D).priceLabel),1)]),t(p)==="group"?(c(),r("div",_t,[e("span",ft,a(t(
1o)("subscribe.labels.subscriberCount")),1),e("div",Pt,[e("button",{onClick:s[2]||(s[2]=u=>q(t(v)-1)),disabled:t(v)<=10},"-",8,Ct),K(e("input",{type:"number","onUpdate:modelValue":s[3]||(s[3]=u=>z(v)?v.value=u:null),min:"10",onChange:s[4]||(s[4]=u=>q(t(v)))},null,544),[[Ye,t(v),void 0,{number:!0}]]),e("button",{onClick:s[5]||(s[5]=u=>q(t(v)+1))},"+"),e("span",wt,a(t(o)("subscribe.unit.people")),1)])])):B("",!0)]),t(p)!=="group"?(c(),r("div",kt,[e("em",null,a(t(o)("subscribe.notice.autoPaymentTitle")),1),e("ul",null,[e("li",null,a(t(o)("subscribe.notice.autoBillingAfter",{interval:t(ve)})),1),e("li",null,a(t(o)("subscribe.notice.cancelInMypage")),1),e("li",null,a(t(o)("subscribe.notice.useUntilPeriodEnd")),1)])])):(c(),r("div",St,[e("em",null,a(t(o)("subscribe.group.title")),1),e("p",Lt,a(t(o)("subscribe.group.intro")),1),e("ol",Bt,[e("li",null,a(t(o)("subscribe.group.optionSignupList")),1),e("li",null,a(t(o)("subscribe.group.optionCreatedAccounts")),1)]),e("p",It,[j(a(t(o)("subscribe.group.contactPrefix"))+" ",1),e("a",At,a(t(o)("subscribe.group.kakaoChat")),1),j(" "+a(t(o)("subscribe.group.contactMiddle"))+" ",1),s[12]||(s[12]=e("a",{href:"mailto:[email protected]"},"[email protected]",-1)),j(" "+a(t(o)("subscribe.group.contactSuffix")),1)]),e("em",Tt,a(t(o)("subscribe.notice.autoPaymentTitle")),1),e("ul",null,[e("li",null,a(t(o)("subscribe.notice.autoBillingAfter",{interval:t(o)("subscribe.interval.thirtyDays")})),1),e("li",null,a(t(o)("subscribe.notice.cancelInMypage")),1),e("li",null,a(t(o)("subscribe.notice.useUntilPeriodEnd")),1)])])),e("div",{class:N(["agree-box",{error:t(T)&&!t(A)}])},[e("label",Dt,[K(e("input",{type:"checkbox","onUpdate:modelValue":s[6]||(s[6]=u=>z(A)?A.value=u:null)},null,512),[[Fe,t(A)]]),e("span",null,a(t(o)("subscribe.agreeTerms")),1)])],2),e("button",{class:"pay-btn",disabled:t(E),onClick:he},a(t(E)?t(o)("subscribe.processing"):t(o)("subscribe.payButton",{amount:t(p)==="group"?t(le):t(D).priceLabel})),9,Nt)])):B("",!0)]),_:2},1024)]))),128))])])):(c(),r("section",xt,[e("h2",null,a(t(o)("subscribe.paypal.title")),1),e("p",Et,a(t(o)("subscribe.paypal.description")),1),e("div",Mt,[(c(!0),r(G,null,H(t(ee),l=>(c(),r("div",{key:l.id,class:"plan-item"},[e("div",{class:N(["plan-card overseas-plan-card",{selected:t(_)===l.id}]),onClick:u=>be(l.id)},[e("div",$t,[e("h3",Rt,a(l.name),1),e("p",Yt,a(l.description),1)]),e("div",Ft,a(t(_)===l.id?t(se)||t(o)("subscribe.paypal.selectCurrency"):""),1),e("div",Ot,[t(_)===l.id?(c(),r("svg",Vt,[...s[13]||(s[13]=[e("circle",{cx:"12",cy:"12",r:"12",fill:"#1A70B8"},null,-1),e("path",{d:"M8 12L11 15L16 9",stroke:"white","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(c(),r("svg",qt,[...s[14]||(s[14]=[e("circle",{cx:"12",cy:"12",r:"11",stroke:"#DDD","stroke-width":"2"},null,-1)])]))])],10,Ut)]))),128))]),e("section",Gt,[e("h2",null,a(t(o)("subscribe.paymentInfo")),1),e("div",Ht,[e("div",Kt,[e("span",zt,a(t(
1o)("subscribe.labels.subscriptionName")),1),e("span",jt,a(t(o)("subscribe.paypal.subscriptionName",{name:t(pe)?.name})),1)]),e("div",Jt,[e("span",Xt,a(t(o)("subscribe.labels.currency")),1),K(e("select",{"onUpdate:modelValue":s[7]||(s[7]=l=>z(f)?f.value=l:null),class:"currency-select",disabled:t(U)},[(c(!0),r(G,null,H(t(Y),l=>(c(),r("option",{key:`${l.billingCycle}-${l.currencyCode}`,value:l.currencyCode},a(l.currencyCode),9,Zt))),128))],8,Wt),[[Me,t(f)]])]),e("div",Qt,[e("span",es,a(t(o)("subscribe.labels.paymentAmount")),1),e("span",ts,a(t(se)||t(o)("subscribe.paypal.confirmAmountOnPaypal")),1)])]),e("div",ss,[e("em",null,a(t(o)("subscribe.paypal.noticeTitle")),1),e("ul",null,[e("li",null,a(t(o)("subscribe.paypal.noticePlanCurrency")),1),e("li",null,a(t(o)("subscribe.notice.autoBillingAfter",{interval:t(ge)})),1),e("li",null,a(t(o)("subscribe.paypal.noticeStatusApplied")),1),e("li",null,a(t(o)("subscribe.paypal.noticeCancel")),1)])]),t(U)||t($)?(c(),r("div",ns,a(t(o)("subscribe.paypal.loading")),1)):B("",!0),s[15]||(s[15]=e("div",{id:"paypal-button-container",class:"paypal-button-container"},null,-1)),t(P)?(c(),r("p",as,a(t(P)),1)):B("",!0)])]))])]))}}),ds=He(os,[["__scopeId","data-v-2395b814"]]);export{ds 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.