{"title":"Destined Rivals","description":"\n\u003cscript id=\"mpag-stock-last\"\u003e\n(() =\u003e {\n  const cardList = (grid) =\u003e [...grid.children].filter((card) =\u003e card.matches('li.grid__item'));\n  const isSoldOut = (card) =\u003e [...card.querySelectorAll('.card__badge .badge')].some(\n    (badge) =\u003e \/^(épuisé|rupture de stock|sold out)$\/i.test(badge.textContent.trim())\n  );\n\n  function start() {\n    const container = document.getElementById('ProductGridContainer');\n    if (!container) return;\n    let revision = 0;\n\n    async function sortGrid() {\n      const grid = container.querySelector('#product-grid');\n      if (!grid) return;\n      const run = ++revision;\n      const current = cardList(grid);\n      const url = new URL(location.href);\n      const page = Number(url.searchParams.get('page') || 1);\n      const pages = [...container.querySelectorAll('.pagination__list a[href]')]\n        .map((link) =\u003e Number(new URL(link.href, url).searchParams.get('page') || 1));\n      const lastPage = Math.max(page, ...pages);\n      const groups = Array.from({ length: lastPage }, (_, index) =\u003e index + 1);\n      let cardGroups;\n\n      try {\n        cardGroups = await Promise.all(groups.map(async (number) =\u003e {\n          if (number === page) return current;\n          const request = new URL(url);\n          request.searchParams.set('page', String(number));\n          request.searchParams.set('section_id', grid.dataset.id);\n          const response = await fetch(request);\n          if (!response.ok) throw new Error('Product page unavailable');\n          const source = new DOMParser().parseFromString(await response.text(), 'text\/html');\n          const sourceGrid = source.querySelector('#product-grid');\n          if (!sourceGrid) throw new Error('Product grid unavailable');\n          return cardList(sourceGrid);\n        }));\n      } catch {\n        cardGroups = [current];\n      }\n\n      if (run !== revision || grid !== container.querySelector('#product-grid')) return;\n      const cards = cardGroups.flat();\n      const available = [];\n      const soldOut = [];\n      for (const card of cards) (isSoldOut(card) ? soldOut : available).push(card);\n      const offset = cardGroups.slice(0, page - 1).reduce((count, group) =\u003e count + group.length, 0);\n      const displayed = available.concat(soldOut).slice(offset, offset + current.length);\n      if (displayed.every((card, index) =\u003e card === current[index])) return;\n      for (const card of displayed) {\n        if (!grid.contains(card)) {\n          card.classList.remove('scroll-trigger', 'animate--slide-in', 'scroll-trigger--offscreen');\n        }\n      }\n      grid.replaceChildren(...displayed);\n    }\n\n    sortGrid();\n    new MutationObserver(sortGrid).observe(container, { childList: true });\n  }\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', start, { once: true });\n  } else {\n    start();\n  }\n})();\n\u003c\/script\u003e\n\u003cstyle id=\"mpag-product-framing\"\u003e\n#product-grid .card__inner {\n  --ratio-percent: 100% !important;\n  background: #fff;\n}\n#product-grid .card__media {\n  inset: 0 !important;\n  margin: 0 !important;\n  background: #fff;\n}\n#product-grid .card__media .media {\n  background: #fff;\n}\n#product-grid .card__media .media img {\n  object-fit: contain !important;\n  object-position: center !important;\n  transform: none !important;\n}\n\n\n\n\u003c\/style\u003e","products":[{"product_id":"pokemon-scarlet-violet-destined-rivals-booster-box","title":"POKÉMON - SCARLET \u0026 VIOLET DESTINED RIVALS - BOOSTER BOX","description":"\u003cp\u003eEnglish, box of 36 packs\u003c\/p\u003e\u003cp\u003eBox of 36 booster packs of 10 cards from the Scarlet \u0026amp; Violet: Destined Rivals expansion. Heroic Trainers face off against Team Rocket, with Cynthia and Garchomp ex, Ethan and Ho-Oh ex, as well as Mewtwo ex under Giovanni's orders.\u003c\/p\u003e","brand":"Pokémon","offers":[{"title":"Default Title","offer_id":67325958455545,"sku":"POKEDESRIVBOOBOX","price":600.0,"currency_code":"CAD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0842\/3689\/4457\/files\/mpag-80-pokemon-scarlet-violet-destined-rivals-booster-box.png?v=1795004478"},{"product_id":"pokemon-destined-rivals-booster-bundle","title":"POKÉMON — DESTINED RIVALS BOOSTER BUNDLE","description":"\u003cp\u003eDiscover Scarlet \u0026amp; Violet — Destined Rivals with a Booster Bundle: a compact format to expand your Pokémon TCG collection.\u003c\/p\u003e\u003ch3\u003eContents\u003c\/h3\u003e\u003cul\u003e\n\n\u003cli\u003e1 Scarlet \u0026amp; Violet — Destined Rivals Expansion Booster Bundle\u003c\/li\u003e\n\n\u003cli\u003e6 booster packs\u003c\/li\u003e\n\n\n\u003c\/ul\u003e\u003cp\u003eThe cards contained in the booster packs are random.\u003c\/p\u003e","brand":"Pokémon","offers":[{"title":"Default Title","offer_id":67522704179449,"sku":null,"price":104.99,"currency_code":"CAD","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0842\/3689\/4457\/files\/mpag-80-pokemon-destined-rivals-booster-bundle.png?v=1795003522"},{"product_id":"pokemon-scarlet-violet-destined-rivals-elite-trainer-box","title":"POKÉMON - SCARLET \u0026 VIOLET DESTINED RIVALS - ELITE TRAINER BOX","description":"\u003cp\u003eExplore Scarlet \u0026amp; Violet — Destined Rivals with this standard Elite Trainer Box. Boosters, a promo card, and accessories to play with and organize your collection.\u003c\/p\u003e\u003ch3\u003eContents\u003c\/h3\u003e\u003cul\u003e\n\n\u003cli\u003e9 Scarlet \u0026amp; Violet — Destined Rivals booster packs\u003c\/li\u003e\n\n\u003cli\u003e1 full-art Team Rocket’s Wobbuffet foil promo card\u003c\/li\u003e\n\n\u003cli\u003eCard sleeves, Energy cards, and play accessories\u003c\/li\u003e\n\n\u003cli\u003e1 expansion guide and 1 storage box\u003c\/li\u003e\n\n\n\u003c\/ul\u003e\u003cp\u003eThe cards contained in the booster packs are random.\u003c\/p\u003e","brand":"Pokémon","offers":[{"title":"Default Title","offer_id":67522705260793,"sku":null,"price":180.0,"currency_code":"CAD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0842\/3689\/4457\/files\/mpag-80-pokemon-scarlet-violet-destined-rivals-elite-trainer-box.png?v=1795004765"}],"url":"https:\/\/mpagcollection.com\/en\/collections\/destined-rivals.oembed","provider":"MPAG Collection","version":"1.0","type":"link"}