/*
 * 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/).
 */
(() => {
var exports = {};
exports.id = "app/page";
exports.ids = ["app/page"];
exports.modules = {

/***/ "./action-async-storage.external":
/*!****************************************************************************!*\
  !*** external "next/dist/client/components/action-async-storage.external" ***!
  \****************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = require("next/dist/client/components/action-async-storage.external");

/***/ }),

/***/ "../../client/components/action-async-storage.external":
/*!*******************************************************************************!*\
  !*** external "next/dist/client/components/action-async-storage.external.js" ***!
  \*******************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = require("next/dist/client/components/action-async-storage.external.js");

/***/ }),

/***/ "./request-async-storage.external":
/*!*****************************************************************************!*\
  !*** external "next/dist/client/components/request-async-storage.external" ***!
  \*****************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = require("next/dist/client/components/request-async-storage.external");

/***/ }),

/***/ "../../client/components/request-async-storage.external":
/*!********************************************************************************!*\
  !*** external "next/dist/client/components/request-async-storage.external.js" ***!
  \********************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = require("next/dist/client/components/request-async-storage.external.js");

/***/ }),

/***/ "./static-generation-async-storage.external":
/*!***************************************************************************************!*\
  !*** external "next/dist/client/components/static-generation-async-storage.external" ***!
  \***************************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = require("next/dist/client/components/static-generation-async-storage.external");

/***/ }),

/***/ "../../client/components/static-generation-async-storage.external":
/*!******************************************************************************************!*\
  !*** external "next/dist/client/components/static-generation-async-storage.external.js" ***!
  \******************************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = require("next/dist/client/components/static-generation-async-storage.external.js");

/***/ }),

/***/ "next/dist/compiled/next-server/app-page.runtime.dev.js":
/*!*************************************************************************!*\
  !*** external "next/dist/compiled/next-server/app-page.runtime.dev.js" ***!
  \*************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = require("next/dist/compiled/next-server/app-page.runtime.dev.js");

/***/ }),

/***/ "buffer":
/*!*************************!*\
  !*** external "buffer" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = require("buffer");

/***/ }),

/***/ "crypto":
/*!*************************!*\
  !*** external "crypto" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = require("crypto");

/***/ }),

/***/ "events":
/*!*************************!*\
  !*** external "events" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = require("events");

/***/ }),

/***/ "http":
/*!***********************!*\
  !*** external "http" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = require("http");

/***/ }),

/***/ "https":
/*!************************!*\
  !*** external "https" ***!
  \************************/
/***/ ((module) => {

"use strict";
module.exports = require("https");

/***/ }),

/***/ "node:crypto":
/*!******************************!*\
  !*** external "node:crypto" ***!
  \******************************/
/***/ ((module) => {

"use strict";
module.exports = require("node:crypto");

/***/ }),

/***/ "util":
/*!***********************!*\
  !*** external "util" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = require("util");

/***/ }),

/***/ "zlib":
/*!***********************!*\
  !*** external "zlib" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = require("zlib");

/***/ }),

/***/ "(rsc)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&page=%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&page=%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D! ***!
  \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_error_boundary__WEBPACK_IMPORTED_MODULE_2___default.a),\n/* harmony export */   __next_app__: () => (/* binding */ __next_app__),\n/* harmony export */   originalPathname: () => (/* binding */ originalPathname),\n/* harmony export */   pages: () => (/* binding */ pages),\n/* harmony export */   routeModule: () => (/* binding */ routeModule),\n/* harmony export */   tree: () => (/* binding */ tree)\n/* harmony export */ });\n/* harmony import */ var next_dist_server_future_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! next/dist/server/future/route-modules/app-page/module.compiled */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/module.compiled.js?9d97\");\n/* harmony import */ var next_dist_server_future_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_future_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var next_dist_server_future_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! next/dist/server/future/route-kind */ \"(rsc)/./node_modules/next/dist/server/future/route-kind.js\");\n/* harmony import */ var next_dist_client_components_error_boundary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/dist/client/components/error-boundary */ \"(rsc)/./node_modules/next/dist/client/components/error-boundary.js\");\n/* harmony import */ var next_dist_client_components_error_boundary__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_error_boundary__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! next/dist/server/app-render/entry-base */ \"(rsc)/./node_modules/next/dist/server/app-render/entry-base.js\");\n/* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};\n/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_3__) if([\"default\",\"tree\",\"pages\",\"GlobalError\",\"originalPathname\",\"__next_app__\",\"routeModule\"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_3__[__WEBPACK_IMPORT_KEY__]\n/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);\n\"TURBOPACK { transition: next-ssr }\";\n\n\n// We inject the tree and pages here so that we can use them in the route\n// module.\nconst tree = {\n        children: [\n        '',\n        {\n        children: ['__PAGE__', {}, {\n          page: [() => Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./src/app/page.tsx */ \"(rsc)/./src/app/page.tsx\")), \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\"],\n          \n        }]\n      },\n        {\n        'layout': [() => Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./src/app/layout.tsx */ \"(rsc)/./src/app/layout.tsx\")), \"/home/robin/AI/Coding/Whisky/src/app/layout.tsx\"],\n'not-found': [() => Promise.resolve(/*! import() eager */).then(__webpack_require__.t.bind(__webpack_require__, /*! next/dist/client/components/not-found-error */ \"(rsc)/./node_modules/next/dist/client/components/not-found-error.js\", 23)), \"next/dist/client/components/not-found-error\"],\n        \n      }\n      ]\n      }.children;\nconst pages = [\"/home/robin/AI/Coding/Whisky/src/app/page.tsx\"];\n\n\nconst __next_app_require__ = __webpack_require__\nconst __next_app_load_chunk__ = () => Promise.resolve()\nconst originalPathname = \"/page\";\nconst __next_app__ = {\n    require: __next_app_require__,\n    loadChunk: __next_app_load_chunk__\n};\n\n// Create and export the route module that will be consumed.\nconst routeModule = new next_dist_server_future_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({\n    definition: {\n        kind: next_dist_server_future_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE,\n        page: \"/page\",\n        pathname: \"/\",\n        // The following aren't used in production.\n        bundlePath: \"\",\n        filename: \"\",\n        appPaths: []\n    },\n    userland: {\n        loaderTree: tree\n    }\n});\n\n//# sourceMappingURL=app-page.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHJzYykvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3dlYnBhY2svbG9hZGVycy9uZXh0LWFwcC1sb2FkZXIuanM/bmFtZT1hcHAlMkZwYWdlJnBhZ2U9JTJGcGFnZSZhcHBQYXRocz0lMkZwYWdlJnBhZ2VQYXRoPXByaXZhdGUtbmV4dC1hcHAtZGlyJTJGcGFnZS50c3gmYXBwRGlyPSUyRmhvbWUlMkZyb2JpbiUyRkFJ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ICAgICAgcGFnZTogXCIvcGFnZVwiLFxuICAgICAgICBwYXRobmFtZTogXCIvXCIsXG4gICAgICAgIC8vIFRoZSBmb2xsb3dpbmcgYXJlbid0IHVzZWQgaW4gcHJvZHVjdGlvbi5cbiAgICAgICAgYnVuZGxlUGF0aDogXCJcIixcbiAgICAgICAgZmlsZW5hbWU6IFwiXCIsXG4gICAgICAgIGFwcFBhdGhzOiBbXVxuICAgIH0sXG4gICAgdXNlcmxhbmQ6IHtcbiAgICAgICAgbG9hZGVyVHJlZTogdHJlZVxuICAgIH1cbn0pO1xuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1hcHAtcGFnZS5qcy5tYXAiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(rsc)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&page=%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!\n");

/***/ }),

/***/ "(action-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-action-entry-loader.js?actions=%5B%5B%22%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fservices%2Fanalyze-bottle.ts%22%2C%5B%22analyzeBottle%22%5D%5D%2C%5B%22%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fservices%2Fsave-bottle.ts%22%2C%5B%22saveBottle%22%5D%5D%5D&__client_imported__=true!":
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/next/dist/build/webpack/loaders/next-flight-action-entry-loader.js?actions=%5B%5B%22%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fservices%2Fanalyze-bottle.ts%22%2C%5B%22analyzeBottle%22%5D%5D%2C%5B%22%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fservices%2Fsave-bottle.ts%22%2C%5B%22saveBottle%22%5D%5D%5D&__client_imported__=true! ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

eval("\nconst actions = {\n'af8f7c7b0fe98b99031bb1c9e8ef0ed13b2eae40': () => Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./src/services/analyze-bottle.ts */ \"(action-browser)/./src/services/analyze-bottle.ts\")).then(mod => mod[\"analyzeBottle\"]),\n'9cc2ffbf85f4e72220537b4253faa867d3a48bad': () => Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./src/services/save-bottle.ts */ \"(action-browser)/./src/services/save-bottle.ts\")).then(mod => mod[\"saveBottle\"]),\n}\n\nasync function endpoint(id, ...args) {\n  const action = await actions[id]()\n  return action.apply(null, args)\n}\n\n// Using CJS to avoid this to be tree-shaken away due to unused exports.\nmodule.exports = {\n  'af8f7c7b0fe98b99031bb1c9e8ef0ed13b2eae40': endpoint.bind(null, 'af8f7c7b0fe98b99031bb1c9e8ef0ed13b2eae40'),\n  '9cc2ffbf85f4e72220537b4253faa867d3a48bad': endpoint.bind(null, '9cc2ffbf85f4e72220537b4253faa867d3a48bad'),\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFjdGlvbi1icm93c2VyKS8uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvYnVpbGQvd2VicGFjay9sb2FkZXJzL25leHQtZmxpZ2h0LWFjdGlvbi1lbnRyeS1sb2FkZXIuanM/YWN0aW9ucz0lNUIlNUIlMjIlMkZob21l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A9PiBtb2RbXCJzYXZlQm90dGxlXCJdKSxcbn1cblxuYXN5bmMgZnVuY3Rpb24gZW5kcG9pbnQoaWQsIC4uLmFyZ3MpIHtcbiAgY29uc3QgYWN0aW9uID0gYXdhaXQgYWN0aW9uc1tpZF0oKVxuICByZXR1cm4gYWN0aW9uLmFwcGx5KG51bGwsIGFyZ3MpXG59XG5cbi8vIFVzaW5nIENKUyB0byBhdm9pZCB0aGlzIHRvIGJlIHRyZWUtc2hha2VuIGF3YXkgZHVlIHRvIHVudXNlZCBleHBvcnRzLlxubW9kdWxlLmV4cG9ydHMgPSB7XG4gICdhZjhmN2M3YjBmZTk4Yjk5MDMxYmIxYzllOGVmMGVkMTNiMmVhZTQwJzogZW5kcG9pbnQuYmluZChudWxsLCAnYWY4ZjdjN2IwZmU5OGI5OTAzMWJiMWM5ZThlZjBlZDEzYjJlYWU0MCcpLFxuICAnOWNjMmZmYmY4NWY0ZTcyMjIwNTM3YjQyNTNmYWE4NjdkM2E0OGJhZCc6IGVuZHBvaW50LmJpbmQobnVsbCwgJzljYzJmZmJmODVmNGU3MjIyMDUzN2I0MjUzZmFhODY3ZDNhNDhiYWQnKSxcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(action-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-action-entry-loader.js?actions=%5B%5B%22%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fservices%2Fanalyze-bottle.ts%22%2C%5B%22analyzeBottle%22%5D%5D%2C%5B%22%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fservices%2Fsave-bottle.ts%22%2C%5B%22saveBottle%22%5D%5D%5D&__client_imported__=true!\n");

