1import{$ as T,A as Ne,J as l,L as N,Ot as De,S as ne,St as _,Tt as u,W as Re,Z as v,_ as c,bt as h,f as A,g as xt,gt as w,h as t,o as b,ot as g,tt as xe,v as i,vt as te,x as U,yt as V}from"./nsli55b8SS.js";import{N as bt,a as Te,gt as O}from"./5U5qqtKLFM.js";import{t as Ge}from"./CqPkPHku8T.js";import{t as yt}from"./BCVZVYygP0.js";import{t as ft}from"./CFHHUrstqh2.js";import{t as je}from"./BfN9mppESB2.js";import"./C71WaYUVpl.js";import{t as ht}from"./C6lEqFO3zf.js";import{t as _t}from"./ro-uQt9n3o.js";Ne();var be=[],we=p=>{if(!Array.isArray(p)||p.length===0)return be;const e={count:"í",day:"ì¼",days:"ì¼",person:"ëª
",people:"ëª
",item:"ê°",items:"ê°",coin:"ì½ì¸",credit:"í¬ë ë§"};return p.map(C=>({value:String(C.value||C.key||C.progressType||"").trim(),label:String(C.label||C.name||C.value||"").trim(),unit:String(C.unit||e[C.unitCode]||C.unitCode||"").trim(),description:String(C.description||C.goalLabel||"").trim(),valueKind:String(C.valueKind||"number").trim(),supportsAggregationStartAt:C.supportsAggregationStartAt===!0,requiresActionEventName:C.requiresActionEventName===!0})).filter(C=>C.value)},Le={ko:"",en:"",jp:"",zh:"","zh-Hant":"",es:""},Ct=p=>{if(!p)return"";const e=new Date(p);return Number.isFinite(e.getTime())?new Date(e.getTime()-e.getTimezoneOffset()*60*1e3).toISOString().slice(0,16):""},kt=p=>({name:p?.name||"",multiLangName:{...Le,...p?.multiLangName||{}},multiLangDescription:{...Le,...p?.multiLangDescription||{}},active:p?.active??!0,isEvent:p?.isEvent===!0,progressType:p?.progressType||"",targetValue:p?.targetValue??1,aggregationStartAt:Ct(p?.aggregationStartAt),actionEventName:p?.actionEventName||""}),Tt={name:"AdminAchievementEditPopup",components:{MultiLangInput:je},props:{data:{type:Object,default:null}},emits:["close-popup"],setup(p,{emit:e}){const C=A(()=>p.data?.achievement||null),a=A(()=>!!C.value?._id),y=v(kt(C.value)),S=v(!1),E=v(!1),m=v(we(p.data?.progressTypes)),I=A(()=>Array.isArray(p.data?.actionTypes)?p.data.actionTypes.filter(x=>x?.value&&x.value!=="achievement"):[]),n=A(()=>m.value.find(x=>x.value===y.value.progressType)),f=A(()=>n.value?n.value.valueKind==="boolean"?`${n.value.label} ìë£`:`${n.value.label} ${y.value.targetValue||0}${n.value.unit}`:""),o=A(()=>{const x=[];if(y.value.name.trim()||x.push("ë´ë¶ ì´ë¦ì ì
ë ¥í´ì£¼ì¸ì."),y.value.progressType?n.value||x.push("ì íí ì§íë ì¢
ë¥ ì 보를 ë¶ë¬ì¤ì§ 못íìµëë¤. ë¤ì ìëí´ì£¼ì¸ì."):x.push("ì§íë ì¢
ë¥ë¥¼ ì íí´ì£¼ì¸ì."),(!Number.isInteger(y.value.targetValue)||y.value.targetValue<=0)&&x.push("목íê°ì 1 ì´ìì ì ìë¡ ì
ë ¥í´ì£¼ì¸ì."),n.value?.valueKind==="boolean"&&y.value.targetValue!==1&&x.push("ìë£ ì¬ë¶ 기ì¤ì 목íê°ì 1ì´ì´ì¼ í©ëë¤."),y.value.aggregationStartAt&&!Number.isFinite(new Date(y.value.aggregationStartAt).getTime())&&x.push("ì¬ë°ë¥¸ ì§ê³ ììì¼ì ì
ë ¥í´ì£¼ì¸ì."),n.value?.requiresActionEventName){const P=y.value.actionEventName.trim();P?P.length>120?x.push("íë ì½ëë 120ì ì´íë¡ ì
ë ¥í´ì£¼ì¸ì."):/^[a-z0-9_:-]+$/.test(P)?P==="achievement"&&x.push("achievementë íë ì½ëë¡ ì¬ì©í ì ììµëë¤."):x.push("íë ì½ëë ì문ì, ì«ì, _, :, - 문ìë§ ì¬ì©í ì ììµëë¤."):x.push("íë ì½ë를 ì
ë ¥í´ì£¼ì¸ì.")}return x}),M=async()=>{E.value=!0;try{const{data:x}=await O.adminGetAchievementProgressTypes();m.value=we(x?.progressTypes)}catch{m.value.length===0&&(m.value=be)}finally{E.value=!1}},R=async()=>{if(!o.value.length){S.value=!0;try{const x={name:y.value.name.trim(),multiLangName:y.value.multiLangName,multiLangDescription:y.value.multiLangDescription,active:y.value.active,isEvent:y.value.isEvent,progressType:y.value.progressType,targetValue:y.value.targetValue,aggregationStartAt:n.value.supportsAggregationStartAt&&y.value.aggregationStartAt?new Date(y.value.aggregationStartAt).toISOString():null,actionEventName:n.value.requiresActionEventName?y.value.actionEventName.trim():null},P=a.value?await O.adminUpdateAchievement(C.value._id,x):await O.adminCreateAchievement(x);if(!P.data?.success){alert("ì ì¥ ì¤í¨: "+(P.data?.error||"Unknown error"));return}await p.data?.onSaved?.(),e("close-popup")}catch(x){alert("ì ì¥ ì¤í¨: "+(x.response?.data?.error||x.message))}finally{S.value=!1}}};return _(()=>n.value?.valueKind,x=>{x==="boolean"&&(y.value.targetValue=1)}),_(()=>n.value?.supportsAggregationStartAt,x=>{!x&&(!y.value.progressType||n.value)&&(y.value.aggregationStartAt="")},{immediate:!0}),_(()=>y.value.progressType,()=>{n.value&&(n.value.requiresActionEventName||(y.value.actionEventName=""))}),Re(()=>{m.value.length===0&&M()}),{form:y,isEditing:a,isSaving:S,isLoadingProgressTypes:E,progressTypes:m,actionTypes:I,selectedProgressType:n,progressSummary:f,validationErrors:o,save:R}}},wt={class:"w-full"},At={class:"mb-6"},Ut={class:"text-md leading-standard text-content-primary"},Pt={class:"flex flex-col gap-4"},Et={class:"rounded-8px border border-border-strong p-4"},Ot={class:"mb-3 flex flex-col gap-component-sm-tight"},Vt={class:"mb-3"},St={class:"rounded-8px border border-border-strong p-4"},It={class:"grid gap-3 md:grid-cols-[1fr_160px]"},Mt={class:"flex flex-col gap-component-sm-tight"},Dt=["value"],Lt={class:"flex flex-col gap-component-sm-tight"},Ft={class:"flex items-center gap-2"},Nt=["disabled"],Rt={class:"shrink-0 text-xs leading-standard text-content-secondary"},Gt={key:0,class:"rounded-8px mt-3 bg-accent-default/minimal p-3"},jt={class:"text-xs font-weight-medium leading-standard text-accent-default"},Bt={class:"mt-1 text-xs leading-standard text-content-secondary"},Ht={key:1,class:"mt-3 grid gap-3 md:grid-cols-2"},zt={class:"flex flex-col gap-component-sm-tight"},Kt={id:"achievement-action-event-names"},Yt=["value"],Wt={class:"mt-3 flex flex-col gap-component-sm-tight"},qt=["disabled"],Qt={key:0,class:"text-xs leading-standard text-content-secondary"},Zt={key:1,class:"text-xs leading-standard text-content-secondary"},Jt={key:2,class:"text-xs leading-standard text-content-secondary"},Xt={key:2,class:"mt-2 text-xs leading-standard text-content-secondary"},$t={class:"grid gap-4 md:grid-cols-2"},ea={class:"rounded-8px flex items-center gap-2 border border-border-strong p-4"},ta={class:"rounded-8px flex items-center gap-2 border border-border-strong p-4"},aa={key:0,class:"rounded-8px mt-4 border border-status-danger-foreground
1/disabled bg-status-danger-foreground/minimal p-3"},na={class:"list-disc pl-5 text-xs leading-standard text-status-danger-foreground"},ra={class:"mt-6 flex justify-end gap-2"},oa=["disabled"],sa=["disabled"];function la(p,e,C,a,y,S){const E=xe("MultiLangInput");return l(),i("div",wt,[t("div",At,[t("h2",Ut,g(a.isEditing?"ì
ì 쿼리 ìì ":"ì ì
ì 쿼리 ë±ë¡"),1),e[9]||(e[9]=t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"}," ì§íë ì¢
ë¥ì 목íê°ë§ ì¤ì íë©´ ì¡°í ë°©ìê³¼ ë¨ìë ìëì¼ë¡ ì ì©ë©ëë¤. íì ì´ë¯¸ì§ë ì°ê²°ë ì¿ í° ì´ë¯¸ì§ë¥¼ ì¬ì©í©ëë¤. ",-1))]),t("div",Pt,[t("section",Et,[e[13]||(e[13]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"기본 ì ë³´",-1)),t("label",Ot,[e[10]||(e[10]=t("span",{class:"text-xs leading-standard text-content-secondary"}," ë´ë¶ ì´ë¦ * ",-1)),u(t("input",{class:"rounded-8px outline-none border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary placeholder:text-content-secondary focus:border-accent-default",type:"text","onUpdate:modelValue":e[0]||(e[0]=m=>a.form.name=m),placeholder:"ê´ë¦¬ì© ì´ë¦ (ì: 첫 ì±í
10í)"},null,512),[[h,a.form.name]])]),t("div",Vt,[e[11]||(e[11]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"}," ë¤êµì´ ì´ë¦ ",-1)),ne(E,{langs:a.form.multiLangName,placeholder:{ko:"ì±í
ì
문ì",en:"Chat Starter",jp:"ãã£ããå
¥éè
",zh:"èå¤©æ°æ","zh-Hant":"èå¤©æ°æ"}},null,8,["langs"])]),t("div",null,[e[12]||(e[12]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"}," ë¤êµì´ ì¤ëª
",-1)),ne(E,{type:"textarea",langs:a.form.multiLangDescription,rows:2,placeholder:{ko:"AI ì±í
ì 10í ì´ì©í´ë³´ì¸ì.",en:"Send 10 AI chat messages.",jp:"AIãã£ããã10åå©ç¨ãã¦ãã ããã",zh:"宿10次AIè天ã","zh-Hant":"宿10次AIè天ã"}},null,8,["langs"])])]),t("section",St,[e[20]||(e[20]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"ì§íë ì¤ì ",-1)),t("div",It,[t("label",Mt,[e[15]||(e[15]=t("span",{class:"text-xs leading-standard text-content-secondary"}," ì§íë ì¢
ë¥ * ",-1)),u(t("select",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[1]||(e[1]=m=>a.form.progressType=m)},[e[14]||(e[14]=t("option",{value:""},"ì¢
ë¥ë¥¼ ì ííì¸ì",-1)),(l(!0),i(b,null,T(a.progressTypes,m=>(l(),i("option",{key:m.value,value:m.value},g(m.label),9,Dt))),128))],512),[[V,a.form.progressType]])]),t("label",Lt,[e[16]||(e[16]=t("span",{class:"text-xs leading-standard text-content-secondary"}," 목íê° * ",-1)),t("div",Ft,[u(t("input",{class:"rounded-8px min-w-0 flex-1 border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":e[2]||(e[2]=m=>a.form.targetValue=m),min:"1",step:"1",disabled:a.selectedProgressType?.valueKind==="boolean"},null,8,Nt),[[h,a.form.targetValue,void 0,{number:!0}]]),t("span",Rt,g(a.selectedProgressType?.unit||""),1)])])]),a.selectedProgressType?(l(),i("div",Gt,[t("div",jt,g(a.progressSummary),1),t("p",Bt,g(a.selectedProgressType.description),1)])):c("",!0),a.selectedProgressType?.requiresActionEventName?(l(),i("div",Ht,[t("label",zt,[e[17]||(e[17]=t("span",{class:"text-xs leading-standard text-content-secondary"}," íë ì½ë * ",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[3]||(e[3]=m=>a.form.actionEventName=m),maxlength:"120",list:"achievement-action-event-names",placeholder:"ì: send_chat_message"},null,512),[[h,a.form.actionEventName]]),t("datalist",Kt,[(l(!0),i(b,null,T(a.actionTypes,m=>(l(),i("option",{key:m.value,value:m.value},g(m.label),9,Yt))),128))]),e[18]||(e[18]=t("span",{class:"text-xs leading-standard text-content-secondary"}," ì문ì, ì«ì, _, :, - 문ìë§ ì¬ì©í ì ììµëë¤. ",-1))])])):c("",!0),t("label",Wt,[e[19]||(e[19]=t("span",{class:"text-xs leading-standard text-content-secondary"}," ì§ê³ ììì¼ (ì í) ",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary disabled:cursor-not-allowed disabled:opacity-disabled",type:"datetime-local","onUpdate:modelValue":e[4]||(e[4]=m=>a.form.aggregationStartAt=m),disabled:!a.selectedProgressType?.supp
1ortsAggregationStartAt},null,8,qt),[[h,a.form.aggregationStartAt]]),a.selectedProgressType?.supportsAggregationStartAt?(l(),i("span",Qt," ì
ë ¥íë©´ í´ë¹ ìê° ì´í ë°ì´í°ë§ ì§ê³íê³ , ë¹ìëë©´ ì ì²´ 기ê°ì ëì ì¼ë¡ ì§ê³í©ëë¤. ")):a.selectedProgressType?(l(),i("span",Zt," ì´ ì§íë ì¢
ë¥ë ì§ê³ ììì¼ì ì§ìíì§ ììµëë¤. ")):(l(),i("span",Jt," ì§íë ì¢
ë¥ë¥¼ ì ííë©´ ì§ì ì¬ë¶ë¥¼ íì¸í ì ììµëë¤. "))]),a.isLoadingProgressTypes?(l(),i("p",Xt," ì§íë ì¢
ë¥ë¥¼ ë¶ë¬ì¤ë ì¤ì
ëë¤. ")):c("",!0)]),t("div",$t,[t("label",ea,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=m=>a.form.isEvent=m)},null,512),[[w,a.form.isEvent]]),e[21]||(e[21]=t("div",null,[t("div",{class:"text-xs font-weight-medium leading-standard text-content-primary"}," ì´ë²¤í¸ ì
ì "),t("div",{class:"text-xs leading-standard text-content-secondary"}," ì´ë²¤í¸ ì
ì ì¼ë¡ íìíë©°, ìë ¹ ì ìë ìë¨ì ë
¸ì¶í©ëë¤. ")],-1))]),t("label",ta,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=m=>a.form.active=m)},null,512),[[w,a.form.active]]),e[22]||(e[22]=t("div",null,[t("div",{class:"text-xs font-weight-medium leading-standard text-content-primary"}," íì±í "),t("div",{class:"text-xs leading-standard text-content-secondary"}," íì± ì¿¼ë¦¬ë§ ì¬ì©ì ì
ì íê³¼ ì¿ í° ë³´ì ì°ê²°ì ì¬ì©ë©ëë¤. ")],-1))])])]),a.validationErrors.length?(l(),i("div",aa,[t("ul",na,[(l(!0),i(b,null,T(a.validationErrors,m=>(l(),i("li",{key:m},g(m),1))),128))])])):c("",!0),t("div",ra,[t("button",{class:"rounded-8px border border-border-strong px-4 py-2 text-content-primary hover:bg-surface-interactive",disabled:a.isSaving,onClick:e[7]||(e[7]=m=>p.$emit("close-popup"))}," ì·¨ì ",8,oa),t("button",{class:"rounded-8px bg-accent-default px-4 py-2 text-accent-content hover:opacity-strong disabled:opacity-disabled",disabled:a.isSaving||a.validationErrors.length>0,onClick:e[8]||(e[8]=(...m)=>a.save&&a.save(...m))},g(a.isSaving?"ì ì¥ ì¤...":a.isEditing?"ìì ":"ë±ë¡"),9,sa)])])}var ia=Ge(Tt,[["render",la]]);Ne();var da=[{id:"all",label:"ì ì²´"},{id:"signup",label:"ê°ì
/íë¡í"},{id:"login",label:"ë¡ê·¸ì¸/ì¶ì"},{id:"payment",label:"ê²°ì /ì¶©ì "},{id:"content",label:"ì½í
ì¸ "},{id:"social",label:"ìì
"},{id:"creator",label:"í¬ë¦¬ìì´í°"},{id:"livestream",label:"ë¼ì´ë¸"},{id:"aichat",label:"AIì±í
"},{id:"videocall",label:"ììíµí"},{id:"game",label:"ê²ì/ê°ì± "},{id:"event",label:"ì´ë²¤í¸"},{id:"achievement",label:"ì
ì "},{id:"utility",label:"ë²ì©"}],ae=[{value:"complete_signup",label:"íìê°ì
ìë£",category:"signup"},{value:"complete_creator_registration",label:"í¬ë¦¬ìì´í° ë±ë¡",category:"signup"},{value:"upload_avatar",label:"íë¡í ì´ë¯¸ì§ ì
ë¡ë",category:"signup"},{value:"first_avatar",label:"첫 íë¡í ì´ë¯¸ì§",category:"signup"},{value:"update_bio",label:"ì기ìê° ìì ",category:"signup"},{value:"set_custom_url",label:"커ì¤í
URL ì¤ì ",category:"signup"},{value:"verify_phone",label:"í´ëí° ì¸ì¦",category:"signup"},{value:"enable_2fa",label:"2ë¨ê³ ì¸ì¦ íì±í",category:"signup"},{value:"get_user",label:"íì´ì§ 방문 (getUser)",category:"login"},{value:"daily_login",label:"ì¼ì¼ ë¡ê·¸ì¸",category:"login"},{value:"birthday_login",label:"ìì¼ ë¡ê·¸ì¸",category:"login"},{value:"seasonal_login",label:"ìì¦ ì´ë²¤í¸ ë¡ê·¸ì¸",category:"login"},{value:"enable_push_notifications",label:"í¸ì ì림 íì±í",category:"login"},{value:"rplay_app_install",label:"ìíë ì´ ì± ì¤ì¹",category:"login"},{value:"story_engine_app_install",label:"ì¤í 리ìì§ ì± ì¤ì¹",category:"login"},{value:"romantic_play_app_install",label:"ë¡ë§¨í±íë ì´ ì± ì¤ì¹",category:"login"},{value:"login_streak_milestone",label:"ì°ì ë¡ê·¸ì¸ ë§ì¼ì¤í¤",category:"login",isMilestone:!0,milestoneDescription:"ì°ì ë¡ê·¸ì¸ ì¼ì",milestoneUnit:"ì¼",milestoneEx
1ample:"7, 30, 100, 365"},{value:"return_after_inactive",label:"í´ë©´ ë³µê·",category:"login",isMilestone:!0,milestoneDescription:"í´ë©´ í ë³µê· ì¼ì",milestoneUnit:"ì¼",milestoneExample:"7, 30, 90"},{value:"complete_coin_charge",label:"ì½ì¸ ì¶©ì ìë£",category:"payment"},{value:"complete_credit_charge",label:"í¬ë ë§ ì¶©ì ìë£",category:"payment"},{value:"complete_paid_subscription_web",label:"구ë
ê²°ì ìë£",category:"payment"},{value:"first_game_purchase",label:"첫 ê²ì 구매",category:"payment"},{value:"refer_friend",label:"ì¹êµ¬ ì¶ì²",category:"payment"},{value:"no_coin_payments_yet",label:"ì½ì¸ 미결ì ì ì ",category:"payment"},{value:"no_credit_payments_yet",label:"í¬ë ë§ ë¯¸ê²°ì ì ì ",category:"payment"},{value:"watch_video_complete",label:"ìì ìì² ìë£",category:"content"},{value:"first_video_watched",label:"첫 ìì ìì²",category:"content"},{value:"listen_audio_complete",label:"ì¤ëì¤ ì²ì·¨ ìë£",category:"content"},{value:"first_audio_listened",label:"첫 ì¤ëì¤ ì²ì·¨",category:"content"},{value:"download_content",label:"ì½í
ì¸ ë¤ì´ë¡ë",category:"content"},{value:"create_playlist",label:"íë ì´ë¦¬ì¤í¸ ìì±",category:"content"},{value:"add_to_playlist",label:"íë ì´ë¦¬ì¤í¸ì ì¶ê°",category:"content"},{value:"watch_video_progress",label:"ìì ì¬ì ì§íë¥ ",category:"content",isMilestone:!0,milestoneDescription:"ìì ì¬ì ì§íë¥ ",milestoneUnit:"%",milestoneExample:"25, 50, 75, 95"},{value:"listen_audio_progress",label:"ì¤ëì¤ ì¬ì ì§íë¥ ",category:"content",isMilestone:!0,milestoneDescription:"ì¤ëì¤ ì¬ì ì§íë¥ ",milestoneUnit:"%",milestoneExample:"25, 50, 75, 95"},{value:"follow_creator",label:"í¬ë¦¬ìì´í° íë¡ì°",category:"social"},{value:"first_follow",label:"첫 íë¡ì°",category:"social"},{value:"receive_follow",label:"íë¡ì íë",category:"social"},{value:"like_content",label:"ì½í
ì¸ ì¢ìì",category:"social"},{value:"first_like",label:"첫 ì¢ìì",category:"social"},{value:"receive_like",label:"ì¢ìì íë",category:"social"},{value:"post_comment",label:"ëê¸ ìì±",category:"social"},{value:"first_comment",label:"첫 ëê¸",category:"social"},{value:"receive_comment",label:"ëê¸ íë",category:"social"},{value:"follower_milestone",label:"íë¡ì ë§ì¼ì¤í¤",category:"social",isMilestone:!0,milestoneDescription:"ì´ íë¡ì ì",milestoneUnit:"ëª
",milestoneExample:"100, 1000, 10000"},{value:"publish_content",label:"ì½í
ì¸ ë°í",category:"creator"},{value:"first_publish",label:"첫 ì½í
ì¸ ë°í",category:"creator"},{value:"subscriber_milestone",label:"구ë
ì ë§ì¼ì¤í¤",category:"creator",isMilestone:!0,milestoneDescription:"ì ë£ êµ¬ë
ì ì",milestoneUnit:"ëª
",milestoneExample:"1, 10, 100, 1000"},{value:"sale_milestone",label:"í매 ë§ì¼ì¤í¤",category:"creator",isMilestone:!0,milestoneDescription:"ì´ í매 ê±´ì",milestoneUnit:"ê±´",milestoneExample:"1, 10, 100, 1000"},{value:"revenue_milestone",label:"ììµ ë§ì¼ì¤í¤",category:"creator",isMilestone:!0,milestoneDescription:"ì´ ììµ",milestoneUnit:"ì",milestoneExample:"10000, 100000, 1000000"},{value:"start_livestream",label:"ë¼ì´ë¸ ìì",category:"livestream"},{value:"first_livestream",label:"첫 ë¼ì´ë¸",category:"livestream"},{value:"end_livestream",label:"ë¼ì´ë¸ ì¢
ë£",category:"livestream"},{value:"send_donation",label:"íì ë³´ë´ê¸°",category:"livestream"},{value:"receive_donation",label:"íì ë°ê¸°",category:"livestream"},{value:"first_donation_sent",label:"첫 íì ë³´ë´ê¸°",category:"livestream"},{value:"first_donation_received",label:"첫 íì ë°ê¸°",category:"livestream"},{value:"watch_livestream_duration",label:"ë¼ì´ë¸ ìì² ìê°",category:"livestream",isMilestone:!0,milestoneDescription:"ë¼ì´ë¸ ìì² ìê°",milestoneUnit:"ë¶",milestoneExample:"30, 60, 120"},{value:"viewer_milestone",label:"ëì ìì²ì ë§ì¼ì¤í¤",category:"livestream",isMilestone:!0,milestoneDescription:"ëì ìì²ì ì",milestoneUnit:"ëª
",milestoneEx
1ample:"100, 1000, 10000"},{value:"create_custom_persona",label:"커ì¤í
í르ìë ìì±",category:"aichat"},{value:"first_custom_persona",label:"첫 í르ìë ìì±",category:"aichat"},{value:"complete_story_ending",label:"ì¤í 리 ìë© ëë¬",category:"aichat"},{value:"achievement_unlocked",label:"ì¤í ë¦¬ì± ì
ì í´ì (기존)",category:"aichat"},{value:"complete_coin_spend_chat",label:"ì±í
ì½ì¸ ì¬ì©",category:"aichat"},{value:"out_of_credits",label:"í¬ë ë§ ë¶ì¡± (ì±í
ìë)",category:"aichat"},{value:"chatroom_milestone",label:"ì±í
ë°© ìì± ë§ì¼ì¤í¤",category:"aichat",isMilestone:!0,milestoneDescription:"ìì±í ì±í
ë°© ì",milestoneUnit:"ê°",milestoneExample:"1, 10, 50"},{value:"message_milestone",label:"ë©ìì§ ë§ì¼ì¤í¤",category:"aichat",isMilestone:!0,milestoneDescription:"ì´ ë©ìì§ ë°ì¡ ì",milestoneUnit:"ê°",milestoneExample:"100, 1000, 10000"},{value:"change_default_aichat_model",label:"AI ì± ëª¨ë¸ ê¸°ë³¸ ì¤ì ë³ê²½",category:"aichat",isMilestone:!0,milestoneDescription:"ë³ê²½ ëì AI ëª¨ë¸ íì
",milestoneUnit:"",milestoneExample:"claude-4.5-sonnet, gemini-2.5-flash"},{value:"start_video_call",label:"ììíµí ìì",category:"videocall"},{value:"first_video_call",label:"첫 ììíµí",category:"videocall"},{value:"join_video_call",label:"ììíµí ì°¸ì¬",category:"videocall"},{value:"complete_paid_call",label:"ì ë£ íµí ìë£",category:"videocall"},{value:"first_paid_call",label:"첫 ì ë£ íµí",category:"videocall"},{value:"call_duration_milestone",label:"íµí ìê° ë§ì¼ì¤í¤",category:"videocall",isMilestone:!0,milestoneDescription:"íµí ìê°",milestoneUnit:"ë¶",milestoneExample:"30, 60"},{value:"play_gacha",label:"ê°ì± íë ì´",category:"game"},{value:"first_gacha",label:"첫 ê°ì± ",category:"game"},{value:"gacha_win_rare",label:"ë ì´ ë¹ì²¨",category:"game"},{value:"gacha_win_legendary",label:"ë ì ë리 ë¹ì²¨",category:"game"},{value:"spend_ingame_currency",label:"ê²ì ë´ íí ì¬ì©",category:"game"},{value:"save_game_progress",label:"ê²ì ì ì¥",category:"game"},{value:"complete_game",label:"ê²ì ìë£",category:"game"},{value:"participate_event",label:"ì´ë²¤í¸ ì°¸ì¬",category:"game"},{value:"ingame_spend_milestone",label:"ê²ì ë´ ì§ì¶ ë§ì¼ì¤í¤",category:"game",isMilestone:!0,milestoneDescription:"ê²ì ë´ ëì ì§ì¶ì¡",milestoneUnit:"ì½ì¸",milestoneExample:"100, 500, 1000, 5000"},{value:"board_event_reward",label:"ë³´ë ì´ë²¤í¸ ë³´ì",category:"event"},{value:"achievement",label:"ì
ì ë¬ì±",category:"achievement"},{value:"click_button",label:"ë²í¼ í´ë¦ (ë²ì©)",category:"utility",isMilestone:!0,milestoneDescription:"ë²í¼ ì½ë (ì«ì ëë 문ìì´)",milestoneUnit:"",milestoneExample:"signup_banner, promo_header, 1001"},{value:"funnel_step_reached",label:"í¼ë ë¨ê³ ëë¬",category:"utility",isMilestone:!0,milestoneDescription:"í¼ë ì¤í
ì½ë (문ìì´)",milestoneUnit:"",milestoneExample:"landing, signup_complete, payment_success"}].map(p=>({...p,label:_t[p.value]||p.label})),ca=["rplay","romplay","storyengine","melo"],ua=["ko","en","jp","zh","zh-Hant","es"],Be="rplay",ve=[{value:Be,label:"RPlay ì±"},{value:"story-engine",label:"StoryEngine ì±"},{value:"romantic-play",label:"RomanticPlay ì±"}],ga=[{value:"coins",label:"ì½ì¸",icon:"ðª"},{value:"credits",label:"í¬ë ë§",icon:"ð"},{value:"subscription_days",label:"구ë
ê¶",icon:"â"},{value:"discount_percent",label:"í ì¸",icon:"ð·ï¸"},{value:"inventory_item",label:"ìì´í
",icon:"ð"},{value:"badge",label:"ë±ì§",icon:"ð
"},{value:"coin-discount",label:"ì½ì¸ ìí í ì¸ (í¨ìë¸)",icon:"ðªð·ï¸"},{value:"credit-discount",label:"í¬ë ë§ ìí í ì¸ (í¨ìë¸)",icon:"ðð·ï¸"},{value:"model-discount",label:"AI ëª¨ë¸ ë¹ì© í ì¸ (í¨ìë¸)",icon:"ð¤ð·ï¸"},{value:"story-chat-bonus-limit-exempt",label:"ì¤í ë¦¬ì± ë³´ëì¤ ì¼ì¼ íë í´ì (í¨ìë¸)",icon:"ðï¸"}],ma=[{value:"type_bonus",label:"ë³´ëì¤ ì½ì¸"},{value:"type_krw",label:"KRW ì½ì¸"},{value:"type_jpy",label:"JPY ì½ì¸"},{value:"type_usd",label:"USD ì½ì¸"},{value:"type_iap",label:"IAP ì½ì¸"}],va=[{value:"type_bonus",label:"ë³´ëì¤ í¬ë ë§"},{value:"type_krw",label:"KRW í¬ë ë§"},{value:"type_jpy",label:"JPY í¬ë ë§"},{value:"type_usd",label:"USD í¬ë ë§"}
1],Fe=Object.entries(ht).filter(([p])=>p!=="deepseek-character-only").map(([p,e])=>({type:p,name:e.name})),pe=()=>({name:"",imageUrl:"",multiLangName:{ko:"",en:"",jp:"",zh:"","zh-Hant":"",es:""},multiLangDescription:{ko:"",en:"",jp:"",zh:"","zh-Hant":"",es:""},active:!0,isPassive:!1,invisible:!1,adminOnly:!1,revokeOnly:!1,triggerConditions:{action:null,minAmount:null,maxAmount:null,platforms:[],langs:[],clientAppType:null,validFrom:null,validUntil:null,userRegisteredAfter:null,hasCreditPayment:null,hasCoinPayment:null,userHasTags:[],contentOids:[],creatorOids:[],customConditionCode:null,milestoneThresholds:[],achievementOids:[],blockIfUserHasTemplates:[],refererCodes:[],refererCodesMatchMode:"exact"},effects:[],maxUsesPerUser:1,globalMaxUses:null,couponValidityDays:30,couponExpiryDate:null,revokeTemplateOids:[],exclusionGroup:null}),pa={name:"AdminCouponTemplateEditPopup",components:{AdminAchievementEditPopup:ia,BadgeDisplay:ft,MultiLangInput:je},props:{data:{type:Object,default:null}},emits:["close-popup"],setup(p,{emit:e}){const C=yt.methods._tr,a=A(()=>p.data?.template||null),y=[{id:"basic",label:"기본 ì ë³´"},{id:"triggers",label:"í¸ë¦¬ê±° ì¡°ê±´"},{id:"effects",label:"ë³´ì í¨ê³¼"},{id:"limits",label:"ì í ì¤ì "},{id:"achievementQueries",label:"ì ì 쿼리"}],S=v("basic"),E=v(!1),m=v("all"),I=v(null),n=v(!1),f=v(""),o=v(pe()),M=v(!1),R=v(!1),x=v(!1),P=v(!1),K=v(!1),Y=v(!1),W=v(!1),G=v(!1),q=v(!1),Q=v(!1),j=v(!1),B=v(!0),Z=v(!1),L=v(!1),re=v("days"),He=A({get(){const r=o.value.couponExpiryDate;if(!r)return"";const s=new Date(r),d=k=>String(k).padStart(2,"0");return`${s.getFullYear()}-${d(s.getMonth()+1)}-${d(s.getDate())}T${d(s.getHours())}:${d(s.getMinutes())}`},set(r){o.value.couponExpiryDate=r?new Date(r).toISOString():null}}),oe=v(""),se=v(""),le=v("");v("");const ie=v(""),J=v([]),de=v([]),H=v(be),z=v(!1),ce=v(!1),ye=v(0),X=v(null);let ue=0;const fe=v([]);v(Fe);const Ae=A(()=>!!a.value?._id),ze=A(()=>m.value==="all"?ae:ae.filter(r=>r.category===m.value)),he=A(()=>o.value.triggerConditions.action?ae.find(r=>r.value===o.value.triggerConditions.action):null),D=A({get:()=>o.value.triggerConditions.achievementOids[0]||"",set:r=>{o.value.triggerConditions.achievementOids=r?[r]:[]}}),F=A(()=>de.value.find(r=>r._id===D.value)),ge=A(()=>H.value.find(r=>r.value===F.value?.progressType)),Ue=r=>H.value.find(s=>s.value===r),Pe=r=>{const s=Ue(r.progressType);return s?.valueKind==="boolean"?`${s.label} ìë£`:r.progressType==="action_event_count"?`${r.actionEventName||"íë 미ì§ì "} ${r.targetValue}${s?.unit||"í"}`:`${s?.label||r.progressType} ${r.targetValue}${s?.unit||""}`},_e=r=>{const s=r.rewardCoupon;return o.value.active!==!1&&(r.rewardConfigurationError!=null||!!s?._id&&s._id!==a.value?._id)},Ke=r=>{const s=Ue(r.progressType),d=r.multiLangName?.ko||r.name,k=r.active===!1?" (ë¹íì± â íì¬ ì°ê²°)":"",$=r.rewardConfigurationError?" (íì± ì¿ í° ì¤ë³µ ì°ê²° ì¤ë¥)":_e(r)?` (ì´ë¯¸ ${r.rewardCoupon.name||"ë¤ë¥¸ ì¿ í°"} ì°ê²°)`:"";return s?.valueKind==="boolean"?`${d} â ${s.label} ìë£${k}${$}`:`${d} â ${Pe(r)}${k}${$}`},me=async()=>{const r=++ue;z.value=!0;try{const[d,k]=await Promise.all([O.adminSearchAchievements({status:"all",limit:500,offset:0}),O.adminGetAchievementProgressTypes()]),$=Array.isArray(d.data?.achievements)?d.data.achievements:[],ee=[...$],pt=Number(d.data?.total)||ee.length;for(;ee.length<pt&&$.length===500;){const{data:Ie}=await O.adminSearchAchievements({status:"all",limit:500,offset:ee.length}),Me=Array.isArray(Ie?.achievements)?Ie.achievements:[];if(Me.length===0)break;ee.push(...Me)}if(r!==ue)return;de.value=ee,H.value=we(k.data?.progressTypes)}catch{if(r!==ue)return;H.value.length===0&&(H.value=be)}finally{r===ue&&(z.value=!1)}},Ee=()=>{ce.value=!1,X.value=null},Ye=()=>{X.value=null,ye.value+=1,ce.value=!0},We=async r=>{try{const{data:s}=await O.adminGetAchievement(r._id);if(!s?.success||!s.achievement)throw new Error(s?.error||"ì ì 쿼리를 ì°¾ì ì ììµëë¤.");X.value=s.achievement,ye.value+=1,ce.value=!0}catch(s){alert("ì ì 쿼리 ì¡°í ì¤í¨: "+(s.response?.data?.error||s.message))}},qe=async()=>{await me()},Qe=async r=>{const s=r.rewardCoupon?` 2 3ì°ê²°ë ì¿ í°: ${r.rewardCoupon.name}`:"";if(confirm(`ì ì 쿼리 "${r.name}"ì(를) ìì íìê² ìµëê¹?${s}`))try{const{data:d}=await O.adminDeleteAchievement(r._id);if(!d?.success)throw new Error(d?.error||"Unknown error");D.value===r._id&&(D.value=""),X.value?._id===r._id&&Ee(),await me()}catch(d){alert("ì ì 쿼리 ìì ì¤í¨: "+(d.response?.data?.error||d.message))}},Ze=async()=>{try{const r=await O.adminGetCouponTemplates();r.data?.templates&&(J.value=r.data.templates)}catch{}},Je=async()=>{try{fe.value=(await O.adminGetBadges(!0)).data?.badges||[]}catch{}},Xe=A(()=>fe.value.filter(r=>r.enabled!==!1)),Ce=r=>{const s=String(r||"").trim().toLowerCase();return s&&fe.value.find(d=>d.key===s)||null},$e=A(()=>{const r=a.value?._id;return J.value.filter(s=>s._id!==r)}),et=r=>{const s=o.value.revokeTemplateOids,d=s.indexOf(r);d>=0?s.splice(d,1):s.push(r)},tt=r=>{const s=J.value.find(d=>d._id===r);return s?s.name:r},at=A(()=>{const r=a.value?._id;return J.value.filter(s=>s._id!==r)}),nt=r=>{const s=o.value.triggerConditions.blockIfUserHasTemplates,d=s.indexOf(r);d>=0?s.splice(d,1):s.push(r)};Re(()=>{if(Ze(),Je(),a.value){const r=a.value;o.value={name:r.name||"",imageUrl:r.imageUrl||"",multiLangName:{...pe().multiLangName,...r.multiLangName},multiLangDescription:{...pe().multiLangDescription,...r.multiLangDescription},active:r.active??!0,isPassive:r.isPassive??!1,invisible:r.invisible??!1,adminOnly:r.adminOnly??!1,revokeOnly:r.revokeOnly??!1,triggerConditions:{...pe().triggerConditions,...r.triggerConditions,action:Array.isArray(r.triggerConditions?.actions)?r.triggerConditions.actions[0]||null:r.triggerConditions?.action||null,platforms:[...r.triggerConditions?.platforms||[]],langs:[...r.triggerConditions?.langs||[]],clientAppType:r.triggerConditions?.clientAppType||null,hasCreditPayment:typeof r.triggerConditions?.hasCreditPayment=="boolean"?r.triggerConditions.hasCreditPayment:null,hasCoinPayment:typeof r.triggerConditions?.hasCoinPayment=="boolean"?r.triggerConditions.hasCoinPayment:null,contentOids:[...r.triggerConditions?.contentOids||[]],creatorOids:[...r.triggerConditions?.creatorOids||[]],userHasTags:[...r.triggerConditions?.userHasTags||[]],milestoneThresholds:[...r.triggerConditions?.milestoneThresholds||[]],achievementOids:[...r.triggerConditions?.achievementOids||[]].slice(0,1),blockIfUserHasTemplates:[...r.triggerConditions?.blockIfUserHasTemplates||[]],refererCodes:[...r.triggerConditions?.refererCodes||[]]},effects:(r.effects||[]).map(d=>({...d})),maxUsesPerUser:r.maxUsesPerUser!=null?r.maxUsesPerUser:null,globalMaxUses:r.globalMaxUses??null,couponValidityDays:r.couponValidityDays??30,couponExpiryDate:r.couponExpiryDate||null,revokeTemplateOids:[...r.revokeTemplateOids||[]],exclusionGroup:r.exclusionGroup||null};const s=o.value.triggerConditions;M.value=s.minAmount!=null||s.maxAmount!=null,R.value=s.platforms.length>0,x.value=ve.some(({value:d})=>
3d===s.clientAppType),P.value=s.validFrom!=null||s.validUntil!=null,K.value=s.userRegisteredAfter!=null,Y.value=typeof s.hasCreditPayment=="boolean",W.value=typeof s.hasCoinPayment=="boolean",G.value=s.contentOids.length>0||s.creatorOids.length>0,q.value=s.customConditionCode!=null&&s.customConditionCode!=="",Q.value=s.blockIfUserHasTemplates.length>0,j.value=(s.refererCodes||[]).length>0,B.value=o.value.maxUsesPerUser!=null,Z.value=o.value.globalMaxUses!=null,re.value=o.value.couponExpiryDate?"date":"days",L.value=o.value.revokeTemplateOids.length>0||o.value.exclusionGroup!=null,s.validFrom&&(o.value.triggerConditions.validFrom=ke(s.validFrom)),s.validUntil&&(o.value.triggerConditions.validUntil=ke(s.validUntil)),s.userRegisteredAfter&&(o.value.triggerConditions.userRegisteredAfter=ke(s.userRegisteredAfter)),oe.value=s.contentOids.join(", "),se.value=s.creatorOids.join(", "),le.value=(s.milestoneThresholds||[]).join(", "),ie.value=(s.refererCodes||[]).join(", "),o.value.triggerConditions.refererCodesMatchMode=s.refererCodesMatchMode||"exact",o.value.imageUrl&&(f.value=o.value.imageUrl)}});const ke=r=>r?new Date(r).toISOString().slice(0,16):"";_(S,r=>{r==="achievementQueries"&&!z.value&&me()}),_(()=>o.value.triggerConditions.action,r=>{if(r||(x.value=!1),r!=="achievement"){o.value.triggerConditions.achievementOids=[];return}B.value=!0,Z.value=!1,M.value=!1,K.value=!1,Y.value=!1,W.value=!1,G.value=!1,q.value=!1,Q.value=!1,j.value=!1,L.value=!1,o.value.maxUsesPerUser=1,o.value.globalMaxUses=null,o.value.revokeTemplateOids=[],o.value.exclusionGroup=null,o.value.isPassive=!1,o.value.invisible=!1,o.value.revokeOnly=!1,o.value.triggerConditions.userHasTags=[],de.value.length===0&&!z.value&&me()}),_(ge,r=>{o.value.triggerConditions.action==="achievement"&&F.value&&r&&!r.supportsAggregationStartAt&&(P.value=!1)}),_(M,r=>{r||(o.value.triggerConditions.minAmount=null,o.value.triggerConditions.maxAmount=null)}),_(R,r=>{r||(o.value.triggerConditions.platforms=[])}),_(x,r=>{if(!r){o.value.triggerConditions.clientAppType=null;return}ve.some(({value:s})=>s===o.value.triggerConditions.clientAppType)||(o.value.triggerConditions.clientAppType=Be)}),_(P,r=>{r||(o.value.triggerConditions.validFrom=null,o.value.triggerConditions.validUntil=null)}),_(K,r=>{r||(o.value.triggerConditions.userRegisteredAfter=null)}),_(Y,r=>{r?typeof o.value.triggerConditions.hasCreditPayment!="boolean"&&(o.value.triggerConditions.hasCreditPayment=!1):o.value.triggerConditions.hasCreditPayment=null}),_(W,r=>{r?typeof o.value.triggerConditions.hasCoinPayment!="boolean"&&(o.value.triggerConditions.hasCoinPayment=!1):o.value.triggerConditions.hasCoinPayment=null}),_(G,r=>{r||(o.value.triggerConditions.contentOids=[],o.value.triggerConditions.creatorOids=[],oe.value="",se.value="")}),_(q,r=>{r||(o.value.triggerConditions.customConditionCode=null)}),_(Q,r=>{r||(o.value.triggerConditions.blockIfUserHasTemplates=[])}),_(j,r=>{r||(o.value.triggerConditions.refererCodes=[],ie.value="")}),_(B,r=>{if(o.value.triggerConditions.action==="achievement"&&!r){B.value=!0,o.value.maxUsesPerUser=1;return}r?o.value.maxUsesPerUser=o.value.maxUsesPerUser||1:o.value.maxUsesPerUser=null}),_(Z,r=>{r||(o.value.globalMaxUses=null)}),_(L,r=>{r||(o.value.revokeTemplateOids=[],o.value.exclusionGroup=null)}),_(()=>o.value.revokeOnly,r=>{r&&(L.value=!0,o.value.effects=[])}),_(oe,r=>{o.value.triggerConditions.contentOids=r.split(",").map(s=>s.trim()).filter(s=>s.length>0)}),_(se,r=>{o.value.triggerConditions.creatorOids=r.split(",").map(s=>s.trim()).filter(s=>s.length>0)}),_(le,r=>{const s=o.value.triggerConditions.action;s==="click_button"||s==="change_default_aichat_model"||s==="funnel_step_reached"?o.value.triggerConditions.milestoneThresholds=r.split(",").map(d=>d.trim()).filter(d=>d.length>0):o.value.triggerConditions.milestoneThresholds=r.split(",").map(d=>parseInt(d.trim(),10)).filter(d=>!isNaN(d)&&d>0)}),_(ie,r=>{o.value.triggerConditions.refererCodes=r.split(",").map(s=>s.trim()).filter(s=>s.length>0)}),_(()=>o.value.triggerConditions.action,r=>{ae.find(s=>s.value===r)?.isMilestone||(o.value.triggerConditions.milestoneThresholds=[],le.value="")}
3);const rt=r=>{const s=o.value.triggerConditions.platforms,d=s.indexOf(r);d>=0?s.splice(d,1):s.push(r)},ot=()=>{o.value.effects.push({effectType:"",coinType:"type_bonus",creditType:"type_bonus",amount:null,itemTemplate:null,badgeKey:"",productNamePattern:"",discountPercent:null,targetModel:""})},st=r=>{o.value.effects.splice(r,1)},lt=r=>{r.effectType==="coins"?r.coinType=r.coinType||"type_bonus":r.effectType==="credits"?r.creditType=r.creditType||"type_bonus":r.effectType==="model-discount"?(r.targetModel=r.targetModel||"",r.discountPercent=r.discountPercent||null):r.effectType==="badge"?r.badgeKey=r.badgeKey||"":r.effectType==="story-chat-bonus-limit-exempt"&&(o.value.isPassive=!0)},it=r=>{if(!r.effectType)return"(ì í ìë¨)";switch(r.effectType){case"coins":return`+${r.amount||0} ì½ì¸`;case"credits":return`+${r.amount||0} í¬ë ë§`;case"subscription_days":return`+${r.amount||0}ì¼ êµ¬ë
`;case"discount_percent":return`${r.amount||0}% í ì¸`;case"inventory_item":return"ìì´í
ì§ê¸";case"badge":{const s=Ce(r.badgeKey);return s?`ë±ì§ ì§ê¸: ${s.name}`:`ë±ì§ ì§ê¸: ${r.badgeKey||"(ì í ìë¨)"}`}case"coin-discount":return`ì½ì¸ ${r.discountPercent||0}% í ì¸ (${r.productNamePattern||"*"})`;case"credit-discount":return`í¬ë ë§ ${r.discountPercent||0}% í ì¸ (${r.productNamePattern||"*"})`;case"model-discount":return`${Fe.find(s=>s.type===r.targetModel)?.name||r.targetModel||"모ë 모ë¸"} ${r.discountPercent||0}% í ì¸`;case"story-chat-bonus-limit-exempt":return"ì¤í ë¦¬ì± ë³´ëì¤ ì¼ì¼ íë í´ì ";default:return r.effectType}},dt=r=>{r.target.style.display="none"},ct=["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"],ut=()=>{I.value?.click()},Oe=async r=>{if(!r||!ct.includes(r.type)){alert("ì§ìíì§ ìë íì¼ íìì
ëë¤. PNG, JPG, GIF, WebP, SVG íì¼ë§ ì
ë¡ëí ì ììµëë¤.");return}let s;try{s=URL.createObjectURL(r),f.value=s}catch{}n.value=!0;try{const d=`coupon-images/${`${Date.now()}_${r.name.replace(/[^a-zA-Z0-9._-]/g,"_")}`}`,k=(await Te.getUploadUrl({key:d,filetype:r.type,access:"public"})).data;await Te.upload(k,r,r.type),o.value.imageUrl=Te.publicObjectUrl(d),f.value=o.value.imageUrl}catch(d){alert("ì´ë¯¸ì§ ì
ë¡ëì ì¤í¨íìµëë¤: "+d.message),f.value=""}finally{if(n.value=!1,s)try{URL.revokeObjectURL(s)}catch{}}},gt=r=>{const s=r.target.files?.[0];s&&Oe(s),I.value&&(I.value.value="")},mt=r=>{const s=r.dataTransfer?.files?.[0];s&&Oe(s)},vt=()=>{o.value.imageUrl="",f.value=""};_(()=>o.value.imageUrl,r=>{n.value||(f.value=r||"")});const Ve=A(()=>{const r=[];o.value.name.trim()||r.push("ë´ë¶ ì´ë¦ì ì
ë ¥í´ì£¼ì¸ì"),o.value.triggerConditions.action||r.push("í¸ë¦¬ê±° ì¡ì
ì ì íí´ì£¼ì¸ì"),x.value&&!ve.some(({value:s})=>s===o.value.triggerConditions.clientAppType)&&r.push("ì í¨í í´ë¼ì´ì¸í¸ ì±ì ì íí´ì£¼ì¸ì"),o.value.triggerConditions.action==="achievement"&&!D.value&&r.push("ì°ê²°í ì
ì ì ì íí´ì£¼ì¸ì"),o.value.triggerConditions.action==="achievement"&&D.value&&!z.value&&!F.value&&r.push("ì°ê²°ë ì
ì 쿼리를 ì°¾ì ì ììµëë¤"),o.value.triggerConditions.action==="achievement"&&F.value?.active===!1&&r.push("íì± ì
ì ì ì íí´ì£¼ì¸ì"),o.value.triggerConditions.action==="achievement"&&F.value&&_e(F.value)&&r.push("ì´ë¯¸ ë¤ë¥¸ ì¿ í°ì ì°ê²°ë ì
ì ì
ëë¤"),o.value.triggerConditions.action==="achievement"&&(o.value.isPassive||o.value.invisible||o.value.revokeOnly)&&r.push("ì
ì ë³´ìì ì¸ë²¤í 리ìì ì§ì ì¬ì©íë ê³µê° ì¿ í°ì´ì´ì¼ í©ëë¤"),o.value.triggerConditions.action==="achievement"&&P.value&&ge.value&&!ge.value.supportsAggregationStartAt&&r.push("ì íí ì
ì ì§íëë ì í¨ ê¸°ê° ì¡°ê±´ì ì§ìíì§ ììµëë¤"),he.value?.isMilestone&&o.value.triggerConditions.milestoneThresholds.length===0&&r.push("ë§ì¼ì¤í¤ ìê³ê°ì ì
ë ¥í´ì£¼ì¸ì");for(let s=0;s<o.value.effects.length;s++){const d=o.value.effects[s];if(d.effectType||r.push(`í¨ê³¼ #${s+1}: í¨ê³¼ ì íì ì íí´ì£¼ì¸ì`),["coins","credits","subscription_days","discount_percent"].includes(d.effectType)&&(!d.amount||d.amount<=0)&&r.push(`í¨ê³¼ #${s+1}: ìëì ì
ë ¥í´ì£¼ì¸ì`),["coin-discount","credit-discount"].includes(d.effectType)&&(d.productNamePattern?.trim()||r.push(`í¨ê³¼ #${s+1}: ìíëª
í¨í´ì ì
ë ¥í´ì£¼ì¸ì`),(!d.discountPercent||d.discountPercent<=0||d.discountPercent>100)&&r.push(`í¨ê³¼ #${s+1}: í ì¸ì¨ì 1~100 ì¬ì´ë¡ ì
ë ¥í´ì£¼ì¸ì`)),d.effectType==="badge"){const k=Ce(d.badgeKey);(!k||k.enabled===!1)&&r.push(`í¨ê³¼ #${s+1}: íì± ë±ì§ë¥¼ ì íí´ì£¼ì¸ì`)}d.effectType==="model-discount"&&((!d.discountPercent||d.discountPercent<=0||d.discountPercent>100)&&r.push(`í¨ê³¼ #${s+1}: AI ëª¨ë¸ í ì¸ì¨ì 1~100 ì¬ì´ë¡ ì
ë ¥í´ì£¼ì¸ì.`),d.targetModel||r.push(`í¨ê³¼ #${s+1}: ì´ë¤ 모ë¸ì í ì¸ì ì ì©í ì§ ì íí´ì£¼ì¸ì.`)),d.effectType==="story-chat-bonus-limit-exempt"&&o.value.isPassive!==!0&&r.push(`í¨ê³¼ #${s+1}: ì¤í ë¦¬ì± ë³´ëì¤ ì¼ì¼ íë í´ì ë í¨ìë¸ ì¿ í°ì´ì´ì¼ í©ëë¤.`)}return r}),Se=A(()=>Ve.value.length===0);return{tr:C,tabs:y,activeTab:S,isSaving:E,selectedCategory:m,form:o,useAmountFilter:M,usePlatformFilter:R,useClientAppFilter:x,useTimeWindow:P,useUserRegisteredAfter:K,useCreditPaymentFilter:Y,useCoinPaymentFilter:W,useContentFilter:G,useCustomCondition:q,useBlockIfUserHas:Q,useRefererFilter:j,usePerUserLimit:B,useGlobalMaxUses:Z,useExclusion:L,couponExpiryMo
3de:re,couponExpiryDateLocal:He,contentOidsText:oe,creatorOidsText:se,refererCodesText:ie,milestoneThresholdsText:le,isEditing:Ae,isValid:Se,validationErrors:Ve,filteredActions:ze,selectedActionInfo:he,availableAchievements:de,achievementProgressTypes:H,isLoadingAchievements:z,achievementEditorOpen:ce,achievementEditorKey:ye,editingAchievement:X,selectedAchievementOid:D,selectedAchievement:F,selectedAchievementProgressType:ge,isAchievementLinkedElsewhere:_e,formatAchievementGoal:Pe,formatAchievementSummary:Ke,formatDateTime:bt,closeAchievementEditor:Ee,openAchievementCreateEditor:Ye,openAchievementEditEditor:We,handleAchievementSaved:qe,deleteAchievement:Qe,ACTION_CATEGORIES:da,SUPPORTED_ACTIONS:ae,PLATFORMS:ca,LANGUAGES:ua,CLIENT_APP_TYPES:ve,EFFECT_TYPES:ga,enabledBadges:Xe,COIN_TYPES:ma,CREDIT_TYPES:va,togglePlatform:rt,addEffect:ot,removeEffect:st,onEffectTypeChange:lt,formatEffectPreview:it,onImageError:dt,allTemplates:J,availableTemplatesForRevoke:$e,availableTemplatesForBlock:at,toggleRevokeTemplate:et,toggleBlockTemplate:nt,getTemplateName:tt,getSelectedBadge:Ce,imageFileInput:I,imageUploading:n,imagePreviewUrl:f,triggerImageInput:ut,onImageFileChange:gt,onImageDrop:mt,clearImage:vt,save:async()=>{if(Se.value){E.value=!0;try{const r={name:o.value.name.trim(),imageUrl:o.value.imageUrl.trim()||null,multiLangName:o.value.multiLangName,multiLangDescription:o.value.multiLangDescription,active:o.value.active,isPassive:o.value.triggerConditions.action==="achievement"?!1:o.value.isPassive,invisible:o.value.triggerConditions.action==="achievement"?!1:o.value.invisible,adminOnly:o.value.adminOnly,revokeOnly:o.value.triggerConditions.action==="achievement"?!1:o.value.revokeOnly,triggerConditions:{actions:o.value.triggerConditions.action?[o.value.triggerConditions.action]:[],minAmount:M.value?o.value.triggerConditions.minAmount:null,maxAmount:M.value?o.value.triggerConditions.maxAmount:null,platforms:R.value?o.value.triggerConditions.platforms:[],langs:o.value.triggerConditions.langs,clientAppType:x.value?o.value.triggerConditions.clientAppType:null,validFrom:P.value&&o.value.triggerConditions.validFrom?new Date(o.value.triggerConditions.validFrom).toISOString():null,validUntil:P.value&&o.value.triggerConditions.validUntil?new Date(o.value.triggerConditions.validUntil).toISOString():null,userRegisteredAfter:K.value&&o.value.triggerConditions.userRegisteredAfter?new Date(o.value.triggerConditions.userRegisteredAfter).toISOString():null,hasCreditPayment:Y.value?o.value.triggerConditions.hasCreditPayment:null,hasCoinPayment:W.value?o.value.triggerConditions.hasCoinPayment:null,userHasTags:o.value.triggerConditions.userHasTags,contentOids:G.value?o.value.triggerConditions.contentOids:[],creatorOids:G.value?o.value.triggerConditions.creatorOids:[],customConditionCode:q.value?o.value.triggerConditions.customConditionCode:null,milestoneThresholds:he.value?.isMilestone?o.value.triggerConditions.milestoneThresholds:[],achievementOids:o.value.triggerConditions.action==="achievement"&&D.value?[D.value]:[],blockIfUserHasTemplates:Q.value?o.value.triggerConditions.blockIfUserHasTemplates:[],refererCodes:j.value?o.value.triggerConditions.refererCodes:[],refererCodesMatchMode:j.value?o.value.triggerConditions.refererCodesMatchMode:"exact"},effects:o.value.effects.map(d=>{const k={effectType:d.effectType};return d.effectType==="coins"?(k.coinType=d.coinType,k.amount=d.amount):d.effectType==="credits"?(k.creditType=d.creditType,k.amount=d.amount):["subscription_days","discount_percent"].includes(d.effectType)?k.amount=d.amount:d.effectType==="inventory_item"?k.itemTemplate=d.itemTemplate:d.effectType==="badge"?k.badgeKey=String(d.badgeKey||"").trim().toLowerCase():["coin-discount","credit-discount"].includes(d.effectType)?(k.productNamePattern=d.productNamePattern,k.discountPercent=d.discountPercent):d.effectType==="model-discount"&&(k.targetModel=d.targetModel,k.discountPercent=d.discountPercent),k}),maxUsesPerUser:o.value.triggerConditions.action==="achievement"?1:B.value?o.value.maxUsesPerUser:null,globalMaxUses:o.value.triggerConditions.action==="achievement"?null:Z.value?o.value.globalMaxUses:null,couponValidityDays:re.value==="days"?o.value.couponValidityDays:null,couponExpiryDate:re.value==="date"?o.value.couponExpiryDate:null,revokeTemplateOids:o.value.triggerConditions.action==="achievement"?[]:L.value?o.value.revokeTemplateOids:[],exclusionGroup:o.value.triggerConditions.action==="achievement"?null:L.value&&o.value.exclusionGroup?.trim()||null};let s;Ae.value?s=await O.adminUpdateCouponTemplate(a.value._id,r):s=await O.adminCreateCouponTemplate(r),s.data.success?(p.data?.onSaved&&p.data.onSaved(s.data.template),e("close-popup")):alert("ì ì¥ ì¤í¨: "+(s.data.error||"Unknown error"))}catch(r){alert("ì ì¥ ì¤í¨: "+r.message)}finally{E.value=!1}}}}}},xa={class:"changed-popup-inner mb-10 w-full max-w-3xl"},ba={class:"changed-popup-header"},ya={class:"renewal-popup-body"},fa={class:"mb-6"},ha={class:"text-md leading-standard text-content-primary"},_a={class:"rounded-8px mb-4 flex gap-1 bg-surface-interactive p-1"},Ca=["onClick"],ka={class:"flex flex-col gap-4"},Ta={key:0,class:"rounded-8px border border-border-strong p-4"},wa={class:"mb-3 flex flex-col gap-component-sm-tight"},Aa={class:"mb-3 flex flex-col gap-component-sm-tight"},Ua={class:"flex items-start gap-3"},Pa={key:0,class:"animate-pulse text-xs leading-standard text-accent-default"},Ea=["src"],Oa={key:2,class:"flex flex-col items-center gap-1 text-content-secondary"},Va={class:"flex flex-1 flex-col gap-component-sm-tight"},Sa={class:"flex gap-component-sm-tight"},Ia={class:"mb-3"},Ma={class:"rounded-8px border border-border-strong p-4"},Da={class:"mb-3 flex flex-wrap gap-component-sm-tight"},La=["onClick"],Fa={class:"rounded-8px max-h-[300px] overflow-y-auto border border-border-strong bg-surface-interactive"},Na=["value","onUpdate:modelValue"],Ra={class:"flex-1"},Ga={class:"flex items-center gap-2"},ja={class:"text-xs leading-standard text-content-primary"},Ba={key:0,class:"rounded-sm bg-status-caution-emphasis/very-low px-component-sm-tight py-component-3xs text-xs leading-standard text-status-caution-content"},Ha={class:"font-mono text-xs leading-standard"},za={key:0,class:"mt-1 text-xs leading-standard text-accent-default"},Ka={key:0,class:"rounded-8px mt-3 bg-accent-default/minimal p-3"},Ya={class:"text-xs leading-standard font-weight-medium text-accent-default"},Wa={class:"font-mono mt-1 block rounded-sm bg-surface-canvas/faint px-2 py-1 text-xs leading-standard text-content-primary"},qa={key:0,class:"mt-2"},Qa={class:"mt-1 text-xs leading-standard text-content-primary"},Za={class:"mt-1 text-xs leading-standard text-content-secondary"},Ja={key:1,class:"rounded-8px mt-2 border border-status-caution-emphasis/disabled bg-status-caution-emphasis/minimal p-2 text-xs leading-standard text-status-caution-content"},Xa={key:0,class:"rounded-8px border border-accent-default/disabled bg-accent-default/minimal p-4"},$a=["disabled"],en={value:""},tn=["value","disabled"],an={key:0,class:"mt-2 text-xs leading-standard text-status-caution-content"},nn={key:1,class:"rounded-8px border border-status-caution-emphasis/disabled bg-status-caution-emphasis/minimal p-4"},rn={class:"mb-3 text-xs leading-standard text-content-secondary"},on=["placeholder"],sn={class:"mt-component-sm-tight text-xs leading-standard text-content-secondary"},ln={class:"rounded-8px border border-border-strong p-4"},dn={key:0,class:"mb-4"},cn={class:"mb-component-sm-tight flex items-center gap-2"},un={key:0,class:"ml-6 flex flex-wrap items-center gap-2"},gn={class:"mb-4"},mn={class:"mb-component-sm-tight flex items-center gap-2"},vn={class:"text-xs leading-standard text-content-primary"}
vendor: 8,103 bytes, line 3
3,pn={key:0,class:"ml-6 flex flex-wrap gap-2"},xn=["checked","onChange"],bn={class:"mb-4"},yn={class:"flex flex-wrap gap-3"},fn=["value"],hn={key:1,class:"mb-4"},_n={class:"mb-component-sm-tight flex items-center gap-2"},Cn={key:0,class:"ml-6"},kn=["value"],Tn={key:2,class:"mb-4"},wn={class:"mb-component-sm-tight flex items-center gap-2"},An=["disabled"],Un={key:0,class:"ml-6 flex flex-wrap items-center gap-2"},Pn={key:1,class:"ml-6 mt-component-sm-tight text-xs leading-standard text-status-caution-content"},En={class:"mb-4"},On={class:"mb-component-sm-tight flex items-center gap-2"},Vn={key:0,class:"ml-6 flex items-center gap-2"},Sn={class:"mb-4"},In={class:"mb-component-sm-tight flex items-center gap-2"},Mn={key:0,class:"ml-6 flex items-center gap-2"},Dn={class:"mb-4"},Ln={class:"mb-component-sm-tight flex items-center gap-2"},Fn={key:0,class:"ml-6 flex items-center gap-2"},Nn={class:"mb-4"},Rn={class:"mb-component-sm-tight flex items-center gap-2"},Gn={key:0,class:"ml-6 flex flex-col gap-2"},jn={class:"flex flex-col gap-1"},Bn={class:"flex flex-col gap-1"},Hn={class:"mb-4"},zn={class:"mb-component-sm-tight flex items-center gap-2"},Kn={key:0,class:"ml-6 flex flex-col gap-2"},Yn={class:"flex flex-col gap-1"},Wn={class:"mt-1 flex items-center gap-4"},qn={class:"flex items-center gap-1"},Qn={class:"flex items-center gap-1"},Zn={class:"mb-4"},Jn={class:"mb-component-sm-tight flex items-center gap-2"},Xn={key:0,class:"ml-6 flex flex-col gap-2"},$n={key:0,class:"mb-1 flex flex-wrap gap-component-sm-tight"},er=["onClick"],tr={class:"rounded-8px max-h-[200px] overflow-y-auto border border-border-strong bg-surface-interactive"},ar={key:0,class:"p-3 text-center text-xs leading-standard text-content-secondary"},nr=["checked","onChange"],rr={class:"flex-1"},or={class:"text-xs leading-standard text-content-primary"},sr={class:"flex items-center gap-component-sm-tight"},lr={class:"font-mono text-xs leading-standard"},ir={key:0,class:"rounded-sm bg-status-form-error-soft/very-low px-component-sm-tight py-component-hairline text-xs leading-standard text-status-danger-foreground"},dr={class:"mb-component-sm-tight flex items-center gap-2"},cr={key:0,class:"ml-6"},ur={key:2,class:"rounded-8px border border-border-strong p-4"},gr={class:"mb-4 flex items-start justify-between gap-3"},mr={key:0,class:"rounded-8px bg-surface-interactive px-4 py-8 text-center text-xs leading-standard text-content-secondary"},vr={key:1,class:"rounded-8px bg-surface-interactive px-4 py-8 text-center text-xs leading-standard text-content-secondary"},pr={key:2,class:"rounded-8px max-h-[520px] overflow-y-auto border border-border-strong"},xr=["src"],br={key:1,class:"flex h-40px w-40px shrink-0 items-center justify-center rounded-sm bg-surface-interactive"},yr={class:"min-w-0 flex-1"},fr={class:"flex flex-wrap items-center gap-2"},hr={class:"truncate text-xs leading-standard font-weight-medium text-content-primary"},_r={key:0,class:"rounded-pill bg-accent-default/minimal px-2 py-component-3xs text-xs leading-standard text-accent-default"},Cr={key:1,class:"rounded-pill bg-status-caution-emphasis/very-low px-2 py-component-3xs text-xs leading-standard text-status-caution-content"},kr={class:"mt-1 text-xs leading-standard text-content-secondary"},Tr={class:"mt-1 text-xs leading-standard text-content-secondary"},wr={key:0,class:"mt-1 text-xs leading-standard text-status-danger-foreground"},Ar={key:1,class:"mt-1 text-xs leading-standard text-content-secondary"},Ur={class:"flex shrink-0 gap-3"},Pr=["onClick"],Er=["onClick"],Or={key:3,class:"mt-5 border-t border-border-strong pt-5"},Vr={key:0,class:"rounded-8px border border-status-warning-emphasis/disabled bg-status-warning-emphasis/minimal p-4 text-center"},Sr={class:"rounded-8px border border-border-strong p-4"},Ir={class:"mb-3 flex items-center justify-between"},Mr=["disabled"],Dr={key:0,class:"rounded-8px bg-surface-interactive p-6 text-center text-content-secondary"},Lr={key:1,class:"flex flex-col gap-3"},Fr={class:"mb-2 flex items-center justify-between"},Nr={class:"text-xs leading-standard font-weight-medium text-content-primary"},Rr=["onClick"],Gr={class:"flex flex-wrap gap-2"},jr=["onUpdate:modelValue","onChange"],Br=["value"],Hr=["onUpdate:modelValue"],zr=["value"],Kr=["onUpdate:modelValue"],Yr={key:1,class:"flex w-full flex-col gap-2"},Wr={class:"flex items-center gap-2"},qr=["onUpdate:modelValue"],Qr=["onUpdate:modelValue"],Zr={id:"aiModelsList"},Jr=["value"],Xr=["onUpdate:modelValue"],$r=["value"],eo=["onUpdate:modelValue"],to=["onUpdate:modelValue"],ao=["onUpdate:modelValue"],no=["onUpdate:modelValue"],ro={key:6,class:"flex w-full flex-col gap-2"},oo=["onUpdate:modelValue"],so=["value"],lo={key:0,class:"rounded-8px flex items-center gap-2 border border-border-strong bg-surface-raised px-3 py-2"},io={class:"text-xs leading-standard text-content-secondary"},co={key:7,class:"flex w-full flex-col gap-2"},uo={class:"flex flex-col gap-1"},go=["onUpdate:modelValue","placeholder"],mo={class:"flex items-center gap-2"},vo=["onUpdate:modelValue"],po={class:"rounded-8px border border-border-strong p-4"},xo={class:"mb-4 flex flex-col gap-component-sm-tight"},bo={class:"flex items-center gap-2 text-xs leading-standard text-content-secondary"},yo=["disabled"],fo={key:0,class:"flex items-center gap-2"},ho=["disabled"],_o={key:1,class:"text-xs leading-standard text-accent-default"},Co={key:2,class:"text-xs leading-standard text-content-secondary"},ko={key:3,class:"text-xs leading-standard text-status-caution-content"},To={key:0,class:"mb-4 flex flex-col gap-component-sm-tight"},wo={class:"flex items-center gap-2 text-xs leading-standard text-content-secondary"},Ao={key:0,class:"flex items-center gap-2"},Uo={class:"flex flex-col gap-component-sm-tight"},Po={class:"flex items-center gap-2 mb-component-sm-tight"},Eo={class:"flex cursor-pointer items-center gap-1"},Oo={class:"flex cursor-pointer items-center gap-1 ml-3"},Vo={key:0,class:"flex items-center gap-2"},So={key:1,class:"flex items-center gap-2"},Io={class:"rounded-8px border border-border-strong p-4"},Mo={class:"flex flex-col gap-3"},Do={class:"flex cursor-pointer items-center gap-2"},Lo={class:"flex cursor-pointer items-center gap-2"},Fo={class:"text-xs leading-standard text-status-caution-content"},No={class:"rounded-8px border border-commerce-reward/disabled bg-commerce-reward/minimal p-4"},Ro={class:"flex flex-col gap-3"},Go={class:"flex cursor-pointer items-center gap-2"},jo=["disabled"],Bo={class:"flex cursor-pointer items-center gap-2"},Ho=["disabled"],zo={key:0,class:"text-xs leading-standard text-accent-default"},Ko={key:1,class:"text-xs leading-standard text-commerce-reward-content"},Yo={class:"rounded-8px border border-status-form-error-soft/disabled bg-status-form-error-soft/minimal p-4"},Wo={class:"flex cursor-pointer items-center gap-2"},qo=["disabled"],Qo={class:"rounded-8px border border-status-warning-emphasis/disabled bg-status-warning-emphasis/minimal p-4"},Zo={class:"mb-3 flex cursor-pointer items-center gap-2"},Jo=["disabled"],Xo={key:0,class:"flex flex-col gap-4"},$o={class:"flex flex-col gap-component-sm-tight"},es={class:"flex flex-col gap-component-sm-tight"},ts={key:0,class:"mb-2 flex flex-wrap gap-component-sm-tight"},as=["onClick"],ns={class:"rounded-8px max-h-[200px] overflow-y-auto border border-border-strong bg-surface-interactive"},rs={key:0,class:"p-3 text-center text-xs leading-standard text-content-secondary"},os=["checked","onChange"],ss={class:"flex-1"},ls={class:"text-xs leading-standard text-content-primary"},is={class:"flex items-center gap-component-sm-tight"},ds={class:"font-mono text-xs leading-standard"},cs={key:0,class:"rounded-sm bg-status-warning-emphasis/very-low px-component-sm-tight py-component-hairline text-xs leading-standard text-status-warning-foreground"},us={key:1,class:"rounded-sm bg-status-form-error-soft/very-low px-component-sm-tight py-component-hairline text-xs leading-standard text-status-danger-foreground"},gs={key:0,class:"rounded-8px mt-4 border border-border-strong bg-surface-interactive p-3"},ms={class:"flex items-center gap-3"}
3,vs=["src"],ps={key:1,class:"rounded-8px flex h-48px w-48px items-center justify-center bg-action-primary-disabled text-xl leading-tight"},xs={class:"flex-1"},bs={class:"font-weight-medium text-content-primary"},ys={class:"text-xs leading-standard text-content-secondary"},fs={key:0,class:"mt-1 text-xs leading-standard text-accent-default"},hs={class:"flex flex-col items-end gap-component-3xs"},_s={key:0,class:"text-xs leading-standard text-content-secondary"},Cs={key:1,class:"rounded-8px mt-3 bg-status-form-error-soft/very-low p-3"},ks={class:"list-inside list-disc text-xs leading-standard text-status-danger-foreground"},Ts={key:2,class:"mt-6 flex justify-end"},ws=["disabled"];function As(p,e,C,a,y,S){const E=xe("MultiLangInput"),m=xe("AdminAchievementEditPopup"),I=xe("BadgeDisplay");return l(),i("div",xa,[t("div",ba,[t("button",{class:"w-4 md:w-5",onClick:e[0]||(e[0]=n=>p.$emit("close-popup"))},[...e[56]||(e[56]=[t("img",{class:"block w-full",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAyElEQVRYw+2WSwrDMAwFBTlkfqdLakIPaZguCiWNQyzZyqLFb23PgLAfEmlpafnb0BHo1adnVjob/glEnYKZCGwGBYF3IoMSD/DQC4bPpYxih4/6kaoVxfhEMbrjRUQYrxTV+GuFCz5RTO54ERGmo8IVnyrc8YnCH38Yyx34ROGPv11w84i+Xk7UN20Jvtc3bRHeVuZFeF3TVuHzTVuNd1HkO+e8ad3w503riq9QsOr/606xWBavzbx4BetuZ1sdFxO+paXlx/ICYTRfOPrpBZkAAAAASUVORK5CYII=",alt:"cls"},null,-1)])])]),t("div",ya,[t("div",fa,[t("h2",ha,g(a.isEditing?"í
í릿 ìì ":"ì í
í릿 ìì±"),1)]),t("div",_a,[(l(!0),i(b,null,T(a.tabs,n=>(l(),i("button",{class:N(["flex-1 rounded-md px-3 py-2 text-xs leading-standard transition-colors",a.activeTab===n.id?"bg-accent-default text-accent-content":"text-content-secondary hover:text-content-primary"]),key:n.id,onClick:f=>a.activeTab=n.id},g(n.label),11,Ca))),128))]),t("div",ka,[a.activeTab==="basic"?(l(),i("div",Ta,[e[64]||(e[64]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"기본 ì ë³´",-1)),t("div",wa,[e[57]||(e[57]=t("label",{class:"text-xs leading-standard text-content-secondary"},"ë´ë¶ ì´ë¦ *",-1)),u(t("input",{class:"rounded-8px outline-none border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary placeholder:text-content-secondary focus:border-accent-default",type:"text","onUpdate:modelValue":e[1]||(e[1]=n=>a.form.name=n),placeholder:"ê´ë¦¬ì© ì´ë¦ (ì: 첫 ì¶©ì ë³´ëì¤ 2024)"},null,512),[[h,a.form.name]])]),t("div",Aa,[e[61]||(e[61]=t("label",{class:"text-xs leading-standard text-content-secondary"},"ì´ë¯¸ì§",-1)),t("div",Ua,[t("div",{class:"rounded-8px group relative flex h-80px w-80px shrink-0 cursor-pointer items-center justify-center overflow-hidden border border-dashed border-border-strong bg-surface-interactive transition-colors hover:border-accent-default",onClick:e[4]||(e[4]=(...n)=>a.triggerImageInput&&a.triggerImageInput(...n)),onDragover:e[5]||(e[5]=De(()=>{},["prevent"])),onDrop:e[6]||(e[6]=De((...n)=>a.onImageDrop&&a.onImageDrop(...n),["prevent"]))},[a.imageUploading?(l(),i("div",Pa," ì
ë¡ëì¤... ")):a.imagePreviewUrl?(l(),i(b,{key:1},[t("img",{class:"h-full w-full object-cover",src:a.imagePreviewUrl,onError:e[2]||(e[2]=(...n)=>a.onImageError&&a.onImageError(...n))},null,40,Ea),e[58]||(e[58]=t("div",{class:"absolute inset-0 flex items-center justify-center bg-surface-canvas/disabled opacity-hidden transition-opacity group-hover:opacity-full"},[t("span",{class:"text-xs leading-standard text-content-primary"},"ë³ê²½")],-1))],64)):(l(),i("div",Oa,[...e[59]||(e[59]=[t("svg",{class:"h-20px w-20px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1),t("span",{class:"text-xs leading-standard"},"ì
ë¡ë",-1)])])),t("input",{class:"hidden",type:"file",ref:"imageFileInput",accept:"image/png,image/jpeg,image/gif,image/webp,image/svg+xml",onChange:e[3]||(e[3]=(...n)=>a.onImageFileChange&&a.onImageFileChange(...n))},null,544)],32),t("div",Va,[t("div",Sa,[u(t("input",{class:"rounded-8px outline-none flex-1 border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary focus:border-accent-default",type:"text","onUpdate:modelValue":e[7]||
3(e[7]=n=>a.form.imageUrl=n),placeholder:"ì§ì URL ì
ë ¥ ëë ì´ë¯¸ì§ë¥¼ ì
ë¡ëíì¸ì"},null,512),[[h,a.form.imageUrl]]),a.form.imageUrl?(l(),i("button",{key:0,class:"rounded-8px shrink-0 border border-border-strong px-2 py-2 text-xs leading-standard text-status-danger-foreground hover:bg-status-danger-foreground/minimal",onClick:e[8]||(e[8]=(...n)=>a.clearImage&&a.clearImage(...n))}," ìì ")):c("",!0)]),e[60]||(e[60]=t("p",{class:"text-xs leading-standard"}," PNG, JPG, GIF, WebP, SVG ì§ì. ëëê·¸ ì¤ ëë¡ ê°ë¥. ",-1))])])]),t("div",Ia,[e[62]||(e[62]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"},"ë¤êµì´ ì´ë¦",-1)),ne(E,{langs:a.form.multiLangName,placeholder:{ko:"íì ë³´ëì¤",en:"Welcome Bonus",jp:"ã¦ã§ã«ã«ã ãã¼ãã¹",zh:"欢è¿å¥å±","zh-Hant":"æ¡è¿çåµ"}},null,8,["langs"])]),t("div",null,[e[63]||(e[63]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"},"ë¤êµì´ ì¤ëª
",-1)),ne(E,{langs:a.form.multiLangDescription,type:"textarea",rows:2,placeholder:{ko:"첫 ì¶©ì ê°ì¬ ì 물ì
ëë¤",en:"Thank you for your first charge",jp:"ååãã£ã¼ã¸ãããã¨ããããã¾ã",zh:"æè°¢æ¨ç馿¬¡å
å¼","zh-Hant":"æè¬æ¨ç馿¬¡å²å¼"}},null,8,["langs"])])])):c("",!0),a.activeTab==="triggers"?(l(),i(b,{key:1},[t("div",Ma,[e[68]||(e[68]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"í¸ë¦¬ê±° ì¡ì
*",-1)),e[69]||(e[69]=t("p",{class:"mb-3 text-xs leading-standard text-content-secondary"}," ì´ë¤ ì¡ì
ì´ ë°ìíì ë ì¡ì
í그를 ë°ê¸í ì§ ì ííì¸ì ",-1)),t("div",Da,[(l(!0),i(b,null,T(a.ACTION_CATEGORIES,n=>(l(),i("button",{class:N(["rounded-pill border px-component-sm-roomy py-1 text-xs leading-standard transition-colors",a.selectedCategory===n.id?"border-accent-default bg-accent-default/very-low text-accent-default":"border-border-strong text-content-secondary hover:text-content-primary"]),key:n.id,onClick:f=>a.selectedCategory=n.id},g(n.label),11,La))),128))]),t("div",Fa,[(l(!0),i(b,null,T(a.filteredActions,n=>(l(),i("label",{class:N(["flex cursor-pointer items-start gap-2 border-b border-border-strong p-3 transition-colors last:border-b-0",a.form.triggerConditions.action===n.value?"bg-accent-default/minimal":"hover:bg-surface-interactive"]),key:n.value},[u(t("input",{class:"accent-accent-default mt-component-3xs h-16px w-16px",name:"triggerAction",type:"radio",value:n.value,"onUpdate:modelValue":f=>a.form.triggerConditions.action=f},null,8,Na),[[te,a.form.triggerConditions.action]]),t("div",Ra,[t("div",Ga,[t("span",ja,g(n.label),1),n.isMilestone?(l(),i("span",Ba," ë§ì¼ì¤í¤ ")):c("",!0)]),t("code",Ha,g(n.value),1),n.milestoneDescription?(l(),i("div",za," ð "+g(n.milestoneDescription),1)):c("",!0)])],2))),128))]),a.selectedActionInfo?(l(),i("div",Ka,[t("div",Ya," ì íë ì¡ì
: "+g(a.selectedActionInfo.label),1),t("code",Wa,g(a.selectedActionInfo.value),1),a.selectedActionInfo.isMilestone?(l(),i("div",qa,[e[67]||(e[67]=t("div",{class:"text-xs leading-standard text-status-caution-content"}," â¡ ì´ ì¡ì
ì ë§ì¼ì¤í¤ ì¡ì
ì
ëë¤. ìëìì ìê³ê°ì ì¤ì íì¸ì. ",-1)),t("div",Qa,[e[65]||(e[65]=t("strong",null,"milestoneValue ì미:",-1)),U(" "+g(a.selectedActionInfo.milestoneDescription),1)]),t("div",Za,[e[66]||(e[66]=t("strong",null,"ë¨ì:",-1)),U(" "+g(a.selectedActionInfo.milestoneUnit),1)])])):c("",!0),a.selectedActionInfo.value==="ingame_spend_milestone"?(l(),i("p",Ja," â ï¸ "+g(a.tr("Game","ingame-spend-milestone-db-required")),1)):c("",!0)])):c("",!0)]),a.form.triggerConditions.action==="achievement"?(l(),i("div",Xa,[e[70]||(e[70]=t("h3",{class:"mb-2 font-weight-bold text-accent-default"}," ì
ì 쿼리 ì°ê²° * ",-1)),e[71]||(e[71]=t("p",{class:"mb-3 text-xs leading-standard text-content-secondary"}," ì°ê²°í ì
ì 쿼리 íë를 ì ííì¸ì. ì¬ì©ìê° í´ë¹ ì
ì ì ë³´ì ìë ¹ ë²í¼ì ë르면 ì´ ì¿ í°ì´ ì§ê¸ë©ëë¤. ",-1)),u(t("select",{class:"rounded-8px w-full border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary disabled:opacity-disabled","onUpdate:modelValue":e[9]||(e[9]=n=>a.selectedAchievementOid=n),disabled:a.isLoadingAchievements||a.availableAchievements.length===0},[t("option",en,g(a.isLoadingAchievements?"ì
ì 쿼리를 ë¶ë¬ì¤ë ì¤ì
ëë¤":a.availableAchievements.length===0?"ë±ë¡ë ì
ì ì¿¼ë¦¬ê° ììµëë¤":"ì
ì 쿼리를 ì íí´ì£¼ì¸ì"),1),(l(!0),i(b,null,T(a.availableAchievements,n=>(l(),i("option",{key:n._id,value:n._id,disabled:n.active===!1||a.isAchievementLinkedElsewhere(n)},g(a.formatAchievementSummary(n)),9,tn))),128))],8,$a),[[V,a.selectedAchievementOid]]),a.selectedAchievementOid&&!a.isLoadingAchievements&&!a.selectedAchievement?(l(),i("p",an," íì¬ ì°ê²°ë 쿼리를 ì°¾ì ì ììµëë¤. 목ë¡ìì ë¤ì ì íí´ì£¼ì¸ì. ")):c("",!0)])):c("",!0),a.selectedActionInfo?.isMilestone?(l(),i("div",nn,[e[74]||(e[74]=t("h3",{class:"mb-2 font-weight-bold text-status-caution-content"}," ë§ì¼ì¤í¤ ìê³ê° ì¤ì * ",-1)),t("p",rn,[U(g(a.selectedActionInfo.milestoneDescription)+" ê°ì´ ìë ìê³ê°ì ëë¬íë©´ ì¡ì
íê·¸ê° ë°ê¸ë©ëë¤. ",1),e[72]||(e[72]=t("br",null,null,-1)),e[73]||(e[73]=U("ê° ìê³ê°ë§ë
3¤ í ë²ì© ë°ê¸ë©ëë¤ (ì¤ë³µ ë°ê¸ ë°©ì§). ",-1))]),u(t("input",{class:"rounded-8px w-full border border-status-caution-emphasis/disabled bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary",type:"text","onUpdate:modelValue":e[10]||(e[10]=n=>a.milestoneThresholdsText=n),placeholder:a.selectedActionInfo.milestoneExample||"10, 100, 1000"},null,8,on),[[h,a.milestoneThresholdsText]]),t("p",sn," ì¼íë¡ êµ¬ë¶íì¬ ì
ë ¥ (ì: "+g(a.selectedActionInfo.milestoneExample||"10, 100, 1000")+") ",1)])):c("",!0),t("div",ln,[e[102]||(e[102]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"ì¶ê° ì¡°ê±´ íí° (ì í)",-1)),a.form.triggerConditions.action!=="achievement"?(l(),i("div",dn,[t("label",cn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[11]||(e[11]=n=>a.useAmountFilter=n)},null,512),[[w,a.useAmountFilter]]),e[75]||(e[75]=t("span",{class:"text-xs leading-standard text-content-primary"},"ê¸ì¡ ë²ì ì¡°ê±´",-1))]),a.useAmountFilter?(l(),i("div",un,[u(t("input",{class:"rounded-8px w-120px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":e[12]||(e[12]=n=>a.form.triggerConditions.minAmount=n),placeholder:"ìµì"},null,512),[[h,a.form.triggerConditions.minAmount,void 0,{number:!0}]]),e[76]||(e[76]=t("span",{class:"text-content-secondary"},"~",-1)),u(t("input",{class:"rounded-8px w-120px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":e[13]||(e[13]=n=>a.form.triggerConditions.maxAmount=n),placeholder:"ìµë"},null,512),[[h,a.form.triggerConditions.maxAmount,void 0,{number:!0}]]),e[77]||(e[77]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(ì/ì ë±)",-1))])):c("",!0)])):c("",!0),t("div",gn,[t("label",mn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[14]||(e[14]=n=>a.usePlatformFilter=n)},null,512),[[w,a.usePlatformFilter]]),t("span",vn,g(a.tr("Melo","admin-platform-target-label")),1)]),a.usePlatformFilter?(l(),i("div",pn,[(l(!0),i(b,null,T(a.PLATFORMS,n=>(l(),i("label",{class:N(["flex cursor-pointer items-center gap-1 rounded-pill border border-border-strong px-3 py-1 text-xs leading-standard",a.form.triggerConditions.platforms.includes(n)?"border-accent-default bg-accent-default/minimal text-accent-default":"text-content-secondary hover:text-content-primary"]),key:n},[t("input",{class:"hidden",type:"checkbox",checked:a.form.triggerConditions.platforms.includes(n),onChange:f=>a.togglePlatform(n)},null,40,xn),U(" "+g(n==="melo"?a.tr("Melo","platform-name"):n),1)],2))),128))])):c("",!0)]),t("div",bn,[e[78]||(e[78]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"}," ì¸ì´ íê² (미ì í = ì ì²´) ",-1)),t("div",yn,[(l(!0),i(b,null,T(a.LANGUAGES,n=>(l(),i("label",{class:"flex items-center gap-1 text-xs leading-standard text-content-primary",key:n},[u(t("input",{class:"accent-accent-default",type:"checkbox",value:n,"onUpdate:modelValue":e[15]||(e[15]=f=>a.form.triggerConditions.langs=f)},null,8,fn),[[w,a.form.triggerConditions.langs]]),U(" "+g(n),1)]))),128))])]),a.form.triggerConditions.action?(l(),i("div",hn,[t("label",_n,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[16]||(e[16]=n=>a.useClientAppFilter=n)},null,512),[[w,a.useClientAppFilter]]),e[79]||(e[79]=t("span",{class:"text-xs leading-standard text-content-primary"}," ì ì í´ë¼ì´ì¸í¸ ì¡°ê±´ ",-1))]),a.useClientAppFilter?(l(),i("div",Cn,[u(t("select",{class:"rounded-8px mb-2 border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[17]||(e[17]=n=>a.form.triggerConditions.clientAppType=n)},[(l(!0),i(b,null,T(a.CLIENT_APP_TYPES,n=>(l(),i("option",{key:n.value,value:n.value},g(n.label),9,kn))),128))],512),[[V,a.form.triggerConditions.clientAppType]]
3)])):c("",!0)])):c("",!0),a.form.triggerConditions.action?(l(),i("div",Tn,[t("label",wn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[18]||(e[18]=n=>a.useTimeWindow=n),disabled:a.form.triggerConditions.action==="achievement"&&a.selectedAchievement&&a.selectedAchievementProgressType&&!a.selectedAchievementProgressType.supportsAggregationStartAt},null,8,An),[[w,a.useTimeWindow]]),e[80]||(e[80]=t("span",{class:"text-xs leading-standard text-content-primary"}," ì í¨ ê¸°ê° ì¡°ê±´ ",-1))]),a.useTimeWindow?(l(),i("div",Un,[u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"datetime-local","onUpdate:modelValue":e[19]||(e[19]=n=>a.form.triggerConditions.validFrom=n)},null,512),[[h,a.form.triggerConditions.validFrom]]),e[81]||(e[81]=t("span",{class:"text-content-secondary"},"~",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"datetime-local","onUpdate:modelValue":e[20]||(e[20]=n=>a.form.triggerConditions.validUntil=n)},null,512),[[h,a.form.triggerConditions.validUntil]])])):c("",!0),a.form.triggerConditions.action==="achievement"&&a.selectedAchievement&&a.selectedAchievementProgressType&&!a.selectedAchievementProgressType.supportsAggregationStartAt?(l(),i("p",Pn," ì íí ì§íë ì¢
ë¥ë ì í¨ ê¸°ê° ì¡°ê±´ì ì§ìíì§ ììµëë¤. ")):c("",!0)])):c("",!0),a.form.triggerConditions.action!=="achievement"?(l(),i(b,{key:3},[t("div",En,[t("label",On,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[21]||(e[21]=n=>a.useUserRegisteredAfter=n)},null,512),[[w,a.useUserRegisteredAfter]]),e[82]||(e[82]=t("span",{class:"text-xs leading-standard text-content-primary"},"ê°ì
ì¼ ì¡°ê±´",-1))]),a.useUserRegisteredAfter?(l(),i("div",Vn,[u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"datetime-local","onUpdate:modelValue":e[22]||(e[22]=n=>a.form.triggerConditions.userRegisteredAfter=n)},null,512),[[h,a.form.triggerConditions.userRegisteredAfter]]),e[83]||(e[83]=t("span",{class:"text-xs leading-standard text-content-secondary"},"ì´í ê°ì
í ì ì ë§",-1))])):c("",!0)]),t("div",Sn,[t("label",In,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[23]||(e[23]=n=>a.useCreditPaymentFilter=n)},null,512),[[w,a.useCreditPaymentFilter]]),e[84]||(e[84]=t("span",{class:"text-xs leading-standard text-content-primary"},"í¬ë ë§ ê²°ì ì¬ë¶",-1))]),a.useCreditPaymentFilter?(l(),i("div",Mn,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[24]||(e[24]=n=>a.form.triggerConditions.hasCreditPayment=n)},[...e[85]||(e[85]=[t("option",{value:!0},"true - ê²°ì í ì ì ",-1),t("option",{value:!1},"false - ê²°ì ì í ì ì ",-1)])],512),[[V,a.form.triggerConditions.hasCreditPayment]])])):c("",!0)]),t("div",Dn,[t("label",Ln,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[25]||(e[25]=n=>a.useCoinPaymentFilter=n)},null,512),[[w,a.useCoinPaymentFilter]]),e[86]||(e[86]=t("span",{class:"text-xs leading-standard text-content-primary"},"ì½ì¸ ê²°ì ì¬ë¶",-1))]),a.useCoinPaymentFilter?(l(),i("div",Fn,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[26]||(e[26]=n=>a.form.triggerConditions.hasCoinPayment=n)},[...e[87]||(e[87]=[t("option",{value:!0},"true - ê²°ì í ì ì ",-1),t("option",{value:!1},"false - ê²°ì ì í ì ì ",-1)])],512),[[V,a.form.triggerConditions.hasCoinPayment]])])):c("",!0)]),t("div",Nn,[t("label",Rn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[27]||(e[27]=n=>a.useContentFilter=n)},null,512),[[w,a.useContentFilter]]),e[88]||(e[88]=t("span",{class:"text-xs leading-standard text-content-primary"},"í¹ì ì½í
ì¸ /í¬ë¦¬ìì´í° íí°",-1))]),a.useContentFilter?(l(),i("div",Gn,[t("div",jn,[e[89]||(e[89]=t("span",{class:"text-xs leading-standard text-content-secondary"},"ì½í
ì¸ OID (ì¼í 구ë¶)",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[28]||(e[28]=n=>a.contentOidsText=n),placeholder:"507f1f77bcf86cd799439011, 507f1f77bcf86cd799439012"},null,512),[[h,a.contentOidsText]])]),t("div",Bn,[e[90]||(e[90]=t("span",{class:"text-xs leading-standard text-content-secondary"},"í¬ë¦¬ìì´í° OID (ì¼í 구ë¶)",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[29]||(e[29]=n=>a.creatorOidsText=n),placeholder:"507f1f77bcf86cd799439011, 507f1f77bcf86cd799439012"},null,512),[[h,a.creatorOidsText]])])])):c("",!0)]),t("div",Hn,[t("label",zn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[30]||(e[30]=n=>a.useRefererFilter=n)},null,512),[[w,a.useRefererFilter]]),e[91]||(e[91]=t("span",{class:"text-xs leading-standard text-content-primary"},"í¹ì 리í¼ë¬ë¡ ê°ì
í ì ì ë§",-1))]),a.useRefererFilter?(l(),i("div",Kn,[e[95]||(e[95]=t("p",{class:"text-xs leading-standard text-content-secondary"}," ìë 리í¼ë¬ ì½ëë¡ ê°ì
í ì ì ìê²ë§ ì¿ í°ì´ ë°ê¸ë©ëë¤. (complete_signup ì¡ì
ì ì©) ",-1)),t("div",Yn,[e[94]||(e[94]=t("span",{class:"text-xs leading-standard text-content-secondary"},"리í¼ë¬ ì½ë (ì¼í 구ë¶)",-1)),u(t("input",{class:"rounded-8px border border-status-success-emphasis/disabled bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[31]||(e[31]=n=>a.refererCodesText=n),placeholder:"partner_a, partner_b"},null,512),[[h,a.refererCodesText]]),t("div",Wn,[t("label",qn,[u(t("input",{type:"radio",class:"accent-accent-default",value:"exact","onUpdate:modelValue":e[32]||(e[32]=n=>a.form.triggerConditions.refererCodesMatchMode=n)},null,512),[[te,a.form.triggerConditions.refererCodesMatchMode]]),e[92]||(e[92]=t("span",{class:"text-xs leading-standard text-content-secondary"},"ì íí ì¼ì¹",-1))]),t("label",Qn,[u(t("input",{type:"radio",class:"accent-accent-default",value:"contains","onUpdate:modelValue":e[33]||(e[33]=n=>a.form.triggerConditions.refererCodesMatchMode=n)},null,512),[[te,a.form.triggerConditions.refererCodesMatchMode]]),e[93]||(e[93]=t("span",{class:"text-xs leading-standard text-content-secondary"},"í¬í¨ (ì
ë ¥í ì½ëê° ë¦¬í¼ë¬ì í¬í¨ëë©´ 매ì¹)",-1))])])])])):c("",!0)]),t("div",Zn,[t("label",Jn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[34]||(e[34]=n=>a.useBlockIfUserHas=n)},null,512),[[w,a.useBlockIfUserHas]]),e[96]||(e[96]=t("span",{class:"text-xs leading-standard text-content-primary"},"í¹ì ì¿ í° ë³´ì ì ë°ê¸ ì°¨ë¨",-1))]),a.useBlockIfUserHas?(l(),i("div",Xn,[e[98]||(e[98]=t("p",{class:"text-xs leading-standard text-content-secondary"}," ì ì ê° ìë í
í릿ì 미ì¬ì© ì¿ í°ì ë³´ì íê³ ìì¼ë©´ ì´ í
í릿ì ì¿ í°ì ë°ê¸íì§ ììµëë¤. ",-1)),a.form.triggerConditions.blockIfUserHasTemplates.length>0?(l(),i("div",$n,[(l(!0),i(b,null,T(a.form.triggerConditions.blockIfUserHasTemplates,n=>(l(),i("span",{class:"inline-flex items-center gap-1 rounded-pill border border-accent-default/disabled bg-accent-default/very-low px-component-sm-roomy py-1 text-xs leading-standard text-accent-default",key:n},[U(g(a.getTemplateName(n))+" ",1),t("button",{class:"text-accent-default hover:text-status-danger-foreground",onClick:f=>a.toggleBlockTemplate(n)},[...e[97]||(e[97]=[t("svg",{class:"h-12px w-12px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,er)]))),128))])):c("",!0),t("div",tr,[a.availableTemplatesForBlock.length===0?(l(),i("div",ar," ì í ê°ë¥í í
íë¦¿ì´ ììµëë¤ ")):c("",!0),(l(!0),i(b,null,T(a.availableTemplatesForBlock,n=>(l(),i("label",{class:N(["flex cursor-pointer items-center gap-2 border-b border-border-strong px-3 py-2 transition-colors last:border-b-0",a.form.triggerConditions.blockIfUserHasTemplates.includes(n._id)?"bg-accent-default/minimal":"hover:bg-surface-interactive"]),key:n._id},[t("input",{class:"accent-accent-default h-14px w-14px",type:"checkbox",checked:a.form.triggerConditions.blockIfUserHasTemplates.includes(n._id),onChange:f=>a.toggleBlockTemplate(n._id)},null,40,nr),t("div",rr,[t("div",or,g(n.name),1),t("div",sr,[t("code",lr,g(n._id),1),n.active?c("",!0):(l(),i("span",ir," ë¹íì± "))])])],2))),128))])])):c("",!0)]),t("div",null,[t("label",dr,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[35]||(e[35]=n=>a.useCustomCondition=n)},null,512),[[w,a.useCustomCondition]]),e[99]||(e[99]=t("span",{class:"text-xs leading-standard text-content-primary"},"커ì¤í
ì¡°ê±´ ì½ë",-1)),e[100]||(e[100]=t("span",{class:"text-xs leading-standard text-status-caution-content"},"(ê³ ê¸)",-1))]),a.useCustomCondition?(l(),i("div",cr,[u(t("textarea",{class:"rounded-8px font-mono w-full border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-status-caution-content","onUpdate:modelValue":e[36]||(e[36]=n=>a.form.triggerConditions.customConditionCode=n),rows:"3",placeholder:"context.amount >= 10000 && context.paymentMethod === 'card'"},null,512),[[h,a.form.triggerConditions.customConditionCode]]),e[101]||(e[101]=t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"}," ì¬ì© ê°ë¥ ë³ì: context (action, userOid, amount, platformType ë±) ",-1))])):c("",!0)])],64)):c("",!0)])],64)):c("",!0),a.activeTab==="achievementQueries"?(l(),i("div",ur,[t("div",gr,[e[103]||(e[103]=t("div",null,[t("h3",{class:"font-weight-bold text-content-primary"}," ì
ì 쿼리 ëª©ë¡ "),t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"}," ë±ë¡ë ì
ì 쿼리를 ì¡°ííê³ ìë¡ ë±ë¡íê±°ë ìì ·ìì í ì ììµëë¤. ")],-1)),t("button",{class:"rounded-8px shrink-0 bg-accent-default px-3 py-2 text-xs leading-standard font-weight-medium text-accent-content hover:opacity-strong",onClick:e[37]||(e[37]=(...n)=>a.openAchievementCreateEditor&&a.openAchievementCreateEditor(...n))}," + ì 쿼리 ë±ë¡ ")]),a.isLoadingAchievements&&a.availableAchievements.length===0?(l(),i("div",mr," ì
ì 쿼리를 ë¶ë¬ì¤ë ì¤ì
ëë¤. ")):a.availableAchievements.length===0?(l(),i("div",vr," ë±ë¡ë ì
ì ì¿¼ë¦¬ê° ììµëë¤. ")):(l(),i("div",pr,[(l(!0),i(b,null,T(a.availableAchievements,n=>(l(),i("div",{key:n._id,class:"flex items-center gap-3 border-b border-border-strong p-3 last:border-b-0"},[n.rewardCoupon?.imageUrl?(l(),i("img",{key:0,class:"h-40px w-40px shrink-0 rounded-sm object-cover",src:n.rewardCoupon.imageUrl,alt:""}
3,null,8,xr)):(l(),i("div",br," ð ")),t("div",yr,[t("div",fr,[t("span",hr,g(n.multiLangName?.ko||n.name),1),t("span",{class:N(["rounded-pill px-2 py-component-3xs text-xs leading-standard",n.active?"bg-status-success-emphasis/very-low text-status-success-foreground":"bg-surface-inverse-disabled/very-low text-content-secondary"])},g(n.active?"íì±":"ë¹íì±"),3),n.isEvent?(l(),i("span",_r," ì´ë²¤í¸ ")):c("",!0),n.rewardCoupon?.adminOnly?(l(),i("span",Cr," ê´ë¦¬ìì ì© ")):c("",!0)]),t("div",kr,g(a.formatAchievementGoal(n)),1),t("div",Tr," ì§ê³: "+g(n.aggregationStartAt?`${a.formatDateTime(n.aggregationStartAt)}ë¶í°`:"ì ì²´ ëì "),1),n.rewardConfigurationError?(l(),i("div",wr," íì± ì¿ í°ì´ ì¬ë¬ ê° ì°ê²°ëì´ ììµëë¤. ")):n.rewardCoupon?(l(),i("div",Ar," ì°ê²° ì¿ í°: "+g(n.rewardCoupon.name),1)):c("",!0)]),t("div",Ur,[t("button",{class:"text-xs leading-standard text-content-secondary hover:text-accent-default",onClick:f=>a.openAchievementEditEditor(n)}," ìì ",8,Pr),t("button",{class:"text-xs leading-standard text-content-secondary hover:text-status-danger-foreground",onClick:f=>a.deleteAchievement(n)}," ìì ",8,Er)])]))),128))])),a.achievementEditorOpen?(l(),i("div",Or,[(l(),xt(m,{key:a.achievementEditorKey,data:{achievement:a.editingAchievement,progressTypes:a.achievementProgressTypes,actionTypes:a.SUPPORTED_ACTIONS,onSaved:a.handleAchievementSaved},onClosePopup:a.closeAchievementEditor},null,8,["data","onClosePopup"]))])):c("",!0)])):c("",!0),a.activeTab==="effects"?(l(),i(b,{key:3},[a.form.revokeOnly?(l(),i("div",Vr,[...e[104]||(e[104]=[t("div",{class:"text-xs leading-standard font-weight-bold text-status-warning-foreground"}," íì ì ì© í
í릿 (revokeOnly) ",-1),t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"},[U(" ì´ í
í릿ì ì¸ë²¤í 리 ìì´í
ì ìì±íì§ ìì¼ë¯ë¡ ë³´ì í¨ê³¼ê° ì ì©ëì§ ììµëë¤."),t("br"),U("ì í ì¤ì íìì ë°°íì ì¡ì
íê·¸ ì¤ì ì íì¸íì¸ì. ")],-1)])])):c("",!0),t("div",Sr,[t("div",Ir,[e[105]||(e[105]=t("h3",{class:"font-weight-bold text-content-primary"},"ë³´ì í¨ê³¼",-1)),t("button",{class:"rounded-8px bg-accent-default px-3 py-component-sm-tight text-xs leading-standard text-accent-content hover:opacity-strong disabled:opacity-faint",disabled:a.form.revokeOnly,onClick:e[38]||(e[38]=(...n)=>a.addEffect&&a.addEffect(...n))}," + í¨ê³¼ ì¶ê° ",8,Mr)]),e[115]||(e[115]=t("p",{class:"mb-3 text-xs leading-standard text-content-secondary"}," ì¡ì
íê·¸ ì¬ì© ì ì ì ê° ë°ì ë³´ìì ì¤ì íì¸ì (ì íì¬í, ë³µì ì¤ì ê°ë¥) ",-1)),a.form.effects.length===0?(l(),i("div",Dr," í¨ê³¼ë¥¼ ì¶ê°í´ì£¼ì¸ì ")):(l(),i("div",Lr,[(l(!0),i(b,null,T(a.form.effects,(n,f)=>(l(),i("div",{class:"rounded-8px border border-border-strong bg-surface-interactive p-3",key:f},[t("div",Fr,[t("span",Nr,"í¨ê³¼ #"+g(f+1),1),t("button",{class:"text-content-secondary hover:text-status-danger-foreground",title:"ìì ",onClick:o=>a.removeEffect(f)},[...e[106]||(e[106]=[t("svg",{class:"h-16px w-16px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Rr)]),t("div",Gr,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.effectType=o,onChange:o=>a.onEffectTypeChange(n)},[e[107]||(e[107]=t("option",{value:""},"í¨ê³¼ ì í ì í",-1)),(l(!0),i(b,null,T(a.EFFECT_TYPES,o=>(l(),i("option",{key:o.value,value:o.value},g(o.icon)+" "+g(o.label),9,Br))),128))],40,jr),[[V,n.effectType]]),n.effectType==="coins"?(l(),i(b,{key:0},[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.coinType=o},[(l(!0),i(b,null,T(a.COIN_TYPES,o=>(l(),i("option",{key:o.value,value:o.value},g(o.label),9,zr))),128))],8,Hr),[[V,n.coinType]]),u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"ìë"},null,8,Kr),[[h,n.amount,void 0,{number:!0}]])],64)):c("",!0),n.effectType==="model-discount"?(l(),i("div",Yr,[t("div",Wr,[u(t("input",{type:"number","onUpdate:modelValue":o=>n.discountPercent=o,min:"1",max:"100",class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",placeholder:"í ì¸ì¨"},null,8,qr),[[h,n.discountPercent,void 0,{number:!0}]]),e[108]||(e[108]=t("span",{class:"text-xs leading-standard text-content-secondary"},"% í ì¸",-1))]),u(t("input",{type:"text","onUpdate:modelValue":o=>n.targetModel=o,list:"aiModelsList",class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary",placeholder:"AI ëª¨ë¸ ì
ë ¥ (ì: claude-4.5-sonnet)"},null,8,Qr),[[h,n.targetModel]]),t("datalist",Zr,[(l(!0),i(b,null,T(p.aiModelsList,o=>(l(),i("option",{key:o.type,value:o.type},g(o.name),9,Jr))),128))])])):c("",!0),n.effectType==="credits"?(l(),i(b,{key:2},[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.creditType=o},[(l(!0),i(b,null,T(a.CREDIT_TYPES,o=>(l(),i("option",{key:o.value,value:o.value},g(o.label),9,$r))),128))],8,Xr),[[V,n.creditType]]),u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"ìë"},null,8,eo),[[h,n.amount,void 0,{number:!0}]])],64)):c("",!0),n.effectType==="subscription_days"?(l(),i(b,{key:3},[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"ì¼ì"},null,8,to),[[h,n.amount,void 0,{number:!0}
3]]),e[109]||(e[109]=t("span",{class:"self-center text-xs leading-standard text-content-secondary"},"ì¼",-1))],64)):c("",!0),n.effectType==="discount_percent"?(l(),i(b,{key:4},[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"í ì¸ì¨",min:"1",max:"100"},null,8,ao),[[h,n.amount,void 0,{number:!0}]]),e[110]||(e[110]=t("span",{class:"self-center text-xs leading-standard text-content-secondary"},"%",-1))],64)):c("",!0),n.effectType==="inventory_item"?u((l(),i("input",{key:5,class:"rounded-8px flex-1 border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":o=>n.itemTemplate=o,placeholder:"ìì´í
í
í릿 OID ëë JSON"},null,8,no)),[[h,n.itemTemplate]]):c("",!0),n.effectType==="badge"?(l(),i("div",ro,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.badgeKey=o},[e[111]||(e[111]=t("option",{value:""},"ë±ì§ ì í",-1)),(l(!0),i(b,null,T(a.enabledBadges,o=>(l(),i("option",{key:o.key,value:o.key},g(o.name)+" ("+g(o.key)+") ",9,so))),128))],8,oo),[[V,n.badgeKey]]),a.getSelectedBadge(n.badgeKey)?(l(),i("div",lo,[ne(I,{badge:a.getSelectedBadge(n.badgeKey),mode:"compact",size:20},null,8,["badge"]),t("code",io,g(n.badgeKey),1)])):c("",!0)])):c("",!0),n.effectType==="coin-discount"||n.effectType==="credit-discount"?(l(),i("div",co,[t("div",uo,[e[112]||(e[112]=t("span",{class:"text-xs leading-standard text-content-secondary"},"ìíëª
í¨í´ (ìì¼ëì¹´ë ì§ì)",-1)),u(t("input",{class:"rounded-8px font-mono border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":o=>n.productNamePattern=o,placeholder:n.effectType==="coin-discount"?"b*_v2 (ì: b50_v2, b100_v2...)":"credits-*-v2 (ì: credits-600-v2...)"},null,8,go),[[h,n.productNamePattern]]),e[113]||(e[113]=t("span",{class:"text-xs leading-standard"},"* = 모ë 문ì, ? = í 문ì. ì: b*_v2, credits-*-v2",-1))]),t("div",mo,[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.discountPercent=o,placeholder:"í ì¸ì¨",min:"1",max:"100"},null,8,vo),[[h,n.discountPercent,void 0,{number:!0}]]),e[114]||(e[114]=t("span",{class:"text-xs leading-standard text-content-secondary"},"% í ì¸",-1))])])):c("",!0)])]))),128))]))])],64)):c("",!0),a.activeTab==="limits"?(l(),i(b,{key:4},[t("div",po,[e[125]||(e[125]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"ë°ê¸ ì í",-1)),t("div",xo,[t("label",bo,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[39]||(e[39]=n=>a.usePerUserLimit=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,yo),[[w,a.usePerUserLimit]]),e[116]||(e[116]=U(" ì ì ë¹ ë°ê¸ íì ì í ",-1))]),a.usePerUserLimit?(l(),i("div",fo,[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"number","onUpdate:modelValue":e[40]||(e[40]=n=>a.form.maxUsesPerUser=n),min:"1",disabled:a.form.triggerConditions.action==="achievement"},null,8,ho),[[h,a.form.maxUsesPerUser,void 0,{number:!0}]]),e[117]||(e[117]=t("span",{class:"text-xs leading-standard text-content-secondary"},"í",-1))])):c("",!0),a.form.triggerConditions.action==="achievement"?(l(),i("p",_o," ì
ì ë³´ìì ì¬ì©ìë¹ 1íë§ ë°ê¸ë©ëë¤. ")):a.usePerUserLimit?c("",!0):(l(),i("p",Co," 무ì í â ì¡ì
ë°ì ì ë§¤ë² ë°ê¸ë©ëë¤ ")),a.usePerUserLimit&&a.selectedActionInfo?.isMilestone?(l(),i("p",ko," â ï¸ ë§ì¼ì¤í¤ ì¡ì
ì ê²½ì° ê° ìê³ê°ë§ë¤ 1íì© ë°ê¸ë©ëë¤ ")):c("",!0)]),a.form.triggerConditions.action!=="achievement"?(l(),i("div",To,[t("label",wo,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[41]||(e[41]=n=>a.useGlobalMaxUses=n)},null,512),[[w,a.useGlobalMaxUses]]),e[118]||(e[118]=U(" ì ì²´ ë°ê¸ ìë ì í ",-1))]),a.useGlobalMaxUses?(l(),i("div",Ao,[u(t("input",{class:"rounded-8px w-120px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"number","onUpdate:modelValue":e[42]||(e[42]=n=>a.form.globalMaxUses=n),min:"1"},null,512),[[h,a.form.globalMaxUses,void 0,{number:!0}]]),e[119]||(e[119]=t("span",{class:"text-xs leading-standard text-content-secondary"},"ê° (ì ì²´ ì ì í©ê³)",-1))])):c("",!0)])):c("",!0),t("div",Uo,[e[124]||(e[124]=t("label",{class:"text-xs leading-standard text-content-secondary"},"ë°ê¸ë ì¡ì
íê·¸ ì í¨ ê¸°ê°",-1)),t("div",Po,[t("label",Eo,[u(t("input",{type:"radio",class:"accent-accent-default",value:"days","onUpdate:modelValue":e[43]||(e[43]=n=>
3a.couponExpiryMode=n)},null,512),[[te,a.couponExpiryMode]]),e[120]||(e[120]=t("span",{class:"text-xs leading-standard text-content-primary"},"ê¸°ê° (ì¼ì)",-1))]),t("label",Oo,[u(t("input",{type:"radio",class:"accent-accent-default",value:"date","onUpdate:modelValue":e[44]||(e[44]=n=>a.couponExpiryMode=n)},null,512),[[te,a.couponExpiryMode]]),e[121]||(e[121]=t("span",{class:"text-xs leading-standard text-content-primary"},"ë§ë£ ë ì§",-1))])]),a.couponExpiryMode==="days"?(l(),i("div",Vo,[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"number","onUpdate:modelValue":e[45]||(e[45]=n=>a.form.couponValidityDays=n),min:"1"},null,512),[[h,a.form.couponValidityDays,void 0,{number:!0}]]),e[122]||(e[122]=t("span",{class:"text-xs leading-standard text-content-secondary"},"ì¼ (ë°ê¸ì¼ë¡ë¶í°)",-1))])):(l(),i("div",So,[u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"datetime-local","onUpdate:modelValue":e[46]||(e[46]=n=>a.couponExpiryDateLocal=n)},null,512),[[h,a.couponExpiryDateLocal]]),e[123]||(e[123]=t("span",{class:"text-xs leading-standard text-content-secondary"},"ì ë§ë£",-1))]))])]),t("div",Io,[e[129]||(e[129]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"ìí",-1)),t("div",Mo,[t("label",Do,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[47]||(e[47]=n=>a.form.active=n)},null,512),[[w,a.form.active]]),e[126]||(e[126]=t("span",{class:"text-xs leading-standard text-content-primary"},"íì±í",-1)),e[127]||(e[127]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(ë¹íì±í ì ì¡ì
íê·¸ê° ë°ê¸ëì§ ìì)",-1))]),t("label",Lo,[u(t("input",{class:"accent-status-caution-content h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[48]||(e[48]=n=>a.form.adminOnly=n)},null,512),[[w,a.form.adminOnly]]),e[128]||(e[128]=t("span",{class:"text-xs leading-standard text-content-primary"},"ê´ë¦¬ì ì ì©",-1)),t("span",Fo,g(a.form.triggerConditions.action==="achievement"?"(ê´ë¦¬ì ê³ì ë§ ì
ì ë
¸ì¶Â·ë³´ì ìë ¹ ê°ë¥ - ë´ë¶ í
ì¤í¸ì©)":"(ê´ë¦¬ì ê³ì ë§ ì¡ì
íê·¸ ë°ê¸ ê°ë¥ - ë´ë¶ í
ì¤í¸ì©)"),1)])])]),t("div",No,[e[134]||(e[134]=t("h3",{class:"mb-3 font-weight-bold text-status-reward-content-strong"},"í¨ìë¸ ì¡ì
íê·¸ ì¤ì ",-1)),t("div",Ro,[t("label",Go,[u(t("input",{class:"accent-status-reward-content-strong h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[49]||(e[49]=n=>a.form.isPassive=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,jo),[[w,a.form.isPassive]]),e[130]||(e[130]=t("span",{class:"text-xs leading-standard text-content-primary"},"í¨ìë¸ ì¡ì
íê·¸",-1)),e[131]||(e[131]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(ìë ì ì© - ì ì ê° ìë ì¬ì© ë¶ê°)",-1))]),t("label",Bo,[u(t("input",{class:"accent-status-reward-content-strong h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[50]||(e[50]=n=>a.form.invisible=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,Ho),[[w,a.form.invisible]]),e[132]||(e[132]=t("span",{class:"text-xs leading-standard text-content-primary"},"ì¸ë²¤í 리 ì¨ê¹",-1)),e[133]||(e[133]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(ì ì ì ì¸ë²¤í 리 목ë¡ì íìíì§ ìì)",-1))]),a.form.triggerConditions.action==="achievement"?(l(),i("p",zo," ì
ì ë³´ìì ì¸ë²¤í 리ìì ì§ì ì¬ì©íë ê³µê° ì¿ í°ì¼ë¡ ê³ ì ë©ëë¤. ")):a.form.isPassive?(l(),i("p",Ko," í¨ìë¸ ì¡ì
íê·¸ë ì ì ë¡ê·¸ì¸ ì ìëì¼ë¡ ë¡ëëì´ ê²°ì /구매 ì ìë ì ì©ë©ëë¤. coin-discount / credit-discount í¨ê³¼ì í¨ê» ì¬ì©íì¸ì. ")):c("",!0)])]),t("div",Yo,[e[136]||(e[136]=t("h3",{class:"mb-3 font-weight-bold text-status-danger-foreground"},"íì ì ì© ëª¨ë",-1)),t("label",Wo,[u(t("input",{class:"accent-status-danger-foreground h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[51]||
3(e[51]=n=>a.form.revokeOnly=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,qo),[[w,a.form.revokeOnly]]),e[135]||(e[135]=t("span",{class:"text-xs leading-standard text-content-primary"},"íì ì ì© (revokeOnly)",-1))]),e[137]||(e[137]=t("p",{class:"mt-2 text-xs leading-standard text-content-secondary"},[U(" ì¸ë²¤í 리 ìì´í
ì ìì±íì§ ìê³ ë°°íì ì¡ì
íê·¸ íìë§ ì¤íí©ëë¤."),t("br"),U(" ìë ë°°íì ì¡ì
íê·¸ ì¤ì ê³¼ í¨ê» ì¬ì©íì¸ì. ")],-1))]),t("div",Qo,[e[145]||(e[145]=t("h3",{class:"mb-3 font-weight-bold text-status-warning-foreground"},"ë°°íì ì¡ì
íê·¸ ì¤ì ",-1)),t("label",Zo,[u(t("input",{class:"accent-status-warning-foreground h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[52]||(e[52]=n=>a.useExclusion=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,Jo),[[w,a.useExclusion]]),e[138]||(e[138]=t("span",{class:"text-xs leading-standard text-content-primary"},"ë°°íì ì¡ì
íê·¸ ì¬ì©",-1)),e[139]||(e[139]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(ë°ê¸ ì ë¤ë¥¸ ì¡ì
í그를 ìë íì)",-1))]),a.useExclusion?(l(),i("div",Xo,[t("div",$o,[e[140]||(e[140]=t("label",{class:"text-xs leading-standard text-status-warning-content-subtle"},"ë°°í 그룹 (exclusionGroup)",-1)),u(t("input",{class:"rounded-8px font-mono outline-none border border-status-warning-emphasis/disabled bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary focus:border-status-warning-foreground",type:"text","onUpdate:modelValue":e[53]||(e[53]=n=>a.form.exclusionGroup=n),placeholder:"ì: welcome-bonus, first-charge-promo"},null,512),[[h,a.form.exclusionGroup]]),e[141]||(e[141]=t("p",{class:"text-xs leading-standard text-content-secondary"},[U(" ê°ì 그룹ëª
ì ê°ì§ í
í릿ë¼ë¦¬ ìí¸ ë°°í â ì ì ë¹ ê·¸ë£¹ ë´ 1ê°ë§ ì ì§ë©ëë¤. "),t("br"),U("ì문, ì«ì, íì´í, ì¸ëì¤ì½ì´ë§ ì¬ì© ê°ë¥ (ì: welcome-bonus) ")],-1))]),t("div",es,[e[143]||(e[143]=t("label",{class:"text-xs leading-standard text-status-warning-content-subtle"},"ë°ê¸ ì íìí í
í릿 (revokeTemplateOids)",-1)),e[144]||(e[144]=t("p",{class:"mb-1 text-xs leading-standard text-content-secondary"}," ì´ ì¡ì
íê·¸ ë°ê¸ ì ì ì ê° ë³´ì í ìë í
í릿ì 미ì¬ì© ì¡ì
í그를 ìë íìí©ëë¤. ",-1)),a.form.revokeTemplateOids.length>0?(l(),i("div",ts,[(l(!0),i(b,null,T(a.form.revokeTemplateOids,n=>(l(),i("span",{class:"inline-flex items-center gap-1 rounded-pill border border-status-warning-emphasis/disabled bg-status-warning-emphasis/very-low px-component-sm-roomy py-1 text-xs leading-standard text-status-warning-content-subtle",key:n},[U(g(a.getTemplateName(n))+" ",1),t("button",{class:"text-status-warning-foreground hover:text-status-danger-foreground",onClick:f=>a.toggleRevokeTemplate(n)},[...e[142]||(e[142]=[t("svg",{class:"h-12px w-12px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,as)]))),128))])):c("",!0),t("div",ns,[a.availableTemplatesForRevoke.length===0?(l(),i("div",rs," ì í ê°ë¥í í
íë¦¿ì´ ììµëë¤ ")):c("",!0),(l(!0),i(b,null,T(a.availableTemplatesForRevoke,n=>(l(),i("label",{class:N(["flex cursor-pointer items-center gap-2 border-b border-border-strong px-3 py-2 transition-colors last:border-b-0",a.form.revokeTemplateOids.includes(n._id)?"bg-status-warning-emphasis/minimal":"hover:bg-surface-interactive"]),key:n._id},[t("input",{class:"accent-status-warning-foreground h-14px w-14px",type:"checkbox",checked:a.form.revokeTemplateOids.includes(n._id),onChange:f=>a.toggleRevokeTemplate(n._id)},null,40,os),t("div",ss,[t("div",ls,g(n.name),1),t("div",is,[t("code",ds,g(n._id),1),n.exclusionGroup?(l(),i("span",cs,g(n.exclusionGroup),1)):c("",!0),n.active?c("",!0):(l(),i("span",us," ë¹íì± "))])])],2))),128))])])])):c("",!0)])],64)):c("",!0)]),a.activeTab!=="achievementQueries"?(l(),i("div",gs,[e[146]||(e[146]=t("h4",{class:"mb-2 text-xs leading-standard font-weight-bold text-content-secondary"},"미리보기",-1)),t("div",ms,[a.imagePreviewUrl?(l(),i("img",{key:0,class:"rounded-8px h-48px w-48px object-cover",src:a.imagePreviewUrl,onError:e[54]||(e[54]=(...n)=>a.onImageError&&a.onImageError(...n))},null,40,vs)):(l(),i("div",ps," ð ")),t("div",xs,[t("div",bs,g(a.form.multiLangName.ko||a.form.name||"(ì´ë¦ ìì)"),1),t("div",ys,g(a.form.multiLangDescription.ko||"(ì¤ëª
ìì)"),1),a.form.triggerConditions.action?(l(),i("div",fs," í¸ë¦¬ê±°: "+g(a.form.triggerConditions.action),1)):c("",!0)]),t("div",hs,[(l(!0),i(b,null,T(a.form.effects.slice(0,2),
3(n,f)=>(l(),i("div",{class:"text-xs leading-standard text-status-success-foreground",key:f},g(a.formatEffectPreview(n)),1))),128)),a.form.effects.length>2?(l(),i("div",_s," +"+g(a.form.effects.length-2)+" more ",1)):c("",!0)])])])):c("",!0),a.activeTab!=="achievementQueries"&&a.validationErrors.length>0?(l(),i("div",Cs,[e[147]||(e[147]=t("div",{class:"mb-1 text-xs leading-standard font-weight-bold text-status-danger-foreground"},"ì
ë ¥ ì¤ë¥",-1)),t("ul",ks,[(l(!0),i(b,null,T(a.validationErrors,(n,f)=>(l(),i("li",{key:f},g(n),1))),128))])])):c("",!0),a.activeTab!=="achievementQueries"?(l(),i("div",Ts,[t("button",{class:"rounded-8px bg-accent-default px-4 py-2 text-accent-content hover:opacity-strong disabled:opacity-disabled",disabled:a.isSaving||!a.isValid||a.form.triggerConditions.action==="achievement"&&a.isLoadingAchievements,onClick:e[55]||(e[55]=(...n)=>a.save&&a.save(...n))},g(a.isSaving?"ì ì¥ ì¤...":a.isEditing?"ìì ":"ìì±"),9,ws)])):c("",!0)])])}var Ns=Ge(pa,[["render",As]]);export{Ns 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.