commit 7db9adc6dea54921165d4d113ccd151dfc990589 Author: Bkk1234 Date: Fri Nov 20 11:42:43 2026 +0700 feat: minibus passenger info landing (Vue 3 + Node/JSON API) - route Ang Thong - Pa Mok - Chum Thang Phachi, hourly 05:00-17:00 both directions - timetable, stops, fares, on-board service, notices, FAQ, operator contact - light green/white flat design tokens with measured contrast; K2D font - zero-dependency Node server: /api/overview, /api/next, static dist diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9451024 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +dist/ +.DS_Store +*.log diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..77acb82 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,52 @@ +# AGENTS.md — กติกาสำหรับ agent/นักพัฒนาที่แก้โปรเจกต์นี้ + +## หลักการ + +1. **ข้อมูลอยู่ใน `data/*.json` เท่านั้น** — component ห้าม hardcode เวลา ราคา ชื่อจุดจอด หรือเบอร์โทร +2. **backend เป็น JS ล้วน** (`server/server.mjs`) ไม่เพิ่ม dependency เว้นแต่จำเป็นจริง +3. **สัญญา API ห้ามแตก** — เพิ่มคีย์ใหม่ได้ แต่ห้ามเปลี่ยน/ลบชื่อคีย์เดิม (`direction_id`, `departure_time`, `stop_id`, `zone_id` ...) เพราะ frontend อ่านตรง ๆ +4. เปลี่ยนชื่อคีย์ = ต้องแก้พร้อมกันทั้ง `data/`, `server/`, `src/` และอัปเดต README +5. แก้คำ/ค่าที่ผู้ใช้เห็น → อัปเดต `DESIGN.md` และ README ให้ตรงกัน + +## ขั้นตอนทำงาน + +```bash +npm run api # ตรวจ API: curl http://localhost:8090/api/health +npm run dev # ตรวจ UI: http://localhost:5173 +npm run build && npm start # ตรวจของจริงที่ 8090 +node --check server/server.mjs +``` + +- ก่อน commit: `npm run build` ต้องผ่าน (dist/ ไม่เข้า git) +- หลังแก้ CSS/JS แล้วรีเฟรชไม่เห็นผล → เติม `?v=N` ตอนเปิด URL +- ตรวจ layout จริงด้วยการวัด: `document.documentElement.scrollWidth === window.innerWidth` + +## โครงสร้างข้อมูลที่ห้ามรื้อ + +``` +route.json stops[] (stop_id ต้องตรงกับ fare zones + directions.stop_ids) + directions[] (direction_id: outbound | inbound) +timetable.json days[] → directions[] → departures[{departure_time, arrival_time, seats_total, ...}] +fares.json zones[] + fare_matrix[] (อ้าง zone_id) + discounts + payment_methods +service.json vehicle / luggage / accessibility / boarding_steps / operating_rules +notices.json notices[] (type: info | warning, effective_date ISO) +faq.json faq[{question, answer}] +operator.json contact + channels[] +``` + +เวลาในตารางเป็น `HH:mm` 24 ชั่วโมง ตรงเวลาไทยเสมอ (ห้ามเก็บ timezone ในแต่ละแถว) + +## สิ่งที่ห้ามทำ + +- ห้ามใส่ shadow / gradient / emoji (ดู `DESIGN.md`) +- ห้ามย้ายข้อมูลไปฝังใน component เพื่อ "ให้ง่าย" +- ห้ามลบ `aria-*`, `scope` ของตาราง, หรือปุ่ม `aria-pressed` ในแท็บทิศทาง +- ห้าม commit `node_modules/`, `dist/`, ไฟล์ `.log` +- ห้ามใช้ `git push --force` กับ branch `main` + +## งานที่ทำค้างไว้ / ต่อยอดได้ + +- ตัวเลือกวัน (จันทร์–ศุกร์ vs เสาร์–อาทิตย์) — ปัจจุบัน `timetable.days` มีชุดเดียว `all_days` +- ที่นั่งคงเหลือรายเที่ยว (ต้องมีระบบจอง/คนขับอัปเดต) +- หน้าภาษาอังกฤษ (`route_name_en` มีอยู่แล้วใน `route.json`) +- PWA + offline timetable (แคช `/api/timetable`) diff --git a/DESIGN.md b/DESIGN.md new file mode 100644 index 0000000..72b1897 --- /dev/null +++ b/DESIGN.md @@ -0,0 +1,81 @@ +# DESIGN.md — IdealRoute (รัฐธรรมนูญการออกแบบ) + +ใช้กับทุกหน้าจอของโปรเจกต์นี้ ถ้าจะเปลี่ยนค่าตัวอย่างใด ให้แก้ที่ `src/style.css` **และ** ไฟล์นี้พร้อมกัน + +## 1. แนวคิด + +- **Flat design**: ไม่มีเงา (box-shadow) ไม่มีไล่สี (gradient) ไม่มี 3D +- **เขียวอ่อน–ขาว**: พื้นหลังเขียวอ่อน คอนเทนต์ขาว เขียวเข้มเป็นสีแบรนด์ ตัวอักษรเข้มเกือบดำ +- **อ่านจากมือถือก่อน** ผู้โดยสารส่วนใหญ่เปิดหน้านี้บนมือถือตอนยืนรอรถ +- **ข้อมูลนำการออกแบบ**: ทุก section ต้องตอบคำถามผู้โดยสารได้ 1 ข้อ (กี่โมง/เท่าไร/ขึ้นที่ไหน/ติดต่อใคร) +- **ห้ามใช้ emoji แทนไอคอน** ใช้ SVG จาก `AppIcon.vue` (ชุด Lucide) + +## 2. สี (วัดคอนทราสต์จริงแล้ว) + +| Token | ค่า | ใช้กับ | คอนทราสต์ | +|---|---|---|---| +| `--bg` | `#F5FBF7` | พื้นหลังหน้า | ตัวอักษรหลัก 14.03:1 | +| `--surface` | `#FFFFFF` | การ์ด ตาราง | 14.71:1 | +| `--surface-alt` | `#EAF7EF` | section สลับ, หัวตาราง | ข้อความรอง 6.09:1 | +| `--fg` | `#0E2E1D` | ตัวอักษรหลัก | — | +| `--muted` | `#4A6154` | คำอธิบาย ข้อความรอง | 6.71:1 บนขาว | +| `--primary` | `#17804E` | ปุ่มหลัก, แท็บ active | ขาวบนเขียว 4.96:1 | +| `--primary-strong` | `#0F6B41` | หัวข้อ, ลิงก์, ขอบโฟกัส | 6.56:1 (ขาวบนเขียว) | +| `--primary-soft` | `#E4F5EA` | ชิป, แถวไฮไลต์ | เขียวเข้มบนชิป 5.80:1 | +| `--warn` | `#8A6A00` | ประกาศผลกระทบการเดินทาง | 4.69:1 บน `#FFF6DA` | +| `--danger` | `#B3261E` | รายการที่ไม่อนุญาต | ใช้เฉพาะข้อความสั้น | + +กติกา: เพิ่มสีใหม่ต้องคำนวณคอนทราสต์ ≥ 4.5:1 สำหรับข้อความปกติ และ ≥ 3:1 สำหรับตัวอักษรใหญ่/ขอบของส่วนประกอบ + +## 3. ตัวอักษร + +| บทบาท | ค่า | +|---|---| +| ฟอนต์ | `K2D` (ฝังผ่าน `@fontsource/k2d`, subset ไทย+ละติน) น้ำหนัก 400/500/600/700 | +| เนื้อหา | 16px / line-height 1.6 | +| h1 | `clamp(2rem, 4.6vw, 3.1rem)` น้ำหนัก 700 | +| h2 | `clamp(1.5rem, 3vw, 2rem)` | +| h3 การ์ด | 1rem–1.0625rem | +| ตัวเลขเวลา | `font-variant-numeric: tabular-nums` (`.num`) | + +## 4. ระยะและเลย์เอาต์ + +- สเกล: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 px (`--space-1..8`) +- คอนเทนเนอร์กว้างสุด 1140px, padding ข้าง 20px +- เบรกพอยต์: 900px (สองคอลัมน์ → คอลัมน์เดียว), 620/520/460/420px (ปรับการ์ด/ตาราง) +- ตารางกว้างเกินจอ → `.table-wrap { overflow-x: auto }` ห้ามให้หน้าเลื่อนแนวนอน +- ระยะกดขั้นต่ำ 44×44px (ปุ่ม/แท็บใช้ `min-height: 44px`) +- `html { scroll-padding-top: 76px }` เพราะ header เป็น sticky + +## 5. องค์ประกอบหลัก + +| องค์ประกอบ | กติกา | +|---|---| +| `.card` | ขอบ 1px `--border` มุม 12px ไม่มีเงา | +| `.btn--primary` | พื้นเขียว ขาว ตัวอักษร 600 สูง ≥44px | +| `.chip` | แคปซูล พื้น `--primary-soft` ตัวอักษร `--primary-strong` | +| ตาราง `table.data` | หัวตารางพื้น `--surface-alt` เส้นคั่นล่าง 1px แถว "เที่ยวถัดไป" พื้น `--primary-soft` | +| แถบ timeline | เส้นแนวตั้ง `--border-strong` จุดปลายทางเป็นวงกลมทึบ | +| ประกาศ | ขอบซ้าย 4px เขียว (ปกติ) / `--warn` (ผลกระทบการเดินทาง) | + +## 6. การเคลื่อนไหว + +- transition 150–200ms เฉพาะสี/พื้นหลัง/transform +- ห้าม animate width/height +- `prefers-reduced-motion: reduce` → ปิด transition/animation ทั้งหมด (มีใน `style.css` แล้ว) +- ฟอร์ม/ปุ่มต้องมี `:focus-visible` กรอบ 2px `--primary-strong` offset 2px + +## 7. คำที่ใช้ (ภาษาไทย) + +- เรียกจุดในสายว่า **ต้นทาง / กลางทาง / ปลายทาง** (ไม่ใช้ "จุดเปลี่ยน") +- หลีกเลี่ยงคำอังกฤษลอยบนหน้าไทย ยกเว้นชื่อเฉพาะ (Google Maps, พร้อมเพย์ QR, LINE, CCTV, USB) +- เวลาเขียนแบบ 24 ชั่วโมง มี "น." ต่อท้ายเมื่ออยู่ในประโยค: `05:00 น.` + +## 8. Checklist ก่อนส่งงาน + +- [ ] คอนทราสต์ข้อความ ≥ 4.5:1 (วัดจาก computed style ไม่ใช่เดา) +- [ ] ไม่มี emoji, ไม่มีเงา, ไม่มี gradient +- [ ] 375px ไม่มี horizontal scroll (`scrollWidth === innerWidth`) +- [ ] ปุ่ม/แท็บ ≥ 44px สูง +- [ ] แก้ข้อมูลแล้วหน้าเว็บเปลี่ยนโดยไม่ต้องแก้ component +- [ ] `npm run build` ผ่าน และ `node --check server/server.mjs` ผ่าน diff --git a/README.md b/README.md new file mode 100644 index 0000000..998cff9 --- /dev/null +++ b/README.md @@ -0,0 +1,72 @@ +# IdealRoute — หน้าเว็บข้อมูลเดินรถ มินิบัส อ่างทอง–ป่าโมก–ชุมทางภาชี + +ต้นแบบ landing page สำหรับ **ผู้ประกอบการรถโดยสารประจำทาง** ที่ต้องการให้ผู้โดยสารหาข้อมูลเดินรถได้เอง +โดยไม่ต้องโทรถาม — sample route: อ่างทอง → ป่าโมก → สถานีรถไฟฟ้าสายสีแดง ชุมทางภาชี +ให้บริการด้วย **มินิบัสปรับอากาศล้วน** ออกทุกชั่วโมง 05:00–17:00 ทั้ง 2 ทิศทาง + +- Frontend: Vue 3 (SFC) + Vite +- Backend: Node.js ล้วน (ไม่มี dependency) อ่าน/ส่งไฟล์ JSON ใน `data/` +- ธีม: เขียวอ่อน–ขาว, flat (ไม่มีเงา/ไล่สี), ฟอนต์ K2D + +## รันในเครื่อง + +```bash +npm install +npm run api # backend http://localhost:8090 +npm run dev # frontend http://localhost:5173 (proxy /api → 8090) +``` + +โหมด production (เสิร์ฟทั้ง API และไฟล์ frontend จากพอร์ตเดียว): + +```bash +npm run build +npm start # http://localhost:8090 +``` + +## API + +| Endpoint | ข้อมูล | +|---|---| +| `GET /api/overview` | รวมทุกไฟล์ + เที่ยวถัดไป 2 ทิศทาง (หน้าเว็บเรียกตัวนี้ครั้งเดียว) | +| `GET /api/route` | เส้นทาง จุดจอด พิกัด ระยะทาง เวลาบริการ | +| `GET /api/timetable` | ตารางเดินรถ `days[] → directions[] → departures[]` | +| `GET /api/fares` | โซนค่าโดยสาร ตารางค่าโดยสาร ส่วนลด วิธีชำระเงิน | +| `GET /api/service` | ประเภทรถ สัมภาระ กฎการโดยสาร ขั้นตอนขึ้นรถ | +| `GET /api/notices` | ประกาศ/แจ้งเปลี่ยนแปลงเส้นทาง | +| `GET /api/faq` | คำถามที่พบบ่อย | +| `GET /api/operator` | ข้อมูลผู้ประกอบการ ช่องทางติดต่อ/ร้องเรียน | +| `GET /api/next?direction_id=outbound&at=14:20&count=3` | คำนวณเที่ยวถัดไป (ถ้าไม่ส่ง `at` ใช้เวลาปัจจุบันเขต Asia/Bangkok) | +| `GET /api/health` | health check | + +ไฟล์ JSON ถูกอ่านใหม่เมื่อ `mtime` เปลี่ยน → แก้ข้อมูลแล้วไม่ต้องรีสตาร์ตเซิร์ฟเวอร์ + +## ข้อมูลที่ผู้โดยสารต้องรู้ (โครงที่ใส่ไว้แล้ว) + +| กลุ่มข้อมูล | ไฟล์ | ตัวอย่างที่แสดงบนหน้า | +|---|---|---| +| เที่ยวถัดไปแบบสด | `/api/next` | การ์ด hero: ออกกี่โมง อีกกี่นาที ถึงปลายทางกี่โมง | +| ตารางเดินรถ 2 ทิศทาง | `timetable.json` | 13 เที่ยว/ทิศทาง ไฮไลต์เที่ยวถัดไป | +| จุดจอด + แลนด์มาร์ก | `route.json` | timeline 6 จุดจอด + ลิงก์ Google Maps | +| ค่าโดยสาร/ส่วนลด/ชำระเงิน | `fares.json` | ตารางโซน 15–40 บาท, ส่วนลด 2 บาท, พร้อมเพย์ QR | +| ประเภทรถและบริการ | `service.json` | 14 ที่นั่ง ไม่รับยืน, สัมภาระ, ผู้สูงอายุ/รถเข็น | +| ขั้นตอนขึ้นรถ | `service.json` | 4 ขั้นตอน ตั้งแต่ดูป้ายจนกดออด | +| ประกาศ/ทางอ้อม/วันหยุด | `notices.json` | การ์ดประกาศ + วันที่เริ่มมีผล | +| คำถามที่พบบ่อย | `faq.json` | 6 ข้อ (รถเต็มทำอย่างไร, เด็กเล็ก, ของหาย) | +| ผู้ประกอบการ + ร้องเรียน | `operator.json` | สายด่วน, LINE, ของหาย 30 วัน, SLA 7 วัน | + +## โครงสร้างโปรเจกต์ + +``` +data/ ← ข้อมูลทั้งหมด (แก้ที่นี่ ไม่ต้องแตะ Vue) +server/server.mjs ← API + static server (Node ล้วน) +src/App.vue ← โหลดข้อมูล + ประกอบ section +src/components/ ← SiteHeader, HeroSection, RouteStops, TimetableSection, + FaresSection, ServiceSection, NoticesSection, + FaqSection, ContactSection, SiteFooter, AppIcon +src/style.css ← design tokens (สี/ระยะ/ตัวอักษร) — ดู DESIGN.md +``` + +## หมายเหตุ + +ข้อมูลผู้ประกอบการ ค่าโดยสาร และพิกัดจุดจอดเป็น **ข้อมูลตัวอย่างสำหรับต้นแบบ** +ไม่ได้อ้างอิงผู้ให้บริการจริง ตัวอักษร K2D (SIL OFL) · ไอคอนจากชุด Lucide (ISC) diff --git a/data/faq.json b/data/faq.json new file mode 100644 index 0000000..27ddb0c --- /dev/null +++ b/data/faq.json @@ -0,0 +1,28 @@ +{ + "faq": [ + { + "question": "รถออกทุกกี่นาที และเที่ยวสุดท้ายกี่โมง", + "answer": "ออกทุกชั่วโมงตรงเวลา (05:00, 06:00 … 17:00) ทั้ง 2 ทิศทาง เที่ยวสุดท้าย 17:00 ถึงปลายทางประมาณ 17:55" + }, + { + "question": "ถ้ารถเต็มต้องรอนานแค่ไหน", + "answer": "รอบถัดไปอีก 60 นาที · มินิบัสไม่มีที่ยืนจึงไม่ขายตั๋วเกิน 14 ที่นั่ง" + }, + { + "question": "จ่ายค่าโดยสารอย่างไรได้บ้าง", + "answer": "เงินสด (ไม่มีเงินทอน), พร้อมเพย์ QR และบัตรรายเดือน 40 เที่ยว 1,200 บาท" + }, + { + "question": "จากสถานีชุมทางภาชี เดินต่อไปรถไฟฟ้าสายสีแดงอย่างไร", + "answer": "จุดจอดอยู่ทางออกที่ 2 ระยะเดิน 120 เมตรถึงชานชาลา มีทางเดินมีหลังคาตลอด" + }, + { + "question": "เด็กเล็กคิดค่าโดยสารไหม", + "answer": "เด็กอายุต่ำกว่า 5 ปี หรือสูงไม่เกิน 100 ซม. นั่งตักผู้ปกครอง ไม่คิดค่าโดยสาร 1 คน/ผู้ใหญ่ 1 คน" + }, + { + "question": "ลืมของไว้บนรถ ทำอย่างไร", + "answer": "โทรสายด่วน 081-234-5678 ภายใน 24 ชั่วโมง แจ้งเวลาเที่ยวและที่นั่ง ของจะเก็บไว้ที่ต้นทางอ่างทอง 30 วัน" + } + ] +} diff --git a/data/fares.json b/data/fares.json new file mode 100644 index 0000000..c1dffdc --- /dev/null +++ b/data/fares.json @@ -0,0 +1,92 @@ +{ + "currency": "THB", + "zones": [ + { + "zone_id": "zone_angthong", + "name": "ในเมืองอ่างทอง", + "stop_ids": [ + "stop_angthong_bus_terminal", + "stop_angthong_hospital" + ] + }, + { + "zone_id": "zone_pamok", + "name": "บ้านอิฐ – ป่าโมก", + "stop_ids": [ + "stop_ban_ith_market", + "stop_pamok_market", + "stop_wat_pamok" + ] + }, + { + "zone_id": "zone_phachi", + "name": "ชุมทางภาชี", + "stop_ids": [ + "stop_phachi_redline" + ] + } + ], + "fare_matrix": [ + { + "from_zone_id": "zone_angthong", + "to_zone_id": "zone_angthong", + "fare": 15, + "examples": "สถานีขนส่ง ↔ โรงพยาบาลอ่างทอง" + }, + { + "from_zone_id": "zone_angthong", + "to_zone_id": "zone_pamok", + "fare": 25, + "examples": "สถานีขนส่ง ↔ ตลาดป่าโมก, วัดป่าโมก" + }, + { + "from_zone_id": "zone_angthong", + "to_zone_id": "zone_phachi", + "fare": 40, + "examples": "สถานีขนส่ง ↔ สถานีชุมทางภาชี (ตลอดสาย)" + }, + { + "from_zone_id": "zone_pamok", + "to_zone_id": "zone_pamok", + "fare": 15, + "examples": "ตลาดป่าโมก ↔ วัดป่าโมก" + }, + { + "from_zone_id": "zone_pamok", + "to_zone_id": "zone_phachi", + "fare": 25, + "examples": "ตลาดป่าโมก ↔ สถานีชุมทางภาชี" + } + ], + "discounts": [ + { + "group": "นักเรียน นักศึกษา", + "discount_baht": 2, + "condition": "แสดงบัตรนักเรียน/นักศึกษาตัวจริงทุกครั้งที่ขึ้นรถ" + }, + { + "group": "ผู้สูงอายุ 60 ปีขึ้นไป", + "discount_baht": 2, + "condition": "แสดงบัตรประชาชน" + }, + { + "group": "พระภิกษุ สามเณร", + "discount_baht": 2, + "condition": "แสดงบัตรประจำตัว" + } + ], + "payment_methods": [ + { + "method": "เงินสด", + "detail": "จ่ายกับพนักงานเก็บค่าโดยสารบนรถ · ไม่มีเงินทอน แนะนำเตรียมเงินให้พอดี" + }, + { + "method": "พร้อมเพย์ QR", + "detail": "สแกนที่จุดเก็บค่าโดยสาร · พร้อมเพย์ 084-xxx-xxxx" + }, + { + "method": "บัตรโดยสารรายเดือน", + "detail": "40 เที่ยว 1,200 บาท ใช้ได้ทั้ง 2 ทิศทาง ติดต่อที่ต้นทาง" + } + ] +} diff --git a/data/notices.json b/data/notices.json new file mode 100644 index 0000000..edd3431 --- /dev/null +++ b/data/notices.json @@ -0,0 +1,28 @@ +{ + "notices": [ + { + "notice_id": "n-2026-11-01", + "type": "info", + "title": "เปิดเดินรถเที่ยวเช้า 05:00 เพิ่มฝั่งภาชี", + "body": "ตั้งแต่ 1 พ.ย. 2569 เที่ยว 05:00 ขากลับ (ภาชี → อ่างทอง) เปิดให้บริการตามกำหนดเดิม พร้อมรถสำรอง 1 คัน เผื่อผู้โดยสารเต็ม", + "effective_date": "2026-11-01", + "pinned": true + }, + { + "notice_id": "n-2026-11-12", + "type": "warning", + "title": "เส้นทางอ้อมช่วงเทศกาล ตลาดป่าโมก", + "body": "ช่วงงานประจำปีวัดป่าโมก (12–18 พ.ย.) รถไม่เข้าจุดจอดหน้าตลาดป่าโมก ให้ขึ้น–ลงที่ ป้อมตำรวจป่าโมกแทน ระยะทางเดินประมาณ 150 เมตร", + "effective_date": "2026-11-12", + "pinned": true + }, + { + "notice_id": "n-2026-10-20", + "type": "info", + "title": "รับชำระด้วยพร้อมเพย์ QR ทุกคัน", + "body": "ติดตั้ง QR พร้อมเพย์ครบทั้ง 6 คันแล้ว สแกนจ่ายได้ไม่ต้องเตรียมเงินสด", + "effective_date": "2026-10-20", + "pinned": false + } + ] +} diff --git a/data/operator.json b/data/operator.json new file mode 100644 index 0000000..5bdb1f0 --- /dev/null +++ b/data/operator.json @@ -0,0 +1,28 @@ +{ + "operator_name": "บริษัท อ่างทอง–ป่าโมก–ภาชี มินิบัส จำกัด", + "operator_short_name": "มินิบัส อ่างทอง–ภาชี", + "license_number": "ใบอนุญาตประกอบการขนส่งประจำทาง อย. 41/2569 (ข้อมูลตัวอย่าง)", + "fleet_size": 6, + "founded_year": 2564, + "contact": { + "hotline": "081-234-5678", + "hotline_hours": "05:00–18:00 ทุกวัน", + "line_id": "@atpcmbus", + "email": "info@atpcmbus.example", + "address": "199/9 ถ.เทศบาล 2 ต.ตลาดหลวง อ.เมืองอ่างทอง จ.อ่างทอง 14000" + }, + "channels": [ + { + "purpose": "สอบถามเที่ยวรถ / รถล่าช้า", + "channel": "สายด่วน 081-234-5678" + }, + { + "purpose": "ของหาย / ลืมของบนรถ", + "channel": "สายด่วน 081-234-5678 ต่อ 2 · เก็บของ 30 วัน" + }, + { + "purpose": "ร้องเรียนการให้บริการ", + "channel": "แบบฟอร์มร้องเรียนที่ต้นทาง หรือ LINE @atpcmbus · ตอบกลับภายใน 7 วันทำการ" + } + ] +} diff --git a/data/route.json b/data/route.json new file mode 100644 index 0000000..bf334db --- /dev/null +++ b/data/route.json @@ -0,0 +1,107 @@ +{ + "route_id": "angthong-pamok-phachi", + "route_name": "อ่างทอง – ป่าโมก – ชุมทางภาชี", + "route_name_en": "Ang Thong – Pa Mok – Chum Thang Phachi", + "service_model": "มินิบัสล้วนทุกเที่ยว (ไม่มีรถโดยสารขนาดใหญ่)", + "service_hours": { + "first_departure": "05:00", + "last_departure": "17:00", + "headway_minutes": 60, + "trips_per_direction_per_day": 13, + "trips_per_day_total": 26, + "service_days": "ทุกวัน รวมวันหยุดนักขัตฤกษ์" + }, + "journey": { + "distance_km": 30.5, + "duration_minutes": 55, + "note": "เวลาเดินทางอาจคลาดเคลื่อน 5–10 นาทีตามสภาพจราจร" + }, + "stops": [ + { + "stop_id": "stop_angthong_bus_terminal", + "name": "สถานีขนส่งผู้โดยสารจังหวัดอ่างทอง", + "landmark": "จุดจอดหลัก ต้นทาง อยู่ชานชาลาที่ 3", + "zone_id": "zone_angthong", + "distance_from_origin_km": 0.0, + "latitude": 14.5892, + "longitude": 100.4548 + }, + { + "stop_id": "stop_angthong_hospital", + "name": "โรงพยาบาลอ่างทอง", + "landmark": "หน้าประตูทางเข้า ผู้ป่วยนอก", + "zone_id": "zone_angthong", + "distance_from_origin_km": 1.2, + "latitude": 14.5941, + "longitude": 100.462 + }, + { + "stop_id": "stop_ban_ith_market", + "name": "ตลาดบ้านอิฐ", + "landmark": "ฝั่งเดียวกับป้อมตำรวจบ้านอิฐ", + "zone_id": "zone_pamok", + "distance_from_origin_km": 6.0, + "latitude": 14.556, + "longitude": 100.462 + }, + { + "stop_id": "stop_pamok_market", + "name": "ตลาดป่าโมก", + "landmark": "หน้าโรงพยาบาลป่าโมก", + "zone_id": "zone_pamok", + "distance_from_origin_km": 11.5, + "latitude": 14.4903, + "longitude": 100.4492 + }, + { + "stop_id": "stop_wat_pamok", + "name": "วัดป่าโมกวรวิหาร", + "landmark": "ประตูทางเข้าวัด ฝั่งแม่น้ำน้อย", + "zone_id": "zone_pamok", + "distance_from_origin_km": 13.0, + "latitude": 14.4836, + "longitude": 100.4426 + }, + { + "stop_id": "stop_phachi_redline", + "name": "สถานีรถไฟฟ้าสายสีแดง ชุมทางภาชี", + "landmark": "ทางออกที่ 2 ฝั่งลานจอดรถ ปลายทาง", + "zone_id": "zone_phachi", + "distance_from_origin_km": 30.5, + "latitude": 14.4494, + "longitude": 100.5753 + } + ], + "directions": [ + { + "direction_id": "outbound", + "name": "อ่างทอง → ชุมทางภาชี", + "name_short": "ขาไป ภาชี", + "origin_stop_id": "stop_angthong_bus_terminal", + "destination_stop_id": "stop_phachi_redline", + "stop_ids": [ + "stop_angthong_bus_terminal", + "stop_angthong_hospital", + "stop_ban_ith_market", + "stop_pamok_market", + "stop_wat_pamok", + "stop_phachi_redline" + ] + }, + { + "direction_id": "inbound", + "name": "ชุมทางภาชี → อ่างทอง", + "name_short": "ขากลับ อ่างทอง", + "origin_stop_id": "stop_phachi_redline", + "destination_stop_id": "stop_angthong_bus_terminal", + "stop_ids": [ + "stop_phachi_redline", + "stop_wat_pamok", + "stop_pamok_market", + "stop_ban_ith_market", + "stop_angthong_hospital", + "stop_angthong_bus_terminal" + ] + } + ] +} diff --git a/data/service.json b/data/service.json new file mode 100644 index 0000000..0c6396d --- /dev/null +++ b/data/service.json @@ -0,0 +1,60 @@ +{ + "vehicle": { + "type": "minibus", + "class": "มินิบัสปรับอากาศ", + "fleet_size": 6, + "seats_total": 14, + "standing_allowed": false, + "vehicle_age_years_max": 5, + "amenities": [ + "แอร์", + "เข็มขัดนิรภัยทุกที่นั่ง", + "ช่อง USB ชาร์จมือถือ", + "ชั้นวางสัมภาระเหนือศีรษะ", + "กล้อง CCTV" + ] + }, + "luggage": { + "hand_carry": "ถือขึ้นรถได้ไม่คิดเงิน", + "size_limit": "ไม่เกิน 2 ชิ้น/คน และต้องวางบนตักหรือใต้เบาะ", + "not_allowed": [ + "ของมีกลิ่นแรง", + "สัตว์เลี้ยง (ยกเว้นสุนัขนำทาง)", + "วัตถุไวไฟ", + "ของที่กีดขวางทางเดิน" + ] + }, + "accessibility": [ + "พื้นที่เก็บรถเข็นพับได้ 1 คัน", + "พนักงานช่วยยกของขึ้น–ลงรถ", + "เบาะแถวหน้า 2 ที่นั่งสำรองสำหรับผู้สูงอายุ/หญิงตั้งครรภ์" + ], + "boarding_steps": [ + { + "step": 1, + "title": "ตรวจสอบทิศทางก่อนขึ้น", + "detail": "ป้ายหน้าและข้างรถระบุปลายทาง อ่างทอง หรือ ชุมทางภาชี" + }, + { + "step": 2, + "title": "รอที่จุดจอดที่กำหนด", + "detail": "รถไม่จอดรับกลางถนน ยกเว้นจุดที่ทำเครื่องหมายไว้" + }, + { + "step": 3, + "title": "ชำระค่าโดยสารบนรถ", + "detail": "บอกจุดหมายกับพนักงาน เก็บตั๋วไว้จนถึงปลายทาง" + }, + { + "step": 4, + "title": "กดออด/บอกก่อนถึงจุดลง", + "detail": "แจ้งล่วงหน้าอย่างน้อย 1 จุดจอด" + } + ], + "operating_rules": [ + "ไม่รับยืน ไม่วิ่งเกิน 14 ที่นั่ง", + "ไม่สูบบุหรี่และไม่ดื่มแอลกอฮอล์บนรถ", + "ความเร็วไม่เกิน 80 กม./ชม.", + "จอดรับ–ส่งเฉพาะจุดจอดที่กำหนด" + ] +} diff --git a/data/timetable.json b/data/timetable.json new file mode 100644 index 0000000..8e67a84 --- /dev/null +++ b/data/timetable.json @@ -0,0 +1,286 @@ +{ + "service_mode": "minibus", + "updated_at": "2026-11-20", + "remark": "รถออกทุกชั่วโมงตรงเวลา ทั้ง 2 ทิศทาง · ไม่มีที่ยืน · ถ้ารถเต็มรอบนั้น ผู้โดยสารใช้รอบถัดไป (60 นาที)", + "days": [ + { + "day_type": "all_days", + "label": "ทุกวัน (จันทร์–อาทิตย์ และวันหยุดนักขัตฤกษ์)", + "headway_minutes": 60, + "directions": [ + { + "direction_id": "outbound", + "name": "อ่างทอง → ชุมทางภาชี", + "departures": [ + { + "departure_time": "05:00", + "arrival_time": "05:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "เที่ยวแรกของวัน" + }, + { + "departure_time": "06:00", + "arrival_time": "06:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "07:00", + "arrival_time": "07:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "08:00", + "arrival_time": "08:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "09:00", + "arrival_time": "09:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "10:00", + "arrival_time": "10:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "11:00", + "arrival_time": "11:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "12:00", + "arrival_time": "12:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "13:00", + "arrival_time": "13:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "14:00", + "arrival_time": "14:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "15:00", + "arrival_time": "15:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "16:00", + "arrival_time": "16:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "17:00", + "arrival_time": "17:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "เที่ยวสุดท้ายของวัน" + } + ] + }, + { + "direction_id": "inbound", + "name": "ชุมทางภาชี → อ่างทอง", + "departures": [ + { + "departure_time": "05:00", + "arrival_time": "05:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "เที่ยวแรกของวัน" + }, + { + "departure_time": "06:00", + "arrival_time": "06:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "07:00", + "arrival_time": "07:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "08:00", + "arrival_time": "08:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "09:00", + "arrival_time": "09:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "10:00", + "arrival_time": "10:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "11:00", + "arrival_time": "11:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "12:00", + "arrival_time": "12:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "13:00", + "arrival_time": "13:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "14:00", + "arrival_time": "14:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "15:00", + "arrival_time": "15:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "16:00", + "arrival_time": "16:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "" + }, + { + "departure_time": "17:00", + "arrival_time": "17:55", + "vehicle_type": "minibus", + "vehicle_class": "มินิบัสปรับอากาศ 14 ที่นั่ง", + "seats_total": 14, + "standing_allowed": false, + "fare_to_terminus": 40, + "note": "เที่ยวสุดท้ายของวัน" + } + ] + } + ] + } + ] +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..4c187a1 --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + + มินิบัส อ่างทอง–ป่าโมก–ชุมทางภาชี | ตารางเดินรถ ค่าโดยสาร จุดจอด + + + + + +
+ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..669ec40 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1347 @@ +{ + "name": "idealroute", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "idealroute", + "version": "1.0.0", + "dependencies": { + "@fontsource/k2d": "^5.1.1", + "vue": "^3.5.13" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.2.1", + "vite": "^6.0.7" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.14.tgz", + "integrity": "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.14.tgz", + "integrity": "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.14" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.14.tgz", + "integrity": "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.14", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@fontsource/k2d": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@fontsource/k2d/-/k2d-5.3.0.tgz", + "integrity": "sha512-S+QjM4G/5oxzad6FjWUTkEQDeAR1jv2fdvLY8MKdAgU+zqs772ZECGg1GhgBxHRiFDgnK4JsbsJtdmmkW0mRAA==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.68.7.tgz", + "integrity": "sha512-ZL7MgOeMUiBum1bjzzyBotE3DuHVz+UUxcDVlLL7gpdhDM4RpjG4bZOIly7ensIcXw9jhWl7HTIIQ9KsgjykGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.68.7.tgz", + "integrity": "sha512-cKZ2Hz/xt5DLY/vdUmMXEn3gnjLgwdeB/npHagbdTljLvBE6b/xKcPCcRWTiT0pHeVf8akl5Cb9K7ylRxbtHng==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.68.7.tgz", + "integrity": "sha512-P9vs1uCC2drepKKuiXrhY+r7ry/jtDCrBS8SUCYm2Rr7rVTR9eFH6XVAmD9TdfYFlDgRe5r1eH8tLQVuz+l/VA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.68.7.tgz", + "integrity": "sha512-Lgu2AV7jbOTNNhkQ/OurNm7Snqu1Ux/3y7k8q47fbpPa3q63aIzKKp1xFzax5KH4pcdUzbnX/riuFsxKflsF+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.68.7.tgz", + "integrity": "sha512-wKo6rOzla+/3rN8QBqTgcrsQMfyqwa3y14TvCTotLLib/ACWTxX1zWDTYze90s2RWtYiSfTlavHLmZv0Jsafrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.68.7.tgz", + "integrity": "sha512-vAeCwbFyEu/vBt9O/uHCHJSvwtOpTSssnM/PoZgn8rmvAkS+9ixaUfJZ2IP3ltom+rvpuQQEIEqltPY7qhC9lQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.68.7.tgz", + "integrity": "sha512-HvjSxOKI+6Si4ytmaoCEpjwDMrH/1s0uWeTAhdE5oXY8/RMI92hCePI/psZuJtY5EHWoT7MfyvTz0HBDZb1ZwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.68.7.tgz", + "integrity": "sha512-nz/Eu1sag3w5gPiKLJhAbKa4D9hUUJpDc9XzKXxGNHZqwgT2AbuVS2e4k9CIoLQp5dPhSN9ntiEVuz2jTzu1Gg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.68.7.tgz", + "integrity": "sha512-05CEv2G/kI261A1WQBZL8gx6xXULjPfVnTKAkfnV/0uqHeLo+dNEOeUzMaiK/HDGR0Z1Nn7KJjm/34bNbNcfTA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.68.7.tgz", + "integrity": "sha512-wrqk3EkxQt98lTdiYhjcaWmFHwvKiSgHFi7XmPTSF4X8+uGUTBOAc0CaynEvpUhBgkPRbwASrYoU/5uJPF+LFA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.68.7.tgz", + "integrity": "sha512-DnuEUWvzeSxHxzu5lvrN+I/UzrcQkR/fQ4Bibetdp73Rf7aP0XgFpalSDuHmVWsCLETE+Lrl3GVOqIvFP7rcjw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.68.7.tgz", + "integrity": "sha512-n0sr2s+rzVw8ntRucOxGhWeJ9lEl9KxCRzF3RmnZLE/tRnfKiloLuK8UqWrKFqVigEAh0IkRkPz5LVaV9/ZfvA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.68.7.tgz", + "integrity": "sha512-qDVJyMCbh7ekjt1kM9CZsyCFZvv5UW1QTIx3YfJ/gh8LkqpoPNpl9dCeYeOa+bsDOGTWZiMG2riXuoFSRISimQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.68.7.tgz", + "integrity": "sha512-GiIOHHIzgpMoR5DT1pA1b9qMk5i0Ngg2FRj4D6XFSBC8e/axHuIdB7K/OBozO2RtCVAMnH1rXcuJrGScg+bvzA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.68.7.tgz", + "integrity": "sha512-B132V2fwDl7UGLhvK6s3Ay7eNQ4dmDSDgsBm/Wwbz+Wgnunz0le4R2wzDp6TL5ExMu3MC1auJIrVtk2gOyxbyw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.68.7.tgz", + "integrity": "sha512-3NueHQilbssjxgJMx9hXBV+U5keb3CBzmW5WhoBG3iSLFcmz9U2FVoG4MUYpZoZ+KSNMQPN2AA79dTxlEF0VxQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.68.7.tgz", + "integrity": "sha512-8XRwbf76oAF1zZzg6OT8EY3swvCptZnLmiqMgO5+STyhTZ9s7rXa+tY8jESZW9IDyKACcVBGqa/RACDaLzRVjQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.68.7.tgz", + "integrity": "sha512-pvqqfjNdxVLvmovH681K5cPIL9DXj5n1RROaa0vb9JrtHddiScLrkHPRKj5flTKHF1M7xvRy0SS2yTRIc2TO0Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.68.7.tgz", + "integrity": "sha512-rsTjTf5HAm6F4sI6uUfJf2pc+7AWBKxgc2RveGvwB2OvVa1GezSSCDD1rtXPuFhcg3itPv7iHgcZsq/RwWvJ4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.68.7.tgz", + "integrity": "sha512-VNLvsYMD5+zLCi5SohwDdL8PpicC9PnArLwyMJXXUcAduzrM3k9aZT9XiHw+mn5dOWr3UEyfyqJbOvxwJ2fCWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.68.7.tgz", + "integrity": "sha512-7aOjdahkwiECWWOmjAemPd21yeQ18TW59DUiLWttzolMe5tDwHyBhlOfmxRUHOQnepTNkZ2Qwp1T6LxFZ5v7yQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.68.7.tgz", + "integrity": "sha512-BnNkTwE4FMCAoz3UYiJ6D6Y3pGozYIYZ2W+onH64uhiTI2iwD3KOaNSlkuHYfupZVemls3YTlvbPnuKwHsraiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.68.7.tgz", + "integrity": "sha512-OH8tGWsJcRW6Vn0dmndyWJGdQa46bH2/2/PVfleBGUWuBd5/HVkIvw2UslgBwUZdtV78bJaoCNBmYI5+bcTJ4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.68.7.tgz", + "integrity": "sha512-SpYx5X9+2JOF3hXe1cRaiFn562h4AMJhfgxkyHyiuh9dJ7PanPm7FTp8GJReSbS9N+TfjRiBbKacVk1g35kKxg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.68.7.tgz", + "integrity": "sha512-0ncKtQ55fqElV9Sk4cZ/4tiXVGlWxaH5PvDOlx1Sx8GuHIpSWgYrTcyrO51JnVFfy7LvAJiffkEg63ZHKwTMag==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.68.7.tgz", + "integrity": "sha512-XY9DYHO5UxxVR8G6AErXDlccQmDpvGTLgKHFpvkgsyjwG/PrQuInRjQQfpEzBRuT+bhBtwfS8yDe9sPhVcq/9A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz", + "integrity": "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.45.tgz", + "integrity": "sha512-XGHJrM6ufZARAc/w+tyOswStw9tdKiqCKBScI4gGaNxD+aaGu/HQWgKJ+JItjRLPqenQ7iE7G8AJC7T5ew1p+g==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.12", + "@vue/shared": "3.5.45", + "entities": "^7.0.1", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.45.tgz", + "integrity": "sha512-LbP2d19GSOYGPmvMBBCVJVlv7TKtjM1Cfeyu3cYia720pknZP+1cLX7H5MVatvruT6MuJhiPuNbQBW/MDn/EwA==", + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.45", + "@vue/shared": "3.5.45" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.45.tgz", + "integrity": "sha512-MKFjb2UX0M/l/jhfzqMLrI8VM4pfvFKG3pqFZkSZFHRLtNld/O4RtUPZFWSwhro/14qP88UQEkWzHxAZAQ0tsw==", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.12", + "@vue/compiler-core": "3.5.45", + "@vue/compiler-dom": "3.5.45", + "@vue/compiler-ssr": "3.5.45", + "@vue/shared": "3.5.45", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.21", + "postcss": "^8.5.32", + "source-map-js": "^1.2.2" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.45.tgz", + "integrity": "sha512-RF5sbZOfYz5AK00tOJUn2PwFXR2fS1u2HVzI8D9VF9rGAFxuGBqg2bB1kJ3ZHMprqSltXnT9MZE1IsqjSM8oew==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.45", + "@vue/shared": "3.5.45" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.45.tgz", + "integrity": "sha512-WqkyubNWpI4OYBOipSrjIssMdJO8K1i9Zts/Wm8Er10/0msOEwCyWWWvZnAI7WW3kQsTong6DJp8Cbb+vd4cPA==", + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.45" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.45.tgz", + "integrity": "sha512-bzIO3+FABjpj85uIKSc+Qnj36/sxDNI3tcH9i6w6xKA1k6e0ejv0G0jMCfeJBvK3yGL5XbJ3DMZj+ClqyCHFYw==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.45", + "@vue/shared": "3.5.45" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.45.tgz", + "integrity": "sha512-ZvRTFMDgfqTDYWvJfoVpQTJx1RN5M6l7Pyd6wfdY2NaXzbPQVh9ezeQYFbNPP6bIcRVn2SqSSR25N/jSW69BFw==", + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.45", + "@vue/runtime-core": "3.5.45", + "@vue/shared": "3.5.45", + "csstype": "^3.2.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.45.tgz", + "integrity": "sha512-1fNXUHhhsWf4EVL4XixbGBU5mKdiIXJAB82feHRTyPPo6ZUEYWIJuEeUl3mVV6QDBp50HJOX4obLhxYXlrjrzA==", + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.45", + "@vue/runtime-dom": "3.5.45", + "@vue/shared": "3.5.45" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.45.tgz", + "integrity": "sha512-ue9fgHmVNPlP7iW3+cxoBX/Cnlw53dHlVSw0JKGY6z1lObg8pHoj928M2nzG4/yVsMZ3NaRZ2s2z61uC16NDwQ==", + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.4.tgz", + "integrity": "sha512-PoKaoPzQapnEoqUSnHx1u6W6ku8CVEgKsnpmmzU3m1nwkidpPBQ8V/Zq2+bWNrsOKoKLwTGdbx6xF7BXP1zLVQ==", + "license": "MIT" + }, + "node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.68.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.7.tgz", + "integrity": "sha512-CxhzUIc+ocxPAWxHuff+PAluoW1otD6dHqqPK2h2Q38WA1VYk+3gizX6NEg5t2a8yNGQaiHM1R7V+qdwWuvp5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.10" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.68.7", + "@rollup/rollup-android-arm64": "4.68.7", + "@rollup/rollup-android-x64": "4.68.7", + "@rollup/rollup-darwin-arm64": "4.68.7", + "@rollup/rollup-darwin-x64": "4.68.7", + "@rollup/rollup-freebsd-arm64": "4.68.7", + "@rollup/rollup-freebsd-x64": "4.68.7", + "@rollup/rollup-linux-arm-gnueabihf": "4.68.7", + "@rollup/rollup-linux-arm-musleabihf": "4.68.7", + "@rollup/rollup-linux-arm64-gnu": "4.68.7", + "@rollup/rollup-linux-arm64-musl": "4.68.7", + "@rollup/rollup-linux-loong64-gnu": "4.68.7", + "@rollup/rollup-linux-loong64-musl": "4.68.7", + "@rollup/rollup-linux-ppc64-gnu": "4.68.7", + "@rollup/rollup-linux-ppc64-musl": "4.68.7", + "@rollup/rollup-linux-riscv64-gnu": "4.68.7", + "@rollup/rollup-linux-riscv64-musl": "4.68.7", + "@rollup/rollup-linux-s390x-gnu": "4.68.7", + "@rollup/rollup-linux-x64-gnu": "4.68.7", + "@rollup/rollup-linux-x64-musl": "4.68.7", + "@rollup/rollup-openbsd-x64": "4.68.7", + "@rollup/rollup-openharmony-arm64": "4.68.7", + "@rollup/rollup-win32-arm64-msvc": "4.68.7", + "@rollup/rollup-win32-ia32-msvc": "4.68.7", + "@rollup/rollup-win32-x64-gnu": "4.68.7", + "@rollup/rollup-win32-x64-msvc": "4.68.7", + "fsevents": "~2.3.2" + } + }, + "node_modules/source-map-js": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/vite": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.6.tgz", + "integrity": "sha512-RtsraAwEG68idOA6iUOoIpOlcSKROnf815aIq9qHTSrDNpLoBrBa12suyfcEd8qn0xwOVQI1Yhm1GbmTjF600A==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vue": { + "version": "3.5.45", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.45.tgz", + "integrity": "sha512-3cvsib8m9c0vB24+MDKsgcW4+Da4xaBl9Z/5Tbm2pmSIsRPxcil4cdXjXlVsmJ2g64XJo5h+IRd7rsdGT9pZaw==", + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.45", + "@vue/compiler-sfc": "3.5.45", + "@vue/runtime-dom": "3.5.45", + "@vue/server-renderer": "3.5.45", + "@vue/shared": "3.5.45" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..118065c --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "idealroute", + "private": true, + "version": "1.0.0", + "type": "module", + "description": "Landing page ผู้ประกอบการมินิบัส อ่างทอง–ป่าโมก–ชุมทางภาชี (Vue 3 frontend + Node/JSON backend)", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "api": "node server/server.mjs", + "start": "node server/server.mjs" + }, + "dependencies": { + "@fontsource/k2d": "^5.1.1", + "vue": "^3.5.13" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.2.1", + "vite": "^6.0.7" + } +} diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..3aef476 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/server/server.mjs b/server/server.mjs new file mode 100644 index 0000000..444e517 --- /dev/null +++ b/server/server.mjs @@ -0,0 +1,156 @@ +// Backend: Node.js (ไม่มี dependency) + ไฟล์ JSON ใน data/ +// รัน: node server/server.mjs → http://localhost:8090 +// dev: npm run dev (Vite 5173 proxy /api → 8090) +import { createServer } from 'node:http' +import { readFile, stat } from 'node:fs/promises' +import { existsSync, statSync } from 'node:fs' +import { extname, join, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' + +const ROOT = resolve(fileURLToPath(new URL('..', import.meta.url))) +const DATA_DIR = join(ROOT, 'data') +const DIST_DIR = join(ROOT, 'dist') +const PORT = Number(process.env.PORT || 8090) + +/* ── JSON loader: cache ตาม mtime (แก้ไฟล์แล้วไม่ต้องรีสตาร์ต) ── */ +const cache = new Map() +async function loadJson(name) { + const file = join(DATA_DIR, name) + const info = await stat(file) + const hit = cache.get(name) + if (hit && hit.mtime === info.mtimeMs) return hit.data + const data = JSON.parse(await readFile(file, 'utf8')) + cache.set(name, { mtime: info.mtimeMs, data }) + return data +} + +/* ── helper เวลา ── */ +const toMinutes = (hhmm) => { + const [h, m] = hhmm.split(':').map(Number) + return h * 60 + m +} +const toHHMM = (min) => `${String(Math.floor(min / 60) % 24).padStart(2, '0')}:${String(min % 60).padStart(2, '0')}` +const nowInBangkok = () => { + const parts = new Intl.DateTimeFormat('en-GB', { + timeZone: 'Asia/Bangkok', hour: '2-digit', minute: '2-digit', hour12: false + }).format(new Date()) + return parts +} + +async function nextDepartures({ directionId, at, count }) { + const timetable = await loadJson('timetable.json') + const route = await loadJson('route.json') + const day = timetable.days[0] + const direction = day.directions.find((d) => d.direction_id === directionId) + if (!direction) { + const err = new Error(`ไม่รู้จัก direction_id="${directionId}" (ใช้ outbound หรือ inbound)`) + err.statusCode = 400 + throw err + } + const nowMinutes = at ? toMinutes(at) : toMinutes(nowInBangkok()) + const limit = Math.min(Math.max(Number(count) || 3, 1), 10) + + const upcoming = direction.departures + .filter((trip) => toMinutes(trip.departure_time) >= nowMinutes) + .slice(0, limit) + .map((trip) => ({ ...trip, minutes_until: toMinutes(trip.departure_time) - nowMinutes })) + + const lastTrip = direction.departures.at(-1) + const serviceEnded = upcoming.length === 0 + return { + direction_id: direction.direction_id, + direction_name: direction.name, + queried_at: toHHMM(nowMinutes), + travel_minutes: route.journey.duration_minutes, + upcoming: serviceEnded + ? [{ ...direction.departures[0], minutes_until: null, next_service_day: 'พรุ่งนี้' }] + : upcoming, + service_ended_for_today: serviceEnded, + last_departure_today: lastTrip.departure_time, + generated_at: new Date().toISOString() + } +} + +/* ── API table ── */ +const API = { + '/api/route': () => loadJson('route.json'), + '/api/timetable': () => loadJson('timetable.json'), + '/api/fares': () => loadJson('fares.json'), + '/api/notices': () => loadJson('notices.json'), + '/api/service': () => loadJson('service.json'), + '/api/faq': () => loadJson('faq.json'), + '/api/operator': () => loadJson('operator.json'), + '/api/next': (url) => nextDepartures({ + directionId: url.searchParams.get('direction_id') || 'outbound', + at: url.searchParams.get('at'), + count: url.searchParams.get('count') + }), + '/api/overview': async () => { + const [route, timetable, fares, notices, service, faq, operator] = await Promise.all( + ['route.json', 'timetable.json', 'fares.json', 'notices.json', 'service.json', 'faq.json', 'operator.json'] + .map(loadJson) + ) + const outbound = await nextDepartures({ directionId: 'outbound', count: 2 }) + const inbound = await nextDepartures({ directionId: 'inbound', count: 2 }) + return { route, timetable, fares, notices, service, faq, operator, next: { outbound, inbound } } + }, + '/api/health': () => ({ ok: true, service: 'idealroute-api', data_dir: DATA_DIR, time: new Date().toISOString() }) +} + +const MIME = { + '.html': 'text/html; charset=utf-8', '.js': 'text/javascript; charset=utf-8', + '.css': 'text/css; charset=utf-8', '.json': 'application/json; charset=utf-8', + '.svg': 'image/svg+xml', '.woff2': 'font/woff2', '.png': 'image/png', + '.jpg': 'image/jpeg', '.ico': 'image/x-icon', '.webmanifest': 'application/manifest+json' +} + +function send(res, status, body, type = 'application/json; charset=utf-8') { + res.writeHead(status, { + 'content-type': type, + 'cache-control': 'no-store', + 'access-control-allow-origin': '*', + 'x-content-type-options': 'nosniff' + }) + res.end(body) +} + +const server = createServer(async (req, res) => { + const url = new URL(req.url, `http://${req.headers.host || 'localhost'}`) + + if (req.method === 'OPTIONS') { + res.writeHead(204, { 'access-control-allow-origin': '*', 'access-control-allow-headers': '*' }) + return res.end() + } + + try { + if (API[url.pathname]) { + return send(res, 200, JSON.stringify(await API[url.pathname](url), null, 2)) + } + if (url.pathname.startsWith('/api/')) { + return send(res, 404, JSON.stringify({ error: 'ไม่พบ endpoint', path: url.pathname })) + } + + // static (เฉพาะโหมด production หลัง npm run build) + const cleanPath = decodeURIComponent(url.pathname).replace(/\\/g, '/') + const filePath = resolve(join(DIST_DIR, cleanPath)) + if (!filePath.startsWith(DIST_DIR)) { + return send(res, 403, JSON.stringify({ error: 'forbidden' })) + } + if (!existsSync(DIST_DIR)) { + return send(res, 404, 'ยังไม่มี dist/ — รัน npm run build ก่อน แล้วรีเฟรช', 'text/plain; charset=utf-8') + } + const isFile = existsSync(filePath) && statSync(filePath).isFile() + const target = isFile ? filePath : join(DIST_DIR, 'index.html') // SPA fallback + const body = await readFile(target) + return send(res, 200, body, MIME[extname(target)] || 'application/octet-stream') + } catch (error) { + const status = error.statusCode || (error.code === 'ENOENT' ? 404 : 500) + console.error('[api]', error.message) + return send(res, status, JSON.stringify({ error: error.message })) + } +}) + +server.listen(PORT, () => { + console.log(`idealroute API → http://localhost:${PORT}/api/overview`) + if (!existsSync(DIST_DIR)) console.log('โหมด dev: รัน `npm run dev` เพื่อเปิด frontend (Vite 5173)') +}) diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..4e8c8f3 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/components/AppIcon.vue b/src/components/AppIcon.vue new file mode 100644 index 0000000..e2df39f --- /dev/null +++ b/src/components/AppIcon.vue @@ -0,0 +1,38 @@ + + + diff --git a/src/components/ContactSection.vue b/src/components/ContactSection.vue new file mode 100644 index 0000000..4aaf0a7 --- /dev/null +++ b/src/components/ContactSection.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/components/FaqSection.vue b/src/components/FaqSection.vue new file mode 100644 index 0000000..feae8e3 --- /dev/null +++ b/src/components/FaqSection.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/components/FaresSection.vue b/src/components/FaresSection.vue new file mode 100644 index 0000000..e1c2bff --- /dev/null +++ b/src/components/FaresSection.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/components/HeroSection.vue b/src/components/HeroSection.vue new file mode 100644 index 0000000..e8123cf --- /dev/null +++ b/src/components/HeroSection.vue @@ -0,0 +1,225 @@ + + + + + diff --git a/src/components/NoticesSection.vue b/src/components/NoticesSection.vue new file mode 100644 index 0000000..1323fa9 --- /dev/null +++ b/src/components/NoticesSection.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/components/RouteStops.vue b/src/components/RouteStops.vue new file mode 100644 index 0000000..4eff5aa --- /dev/null +++ b/src/components/RouteStops.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/components/ServiceSection.vue b/src/components/ServiceSection.vue new file mode 100644 index 0000000..a9b2c98 --- /dev/null +++ b/src/components/ServiceSection.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/src/components/SiteFooter.vue b/src/components/SiteFooter.vue new file mode 100644 index 0000000..6b8d7ff --- /dev/null +++ b/src/components/SiteFooter.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/src/components/SiteHeader.vue b/src/components/SiteHeader.vue new file mode 100644 index 0000000..d6683de --- /dev/null +++ b/src/components/SiteHeader.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/components/TimetableSection.vue b/src/components/TimetableSection.vue new file mode 100644 index 0000000..dc9426a --- /dev/null +++ b/src/components/TimetableSection.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/lib/api.js b/src/lib/api.js new file mode 100644 index 0000000..0590d54 --- /dev/null +++ b/src/lib/api.js @@ -0,0 +1,30 @@ +// ชั้นติดต่อ backend (Node + JSON) — ทุกหน้าจอใช้ข้อมูลจากที่นี่เท่านั้น +async function request(path) { + const response = await fetch(path, { headers: { accept: 'application/json' } }) + if (!response.ok) { + const detail = await response.text().catch(() => '') + throw new Error(`เรียก ${path} ไม่สำเร็จ (${response.status}) ${detail.slice(0, 120)}`) + } + return response.json() +} + +export const getOverview = () => request('/api/overview') +export const getNext = (directionId, count = 3) => + request(`/api/next?direction_id=${encodeURIComponent(directionId)}&count=${count}`) + +/** เวลาปัจจุบันเขต Asia/Bangkok เป็นนาทีจากเที่ยงคืน — ใช้ไฮไลต์เที่ยวถัดไป */ +export function bangkokMinutes(date = new Date()) { + const text = new Intl.DateTimeFormat('en-GB', { + timeZone: 'Asia/Bangkok', hour: '2-digit', minute: '2-digit', hour12: false + }).format(date) + const [h, m] = text.split(':').map(Number) + return h * 60 + m +} + +export const toMinutes = (hhmm) => { + const [h, m] = hhmm.split(':').map(Number) + return h * 60 + m +} + +export const formatThaiDate = (iso) => + new Intl.DateTimeFormat('th-TH', { day: 'numeric', month: 'long', year: 'numeric' }).format(new Date(iso)) diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..92d4221 --- /dev/null +++ b/src/main.js @@ -0,0 +1,9 @@ +import { createApp } from 'vue' +import '@fontsource/k2d/400.css' +import '@fontsource/k2d/500.css' +import '@fontsource/k2d/600.css' +import '@fontsource/k2d/700.css' +import './style.css' +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..fe895b8 --- /dev/null +++ b/src/style.css @@ -0,0 +1,187 @@ +/* ───────────────────────────────────────────────────────────── + IdealRoute — design tokens (เขียวอ่อน–ขาว, flat, ไม่มีเงา/ไล่สี) + ค่าคอนทราสต์วัดจริง: fg/bg 14.0:1 · muted 6.4:1 · ขาวบน primary 4.96:1 + ───────────────────────────────────────────────────────────── */ +:root { + --bg: #f5fbf7; + --surface: #ffffff; + --surface-alt: #eaf7ef; + --border: #dcefe2; + --border-strong: #bfddcb; + --fg: #0e2e1d; + --muted: #4a6154; + --primary: #17804e; + --primary-strong: #0f6b41; + --primary-soft: #e4f5ea; + --warn: #8a6a00; + --warn-soft: #fff6da; + --danger: #b3261e; + --radius: 12px; + --radius-sm: 8px; + --wrap: 1140px; + --space-1: 4px; + --space-2: 8px; + --space-3: 12px; + --space-4: 16px; + --space-5: 24px; + --space-6: 32px; + --space-7: 48px; + --space-8: 64px; + --font: 'K2D', 'Noto Sans Thai', 'Leelawadee UI', system-ui, sans-serif; +} + +*, +*::before, +*::after { box-sizing: border-box; } + +html { scroll-behavior: smooth; scroll-padding-top: 76px; } + +body { + margin: 0; + background: var(--bg); + color: var(--fg); + font-family: var(--font); + font-size: 16px; + line-height: 1.6; + -webkit-font-smoothing: antialiased; +} + +h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; } +p { margin: 0; } +ul, ol { margin: 0; padding-left: 1.15rem; } +a { color: var(--primary-strong); text-underline-offset: 3px; } +a:hover { color: var(--fg); } +img { max-width: 100%; display: block; } +button { font: inherit; } + +:focus-visible { + outline: 2px solid var(--primary-strong); + outline-offset: 2px; + border-radius: 4px; +} + +.skip-link { + position: absolute; + left: 12px; + top: -60px; + z-index: 100; + background: var(--primary-strong); + color: #fff; + padding: 10px 16px; + border-radius: var(--radius-sm); + text-decoration: none; +} +.skip-link:focus { top: 12px; color: #fff; } + +.wrap { + width: 100%; + max-width: var(--wrap); + margin-inline: auto; + padding-inline: 20px; +} + +/* ── typography helpers ── */ +.eyebrow { + display: inline-flex; + align-items: center; + gap: 8px; + font-size: 0.8125rem; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--primary-strong); +} +.muted { color: var(--muted); } +.small { font-size: 0.875rem; } +.num { font-variant-numeric: tabular-nums; } + +/* ── buttons ── */ +.btn { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; + min-height: 44px; + padding: 10px 18px; + border: 1px solid transparent; + border-radius: var(--radius-sm); + font-weight: 600; + font-size: 0.9375rem; + text-decoration: none; + cursor: pointer; + transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; +} +.btn--primary { background: var(--primary); color: #fff; } +.btn--primary:hover { background: var(--primary-strong); color: #fff; } +.btn--ghost { + background: var(--surface); + color: var(--primary-strong); + border-color: var(--border-strong); +} +.btn--ghost:hover { background: var(--primary-soft); color: var(--primary-strong); } + +/* ── divider / section ── */ +.section { padding-block: var(--space-8); } +.section--alt { background: var(--surface-alt); border-block: 1px solid var(--border); } +.section-head { max-width: 62ch; margin-bottom: var(--space-5); } +.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 6px; } +.section-head p { margin-top: 8px; color: var(--muted); } + +/* ── card ── */ +.card { + background: var(--surface); + border: 1px solid var(--border); + border-radius: var(--radius); + padding: var(--space-5); +} +.stack { display: grid; gap: var(--space-4); } +.stack--sm { gap: var(--space-2); } + +.chip { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 4px 10px; + border-radius: 999px; + background: var(--primary-soft); + color: var(--primary-strong); + font-size: 0.8125rem; + font-weight: 600; + white-space: nowrap; +} +.chip--warn { background: var(--warn-soft); color: var(--warn); } +.chip--plain { background: #fff; color: var(--muted); border: 1px solid var(--border-strong); } + +/* ── tables ── */ +.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; } +table.data { + width: 100%; + border-collapse: collapse; + font-size: 0.9375rem; +} +table.data caption { text-align: left; padding-bottom: 10px; color: var(--muted); font-size: 0.875rem; } +table.data th, +table.data td { + padding: 12px 14px; + border-bottom: 1px solid var(--border); + text-align: left; + vertical-align: top; +} +table.data thead th { + background: var(--surface-alt); + font-size: 0.8125rem; + font-weight: 600; + color: var(--primary-strong); + letter-spacing: 0.02em; + white-space: nowrap; +} +table.data tbody tr:last-child td { border-bottom: 0; } + +/* ── motion ── */ +@media (prefers-reduced-motion: reduce) { + html { scroll-behavior: auto; } + *, *::before, *::after { + animation-duration: 0.01ms !important; + transition-duration: 0.01ms !important; + } +} diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..204f6bf --- /dev/null +++ b/vite.config.js @@ -0,0 +1,12 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +export default defineConfig({ + plugins: [vue()], + server: { + port: 5173, + proxy: { + '/api': { target: 'http://localhost:8090', changeOrigin: true } + } + } +})