/***/ }),

/***/ "(ssr)/./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fapp-router.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Ferror-boundary.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Flayout-router.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fnot-found-boundary.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Frender-from-template-context.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fstatic-generation-searchparams-bailout-provider.js&server=true!":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fapp-router.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Ferror-boundary.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Flayout-router.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fnot-found-boundary.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Frender-from-template-context.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fstatic-generation-searchparams-bailout-provider.js&server=true! ***!
  \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

eval("Promise.resolve(/*! import() eager */).then(__webpack_require__.t.bind(__webpack_require__, /*! ./node_modules/next/dist/client/components/app-router.js */ \"(ssr)/./node_modules/next/dist/client/components/app-router.js\", 23));\nPromise.resolve(/*! import() eager */).then(__webpack_require__.t.bind(__webpack_require__, /*! ./node_modules/next/dist/client/components/error-boundary.js */ \"(ssr)/./node_modules/next/dist/client/components/error-boundary.js\", 23));\nPromise.resolve(/*! import() eager */).then(__webpack_require__.t.bind(__webpack_require__, /*! ./node_modules/next/dist/client/components/layout-router.js */ \"(ssr)/./node_modules/next/dist/client/components/layout-router.js\", 23));\nPromise.resolve(/*! import() eager */).then(__webpack_require__.t.bind(__webpack_require__, /*! ./node_modules/next/dist/client/components/not-found-boundary.js */ \"(ssr)/./node_modules/next/dist/client/components/not-found-boundary.js\", 23));\nPromise.resolve(/*! import() eager */).then(__webpack_require__.t.bind(__webpack_require__, /*! ./node_modules/next/dist/client/components/render-from-template-context.js */ \"(ssr)/./node_modules/next/dist/client/components/render-from-template-context.js\", 23));\nPromise.resolve(/*! import() eager */).then(__webpack_require__.t.bind(__webpack_require__, /*! ./node_modules/next/dist/client/components/static-generation-searchparams-bailout-provider.js */ \"(ssr)/./node_modules/next/dist/client/components/static-generation-searchparams-bailout-provider.js\", 23))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHNzcikvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3dlYnBhY2svbG9hZGVycy9uZXh0LWZsaWdodC1jbGllbnQtZW50cnktbG9hZGVyLmpzP21vZHVsZXM9JTJGaG9tZSUyRnJvYmluJTJGQUkl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Q29kaW5nL1doaXNreS9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NsaWVudC9jb21wb25lbnRzL3N0YXRpYy1nZW5lcmF0aW9uLXNlYXJjaHBhcmFtcy1iYWlsb3V0LXByb3ZpZGVyLmpzXCIpIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(ssr)/./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fapp-router.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Ferror-boundary.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Flayout-router.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fnot-found-boundary.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Frender-from-template-context.js&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Fdist%2Fclient%2Fcomponents%2Fstatic-generation-searchparams-bailout-provider.js&server=true!\n");

/***/ }),

/***/ "(ssr)/./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Ffont%2Fgoogle%2Ftarget.css%3F%7B%22path%22%3A%22src%2Fapp%2Flayout.tsx%22%2C%22import%22%3A%22Inter%22%2C%22arguments%22%3A%5B%7B%22subsets%22%3A%5B%22latin%22%5D%7D%5D%2C%22variableName%22%3A%22inter%22%7D&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp%2Fglobals.css&server=true!":
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fnode_modules%2Fnext%2Ffont%2Fgoogle%2Ftarget.css%3F%7B%22path%22%3A%22src%2Fapp%2Flayout.tsx%22%2C%22import%22%3A%22Inter%22%2C%22arguments%22%3A%5B%7B%22subsets%22%3A%5B%22latin%22%5D%7D%5D%2C%22variableName%22%3A%22inter%22%7D&modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp%2Fglobals.css&server=true! ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ (() => {



/***/ }),

/***/ "(ssr)/./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp%2Fpage.tsx&server=true!":
/*!****************************************************************************************************************************************************************************!*\
  !*** ./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp%2Fpage.tsx&server=true! ***!
  \****************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

eval("Promise.resolve(/*! import() eager */).then(__webpack_require__.bind(__webpack_require__, /*! ./src/app/page.tsx */ \"(ssr)/./src/app/page.tsx\"))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHNzcikvLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3dlYnBhY2svbG9hZGVycy9uZXh0LWZsaWdodC1jbGllbnQtZW50cnktbG9hZGVyLmpzP21vZHVsZXM9JTJGaG9tZSUyRnJvYmluJTJGQUklMkZDb2RpbmclMkZXaGlza3klMkZzcmMlMkZhcHAlMkZwYWdlLnRzeCZzZXJ2ZXI9dHJ1ZSEiLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly93aGlza3ktdmF1bHQvPzM5YjgiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0KC8qIHdlYnBhY2tNb2RlOiBcImVhZ2VyXCIgKi8gXCIvaG9tZS9yb2Jpbi9BSS9Db2RpbmcvV2hpc2t5L3NyYy9hcHAvcGFnZS50c3hcIikiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(ssr)/./node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js?modules=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp%2Fpage.tsx&server=true!\n");

/***/ }),

/***/ "(ssr)/./src/app/page.tsx":
/*!**************************!*\
  !*** ./src/app/page.tsx ***!
  \**************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ Home)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @supabase/auth-helpers-nextjs */ \"(ssr)/./node_modules/@supabase/auth-helpers-nextjs/dist/index.js\");\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_CameraCapture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/CameraCapture */ \"(ssr)/./src/components/CameraCapture.tsx\");\n/* harmony import */ var _components_BottleGrid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/BottleGrid */ \"(ssr)/./src/components/BottleGrid.tsx\");\n/* harmony import */ var _components_AuthForm__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/AuthForm */ \"(ssr)/./src/components/AuthForm.tsx\");\n/* __next_internal_client_entry_do_not_use__ default auto */ \n\n\n\n\n\nfunction Home() {\n    const supabase = (0,_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__.createClientComponentClient)();\n    const [bottles, setBottles] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);\n    const [isLoading, setIsLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n    const [user, setUser] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // Added user state\n    (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n        // Check session\n        const checkUser = async ()=>{\n            const { data: { session } } = await supabase.auth.getSession();\n            setUser(session?.user ?? null);\n            if (session?.user) {\n                fetchCollection();\n            } else {\n                setIsLoading(false);\n            }\n        };\n        checkUser();\n        // Listen for auth changes\n        const { data: { subscription } } = supabase.auth.onAuthStateChange((_event, session)=>{\n            setUser(session?.user ?? null);\n            if (session?.user) {\n                fetchCollection();\n            } else {\n                setBottles([]);\n            }\n        });\n        return ()=>subscription.unsubscribe();\n    }, []);\n    const fetchCollection = async ()=>{\n        setIsLoading(true);\n        try {\n            // Fetch bottles with their latest tasting date\n            const { data, error } = await supabase.from(\"bottles\").select(`\n          *,\n          tastings (\n            created_at\n          )\n        `).order(\"created_at\", {\n                ascending: false\n            });\n            if (error) throw error;\n            // Process data to get the absolute latest tasting date for each bottle\n            const processedBottles = (data || []).map((bottle)=>{\n                const lastTasted = bottle.tastings && bottle.tastings.length > 0 ? bottle.tastings.reduce((latest, current)=>new Date(current.created_at) > new Date(latest) ? current.created_at : latest, bottle.tastings[0].created_at) : null;\n                return {\n                    ...bottle,\n                    last_tasted: lastTasted\n                };\n            });\n            setBottles(processedBottles);\n        } catch (err) {\n            console.error(\"Error fetching collection:\", err);\n        } finally{\n            setIsLoading(false);\n        }\n    };\n    const handleLogout = async ()=>{\n        await supabase.auth.signOut();\n    };\n    if (!user) {\n        return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"main\", {\n            className: \"flex min-h-screen flex-col items-center justify-center p-6 bg-zinc-50 dark:bg-black\",\n            children: [\n                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                    className: \"mb-12 text-center\",\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h1\", {\n                            className: \"text-5xl font-black text-zinc-900 dark:text-white tracking-tighter mb-4\",\n                            children: [\n                                \"WHISKY\",\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                    className: \"text-amber-600\",\n                                    children: \"VAULT\"\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                                    lineNumber: 90,\n                                    columnNumber: 31\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                            lineNumber: 89,\n                            columnNumber: 21\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n                            className: \"text-zinc-500 max-w-sm mx-auto\",\n                            children: \"Scanne deine Flaschen, tracke deine Tastings und verwalte deinen Keller.\"\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                            lineNumber: 92,\n                            columnNumber: 21\n                        }, this)\n                    ]\n                }, void 0, true, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                    lineNumber: 88,\n                    columnNumber: 17\n                }, this),\n                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_AuthForm__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {}, void 0, false, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                    lineNumber: 94,\n                    columnNumber: 17\n                }, this)\n            ]\n        }, void 0, true, {\n            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n            lineNumber: 87,\n            columnNumber: 13\n        }, this);\n    }\n    return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"main\", {\n        className: \"flex min-h-screen flex-col items-center gap-12 p-6 md:p-24 bg-zinc-50 dark:bg-black\",\n        children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n            className: \"z-10 max-w-5xl w-full flex flex-col items-center gap-8\",\n            children: [\n                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"header\", {\n                    className: \"w-full flex justify-between items-center\",\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h1\", {\n                            className: \"text-4xl font-black text-zinc-900 dark:text-white tracking-tighter\",\n                            children: [\n                                \"WHISKY\",\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                    className: \"text-amber-600\",\n                                    children: \"VAULT\"\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                                    lineNumber: 104,\n                                    columnNumber: 31\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                            lineNumber: 103,\n                            columnNumber: 21\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                            onClick: handleLogout,\n                            className: \"text-sm font-medium text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-300 transition-colors\",\n                            children: \"Abmelden\"\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                            lineNumber: 106,\n                            columnNumber: 21\n                        }, this)\n                    ]\n                }, void 0, true, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                    lineNumber: 102,\n                    columnNumber: 17\n                }, this),\n                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_CameraCapture__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n                    onSaveComplete: fetchCollection\n                }, void 0, false, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                    lineNumber: 114,\n                    columnNumber: 17\n                }, this),\n                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                    className: \"w-full mt-12\",\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h2\", {\n                            className: \"text-2xl font-bold mb-6 text-zinc-800 dark:text-zinc-100 flex items-center gap-3\",\n                            children: [\n                                \"Deine Sammlung\",\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                    className: \"text-sm font-normal text-zinc-500 bg-zinc-100 dark:bg-zinc-800 px-3 py-1 rounded-full\",\n                                    children: bottles.length\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                                    lineNumber: 119,\n                                    columnNumber: 25\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                            lineNumber: 117,\n                            columnNumber: 21\n                        }, this),\n                        isLoading ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"flex justify-center py-12\",\n                            children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"animate-spin rounded-full h-8 w-8 border-b-2 border-amber-600\"\n                            }, void 0, false, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                                lineNumber: 126,\n                                columnNumber: 29\n                            }, this)\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                            lineNumber: 125,\n                            columnNumber: 25\n                        }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_components_BottleGrid__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n                            bottles: bottles\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                            lineNumber: 129,\n                            columnNumber: 25\n                        }, this)\n                    ]\n                }, void 0, true, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n                    lineNumber: 116,\n                    columnNumber: 17\n                }, this)\n            ]\n        }, void 0, true, {\n            fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n            lineNumber: 101,\n            columnNumber: 13\n        }, this)\n    }, void 0, false, {\n        fileName: \"/home/robin/AI/Coding/Whisky/src/app/page.tsx\",\n        lineNumber: 100,\n        columnNumber: 9\n    }, this);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 10916 characters]\n//# sourceURL=webpack-internal:///(ssr)/./src/app/page.tsx\n");

