{"version":3,"file":"9-AIf6cQ-D.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/match/_id_/report/_page.server.js","../../../.svelte-kit/adapter-node/nodes/9.js"],"sourcesContent":["import { p as passMatrixBuild } from \"../../../../../chunks/utils.js\";\nimport { readFile } from \"fs/promises\";\nimport \"path\";\nimport { g as getForm } from \"../../../../../chunks/getForm.js\";\nconst games22Path = \"src/pulse_past.json\";\nconst filePath = \"src/_games.json\";\nconst prerender = false;\nconst games = JSON.parse(await readFile(filePath, \"utf8\"));\nconst games22 = JSON.parse(await readFile(games22Path, \"utf8\"));\nasync function load({ fetch, params }) {\n  const data = (\n    // (await read(\"/\" + path.resolve(\"./\") + \"/\" + filePath).json())[params.id] ??\n    games[params.id] ?? games22[params.id] ?? // (await read(\"/\" + path.resolve(\"./\") + \"/\" + games22Path).json())\n    // [\n    //   params.id\n    // ] ??\n    await (await fetch(\n      `https://ugpl-ce55b-default-rtdb.europe-west1.firebasedatabase.app/games/${params.id || \"\"}.json`\n    )).json()\n  );\n  const homepasses = passMatrixBuild(data, \"home\");\n  const awaypasses = passMatrixBuild(data, \"away\");\n  const hometeamform = await getForm(\n    // data.homeid,\n    data?.homeid,\n    params.id,\n    // JSON.parse(JSON.stringify(games))\n    structuredClone(games)\n    // games\n  );\n  const awayteamform = await getForm(\n    data.awayid,\n    params.id,\n    // JSON.parse(JSON.stringify(games))\n    // games\n    structuredClone(games)\n  );\n  return {\n    id: params.id,\n    match: data,\n    // headtohead: headtohead.slice(0, 5),\n    hometeamform: hometeamform.slice(0, 5),\n    awayteamform: awayteamform.slice(0, 5),\n    // passes: newmatrix,\n    // // lineup: colNames,\n    // lineup: newcolNames,\n    // // rowNames: rowNames,\n    // rowNames: newrowNames,\n    // colNames: newcolNames,\n    // playerRoles: playerRoles, //dt[2],\n    homepasses,\n    awaypasses\n  };\n}\nexport {\n  load,\n  prerender\n};\n","import * as server from '../entries/pages/match/_id_/report/_page.server.js';\n\nexport const index = 9;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/match/_id_/report/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/match/[id]/report/+page.server.js\";\nexport const imports = [\"_app/immutable/nodes/9.eVr_O04s.js\",\"_app/immutable/chunks/scheduler.XyTI1WgU.js\",\"_app/immutable/chunks/index.HYtw-Ape.js\",\"_app/immutable/chunks/each.ru6HoQ3H.js\",\"_app/immutable/chunks/Carousel.svelte_svelte_type_style_lang.Y7LG7w04.js\",\"_app/immutable/chunks/_commonjsHelpers.bReWyRC4.js\",\"_app/immutable/chunks/SvelteImg.iqmTAVve.js\",\"_app/immutable/chunks/spread.rEx3vLA9.js\",\"_app/immutable/chunks/PassMatrix.svelte_svelte_type_style_lang.wlfqKiuk.js\",\"_app/immutable/chunks/DownloadButton.g7TS8ZMi.js\",\"_app/immutable/chunks/stores.cmjOqmRh.js\",\"_app/immutable/chunks/entry.JOuTWzBz.js\",\"_app/immutable/chunks/index.QwWjWMOQ.js\"];\nexport const stylesheets = [\"_app/immutable/assets/9.YGRNGOwV.css\",\"_app/immutable/assets/Carousel.zkrfpHbE.css\",\"_app/immutable/assets/PassMatrix.iBattieK.css\",\"_app/immutable/assets/DownloadButton.kiusxNa0.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;;AAIA,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AACnC,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AAChE,eAAe,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;AACvC,EAAE,MAAM,IAAI;AACZ;AACA,IAAI,KAAK,CAA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