PageSourceSearch

https://lesvacances.co.kr/assets/RefundHelperPage-DEmEsdfI.js

js lesvacances.co.kr collected 2026-09-25 11:26:39 UTC 37,357 bytes, 16 lines download raw bytes

1import{m as H,n as V,o as L,K as Ce,L as Re,x as De,Y as _e,z as U,y as Me,r as m,j as e,b as Te,ay as W,t as $,P as Ie}from"./index-DJGi9kSq.js";import{auth as w}from"./firebaseAuth-D21EO0Hc.js";import{A as Ee}from"./arrow-left-CXrnAMCI.js";import{S as Oe}from"./shield-D_oqMCnL.js";import{C as I}from"./circle-alert-CDJhH09W.js";import{C as ne}from"./circle-check-k0rs3Pw1.js";import{C as le}from"./circle-Cetb1qCP.js";import{C as Le}from"./clock-CkT6v99f.js";import{F as Be}from"./file-text-CejNMU-w.js";import{E as ce}from"./external-link-CfkJZ4lA.js";import{L as Ke}from"./landmark-DVIIG0WO.js";import"./index.esm-BQEAOfp1.js";async function qe(){return(await H(V(L,"refundRules"))).docs.map(a=>({ruleId:a.id,...a.data()}))}async function Fe(){return(await H(V(L,"refundAgencies"))).docs.map(a=>({agencyId:a.id,...a.data()})).filter(a=>a.isActive!==!1)}const A=s=>{if(!s)return null;const a=new Date(s);return Number.isNaN(a.getTime())?null:a},P=(s,a,r)=>{switch(a){case"<=":return s<=r;case"<":return s<r;case">=":return s>=r;case">":return s>r;case"==":return s===r;default:return!1}},de=s=>{const a=s.getMonth()+1,r=s.getDate();
1return a===7&&r>=15||a===8&&r<=24||a===12&&r>=20||a===1||a===2&&r<=20};function ie(s,a){const r=c=>a[c];switch(s.fn){case"hoursBetween":{const c=A(r(s.args[0])),o=A(r(s.args[1]));return!c||!o?!1:P(Math.abs(o.getTime()-c.getTime())/36e5,s.op,s.value)}case"daysBetween":{const c=A(r(s.args[0])),o=A(r(s.args[1]));return!c||!o?!1:P(Math.abs(o.getTime()-c.getTime())/864e5,s.op,s.value)}case"equals":return r(s.args[0])===s.value;case"includes":return Array.isArray(r(s.args[0]))&&r(s.args[0]).includes(s.value);case"inRange":{const c=A(r(s.args[0])),o=A(r(s.args[1]));return!c||!o||!(s.season==="peak"?de(o):!de(o))?!1:P(Math.abs(o.getTime()-c.getTime())/864e5,s.op,s.value)}default:return!1}}function Ue(s,a){return!s||typeof s!="object"?!1:Array.isArray(s.all)?s.all.every(r=>ie(r,a)):Array.isArray(s.any)?s.any.some(r=>ie(r,a)):!1}function Pe(s,a){const r=s.filter(i=>(i.category||[]).includes(a.category)).filter(i=>Ue(i.conditions,a)).sort((i,b)=>(b.weight||0)-(i.weight||0)),c=r.reduce((i,b)=>i+(b.weight||0),0),o=r.some(i=>i.strength==="strong"),p=r.length===0?"none":o||c>=40?"strong":c>=20?"moderate":"weak",y=typeof a.paidAmount=="number"&&a.paidAmount>0?Math.max(a.paidAmount-(a.refundedAmount||0),0):null;return{level:p,score:c,matchedRules:r,estimatedRecovery:y}}const O=s=>{const a=A(s);return a?`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")} ${String(a.getHours()).padStart(2,"0")}:${String(a.getMinutes()).padStart(2,"0")}`:"(입력 안 됨)"},We=s=>{const a=A(s);return a?`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`:"(입력 안 됨)"},D=(s,a)=>typeof s=="number"?`${s.toLocaleString("ko-KR")}${a==="KRW"||!a?"원":` ${a}`}`:"(입력 안 됨)",Y={flight:"항공권",hotel:"숙박",tour:"투어·액티비티",car:"렌터카"};function Ye(s,a){const r=a.estimatedRecovery,c=a.matchedRules.map((y,i)=>{const b=y.documentSnippet||`${y.title}: ${y.userExplain}`,_=y.legalBasis?` (근거: ${y.legalBasis})`:"";return`${i+2}. ${b}${_}`}).join(`
2`),o=`[환불 요구] ${s.bookingRef?`예약번호 ${s.bookingRef} `:""}취소 수수료 환불 요청`,p=`${s.merchantName} 담당자님께
3
41. 본인은 ${O(s.paidAt)} 귀사를 통해 ${Y[s.category]||"상품"}을 결제하고, ${O(s.cancelRequestedAt)} 취소를 요청하였습니다.${s.bookingRef?` (예약번호: ${s.bookingRef})`:""}
5${c||"2. 관련 법령과 소비자분쟁해결기준에 따른 정당한 환불을 요청합니다."}
6
7이에 결제대금 ${D(s.paidAmount,s.currency)}${r&&r!==s.paidAmount?` 중 미환불액 ${D(r,s.currency)}`:" 전액"}의 환불을 요구하며, 본 요청 수령일로부터 7일 이내 회신을 요청합니다.
8회신이 없을 경우 서울시 전자상거래센터·한국소비자원 등 관계 기관에 피해구제를 신청할 예정입니다.
9
10${new Date().getFullYear()}-${String(new Date().getMonth()+1).padStart(2,"0")}-${String(new Date().getDate()).padStart(2,"0")}
11요청인 드림`;return{title:o,body:p}}function oe(s,a){const r=a.estimatedRecovery;return[{label:"제목",text:`${s.merchantName} ${Y[s.category]||""} 취소 수수료 환불 관련 피해구제 신청`},{label:"피신청인(사업자)",text:s.merchantName},{label:"신청취지",text:`결제대금 ${D(s.paidAmount,s.currency)}${r&&r!==s.paidAmount?` 중 미환불액 ${D(r,s.currency)}`:" 전액"}의 환불을 요청합니다.`},{label:"신청이유",text:`본인은 ${O(s.paidAt)} 위 사업자를 통해 ${Y[s.category]||"상품"}(이용 예정일 ${We(s.serviceDate)})을 결제하였고, ${O(s.cancelRequestedAt)} 취소를 요청했습니다.
12${a.matchedRules.map((c,o)=>`(${o+1}) ${c.documentSnippet||`${c.title} — ${c.userExplain}`}${c.legalBasis?` [근거: ${c.legalBasis}]`:""}`).join(`
13`)}
14사업자에게 ${D(s.paidAmount,s.currency)}의 환불을 요구했으나 해결되지 않아 피해구제를 신청합니다.`}]}function ze(){const s=new Date,a=Math.random().toString(36).slice(2,6).toUpperCase();return`RF-${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}${String(s.getDate()).padStart(2,"0")}-${a}`}async function C(s,a,r){const c=w.currentUser?.uid;if(!c)throw new Error("로그인이 필요합니다.");const o=De(L,"refundCases",s);r?await Me(o,{...a,uid:c,createdAt:U(),updatedAt:U()}):await _e(o,{...a,updatedAt:U()})}async function S(){const s=w.currentUser?.uid;return s?(await H(Ce(V(L,"refundCases"),Re("uid","==",s)))).docs.map(r=>({id:r.id,...r.data()})).sort((r,c)=>(c.updatedAt?.seconds||0)-(r.updatedAt?.seconds||0)):[]}const E="환불도우미는 법률 자문을 제공하지 않으며, 결과를 보장하지 않습니다.",xe=[{id:"flight",icon:"✈️",label:"항공권",ready:!0},{id:"hotel",icon:"🏨",label:"호텔·숙박",ready:!1},{id:"tour",icon:"🎟️",label:"투어·액티비티",ready:!1},{id:"car",icon:"🚗",label:"렌터카",ready:!1}],He=[{id:"direct",label:"항공사·호텔에서 직접",desc:"공식 홈페이지·앱에서 예약"},{id:"ota",label:"OTA·여행사",desc:"트립닷컴, 아고다, 인터파크투어 등"},{id:"vacance",label:"레바캉스에서 연결",desc:"우리 앱에서 이동해 예약"}],Ve=[{id:"change_of_mind",label:"단순 변심 · 일정 변경",evidence:""},{id:"medical",label:"본인·가족의 질병 · 부상 · 사망",evidence:"진단서/입원확인서 (직계가족이면 가족관계증명서)"},{id:"merchant_fault",label:"항공사·숙소 측의 변경 (결항·지연·스케줄 변경·오버부킹)",evidence:"결항·변경 통보 문자 또는 메일 캡처"},{id:"force_majeure",label:"천재지변 · 재난 · 감염병 / 외교부 여행경보",evidence:"여행경보 발령 화면 또는 공적 발표 캡처"},{id:"terms_not_disclosed",label:"환불규정을 제대로 안내받지 못함",evidence:"예약 당시 환불규정 페이지 캡처"},{id:"voucher_only",label:"현금 대신 바우처·크레딧으로만 준다고 함",evidence:"바우처 안내 화면 캡처"},{id:"delayed_response",label:"취소는 제때 요청했는데 응답이 늦어 수수료가 올라감",evidence:"취소 요청 시각이 보이는 화면 캡처"}],Ge=[{id:"card_domestic",label:"신용카드 (국내 결제)"},{id:"card_overseas",label:"신용카드 (해외 결제)"},{id:"easy_pay",label:"간편결제"},{id:"transfer",label:"계좌이체"}],Je=["예약확인서","결제내역(카드전표)","취소 요청 시각이 보이는 화면 캡처","사업자 답변 캡처"],R={strong:{text:"전액환불을 요구할 근거가 강합니다",color:"#15803d",bg
14:"#f0fdf4"},moderate:{text:"환불을 요구할 근거가 있습니다",color:"#b45309",bg:"#fffbeb"},weak:{text:"근거가 약하지만 시도할 수 있습니다",color:"#6b7280",bg:"#f9fafb"},none:{text:"자동 진단으로는 근거를 찾지 못했습니다",color:"#6b7280",bg:"#f9fafb"}},me={draft:"작성 중",diagnosed:"진단 완료",submitted_merchant:"사업자 요구서 발송",awaiting_merchant:"사업자 회신 대기",submitted_agency:"기관 접수",in_review:"처리 중",escalated:"다음 단계 진행",resolved_refunded:"환불 완료",resolved_partial:"일부 환불",rejected:"거절됨",abandoned:"중단"},z=async(s,a)=>{try{await navigator.clipboard.writeText(s),$.success(`${a}을(를) 복사했습니다.`)}catch{$.error("복사에 실패했습니다. 길게 눌러 직접 복사해 주세요.")}};function it({onPageChange:s}){const[a,r]=m.useState("list"),[c,o]=m.useState([]),[p,y]=m.useState([]),[i,b]=m.useState([]),[_,G]=m.useState(null),[x,M]=m.useState(1),[f,J]=m.useState(""),[he,Q]=m.useState(""),[l,X]=m.useState({category:"",merchantType:"",merchantName:"",reasons:[],currency:"KRW"}),[u,Z]=m.useState(null),[ge,ee]=m.useState({}),[te,B]=m.useState(""),[K,q]=m.useState("");m.useEffect(()=>{window.scrollTo(0,0),qe().then(o).catch(t=>console.error("🛡 룰 로드 실패:",t)),Fe().then(y).catch(t=>console.error("🛡 기관 로드 실패:",t)),S().then(b).catch(()=>{})},[]);const j=t=>X(n=>({...n,...t})),se=m.useMemo(()=>{if(!l.paidAt||!l.cancelRequestedAt)return null;const t=new Date(l.paidAt).getTime(),n=new Date(l.cancelRequestedAt).getTime();if(Number.isNaN(t)||Number.isNaN(n)||n<t)return null;const d=(n-t)/36e5;if(d<=24)return`결제 후 ${Math.round(d)}시간 만에 취소 — 24시간 룰 적용 가능 구간입니다`;const h=d/24;return h<=7&&l.merchantType==="ota"?`결제 후 ${Math.floor(h)}일째 취소 — 전자상거래 청약철회(7일) 구간입니다`:null},[l.paidAt,l.cancelRequestedAt,l.merchantType]),be=m.useMemo(()=>{switch(x){case 1:return!!(l.category&&l.merchantType&&l.merchantName.trim());case 2:return!!(l.paidAt&&l.cancelRequestedAt&&l.paidAmount);case 3:return l.reasons.length>0;default:return!0}},[x,l]),pe=()=>{X({category:"",merchantType:"",merchantName:"",reasons:[],currency:"KRW"}),Z(null),ee({}),B(""),q(""),J(""),Q(""),M(1),r("wizard"),window.scrollTo(0,0)},ye=()=>{const t=Pe(c,l);Z(t);const n=Ye(l,t);if(B(n.title),q(n.body),w.currentUser){const d=f||`rc_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,h=he||ze();J(d),Q(h),C(d,{caseNo:h,status:"diagnosed",...l,diagnosis:{level:t.level,score:t.score,matchedRules:t.matchedRules.map(g=>g.ruleId),estimatedRecovery:t.estimatedRecovery,diagnosedAt:new Date().toISOString()},timeline:[{at:new Date().toISOString(),type:"diagnosed",message:`진단 완료 — 근거 ${t.matchedRules.length}건 (${t.level})`}]},!f).then(()=>S().then(b)).catch(g=>console.error("🛡 케이스 저장 실패:",g))}},fe=async t=>{if(!(!w.currentUser||!f))try{await C(f,{status:"submitted_merchant",documents:[{templateId:"merchant_demand_client_v1",body:K,createdAt:new Date().toISOString()}],nextAction:{code:"await_merchant",label:"사업자 회신 대기 (7일)",dueAt:new Date(Date.now()+7*864e5).toISOString()},timeline:[...i.find(n=>n.id===f)?.timeline||[],{at:new Date().toISOString(),type:"sent_L1",message:`사업자에 환불 요구서 전달 (${t})`}]},!1),S().then(b)}catch(n){console.error(n)}},je=async(t,n)=>{if(!w.currentUser||!f){$.info("로그인하면 접수 이력이 저장됩니다.");return}try{await C(f,{status:"submitted_agency",submissions:[{agencyId:t.agencyId,channel:t.channel?.type||"",mode:"assisted",sentAt:new Date().toISOString(),externalRefNo:n,status:"submitted"}],nextAction:{code:"await_agency",label:`${t.nameKr} 처리 대기${t.slaDays?` (표준 ${t.slaDays}일)`:""}`,dueAt:t.slaDays?new Date(Date.now()+t.slaDays*864e5).toISOString():null},timeline:[...i.find(d=>d.id===f)?.timeline||[],{at:new Date().toISOString(),type:"submitted_agency",message:`${t.nameKr} 접수${n?` (접수번호 ${n})`:""}`}]},!1),$.success(`${t.nameKr} 접수를 기록했습니다.`),S().then(b)}catch(d){console.error(d)}},k=async(t,n,d,h={})=>{try{await C(t.id,{status:n,timeline:[...t.timeline||[],{at:new Date().toISOString(),type:n,message:d}],...h},!1);const g={...t,status:n,timeline:[...t.timeline||[],{at:new Date().toISOString(),type:n,message:d}],...h};G(g),S().then(b),$.success(d)}catch(g){console.error(g),$.error("저장에 실패했습니다.")}},Ne=t=>{const n={category:t.category||"flight",merchantType:t.merchantType||"",merchantName:t.merchantName||"",bookingRef:t.bookingRef,paidAt:t.paidAt,cancelRequestedAt:t.cancelRequestedAt,serviceDate:t.serviceDate,paidAmount:t.paidAmount,refundedAmount:t.refundedAmount,currency:t.currency||"KRW",paymentMethod:t.paymentMethod,reasons:t.reasons||[]},d=c.filter(h=>(t.diagnosis?.matchedRules||[]).includes(h.ruleId));return{input:n,diag:{level:t.diagnosis?.level||"none",score:t.diagnosis?.score||0,matchedRules:d,estimatedRecovery:t.diagnosis?.estimatedRecovery??null}}},ve=async(t,n,d)=>{await k(t,"submitted_agency",`${n.nameKr} 접수${d?` (접수번호 ${d})`:""}`,{submissions:[...t.submissions||[],{agencyId:n.agencyId,channel:n.channel?.type||"",mode:"assisted",sentAt:new Date().toISOString(),externalRefNo:d,status:"submitted"}],nextAction:{code:"await_agency",label:`${n.nameKr} 처리 대기${n.slaDays?` (표준 ${n.slaDays}일)`:""}`,dueAt:n.slaDays?new Date(Date.now()+n.slaDays*864e5).toISOString():null}})},we=m.useMemo(()=>{const t=(u?.matchedRules||[]).flatMap(n=>n.requiredEvidence||[]);return Array.from(new Set([...Je,...t]))},[u]),ae=m.useMemo(()=>p.filter(t=>(t.scope||[]).includes(l.category)||(t.scope||[]).includes("all")),[p,l.category]),Ae=()=>e.jsxs("div",{className:"flex items-center gap-1.5 justify-center my-3","aria-label":`진행 ${x}/6`,children:[[1,2,3,4,5,6].map(t=>e.jsx("span",{className:"rounded-full",style:{width:t===x?"22px":"8px",height:"8px",transition:"width .2s",background:t<=x?"#2563eb":"#e5e7eb"}},t)),e.jsxs("span",{className:"text-xs text-gray-500 ml-2",children:[x,"/6"]})]}),T=t=>`w-full p-3 rounded-lg border-2 text-left transition-colors ${t?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,F=e.jsx("div",{className:"bg-white border-b border-gray-200",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-4 pt-3 pb-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("button",{onClick:()=>
14{if(a==="wizard"&&x>1){M(x-1);return}if(a!=="list"){r("list"),S().then(b);return}s("home")},className:"p-2 -ml-2 text-gray-700 hover:bg-gray-100 rounded-lg","aria-label":"뒤로가기",children:e.jsx(Ee,{className:"w-5 h-5"})}),a==="wizard"&&w.currentUser&&f&&e.jsx("button",{className:"text-xs text-gray-500 hover:text-gray-700",onClick:()=>{C(f,{status:"draft",...l},!1).catch(()=>{}),r("list")},children:"임시저장하고 나가기"})]}),e.jsxs("h1",{className:"text-lg font-bold text-gray-900 text-center flex items-center justify-center gap-1.5 mt-1",children:[e.jsx(Oe,{className:"w-5 h-5 text-blue-600"})," 환불 도우미"]}),a==="list"&&e.jsx("p",{className:"text-sm text-gray-500 text-center mt-1",children:"억울한 취소 수수료, 포기하지 마세요. 근거와 길을 함께 찾아드립니다."})]})});if(a==="list")return e.jsxs("div",{className:"min-h-screen page-bg pb-[160px]",children:[F,e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-6 space-y-4",children:[e.jsx("button",{onClick:pe,className:"w-full p-5 rounded-xl text-white text-left shadow-md hover:shadow-lg transition-shadow",style:{background:"linear-gradient(135deg, #2563eb, #1d4ed8)"},children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-base",children:"환불 가능성 진단하기"}),e.jsx("p",{className:"text-sm text-blue-100 mt-1",children:"6개 질문 · 약 2분 — 법령·분쟁기준 근거로 확인한다"})]}),e.jsx(Te,{className:"w-6 h-6 flex-shrink-0"})]})}),!w.currentUser&&e.jsx("p",{className:"text-xs text-gray-500 text-center",children:"진단은 로그인 없이 가능하다. 케이스 저장·추적은 로그인이 필요하다."}),i.length>0&&e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"내 케이스"}),e.jsx("div",{className:"space-y-2",children:i.map(t=>e.jsxs("button",{onClick:()=>{G(t),r("case"),window.scrollTo(0,0)},className:"w-full bg-white rounded-lg border border-gray-200 p-4 text-left hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-semibold text-gray-900",children:t.caseNo||t.id}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-50 text-blue-700",children:me[t.status]||t.status})]}),e.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:[t.merchantName," · ",xe.find(n=>n.id===t.category)?.label||t.category]}),t.nextAction?.label&&e.jsxs("p",{className:"text-xs text-amber-700 mt-1",children:["📌 ",t.nextAction.label]})]},t.id))})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 text-xs text-gray-500 space-y-1",children:[e.jsxs("p",{className:"flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]}),e.jsx("p",{children:"요구서와 민원은 본인 명의로 본인이 접수합니다. 이용은 무료입니다."})]})]})]});if(a==="case"&&_){const t=_,n=["diagnosed","submitted_merchant","submitted_agency","in_review","resolved_refunded"],d=["진단","사업자 요구","기관 접수","처리 중","완료"],h=Math.max(n.indexOf(t.status),t.status?.startsWith("resolved")?4:0);return e.jsxs("div",{className:"min-h-screen page-bg pb-[160px]",children:[F,e.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-6 space-y-4",children:[e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"font-bold text-gray-900",children:t.caseNo}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-50 text-blue-700",children:me[t.status]||t.status})]}),e.jsx("div",{className:"flex items-center",children:d.map((g,N)=>e.jsxs("div",{className:"flex-1 flex flex-col items-center",children:[e.jsxs("div",{className:"flex items-center w-full",children:[e.jsx("div",{className:`flex-1 h-0.5 ${N===0?"bg-transparent":N<=h?"bg-blue-500":"bg-gray-200"}`}),N<=h?e.jsx(ne,{className:"w-5 h-5 text-blue-600 flex-shrink-0"}):e.jsx(le,{className:"w-5 h-5 text-gray-300 flex-shrink-0"}),e.jsx("div",{className:`flex-1 h-0.5 ${N===d.length-1?"bg-transparent":N<h?"bg-blue-500":"bg-gray-200"}`})]}),e.jsx("span",{className:`text-[10px] mt-1 ${N<=h?"text-blue-700":"text-gray-400"}`,children:g})]},g))})]}),t.nextAction?.label&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:[e.jsx("p",{className:"text-sm font-semibold text-amber-800",children:"📌 다음 할 일"}),e.jsx("p",{className:"text-sm text-amber-700 mt-1",children:t.nextAction.label}),t.nextAction.dueAt&&e.jsxs("p",{className:"text-xs text-amber-600 mt-1 flex items-center gap-1",children:[e.jsx(Le,{className:"w-3 h-3"}),"기준일 ",String(t.nextAction.dueAt).slice(0,10)]})]}),Array.isArray(t.timeline)&&t.timeline.length>0&&e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"📜 타임라인"}),e.jsx("div",{className:"space-y-2",children:[...t.timeline].reverse().map((g,N)=>e.jsxs("div",{className:"flex gap-2 text-sm",children:[e.jsx("span",{className:"text-gray-400 flex-shrink-0",children:String(g.at).slice(5,10)}),e.jsx("span",{className:"text-gray-700",children:g.message})]},N))})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"상태 업데이트"}),e.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"진행 상황이 바뀌면 눌러 주세요 — 단계와 타임라인에 기록됩니다."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.status==="diagnosed"&&e.jsx("button",{onClick:()=>k(t,"submitted_merchant","사업자에 환불 요구서 전달",{nextAction:{code:"await_merchant",label:"사업자 회신 대기 (7
14일)",dueAt:new Date(Date.now()+7*864e5).toISOString()}}),className:"text-xs px-3 py-2 rounded-lg border border-blue-500 text-blue-600",children:"사업자에게 요구서를 보냈다"}),["submitted_agency","submitted_merchant","awaiting_merchant"].includes(t.status)&&e.jsx("button",{onClick:()=>k(t,"in_review","기관·사업자 처리 진행 중",{nextAction:{code:"in_review",label:"처리 ê²°ê³¼ 대기",dueAt:null}}),className:"text-xs px-3 py-2 rounded-lg border border-blue-500 text-blue-600",children:"처리가 시작됐다"}),!String(t.status).startsWith("resolved")&&t.status!=="rejected"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>k(t,"resolved_refunded","환불 완료 🎉",{nextAction:null}),className:"text-xs px-3 py-2 rounded-lg bg-green-600 text-white",children:"환불 완료됐다"}),e.jsx("button",{onClick:()=>k(t,"resolved_partial","일부 환불로 종결",{nextAction:null}),className:"text-xs px-3 py-2 rounded-lg border border-green-600 text-green-700",children:"일부만 환불받았다"}),e.jsx("button",{onClick:()=>k(t,"rejected","거절됨 — 다음 단계(다른 기관·조정) 검토",{}),className:"text-xs px-3 py-2 rounded-lg border border-gray-300 text-gray-600",children:"거절당했다"})]})]})]}),!String(t.status).startsWith("resolved")&&(()=>{const g=new Set((t.submissions||[]).map(v=>v.agencyId)),{input:N,diag:Se}=Ne(t),re=p.filter(v=>v.automationTier==="B"&&!g.has(v.agencyId)&&((v.scope||[]).includes(t.category)||(v.scope||[]).includes("all")));return re.length===0?null:e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold text-gray-900 mb-1",children:"다른 기관에 접수하기"}),e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"한 곳에서 해결되지 않으면 다른 기관에도 접수할 수 있다."}),e.jsx("div",{className:"space-y-2",children:re.map(v=>e.jsx(ue,{agency:v,sections:oe(N,Se),onSubmitted:($e,ke)=>ve(t,$e,ke)},v.agencyId))})]})})(),Array.isArray(t.documents)&&t.documents.length>0&&e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("h3",{className:"font-bold text-gray-900 mb-2 flex items-center gap-1.5",children:[e.jsx(Be,{className:"w-4 h-4"}),"보낸 요구서"]}),e.jsx("pre",{className:"text-xs text-gray-600 whitespace-pre-wrap bg-gray-50 rounded p-3 max-h-48 overflow-y-auto",children:t.documents[t.documents.length-1].body}),e.jsxs("button",{onClick:()=>z(t.documents[t.documents.length-1].body,"요구서"),className:"mt-2 text-sm text-blue-600 flex items-center gap-1",children:[e.jsx(W,{className:"w-3.5 h-3.5"}),"복사"]})]}),e.jsxs("p",{className:"text-xs text-gray-400 flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]})]})]})}return e.jsxs("div",{className:"min-h-screen page-bg pb-[200px]",children:[F,e.jsxs("div",{className:"max-w-2xl mx-auto px-4",children:[e.jsx(Ae,{}),x===1&&e.jsxs("div",{className:"space-y-5 py-2",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"무엇을 예약하셨나요?"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:xe.map(t=>e.jsxs("button",{className:T(l.category===t.id),onClick:()=>{if(!t.ready){$.info(`${t.label}은 준비 중이다. ê³§ 열린다.`);return}j({category:t.id})},style:t.ready?void 0:{opacity:.5},children:[e.jsx("div",{className:"text-xl",children:t.icon}),e.jsx("div",{className:"text-sm font-medium text-gray-900 mt-1",children:t.label}),!t.ready&&e.jsx("div",{className:"text-[10px] text-gray-400",children:"준비 중"})]},t.id))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"어디서 예약하셨나요?"}),e.jsx("div",{className:"space-y-2",children:He.map(t=>e.jsxs("button",{className:T(l.merchantType===t.id),onClick:()=>j({merchantType:t.id}),children:[e.jsx("div",{className:"text-sm font-medium text-gray-900",children:t.label}),e.jsx("div",{className:"text-xs text-gray-500",children:t.desc})]},t.id))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-2",children:"사업자 이름"}),e.jsx("input",{type:"text",value:l.merchantName,onChange:t=>j({merchantName:t.target.value}),placeholder:"예: 트립닷컴, 대한항공",className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px] focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),x===2&&e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsx("h2",{className:"font-bold text-gray-900",children:"예약·결제 정보를 알려주ì
14„¸ìš”"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"예약번호 (선택)"}),e.jsx("input",{type:"text",value:l.bookingRef||"",onChange:t=>j({bookingRef:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]",placeholder:"PNR / 확인번호"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"결제 일시 *"}),e.jsx("input",{type:"datetime-local",value:l.paidAt||"",onChange:t=>j({paidAt:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"취소 요청 일시 *"}),e.jsx("input",{type:"datetime-local",value:l.cancelRequestedAt||"",onChange:t=>j({cancelRequestedAt:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]"})]}),se&&e.jsxs("p",{className:"text-sm text-green-700 bg-green-50 border border-green-200 rounded-lg px-3 py-2",children:["💡 ",se]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"출발일 / 체크인일"}),e.jsx("input",{type:"date",value:l.serviceDate||"",onChange:t=>j({serviceDate:t.target.value}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"결제 금액 *"}),e.jsx("input",{type:"number",inputMode:"numeric",value:l.paidAmount??"",onChange:t=>j({paidAmount:t.target.value?Number(t.target.value):void 0}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]",placeholder:"620000"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"환불받은(예정) 금액"}),e.jsx("input",{type:"number",inputMode:"numeric",value:l.refundedAmount??"",onChange:t=>j({refundedAmount:t.target.value?Number(t.target.value):void 0}),className:"w-full px-4 py-3 rounded-lg border border-gray-300 text-[16px]",placeholder:"0"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"결제수단"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:Ge.map(t=>e.jsx("button",{className:T(l.paymentMethod===t.id),onClick:()=>j({paymentMethod:t.id}),children:e.jsx("span",{className:"text-sm text-gray-900",children:t.label})},t.id))})]})]})]}),x===3&&e.jsxs("div",{className:"space-y-3 py-2",children:[e.jsx("h2",{className:"font-bold text-gray-900",children:"왜 취소하게 되셨나요?"}),e.jsx("p",{className:"text-sm text-gray-500",children:"해당하는 것을 모두 선택하세요 — 사유가 많을수록 근거도 늘어납니다."}),Ve.map(t=>{const n=l.reasons.includes(t.id);return e.jsxs("button",{className:T(n),onClick:()=>j({reasons:n?l.reasons.filter(d=>d!==t.id):[...l.reasons,t.id]}),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n?e.jsx(ne,{className:"w-4 h-4 text-blue-600 flex-shrink-0"}):e.jsx(le,{className:"w-4 h-4 text-gray-300 flex-shrink-0"}),e.jsx("span",{className:"text-sm text-gray-900",children:t.label})]}),n&&t.evidence&&e.jsxs("p",{className:"text-xs text-blue-700 mt-1.5 ml-6",children:["📎 필요 증빙: ",t.evidence]})]},t.id)})]}),x===4&&u&&e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"rounded-xl border p-5",style:{background:R[u.level].bg,borderColor:R[u.level].color+"40"},children:[e.jsx("p",{className:"font-bold text-lg",style:{color:R[u.level].color},children:R[u.level].text}),e.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["●".repeat(Math.min(Math.ceil(u.score/25),5)),"○".repeat(Math.max(5-Math.ceil(u.score/25),0)),"  ","근거 ",u.matchedRules.length,"ê±´ 발견"]}),u.estimatedRecovery!=null&&u.estimatedRecovery>0&&e.jsxs("div",{className:"mt-3 pt-3 border-t",style:{borderColor:R[u.level].color+"30"},children:[e.jsx("p",{className:"text-sm text-gray-600",children:"회수 가능 예상액"}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900",children:[u.estimatedRecovery.toLocaleStr
14ing("ko-KR"),l.currency==="KRW"?"원":` ${l.currency}`]})]})]}),u.matchedRules.map((t,n)=>e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("p",{className:"font-semibold text-gray-900 text-sm",children:["▸ 근거 ",n+1," · ",t.title]}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full flex-shrink-0 ${t.strength==="strong"?"bg-green-50 text-green-700":"bg-amber-50 text-amber-700"}`,children:t.strength==="strong"?"강":t.strength==="moderate"?"중":"약"})]}),e.jsx("p",{className:"text-sm text-gray-600 mt-1.5",children:t.userExplain}),t.legalBasis&&(t.citationUrl?e.jsxs("a",{href:t.citationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 mt-1.5 inline-flex items-center gap-1",children:["└ 근거 보기: ",t.legalBasis,e.jsx(ce,{className:"w-3 h-3"})]}):e.jsxs("p",{className:"text-xs text-gray-400 mt-1.5",children:["└ 근거: ",t.legalBasis]}))]},t.ruleId)),u.level==="none"&&e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 text-sm text-gray-700 space-y-2",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:"그래도 해볼 수 있는 것"}),e.jsx("p",{children:"· 정중한 선처 요청 — 사업자 재량 감면 사례가 있다 (다음 단계에서 요청서를 만들어 준다)"}),e.jsx("p",{children:"· 유효기간 내 재발권·일정 변경 협상"}),e.jsx("p",{children:"· 여행자보험에 가입했다면 취소 보상 항목 확인"})]}),e.jsxs("p",{className:"text-xs text-gray-400 flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]})]}),x===5&&e.jsxs("div",{className:"space-y-3 py-2",children:[e.jsx("h2",{className:"font-bold text-gray-900",children:"증빙을 준비해 주세요"}),e.jsxs("p",{className:"text-sm text-gray-500",children:['지금 없어도 괜찮다 — "나중에"로 두고 진행할 수 있다.',e.jsx("br",{}),"⚠️ 카드번호·주민번호는 가리고 준비하세요."]}),we.map(t=>{const n=ge[t]||"later";return e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-3",children:[e.jsx("p",{className:"text-sm text-gray-900 mb-2",children:t}),e.jsx("div",{className:"flex gap-2",children:[["ready","준비됨"],["later","나중에"],["na","해당없음"]].map(([d,h])=>e.jsx("button",{onClick:()=>ee(g=>({...g,[t]:d})),className:`text-xs px-3 py-1.5 rounded-full border ${n===d?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-600 border-gray-300"}`,children:h},d))})]},t)})]}),x===6&&u&&e.jsxs("div",{className:"space-y-5 py-2",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-1",children:"① 사업자에게 환불 요구서 보내기"}),e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"내용을 확인하고 자유롭게 수정하세요. 본인 명의로 보내는 문서입니다."}),e.jsx("input",{value:te,onChange:t=>B(t.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-300 text-[16px] font-medium mb-2"}),e.jsx("textarea",{value:K,onChange:t=>q(t.target.value),rows:12,className:"w-full px-3 py-2 rounded-lg border border-gray-300 text-[16px] leading-relaxed"}),e.jsxs("button",{onClick:()=>{z(`${te}
15
16${K}`,"요구서"),fe("복사")},className:"w-full mt-2 py-2.5 rounded-lg bg-blue-600 text-white text-sm font-medium flex items-center justify-center gap-1.5",children:[e.jsx(W,{className:"w-4 h-4"}),"복사하기"]}),e.jsx("p",{className:"text-xs text-gray-500 mt-1.5",children:"복사한 내용을 사업자 고객센터 이메일이나 문의 게시판에 붙여넣어 보내세요."}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"7일 안에 회신이 없으면 아래 기관 접수로 넘어가세요."})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-1",children:"② 해결되지 않으면 — 기관 접수"}),e.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"완성된 내용을 복사해 준다. 접수는 본인인증 후 본인이 한다."}),e.jsx("div",{className:"space-y-2",children:ae.filter(t=>t.automationTier==="B").map(t=>e.jsx(ue,{agency:t,sections:oe(l,u),onSubmitted:je},t.agencyId))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold text-gray-900 mb-1",children:"③ 아직 해결되지 않으셨나요?"}),e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4 space-y-2.5 text-sm",children:[ae.filter(t=>t.automationTier==="C").map(t=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-900",children:t.nameKr}),t.jurisdictionNote&&e.jsx("p",{className:"text-xs text-gray-500",children:t.jurisdictionNote})]}),t.channel?.phone?e.jsxs("a",{href:`tel:${t.channel.phone}`,className:"text-blue-600 text-xs flex items-center gap-1 flex-shrink-0",children:[e.jsx(Ie,{className:"w-3 h-3"}),t.channel.phone]}
16):t.channel?.url?e.jsxs("a",{href:t.channel.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 text-xs flex items-center gap-1 flex-shrink-0",children:["공식 안내",e.jsx(ce,{className:"w-3 h-3"})]}):null]},t.agencyId)),e.jsx("p",{className:"text-xs text-gray-500 pt-2 border-t border-gray-100",children:"※ 신청서 작성은 각 기관 안내에 따라 본인이 진행하셔야 합니다. 작성이 어려우면 대한법률구조공단(☎132) 등 공적 상담을 이용하세요."})]})]}),e.jsxs("p",{className:"text-xs text-gray-400 flex items-start gap-1.5",children:[e.jsx(I,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),E]}),w.currentUser&&f&&e.jsx("button",{onClick:()=>{r("list"),S().then(b)},className:"w-full py-3 rounded-lg border border-gray-300 text-gray-700 text-sm",children:"내 케이스로 이동 — 진행 상황을 추적할게요"})]}),x<6&&e.jsxs("div",{className:"flex gap-2 py-5",children:[x>1&&e.jsx("button",{onClick:()=>M(x-1),className:"flex-1 py-3 rounded-lg border border-gray-300 text-gray-700 text-sm",children:"이전"}),e.jsx("button",{disabled:!be,onClick:()=>{x===3&&ye(),M(x+1),window.scrollTo(0,0)},className:"flex-1 py-3 rounded-lg text-white text-sm font-medium disabled:opacity-40",style:{background:"#2563eb"},children:x===3?"진단 결과 보기":"다음"})]})]})]})}function ue({agency:s,sections:a,onSubmitted:r}){const[c,o]=m.useState(!1),[p,y]=m.useState("");return e.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-semibold text-gray-900 flex items-center gap-1.5",children:[e.jsx(Ke,{className:"w-4 h-4 text-blue-600"}),s.nameKr]}),e.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[s.jurisdictionNote||"",s.slaDays?` · 표준 처리 ${s.slaDays}일`:""]})]}),e.jsx("button",{onClick:()=>o(!c),className:"text-xs px-3 py-1.5 rounded-lg bg-blue-600 text-white flex-shrink-0",children:c?"접기":"양식 열기"})]}),c&&e.jsxs("div",{className:"mt-3 space-y-2",children:[a.map(i=>e.jsxs("div",{className:"bg-gray-50 rounded-lg p-2.5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-600",children:i.label}),e.jsxs("button",{onClick:()=>z(i.text,i.label),className:"text-xs text-blue-600 flex items-center gap-1",children:[e.jsx(W,{className:"w-3 h-3"}),"복사"]})]}),e.jsx("p",{className:"text-xs text-gray-700 whitespace-pre-wrap max-h-24 overflow-y-auto",children:i.text})]},i.label)),s.channel?.url&&e.jsxs("a",{href:s.channel.deepLink||s.channel.url,target:"_blank",rel:"noopener noreferrer",className:"block text-center py-2.5 rounded-lg border border-blue-600 text-blue-600 text-sm font-medium",children:["접수 페이지 열기 ",s.requiresIdentityVerification?"(본인인증 필요)":""]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:p,onChange:i=>y(i.target.value),placeholder:"접수번호 (선택)",className:"flex-1 px-3 py-2 rounded-lg border border-gray-300 text-[16px]"}),e.jsx("button",{onClick:()=>r(s,p),className:"px-4 py-2 rounded-lg bg-green-600 text-white text-xs font-medium",children:"접수했다"})]})]})]})}export{it as RefundHelperPage};

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.