/***/ }),

/***/ "(ssr)/./src/components/AuthForm.tsx":
/*!*************************************!*\
  !*** ./src/components/AuthForm.tsx ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ AuthForm)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @supabase/auth-helpers-nextjs */ \"(ssr)/./node_modules/@supabase/auth-helpers-nextjs/dist/index.js\");\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Loader2,Lock,LogIn,Mail,UserPlus!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/log-in.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Loader2,Lock,LogIn,Mail,UserPlus!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/user-plus.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Loader2,Lock,LogIn,Mail,UserPlus!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/mail.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Loader2,Lock,LogIn,Mail,UserPlus!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/lock.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Loader2,Lock,LogIn,Mail,UserPlus!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/alert-circle.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Loader2,Lock,LogIn,Mail,UserPlus!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/loader-2.js\");\n/* __next_internal_client_entry_do_not_use__ default auto */ \n\n\n\nfunction AuthForm() {\n    const supabase = (0,_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__.createClientComponentClient)();\n    const [isLogin, setIsLogin] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n    const [email, setEmail] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\"\");\n    const [password, setPassword] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\"\");\n    const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n    const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const [message, setMessage] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const handleSubmit = async (e)=>{\n        e.preventDefault();\n        setLoading(true);\n        setError(null);\n        setMessage(null);\n        try {\n            if (isLogin) {\n                const { error } = await supabase.auth.signInWithPassword({\n                    email,\n                    password\n                });\n                if (error) throw error;\n            } else {\n                const { error } = await supabase.auth.signUp({\n                    email,\n                    password,\n                    options: {\n                        emailRedirectTo: `${window.location.origin}/auth/callback`\n                    }\n                });\n                if (error) throw error;\n                setMessage(\"Checke deine E-Mails, um dein Konto zu best\\xe4tigen!\");\n            }\n        } catch (err) {\n            setError(err instanceof Error ? err.message : \"Ein Fehler ist aufgetreten\");\n        } finally{\n            setLoading(false);\n        }\n    };\n    return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n        className: \"w-full max-w-md p-8 bg-white dark:bg-zinc-900 rounded-3xl shadow-2xl border border-zinc-200 dark:border-zinc-800\",\n        children: [\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"flex flex-col items-center mb-8\",\n                children: [\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"w-16 h-16 bg-amber-100 dark:bg-amber-900/30 rounded-2xl flex items-center justify-center mb-4\",\n                        children: isLogin ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n                            className: \"text-amber-600\",\n                            size: 32\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                            lineNumber: 48,\n                            columnNumber: 32\n                        }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n                            className: \"text-amber-600\",\n                            size: 32\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                            lineNumber: 48,\n                            columnNumber: 81\n                        }, this)\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 47,\n                        columnNumber: 17\n                    }, this),\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h2\", {\n                        className: \"text-3xl font-black text-zinc-900 dark:text-white tracking-tight\",\n                        children: isLogin ? \"Willkommen zur\\xfcck\" : \"Vault erstellen\"\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 50,\n                        columnNumber: 17\n                    }, this),\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n                        className: \"text-zinc-500 dark:text-zinc-400 mt-2 text-center text-sm\",\n                        children: isLogin ? \"Logge dich ein, um auf deine Sammlung zuzugreifen.\" : \"Starte heute mit deinem digitalen Whisky-Vault.\"\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 53,\n                        columnNumber: 17\n                    }, this)\n                ]\n            }, void 0, true, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                lineNumber: 46,\n                columnNumber: 13\n            }, this),\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"form\", {\n                onSubmit: handleSubmit,\n                className: \"space-y-4\",\n                children: [\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"space-y-2\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                className: \"text-sm font-semibold text-zinc-700 dark:text-zinc-300 ml-1\",\n                                children: \"E-Mail\"\n                            }, void 0, false, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                lineNumber: 62,\n                                columnNumber: 21\n                            }, this),\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"relative\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n                                        className: \"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-400\",\n                                        size: 18\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                        lineNumber: 64,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                        type: \"email\",\n                                        value: email,\n                                        onChange: (e)=>setEmail(e.target.value),\n                                        placeholder: \"name@beispiel.de\",\n                                        required: true,\n                                        className: \"w-full pl-10 pr-4 py-3 bg-zinc-50 dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-xl focus:ring-2 focus:ring-amber-500 focus:border-transparent outline-none transition-all dark:text-white\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                        lineNumber: 65,\n                                        columnNumber: 25\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                lineNumber: 63,\n                                columnNumber: 21\n                            }, this)\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 61,\n                        columnNumber: 17\n                    }, this),\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"space-y-2\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"label\", {\n                                className: \"text-sm font-semibold text-zinc-700 dark:text-zinc-300 ml-1\",\n                                children: \"Passwort\"\n                            }, void 0, false, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                lineNumber: 77,\n                                columnNumber: 21\n                            }, this),\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"relative\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n                                        className: \"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-400\",\n                                        size: 18\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                        lineNumber: 79,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                        type: \"password\",\n                                        value: password,\n                                        onChange: (e)=>setPassword(e.target.value),\n                                        placeholder: \"••••••••\",\n                                        required: true,\n                                        className: \"w-full pl-10 pr-4 py-3 bg-zinc-50 dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-xl focus:ring-2 focus:ring-amber-500 focus:border-transparent outline-none transition-all dark:text-white\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                        lineNumber: 80,\n                                        columnNumber: 25\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                lineNumber: 78,\n                                columnNumber: 21\n                            }, this)\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 76,\n                        columnNumber: 17\n                    }, this),\n                    error && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"flex items-center gap-2 p-3 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 text-sm rounded-lg border border-red-100 dark:border-red-900/50\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n                                size: 16\n                            }, void 0, false, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                                lineNumber: 93,\n                                columnNumber: 25\n                            }, this),\n                            error\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 92,\n                        columnNumber: 21\n                    }, this),\n                    message && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"p-3 bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 text-sm rounded-lg border border-green-100 dark:border-green-900/50\",\n                        children: message\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 99,\n                        columnNumber: 21\n                    }, this),\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                        type: \"submit\",\n                        disabled: loading,\n                        className: \"w-full py-4 bg-amber-600 hover:bg-amber-700 text-white font-bold rounded-xl shadow-lg shadow-amber-600/20 transition-all active:scale-[0.98] disabled:opacity-50 flex items-center justify-center gap-2\",\n                        children: loading ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Loader2_Lock_LogIn_Mail_UserPlus_lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n                            className: \"animate-spin\",\n                            size: 20\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                            lineNumber: 109,\n                            columnNumber: 32\n                        }, this) : isLogin ? \"Einloggen\" : \"Konto erstellen\"\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                        lineNumber: 104,\n                        columnNumber: 17\n                    }, this)\n                ]\n            }, void 0, true, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                lineNumber: 60,\n                columnNumber: 13\n            }, this),\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"mt-6 text-center\",\n                children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                    onClick: ()=>setIsLogin(!isLogin),\n                    className: \"text-sm font-medium text-amber-600 hover:text-amber-700 transition-colors\",\n                    children: isLogin ? \"Noch kein Konto? Registrieren\" : \"Bereits ein Konto? Einloggen\"\n                }, void 0, false, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                    lineNumber: 114,\n                    columnNumber: 17\n                }, this)\n            }, void 0, false, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n                lineNumber: 113,\n                columnNumber: 13\n            }, this)\n        ]\n    }, void 0, true, {\n        fileName: \"/home/robin/AI/Coding/Whisky/src/components/AuthForm.tsx\",\n        lineNumber: 45,\n        columnNumber: 9\n    }, this);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 12316 characters]\n//# sourceURL=webpack-internal:///(ssr)/./src/components/AuthForm.tsx\n");

/***/ }),

