{
  "version": 3,
  "sources": ["/cdn/shop/t/87/assets/hk-grid-smooth.js?r=step4"],
  "sourcesContent": ["/* ------------------------------------------------------------------\n   Hanakini smooth filter loading (TEST, Oct 2026)\n\n   Why: when a filter or sort is picked, Shopify first draws its plain,\n   unsorted grid, and a moment later the B4B app redraws it in your order.\n   That in-between grid flashes on screen for about a second.\n\n   What this does, only on collections where B4B draws the grid:\n   - While the new results load, the current grid dims slightly.\n   - Shopify's in-between grid is kept invisible.\n   - As soon as B4B has drawn its cards, the finished grid appears\n     (instantly, no animation it has to wait on).\n   - Safety: if B4B hasn't drawn after 4 seconds (or the results are\n     empty, or loading fails), the grid is shown anyway. Products are\n     never left hidden.\n   Deleting the one script line in snippets/shop-your-size-styles.liquid\n   turns it off completely.\n------------------------------------------------------------------- */\n(function () {\n  if (window.__hkGridSmooth) return;\n  window.__hkGridSmooth = true;\n\n  if (!/\\/collections\\/[^\\/?#]+/.test(window.location.pathname) || window.location.pathname.indexOf(\"/products/\") > -1) return;\n  var collectionPath = window.location.pathname;\n  var root = document.documentElement;\n  var fallback = null;\n  var MAX_WAIT_MS = 4000;\n\n  var style = document.createElement(\"style\");\n  style.textContent =\n    \"html.hk-grid-wait #CollectionAjaxContent .grid--uniform[data-hk-old]{opacity:.4;transition:opacity .2s ease;pointer-events:none}\" +\n    \"html.hk-grid-wait #CollectionAjaxContent .grid--uniform:not([data-hk-old]){opacity:0}\";\n  document.head.appendChild(style);\n\n  function getGrid() {\n    return document.querySelector(\"#CollectionAjaxContent .grid--uniform\");\n  }\n\n  function reveal() {\n    clearTimeout(fallback);\n    root.classList.remove(\"hk-grid-wait\");\n    document.querySelectorAll(\"#CollectionAjaxContent .grid--uniform[data-hk-old]\").forEach(function (g) {\n      g.removeAttribute(\"data-hk-old\");\n    });\n  }\n\n  function startWaiting() {\n    var grid = getGrid();\n    // Only where B4B draws the grid (otherwise there is no flash to hide)\n    if (!grid || !grid.querySelector(\".grid-product.variable-products\")) return;\n    grid.setAttribute(\"data-hk-old\", \"\");\n    root.classList.add(\"hk-grid-wait\");\n    clearTimeout(fallback);\n    fallback = setTimeout(reveal, MAX_WAIT_MS);\n  }\n\n  function check() {\n    if (!root.classList.contains(\"hk-grid-wait\")) return;\n    var grid = getGrid();\n    if (!grid || grid.hasAttribute(\"data-hk-old\")) return; // new results not in yet\n    // New grid is in: show it once B4B has drawn (or right away if there are no results)\n    if (!grid.querySelector(\".grid-product\") || grid.querySelector(\".grid-product.variable-products\")) reveal();\n  }\n\n  // Notice when the theme asks for new filter/sort results\n  if (window.fetch) {\n    var originalFetch = window.fetch;\n    window.fetch = function (input) {\n      var promise = originalFetch.apply(this, arguments);\n      try {\n        var raw = typeof input === \"string\" ? input : (input && input.url) || \"\";\n        var u = new URL(raw, window.location.origin);\n        if (u.pathname === collectionPath && u.searchParams.get(\"section_id\") && !u.searchParams.get(\"page\")) {\n          startWaiting();\n          promise.then(function (res) { if (!res || !res.ok) reveal(); }, reveal);\n        }\n      } catch (e) {}\n      return promise;\n    };\n  }\n\n  if (window.MutationObserver) {\n    new MutationObserver(check).observe(document.documentElement, { childList: true, subtree: true });\n  }\n})();\n"],
  "mappings": "CAkBC,UAAY,CAIX,GAHI,OAAO,iBACX,OAAO,eAAiB,GAEpB,CAAC,0BAA0B,KAAK,OAAO,SAAS,QAAQ,GAAK,OAAO,SAAS,SAAS,QAAQ,YAAY,EAAI,IAAI,OACtH,IAAI,eAAiB,OAAO,SAAS,SACjC,KAAO,SAAS,gBAChB,SAAW,KACX,YAAc,IAEd,MAAQ,SAAS,cAAc,OAAO,EAC1C,MAAM,YACJ,wNAEF,SAAS,KAAK,YAAY,KAAK,EAE/B,SAAS,SAAU,CACjB,OAAO,SAAS,cAAc,uCAAuC,CACvE,CAEA,SAAS,QAAS,CAChB,aAAa,QAAQ,EACrB,KAAK,UAAU,OAAO,cAAc,EACpC,SAAS,iBAAiB,oDAAoD,EAAE,QAAQ,SAAU,EAAG,CACnG,EAAE,gBAAgB,aAAa,CACjC,CAA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