{
  "version": 3,
  "sources": ["/cdn/shop/t/36/assets/ark-cart-drawer.js?b=20260923d"],
  "sourcesContent": ["/* Shopify line keys can change when discounts recalculate. Match merchandise, properties and selling plan, never variant alone. */\nwindow.ArkCartLines = (function () {\n function identity(item) {var p=item.properties||{};return JSON.stringify([String(item.variant_id||item.id),String(item.selling_plan_allocation&&item.selling_plan_allocation.selling_plan.id||item.plan||''),Object.keys(p).sort().map(function(k){return [k,String(p[k])];})]);}\n function read(el){var p={};try{p=JSON.parse(el.getAttribute('data-line-properties')||'{}')||{};}catch(e){}return {id:el.getAttribute('data-line-variant'),plan:el.getAttribute('data-line-plan')||'',properties:p};}\n function stamp(el,item){el.setAttribute('data-line-variant',item.variant_id||item.id);el.setAttribute('data-line-plan',item.selling_plan_allocation&&item.selling_plan_allocation.selling_plan.id||item.plan||'');el.setAttribute('data-line-properties',JSON.stringify(item.properties||{}));}\n function rekey(scope,selector,keyAttr,items,targets){var rows=Array.prototype.slice.call(scope.querySelectorAll(selector)),map={};items.forEach(function(item){if(rows.some(function(r){return r.getAttribute(keyAttr)===item.key;}))return;var ident=identity(item);var candidates=rows.filter(function(r){return !items.some(function(n){return n.key===r.getAttribute(keyAttr);})&&identity(read(r))===ident;});if(candidates.length!==1||items.filter(function(n){return identity(n)===ident;}).length!==1)return;var row=candidates[0],old=row.getAttribute(keyAttr);map[old]=item.key;[row].concat(Array.prototype.slice.call(row.querySelectorAll('*'))).forEach(function(el){Array.prototype.slice.call(el.attributes).forEach(function(a){if(a.name.indexOf('data-')===0&&a.value===old)el.setAttribute(a.name,item.key);});});if(targets&&Object.prototype.hasOwnProperty.call(targets,old)){targets[item.key]=targets[old];delete targets[old];}stamp(row,item);});return map;}\n return {identity:identity,read:read,stamp:stamp,rekey:rekey};\n})();\n/* MULTI-BUY METER PAINTER (13 Nov 2026): one function for the basket drawer and the basket page\n   (snippets/ark-deal-meter.liquid). Counts the QUANTITY of every line of the deal's product type - two of the same\n   decoration count as two - and a line with a tap still on its way at the number asked for (pending = {line key:\n   quantity}). Same sentences as the Liquid; the automatic discount does the price. */\nwindow.ArkDeal = (function () {\n  function paint(scope, cart, pending) {\n    if (!scope || !scope.querySelectorAll || !cart || !Array.isArray(cart.items)) { return; }\n    Array.prototype.forEach.call(scope.querySelectorAll('[data-ark-deal]'), function (el) {\n      var type = el.getAttribute('data-deal-type');\n      var size = parseInt(el.getAttribute('data-deal-size'), 10) || 5;\n      var price = el.getAttribute('data-deal-price') || '';\n      var noun = el.getAttribute('data-deal-noun') || 'item';\n      var n = cart.items.reduce(function (a, it) {\n        if (!it || it.product_type !== type) { return a; }\n        var q = pending && Object.prototype.hasOwnProperty.call(pending, it.key) ? Number(pending[it.key]) : Number(it.quantity);\n        return a + (q > 0 ? q : 0);\n      }, 0);\n      if (!n) { el.hidden = true; el.classList.remove('is-met'); return; }\n      var rest = n % size, sets = Math.floor(n / size), left = size - rest, met = sets > 0 && rest === 0;\n      var wasShownMet = !el.hidden && el.classList.contains('is-met');\n      var wasShown = !el.hidden;\n      el.hidden = false;\n      el.classList.toggle('is-met', met);\n      if (met && wasShown && !wasShownMet && !(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches)) {\n        el.classList.add('is-just-met');\n        window.setTimeout(function () { el.classList.remove('is-just-met'); }, 900);\n      }\n      var on = met ? size : rest;\n      Array.prototype.forEach.call(el.querySelectorAll('[data-deal-seg]'), function (s, i) { s.classList.toggle('is-on', i < on); });\n      var count = el.querySelector('[data-deal-count]');\n      if (count) { count.textContent = on + '/' + size; }\n      var msg = el.querySelector('[data-deal-msg]');\n      if (!msg) { return; }\n      var deal = size + ' for ' + price;\n      /* owner 13 Nov: short, one line - no \"the discount is in your total\" */\n      var parts = met ? [[deal + ' unlocked!', 1]]\n        : sets > 0 ? [['Add ', 0], [left + ' more', 1], [' for another ', 0], [deal, 1], ['.', 0]]\n        : [['Add ', 0], [left + ' more', 1], [' ' + noun + (left === 1 ? '' : 's') + ' to get ', 0], [deal, 1], ['.', 0]];\n      if (msg.textContent === parts.map(function (p) { return p[0]; }).join('')) { return; }\n      msg.textContent = '';\n      parts.forEach(function (p) {\n        if (!p[1]) { msg.appendChild(document.createTextNode(p[0])); return; }\n        var b = document.createElement('strong'); b.textContent = p[0]; msg.appendChild(b);\n      });\n    });\n  }\n  return { paint: paint };\n})();\n/* NATIVE BUNDLES (27 Oct 2026, wf17/bundles-1026/PLAN-1027.md). What is inside each bundle, by the bundle's variant\n   id: [[part variant id, units per bundle, name, stock or -1]]. Sources: snippets/ark-bundle-map (every bundle in the\n   basket: the drawer on load and the ark-cart-state section after an add) and snippets/ark-bundle-parts (the bundle\n   on this page, with the parts' stock). Used for the drawer's \"Includes ...\" line and by the add guard below. */\nwindow.ArkBundles = (function () {\n  var known = {};\n  function put(id, parts) {\n    if (!id || !Array.isArray(parts) || !parts.length) return;\n    var old = known[String(id)] || [];\n    known[String(id)] = parts.map(function (p) {\n      var o = old.filter(function (x) { return String(x[0]) === String(p[0]); })[0] || [];\n      return [String(p[0]), Number(p[1]) || 1, p[2] || o[2] || '', p[3] !== undefined ? Number(p[3]) : (o[3] !== undefined ? o[3] : -1)];\n    });\n  }\n  function fromMap(text) {\n    try { var j = JSON.parse(text); Object.keys(j || {}).forEach(function (k) { put(k, j[k]); }); } catch (e) {}\n  }\n  function scan(scope) {\n    (scope || document).querySelectorAll('template[data-ark-bundle-map]').forEach(function (t) { fromMap(t.content.textContent); });\n    (scope || document).querySelectorAll('script[data-ark-bundle-parts]').forEach(function (s) {\n      try {\n        var parts = JSON.parse(s.textContent);\n        put(s.getAttribute('data-bundle-variant'), parts.map(function (p) { return [p[0], p[1], '', p[2]]; }));\n      } catch (e) {}\n    });\n  }\n  return {\n    scan: scan,\n    fromMap: fromMap,\n    parts: function (id) { if (!known[String(id)]) scan(); return known[String(id)] || null; }\n  };\n})();\n/* ONE NOTICE (23 Oct 2026; restyled the same day, owner: the dark panels \"look AI made\", match our design, with an\n   icon). Every add message is a house panel - the Click & Collect panel's shape (32px round icon tile, bold title,\n   13px text) in the HQ Rewards bar's yellow for a stock limit, red when something failed, green when added (CSS\n   .ark-note in ark-core.css). ArkNote.fill() dresses any element that way; ArkNote.show() puts one over the\n   bottom of a product's picture (cards, quick view) and fades it after a few seconds, so nothing moves. The product\n   page's side notification (ark-pdp.js) is filled by the same builder. role=alert so it is announced. */\n(function () {\n  'use strict';\n  if (window.ArkNote) return;\n  var ERR = /sold out|could not|couldn.t|try again|not available|unavailable|went wrong|error/i;\n  var LIMIT = /in your basket|in stock|we have/i;\n  /* 27 Oct (owner: a draft bundle answered \"Cannot find variant\" under the title \"Stock limit reached\"): only a\n     message about stock is a stock limit; anything else Shopify says is an error, in plain words. */\n  function kindOf(message, kind) {\n    if (kind) { return kind; }\n    if (LIMIT.test(message) && !/sold out/i.test(message)) { return 'limit'; }\n    return 'error';\n  }\n  function titleOf(message, kind) {\n    if (kind === 'ok') { return 'Added to your basket'; }\n    if (kind === 'limit') { return 'Stock limit reached'; }\n    if (/sold out/i.test(message)) { return 'Sold out'; }\n    return /not on sale/i.test(message) ? 'Not available' : 'Could not add to basket';\n  }\n  function fill(el, message, kind, title) {\n    /* Shopify's own wording, said plainly: \"The product 'X - 1L' is already sold out.\" -> \"X - 1L is sold out.\" */\n    message = String(message).replace(/^The product '(.+)' is already sold out\\.?$/, '$1 is sold out.')\n      .replace(/^Cannot find variant\\.?$/i, 'This item is not on sale at the moment.');\n    kind = kindOf(message, kind);\n    var icon = kind === 'ok' ? 'check' : kind === 'limit' ? 'basket' : 'alert';\n    el.setAttribute('data-kind', kind);\n    el.innerHTML = '<span class=\"ark-note__icon\"><svg class=\"ark-icon ark-g--' + icon + '\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"></svg></span>' +\n      '<span class=\"ark-note__body\"><strong class=\"ark-note__title\"></strong><span class=\"ark-note__text\"></span></span>';\n    el.querySelector('.ark-note__title').textContent = title || titleOf(message, kind);\n    el.querySelector('.ark-note__text').textContent = message;\n    return el;\n  }\n  function hide(box) {\n    window.clearTimeout(box._t);\n    box.classList.remove('is-open');\n    box._t = window.setTimeout(function () { if (box.parentNode && !box.classList.contains('is-open')) { box.remove(); } }, 400);\n  }\n  window.ArkNote = {\n    fill: fill,\n    show: function (host, message, ms, kind) {\n      if (!host || !message) { return; }\n      var box = null;\n      for (var i = 0; i < host.children.length; i++) { if (host.children[i].classList.contains('ark-note')) { box = host.children[i]; } }\n      if (!box) {\n        box = document.createElement('div');\n        box.className = 'ark-note';\n        box.setAttribute('role', 'alert');\n        host.appendChild(box);\n      }\n      fill(box, message, kind);\n      box.classList.remove('is-open');\n      void box.offsetWidth;\n      box.classList.add('is-open');\n      window.clearTimeout(box._t);\n      box._t = window.setTimeout(function () { hide(box); }, ms || 5000);\n    },\n    clear: function (host) {\n      if (!host) { return; }\n      for (var i = 0; i < host.children.length; i++) { if (host.children[i].classList.contains('ark-note')) { hide(host.children[i]); } }\n    }\n  };\n})();\n/* STUCK BASKET RECOVERY AND STOCK GATE (23 Oct 2026 audit).\n   Serialize same-origin adds so each stock check sees the previous add. Shopify can partly fulfil a 422:\n   never retry a multi-line request or rebuild a populated basket. Country recovery and a fresh basket are\n   allowed only for a single line in a verified empty basket with no notes, attributes or discount codes. */\n(function () {\n  'use strict';\n  if (window.__arkAddGuard || !window.fetch) return;\n  window.__arkAddGuard = true;\n  var nativeFetch = window.fetch.bind(window);\n  var queue = Promise.resolve();\n  var JSON_H = { 'Content-Type': 'application/json', 'Accept': 'application/json' };\n  function addURL(input, init) {\n    try {\n      var url = new URL(typeof input === 'string' ? input : input.url || String(input), location.href);\n      var method = (init && init.method) || (input && input.method) || 'GET';\n      return url.origin === location.origin && /^\\/(?:[a-z]{2}(?:-[a-z]{2})?\\/)?cart\\/add(?:\\.js)?$/i.test(url.pathname) &&\n        String(method).toUpperCase() === 'POST' ? url : null;\n    } catch (e) { return null; }\n  }\n  function linesFrom(body) {\n    try {\n      var data;\n      if (typeof body === 'string') {\n        data = body.trim().charAt(0) === '{' ? JSON.parse(body) : null;\n        if (!data) body = new URLSearchParams(body);\n      }\n      if (!data && body && typeof body.get === 'function') {\n        data = { id: body.get('id'), quantity: body.get('quantity') || 1 };\n      }\n      var lines = data && (Array.isArray(data.items) ? data.items : [data]);\n      if (!lines || !lines.length || lines.some(function (l) {\n        return !l || !/^\\d+$/.test(String(l.id)) || Number(l.id) <= 0 ||\n          !/^\\d+$/.test(String(l.quantity === undefined ? 1 : l.quantity)) || Number(l.quantity === undefined ? 1 : l.quantity) < 1;\n      })) return null;\n      return lines.map(function (l) { return { id: String(l.id), quantity: Number(l.quantity === undefined ? 1 : l.quantity) }; });\n    } catch (e) { return null; }\n  }\n  /* the last basket read was turned down by Shopify's bot check (14 Nov 2026): see ArkCart.refused in the layout */\n  var readRefused = false;\n  /* At most 4 s (Fable F1): a read that never answers on a weak signal held the add, and every add after it. */\n  function readCart(root) {\n    readRefused = false;\n    return Promise.race([readNow(root), new Promise(function (ok) { setTimeout(function () { ok(null); }, 4000); })]);\n  }\n  function readNow(root) {\n    return nativeFetch(root + 'cart.js', { headers: { 'Accept': 'application/json' }, credentials: 'same-origin', cache: 'no-store' })\n      .then(function (r) {\n        var T = window.ArkCart;\n        if (T && T.refused && T.refused(r)) { readRefused = true; }\n        if (!r.ok || readRefused) throw new Error('Basket read failed');\n        return r.json();\n      })\n      .then(function (cart) { return cart && Array.isArray(cart.items) ? cart : null; }, function () { return null; });\n  }\n  function bare(cart) {\n    return cart && cart.item_count === 0 && cart.items.length === 0 && !cart.note &&\n      !Object.keys(cart.attributes || {}).length && !(cart.discount_codes || []).length &&\n      !(cart.cart_level_discount_applications || []).length;\n  }\n  function limits() {\n    var map = {};\n    /* Build-your-own kits expose live Liquid stock, including zero. Untracked parts have no attribute. */\n    document.querySelectorAll('[data-kit-machine-stock]').forEach(function (el) {\n      map[el.getAttribute('data-kit-machine')] = Number(el.getAttribute('data-kit-machine-stock'));\n    });\n    document.querySelectorAll('[data-kit-variant][data-kit-stock]').forEach(function (el) {\n      map[el.getAttribute('data-kit-variant')] = Number(el.getAttribute('data-kit-stock'));\n    });\n    /* Fixed kits include a third value: part stock, or -1 when overselling is allowed. */\n    document.querySelectorAll('form[data-ark-kit-items]').forEach(function (form) {\n      try {\n        var parts = JSON.parse(form.getAttribute('data-ark-kit-items'));\n        if (Array.isArray(parts)) parts.forEach(function (p) {\n          if (Array.isArray(p) && p.length > 2 && Number.isFinite(Number(p[2]))) map[String(p[0])] = Number(p[2]);\n        });\n      } catch (e) {}\n    });\n    /* A bundle page's parts: the stock of each part, or -1 when the part is not counted. */\n    document.querySelectorAll('script[data-ark-bundle-parts]').forEach(function (s) {\n      try {\n        JSON.parse(s.textContent).forEach(function (p) {\n          if (Array.isArray(p) && p.length > 2 && Number(p[2]) >= 0) map[String(p[0])] = Number(p[2]);\n        });\n      } catch (e) {}\n    });\n    return map;\n  }\n  function overStock(lines, cart) {\n    var Q = window.ArkQty, B = window.ArkBundles, live = limits(), wanted = {}, held = {}, inBundle = {};\n    /* A bundle uses its parts' stock (27 Oct): a bundle and the same item bought loose share it, so both sides count\n       the parts inside every bundle as well as the lines themselves. */\n    function count(into, id, qty) {\n      into[id] = (into[id] || 0) + qty;\n      var parts = B && B.parts(id);\n      if (parts) parts.forEach(function (p) { into[p[0]] = (into[p[0]] || 0) + qty * p[1]; inBundle[p[0]] = p[2]; });\n    }\n    lines.forEach(function (l) { count(wanted, String(l.id), l.quantity); });\n    if (cart) cart.items.forEach(function (it) { count(held, String(it.variant_id || it.id), Number(it.quantity || 0)); });\n    var ids = Object.keys(wanted);\n    for (var i = 0; i < ids.length; i++) {\n      var id = ids[i], cap = Object.prototype.hasOwnProperty.call(live, id) ? live[id] : (Q && Q.stock ? Q.stock(id) : null);\n      if (cap === null || cap === undefined || cap < 0 || !Number.isFinite(cap)) continue;\n      /* Basket not read (slow or failed connection): judged on the basket this page last saw, never a refused sale\n         (Fable F1, 14 Nov 2026; it used to answer \"We could not check your basket\"). */\n      if (!cart && held[id] === undefined && Q && Q.held) held[id] = Q.held(id) || 0;\n      if (wanted[id] > Math.max(0, cap - (held[id] || 0))) {\n        if (inBundle[id] !== undefined) {\n          var what = inBundle[id] || 'an item in this bundle';\n          return cap === 0 ? what + ' is sold out.' : 'Only ' + cap + ' x ' + what + ' in stock, and your basket already holds ' + (held[id] || 0) + ' (bundles included).';\n        }\n        return (Q && Q.reason && Q.reason(id, 'add')) || (cap === 0 ? 'This item is sold out.' : 'Only ' + cap + ' in stock. Your basket already holds ' + (held[id] || 0) + '.');\n      }\n    }\n    return '';\n  }\n  function refuse(message) {\n    return new Response(JSON.stringify({ status: 422, message: message, description: message }), { status: 422, headers: JSON_H });\n  }\n  function soldOut(res) {\n    if (!res || res.status !== 422) return Promise.resolve(false);\n    return res.clone().json().then(function (j) {\n      return /sold out/i.test((j && (j.description || j.message)) || '');\n    }, function () { return false; });\n  }\n  function toUK(root) {\n    var fd = new FormData();\n    fd.append('form_type', 'localization'); fd.append('utf8', '\\u2713');\n    fd.append('_method', 'put');\n    fd.append('country_code', 'GB'); fd.append('return_to', root + 'cart.js');\n    return nativeFetch(root + 'localization', { method: 'POST', body: fd, redirect: 'manual', credentials: 'same-origin' })\n      .then(function (r) { return r.ok || r.type === 'opaqueredirect' || (r.status >= 300 && r.status < 400); }, function () { return false; });\n  }\n  function recover(send, first, lines, before, root, signal) {\n    if (!lines || lines.length !== 1 || !bare(before)) return Promise.resolve(first);\n    return soldOut(first).then(function (stuck) {\n      if (!stuck || (signal && signal.aborted)) return first;\n      return readCart(root).then(function (after) {\n        if (!bare(after)) return first;\n        return toUK(root).then(function (changed) {\n          if (!changed || (signal && signal.aborted)) return first;\n          /* Recheck after localization too: another tab may have added an item. */\n          return readCart(root).then(function (current) {\n            if (!bare(current)) return first;\n            return send().then(function (second) {\n              return soldOut(second).then(function (still) {\n                if (!still || (signal && signal.aborted)) return second;\n                return nativeFetch(root + 'cart/add.js', { method: 'POST', headers: JSON_H,\n                  body: JSON.stringify({items:[{id:Number(lines[0].id),quantity:lines[0].quantity}]}), credentials: 'omit' })\n                  .then(function (probe) { return probe.ok; }, function () { return false; })\n                  .then(function (available) {\n                    if (!available || (signal && signal.aborted)) return second;\n                    return readCart(root).then(function (empty) {\n                      if (!bare(empty)) return second;\n                      /* There are no lines or merchant/customer metadata to migrate or lose. */\n                      var past = '=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT';\n                      document.cookie = 'cart' + past;\n                      document.cookie = 'cart' + past + '; domain=.' + location.hostname.replace(/^www\\./, '');\n                      return send();\n                    });\n                  });\n              });\n            });\n          });\n        });\n      });\n    });\n  }\n  window.fetch = function (input, init) {\n    var url = addURL(input, init);\n    if (!url) return nativeFetch(input, init);\n    var request = typeof Request !== 'undefined' && input instanceof Request ? input.clone() : null;\n    var signal = (init && init.signal) || (request && request.signal);\n    var root = url.pathname.slice(0, url.pathname.indexOf('/cart/add') + 1);\n    var body = init && init.body !== undefined ? Promise.resolve(init.body) : request ? request.clone().text() : Promise.resolve(null);\n    function send() { return nativeFetch(request ? request.clone() : input, init); }\n    function run() {\n      if (signal && signal.aborted) return Promise.reject(new DOMException('The operation was aborted.', 'AbortError'));\n      return body.then(function (b) {\n        var lines = linesFrom(b);\n        if (!lines) return send(); /* Preserve native validation for unsupported/invalid payloads; never retry them. */\n        return readCart(root).then(function (cart) {\n          /* Turned down, so the add would be too: answer with the same refusal, and the caller does the add as a\n             normal page load instead of telling the shopper we could not check the basket (14 Nov 2026). */\n          if (!cart && readRefused) return new Response('{}', { status: 429, headers: { 'Content-Type': 'application/json', 'X-Ark-Refused': '1' } });\n          if (cart && window.ArkQty) window.ArkQty.absorb(cart);\n          var why = overStock(lines, cart);\n          if (why) return refuse(why);\n          if (signal && signal.aborted) throw new DOMException('The operation was aborted.', 'AbortError');\n          return send().then(function (res) { return recover(send, res, lines, cart, root, signal); });\n        });\n      });\n    }\n    var result = queue.then(run, run);\n    /* One failed/aborted request must not stall subsequent adds - nor one that never answers (15 s, Fable F1). */\n    queue = Promise.race([result, new Promise(function (ok) { setTimeout(ok, 15000); })]).catch(function () {});\n    /* The caller is answered too (Codex C4): an add with no answer after 20 s may or may not have landed, so it is\n       never sent again - the shopper is asked to check the basket, and the stock clamp re-reads it. */\n    return Promise.race([result, new Promise(function (ok, no) {\n      setTimeout(function () {\n        var e = new Error('We could not confirm the add. Please check your basket before trying again.');\n        e.unknown = true;\n        try { document.dispatchEvent(new CustomEvent('ark:cart:changed')); } catch (x) {}\n        no(e);\n      }, 20000);\n    })]);\n  };\n})();\n\n/* ============================================================\n   TDHQ CART DRAWER - assets/ark-cart-drawer.js\n\n   Owns the slide-over basket: opening, closing, re-rendering, line\n   quantity and removal, the free-delivery meter and the cross-sell rail.\n\n   INTEGRATION NOTE. This script deliberately does NOT intercept\n   /cart/add submissions itself. Two other places already do that with\n   their own validation, busy states and failure fallbacks:\n\n     - assets/ark-quickadd.js  (quick add from a product card)\n     - sections/arkui-product-main.liquid  (the PDP buy form)\n\n   A third interceptor would either double-post the line or fight them for\n   preventDefault. Instead both of those dispatch `ark:cart:added` on\n   document after a confirmed add, and this script listens. One owner per\n   job: they own adding, this owns showing.\n   ============================================================ */\n(function () {\n  'use strict';\n\n  /* Shopify's JSON endpoints hand back UNSIZED originals (1500-2000px). The CDN\n     resizes on a `width` query parameter, so ask for what the box needs. Any\n     width already on the URL is replaced rather than duplicated. */\n  /* the site's one sized-picture helper (ArkImg, layout head) */\n  function sizedImage(url, w) { return window.ArkImg.sized(url, w); }\n\n  /* WALLETS FOR THE DEVICE (22 Oct 2026, owner: no Google Pay on an iPhone). Shopify lists the shop's wallets in\n     the wallet-configs attribute of its accelerated-checkout element and builds the buttons from that list, so on\n     an iPhone or iPad Google Pay - and its loading placeholder - is taken out before the element is put on the\n     page. Hiding a built button is not enough: Shopify sizes the row for every wallet it was given. Apple Pay is\n     only ever listed where the device has it. Anything unexpected leaves Shopify's markup as it came. */\n  var appleDevice = /iPhone|iPad|iPod/.test(navigator.userAgent || '') ||\n    (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);\n  function walletsForDevice(html) {\n    if (!appleDevice || !html) { return html; }\n    try {\n      var tpl = document.createElement('template');\n      tpl.innerHTML = html;\n      var host = tpl.content.querySelector('shopify-accelerated-checkout-cart');\n      if (!host) { return html; }\n      var list = JSON.parse(host.getAttribute('wallet-configs') || '[]');\n      var kept = list.filter(function (w) { return !w || w.name !== 'google_pay'; });\n      if (!kept.length || kept.length === list.length) { return html; }\n      host.setAttribute('wallet-configs', JSON.stringify(kept));\n      var cells = tpl.content.querySelectorAll('.wallet-cart-grid--skeleton > li');\n      if (cells.length === list.length) {\n        for (var wi = list.length - 1; wi >= 0; wi--) {\n          if (list[wi] && list[wi].name === 'google_pay') { cells[wi].parentNode.removeChild(cells[wi]); }\n        }\n      }\n      return tpl.innerHTML;\n    } catch (e) { return html; }\n  }\n  /* The basket page ships its wallets inert in a template (sections/arkui-cart.liquid); they go on the page here, and\n     again after every re-render of that section (its init() calls ArkWallets.expand - Codex cartsheet-1022). */\n  function expandWallets(scope) {\n    var tpls = (scope || document).querySelectorAll('template[data-ark-wallets]');\n    for (var ti = 0; ti < tpls.length; ti++) {\n      var walletTpl = tpls[ti];\n      if (!walletTpl.parentNode) { continue; }\n      var walletBox = document.createElement('div');\n      walletBox.innerHTML = walletsForDevice(walletTpl.innerHTML);\n      while (walletBox.firstChild) { walletTpl.parentNode.insertBefore(walletBox.firstChild, walletTpl); }\n      walletTpl.parentNode.removeChild(walletTpl);\n    }\n  }\n  window.ArkWallets = { expand: expandWallets };\n  expandWallets(document);\n\n  var root = document.querySelector('[data-ark-cart-drawer]');\n  if (!root || !('fetch' in window)) { return; }\n  /* U.42 (9 Oct): the sheet joins the header section, as the menu and Saved sheets do. The header section is\n     its own stacking context (sticky, z-index 900); while the sheet is up it is lifted to the sheet's old\n     level (html.ark-cd-up, ark-header.css) and the phone tab bar - outside the section since 21 Oct - is\n     lifted one above it, so the bar and the basket count riding above its edge stay in front. Moved while\n     still hidden. */\n  var hdrSec = document.querySelector('.ark-header-section');\n  if (hdrSec && root.parentNode !== hdrSec) { hdrSec.appendChild(root); }\n  /* Theme editor only: a header re-render throws the old section away with the sheet inside it. Park the sheet on\n     <body> as the old section goes and move it into the new one (21 Oct, Codex tabbar-body-1021). */\n  document.addEventListener('shopify:section:unload', function (e) {\n    if (e.target && e.target.contains && e.target.contains(root)) { document.body.appendChild(root); }\n  });\n  document.addEventListener('shopify:section:load', function () {\n    var hs = document.querySelector('.ark-header-section');\n    if (hs && root.parentNode !== hs) { hs.appendChild(root); }\n  });\n\n  var panel      = root.querySelector('[data-cd-panel]');\n  var itemsEl    = root.querySelector('[data-cd-items]');\n  var emptyEl    = root.querySelector('[data-cd-empty]');\n  var footEl     = root.querySelector('[data-cd-foot]');\n  var countEl    = root.querySelector('[data-cd-count]');\n  var subtotalEl = root.querySelector('[data-cd-subtotal]');\n  var shipEl     = root.querySelector('[data-cd-ship]');\n  var shipMsgEl  = root.querySelector('[data-cd-shipmsg]');\n  var shipFillEl = root.querySelector('[data-cd-shipfill]');\n  var recsEl     = root.querySelector('[data-cd-recs]');\n  var recsListEl = root.querySelector('[data-cd-recslist]');\n\n  var moneyFormat = root.getAttribute('data-cd-money') || '&pound;{{amount}}';\n  var lastFocused = null;\n  var lastCart = null;\n  var recsLoadedFor = null;\n  var lastAddedProductId = null;\n\n  /* ---------------------------------------------------------------\n     Money. Shopify returns cents; the shop's own money_format string\n     decides separators and decimals, so honour it rather than hard-coding\n     a pound sign \u2014 this theme is a white-label fork and gets reused.\n     --------------------------------------------------------------- */\n  function formatMoney(cents) {\n    var value = (cents || 0) / 100;\n\n    function withDelims(num, thousands, decimal, places) {\n      var fixed = num.toFixed(places);\n      var parts = fixed.split('.');\n      var whole = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, thousands);\n      return places > 0 && parts[1] ? whole + decimal + parts[1] : whole;\n    }\n\n    return moneyFormat.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, function (_, name) {\n      switch (name) {\n        case 'amount':                                   return withDelims(value, ',', '.', 2);\n        case 'amount_no_decimals':                       return withDelims(value, ',', '.', 0);\n        case 'amount_with_comma_separator':              return withDelims(value, '.', ',', 2);\n        case 'amount_no_decimals_with_comma_separator':  return withDelims(value, '.', ',', 0);\n        case 'amount_with_apostrophe_separator':         return withDelims(value, \"'\", '.', 2);\n        case 'amount_with_space_separator':              return withDelims(value, ' ', ',', 2);\n        case 'amount_no_decimals_with_space_separator':  return withDelims(value, ' ', ',', 0);\n        default:                                         return withDelims(value, ',', '.', 2);\n      }\n    });\n  }\n\n  /* Money format strings legitimately contain entities such as &pound;, and some\n     product titles come back HTML-escaped. Everything this script renders is\n     assigned with textContent, so the ONLY job here is turning an entity into the\n     character it denotes.\n\n     Deliberately not the usual `el.innerHTML = str; return el.value` textarea\n     trick. That is safe in itself \u2014 textarea content is RCDATA, so no elements\n     are constructed and nothing executes \u2014 but it puts an innerHTML assignment\n     fed by server data into a file people will copy from, and the next person to\n     reach for it may not be assigning into a textarea. An explicit table costs\n     nothing and cannot be misused. */\n  var ENTITIES = {\n    amp: '&', lt: '<', gt: '>', quot: '\"', apos: \"'\", nbsp: '\u00A0',\n    pound: '\u00A3', euro: '\u20AC', yen: '\u00A5', cent: '\u00A2',\n    reg: '\u00AE', copy: '\u00A9', trade: '\u2122',\n    hellip: '\u2026', mdash: '\u2014', ndash: '\u2013',\n    lsquo: '\u2018', rsquo: '\u2019', ldquo: '\u201C', rdquo: '\u201D',\n    deg: '\u00B0', times: '\u00D7', minus: '\u2212'\n  };\n\n  /* OPTION LABELS - the rules of snippets/ark-option-label.liquid, for the\n     lines this script draws itself (added items, recommendations). Keep the\n     two in step: display only, the posted values are never changed. */\n  var SIZE_CODES = {\n    xsmall: 'XS', xs: 'XS', extrasmall: 'XS', small: 'S', s: 'S', medium: 'M', m: 'M',\n    large: 'L', l: 'L', xlarge: 'XL', xl: 'XL', extralarge: 'XL',\n    xxlarge: '2XL', xxl: '2XL', '2xl': '2XL', '2xlarge': '2XL',\n    xxxlarge: '3XL', xxxl: '3XL', '3xl': '3XL', '3xlarge': '3XL',\n    '4xl': '4XL', '4xlarge': '4XL', xxxxl: '4XL', '5xl': '5XL', '5xlarge': '5XL'\n  };\n  function optKey(name) {\n    var n = String(name || '').trim().toLowerCase().replace(/color/g, 'colour')\n      .split(' (ml)').join('').split('(ml)').join('').split(' (clothing)').join('').split(' (mm/inch)').join('').trim();\n    if (n === 'sze' || n === 'bottle size' || n === 'bottle' || n === 'volume' || n === 'size (l)' || n === 'bottle size (ml)') { return 'size'; }\n    return n;\n  }\n  function optName(name) {\n    var n = optKey(name);\n    return n.charAt(0).toUpperCase() + n.slice(1);\n  }\n  /* Title case word by word; a word with a digit in it (\"205L\", \"0-3\") stays\n     as typed, the same rule as the Liquid snippet. */\n  function titleWords(v) {\n    return v.split(' ').map(function (w) {\n      return /[0-9]/.test(w) ? w : w.charAt(0).toUpperCase() + w.slice(1).toLowerCase();\n    }).join(' ');\n  }\n  function optValue(name, value) {\n    var n = optKey(name);\n    var v = String(value == null ? '' : value).trim();\n    var k = v.toLowerCase().replace(/[ .\\-]/g, '');\n    var k2 = v.toLowerCase().replace(/ /g, '');\n    if (n.indexOf('size') !== -1) {\n      if (SIZE_CODES[k]) { return SIZE_CODES[k]; }\n      if (/^[0-9]/.test(v) && /ml$/.test(k)) { return v.toLowerCase(); }\n      if (/^[0-9]/.test(v)) {\n        var lit = k2.match(/^(.*?)(litres|litre|ltr)$/);\n        if (lit) { return lit[1] + 'L'; }\n      }\n      if (v.length > 3 && v === v.toUpperCase() && v !== v.toLowerCase()) { return titleWords(v); }\n      return v;\n    }\n    if (k === 'mattblack') { v = 'Matt Black'; } else if (k === 'mattwhite') { v = 'Matt White'; }\n    if ((v.length > 3 && v === v.toUpperCase()) || v === v.toLowerCase() ||\n        (n.indexOf('colour') !== -1 && v === v.toUpperCase() && v !== v.toLowerCase())) {\n      return titleWords(v);\n    }\n    return v;\n  }\n  /* Titles as the server prints them: no en/em dashes (the client's copy\n     rule; the same chain as the Liquid title outputs). */\n  function cleanTitle(s) {\n    /* the site's one naming rule first (snippets/ark-name-js) */\n    if (window.arkName) { s = window.arkName(s); }\n    return String(s || '').split(' \\u2013 ').join(' - ').split(' \\u2014 ').join(' - ').split('\\u2014').join(' - ').split('\\u2013').join('-');\n  }\n\n  function optLine(pairs) {\n    return (pairs || []).filter(function (o) {\n      return o && o.name && o.value != null && !(o.name === 'Title' && /^Default/.test(String(o.value)));\n    }).map(function (o) { return optName(o.name) + ': ' + optValue(o.name, o.value); }).join(' \\u00B7 ');\n  }\n  function decodeEntities(str) {\n    if (str == null) { return ''; }\n    str = String(str);\n    if (str.indexOf('&') === -1) { return str; }\n    return str.replace(/&(#x?[0-9a-f]+|\\w+);/gi, function (whole, body) {\n      if (body.charAt(0) === '#') {\n        var hex = body.charAt(1) === 'x' || body.charAt(1) === 'X';\n        var code = parseInt(hex ? body.slice(2) : body.slice(1), hex ? 16 : 10);\n        /* Reject anything outside the Unicode range or in the surrogate block;\n           String.fromCodePoint throws on those and a title is not worth an\n           exception that empties the whole drawer. */\n        if (!isFinite(code) || code < 0 || code > 0x10FFFF || (code >= 0xD800 && code <= 0xDFFF)) {\n          return whole;\n        }\n        return String.fromCodePoint(code);\n      }\n      var named = ENTITIES[body.toLowerCase()];\n      return named === undefined ? whole : named;\n    });\n  }\n\n  function money(cents) { return decodeEntities(formatMoney(cents)); }\n\n  /* Published for the basket PAGE, which needs the same shop money_format to\n     paint figures straight from a /cart/change.js payload. One implementation,\n     one set of separator rules, so the drawer and the page can never disagree\n     about how a price is written. */\n  window.arkFormatMoney = money;\n\n  /* THE PAYABLE FIGURE (requirement CART-01). Once the basket page's delivery\n     estimator has asked Shopify for rates, every /cart/change.js answer carries\n     a total_price that INCLUDES the first delivery rate (measured 2026-09-23:\n     goods 540, total_price 935 with Express at 3.95) while /cart.js says 540.\n     The drawer painted that figure as the Estimated total, so a quantity change\n     after an estimate showed the delivery twice over. The payable figure is\n     rebuilt from the parts every answer agrees on: the goods after line\n     discounts, less the basket-level discounts. Published for the basket page,\n     so both baskets use one rule. */\n  function payable(cart) {\n    if (!cart) { return 0; }\n    var cut = (cart.cart_level_discount_applications || []).reduce(function (a, d) {\n      return a + (d.total_allocated_amount || 0);\n    }, 0);\n    return (cart.items_subtotal_price != null ? cart.items_subtotal_price : cart.total_price) - cut;\n  }\n  window.arkCartPayable = payable;\n\n  /* A figure that moved gets the basket page's highlight, a wash behind the\n     number (MOT-07): the drawer used to rebuild every line with no sign of\n     which number had changed. Restarted if it is already running. */\n  function setFigure(el, text) {\n    if (!el || el.textContent.trim() === String(text).trim()) { return; }\n    el.textContent = text;\n    if (!isOpen()) { return; }\n    el.classList.remove('is-changed');\n    void el.offsetWidth;\n    el.classList.add('is-changed');\n    window.setTimeout(function () { el.classList.remove('is-changed'); }, 700);\n  }\n\n  /* COMPARE-AT PRICES (audit UNI-17). A sale line shows the old price struck\n     through over the price in the sale red, as the card and the product page\n     do. /cart.js carries no compare-at price, so the drawer learns it the way\n     it learns stock ceilings: from Liquid (each server-rendered line states\n     its variant's compare-at price), and for a line added later from the\n     product's own .js, which does carry it. Kept for the session. */\n  var WAS_KEY = 'ark:was';\n  var wasMap = {};\n  var wasAsked = {};\n  /* ONE /products/<handle>.js per product per page (Fable F2): the was-price and the Delivery Only note asked for the\n     same file for every basket line. A failed read answers null. */\n  var productJsMemo = {};\n  function productJs(handle) {\n    if (!productJsMemo[handle]) {\n      productJsMemo[handle] = fetch('/products/' + encodeURIComponent(handle) + '.js', { headers: { 'Accept': 'application/json' } })\n        .then(function (r) { return r.ok ? r.json() : null; })\n        .catch(function () { return null; });\n    }\n    return productJsMemo[handle];\n  }\n  try { wasMap = JSON.parse(window.sessionStorage.getItem(WAS_KEY) || '{}') || {}; } catch (e) { wasMap = {}; }\n  function keepWas() {\n    try { window.sessionStorage.setItem(WAS_KEY, JSON.stringify(wasMap)); } catch (e) {}\n  }\n  function seedWas(scope) {\n    var lines = (scope || document).querySelectorAll('[data-cd-item][data-cd-was]');\n    for (var i = 0; i < lines.length; i++) {\n      var k = (lines[i].getAttribute('data-key') || '').split(':')[0];\n      if (k) { wasMap[k] = parseInt(lines[i].getAttribute('data-cd-was'), 10) || 0; }\n    }\n    keepWas();\n  }\n  function wasOf(item) {\n    var id = String(item.id);\n    if (Object.prototype.hasOwnProperty.call(wasMap, id)) { return wasMap[id] || 0; }\n    askWas(item.handle);\n    return 0;\n  }\n  function askWas(handle) {\n    if (!handle || wasAsked[handle]) { return; }\n    wasAsked[handle] = true;\n    productJs(handle)\n      .then(function (p) {\n        if (!p || !p.variants) { return; }\n        p.variants.forEach(function (v) { wasMap[String(v.id)] = v.compare_at_price || 0; });\n        keepWas();\n        if (lastCart && itemsEl) {\n          lastCart.items.forEach(function (item) {\n            var li = itemsEl.querySelector('[data-cd-item][data-key=\"' + esc(item.key) + '\"]');\n            if (li) { paintWas(li.querySelector('.ark-cd__money'), item); }\n          });\n        }\n      })\n      .catch(function () {});\n  }\n  function paintWas(box, item) {\n    if (!box) { return; }\n    var price = box.querySelector('.ark-cd__price');\n    var s = box.querySelector('.ark-cd__was');\n    /* struck: the compare-at price on a sale, or the price before an automatic\n       discount (the kit's Buy X get Y), whichever is larger */\n    var unit = wasOf(item);\n    var wasLine = unit > (item.original_price || item.price || 0) ? unit * item.quantity : 0;\n    if ((item.original_line_price || 0) > (item.final_line_price || 0) && item.original_line_price > wasLine) { wasLine = item.original_line_price; }\n    if (wasLine > (item.final_line_price || 0)) {\n      if (!s) {\n        s = document.createElement('s');\n        s.className = 'ark-cd__was';\n        var sr = document.createElement('span');\n        sr.className = 'ark-visually-hidden';\n        sr.textContent = 'Was ';\n        s.appendChild(sr);\n        var v = document.createElement('span');\n        v.setAttribute('data-cd-was-val', '');\n        s.appendChild(v);\n        box.insertBefore(s, price);\n      }\n      s.querySelector('[data-cd-was-val]').textContent = money(wasLine);\n      if (price) { price.classList.add('ark-cd__price--sale'); }\n    } else {\n      if (s) { s.remove(); }\n      if (price) { price.classList.remove('ark-cd__price--sale'); }\n    }\n  }\n\n  /* The last product the shopper looked at, from the recently viewed list the\n     product page keeps. Seeds the suggestions when the basket is empty. */\n  function recentProductId() {\n    try {\n      var list = JSON.parse(window.localStorage.getItem('arkui_recent_v1')) || [];\n      for (var i = 0; i < list.length; i++) { if (list[i] && list[i].id) { return list[i].id; } }\n    } catch (e) {}\n    return null;\n  }\n\n  /* ---------------------------------------------------------------\n     Open / close\n     --------------------------------------------------------------- */\n  function isOpen() { return root.classList.contains('is-open'); }\n\n  /* The header basket is a real <a href=\"/cart\">, and it stays one: with no\n     JavaScript it must still go to the cart page. But WITH this script it does\n     not navigate - it opens a modal - and it was announcing itself as a plain\n     link to /cart, giving no hint that a dialog was about to appear and no way\n     to know whether it was already open.\n\n     The promise is made HERE rather than in the Liquid, because this file is\n     what keeps it: markup that claims aria-haspopup=\"dialog\" while the script\n     that opens the dialog failed to load is a worse lie than the plain link. */\n  function cartLinks() {\n    return document.querySelectorAll('[data-ark-cart-link]');\n  }\n\n  function announceDrawerControl(expanded) {\n    var links = cartLinks();\n    for (var i = 0; i < links.length; i++) {\n      links[i].setAttribute('aria-haspopup', 'dialog');\n      links[i].setAttribute('aria-controls', 'arkCartDrawerPanel');\n      links[i].setAttribute('aria-expanded', expanded ? 'true' : 'false');\n    }\n  }\n  announceDrawerControl(false);\n\n  /* The basket link lives in the HEADER section. When the theme editor\n     re-renders that section the link is a brand new element with none of the\n     dialog semantics on it, and this file - which lives in the layout, not the\n     section - never notices. One line to re-apply them. */\n  document.addEventListener('shopify:section:load', function () {\n    announceDrawerControl(isOpen());\n  });\n\n  function open() {\n    if (isOpen()) { return; }\n    lastFocused = document.activeElement;\n    root.hidden = false;\n    document.documentElement.classList.add('ark-cd-up');\n    /* The panel must be laid out in its CLOSED state before `is-open` flips it,\n       or the browser has no \"from\" value and the transform snaps into place\n       instead of sliding. Reading offsetHeight forces that layout synchronously,\n       which is deterministic - the double requestAnimationFrame this replaced\n       was not: rAF does not run in a background tab, and this function has\n       already put `ark-cd-open` on <html>, so a callback that never arrives\n       left the page scroll-locked behind a drawer that never appeared. */\n    void root.offsetHeight;\n    root.classList.add('is-open');\n    document.documentElement.classList.add('ark-cd-open');\n    document.body.classList.add('ark-cd-open');\n    var closeBtn = root.querySelector('[data-cd-close]:not(.ark-cd__scrim)');\n    if (closeBtn && closeBtn.focus) { closeBtn.focus(); }\n    announceDrawerControl(true);\n    express(lastCart ? lastCart.item_count : Number((countEl && countEl.textContent) || 0));\n  }\n\n  /* EXPRESS CHECKOUT (21 Oct 2026): Shop Pay / PayPal / Apple Pay / Google Pay, the block the basket page shows.\n     It carries Shopify's wallet set-up and wakes the wallets' scripts, so it is fetched once, through the Section\n     Rendering API, the first time the drawer is open with something in it, and then kept. Shopify's buttons read\n     the basket when pressed, so later changes need no refetch; an empty basket only hides them. */\n  var expressEl = root.querySelector('[data-cd-express]');\n  var expressSlot = root.querySelector('[data-cd-express-slot]');\n  var expressState = 0; /* 0 can request, 1 asking, 2 shown */\n  function express(count) {\n    if (!expressEl || !expressSlot) { return; }\n    if (!count) { expressEl.hidden = true; return; }\n    if (expressState === 2) { expressEl.hidden = false; return; }\n    if (expressState !== 0 || !isOpen()) { return; }\n    expressState = 1;\n    /* the basket route, and no JSON Accept header: '/?sections=' sent as JSON came back without the buttons */\n    var base = (window.Shopify && window.Shopify.routes && window.Shopify.routes.root) || '/';\n    fetch(base + 'cart?sections=ark-express-checkout')\n      .then(function (r) { return r.ok ? r.json() : null; })\n      .then(function (d) {\n        var html = d && d['ark-express-checkout'];\n        /* A null section can be a render failure even on HTTP 200. Empty markup can also\n           reflect a basket emptied while this request was in flight. Retry on the next\n           drawer open or basket update; never start an automatic request loop. */\n        if (typeof html !== 'string' || html.indexOf('accelerated-checkout') === -1) { expressState = 0; return; }\n        expressSlot.innerHTML = walletsForDevice(html);\n        expressState = 2;\n        expressEl.hidden = !(lastCart ? lastCart.item_count : count);\n      })\n      .catch(function () { expressState = 0; });\n  }\n\n  function close() {\n    if (!isOpen()) { return; }\n    root.classList.remove('is-open');\n    document.documentElement.classList.remove('ark-cd-open');\n    document.body.classList.remove('ark-cd-open');\n    /* keep it in the tree until the slide-out finishes, then hide it from\n       assistive tech and tab order */\n    window.setTimeout(function () {\n      if (!isOpen()) { root.hidden = true; document.documentElement.classList.remove('ark-cd-up'); }\n    }, window.ArkMotion && window.ArkMotion.calm() ? 0 : 340);\n    if (lastFocused && lastFocused.focus) { lastFocused.focus(); }\n    lastFocused = null;\n    announceDrawerControl(false);\n  }\n\n  /* ---------------------------------------------------------------\n     Rendering\n     --------------------------------------------------------------- */\n  /* Lines Liquid told us cannot be shipped. Seeded from the server-rendered\n     drawer on boot and re-applied on every re-render, because /cart.js does not\n     report availability and asking per variant would cost a request per line.\n     A line added during the session is one the shopper just added successfully,\n     so this set never needs to grow on its own. */\n  var goneKeys = {};\n  Array.prototype.forEach.call(\n    (root && root.querySelectorAll('[data-cd-item][data-cd-gone]')) || [],\n    function (el) { goneKeys[el.getAttribute('data-key')] = true; }\n  );\n\n  function lineNode(item) {\n    var li = document.createElement('li');\n    li.className = 'ark-cd__item';\n    li.setAttribute('data-cd-item', '');\n    li.setAttribute('data-key', item.key);\n    window.ArkCartLines.stamp(li, item);\n    if (goneKeys[item.key]) {\n      li.className += ' ark-cd__item--gone';\n      li.setAttribute('data-cd-gone', '');\n    }\n\n    var thumb = document.createElement('a');\n    thumb.className = 'ark-cd__thumb';\n    thumb.href = item.url;\n    thumb.tabIndex = -1;\n    thumb.setAttribute('aria-hidden', 'true');\n    if (item.image) {\n      var img = document.createElement('img');\n      /* the line's box is 62px on a phone and 74px from 600px: the browser\n         takes the file its screen needs (240 covers the phone at 3x) */\n      img.sizes = '(max-width: 599px) 62px, 74px';\n      img.srcset = sizedImage(item.image, 80) + ' 80w, ' + sizedImage(item.image, 160) + ' 160w, ' + sizedImage(item.image, 240) + ' 240w';\n      img.src = sizedImage(item.image, 240);\n      img.alt = '';\n      img.loading = 'lazy';\n      img.setAttribute('data-ark-fit', 'thumb');\n      thumb.appendChild(img);\n    }\n    li.appendChild(thumb);\n\n    var info = document.createElement('div');\n    info.className = 'ark-cd__info';\n\n    var name = document.createElement('a');\n    name.className = 'ark-cd__name';\n    name.href = item.url;\n    name.textContent = cleanTitle(decodeEntities(item.product_title || item.title));\n    info.appendChild(name);\n\n    /* The options as the product page prints them (\"Size: 500ml\"), from the\n       line's own options_with_values; the raw variant title only if a\n       response ever lacks them. */\n    var vTitle = optLine(item.options_with_values || []) ||\n      ((item.variant_title && item.variant_title.indexOf('Default') === -1) ? item.variant_title : '');\n\n    /* A line on a plan (the monthly Trade Membership) names the plan, as the\n       Liquid render and checkout do, and keeps its quantity: one membership\n       per account, so it gets the quantity box without - and +. */\n    var onPlan = !!(item.selling_plan_allocation && item.selling_plan_allocation.selling_plan);\n    if (onPlan) {\n      var sp = document.createElement('p');\n      sp.className = 'ark-cd__variant';\n      sp.textContent = decodeEntities(item.selling_plan_allocation.selling_plan.name || '');\n      info.appendChild(sp);\n    }\n\n    /* The line's own properties, as snippets/ark-line-props prints them (U.50): a gift card's recipient,\n       send date and message. Keys starting with \"_\" are Shopify's own. */\n    var props = item.properties || {};\n    Object.keys(props).forEach(function (k) {\n      var val = props[k] == null ? '' : String(props[k]).trim();\n      if (!k || k.charAt(0) === '_' || !val) { return; }\n      if (k === 'Send on' && /^\\d{4}-\\d{2}-\\d{2}$/.test(val)) {\n        var dp = val.split('-');\n        val = parseInt(dp[2], 10) + ' ' + ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][parseInt(dp[1], 10) - 1] + ' ' + dp[0];\n      }\n      var pp = document.createElement('p');\n      pp.className = 'ark-cd__variant ark-lineprop';\n      var pk = document.createElement('span');\n      pk.className = 'ark-lineprop__k';\n      pk.textContent = k + ':';\n      pp.appendChild(pk);\n      pp.appendChild(document.createTextNode(' ' + val));\n      info.appendChild(pp);\n    });\n\n    /* A native bundle lists what is in it, as snippets/ark-bundle-includes prints it (27 Oct). */\n    var bparts = window.ArkBundles && window.ArkBundles.parts(item.variant_id || item.id);\n    if (bparts && bparts.every(function (p) { return p[2]; })) {\n      var bp = document.createElement('p');\n      bp.className = 'ark-cd__variant ark-lineprop ark-includes';\n      var bk = document.createElement('span');\n      bk.className = 'ark-lineprop__k';\n      bk.textContent = root.getAttribute('data-cd-includes') || 'Includes:';\n      bp.appendChild(bk);\n      bp.appendChild(document.createTextNode(' ' + bparts.map(function (p) { return p[1] + ' \u00D7 ' + p[2]; }).join(', ')));\n      info.appendChild(bp);\n    }\n\n    /* Price per litre or kilo, as the Liquid render writes it with\n       unit_price_with_measurement: price, \"/\", the reference amount when it\n       is not 1, the unit (\"\u00A32.19/100ml\", \"\u00A321.90/L\"). */\n    var um = item.unit_price_measurement;\n    if (um && item.unit_price != null && um.reference_unit) {\n      var up = document.createElement('p');\n      up.className = 'ark-cd__unit';\n      var upSr = document.createElement('span');\n      upSr.className = 'ark-visually-hidden';\n      upSr.textContent = 'Unit price ';\n      up.appendChild(upSr);\n      var unitName = um.reference_unit === 'l' ? 'L' : um.reference_unit;\n      up.appendChild(document.createTextNode(money(item.unit_price) + '/' + (um.reference_value && um.reference_value !== 1 ? um.reference_value : '') + unitName));\n      info.appendChild(up);\n    }\n\n    var row = document.createElement('div');\n    row.className = 'ark-cd__row';\n\n    /* Carry the ceiling onto the rebuilt row. The server's <li> states it,\n       and this row replaces that <li> - without this the attribute exists only\n       until the first render and the line becomes unjudgeable. */\n    if (window.ArkQty) {\n      var lineCap = window.ArkQty.stock(String(item.id));\n      li.setAttribute('data-cd-max', lineCap === null ? '0' : String(lineCap));\n    }\n\n    var qty = document.createElement('div');\n    qty.className = 'ark-cd__qty' + (onPlan ? ' ark-cd__qty--plan' : '');\n    qty.setAttribute('data-cd-qty', '');\n    if (!onPlan) { qty.appendChild(stepBtn('-1', 'Decrease quantity of ' + cleanTitle(decodeEntities(item.product_title || item.title)))); }\n    var val = document.createElement('span');\n    val.className = 'ark-cd__qtyval';\n    val.setAttribute('data-cd-qtyval', '');\n    val.textContent = item.quantity;\n    qty.appendChild(val);\n    if (!onPlan) { qty.appendChild(stepBtn('1', 'Increase quantity of ' + cleanTitle(decodeEntities(item.product_title || item.title)))); }\n    row.appendChild(qty);\n\n    var box = document.createElement('span');\n    box.className = 'ark-cd__money';\n    var price = document.createElement('span');\n    price.className = 'ark-cd__price';\n    price.textContent = money(item.final_line_price);\n    box.appendChild(price);\n    paintWas(box, item);\n    if (vTitle) {\n      var v = document.createElement('span');\n      v.className = 'ark-cd__option';\n      v.textContent = decodeEntities(vTitle);\n      box.appendChild(v);\n    }\n    row.appendChild(box);\n    info.appendChild(row);\n\n    if (goneKeys[item.key]) {\n      var goneNote = document.createElement('p');\n      goneNote.className = 'ark-cd__gone';\n      goneNote.setAttribute('role', 'status');\n      goneNote.textContent = 'Out of stock. Remove to continue';\n      info.appendChild(goneNote);\n    }\n\n    var rm = document.createElement('button');\n    rm.type = 'button';\n    rm.className = 'ark-cd__remove';\n    rm.setAttribute('data-cd-remove', '');\n    rm.setAttribute('aria-label', 'Remove ' + cleanTitle(decodeEntities(item.product_title || item.title)) + ' from basket');\n    rm.textContent = 'Remove';\n    info.appendChild(rm);\n\n    li.appendChild(info);\n    /* The ceiling is known by now (seeded above from the server's lines or\n       from a product page earlier in the session), so the \"+\" and the stock\n       note are drawn in their correct state rather than going dead on the\n       first press. Here, once the line is complete, and NOT on a timer: a\n       timer let the rebuilt list paint one frame without the note, so every\n       line under a line at its ceiling jumped 33px up and back down when\n       another line was removed (measured at 390). */\n    paintLineCap(li);\n    return li;\n  }\n\n  /* The +/- glyphs are inline SVG in the server-rendered markup; rebuilding\n     them here would duplicate the icon set in JS. A character is indistinguishable\n     at 14px and the accessible name lives on the button's aria-label. */\n  function stepBtn(delta, label) {\n    var b = document.createElement('button');\n    b.type = 'button';\n    b.className = 'ark-cd__step';\n    b.setAttribute('data-cd-step', delta);\n    b.setAttribute('aria-label', label);\n    b.textContent = delta === '1' ? '+' : '\u2212';\n    return b;\n  }\n\n  function render(cart) {\n    if (!cart) { return; }\n\n    /* The line list is rebuilt from scratch on every change, so whatever the\n       shopper had focused is destroyed - a keyboard or screen-reader user was\n       thrown to the top of the document on every single + or -. Remember the\n       control by its line key and role, and put focus back on the equivalent\n       control in the new markup. */\n    var wasFocused = null;\n    var active = document.activeElement;\n    if (active && root.contains(active)) {\n      var owner = active.closest('[data-cd-item]');\n      if (owner) {\n        wasFocused = {\n          key: owner.getAttribute('data-key'),\n          step: active.getAttribute('data-cd-step'),\n          remove: active.hasAttribute('data-cd-remove')\n        };\n      }\n    }\n\n    var changedKeys = window.ArkCartLines.rekey(root, '[data-cd-item]', 'data-key', cart.items, cdTargets);\n    Object.keys(changedKeys).forEach(function(k){if(goneKeys[k]){goneKeys[changedKeys[k]]=true;delete goneKeys[k];}});\n    if(wasFocused && changedKeys[wasFocused.key])wasFocused.key=changedKeys[wasFocused.key];\n    lastCart = cart;\n    var due = payable(cart);\n    if (countEl) { countEl.textContent = cart.item_count; }\n    setFigure(subtotalEl, money(due));\n\n    /* Saving row, printed hidden by Liquid in the footer and shown here the\n       moment a saving appears (audit cart-07). */\n    var savingEl = root.querySelector('[data-cd-saving]');\n    var saved = (cart.original_total_price || due) - due;\n    if (savingEl) {\n      if (saved > 0) { savingEl.textContent = 'You save ' + money(saved); savingEl.hidden = false; }\n      else { savingEl.hidden = true; }\n    }\n\n    var empty = cart.item_count === 0;\n    express(cart.item_count);\n    if (emptyEl) {\n      var emptyWas = emptyEl.hidden;\n      emptyEl.hidden = !empty;\n      /* the empty-basket message arrives the way content does (APPEAR values), after the last line has closed */\n      if (emptyWas && empty && isOpen() && window.ArkMotion) { window.ArkMotion.rise(emptyEl, 0); }\n    }\n    if (itemsEl) { itemsEl.hidden = empty; }\n    if (footEl) { footEl.hidden = empty; }\n    if (shipEl) { shipEl.hidden = empty; }\n\n    /* SAME LINES, UPDATED IN PLACE (audit cart-10, MOT-07). Every change used\n       to empty the list and rebuild every line, image and button from /cart.js:\n       the line the shopper was pressing was replaced mid-gesture, it snapped\n       from its busy dim straight back to full, and nothing said which figure\n       had moved. When the basket holds the same lines in the same order, only\n       the digits and prices are written, the moved price is highlighted, and\n       the line fades back up. A different set of lines is rebuilt as before. */\n    if (itemsEl) {\n      var have = Array.prototype.filter.call(itemsEl.children, function (li) { return li.hasAttribute('data-cd-item'); });\n      var same = have.length === cart.items.length && cart.items.every(function (item, i) {\n        return have[i].getAttribute('data-key') === item.key;\n      });\n      if (same) {\n        cart.items.forEach(function (item, i) { updateLine(have[i], item); });\n      } else {\n        /* A DIFFERENT SET OF LINES (21 Oct, owner: an add \"just appears\" while a removal closes). Lines still in\n           the basket are updated in place - rebuilding them re-loaded every picture and the whole list blinked on\n           each add. A new line is built and opens in; a line no longer in the basket closes where it is. All of it\n           through ArkMotion, the site's one motion system, and only while the drawer is open. */\n        var M = window.ArkMotion, moving = !!M && isOpen();\n        var byKey = {}, wanted = {};\n        have.forEach(function (li) { byKey[li.getAttribute('data-key')] = li; });\n        cart.items.forEach(function (item) { wanted[item.key] = true; });\n        have.forEach(function (li) {\n          if (wanted[li.getAttribute('data-key')]) { return; }\n          li.removeAttribute('data-cd-item');\n          if (moving) { M.exit(li, function () { li.remove(); }); } else { li.remove(); }\n        });\n        var prev = null;\n        cart.items.forEach(function (item) {\n          var li = byKey[item.key], fresh = !li;\n          if (fresh) {\n            li = lineNode(item);\n            /* A line with a newer tap still on its way keeps the number the\n               shopper asked for, and stays dimmed until that tap settles. */\n            if (cdTargets[item.key] !== undefined) {\n              var qv = li.querySelector('[data-cd-qtyval]');\n              /* a pending removal keeps the basket's number, as queueLine does */\n              if (qv && cdTargets[item.key] > 0) { qv.textContent = cdTargets[item.key]; paintLineCap(li); }\n              li.classList.add('is-busy');\n            }\n          } else {\n            updateLine(li, item);\n          }\n          var at = prev ? prev.nextSibling : itemsEl.firstChild;\n          if (li !== at) { itemsEl.insertBefore(li, at); }\n          prev = li;\n          if (fresh && moving) { M.enter(li); }\n        });\n      }\n    }\n\n    renderShip(cart);\n    renderDeal(cart);\n    renderPartner(cart);\n    syncHeader(cart);\n\n    /* An empty basket offers products too (audit cart-23): the rail is seeded\n       from the last product the shopper viewed, and hides only when there is\n       none. The heading reads \"You may also like\" here, not \"need\". */\n    var recsTitle = recsEl && recsEl.querySelector('.ark-cd__recstitle');\n    if (recsTitle) { recsTitle.textContent = empty ? 'You may also like' : 'You may also need'; }\n    if (recsEl) { recsEl.setAttribute('aria-label', empty ? 'You may also like' : 'You may also need'); }\n    if (empty) {\n      var seen = recentProductId();\n      if (seen) { loadRecs(seen); }\n      else {\n        if (recsEl) { recsEl.hidden = true; }\n        recsLoadedFor = null;\n      }\n    } else {\n      /* Seeded from the product the shopper just added, not from whatever\n         happens to sit first in the basket - `cart.items[0]` is the OLDEST line,\n         so the rail recommended things to go with something added days ago.\n         The add sites pass the product id in the event detail; the newest line\n         is the fallback when they cannot. */\n      var seedId = lastAddedProductId ||\n        (cart.items.length ? cart.items[cart.items.length - 1].product_id : null);\n      var seedHandle = null;\n      for (var si = cart.items.length - 1; si >= 0; si--) {\n        if (cart.items[si].product_id === seedId) { seedHandle = cart.items[si].handle; break; }\n      }\n      loadRecs(seedId, seedHandle);\n    }\n\n    if (wasFocused && wasFocused.key) {\n      var line = root.querySelector('[data-cd-item][data-key=\"' + (window.CSS && CSS.escape ? CSS.escape(wasFocused.key) : wasFocused.key) + '\"]');\n      var target = null;\n      if (line) {\n        target = wasFocused.remove\n          ? line.querySelector('[data-cd-remove]')\n          : line.querySelector('[data-cd-step=\"' + wasFocused.step + '\"]');\n      }\n      /* The line may be gone (quantity taken to zero). Fall back to the panel\n         itself rather than letting focus fall out of the drawer entirely. */\n      if (!target) { target = root.querySelector('[data-cd-close]:not(.ark-cd__scrim)'); }\n      if (target && target.focus) { target.focus({ preventScroll: true }); }\n    }\n  }\n\n  function updateLine(li, item) {\n    var pending = cdTargets[item.key] !== undefined;\n    var valEl = li.querySelector('[data-cd-qtyval]');\n    if (valEl && !pending) { valEl.textContent = item.quantity; }\n    setFigure(li.querySelector('.ark-cd__price'), money(item.final_line_price));\n    paintWas(li.querySelector('.ark-cd__money'), item);\n    if (window.ArkQty) {\n      var lineCap = window.ArkQty.stock(String(item.id));\n      li.setAttribute('data-cd-max', lineCap === null ? '0' : String(lineCap));\n    }\n    /* The request succeeded, so whatever the line was last told off for no\n       longer applies (a refused change re-writes its message after this). */\n    var err = li.querySelector('.ark-cd__lineerr');\n    if (err) { err.remove(); }\n    if (!pending) {\n      li.classList.remove('is-busy');\n      li.removeAttribute('aria-busy');\n    }\n    paintLineCap(li);\n  }\n\n  function renderShip(cart) {\n    if (!shipEl || !shipMsgEl || !shipFillEl) { return; }\n    var threshold = parseInt(shipEl.getAttribute('data-cd-threshold'), 10);\n    if (!threshold || threshold <= 0) { shipEl.hidden = true; return; }\n\n    /* U.50: Shopify does not count its own gift card products towards a price-based free delivery rate,\n       and a digital card is never posted. The meter measures the rest of the basket, and says nothing at\n       all when nothing in the basket needs posting. */\n    var cdItems = (cart && cart.items) || [];\n    var noPost = cdItems.length > 0 && !cdItems.some(function (i) { return i.requires_shipping; });\n    if (noPost) { shipEl.hidden = true; shipEl.setAttribute('data-cd-nopost', '1'); return; }\n    if (shipEl.hasAttribute('data-cd-nopost')) { shipEl.hidden = false; shipEl.removeAttribute('data-cd-nopost'); }\n    var gcLines = cdItems.reduce(function (a, i) { return a + (i.gift_card ? (i.final_line_price || 0) : 0); }, 0);\n    var total = payable(cart) - gcLines;\n    var remaining = threshold - total;\n    var pct = Math.max(0, Math.min(100, (total / threshold) * 100));\n\n    shipFillEl.style.width = pct + '%';\n    shipMsgEl.textContent = '';\n\n    if (remaining <= 0) {\n      /* the moment the basket crosses the line, once (not on the first paint) */\n      if (!shipEl.classList.contains('is-met') && shipEl.getAttribute('data-cd-painted') === '1' &&\n          !(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches)) {\n        shipEl.classList.add('is-just-met');\n        window.setTimeout(function () { shipEl.classList.remove('is-just-met'); }, 900);\n      }\n      shipEl.classList.add('is-met');\n      var met = document.createElement('strong');\n      met.textContent = 'You get free Royal Mail Tracked\u00A024 delivery.';\n      shipMsgEl.appendChild(met);\n    } else {\n      shipEl.classList.remove('is-met');\n      shipMsgEl.appendChild(document.createTextNode('Spend '));\n      var amt = document.createElement('strong');\n      amt.textContent = money(remaining);\n      shipMsgEl.appendChild(amt);\n      shipMsgEl.appendChild(document.createTextNode(' more for free Tracked\u00A024 delivery.'));\n    }\n    shipEl.setAttribute('data-cd-painted', '1');\n  }\n\n  /* MULTI-BUY METER (13 Nov 2026): the shared painter (top of this file); lines with a tap still on its way count at\n     the number asked for. */\n  function renderDeal(cart) { window.ArkDeal.paint(root, cart, cdTargets); }\n\n  /* DELIVERY ONLY NOTE (owner 14 Nov 2026: \"we need to warn customers that they can order only online, and they cant\n     click and collect\"). /cart.js carries no tags, so a line's Shopify Collective tag is read once from the product's\n     own .js (tags included) and remembered for the session; Liquid seeds the first paint\n     (snippets/ark-delivery-only-note.liquid - dlvOnlyText is its sentence, change both together). */\n  var partnerTag = {};\n  var partnerCart = null;\n  function dlvOnlyText(names) {\n    var who = names.length === 1 ? names[0] : (names.length === 2 ? names[0] + ' and ' + names[1] : names.length + ' items in your basket');\n    return who + ' can\\u2019t be picked up in store, so this order will be delivered. ' + (names.length === 1 ? 'Its' : 'Their') + ' delivery cost is shown at checkout.';\n  }\n  function renderPartner(cart) {\n    var el = root.querySelector('[data-cd-partner]');\n    if (!el || !cart) { return; }\n    partnerCart = cart;\n    var handles = (cart.items || []).map(function (it) { return it.handle; });\n    var names = [];\n    (cart.items || []).forEach(function (it) {\n      var t = String(it.product_title || '').trim();\n      if (partnerTag[it.handle] === true && t && names.indexOf(t) < 0) { names.push(t); }\n    });\n    el.hidden = !names.length;\n    var txt = el.querySelector('[data-dlvonly-text]');\n    if (txt && names.length) { txt.textContent = dlvOnlyText(names); }\n    handles.forEach(function (h) {\n      if (h in partnerTag) { return; }\n      partnerTag[h] = null;\n      productJs(h)\n        .then(function (p) {\n          partnerTag[h] = !!(p && (p.tags || []).indexOf('Shopify Collective') > -1);\n          if (partnerTag[h] && partnerCart) { renderPartner(partnerCart); }\n        })\n        .catch(function () { partnerTag[h] = false; });\n    });\n  }\n\n  /* The header badge is server-rendered on load; after an Ajax change it is the\n     only part of the page outside the drawer that is now stale. */\n  function syncHeader(cart) {\n    document.querySelectorAll('[data-ark-cart-count]').forEach(function (el) {\n      var sr = el.querySelector('.ark-visually-hidden, .visually-hidden');\n      el.textContent = cart.item_count;\n      if (sr) {\n        sr.textContent = cart.item_count === 1 ? 'item in basket' : 'items in basket';\n        el.appendChild(sr);\n      }\n      el.classList.toggle('ark-hidden', cart.item_count === 0);\n    });\n    document.querySelectorAll('[data-ark-cart-total]').forEach(function (el) {\n      el.textContent = money(payable(cart));\n    });\n  }\n\n  /* ---------------------------------------------------------------\n     Cross-sell. Shopify's own recommendation endpoint, so it stays\n     relevant without anyone maintaining a list.\n     --------------------------------------------------------------- */\n  function loadRecs(productId, handle) {\n    if (!recsEl || !recsListEl || !productId) { return; }\n    if (recsLoadedFor === productId) { return; }\n    recsLoadedFor = productId;\n\n    /* `complementary` is the better rail - it is the merchant's own \"goes with\n       this\" list - but it only returns anything once complementary products\n       have been set up in Shopify's Search & Discovery app, and on this store\n       nothing has been: the endpoint answers 200 with an empty list for every\n       product, so the rail was always hidden and the drawer never offered\n       anything. `related` is Shopify's automatic fallback and does return\n       products, so it is used whenever complementary comes back empty. That\n       ordering means the rail improves by itself the moment the merchant\n       configures complementary products - no code change needed. */\n    function ask(intent) {\n      var root = (window.Shopify && window.Shopify.routes && window.Shopify.routes.root) || '/';\n      return fetch(root + 'recommendations/products.json?product_id=' + productId + '&limit=10&intent=' + intent, {\n        headers: { 'Accept': 'application/json' }\n      })\n        .then(function (r) { return r.ok ? r.json() : null; })\n        .then(function (data) { return data && Array.isArray(data.products) ? data.products : []; })\n        .catch(function () { return []; });\n    }\n\n    function paint(products) {\n      /* A later basket change owns the rail; an older response must not replace it. */\n      if (recsLoadedFor !== productId) { return; }\n      recsListEl.textContent = '';\n      products.forEach(function (p) {\n        /* This rail adds one variant without a selling plan. Subscription-only\n           products (including Trade Membership) must use their own enrolment flow. */\n        if (!p || !p.available || p.requires_selling_plan || recsListEl.children.length >= 3) { return; }\n        if (!(p.variants || []).some(function (v) { return v.available && !v.requires_selling_plan && Number(v.price) > 0; })) { return; }\n        /* a battery kit built from its parts is added from its own page, as its parts */\n        var tg = p.tags || [];\n        if (typeof tg === 'string') { tg = tg.split(/,\\s*/); }\n        if (tg.indexOf('kit-from-parts') > -1) { return; }\n        /* never offer what is already in the basket */\n        if (lastCart && lastCart.items.some(function (it) { return it.product_id === p.id; })) { return; }\n        recsListEl.appendChild(recNode(p));\n      });\n      recsEl.hidden = recsListEl.children.length === 0;\n      /* suggestions arrive like any other list content */\n      if (!recsEl.hidden && isOpen() && window.ArkMotion) { window.ArkMotion.reveal(recsListEl.children); }\n    }\n\n    /* An empty complementary answer is remembered for the session: the next\n       time this product is the newest line, related is asked straight away. */\n    function shopify() {\n      var none = false;\n      try { none = !!window.sessionStorage.getItem('ark:comp0:' + productId); } catch (e) { none = false; }\n      if (none) { ask('related').then(paint); return; }\n      ask('complementary').then(function (products) {\n        if (products.length) { paint(products); return; }\n        try { window.sessionStorage.setItem('ark:comp0:' + productId, '1'); } catch (e) { /* private mode */ }\n        ask('related').then(paint);\n      });\n    }\n\n    /* FIRST the product page's own picks (27 Oct 2026): curated pairings and the upsell rules, from\n       /products/<handle>?view=addons (templates/product.addons.liquid). Shopify's automatic related list\n       offered air fresheners beside a wash bundle; it is only the fallback now, for a product with no picks.\n       The empty basket keeps Shopify's list (\"You may also like\", seeded from a product viewed, no handle). */\n    if (!handle) { shopify(); return; }\n    var root = (window.Shopify && window.Shopify.routes && window.Shopify.routes.root) || '/';\n    /* no JSON Accept header: with one, Shopify answers with the product's own JSON and ignores the view */\n    fetch(root + 'products/' + encodeURIComponent(handle) + '?view=addons', { headers: { 'Accept': 'text/html' } })\n      .then(function (r) { return r.ok ? r.text() : ''; })\n      .then(function (txt) { var list = null; try { list = JSON.parse(txt); } catch (e) { list = null; } return Array.isArray(list) ? list : []; })\n      .catch(function () { return []; })\n      .then(function (picks) { if (picks.length) { paint(picks); } else { shopify(); } });\n  }\n\n  function recNode(p) {\n    var li = document.createElement('li');\n    li.className = 'ark-cd__rec';\n\n    var imgWrap = document.createElement('div');\n    imgWrap.className = 'ark-cd__recimg';\n    if (p.featured_image) {\n      var im = document.createElement('img');\n      /* 52px tile, sized for the screen's density. The recommendations\n         endpoint returns the 2000px original, which cost ~40 KB a tile. */\n      im.sizes = '52px';\n      im.srcset = sizedImage(p.featured_image, 54) + ' 54w, ' + sizedImage(p.featured_image, 108) + ' 108w, ' + sizedImage(p.featured_image, 162) + ' 162w';\n      im.src = sizedImage(p.featured_image, 162);\n      im.width = 162; im.height = 162;\n      im.alt = '';\n      im.loading = 'lazy';\n      im.setAttribute('data-ark-fit', 'thumb');\n      imgWrap.appendChild(im);\n    }\n    li.appendChild(imgWrap);\n\n    var mid = document.createElement('div');\n    var a = document.createElement('a');\n    a.className = 'ark-cd__recname';\n    a.href = p.url;\n    a.textContent = cleanTitle(decodeEntities(p.title));\n    mid.appendChild(a);\n    /* first available variant: these cards have no variant picker, and adding an\n       unavailable variant would fail at the API for no visible reason */\n    var variant = null;\n    for (var i = 0; i < (p.variants || []).length; i++) {\n      if (p.variants[i].available && !p.variants[i].requires_selling_plan && Number(p.variants[i].price) > 0) { variant = p.variants[i]; break; }\n    }\n    var variantId = variant ? variant.id : null;\n\n    var pr = document.createElement('span');\n    pr.className = 'ark-cd__recprice';\n    /* `p.price` is the PRODUCT minimum across all variants, but the button adds\n       the first AVAILABLE variant - which is often not the cheapest one, because\n       the cheapest is frequently the one that sold out. So the card advertised\n       one price and the basket jumped by another. Price the card from the\n       variant it is actually going to add. */\n    pr.textContent = money(variant ? variant.price : p.price);\n    mid.appendChild(pr);\n\n    /* Say WHICH variant, when there is more than one to choose between. */\n    if (variant && (p.variants || []).length > 1 && variant.title && variant.title !== 'Default Title') {\n      var vt = document.createElement('span');\n      vt.className = 'ark-cd__recvariant';\n      var recPairs = (p.options || []).map(function (o, i) {\n        return { name: typeof o === 'string' ? o : (o && o.name), value: (variant.options || [])[i] };\n      });\n      vt.textContent = decodeEntities(optLine(recPairs) || variant.title);\n      mid.appendChild(vt);\n    }\n    li.appendChild(mid);\n\n    var add = document.createElement('button');\n    add.type = 'button';\n    add.className = 'ark-cd__recadd';\n    add.textContent = 'Add';\n    add.setAttribute('aria-label', 'Add to basket, ' + cleanTitle(decodeEntities(p.title)));\n    var error = document.createElement('p');\n    error.className = 'ark-cd__recerror';\n    error.setAttribute('role', 'alert');\n    error.hidden = true;\n    if (!variantId) { add.disabled = true; }\n    add.addEventListener('click', function () {\n      if (!variantId || add.disabled) { return; }\n      add.disabled = true;\n      error.hidden = true;\n      error.textContent = '';\n      fetch(((window.Shopify && window.Shopify.routes && window.Shopify.routes.root) || '/') + 'cart/add.js', {\n        method: 'POST',\n        headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },\n        body: JSON.stringify({ id: variantId, quantity: 1, sections: 'ark-cart-state', sections_url: window.location.pathname })\n      })\n        .then(window.ArkCart.check)\n        .then(function (r) {\n          /* Shopify explains its own refusals - \"All 3 \u2026 are in your cart\" -\n             and that sentence is the only thing that tells the shopper why\n             the button did nothing. Throwing the body away left the button\n             silently re-enabled, which reads as broken. */\n          if (!r.ok) {\n            return r.json()\n              .catch(function () { throw new Error('Could not add this item. Please try again.'); })\n              .then(function (e) { throw new Error(e.description || e.message || 'Could not add this item.'); });\n          }\n          return r.json();\n        })\n        .then(function (added) { recsLoadedFor = null; return showAdded(added); })\n        .catch(function (err) {\n          /* turned down by Shopify's bot check: add it as a normal page load (ArkCart, layout) */\n          if (err && err.refused && !err.network && window.ArkCart.add({ id: variantId, quantity: 1 })) { return; }\n          add.disabled = false;\n          error.textContent = err && err.name === 'TypeError' ? 'We could not reach the shop. Please check your connection and try again.' : ((err && err.message) || 'Could not add this item. Please try again.');\n          error.hidden = false;\n        });\n    });\n    li.appendChild(add);\n    li.appendChild(error);\n    return li;\n  }\n\n  /* ---------------------------------------------------------------\n     Mutations\n     --------------------------------------------------------------- */\n  function refresh() {\n    /* the site's one basket read (ArkCart, layout head): no HTTP cache, retried on a refusal */\n    return window.ArkCart.get()\n      .then(function (cart) { render(cart); return cart; })\n      .catch(function () { return null; });\n  }\n\n  /* The basket as the add itself answered it: the line(s) Shopify returned from /cart/add.js, merged into the last\n     basket drawn. Used only when the basket cannot be read after an add, so the drawer and the header count never\n     stay one add behind (owner 21 Oct). */\n  function fromAdd(added, base) {\n    base = base || lastCart;\n    if (!base || !added) { return null; }\n    var lines = added.items || [added];\n    if (!lines.length || !lines[0].key) { return null; }\n    var cart = JSON.parse(JSON.stringify(base));\n    lines.forEach(function (line) {\n      var at = -1;\n      cart.items.forEach(function (it, i) { if (it.key === line.key) { at = i; } });\n      if (at > -1) { cart.items[at] = line; } else { cart.items.unshift(line); }\n    });\n    var sum = function (f) { return cart.items.reduce(function (a, it) { return a + (it[f] || 0); }, 0); };\n    cart.item_count = sum('quantity');\n    cart.items_subtotal_price = sum('final_line_price');\n    cart.total_price = cart.items_subtotal_price;\n    cart.original_total_price = sum('original_line_price');\n    return cart;\n  }\n\n  /* Does this basket hold what /cart/add.js just answered? Every added line, at least at that quantity. */\n  function holds(cart, added) {\n    if (!cart || !added) { return !!cart; }\n    var lines = added.items || [added];\n    return lines.every(function (line) {\n      return !line.key || cart.items.some(function (it) { return it.key === line.key && it.quantity >= (line.quantity || 1); });\n    });\n  }\n\n  /* AFTER AN ADD (21 Oct): draw the basket only once it is known to hold the add. A read that does not hold it is\n     drawn with the add merged in straight away, then read again after 0.3 / 0.8 / 1.6 s until the real basket\n     holds it; a read that fails entirely leaves the merged basket and reads once more after 5 s. */\n  function bundledCart(added) {\n    var html = added && added.sections && added.sections['ark-cart-state'];\n    if (typeof html !== 'string') { return null; }\n    try {\n      var node = new DOMParser().parseFromString(html, 'text/html').querySelector('template[data-ark-cart-state]');\n      if (!node) { return null; }\n      var cart = JSON.parse(node.content.textContent);\n      var bmap = node.ownerDocument.querySelector('template[data-ark-bundle-map]');\n      if (bmap && window.ArkBundles) { window.ArkBundles.fromMap(bmap.content.textContent); }\n      if (!cart || !Array.isArray(cart.items) || !Number.isInteger(cart.item_count) || cart.item_count < 0 ||\n          !Number.isFinite(cart.total_price) || cart.total_price < 0 || !Number.isFinite(cart.items_subtotal_price) ||\n          !cart.items.every(function (line) { return typeof line.key === 'string' && Number.isInteger(line.quantity) && line.quantity > 0 && Number.isFinite(line.final_line_price); }) ||\n          cart.items.reduce(function (n, line) { return n + line.quantity; }, 0) !== cart.item_count || !holds(cart, added)) { return null; }\n      return cart;\n    } catch (err) { return null; }\n  }\n\n  function showAdded(added) {\n    var confirmed = bundledCart(added);\n    if (confirmed) {\n      render(confirmed);\n      publishCartChange(confirmed);\n      return Promise.resolve(confirmed);\n    }\n    var waits = [300, 800, 1600];\n    function attempt(n) {\n      return window.ArkCart.get().then(function (cart) {\n        if (holds(cart, added)) { render(cart); publishCartChange(cart); return cart; }\n        var merged = fromAdd(added, cart);\n        if (merged) { render(merged); }\n        if (n >= waits.length) { if (merged) { publishCartChange(merged); } return merged || cart; }\n        return new Promise(function (ok) { window.setTimeout(ok, waits[n]); }).then(function () { return attempt(n + 1); });\n      }, function () {\n        var merged = fromAdd(added);\n        if (merged) { render(merged); publishCartChange(merged); }\n        window.setTimeout(function () { refresh().then(function (c) { if (c) { publishCartChange(c); } }); }, 5000);\n        return merged;\n      });\n    }\n    return attempt(0);\n  }\n\n  /* A message beside the control the shopper just used, the same shape the\n     basket page uses. Shopify answers an over-quantity request with 422 and a\n     plain-English description (\"You can only add 3 of this item to your cart\"),\n     which is exactly what the shopper needs to see. */\n  /* One place selectors escape a cart line key, which contains a colon. */\n  function esc(key) { return (window.CSS && CSS.escape) ? CSS.escape(key) : key; }\n\n  /* THE BASKET PAGE IS ALSO A BASKET. On /cart the header link opens this\n     drawer instead of navigating, and the page underneath keeps its rendered\n     quantities in `updates[]` - so its Checkout re-posted them and undid\n     whatever was done in here. Saying what happened lets that page re-render\n     itself; everywhere else nothing is listening and this costs one event. */\n  /* Everything Liquid rendered into this drawer, handed to the shared store\n     so the \"+\" can be judged after the drawer has redrawn itself from\n     /cart.js - which carries no stock. Runs again after each server render. */\n  function seedCeilings(scope) {\n    if (!window.ArkQty) { return; }\n    var lines = (scope || document).querySelectorAll('[data-cd-item][data-cd-max]');\n    for (var i = 0; i < lines.length; i++) {\n      var k = lines[i].getAttribute('data-key') || '';\n      if (k) { window.ArkQty.remember(k.split(':')[0], lines[i].getAttribute('data-cd-max')); }\n    }\n  }\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', function () { seedCeilings(root); });\n  } else { seedCeilings(root); }\n  seedWas(root);\n\n  function publishCartChange(cart) {\n    document.dispatchEvent(new CustomEvent('ark:cart:changed', { detail: { cart: cart || null } }));\n  }\n\n  function showLineError(lineEl, msg) {\n    if (!lineEl || !msg) { return; }\n    var box = lineEl.querySelector('.ark-cd__lineerr');\n    if (!box) {\n      box = document.createElement('p');\n      box.className = 'ark-cd__lineerr';\n      box.setAttribute('role', 'alert');\n      lineEl.appendChild(box);\n    }\n    box.textContent = msg;\n    if (window.ArkMotion) { window.ArkMotion.show(box); }\n  }\n\n  /* Say what just happened. Blanking first and setting on the next frame is\n     what makes a REPEATED string fire: pressing \"+\" three times writes the same\n     shape of sentence each time, and a live region whose text is assigned the\n     identical value announces nothing. Same trick as ark-quickadd.js. */\n  function announce(message) {\n    var live = root.querySelector('[data-cd-live]');\n    if (!live || !message) { return; }\n    live.textContent = '';\n    /* A TIMER, not requestAnimationFrame. rAF is paused while the tab is in the\n       background, so an announcement scheduled that way can simply never\n       arrive. A timer is throttled there, not cancelled. */\n    window.setTimeout(function () { live.textContent = message; }, 30);\n  }\n\n  /* ONE REQUEST IN FLIGHT, EVERY TAP REMEMBERED.\n\n     The cart API is not transactional, so two concurrent /cart/change.js posts\n     can race and lose an update - but a tap must never be dropped either. Each\n     line keeps the quantity it was last asked for; taps update that target (and\n     the digit) immediately, and when the in-flight request settles the newest\n     target goes if it still differs from what was sent. Same shape as the\n     basket page. */\n  var cdTargets = {};\n  var cdBusy = false;\n\n  /* The \"+\" goes dead at the stock ceiling, the way every other stepper on\n     the site does. Called wherever a line's digit is written. */\n  function paintLineCap(lineEl) {\n    if (!lineEl || !window.ArkQty) { return; }\n    var key = lineEl.getAttribute('data-key') || '';\n    var cap = window.ArkQty.stock(key.split(':')[0]);\n    var plus = null;\n    var btns = lineEl.querySelectorAll('[data-cd-step]');\n    for (var i = 0; i < btns.length; i++) {\n      if (btns[i].getAttribute('data-cd-step') === '1') { plus = btns[i]; break; }\n    }\n    if (!plus) { return; }\n    var valEl = lineEl.querySelector('[data-cd-qtyval]');\n    var now = parseInt(valEl && valEl.textContent, 10) || 0;\n    var atCap = cap !== null && now >= cap;\n    plus.disabled = atCap;\n\n    /* Say why, in the same words and the same quiet style the product page\n       uses. Not the line-error box: nothing has gone wrong, there is simply\n       no more stock. */\n    var note = lineEl.querySelector('[data-qty-note]');\n    if (!atCap) {\n      if (note) { note.textContent = ''; note.hidden = true; }\n      return;\n    }\n    if (!note) {\n      note = document.createElement('p');\n      note.className = 'ark-qtynote';\n      note.setAttribute('data-qty-note', '');\n      note.setAttribute('role', 'status');\n      /* beside Remove, on its row (client: \"close to remove button to save space\") */\n      var rmBtn = lineEl.querySelector('.ark-cd__remove');\n      if (rmBtn && rmBtn.parentNode) { rmBtn.parentNode.insertBefore(note, rmBtn.nextSibling); }\n      else { lineEl.appendChild(note); }\n    }\n    note.hidden = false;\n    var msg = window.ArkQty.reason(key.split(':')[0], 'line');\n    if (note.textContent !== msg) { note.textContent = msg; }\n  }\n\n  function queueLine(key, quantity, lineEl) {\n    cdTargets[key] = quantity;\n    /* Optimistic: the number the shopper asked for appears in the same frame.\n       Waiting for the round trip before moving the digit is what reads as a\n       dead control.\n\n       EXCEPT A REMOVAL. Writing 0 took the line off its stock ceiling, so\n       paintLineCap hid the \"Only 1 in stock.\" note at once: the list dropped\n       32px in the first frame after the tap, 3ms in, and only then did the\n       line start to close (measured at 390 and 1440). The stepper also read\n       0 for the whole close, which the basket page never shows. A line on\n       its way out keeps its digit and its note, dims like any busy line, and\n       closes as one piece. */\n    if (quantity > 0) {\n      var valEl = lineEl && lineEl.querySelector('[data-cd-qtyval]');\n      if (valEl) { valEl.textContent = quantity; }\n      paintLineCap(lineEl);\n    } else if (lineEl) {\n      lineEl.classList.add('is-busy');\n      lineEl.setAttribute('aria-busy', 'true');\n    }\n    if (lastCart) { window.ArkDeal.paint(root, lastCart, cdTargets); }\n    if (cdBusy) { return; }\n    drainLine();\n  }\n\n  function drainLine() {\n    for (var k in cdTargets) {\n      if (!Object.prototype.hasOwnProperty.call(cdTargets, k)) { continue; }\n      var q = cdTargets[k];\n      var el = root.querySelector('[data-cd-item][data-key=\"' + esc(k) + '\"]');\n      cdBusy = true;\n      changeLine(k, q, el);\n      return true;\n    }\n    cdBusy = false;\n    return false;\n  }\n\n  function settleLine(key, sent) {\n    /* Only clear the target this request actually satisfied: a newer tap that\n       arrived mid-flight has to survive and be sent. */\n    if (cdTargets[key] === sent) { delete cdTargets[key]; }\n    cdBusy = false;\n    window.setTimeout(drainLine, 0);\n  }\n\n  function changeLine(key, quantity, lineEl) {\n    if (lineEl) { lineEl.classList.add('is-busy'); lineEl.setAttribute('aria-busy', 'true'); }\n    /* Read the title BEFORE the request: render() destroys the line node, and\n       a removal has no line left to name afterwards. */\n    var titleEl = lineEl && lineEl.querySelector('.ark-cd__name');\n    var title = (titleEl && titleEl.textContent.trim()) || 'Item';\n    return fetch('/cart/change.js', {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },\n      body: JSON.stringify({ id: key, quantity: quantity })\n    })\n      .then(window.ArkCart.check, window.ArkCart.lost)\n      .then(function (r) {\n        /* `r.ok ? r.json() : null` swallowed every failure: the line kept its\n           busy dim for ever, no message appeared, and the basket had already\n           changed underneath. A rejected request now says why. */\n        if (!r.ok) {\n          return r.json()\n            .catch(function () { throw new Error('Could not update your basket. Please try again.'); })\n            .then(function (e) {\n              var err = new Error(e.description || e.message || 'Could not update your basket.');\n              /* 400 \"no valid id or line parameter\": this line is no longer in the basket (changed in another tab or\n                 on another device). Not the shopper's error to read - the basket is simply redrawn as it is. */\n              err.stale = r.status === 400 && /no valid id|line parameter/i.test(err.message);\n              throw err;\n            });\n        }\n        return r.json();\n      })\n      .then(function (cart) {\n        /* the removed line's product may have been the recommendation seed;\n           a quantity change leaves the seed, and the rail, as they are */\n        if (quantity === 0) { recsLoadedFor = null; }\n        function finish() {\n          settleLine(key, quantity);\n          render(cart);\n          publishCartChange(cart);\n          announce(\n            (quantity === 0\n              ? title + ' removed from your basket. '\n              : title + ', quantity ' + quantity + '. ') +\n            (cart.item_count === 0\n              ? 'Your basket is now empty.'\n              : cart.item_count + (cart.item_count === 1 ? ' item' : ' items') +\n                ' in your basket, total ' + money(payable(cart)) + '.')\n          );\n        }\n        /* A REMOVED LINE CLOSES (audit cart-10), the way it does on the basket\n           page, instead of vanishing and snapping the list up. Its measured\n           height is the starting point and 0px the end. The queue is settled\n           and the new basket drawn together, when the line has gone, so a tap\n           queued meanwhile can never be answered by an older basket. */\n        var line = lineEl && lineEl.isConnected ? lineEl : null;\n        if (quantity === 0 && line && window.ArkMotion) {\n          window.ArkMotion.exit(line, finish);\n        } else {\n          finish();\n        }\n      })\n      .catch(function (err) {\n        /* turned down by Shopify's bot check: set the quantity as a normal page load (a dropped connection keeps the\n           message and the re-sync below - a page load on a weak signal would leave the shopper on an error page) */\n        if (err && err.refused && !err.network && window.ArkCart.change(key,\n          Object.prototype.hasOwnProperty.call(cdTargets, key) ? cdTargets[key] : quantity)) { return; }   /* the newest tap (Codex C3) */\n        if (lineEl) { lineEl.classList.remove('is-busy'); lineEl.removeAttribute('aria-busy'); }\n        /* RE-SYNC FIRST, THEN SPEAK. render() empties the list and rebuilds\n           every line, so a message written before this ran was destroyed a\n           frame later - the shopper saw the digit twitch back with no\n           explanation at all. The line that comes back is a different element,\n           so it is found again by key. */\n        /* a lost connection is the browser's TypeError (\"Failed to fetch\" / \"Load failed\"): said in words */\n        var msg = err && !err.stale ? (err.name === 'TypeError' ? 'We could not reach the shop. Please check your connection and try again.' : err.message) : null;\n        /* A refused line clears its own target - the server has told us what it\n           will accept - but the other lines the shopper touched are not this\n           line's fault and still go. */\n        delete cdTargets[key];\n        cdBusy = false;\n        window.setTimeout(drainLine, 0);\n        return refresh().then(function (cart) {\n          /* The basket could not be read either: refresh() hands back null and\n             nothing redrew, so the digit the shopper asked for stayed on screen\n             although the basket never changed. Redraw the last basket the\n             server confirmed (this line's target is already cleared). */\n          if (!cart && lastCart) { render(lastCart); }\n          publishCartChange(cart);\n          var fresh = root.querySelector('[data-cd-item][data-key=\"' + esc(key) + '\"]');\n          showLineError(fresh, msg);\n          if (msg) { announce(msg); }\n        });\n      });\n  }\n\n  /* ---------------------------------------------------------------\n     Events\n     --------------------------------------------------------------- */\n  root.addEventListener('click', function (e) {\n    var closer = e.target.closest('[data-cd-close]');\n    if (closer) { e.preventDefault(); close(); return; }\n\n    var line = e.target.closest('[data-cd-item]');\n    if (!line) { return; }\n    var key = line.getAttribute('data-key');\n\n    var step = e.target.closest('[data-cd-step]');\n    if (step) {\n      /* Read the TARGET, not the DOM. The digit is now moved optimistically, so\n         the DOM is already the right base - but a pending target is righter\n         still when a burst of taps is in progress. */\n      var valEl = line.querySelector('[data-cd-qtyval]');\n      var current = (cdTargets[key] !== undefined)\n        ? cdTargets[key]\n        : (parseInt(valEl && valEl.textContent, 10) || 0);\n      var next = current + parseInt(step.getAttribute('data-cd-step'), 10);\n      if (next < 0) { next = 0; }\n      /* THE STOCK CEILING. The line key's first segment is the variant id, and\n         the shared store holds what Liquid rendered for it. Refusing here is\n         what the client asked for: the shopper is told at the control, not at\n         the checkout.\n\n         AND THERE IS NOTHING BEHIND THIS. Measured 2026-09-23 on five\n         products: /cart/add.js accepted 21 units of a variant with 1 in\n         stock, and every other oversell tried, all HTTP 200. Shopify is not\n         refusing anything on this shop, so this clamp is the only guard,\n         not a nicety in front of a server-side one. */\n      if (window.ArkQty && next > current) {\n        var cap = window.ArkQty.stock(key.split(':')[0]);\n        if (cap !== null && next > cap) {\n          showLineError(line, window.ArkQty.reason(key.split(':')[0], 'line'));\n          return;\n        }\n      }\n      showLineError(line, '');\n      queueLine(key, next, line);\n      return;\n    }\n\n    if (e.target.closest('[data-cd-remove]')) {\n      queueLine(key, 0, line);\n    }\n  });\n\n  document.addEventListener('keydown', function (e) {\n    if (!isOpen()) { return; }\n    if (e.key === 'Escape') { e.preventDefault(); close(); return; }\n    if (e.key !== 'Tab' || !panel) { return; }\n\n    /* Focus trap. A modal that lets Tab wander onto the page behind it is a\n       keyboard dead end: the shopper cannot see where focus went. */\n    var focusables = panel.querySelectorAll(\n      'a[href], button:not([disabled]), input:not([disabled]), select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n    );\n    /* The empty-state block and the footer are hidden with `hidden` when the\n       basket has items (and the reverse when it does not), but their buttons\n       still match the focusable selector - so `first` or `last` could be an\n       element nobody can see, and Tab escaped the drawer. Only visible controls\n       count. */\n    var visible = Array.prototype.filter.call(focusables, function (el) {\n      return el.offsetParent !== null || el === document.activeElement;\n    });\n    if (!visible.length) { return; }\n    var first = visible[0];\n    var last = visible[visible.length - 1];\n    if (e.shiftKey && document.activeElement === first) { e.preventDefault(); last.focus(); }\n    else if (!e.shiftKey && document.activeElement === last) { e.preventDefault(); first.focus(); }\n  });\n\n  /* The header basket link becomes the drawer trigger, but stays a real <a> to\n     /cart so it still works with JS off, opens in a new tab on middle-click, and\n     is announced as a link to the basket. */\n  document.addEventListener('click', function (e) {\n    var link = e.target.closest('[data-ark-cart-link]');\n    if (!link) { return; }\n    if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) { return; }\n    e.preventDefault();\n    /* PRESS AGAIN TO CLOSE (owner 11 Nov 2026: \"if I press basket, it should open and if I press basket again it\n       should close it same as X would do\") - the same close() the X uses; Saved and Menu already work this way. */\n    if (isOpen()) { close(); return; }\n    open();\n    refresh();\n  });\n\n  /* Fired by ark-quickadd.js and by the PDP buy form once an add is confirmed. */\n  document.addEventListener('ark:cart:added', function (e) {\n    recsLoadedFor = null;\n    lastAddedProductId = (e && e.detail && e.detail.productId) || null;\n    /* The drawer opens on whatever it last rendered, and the refresh lands a\n       moment later - so the FIRST add on an empty basket flashed \"Your basket is\n       empty\" as its confirmation. Suppress the empty state for the length of the\n       in-flight refresh: something has just been added, so empty is known to be\n       wrong even before the new cart arrives. */\n    if (emptyEl) { emptyEl.hidden = true; }\n    if (itemsEl) { itemsEl.hidden = false; }\n    root.classList.add('is-loading');\n    /* On the basket page the basket is already on screen (owner 21 Oct): the drawer stays shut and the page itself\n       takes the new line (sections/arkui-cart redraws on ark:cart:changed, which showAdded publishes). */\n    if (!document.querySelector('[data-arkui-cart]')) { open(); }\n    var added = e && e.detail && e.detail.item;\n    showAdded(added).then(function () { root.classList.remove('is-loading'); }, function () { root.classList.remove('is-loading'); });\n  });\n\n  /* Nothing is asked for until the basket is wanted (audit cart-16). The\n     lines are drawn by the server with the page; the drawer refreshes - its\n     recommendations, and any change made in another tab - as the shopper\n     reaches for the basket link, so it is ready when it opens, and again on\n     open. The delivery meter is the one part the server leaves empty, so a\n     basket with the meter switched on is still filled in at once. */\n  var warmed = false;\n  function warm(e) {\n    if (warmed || !e.target || !e.target.closest || !e.target.closest('[data-ark-cart-link]')) { return; }\n    warmed = true;\n    if (root.querySelector('[data-cd-item]')) { refresh(); }\n  }\n  document.addEventListener('pointerover', warm, { passive: true });\n  document.addEventListener('focusin', warm);\n  /* SPEED (5 Nov 2026 audit): this first fill used to run while the page was still loading - the basket read, each\n     line's product record and the recommendations, for a closed drawer, on every page. It now waits until the page\n     has loaded and gone quiet; warm() and open() above still refresh at once when the basket is wanted. */\n  if (shipEl && root.querySelector('[data-cd-item]')) {\n    var idleFill = function () { (window.requestIdleCallback || function (f) { return setTimeout(f, 200); })(function () { if (!warmed) { refresh(); } }, { timeout: 4000 }); };\n    if (document.readyState === 'complete') { idleFill(); } else { window.addEventListener('load', idleFill, { once: true }); }\n  }\n\n  window.arkCartDrawer = { open: open, close: close, refresh: refresh };\n})();\n"],
  "mappings": "AACA,OAAO,cAAgB,UAAY,CAClC,SAAS,SAAS,KAAM,CAAC,IAAI,EAAE,KAAK,YAAY,CAAC,EAAE,OAAO,KAAK,UAAU,CAAC,OAAO,KAAK,YAAY,KAAK,EAAE,EAAE,OAAO,KAAK,yBAAyB,KAAK,wBAAwB,aAAa,IAAI,KAAK,MAAM,EAAE,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,SAAS,EAAE,CAAC,MAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAE,CAChR,SAAS,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,MAAM,GAAG,aAAa,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAE,OAAO,EAAE,CAAC,CAAC,MAAO,CAAC,GAAG,GAAG,aAAa,mBAAmB,EAAE,KAAK,GAAG,aAAa,gBAAgB,GAAG,GAAG,WAAW,CAAC,CAAE,CACnN,SAAS,MAAM,GAAG,KAAK,CAAC,GAAG,aAAa,oBAAoB,KAAK,YAAY,KAAK,EAAE,EAAE,GAAG,aAAa,iBAAiB,KAAK,yBAAyB,KAAK,wBAAwB,aAAa,IAAI,KAAK,MAAM,EAAE,EAAE,GAAG,aAAa,uBAAuB,KAAK,UAAU,KAAK,YAAY,CAAC,CAAC,CAAC,CAAE,CAC9R,SA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