/***/ "(ssr)/./src/components/BottleGrid.tsx":
/*!***************************************!*\
  !*** ./src/components/BottleGrid.tsx ***!
  \***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ BottleGrid)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/link */ \"(ssr)/./node_modules/next/dist/api/link.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/calendar.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/unlock.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/flask-conical.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/ghost.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/lock.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/clock.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/search.js\");\n/* harmony import */ var _barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! __barrel_optimize__?names=Calendar,Clock,FlaskConical,Ghost,Lock,Search,Unlock,X!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/x.js\");\n/* __next_internal_client_entry_do_not_use__ default auto */ \n\n\n\nfunction BottleCard({ bottle }) {\n    return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(next_link__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n        href: `/bottles/${bottle.id}`,\n        className: \"block\",\n        children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n            className: \"bg-white dark:bg-zinc-900 rounded-2xl overflow-hidden border border-zinc-200 dark:border-zinc-800 shadow-md transition-all hover:scale-[1.02] hover:shadow-xl group relative\",\n            children: [\n                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                    className: \"aspect-[3/2] overflow-hidden bg-zinc-100 dark:bg-zinc-800 relative\",\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n                            src: bottle.image_url,\n                            alt: bottle.name,\n                            className: \"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110\"\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 16,\n                            columnNumber: 21\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors\"\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 21,\n                            columnNumber: 21\n                        }, this),\n                        bottle.last_tasted && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"absolute top-3 right-3 bg-zinc-900/80 backdrop-blur-md text-white text-[10px] font-bold px-2 py-1 rounded-md flex items-center gap-1 border border-white/10\",\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n                                    size: 10\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 25,\n                                    columnNumber: 29\n                                }, this),\n                                \"ZULETZT: \",\n                                new Date(bottle.last_tasted).toLocaleDateString(\"de-DE\")\n                            ]\n                        }, void 0, true, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 24,\n                            columnNumber: 25\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: `absolute bottom-3 left-3 px-2 py-1 rounded-md text-[10px] font-black uppercase flex items-center gap-1.5 backdrop-blur-md border ${bottle.status === \"open\" ? \"bg-amber-500/80 text-white border-amber-400/50\" : bottle.status === \"sampled\" ? \"bg-purple-500/80 text-white border-purple-400/50\" : bottle.status === \"empty\" ? \"bg-zinc-500/80 text-white border-zinc-400/50\" : \"bg-blue-600/80 text-white border-blue-400/50\"}`,\n                            children: [\n                                bottle.status === \"open\" ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n                                    size: 10\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 38,\n                                    columnNumber: 53\n                                }, this) : bottle.status === \"sampled\" ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n                                    size: 10\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 38,\n                                    columnNumber: 106\n                                }, this) : bottle.status === \"empty\" ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n                                    size: 10\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 38,\n                                    columnNumber: 163\n                                }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n                                    size: 10\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 38,\n                                    columnNumber: 185\n                                }, this),\n                                bottle.status\n                            ]\n                        }, void 0, true, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 30,\n                            columnNumber: 21\n                        }, this)\n                    ]\n                }, void 0, true, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                    lineNumber: 15,\n                    columnNumber: 17\n                }, this),\n                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                    className: \"p-4\",\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h3\", {\n                            className: \"font-bold text-lg text-zinc-800 dark:text-zinc-100 truncate\",\n                            children: bottle.name\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 43,\n                            columnNumber: 21\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n                            className: \"text-zinc-500 text-sm truncate\",\n                            children: bottle.distillery\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 44,\n                            columnNumber: 21\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"mt-2 flex items-center gap-1.5 text-[10px] font-bold text-zinc-400 uppercase tracking-tight\",\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n                                    size: 12\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 47,\n                                    columnNumber: 25\n                                }, this),\n                                \"Hinzugef\\xfcgt am \",\n                                new Date(bottle.created_at).toLocaleDateString(\"de-DE\")\n                            ]\n                        }, void 0, true, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 46,\n                            columnNumber: 21\n                        }, this),\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"mt-3 flex items-center justify-between\",\n                            children: [\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                    className: \"px-2 py-1 bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400 text-xs font-semibold rounded-md\",\n                                    children: bottle.category\n                                }, void 0, false, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 52,\n                                    columnNumber: 25\n                                }, this),\n                                /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                    className: \"text-xs text-zinc-400\",\n                                    children: [\n                                        bottle.abv,\n                                        \"% Vol.\"\n                                    ]\n                                }, void 0, true, {\n                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                    lineNumber: 55,\n                                    columnNumber: 25\n                                }, this)\n                            ]\n                        }, void 0, true, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                            lineNumber: 51,\n                            columnNumber: 21\n                        }, this)\n                    ]\n                }, void 0, true, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                    lineNumber: 42,\n                    columnNumber: 17\n                }, this)\n            ]\n        }, void 0, true, {\n            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n            lineNumber: 14,\n            columnNumber: 13\n        }, this)\n    }, void 0, false, {\n        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n        lineNumber: 13,\n        columnNumber: 9\n    }, this);\n}\nfunction BottleGrid({ bottles }) {\n    const [searchQuery, setSearchQuery] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\"\");\n    const [selectedCategory, setSelectedCategory] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const [selectedDistillery, setSelectedDistillery] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const [selectedStatus, setSelectedStatus] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const [sortBy, setSortBy] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(\"created_at\");\n    const categories = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{\n        const cats = new Set(bottles.map((b)=>b.category).filter(Boolean));\n        return Array.from(cats).sort();\n    }, [\n        bottles\n    ]);\n    const distilleries = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{\n        const dists = new Set(bottles.map((b)=>b.distillery).filter(Boolean));\n        return Array.from(dists).sort();\n    }, [\n        bottles\n    ]);\n    const filteredBottles = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{\n        let result = bottles.filter((bottle)=>{\n            const matchesSearch = bottle.name?.toLowerCase().includes(searchQuery.toLowerCase()) || bottle.distillery?.toLowerCase().includes(searchQuery.toLowerCase());\n            const matchesCategory = !selectedCategory || bottle.category === selectedCategory;\n            const matchesDistillery = !selectedDistillery || bottle.distillery === selectedDistillery;\n            const matchesStatus = !selectedStatus || bottle.status === selectedStatus;\n            return matchesSearch && matchesCategory && matchesDistillery && matchesStatus;\n        });\n        // Sorting logic\n        return result.sort((a, b)=>{\n            if (sortBy === \"name\") {\n                return (a.name || \"\").localeCompare(b.name || \"\");\n            } else if (sortBy === \"last_tasted\") {\n                const dateA = a.last_tasted ? new Date(a.last_tasted).getTime() : 0;\n                const dateB = b.last_tasted ? new Date(b.last_tasted).getTime() : 0;\n                return dateB - dateA;\n            } else {\n                return new Date(b.created_at).getTime() - new Date(a.created_at).getTime();\n            }\n        });\n    }, [\n        bottles,\n        searchQuery,\n        selectedCategory,\n        selectedDistillery,\n        sortBy\n    ]);\n    if (!bottles || bottles.length === 0) {\n        return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n            className: \"text-center py-12 p-8 bg-zinc-50 dark:bg-zinc-900/50 rounded-3xl border-2 border-dashed border-zinc-200 dark:border-zinc-800\",\n            children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n                className: \"text-zinc-500\",\n                children: \"Noch keine Flaschen im Vault. Zeit f\\xfcr den ersten Scan! \\uD83E\\uDD43\"\n            }, void 0, false, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                lineNumber: 116,\n                columnNumber: 17\n            }, this)\n        }, void 0, false, {\n            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n            lineNumber: 115,\n            columnNumber: 13\n        }, this);\n    }\n    return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n        className: \"w-full space-y-8\",\n        children: [\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"w-full max-w-6xl mx-auto px-4 space-y-6\",\n                children: [\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"flex flex-col md:flex-row gap-4\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"relative flex-1\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n                                        className: \"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-400\",\n                                        size: 18\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 127,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                                        type: \"text\",\n                                        placeholder: \"Suchen nach Name oder Distille...\",\n                                        value: searchQuery,\n                                        onChange: (e)=>setSearchQuery(e.target.value),\n                                        className: \"w-full pl-10 pr-4 py-3 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-xl focus:ring-2 focus:ring-amber-500 outline-none transition-all\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 128,\n                                        columnNumber: 25\n                                    }, this),\n                                    searchQuery && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                        onClick: ()=>setSearchQuery(\"\"),\n                                        className: \"absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-zinc-600\",\n                                        children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_Calendar_Clock_FlaskConical_Ghost_Lock_Search_Unlock_X_lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n                                            size: 16\n                                        }, void 0, false, {\n                                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                            lineNumber: 140,\n                                            columnNumber: 33\n                                        }, this)\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 136,\n                                        columnNumber: 29\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                lineNumber: 126,\n                                columnNumber: 21\n                            }, this),\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"select\", {\n                                value: sortBy,\n                                onChange: (e)=>setSortBy(e.target.value),\n                                className: \"px-4 py-3 bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-xl text-sm font-medium focus:ring-2 focus:ring-amber-500 outline-none cursor-pointer\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"option\", {\n                                        value: \"created_at\",\n                                        children: \"Neueste zuerst\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 150,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"option\", {\n                                        value: \"last_tasted\",\n                                        children: \"Zuletzt verkostet\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 151,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"option\", {\n                                        value: \"name\",\n                                        children: \"Alphabetisch\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 152,\n                                        columnNumber: 25\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                lineNumber: 145,\n                                columnNumber: 21\n                            }, this)\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                        lineNumber: 125,\n                        columnNumber: 17\n                    }, this),\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"space-y-4\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"flex flex-col gap-2\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                        className: \"text-[10px] font-black uppercase tracking-widest text-zinc-400 px-1\",\n                                        children: \"Kategorie\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 159,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                        className: \"flex gap-2 overflow-x-auto pb-2 scrollbar-hide\",\n                                        children: [\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                                onClick: ()=>setSelectedCategory(null),\n                                                className: `px-4 py-2 rounded-xl text-xs font-bold whitespace-nowrap transition-all border ${selectedCategory === null ? \"bg-amber-600 border-amber-600 text-white shadow-lg shadow-amber-600/20\" : \"bg-white dark:bg-zinc-900 border-zinc-200 dark:border-zinc-800 text-zinc-600 dark:text-zinc-400\"}`,\n                                                children: \"ALLE\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                                lineNumber: 161,\n                                                columnNumber: 29\n                                            }, this),\n                                            categories.map((cat)=>/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                                    onClick: ()=>setSelectedCategory(cat),\n                                                    className: `px-4 py-2 rounded-xl text-xs font-bold whitespace-nowrap transition-all border ${selectedCategory === cat ? \"bg-amber-600 border-amber-600 text-white shadow-lg shadow-amber-600/20\" : \"bg-white dark:bg-zinc-900 border-zinc-200 dark:border-zinc-800 text-zinc-600 dark:text-zinc-400\"}`,\n                                                    children: cat.toUpperCase()\n                                                }, cat, false, {\n                                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                                    lineNumber: 171,\n                                                    columnNumber: 33\n                                                }, this))\n                                        ]\n                                    }, void 0, true, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 160,\n                                        columnNumber: 25\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                lineNumber: 158,\n                                columnNumber: 21\n                            }, this),\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"flex flex-col gap-2\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                        className: \"text-[10px] font-black uppercase tracking-widest text-zinc-400 px-1\",\n                                        children: \"Distillery\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 187,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                        className: \"flex gap-2 overflow-x-auto pb-2 scrollbar-hide\",\n                                        children: [\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                                onClick: ()=>setSelectedDistillery(null),\n                                                className: `px-4 py-2 rounded-xl text-xs font-bold whitespace-nowrap transition-all border ${selectedDistillery === null ? \"bg-zinc-900 dark:bg-white text-white dark:text-zinc-900 border-zinc-900 dark:border-white\" : \"bg-white dark:bg-zinc-900 border-zinc-200 dark:border-zinc-800 text-zinc-600 dark:text-zinc-400\"}`,\n                                                children: \"ALLE\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                                lineNumber: 189,\n                                                columnNumber: 29\n                                            }, this),\n                                            distilleries.map((dist)=>/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                                    onClick: ()=>setSelectedDistillery(dist),\n                                                    className: `px-4 py-2 rounded-xl text-xs font-bold whitespace-nowrap transition-all border ${selectedDistillery === dist ? \"bg-zinc-900 dark:bg-white text-white dark:text-zinc-900 border-zinc-900 dark:border-white\" : \"bg-white dark:bg-zinc-900 border-zinc-200 dark:border-zinc-800 text-zinc-600 dark:text-zinc-400\"}`,\n                                                    children: dist.toUpperCase()\n                                                }, dist, false, {\n                                                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                                    lineNumber: 199,\n                                                    columnNumber: 33\n                                                }, this))\n                                        ]\n                                    }, void 0, true, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 188,\n                                        columnNumber: 25\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                lineNumber: 186,\n                                columnNumber: 21\n                            }, this),\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"flex flex-col gap-2\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                        className: \"text-[10px] font-black uppercase tracking-widest text-zinc-400 px-1\",\n                                        children: \"Status\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 215,\n                                        columnNumber: 25\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                        className: \"flex gap-2 overflow-x-auto pb-2 scrollbar-hide\",\n                                        children: [\n                                            \"sealed\",\n                                            \"open\",\n                                            \"sampled\",\n                                            \"empty\"\n                                        ].map((status)=>/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                                                onClick: ()=>setSelectedStatus(selectedStatus === status ? null : status),\n                                                className: `px-4 py-2 rounded-xl text-xs font-bold whitespace-nowrap transition-all border ${selectedStatus === status ? status === \"open\" ? \"bg-amber-500 border-amber-500 text-white\" : status === \"sampled\" ? \"bg-purple-500 border-purple-500 text-white\" : status === \"empty\" ? \"bg-zinc-500 border-zinc-500 text-white\" : \"bg-blue-600 border-blue-600 text-white\" : \"bg-white dark:bg-zinc-900 border-zinc-200 dark:border-zinc-800 text-zinc-600 dark:text-zinc-400\"}`,\n                                                children: status.toUpperCase()\n                                            }, status, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                                lineNumber: 218,\n                                                columnNumber: 33\n                                            }, this))\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                        lineNumber: 216,\n                                        columnNumber: 25\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                                lineNumber: 214,\n                                columnNumber: 21\n                            }, this)\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                        lineNumber: 156,\n                        columnNumber: 17\n                    }, this)\n                ]\n            }, void 0, true, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                lineNumber: 124,\n                columnNumber: 13\n            }, this),\n            filteredBottles.length > 0 ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 w-full max-w-6xl mx-auto px-4\",\n                children: filteredBottles.map((bottle)=>/*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(BottleCard, {\n                        bottle: bottle\n                    }, bottle.id, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                        lineNumber: 238,\n                        columnNumber: 25\n                    }, this))\n            }, void 0, false, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                lineNumber: 236,\n                columnNumber: 17\n            }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"text-center py-12\",\n                children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"p\", {\n                    className: \"text-zinc-500 italic\",\n                    children: \"Keine Flaschen gefunden, die deinen Filtern entsprechen. \\uD83D\\uDD0E\"\n                }, void 0, false, {\n                    fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                    lineNumber: 243,\n                    columnNumber: 21\n                }, this)\n            }, void 0, false, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n                lineNumber: 242,\n                columnNumber: 17\n            }, this)\n        ]\n    }, void 0, true, {\n        fileName: \"/home/robin/AI/Coding/Whisky/src/components/BottleGrid.tsx\",\n        lineNumber: 122,\n        columnNumber: 9\n    }, this);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 27332 characters]\n//# sourceURL=webpack-internal:///(ssr)/./src/components/BottleGrid.tsx\n");

