"use strict";
/*
 * ATTENTION: An "eval-source-map" devtool has been used.
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
self["webpackHotUpdate_N_E"]("app/page",{

/***/ "(app-pages-browser)/./app/page.tsx":
/*!**********************!*\
  !*** ./app/page.tsx ***!
  \**********************/
/***/ (function(module, __webpack_exports__, __webpack_require__) {

eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* binding */ Page; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react/jsx-dev-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"(app-pages-browser)/./node_modules/next/dist/compiled/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_Section__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/Section */ \"(app-pages-browser)/./components/Section.tsx\");\n/* harmony import */ var _components_DealCard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/DealCard */ \"(app-pages-browser)/./components/DealCard.tsx\");\n/* __next_internal_client_entry_do_not_use__ default auto */ \nvar _s = $RefreshSig$();\n\n\n\nfunction Page() {\n    _s();\n    const [origin, setOrigin] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\"YOW\");\n    const [dest, setDest] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\"CUN,PUJ,MBJ\");\n    const [startDate, setStartDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(new Date().toISOString().slice(0, 10));\n    const [endDate, setEndDate] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(new Date(Date.now() + 1000 * 60 * 60 * 24 * 60).toISOString().slice(0, 10));\n    const [minN, setMinN] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(5);\n    const [maxN, setMaxN] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(9);\n    const [budget, setBudget] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\"\");\n    const [nonStop, setNonStop] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n    const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n    const [results, setResults] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);\n    const [useDeals, setUseDeals] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n    const [useSky, setUseSky] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n    const [useG, setUseG] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n    const [useAC, setUseAC] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n    const [useAT, setUseAT] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n    async function onSubmit(e) {\n        e.preventDefault();\n        setLoading(true);\n        setResults([]);\n        const payload = {\n            origin: origin.trim().toUpperCase(),\n            destinations: dest.split(\",\").map((s)=>s.trim().toUpperCase()).filter(Boolean),\n            startDate,\n            endDate,\n            tripLengthMin: Number(minN),\n            tripLengthMax: Number(maxN),\n            budget: budget === \"\" ? null : Number(budget),\n            currency: \"CAD\",\n            nonStopOnly: nonStop,\n            sources: [\n                useDeals ? \"Deals\" : \"\",\n                useSky ? \"Skyscanner\" : \"\",\n                useG ? \"GoogleFlights\" : \"\",\n                useAC ? \"AirCanada\" : \"\",\n                useAT ? \"AirTransat\" : \"\"\n            ].filter(Boolean)\n        };\n        const res = await fetch(\"/api/search\", {\n            method: \"POST\",\n            headers: {\n                \"content-type\": \"application/json\"\n            },\n            body: JSON.stringify(payload)\n        });\n        const data = await res.json();\n        // Sort by destination, then by source/provider\n        const sorted = (data.results || []).sort((a, b)=>{\n            // First sort by destination\n            const destCompare = (a.destination || \"\").localeCompare(b.destination || \"\");\n            if (destCompare !== 0) return destCompare;\n            // Then by source/provider\n            return (a.source || \"\").localeCompare(b.source || \"\");\n        });\n        setResults(sorted);\n        setLoading(false);\n    }\n    return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"main\", {\n        className: \"space-y-6\",\n        children: [\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_Section__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n                title: \"Your trip idea\",\n                children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"form\", {\n                    className: \"grid md:grid-cols-4 gap-4\",\n                    onSubmit: onSubmit,\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"From (IATA)\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 72,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                    className: \"input\",\n                                    value: origin,\n                                    onChange: (e)=>setOrigin(e.target.value.toUpperCase()),\n                                    maxLength: 4,\n                                    placeholder: \"YOW\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 73,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 71,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"md:col-span-3\",\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"To (IATA, comma-separated)\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 76,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                    className: \"input\",\n                                    value: dest,\n                                    onChange: (e)=>setDest(e.target.value),\n                                    placeholder: \"CUN,PUJ,MBJ\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 77,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 75,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"Start date\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 80,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                    type: \"date\",\n                                    className: \"input\",\n                                    value: startDate,\n                                    onChange: (e)=>setStartDate(e.target.value)\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 81,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 79,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"End date\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 84,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                    type: \"date\",\n                                    className: \"input\",\n                                    value: endDate,\n                                    onChange: (e)=>setEndDate(e.target.value)\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 85,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 83,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"Trip length (min)\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 88,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                    type: \"number\",\n                                    className: \"input\",\n                                    value: minN,\n                                    onChange: (e)=>setMinN(Number(e.target.value)),\n                                    min: 1\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 89,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 87,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"Trip length (max)\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 92,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                    type: \"number\",\n                                    className: \"input\",\n                                    value: maxN,\n                                    onChange: (e)=>setMaxN(Number(e.target.value)),\n                                    min: minN\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 93,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 91,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"Budget (CAD)\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 96,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                    type: \"number\",\n                                    className: \"input\",\n                                    value: budget,\n                                    onChange: (e)=>setBudget(e.target.value === \"\" ? \"\" : Number(e.target.value))\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 97,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 95,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"flex items-end gap-3\",\n                            children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                className: \"inline-flex items-center gap-2\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                        type: \"checkbox\",\n                                        checked: nonStop,\n                                        onChange: (e)=>setNonStop(e.target.checked)\n                                    }, void 0, false, {\n                                        fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                        lineNumber: 101,\n                                        columnNumber: 15\n                                    }, this),\n                                    \"Non-stop only\"\n                                ]\n                            }, void 0, true, {\n                                fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                lineNumber: 100,\n                                columnNumber: 13\n                            }, this)\n                        }, void 0, false, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 99,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"md:col-span-4\",\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                    className: \"label\",\n                                    children: \"Sources\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 106,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                    className: \"flex flex-wrap gap-3\",\n                                    children: [\n                                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                            className: \"inline-flex items-center gap-2\",\n                                            children: [\n                                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                                    type: \"checkbox\",\n                                                    checked: useDeals,\n                                                    onChange: (e)=>setUseDeals(e.target.checked)\n                                                }, void 0, false, {\n                                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                    lineNumber: 108,\n                                                    columnNumber: 65\n                                                }, this),\n                                                \" Deal sites (YOW/YYZ/YUL/etc.)\"\n                                            ]\n                                        }, void 0, true, {\n                                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                            lineNumber: 108,\n                                            columnNumber: 15\n                                        }, this),\n                                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                            className: \"inline-flex items-center gap-2\",\n                                            children: [\n                                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                                    type: \"checkbox\",\n                                                    checked: useSky,\n                                                    onChange: (e)=>setUseSky(e.target.checked)\n                                                }, void 0, false, {\n                                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                    lineNumber: 109,\n                                                    columnNumber: 65\n                                                }, this),\n                                                \" Skyscanner links\"\n                                            ]\n                                        }, void 0, true, {\n                                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                            lineNumber: 109,\n                                            columnNumber: 15\n                                        }, this),\n                                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                            className: \"inline-flex items-center gap-2\",\n                                            children: [\n                                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                                    type: \"checkbox\",\n                                                    checked: useG,\n                                                    onChange: (e)=>setUseG(e.target.checked)\n                                                }, void 0, false, {\n                                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                    lineNumber: 110,\n                                                    columnNumber: 65\n                                                }, this),\n                                                \" Google Flights links\"\n                                            ]\n                                        }, void 0, true, {\n                                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                            lineNumber: 110,\n                                            columnNumber: 15\n                                        }, this),\n                                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                            className: \"inline-flex items-center gap-2\",\n                                            children: [\n                                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                                    type: \"checkbox\",\n                                                    checked: useAC,\n                                                    onChange: (e)=>setUseAC(e.target.checked)\n                                                }, void 0, false, {\n                                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                    lineNumber: 111,\n                                                    columnNumber: 65\n                                                }, this),\n                                                \" Air Canada links\"\n                                            ]\n                                        }, void 0, true, {\n                                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                            lineNumber: 111,\n                                            columnNumber: 15\n                                        }, this),\n                                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                            className: \"inline-flex items-center gap-2\",\n                                            children: [\n                                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                                    type: \"checkbox\",\n                                                    checked: useAT,\n                                                    onChange: (e)=>setUseAT(e.target.checked)\n                                                }, void 0, false, {\n                                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                    lineNumber: 112,\n                                                    columnNumber: 65\n                                                }, this),\n                                                \" Air Transat links\"\n                                            ]\n                                        }, void 0, true, {\n                                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                            lineNumber: 112,\n                                            columnNumber: 15\n                                        }, this)\n                                    ]\n                                }, void 0, true, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 107,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 105,\n                            columnNumber: 11\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"md:col-span-4 flex gap-3\",\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                    className: \"btn\",\n                                    type: \"submit\",\n                                    disabled: loading,\n                                    children: loading ? \"Searching...\" : \"Search deals & dates\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 116,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                    className: \"btn\",\n                                    type: \"button\",\n                                    onClick: ()=>{\n                                        localStorage.setItem(\"lastSearch\", JSON.stringify({\n                                            origin,\n                                            dest,\n                                            startDate,\n                                            endDate,\n                                            minN,\n                                            maxN,\n                                            budget,\n                                            nonStop,\n                                            useDeals,\n                                            useSky,\n                                            useG,\n                                            useAC,\n                                            useAT\n                                        }));\n                                        alert(\"Saved to this browser.\");\n                                    },\n                                    children: \"Save search\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 117,\n                                    columnNumber: 13\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                    className: \"btn\",\n                                    type: \"button\",\n                                    onClick: ()=>{\n                                        const raw = localStorage.getItem(\"lastSearch\");\n                                        if (raw) {\n                                            const s = JSON.parse(raw);\n                                            setOrigin(s.origin);\n                                            setDest(s.dest);\n                                            setStartDate(s.startDate);\n                                            setEndDate(s.endDate);\n                                            setMinN(s.minN);\n                                            setMaxN(s.maxN);\n                                            setBudget(s.budget);\n                                            setNonStop(s.nonStop);\n                                            setUseDeals(s.useDeals);\n                                            setUseSky(s.useSky);\n                                            setUseG(s.useG);\n                                            setUseAC(s.useAC);\n                                            setUseAT(s.useAT || true);\n                                        } else alert(\"No saved search found.\");\n                                    },\n                                    children: \"Load last\"\n                                }, void 0, false, {\n                                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                    lineNumber: 121,\n                                    columnNumber: 13\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                            lineNumber: 115,\n                            columnNumber: 11\n                        }, this)\n                    ]\n                }, void 0, true, {\n                    fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                    lineNumber: 70,\n                    columnNumber: 9\n                }, this)\n            }, void 0, false, {\n                fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                lineNumber: 69,\n                columnNumber: 7\n            }, this),\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_Section__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n                title: \"Results\",\n                children: [\n                    !loading && results.length === 0 && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"opacity-70\",\n                        children: \"No results yet. Fill the form and hit search.\"\n                    }, void 0, false, {\n                        fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                        lineNumber: 138,\n                        columnNumber: 11\n                    }, this),\n                    results.length > 0 && (()=>{\n                        // Group by destination\n                        const grouped = {};\n                        results.forEach((r)=>{\n                            const dest = r.destination || \"Unknown\";\n                            if (!grouped[dest]) grouped[dest] = [];\n                            grouped[dest].push(r);\n                        });\n                        return Object.keys(grouped).sort().map((destination)=>/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"mb-8\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h3\", {\n                                        className: \"text-xl font-bold mb-4 border-b border-slate-300 dark:border-slate-700 pb-2\",\n                                        children: destination\n                                    }, void 0, false, {\n                                        fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                        lineNumber: 151,\n                                        columnNumber: 15\n                                    }, this),\n                                    (()=>{\n                                        // Group by source/provider within this destination\n                                        const bySource = {};\n                                        grouped[destination].forEach((r)=>{\n                                            const src = r.source || \"Other\";\n                                            if (!bySource[src]) bySource[src] = [];\n                                            bySource[src].push(r);\n                                        });\n                                        return Object.keys(bySource).sort().map((source)=>/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                                className: \"mb-6\",\n                                                children: [\n                                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h4\", {\n                                                        className: \"text-sm font-semibold mb-3 text-slate-600 dark:text-slate-400 uppercase tracking-wide\",\n                                                        children: source\n                                                    }, void 0, false, {\n                                                        fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                        lineNumber: 165,\n                                                        columnNumber: 21\n                                                    }, this),\n                                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                                        className: \"grid md:grid-cols-2 gap-4\",\n                                                        children: bySource[source].map((r)=>/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_DealCard__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n                                                                deal: r\n                                                            }, r.id, false, {\n                                                                fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                                lineNumber: 169,\n                                                                columnNumber: 57\n                                                            }, this))\n                                                    }, void 0, false, {\n                                                        fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                        lineNumber: 168,\n                                                        columnNumber: 21\n                                                    }, this)\n                                                ]\n                                            }, source, true, {\n                                                fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                                lineNumber: 164,\n                                                columnNumber: 19\n                                            }, this));\n                                    })()\n                                ]\n                            }, destination, true, {\n                                fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                                lineNumber: 150,\n                                columnNumber: 13\n                            }, this));\n                    })()\n                ]\n            }, void 0, true, {\n                fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n                lineNumber: 136,\n                columnNumber: 7\n            }, this)\n        ]\n    }, void 0, true, {\n        fileName: \"D:\\\\Projects\\\\Dev\\\\Holiday Travel App\\\\app\\\\page.tsx\",\n        lineNumber: 68,\n        columnNumber: 5\n    }, this);\n}\n_s(Page, \"+JSL4vWMYmG0qI5j6at7NZ/ledQ=\");\n_c = Page;\nvar _c;\n$RefreshReg$(_c, \"Page\");\n\n\n;\n    // Wrapped in an IIFE to avoid polluting the global scope\n    ;\n    (function () {\n        var _a, _b;\n        // Legacy CSS implementations will `eval` browser code in a Node.js context\n        // to extract CSS. For backwards compatibility, we need to check we're in a\n        // browser context before continuing.\n        if (typeof self !== 'undefined' &&\n            // AMP / No-JS mode does not inject these helpers:\n            '$RefreshHelpers$' in self) {\n            // @ts-ignore __webpack_module__ is global\n            var currentExports = module.exports;\n            // @ts-ignore __webpack_module__ is global\n            var prevSignature = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevSignature) !== null && _b !== void 0 ? _b : null;\n            // This cannot happen in MainTemplate because the exports mismatch between\n            // templating and execution.\n            self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n            // A module can be accepted automatically based on its exports, e.g. when\n            // it is a Refresh Boundary.\n            if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n                // Save the previous exports signature on update so we can compare the boundary\n                // signatures. We avoid saving exports themselves since it causes memory leaks (https://github.com/vercel/next.js/pull/53797)\n                module.hot.dispose(function (data) {\n                    data.prevSignature =\n                        self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports);\n                });\n                // Unconditionally accept an update to this module, we'll check if it's\n                // still a Refresh Boundary later.\n                // @ts-ignore importMeta is replaced in the loader\n                module.hot.accept();\n                // This field is set when the previous version of this module was a\n                // Refresh Boundary, letting us know we need to check for invalidation or\n                // enqueue an update.\n                if (prevSignature !== null) {\n                    // A boundary can become ineligible if its exports are incompatible\n                    // with the previous exports.\n                    //\n                    // For example, if you add/remove/change exports, we'll want to\n                    // re-execute the importing modules, and force those components to\n                    // re-render. Similarly, if you convert a class component to a\n                    // function, we want to invalidate the boundary.\n                    if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevSignature, self.$RefreshHelpers$.getRefreshBoundarySignature(currentExports))) {\n                        module.hot.invalidate();\n                    }\n                    else {\n                        self.$RefreshHelpers$.scheduleUpdate();\n                    }\n                }\n            }\n            else {\n                // Since we just executed the code for the module, it's possible that the\n                // new exports made it ineligible for being a boundary.\n                // We only care about the case when we were _previously_ a boundary,\n                // because we already accepted this update (accidental side effect).\n                var isNoLongerABoundary = prevSignature !== null;\n                if (isNoLongerABoundary) {\n                    module.hot.invalidate();\n                }\n            }\n        }\n    })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///(app-pages-browser)/./app/page.tsx\n"));

/***/ })

});