1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visits.functions-BsFZ1OZG.js","assets/sonner-D-yLv_Jo.js","assets/index-jOKgC_H_.js"])))=>i.map(i=>d[i]); 2import{r as s,_ as X,j as e}from"./index-jOKgC_H_.js";import{u as Z,T as w,t as u}from"./sonner-D-yLv_Jo.js";import{i as ee,l as D}from"./liff-Y5tXGdX_.js";import{c as re,P as te,D as se,T as ae,R as le,a as de}from"./sakai-request.functions-C_Ve5GsR.js";const M=["æ¥","æ","ç«","æ°´","æ¨","é","å"],E="2026-08";function $(p){const m=new Date(`${p}T00:00:00+09:00`);return`${m.getMonth()+1}æ${m.getDate()}æ¥(${M[m.getDay()]})`}const ne=["大夿ãå ¥ãã¾ããããåãåãããéä¸ãã¦ãããããã¾ãã¯ä¸è¨ãã©ã¼ã ããã叿æ¥ï¼ç¬¬3叿ã¾ã§ï¼ããå ¥åãã ããã","å 容ã確èªã®ãããæ å½ãããã®ãã£ããã§é 次ãé£çµ¡ããæ¥æã確å®ããã¦ããã ãã¾ãã"];function xe(){const p=Z(re),[m,L]=s.useState(null),[a,I]=s.useState(null),[b,R]=s.useState(""),[g,U]=s.useState(""),[h,_]=s.useState(""),[f,P]=s.useState(""),[j,q]=s.useState(""),[y,F]=s.useState(""),[N,A]=s.useState(""),[v,O]=s.useState(""),[T,Y]=s.useState(""),[S,V]=s.useState(""),[d,B]=s.useState([]),[i,Q]=s.useState(""),[x,G]=s.useState(""),[k,C]=s.useState(!1),[H,W]=s.useState(!1);s.useEffect(()=>{ee().then(r=>{L(r),r?.idToken&&X(async()=>{const{recordVisit:t}=await import("./visits.functions-BsFZ1OZG.js");return{recordVisit:t}},__vite__mapDeps([0,1,2])).then(({recordVisit:t})=>{t({data:{lineIdToken:r.idToken,path:"/sakai/request"}}).catch(()=>{})})})},[]);const z=s.useMemo(()=>{const[r,t]=E.split("-").map(Number),l=new Date(Date.UTC(r,t-1,1)),n=new Date(Date.UTC(r,t,0)).getUTCDate(),c=Array.from({length:l.getUTCDay()},()=>null);for(let o=1;o<=n;o++)c.push(`${E}-${String(o).padStart(2,"0")}`);return c},[]);function J(r){B(t=>t.includes(r)?t.filter(l=>l!==r):t.length>=3?(u.error("ã叿æ¥ã¯ç¬¬3叿ã¾ã§ã§ã"),t):[...t,r])}async function K(r){if(r.preventDefault(),!!a){if(d.length===0){u.error("ã叿æ¥ã1ã¤ä»¥ä¸ãé¸ã³ãã ãã");return}C(!0);try{const t=await p({data:{requestType:a,name:b.trim(),phone:g.trim(),deliveryTiming:a==="sales"&&h||null,desiredModel:a==="sales"&&f.trim()||null,stockUrl:a==="sales"&&j.trim()||null,tradein:a==="sales"&&y||null,maker:a==="purchase"&&N.trim()||null,carModel:a==="purchase"&&v.trim()||null,carYear:a==="purchase"&&T.trim()||null,mileage:a==="purchase"&&S.trim()||null,preferredDate1:d[0],preferredDate2:d[1]??null,preferredDate3:d[2]??null,preferredTime:i||null,notes:x.trim()||null,lineIdToken:m?.idToken??null}});if(!t.ok){u.error(t.error??"éä¿¡ã«å¤±æãã¾ãã");return}try{if(D.isInClient?.()&&typeof D.sendMessages=="function"){const l=["ãBUDDICA å º ã叿æ¥ãã©ã¼ã éä¿¡å®äºã",`ãç¸è«å 容ï¼${a==="sales"?"è³¼å ¥ç¸è«":"è²·åç¸è«"}`,`ãååï¼${b.trim()}`,`é»è©±çªå·ï¼${g.trim()}`,...a==="sales"?[`ç´è»ã叿ææï¼${h||"â"}`,`ã叿è»ç¨®ï¼${f.trim()||"â"}`,`å¨åº«è»URLï¼${j.trim()||"â"}`,`ä¸åãæ»å®ï¼${y||"â"}`]:[`ã¡ã¼ã«ã¼ï¼${N.trim()}`,`è»ç¨®ï¼${v.trim()}`,`å¹´å¼ï¼${T.trim()}`,`èµ°è¡è·é¢ï¼${S.trim()}`],...d.map((n,c)=>`第${c+1}叿ï¼${$(n)}`),...i?[`ã叿æéï¼${i}`]:[],...x.trim()?[`ãç¸è«å 容ï¼${x.trim()}`]:[],"","â»ãã®æç¹ã§ã¯ãäºç´ç¢ºå®ã§ã¯ãããã¾ããã","å 容ã確èªã®ãããæ å½ããé æ¬¡ãé£çµ¡ãããã¾ãã"];await D.sendMessages([{type:"text",text:l.join(` 3`)}])}}catch(l){console.warn("[LIFF] sendMessages failed",l)}W(!0)}catch{u.error("éä¿¡ã¨ã©ã¼ãçºçãã¾ãã")}finally{C(!1)}}}return H?e.jsxs("div",{className:"min-h-screen bg-background p-6 flex items-center justify-center",children:[e.jsx(w,{}),e.jsxs("div",{className:"w-full max-w-md overflow-hidden rounded-2xl border-2 border-primary bg-card",children:[e.jsxs("div",{className:"bg-primary px-5 py-7 text-center text-primary-foreground",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-primary-foreground
3/20 text-4xl",children:"â"}),e.jsx("h1",{className:"mt-3 text-xl font-extrabold",children:"ã叿æ¥ãéä¿¡ãã¾ãã"}),e.jsx("p",{className:"mt-1 text-xs opacity-90",children:"â» ãã®æç¹ã§ã¯ãäºç´ç¢ºå®ã§ã¯ãããã¾ãã"})]}),e.jsxs("div",{className:"space-y-3 p-5 text-sm",children:[e.jsxs("div",{className:"rounded-lg border border-border p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"ãç¸è«å
容"}),e.jsx("p",{className:"font-bold",children:a==="sales"?"è³¼å
¥ç¸è«":"è²·åç¸è«"}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"ã叿æ¥"}),d.map((r,t)=>e.jsxs("p",{className:"font-bold",children:["第",t+1,"叿ï¼",$(r)]},r)),i&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"ã叿æé"}),e.jsx("p",{className:"font-bold",children:i})]})]}),e.jsx("p",{className:"font-bold",children:"æ
å½ããé æ¬¡ãé£çµ¡ãã¾ãã"})]})]})]}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(w,{}),e.jsxs("header",{className:"bg-primary px-5 py-6 text-primary-foreground",children:[e.jsx("h1",{className:"text-lg font-extrabold",children:"BUDDICA å º æ¥åºã叿æ¥ãã©ã¼ã "}),e.jsx("p",{className:"mt-1 text-xs opacity-90",children:"ãªã¼ãã³åå¾ã®è¿½å æ ã«ã¤ãã¦ãã叿æ¥ãã伺ããã¾ã"})]}
3),e.jsxs("main",{className:"mx-auto w-full max-w-md space-y-5 p-4 pb-16",children:[e.jsx("section",{className:"rounded-xl border border-border bg-card p-4 text-xs leading-relaxed",children:ne.map(r=>e.jsx("p",{className:"mb-2 last:mb-0",children:r},r))}),e.jsxs("section",{className:"rounded-xl border border-border bg-card p-4 text-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"ãæ¥ãã®å ´åã¯ãé»è©±ãã ãã"}),e.jsx("a",{href:"tel:0722002700",className:"text-lg font-extrabold text-primary underline",children:"TELï¼072-200-2700"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"ï¼9:00-18:00 / æ°´æå®ä¼ï¼"})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-bold text-primary",children:"STEP 1. ãç¸è«å
容"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{v:"sales",label:"è³¼å
¥ç¸è«"},{v:"purchase",label:"è²·åç¸è«"}].map(r=>e.jsx("button",{type:"button",onClick:()=>I(r.v),className:`rounded-lg border-2 px-3 py-4 text-sm font-bold ${a===r.v?"border-primary bg-primary text-primary-foreground":"border-border bg-card text-foreground"}`,children:r.label},r.v))})]}),a&&e.jsxs("form",{onSubmit:K,className:"space-y-5",children:[e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-bold text-primary",children:"STEP 2. ã叿æ¥ï¼ç¬¬3叿ã¾ã§ï¼"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"ãâ¯ãã®æ¥ä»ãã¿ããããé ã«ç¬¬1ã第3叿ã¨ãªãã¾ãã8æ8æ¥ã»9æ¥ã¯æºæ ãæ°´æã¯å®ä¼æ¥ã®ãã鏿ã§ãã¾ããã"}),e.jsxs("div",{className:"mt-2 rounded-lg border border-primary/30 bg-primary/5 p-2 text-xs leading-relaxed text-foreground",children:[e.jsx("p",{className:"font-bold text-primary",children:"â» 8æ8æ¥ï¼åï¼ã»9æ¥ï¼æ¥ï¼ã®ãªã¼ãã³å½æ¥ã«ã¤ãã¦"}),e.jsx("p",{className:"mt-0.5",children:"åè«ï¼äºç´ï¼æ ã¯æºæ ã¨ãªã£ã¦ããã¾ãããåè«ä»¥å¤ã®ãæ¥å ´ã¯å¯è½ã§ãããªã¼ãã³ã¤ãã³ãã«ãæ°è»½ã«ãè¶ããã ããã"})]}),e.jsxs("div",{className:"rounded-xl border border-border bg-card p-3",children:[e.jsx("p",{className:"mb-2 text-center text-sm font-bold",children:"2026å¹´8æ"}),e.jsxs("div",{className:"mb-3 flex justify-center gap-2 text-[11px] font-bold",children:[e.jsx("span",{className:"rounded-full border border-primary/40 bg-primary/10 px-2 py-1 text-primary",children:"⯠ç¸è«å¯"}),e.jsx("span",{className:"rounded-full border border-border bg-muted px-2 py-1 text-muted-foreground",children:"æºæ "}),e.jsx("span",{className:"rounded-full border border-border bg-muted px-2 py-1 text-muted-foreground",children:"å®ä¼"})]}),e.jsx("div",{className:"grid grid-cols-7 gap-1 text-[10px] text-muted-foreground",children:M.map(r=>e.jsx("div",{className:"text-center",children:r},r))}),e.jsx("div",{className:"mt-1 grid grid-cols-7 gap-1",children:z.map((r,t)=>{if(!r)return e.jsx("div",{},`e${t}`);const l=le.includes(r),n=de.includes(r),c=!n&&!l,o=d.indexOf(r);return e.jsxs("button",{type:"button",disabled:!n,onClick:()=>J(r),className:`min-h-12 rounded-md border py-1.5 text-center ${o>=0?"bg-primary text-primary-foreground":n?"border-primary/40 bg-primary/10 text-foreground":"border-border bg-muted text-muted-foreground opacity-60"}`,children:[e.jsx("span",{className:"block text-xs font-semibold leading-tight",children:Number(r.slice(8))}),e.jsx("span",{className:"block text-[10px] font-bold leading-tight",children:o>=0?`第${o+1}`:l?"æºæ ":c?"å®ä¼":"â¯"})]},r)})})]}),d.length>0&&e.jsx("ul",{className:"space-y-1 text-xs",children:d.map((r,t)=>e.jsxs("li",{children:["第",t+1,"叿ï¼",e.jsx("span",{className:"font-bold",children:$(r)})]},r))}),e.jsxs("div",{className:"pt-2",children:[e.jsx("p",{className:"mb-1 text-xs font-bold",children:"ã叿æéï¼ä»»æï¼"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:te.map(r=>e.jsx("button",{type:"button",onClick:()=>Q(t=>t===r?"":r),className:`rounded-lg border-2 px-2 py-3 text-xs font-bold ${i===r?"border-primary bg-primary text-primary-foreground":"border-border bg-card"}`,children:r},r))})]})]}),e.jsxs("section",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm font-bold text-primary",children:"STEP 3. ãå®¢æ§æ
å ±"}),e.jsx("input",{value:b,onChange:r=>R(r.target.value),placeholder:"ãååï¼æ¬åï¼ä¾ï¼å±±ç° 太
3é",autoComplete:"off",required:!0,maxLength:100,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"}),e.jsx("input",{value:g,onChange:r=>U(r.target.value),placeholder:"é»è©±çªå·",inputMode:"tel",required:!0,maxLength:20,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"}),a==="sales"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-xs font-bold",children:"ç´è»ã叿ææ"}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:se.map(r=>e.jsx("button",{type:"button",onClick:()=>_(r),className:`rounded-lg border-2 px-2 py-2 text-xs font-bold ${h===r?"border-primary bg-primary text-primary-foreground":"border-border bg-card"}`,children:r},r))})]}),e.jsx("input",{value:f,onChange:r=>P(r.target.value),placeholder:"ã叿è»ç¨®ï¼ä»»æï¼",maxLength:120,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"}),e.jsx("input",{value:j,onChange:r=>q(r.target.value),placeholder:"æ°ã«ãªã£ã¦ããå¨åº«è»URLï¼ä»»æï¼",inputMode:"url",maxLength:500,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-xs font-bold",children:"ä¸åãæ»å®ï¼ä»»æï¼"}),e.jsx("div",{className:"grid grid-cols-3 gap-2",children:ae.map(r=>e.jsx("button",{type:"button",onClick:()=>F(t=>t===r?"":r),className:`rounded-lg border-2 px-2 py-2 text-xs font-bold ${y===r?"border-primary bg-primary text-primary-foreground":"border-border bg-card"}`,children:r},r))})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("input",{value:N,onChange:r=>A(r.target.value),placeholder:"ã¡ã¼ã«ã¼ï¼ä¾ï¼ãã¨ã¿ï¼",required:!0,maxLength:60,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"}),e.jsx("input",{value:v,onChange:r=>O(r.target.value),placeholder:"è»ç¨®ï¼ä¾ï¼ã¢ã«ãã¡ã¼ãï¼",required:!0,maxLength:80,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"}),e.jsx("input",{value:T,onChange:r=>Y(r.target.value),placeholder:"å¹´å¼ï¼ä¾ï¼2019å¹´ï¼",required:!0,maxLength:20,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"}),e.jsx("input",{value:S,onChange:r=>V(r.target.value),placeholder:"èµ°è¡è·é¢ï¼ä¾ï¼45,000kmï¼",required:!0,maxLength:30,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"})]}),e.jsx("textarea",{value:x,onChange:r=>G(r.target.value),placeholder:"ãç¸è«å
容ã»ãè¦æï¼ä»»æï¼",rows:3,maxLength:1e3,className:"w-full rounded-lg border border-border bg-card px-3 py-3 text-sm"})]}),e.jsxs("section",{className:"space-y-2 rounded-xl border border-border bg-muted/50 p-4 text-xs leading-relaxed",children:[e.jsx("p",{children:"â» ãã©ã¼ã éä¿¡ã®æç¹ã§ã¯ãäºç´ç¢ºå®ã§ã¯ãããã¾ãã"}),e.jsx("p",{children:"â» æ ã«éããããããããå¸æã«æ·»ããªãå ´åããããã¾ã"})]}),e.jsx("button",{type:"submit",disabled:k,className:"w-full rounded-lg bg-primary py-4 text-sm font-extrabold text-primary-foreground disabled:opacity-50",children:k?"éä¿¡ä¸...":"ãã®å
容ã§éä¿¡ãã"})]})]})]})}export{xe as component};
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.