/***/ }),

/***/ "(ssr)/./src/components/CameraCapture.tsx":
/*!******************************************!*\
  !*** ./src/components/CameraCapture.tsx ***!
  \******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ CameraCapture)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Camera,CheckCircle2,Sparkles,Upload!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/camera.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Camera,CheckCircle2,Sparkles,Upload!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/check-circle-2.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Camera,CheckCircle2,Sparkles,Upload!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/upload.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Camera,CheckCircle2,Sparkles,Upload!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/alert-circle.js\");\n/* harmony import */ var _barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! __barrel_optimize__?names=AlertCircle,Camera,CheckCircle2,Sparkles,Upload!=!lucide-react */ \"(ssr)/./node_modules/lucide-react/dist/esm/icons/sparkles.js\");\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @supabase/auth-helpers-nextjs */ \"(ssr)/./node_modules/@supabase/auth-helpers-nextjs/dist/index.js\");\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _services_analyze_bottle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/services/analyze-bottle */ \"(ssr)/./src/services/analyze-bottle.ts\");\n/* harmony import */ var _services_save_bottle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/services/save-bottle */ \"(ssr)/./src/services/save-bottle.ts\");\n/* __next_internal_client_entry_do_not_use__ default auto */ \n\n\n\n\n\nfunction CameraCapture({ onImageCaptured, onAnalysisComplete, onSaveComplete }) {\n    const supabase = (0,_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__.createClientComponentClient)();\n    const fileInputRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n    const [isProcessing, setIsProcessing] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n    const [isSaving, setIsSaving] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n    const [previewUrl, setPreviewUrl] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const [analysisResult, setAnalysisResult] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n    const handleCapture = async (event)=>{\n        const file = event.target.files?.[0];\n        if (!file) return;\n        setIsProcessing(true);\n        setError(null);\n        setAnalysisResult(null);\n        try {\n            const compressedBase64 = await compressImage(file);\n            setPreviewUrl(compressedBase64);\n            if (onImageCaptured) {\n                onImageCaptured(compressedBase64);\n            }\n            const response = await (0,_services_analyze_bottle__WEBPACK_IMPORTED_MODULE_3__.analyzeBottle)(compressedBase64);\n            if (response.success && response.data) {\n                setAnalysisResult(response.data);\n                if (onAnalysisComplete) {\n                    onAnalysisComplete(response.data);\n                }\n            } else {\n                setError(response.error || \"Analyse fehlgeschlagen.\");\n            }\n        } catch (err) {\n            console.error(\"Processing failed:\", err);\n            setError(\"Verarbeitung fehlgeschlagen. Bitte erneut versuchen.\");\n        } finally{\n            setIsProcessing(false);\n        }\n    };\n    const handleSave = async ()=>{\n        if (!analysisResult || !previewUrl) return;\n        setIsSaving(true);\n        setError(null);\n        try {\n            // Get current user (simple check for now, can be improved with Auth)\n            const { data: { user } } = await supabase.auth.getUser();\n            if (!user) {\n                throw new Error(\"Bitte melde dich an, um Flaschen zu speichern.\");\n            }\n            const response = await (0,_services_save_bottle__WEBPACK_IMPORTED_MODULE_4__.saveBottle)(analysisResult, previewUrl, user.id);\n            if (response.success) {\n                setPreviewUrl(null);\n                setAnalysisResult(null);\n                if (onSaveComplete) onSaveComplete();\n            // Optionale Erfolgsmeldung oder Redirect\n            } else {\n                setError(response.error || \"Speichern fehlgeschlagen.\");\n            }\n        } catch (err) {\n            console.error(\"Save failed:\", err);\n            setError(err instanceof Error ? err.message : \"Speichern fehlgeschlagen.\");\n        } finally{\n            setIsSaving(false);\n        }\n    };\n    const compressImage = (file)=>{\n        return new Promise((resolve, reject)=>{\n            const reader = new FileReader();\n            reader.readAsDataURL(file);\n            reader.onload = (event)=>{\n                const img = new Image();\n                img.src = event.target?.result;\n                img.onload = ()=>{\n                    const canvas = document.createElement(\"canvas\");\n                    const MAX_WIDTH = 1024;\n                    let width = img.width;\n                    let height = img.height;\n                    if (width > MAX_WIDTH) {\n                        height = height * MAX_WIDTH / width;\n                        width = MAX_WIDTH;\n                    }\n                    canvas.width = width;\n                    canvas.height = height;\n                    const ctx = canvas.getContext(\"2d\");\n                    if (!ctx) {\n                        reject(new Error(\"Canvas context not available\"));\n                        return;\n                    }\n                    ctx.drawImage(img, 0, 0, width, height);\n                    const base64 = canvas.toDataURL(\"image/jpeg\", 0.8);\n                    resolve(base64);\n                };\n                img.onerror = reject;\n            };\n            reader.onerror = reject;\n        });\n    };\n    const triggerUpload = ()=>{\n        fileInputRef.current?.click();\n    };\n    return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n        className: \"flex flex-col items-center gap-6 w-full max-w-md mx-auto p-6 bg-white dark:bg-zinc-900 rounded-3xl shadow-2xl border border-zinc-200 dark:border-zinc-800 transition-all hover:shadow-whisky-amber/20\",\n        children: [\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"h2\", {\n                className: \"text-2xl font-bold text-zinc-800 dark:text-zinc-100 italic\",\n                children: \"Magic Shot\"\n            }, void 0, false, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                lineNumber: 133,\n                columnNumber: 13\n            }, this),\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"relative group cursor-pointer w-full aspect-square rounded-2xl border-2 border-dashed border-zinc-300 dark:border-zinc-700 overflow-hidden flex items-center justify-center bg-zinc-50 dark:bg-zinc-800/50 hover:border-amber-500 transition-colors\",\n                onClick: triggerUpload,\n                children: [\n                    previewUrl ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"img\", {\n                        src: previewUrl,\n                        alt: \"Preview\",\n                        className: \"w-full h-full object-cover\"\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                        lineNumber: 140,\n                        columnNumber: 21\n                    }, this) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"flex flex-col items-center gap-2 text-zinc-400 group-hover:text-amber-500 transition-colors\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n                                size: 48,\n                                strokeWidth: 1.5\n                            }, void 0, false, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                lineNumber: 143,\n                                columnNumber: 25\n                            }, this),\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                className: \"text-sm font-medium\",\n                                children: \"Flasche scannen\"\n                            }, void 0, false, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                lineNumber: 144,\n                                columnNumber: 25\n                            }, this)\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                        lineNumber: 142,\n                        columnNumber: 21\n                    }, this),\n                    isProcessing && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"absolute inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center\",\n                        children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"animate-spin rounded-full h-12 w-12 border-b-2 border-white\"\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                            lineNumber: 150,\n                            columnNumber: 25\n                        }, this)\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                        lineNumber: 149,\n                        columnNumber: 21\n                    }, this)\n                ]\n            }, void 0, true, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                lineNumber: 135,\n                columnNumber: 13\n            }, this),\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"input\", {\n                type: \"file\",\n                accept: \"image/*\",\n                capture: \"environment\",\n                ref: fileInputRef,\n                onChange: handleCapture,\n                className: \"hidden\"\n            }, void 0, false, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                lineNumber: 155,\n                columnNumber: 13\n            }, this),\n            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"button\", {\n                onClick: previewUrl && analysisResult ? handleSave : triggerUpload,\n                disabled: isProcessing || isSaving,\n                className: \"w-full py-4 px-6 bg-amber-600 hover:bg-amber-700 text-white rounded-xl font-semibold flex items-center justify-center gap-2 transition-all active:scale-[0.98] shadow-lg shadow-amber-600/20 disabled:opacity-50\",\n                children: isSaving ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                            className: \"animate-spin rounded-full h-5 w-5 border-b-2 border-white\"\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                            lineNumber: 171,\n                            columnNumber: 25\n                        }, this),\n                        \"Wird gespeichert...\"\n                    ]\n                }, void 0, true) : previewUrl && analysisResult ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n                            size: 20\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                            lineNumber: 176,\n                            columnNumber: 25\n                        }, this),\n                        \"Im Vault speichern\"\n                    ]\n                }, void 0, true) : previewUrl ? /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n                            size: 20\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                            lineNumber: 181,\n                            columnNumber: 25\n                        }, this),\n                        \"Neu aufnehmen\"\n                    ]\n                }, void 0, true) : /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n                    children: [\n                        /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n                            size: 20\n                        }, void 0, false, {\n                            fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                            lineNumber: 186,\n                            columnNumber: 25\n                        }, this),\n                        \"Kamera \\xf6ffnen\"\n                    ]\n                }, void 0, true)\n            }, void 0, false, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                lineNumber: 164,\n                columnNumber: 13\n            }, this),\n            error && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"flex items-center gap-2 text-red-500 text-sm bg-red-50 dark:bg-red-900/10 p-3 rounded-lg w-full\",\n                children: [\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n                        size: 16\n                    }, void 0, false, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                        lineNumber: 194,\n                        columnNumber: 21\n                    }, this),\n                    error\n                ]\n            }, void 0, true, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                lineNumber: 193,\n                columnNumber: 17\n            }, this),\n            previewUrl && !isProcessing && !error && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                className: \"flex flex-col gap-3 w-full animate-in fade-in slide-in-from-top-4 duration-500\",\n                children: [\n                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"flex items-center gap-2 text-green-500 text-sm bg-green-50 dark:bg-green-900/10 p-3 rounded-lg w-full\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n                                size: 16\n                            }, void 0, false, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                lineNumber: 202,\n                                columnNumber: 25\n                            }, this),\n                            \"Bild erfolgreich analysiert\"\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                        lineNumber: 201,\n                        columnNumber: 21\n                    }, this),\n                    analysisResult && /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                        className: \"p-4 bg-zinc-50 dark:bg-zinc-800/50 rounded-2xl border border-zinc-200 dark:border-zinc-700\",\n                        children: [\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"flex items-center gap-2 mb-3 text-amber-600 dark:text-amber-500\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(_barrel_optimize_names_AlertCircle_Camera_CheckCircle2_Sparkles_Upload_lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n                                        size: 18\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                        lineNumber: 209,\n                                        columnNumber: 33\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                        className: \"font-bold text-sm uppercase tracking-wider\",\n                                        children: \"Ergebnisse\"\n                                    }, void 0, false, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                        lineNumber: 210,\n                                        columnNumber: 33\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                lineNumber: 208,\n                                columnNumber: 29\n                            }, this),\n                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                className: \"space-y-2\",\n                                children: [\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                        className: \"flex justify-between text-sm\",\n                                        children: [\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"text-zinc-500\",\n                                                children: \"Name:\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 214,\n                                                columnNumber: 37\n                                            }, this),\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"font-semibold\",\n                                                children: analysisResult.name || \"-\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 215,\n                                                columnNumber: 37\n                                            }, this)\n                                        ]\n                                    }, void 0, true, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                        lineNumber: 213,\n                                        columnNumber: 33\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                        className: \"flex justify-between text-sm\",\n                                        children: [\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"text-zinc-500\",\n                                                children: \"Distille:\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 218,\n                                                columnNumber: 37\n                                            }, this),\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"font-semibold\",\n                                                children: analysisResult.distillery || \"-\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 219,\n                                                columnNumber: 37\n                                            }, this)\n                                        ]\n                                    }, void 0, true, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                        lineNumber: 217,\n                                        columnNumber: 33\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                        className: \"flex justify-between text-sm\",\n                                        children: [\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"text-zinc-500\",\n                                                children: \"Kategorie:\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 222,\n                                                columnNumber: 37\n                                            }, this),\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"font-semibold\",\n                                                children: analysisResult.category || \"-\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 223,\n                                                columnNumber: 37\n                                            }, this)\n                                        ]\n                                    }, void 0, true, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                        lineNumber: 221,\n                                        columnNumber: 33\n                                    }, this),\n                                    /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"div\", {\n                                        className: \"flex justify-between text-sm\",\n                                        children: [\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"text-zinc-500\",\n                                                children: \"ABV:\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 226,\n                                                columnNumber: 37\n                                            }, this),\n                                            /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"span\", {\n                                                className: \"font-semibold\",\n                                                children: analysisResult.abv ? `${analysisResult.abv}%` : \"-\"\n                                            }, void 0, false, {\n                                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                                lineNumber: 227,\n                                                columnNumber: 37\n                                            }, this)\n                                        ]\n                                    }, void 0, true, {\n                                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                        lineNumber: 225,\n                                        columnNumber: 33\n                                    }, this)\n                                ]\n                            }, void 0, true, {\n                                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                                lineNumber: 212,\n                                columnNumber: 29\n                            }, this)\n                        ]\n                    }, void 0, true, {\n                        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                        lineNumber: 207,\n                        columnNumber: 25\n                    }, this)\n                ]\n            }, void 0, true, {\n                fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n                lineNumber: 200,\n                columnNumber: 17\n            }, this)\n        ]\n    }, void 0, true, {\n        fileName: \"/home/robin/AI/Coding/Whisky/src/components/CameraCapture.tsx\",\n        lineNumber: 132,\n        columnNumber: 9\n    }, this);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 21180 characters]\n//# sourceURL=webpack-internal:///(ssr)/./src/components/CameraCapture.tsx\n");

