{
  "version": 3,
  "sources": ["/cdn/shop/t/79/assets/sf-bundles.js?x=1789182361909"],
  "sourcesContent": ["/* Bundle builder: pool loader and range labelling.\n\n   The eligible frames are fetched from the collection's own products.json in\n   pages of 250, because Liquid caps a collection loop at 50 and the 25 KD\n   range holds hundreds of frames. Order follows the collection's sort order.\n\n   THE FETCH IS LOCALE-AWARE. products.json served from /collections/... is\n   the English catalogue; the Arabic titles live at /ar/collections/... . The\n   path here was absolute, so on the Arabic site the builder quietly loaded\n   English data and every bundle card read \"Freak | \u0623\u0633\u0648\u062F\" \u2014 the colour\n   translated because it came from the product title, the family name not,\n   because the whole title came from the English endpoint. The product data\n   was correct all along; the URL was asking the wrong catalogue.\n\n   window.SF_ROOT is set by Liquid from routes.root_url ('/' or '/ar'). It\n   falls back to '' so nothing changes if the snippet is ever absent.\n\n   Sold-out frames are dropped here rather than later, so a shopper can never\n   pick one and hit a wall at checkout.\n\n   ALL IMAGES are kept, not just the first. A bundle card is the only view of\n   a frame a shopper gets \u2014 we deliberately do not send them to the product\n   page mid-build \u2014 so the card has to show what the product page would: the\n   folded shot, the detail, the one on a face.\n\n   Both ids are kept. The variant id goes in the cart; the PRODUCT id is what\n   the family grid lists in data-pids, and is how the bundle filters work out\n   which family a frame belongs to. */\n(function(){\n\"use strict\";\nwindow.SFBundleCache = window.SFBundleCache || {};\n\n/* '/ar' with no trailing slash, or '' on the English site. */\nfunction root(){\n  var r = window.SF_ROOT || '';\n  return r === '/' ? '' : r.replace(/\\/$/, '');\n}\n\nwindow.SFBundlePool = function(handle, onProgress){\n  var out=[], page=1, seen=0, dropped=0;\n  function step(){\n    return fetch(root()+'/collections/'+handle+'/products.json?limit=250&page='+page)\n      .then(function(r){ return r.ok ? r.json() : {products:[]} })\n      .then(function(j){\n        var list=j.products||[];\n        seen += list.length;\n        list.forEach(function(p){\n          var v=(p.variants||[])[0]; if(!v) return;\n          if(v.available === false){ dropped++; return }\n          var imgs=(p.images||[]).map(function(i){ return i.src }).filter(Boolean);\n          out.push({\n            id: v.id,\n            pid: p.id,\n            title: p.title,\n            price: Math.round(parseFloat(v.price)*1000),\n            img: imgs[0] || '',\n            imgs: imgs.slice(0,8),\n            /* The product link needs the locale prefix too, or a shopper on\n               the Arabic site is dropped onto the English product page. */\n            url: root()+'/products/'+p.handle,\n            available: true\n          });\n        });\n        if(onProgress) onProgress(out.length);\n        if(list.length === 250 && page < 8){ page++; return step() }\n        out.seen = seen;\n        out.soldOut = dropped;\n        window.SFBundleCache[handle] = out;\n        return out;\n      })\n      .catch(function(){ return out });\n  }\n  return step();\n};\n\nwindow.SFBundleRange = function(b){\n  if(b && b.range) return b.range;\n  var h=(b&&b.collection)||'';\n  var m=h.match(/bundle-range-([0-9]+)/);\n  return m ? m[1]+' KD' : 'this';\n};\n})();"],
  "mappings": "CA4BC,UAAU,CACX,aACA,OAAO,cAAgB,OAAO,eAAiB,CAAC,EAGhD,SAAS,MAAM,CACb,IAAI,EAAI,OAAO,SAAW,GAC1B,OAAO,IAAM,IAAM,GAAK,EAAE,QAAQ,MAAO,EAAE,CAC7C,CAEA,OAAO,aAAe,SAAS,OAAQ,WAAW,CAChD,IAAI,IAAI,CAAC,EAAG,KAAK,EAAG,KAAK,EAAG,QAAQ,EACpC,SAAS,MAAM,CACb,OAAO,MAAM,KAAK,EAAE,gBAAgB,OAAO,iCAAiC,IAAI,EAC7E,KAAK,SAAS,EAAE,CAAE,OAAO,EAAE,GAAK,EAAE,KAAK,EAAI,CAAC,SAAS,CAAC,CAAC,CAAE,CAAC,EAC1D,KAAK,SAAS,EAAE,CACf,IAAI,KAAK,EAAE,UAAU,CAAC,EAoBtB,OAnBA,MAAQ,KAAK,OACb,KAAK,QAAQ,SAAS,EAAE,CACtB,IAAI,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,EAAG,GAAI,EAC/B,IAAG,EAAE,YAAc,GAAM,CAAE,UAAW,MAAO,CAC7C,IAAI,MAAM,EAAE,QAAQ,CAAC,GAAG,IAAI,SAAS,E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