Rocky_Mountain_Vending/.pnpm-store/v10/files/6b/1296d2bdb090b76410051ba59025b5bf8c10b3f91fa272f9835a5c139f932214b965ee78b7baa62d09354717359d9a7fd9ff0f1b45e1c0a8ab9ebe3f389f50
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
3.6 KiB
Text

{"version":3,"sources":["../../../../../src/client/components/router-reducer/reducers/find-head-in-cache.ts"],"sourcesContent":["import type {\n FlightRouterState,\n CacheNode,\n} from '../../../../shared/lib/app-router-types'\nimport { DEFAULT_SEGMENT_KEY } from '../../../../shared/lib/segment'\nimport { createRouterCacheKey } from '../create-router-cache-key'\n\nexport function findHeadInCache(\n cache: CacheNode,\n parallelRoutes: FlightRouterState[1]\n): [CacheNode, string, string] | null {\n return findHeadInCacheImpl(cache, parallelRoutes, '', '')\n}\n\nfunction findHeadInCacheImpl(\n cache: CacheNode,\n parallelRoutes: FlightRouterState[1],\n keyPrefix: string,\n keyPrefixWithoutSearchParams: string\n): [CacheNode, string, string] | null {\n const isLastItem = Object.keys(parallelRoutes).length === 0\n if (isLastItem) {\n // Returns the entire Cache Node of the segment whose head we will render.\n return [cache, keyPrefix, keyPrefixWithoutSearchParams]\n }\n\n // First try the 'children' parallel route if it exists\n // when starting from the \"root\", this corresponds with the main page component\n const parallelRoutesKeys = Object.keys(parallelRoutes).filter(\n (key) => key !== 'children'\n )\n\n // if we are at the root, we need to check the children slot first\n if ('children' in parallelRoutes) {\n parallelRoutesKeys.unshift('children')\n }\n\n for (const key of parallelRoutesKeys) {\n const [segment, childParallelRoutes] = parallelRoutes[key]\n // If the parallel is not matched and using the default segment,\n // skip searching the head from it.\n if (segment === DEFAULT_SEGMENT_KEY) {\n continue\n }\n const childSegmentMap = cache.parallelRoutes.get(key)\n if (!childSegmentMap) {\n continue\n }\n\n const cacheKey = createRouterCacheKey(segment)\n const cacheKeyWithoutSearchParams = createRouterCacheKey(segment, true)\n\n const cacheNode = childSegmentMap.get(cacheKey)\n if (!cacheNode) {\n continue\n }\n\n const item = findHeadInCacheImpl(\n cacheNode,\n childParallelRoutes,\n keyPrefix + '/' + cacheKey,\n keyPrefix + '/' + cacheKeyWithoutSearchParams\n )\n\n if (item) {\n return item\n }\n }\n\n return null\n}\n"],"names":["DEFAULT_SEGMENT_KEY","createRouterCacheKey","findHeadInCache","cache","parallelRoutes","findHeadInCacheImpl","keyPrefix","keyPrefixWithoutSearchParams","isLastItem","Object","keys","length","parallelRoutesKeys","filter","key","unshift","segment","childParallelRoutes","childSegmentMap","get","cacheKey","cacheKeyWithoutSearchParams","cacheNode","item"],"mappings":"AAIA,SAASA,mBAAmB,QAAQ,iCAAgC;AACpE,SAASC,oBAAoB,QAAQ,6BAA4B;AAEjE,OAAO,SAASC,gBACdC,KAAgB,EAChBC,cAAoC;IAEpC,OAAOC,oBAAoBF,OAAOC,gBAAgB,IAAI;AACxD;AAEA,SAASC,oBACPF,KAAgB,EAChBC,cAAoC,EACpCE,SAAiB,EACjBC,4BAAoC;IAEpC,MAAMC,aAAaC,OAAOC,IAAI,CAACN,gBAAgBO,MAAM,KAAK;IAC1D,IAAIH,YAAY;QACd,0EAA0E;QAC1E,OAAO;YAACL;YAAOG;YAAWC;SAA6B;IACzD;IAEA,uDAAuD;IACvD,+EAA+E;IAC/E,MAAMK,qBAAqBH,OAAOC,IAAI,CAACN,gBAAgBS,MAAM,CAC3D,CAACC,MAAQA,QAAQ;IAGnB,kEAAkE;IAClE,IAAI,cAAcV,gBAAgB;QAChCQ,mBAAmBG,OAAO,CAAC;IAC7B;IAEA,KAAK,MAAMD,OAAOF,mBAAoB;QACpC,MAAM,CAACI,SAASC,oBAAoB,GAAGb,cAAc,CAACU,IAAI;QAC1D,gEAAgE;QAChE,mCAAmC;QACnC,IAAIE,YAAYhB,qBAAqB;YACnC;QACF;QACA,MAAMkB,kBAAkBf,MAAMC,cAAc,CAACe,GAAG,CAACL;QACjD,IAAI,CAACI,iBAAiB;YACpB;QACF;QAEA,MAAME,WAAWnB,qBAAqBe;QACtC,MAAMK,8BAA8BpB,qBAAqBe,SAAS;QAElE,MAAMM,YAAYJ,gBAAgBC,GAAG,CAACC;QACtC,IAAI,CAACE,WAAW;YACd;QACF;QAEA,MAAMC,OAAOlB,oBACXiB,WACAL,qBACAX,YAAY,MAAMc,UAClBd,YAAY,MAAMe;QAGpB,IAAIE,MAAM;YACR,OAAOA;QACT;IACF;IAEA,OAAO;AACT","ignoreList":[0]}