/***/ }),

/***/ "(ssr)/./src/services/analyze-bottle.ts":
/*!****************************************!*\
  !*** ./src/services/analyze-bottle.ts ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   analyzeBottle: () => (/* binding */ analyzeBottle)
/* harmony export */ });
/* harmony import */ var next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! next/dist/client/app-call-server */ "(ssr)/./node_modules/next/dist/client/app-call-server.js");
/* harmony import */ var next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var private_next_rsc_action_client_wrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! private-next-rsc-action-client-wrapper */ "(ssr)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-client-wrapper.js");



function __build_action__(action, args) {
  return (0,next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0__.callServer)(action.$$id, args)
}

/* __next_internal_action_entry_do_not_use__ {"af8f7c7b0fe98b99031bb1c9e8ef0ed13b2eae40":"analyzeBottle"} */ var analyzeBottle = (0,private_next_rsc_action_client_wrapper__WEBPACK_IMPORTED_MODULE_1__.createServerReference)("af8f7c7b0fe98b99031bb1c9e8ef0ed13b2eae40");




/***/ }),

/***/ "(ssr)/./src/services/save-bottle.ts":
/*!*************************************!*\
  !*** ./src/services/save-bottle.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   saveBottle: () => (/* binding */ saveBottle)
/* harmony export */ });
/* harmony import */ var next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! next/dist/client/app-call-server */ "(ssr)/./node_modules/next/dist/client/app-call-server.js");
/* harmony import */ var next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var private_next_rsc_action_client_wrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! private-next-rsc-action-client-wrapper */ "(ssr)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-client-wrapper.js");



function __build_action__(action, args) {
  return (0,next_dist_client_app_call_server__WEBPACK_IMPORTED_MODULE_0__.callServer)(action.$$id, args)
}

/* __next_internal_action_entry_do_not_use__ {"9cc2ffbf85f4e72220537b4253faa867d3a48bad":"saveBottle"} */ var saveBottle = (0,private_next_rsc_action_client_wrapper__WEBPACK_IMPORTED_MODULE_1__.createServerReference)("9cc2ffbf85f4e72220537b4253faa867d3a48bad");




/***/ }),

/***/ "(rsc)/./src/app/globals.css":
/*!*****************************!*\
  !*** ./src/app/globals.css ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (\"955ec95b3e6f\");\nif (false) {}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHJzYykvLi9zcmMvYXBwL2dsb2JhbHMuY3NzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQSxpRUFBZSxjQUFjO0FBQzdCLElBQUksS0FBVSxFQUFFLEVBQXVCIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vd2hpc2t5LXZhdWx0Ly4vc3JjL2FwcC9nbG9iYWxzLmNzcz81NWFiIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IFwiOTU1ZWM5NWIzZTZmXCJcbmlmIChtb2R1bGUuaG90KSB7IG1vZHVsZS5ob3QuYWNjZXB0KCkgfVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///(rsc)/./src/app/globals.css\n");

/***/ }),

/***/ "(rsc)/./src/app/layout.tsx":
/*!****************************!*\
  !*** ./src/app/layout.tsx ***!
  \****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (/* binding */ RootLayout),\n/* harmony export */   metadata: () => (/* binding */ metadata)\n/* harmony export */ });\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-dev-runtime */ \"(rsc)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js\");\n/* harmony import */ var react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var next_font_google_target_css_path_src_app_layout_tsx_import_Inter_arguments_subsets_latin_variableName_inter___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! next/font/google/target.css?{\"path\":\"src/app/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"} */ \"(rsc)/./node_modules/next/font/google/target.css?{\\\"path\\\":\\\"src/app/layout.tsx\\\",\\\"import\\\":\\\"Inter\\\",\\\"arguments\\\":[{\\\"subsets\\\":[\\\"latin\\\"]}],\\\"variableName\\\":\\\"inter\\\"}\");\n/* harmony import */ var next_font_google_target_css_path_src_app_layout_tsx_import_Inter_arguments_subsets_latin_variableName_inter___WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_font_google_target_css_path_src_app_layout_tsx_import_Inter_arguments_subsets_latin_variableName_inter___WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./globals.css */ \"(rsc)/./src/app/globals.css\");\n\n\n\nconst metadata = {\n    title: \"Whisky Vault\",\n    description: \"Your digital whisky collection\",\n    manifest: \"/manifest.json\"\n};\nfunction RootLayout({ children }) {\n    return /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"html\", {\n        lang: \"en\",\n        children: /*#__PURE__*/ (0,react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV)(\"body\", {\n            className: (next_font_google_target_css_path_src_app_layout_tsx_import_Inter_arguments_subsets_latin_variableName_inter___WEBPACK_IMPORTED_MODULE_2___default().className),\n            children: children\n        }, void 0, false, {\n            fileName: \"/home/robin/AI/Coding/Whisky/src/app/layout.tsx\",\n            lineNumber: 20,\n            columnNumber: 13\n        }, this)\n    }, void 0, false, {\n        fileName: \"/home/robin/AI/Coding/Whisky/src/app/layout.tsx\",\n        lineNumber: 19,\n        columnNumber: 9\n    }, this);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKHJzYykvLi9zcmMvYXBwL2xheW91dC50c3giLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFJTUE7QUFGaUI7QUFJaEIsTUFBTUMsV0FBcUI7SUFDOUJDLE9BQU87SUFDUEMsYUFBYTtJQUNiQyxVQUFVO0FBQ2QsRUFBRTtBQUVhLFNBQVNDLFdBQVcsRUFDL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zdCIsIlJvb3RMYXlvdXQiLCJjaGlsZHJlbiIsImh0bWwiLCJsYW5nIiwiYm9keSIsImNsYXNzTmFtZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///(rsc)/./src/app/layout.tsx\n");

/***/ }),

/***/ "(rsc)/./src/app/page.tsx":
/*!**************************!*\
  !*** ./src/app/page.tsx ***!
  \**************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   $$typeof: () => (/* binding */ $$typeof),
/* harmony export */   __esModule: () => (/* binding */ __esModule),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! next/dist/build/webpack/loaders/next-flight-loader/module-proxy */ "(rsc)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js");

const proxy = (0,next_dist_build_webpack_loaders_next_flight_loader_module_proxy__WEBPACK_IMPORTED_MODULE_0__.createProxy)(String.raw`/home/robin/AI/Coding/Whisky/src/app/page.tsx`)

// Accessing the __esModule property and exporting $$typeof are required here.
// The __esModule getter forces the proxy target to create the default export
// and the $$typeof value is for rendering logic to determine if the module
// is a client boundary.
const { __esModule, $$typeof } = proxy;
const __default__ = proxy.default;


/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__default__);

/***/ }),

/***/ "(action-browser)/./src/lib/gemini.ts":
/*!***************************!*\
  !*** ./src/lib/gemini.ts ***!
  \***************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   SYSTEM_INSTRUCTION: () => (/* binding */ SYSTEM_INSTRUCTION),\n/* harmony export */   geminiModel: () => (/* binding */ geminiModel)\n/* harmony export */ });\n/* harmony import */ var _google_generative_ai__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @google/generative-ai */ \"(action-browser)/./node_modules/@google/generative-ai/dist/index.mjs\");\n\nconst apiKey = process.env.GEMINI_API_KEY;\nconst genAI = new _google_generative_ai__WEBPACK_IMPORTED_MODULE_0__.GoogleGenerativeAI(apiKey);\nconst geminiModel = genAI.getGenerativeModel({\n    model: \"gemini-3-flash-preview\",\n    generationConfig: {\n        responseMimeType: \"application/json\"\n    }\n});\nconst SYSTEM_INSTRUCTION = `\nYou are a sommelier and database clerk. Analyze the whisky bottle image. Extract precise metadata. \nIf a value is not visible, use null. \nInfer the 'Category' (e.g., Islay Single Malt) based on the Distillery if possible. \nSearch specifically for a \"Whiskybase ID\" or \"WB ID\" on the label. \nOutput raw JSON matching the following schema:\n{\n  \"name\": string | null,\n  \"distillery\": string | null,\n  \"category\": string | null,\n  \"abv\": number | null,\n  \"age\": number | null,\n  \"vintage\": string | null,\n  \"bottleCode\": string | null,\n  \"whiskybaseId\": string | null\n}\n`;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFjdGlvbi1icm93c2VyKS8uL3NyYy9saWIvZ2VtaW5pLnRzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUEyRDtBQUUzRCxNQUFNQyxTQUFTQyxRQUFRQyxHQUFHLENBQUNDLGNBQWM7QUFFekMsTUFBTUMsUUFBUSxJQUFJTCxxRUFBa0JBLENBQUNDO0FBRTlCLE1BQU1LLGNBQWNELE1BQU1FLGtCQUFrQixDQUFDO0lBQ2xEQyxPQUFPO0lBQ1BDLGtCQUFrQjtRQUNoQkMsa0JBQWtCO0lBQ3BCO0FBQ0YsR0FBRztBQUVJLE1BQU1DLHFCQUFxQixDQUFDOzs7Ozs7Ozs7Ozs7Ozs7O0FBZ0JuQyxDQUFDLENBQUMiLCJ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Ijogc3RyaW5nIHwgbnVsbCxcbiAgXCJkaXN0aWxsZXJ5XCI6IHN0cmluZyB8IG51bGwsXG4gIFwiY2F0ZWdvcnlcIjogc3RyaW5nIHwgbnVsbCxcbiAgXCJhYnZcIjogbnVtYmVyIHwgbnVsbCxcbiAgXCJhZ2VcIjogbnVtYmVyIHwgbnVsbCxcbiAgXCJ2aW50YWdlXCI6IHN0cmluZyB8IG51bGwsXG4gIFwiYm90dGxlQ29kZVwiOiBzdHJpbmcgfCBudWxsLFxuICBcIndoaXNreWJhc2VJZFwiOiBzdHJpbmcgfCBudWxsXG59XG5gO1xuIl0sIm5hbWVzIjpbIkdvb2dsZUdlbmVyYXRpdmVBSSIsImFwaUtleSIsInByb2Nlc3MiLCJlbnYiLCJHRU1JTklfQVBJX0tFWSIsImdlbkFJIiwiZ2VtaW5pTW9kZWwiLCJnZXRHZW5lcmF0aXZlTW9kZWwiLCJtb2RlbCIsImdlbmVyYXRpb25Db25maWciLCJyZXNwb25zZU1pbWVUeXBlIiwiU1lTVEVNX0lOU1RSVUNUSU9OIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///(action-browser)/./src/lib/gemini.ts\n");

/***/ }),

/***/ "(action-browser)/./src/services/analyze-bottle.ts":
/*!****************************************!*\
  !*** ./src/services/analyze-bottle.ts ***!
  \****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   analyzeBottle: () => (/* binding */ analyzeBottle)\n/* harmony export */ });\n/* harmony import */ var private_next_rsc_action_proxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! private-next-rsc-action-proxy */ \"(action-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-proxy.js\");\n/* harmony import */ var private_next_rsc_action_encryption__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! private-next-rsc-action-encryption */ \"(action-browser)/./node_modules/next/dist/server/app-render/action-encryption.js\");\n/* harmony import */ var private_next_rsc_action_encryption__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(private_next_rsc_action_encryption__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lib_gemini__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/lib/gemini */ \"(action-browser)/./src/lib/gemini.ts\");\n/* harmony import */ var _types_whisky__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/types/whisky */ \"(action-browser)/./src/types/whisky.ts\");\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @supabase/auth-helpers-nextjs */ \"(action-browser)/./node_modules/@supabase/auth-helpers-nextjs/dist/index.js\");\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var next_headers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! next/headers */ \"(action-browser)/./node_modules/next/dist/api/headers.js\");\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! crypto */ \"crypto\");\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var private_next_rsc_action_validate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! private-next-rsc-action-validate */ \"(action-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-validate.js\");\n/* __next_internal_action_entry_do_not_use__ {\"af8f7c7b0fe98b99031bb1c9e8ef0ed13b2eae40\":\"analyzeBottle\"} */ \n\n\n\n\n\n\nasync function analyzeBottle(base64Image) {\n    const supabase = (0,_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_4__.createServerActionClient)({\n        cookies: next_headers__WEBPACK_IMPORTED_MODULE_5__.cookies\n    });\n    if (!process.env.GEMINI_API_KEY) {\n        return {\n            success: false,\n            error: \"GEMINI_API_KEY is not configured.\"\n        };\n    }\n    try {\n        // Ensure user is authenticated for tracking/billing\n        const { data: { session } } = await supabase.auth.getSession();\n        if (!session) {\n            return {\n                success: false,\n                error: \"Nicht autorisiert oder Session abgelaufen.\"\n            };\n        }\n        // 1. Generate Hash for Caching\n        const base64Data = base64Image.split(\",\")[1] || base64Image;\n        const imageHash = (0,crypto__WEBPACK_IMPORTED_MODULE_6__.createHash)(\"sha256\").update(base64Data).digest(\"hex\");\n        console.log(`[AI Cache] Checking hash: ${imageHash}`);\n        // 2. Check Cache\n        const { data: cachedResult } = await supabase.from(\"vision_cache\").select(\"result\").eq(\"hash\", imageHash).maybeSingle();\n        if (cachedResult) {\n            console.log(`[AI Cache] Hit! hash: ${imageHash}`);\n            return {\n                success: true,\n                data: cachedResult.result\n            };\n        }\n        console.log(`[AI Cache] Miss. Calling Gemini...`);\n        // 3. AI Analysis\n        const result = await _lib_gemini__WEBPACK_IMPORTED_MODULE_2__.geminiModel.generateContent([\n            {\n                inlineData: {\n                    data: base64Data,\n                    mimeType: \"image/jpeg\"\n                }\n            },\n            {\n                text: _lib_gemini__WEBPACK_IMPORTED_MODULE_2__.SYSTEM_INSTRUCTION\n            }\n        ]);\n        const responseText = result.response.text();\n        let jsonData = JSON.parse(responseText);\n        if (Array.isArray(jsonData)) {\n            jsonData = jsonData[0];\n        }\n        if (!jsonData) {\n            throw new Error(\"Keine Daten in der KI-Antwort gefunden.\");\n        }\n        const validatedData = _types_whisky__WEBPACK_IMPORTED_MODULE_3__.BottleMetadataSchema.parse(jsonData);\n        // 4. Store in Cache\n        const { error: storeError } = await supabase.from(\"vision_cache\").insert({\n            hash: imageHash,\n            result: validatedData\n        });\n        if (storeError) {\n            console.warn(`[AI Cache] Storage failed: ${storeError.message}`);\n        } else {\n            console.log(`[AI Cache] Stored new result for hash: ${imageHash}`);\n        }\n        return {\n            success: true,\n            data: validatedData\n        };\n    } catch (error) {\n        console.error(\"Gemini Analysis Error:\", error);\n        return {\n            success: false,\n            error: error instanceof Error ? error.message : \"An unknown error occurred during analysis.\"\n        };\n    }\n}\n\n(0,private_next_rsc_action_validate__WEBPACK_IMPORTED_MODULE_7__.ensureServerEntryExports)([\n    analyzeBottle\n]);\n(0,private_next_rsc_action_proxy__WEBPACK_IMPORTED_MODULE_0__.createActionProxy)(\"af8f7c7b0fe98b99031bb1c9e8ef0ed13b2eae40\", analyzeBottle);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 7364 characters]\n//# sourceURL=webpack-internal:///(action-browser)/./src/services/analyze-bottle.ts\n");

/***/ }),

/***/ "(action-browser)/./src/services/save-bottle.ts":
/*!*************************************!*\
  !*** ./src/services/save-bottle.ts ***!
  \*************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   saveBottle: () => (/* binding */ saveBottle)\n/* harmony export */ });\n/* harmony import */ var private_next_rsc_action_proxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! private-next-rsc-action-proxy */ \"(action-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-proxy.js\");\n/* harmony import */ var private_next_rsc_action_encryption__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! private-next-rsc-action-encryption */ \"(action-browser)/./node_modules/next/dist/server/app-render/action-encryption.js\");\n/* harmony import */ var private_next_rsc_action_encryption__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(private_next_rsc_action_encryption__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @supabase/auth-helpers-nextjs */ \"(action-browser)/./node_modules/@supabase/auth-helpers-nextjs/dist/index.js\");\n/* harmony import */ var _supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var next_headers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! next/headers */ \"(action-browser)/./node_modules/next/dist/api/headers.js\");\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid */ \"(action-browser)/./node_modules/uuid/dist-node/index.js\");\n/* harmony import */ var private_next_rsc_action_validate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! private-next-rsc-action-validate */ \"(action-browser)/./node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-validate.js\");\n/* __next_internal_action_entry_do_not_use__ {\"9cc2ffbf85f4e72220537b4253faa867d3a48bad\":\"saveBottle\"} */ \n\n\n\n\nasync function saveBottle(metadata, base64Image, _ignoredUserId // Keeping for signature compatibility if needed, but using session internally\n) {\n    const supabase = (0,_supabase_auth_helpers_nextjs__WEBPACK_IMPORTED_MODULE_2__.createServerActionClient)({\n        cookies: next_headers__WEBPACK_IMPORTED_MODULE_3__.cookies\n    });\n    try {\n        // Verify user session and get ID from the server side (secure)\n        const { data: { session } } = await supabase.auth.getSession();\n        if (!session) {\n            throw new Error(\"Nicht autorisiert oder Session abgelaufen.\");\n        }\n        const userId = session.user.id;\n        // 1. Upload Image to Storage\n        const base64Data = base64Image.split(\",\")[1] || base64Image;\n        const buffer = Buffer.from(base64Data, \"base64\");\n        const fileName = `${userId}/${(0,uuid__WEBPACK_IMPORTED_MODULE_4__.v4)()}.jpg`;\n        const { data: uploadData, error: uploadError } = await supabase.storage.from(\"bottles\").upload(fileName, buffer, {\n            contentType: \"image/jpeg\",\n            upsert: true\n        });\n        if (uploadError) throw new Error(`Upload Error: ${uploadError.message}`);\n        // Get Public URL\n        const { data: { publicUrl } } = supabase.storage.from(\"bottles\").getPublicUrl(fileName);\n        // 2. Save Metadata to Database\n        const { data: bottleData, error: dbError } = await supabase.from(\"bottles\").insert({\n            user_id: userId,\n            name: metadata.name,\n            distillery: metadata.distillery,\n            category: metadata.category,\n            abv: metadata.abv,\n            age: metadata.age,\n            whiskybase_id: metadata.whiskybaseId,\n            image_url: publicUrl,\n            status: \"sealed\"\n        }).select().single();\n        if (dbError) throw new Error(`Database Error: ${dbError.message}`);\n        return {\n            success: true,\n            data: bottleData\n        };\n    } catch (error) {\n        console.error(\"Save Bottle Error:\", error);\n        return {\n            success: false,\n            error: error instanceof Error ? error.message : \"An unknown error occurred while saving.\"\n        };\n    }\n}\n\n(0,private_next_rsc_action_validate__WEBPACK_IMPORTED_MODULE_5__.ensureServerEntryExports)([\n    saveBottle\n]);\n(0,private_next_rsc_action_proxy__WEBPACK_IMPORTED_MODULE_0__.createActionProxy)(\"9cc2ffbf85f4e72220537b4253faa867d3a48bad\", saveBottle);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 6216 characters]\n//# sourceURL=webpack-internal:///(action-browser)/./src/services/save-bottle.ts\n");

/***/ }),

/***/ "(action-browser)/./src/types/whisky.ts":
/*!*****************************!*\
  !*** ./src/types/whisky.ts ***!
  \*****************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   BottleMetadataSchema: () => (/* binding */ BottleMetadataSchema)\n/* harmony export */ });\n/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zod */ \"(action-browser)/./node_modules/zod/index.js\");\n\nconst BottleMetadataSchema = zod__WEBPACK_IMPORTED_MODULE_0__.z.object({\n    name: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable(),\n    distillery: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable(),\n    category: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable(),\n    abv: zod__WEBPACK_IMPORTED_MODULE_0__.z.number().nullable(),\n    age: zod__WEBPACK_IMPORTED_MODULE_0__.z.number().nullable(),\n    vintage: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable(),\n    bottleCode: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable(),\n    whiskybaseId: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().nullable()\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiKGFjdGlvbi1icm93c2VyKS8uL3NyYy90eXBlcy93aGlza3kudHMiLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBd0I7QUFFakIsTUFBTUMsdUJBQXVCRCxrQ0FBQ0EsQ0FBQ0UsTUFBTSxDQUFDO0lBQ3pDQyxNQUFNSCxrQ0FBQ0EsQ0FBQ0ksTUFBTSxHQUFHQyxRQUFRO0lBQ3pCQyxZQUFZTixrQ0FBQ0EsQ0FBQ0ksTUFBTSxHQUFHQyxRQUFRO0lBQy9CRSxVQUFVUCxrQ0FBQ0EsQ0FBQ0ksTUFBTSxHQUFHQyxRQUFRO0lBQzdCRyxLQUFLUixrQ0FBQ0EsQ0FBQ1MsTUFBTSxHQUFHSixRQUFRO0lBQ3hCSyxLQUFLVixrQ0FBQ0EsQ0FBQ1MsTUFBTSxHQUFHSixRQUFRO0lBQ3hCTSxTQUFTWCxrQ0FBQ0EsQ0FBQ0ksTUFBTSxHQUFHQyxRQUFRO0lBQzVCTyxZQUFZWixrQ0FBQ0EsQ0FBQ0ksTUFBTSxHQUFHQyxRQUFRO0lBQy9CUSxjQUFjYixrQ0FBQ0EsQ0FBQ0ksTUFBTSxHQUFHQyxRQUFRO0FBQ3JDLEdBQUciLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly93aGlza3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/whisky.ts\n");

/***/ })

};
;

// load runtime
var __webpack_require__ = require("../webpack-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = __webpack_require__.X(0, ["vendor-chunks/next","vendor-chunks/@swc","vendor-chunks/@supabase","vendor-chunks/jose","vendor-chunks/tslib","vendor-chunks/iceberg-js","vendor-chunks/lucide-react","vendor-chunks/set-cookie-parser","vendor-chunks/uuid","vendor-chunks/zod","vendor-chunks/@google"], () => (__webpack_exec__("(rsc)/./node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&page=%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%2Fpage.tsx&appDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fhome%2Frobin%2FAI%2FCoding%2FWhisky&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!")));
module.exports = __webpack_exports__;

})();