{
  "version": 3,
  "sources": ["/cdn/shop/t/157/assets/tc-promo-panels.js?cb=1787927252885"],
  "sourcesContent": ["/* 2026-08-31: see tc-fitting-room.css \u2014 Cloudflare serves this path with the\n   query string ignored, so browsers are held on an old copy and the promo\n   ribbon below never reaches them. */\n/*\n * Promotion panels, drawn from whatever the server says is running.\n *\n * There is deliberately nothing here about father and son, or about a free\n * shirt. A panel arrives as a heading, an optional line, an optional badge, an\n * optional note about conditions and an optional product to point at, and this\n * draws those. Which promotions exist, what they say and which products they\n * appear on are all decided in the promotions calendar.\n *\n * That is the whole point of it. A new offer used to mean a theme change here\n * and an app release on two stores \u2014 two days to a week \u2014 while promotions are\n * often set up the day before they start. Now the same JSON feeds the website\n * and both phones, and an offer appears everywhere on the minute it opens.\n *\n * Fetched rather than rendered in Liquid because a panel is time-bound and the\n * page is cached: Liquid would serve yesterday's offer to whoever got the\n * cached copy. The trade is that a crawler does not see it, which is right \u2014\n * a promotion is not what the page is about.\n */\n(function () {\n  var mount = document.querySelector('[data-tc-panels]');\n  if (!mount) return;\n\n  var handle = mount.getAttribute('data-handle');\n  if (!handle) return;\n\n  /* Everything this script says, in the page's language. The snippet writes\n     them from the theme's locale files, which locales-sync.js fills from the\n     one table the apps and the admin panel share. English stays here as the\n     floor, and a key Shopify marks as untranslated falls back to it. */\n\n  /* Shopify's translation filter HTML-escapes every value, which is right\n     for text in the page and wrong for words handed to a script: \"&\" arrives\n     as \"&amp;\" and a <b> as \"&lt;b&gt;\". Undone here, once, on the way in. */\n  function unescapeLabels(obj) {\n    var out = {};\n    for (var k in obj) {\n      if (!Object.prototype.hasOwnProperty.call(obj, k)) continue;\n      var v = obj[k];\n      out[k] = typeof v === 'string'\n        ? v.replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '\"').replace(/&#39;/g, \"'\")\n        : v;\n    }\n    return out;\n  }\n  var L = {};\n  try { L = unescapeLabels(JSON.parse(mount.getAttribute('data-labels') || '{}')); } catch (e) { L = {}; }\n  /* A link from the API is the shop's own \u2014 \"/products/x\" \u2014 and on /fr/ it\n     has to stay on /fr/. Shopify names the page's root for exactly this. */\n  function localUrl(url) {\n    var root = (window.Shopify && window.Shopify.routes && window.Shopify.routes.root) || '/';\n    if (!url || url.charAt(0) !== '/' || root === '/' || url.indexOf(root) === 0) return url;\n    return root.replace(/\\/$/, '') + url;\n  }\n\n  function t(key, fallback) {\n    var v = L[key];\n    var out = (typeof v === 'string' && v && v.indexOf('translation missing') !== 0) ? v : fallback;\n    for (var i = 2; i < arguments.length; i++) out = out.replace('%s', arguments[i]);\n    return out;\n  }\n\n  function el(tag, cls, text) {\n    var node = document.createElement(tag);\n    if (cls) node.className = cls;\n    if (text != null) node.textContent = text;\n    return node;\n  }\n\n  /* The number, pulled out of the badge so it can be set in the display face.\n     \"10% OFF BOTH\" reads as one loud thing with the ten enlarged, and as a\n     shouty sentence without it. */\n  /** The offer the corner ribbon is showing, so no panel repeats it. */\n  var RIBBONED = null;\n\n  function splitBadge(badge) {\n    var m = String(badge || '').match(/^(\\d+%|FREE)\\s*(.*)$/i);\n    return m ? { lead: m[1], rest: m[2] } : { lead: null, rest: badge };\n  }\n\n  /*\n   * What the corner says, in two words.\n   *\n   * A percentage is followed by OFF \u2014 \"10% OFF\" \u2014 and that used to be done to\n   * every badge with a lead, which turned \"FREE SHIRT\" into \"FREE OFF\": not\n   * English, and it threw away the only word that made the label true. The API\n   * names the gift on purpose, because a label reading FREE in the corner of a\n   * \u00A3275 suit says the suit is free.\n   */\n  function ribbonWhat(badge) {\n    var parts = splitBadge(badge);\n    if (!parts.lead) return badge;\n    if (/^\\d+%$/.test(parts.lead)) return parts.lead + ' OFF';\n    /* The whole name of the gift: its first word alone turned FREE FLAT CAP\n       into FREE FLAT. */\n    var thing = String(parts.rest || '').trim();\n    return thing ? parts.lead + ' ' + thing : parts.lead;\n  }\n\n  /*\n   * A name short enough for a corner.\n   *\n   * The heading is the promotion's title in the calendar \u2014 \"Father & Son Set\n   * - 10% OFF\", \"FREE SHIRT WITH EVERY SUIT\" \u2014 written to be read in a list\n   * and far too long for a label on a photograph. Everything after a dash is\n   * the number said again; a trailing \"Set\" or \"Offer\" says nothing; and what\n   * is left is cut to two words, because the corner has to name the offer,\n   * not describe it. The number is on the line underneath.\n   */\n  function ribbonName(heading) {\n    var name = String(heading || '').split(/\\s[-\\u2013\\u2014]\\s/)[0].trim();\n    name = name.replace(/\\s+(set|offer|deal|promotion|promo)$/i, '').trim();\n    /* \"FREE FLAT CAP WITH ALL OUR TWEED SUITS\" is the gift, then who gets it.\n       The gift is the name; cut at the WITH, not at two words. */\n    if (/^free\\s/i.test(name)) name = name.split(/\\s+(with|on|for|when)\\s+/i)[0];\n    var words = name.split(/\\s+/);\n    return words.length > 2 && name.length > 16 ? words.slice(0, 2).join(' ') : name;\n  }\n\n  /*\n   * A corner on the photograph.\n   *\n   * The offer has to be seen by somebody who has not scrolled yet, and the\n   * gallery is the only thing on a product page that is always above the fold.\n   * A ribbon there costs no room in the buying column, which is the column\n   * everything else is competing for.\n   *\n   * Placed once, and removed if the panel is ever redrawn, so switching\n   * between products in a linked-variant row cannot leave two of them.\n   */\n  function ribbon(panel) {\n    /* The frame around the main photograph, named exactly. A loose\n       [class*=\"gallery\"] match found .tcfr__under-gallery first and pinned the\n       ribbon a thousand pixels down the page, under the thumbnails. */\n    var gallery = document.querySelector('.tcfr__gal-main');\n    if (!gallery || gallery.querySelector('.tc-ribbon')) return;\n    if (getComputedStyle(gallery).position === 'static') gallery.style.position = 'relative';\n\n    var tag = el('div', 'tc-ribbon');\n    /*\n     * The name, not the whole title.\n     *\n     * The heading is the promotion's name in the calendar \u2014 \"Father & Son Set\n     * - 10% OFF\" \u2014 which carries the offer twice once the number is set\n     * underneath it, and made the corner label half the width of the\n     * photograph. Everything from a dash onwards is the number restated, so it\n     * goes.\n     */\n    /*\n     * The name, then the offer \u2014 unless they are the same words.\n     *\n     * The corner carries two lines: the promotion's name in gold above what it\n     * gives in white. For \"Father & Son Set - 10% OFF\" that reads Father & Son\n     * over 10% OFF, which is the point of having two. For \"FREE SHIRT WITH\n     * EVERY SUIT\" both lines came out FREE SHIRT \u2014 the name trimmed to two\n     * words and the badge, arriving at the same place \u2014 so the ribbon printed\n     * it twice, once gold and once white, and read as two badges stacked.\n     *\n     * Where they agree, one line \u2014 and it wears the gold.\n     *\n     * Two attempts sat in between. Keeping the white line lost the gold, which\n     * is the half that makes the corner look like ours rather than like a\n     * discount plugin. Handing the eyebrow the rest of the heading read \"WITH\n     * EVERY SUIT\" over \"FREE SHIRT\", which says two things but does not fit:\n     * the eyebrow is capped at 118px so the photograph stays visible, and it\n     * came out ellipsised.\n     *\n     * So the corner says FREE SHIRT once, in gold, at the offer line's size.\n     * It is only ever drawn on a suit that has earned the offer.\n     */\n    var who = ribbonName(panel.heading);\n    var what = ribbonWhat(panel.badge);\n    var same = who && what && who.toLowerCase() === what.toLowerCase();\n    if (who && !same) tag.appendChild(el('span', 'tc-ribbon__who', who));\n    if (same) tag.classList.add('tc-ribbon--solo');\n    tag.appendChild(el('strong', 'tc-ribbon__what' + (same ? ' tc-ribbon__what--solo' : ''), what));\n    gallery.appendChild(tag);\n\n    /*\n     * On the photograph, not on the frame around it.\n     *\n     * The image element fills its container but is drawn object-fit: contain,\n     * so a portrait suit shot sits letterboxed inside a square box with fifty\n     * pixels of page either side. A ribbon at the container's corner floats in\n     * that margin, next to the photo rather than on it.\n     *\n     * The drawn size is worked out from the natural dimensions, which is the\n     * only way to know where contain actually put the picture.\n     */\n    function place() {\n      var img = gallery.querySelector('img');\n      if (!img || !img.naturalWidth || !img.naturalHeight) return;\n      var box = img.getBoundingClientRect();\n      if (!box.width || !box.height) return;\n      var scale = Math.min(box.width / img.naturalWidth, box.height / img.naturalHeight);\n      var inset = 12;\n      tag.style.left = Math.round((box.width - img.naturalWidth * scale) / 2 + inset) + 'px';\n      tag.style.top = Math.round((box.height - img.naturalHeight * scale) / 2 + inset) + 'px';\n    }\n\n    place();\n    var img = gallery.querySelector('img');\n    if (img && !img.complete) img.addEventListener('load', place);\n    window.addEventListener('resize', place);\n    /* The gallery swaps the image in place when a thumbnail is chosen, and a\n       different photograph can be a different shape. */\n    new MutationObserver(place).observe(gallery, {\n      attributes: true, subtree: true, attributeFilter: ['src'],\n    });\n  }\n\n  /** Money in the shape the server already used, so the two never disagree. */\n  function shapeMoney(sample, value) {\n    var run = String(sample || '').match(/[\\d.,]+/);\n    if (!run) return value.toFixed(2);\n    var prefix = String(sample).slice(0, run.index);\n    var suffix = String(sample).slice(run.index + run[0].length);\n    return prefix + value.toFixed(2) + suffix;\n  }\n\n  /*\n   * The pair, priced.\n   *\n   * Two prices, what they come to together, and what that saves. The saving is\n   * the persuading part and it is the one thing a badge cannot say: \"10% off\"\n   * is a rule, \"you save \u00A341.50\" is a reason.\n   *\n   * Only drawn when the arithmetic can actually be done. A missing price is\n   * not worth a guess, so the panel falls back to naming the suit.\n   */\n  function bundle(panel, ownPrice) {\n    var them = panel.product;\n    if (!them || them.amount == null || !ownPrice || !panel.percentage) return null;\n\n    var full = ownPrice + them.amount;\n    var after = full * (1 - panel.percentage / 100);\n    var saved = full - after;\n    var sample = them.price || '';\n\n    var box = el('div', 'tc-panel__sums');\n    [\n      [t('both_suits', 'Both suits'), shapeMoney(sample, full), 'was'],\n      [t('together', 'Together'), shapeMoney(sample, after), 'now'],\n      [t('you_save', 'You save'), shapeMoney(sample, saved), 'save'],\n    ].forEach(function (row) {\n      /* Order matters as much as size: what it was, what it is, what that\n         leaves you. The saving is last because it is the conclusion. */\n      var cell = el('div', 'tc-panel__sum tc-panel__sum--' + row[2]);\n      cell.appendChild(el('span', 'tc-panel__sum-key', row[0]));\n      cell.appendChild(el('span', 'tc-panel__sum-val', row[1]));\n      box.appendChild(cell);\n    });\n    return box;\n  }\n\n  /*\n   * What this product costs, taken from the page rather than fetched.\n   *\n   * Liquid has already printed it in the customer's own market and currency,\n   * so reading it back is both cheaper than another request and guaranteed to\n   * agree with the number beside it. Null when it cannot be read, which turns\n   * the arithmetic off rather than guessing at it.\n   */\n  function ownPrice() {\n    var node = document.querySelector('[data-tc-panels]');\n    var raw = node && node.getAttribute('data-price');\n    var value = raw == null ? NaN : Number(raw) / 100;\n    return Number.isFinite(value) && value > 0 ? value : null;\n  }\n\n  /** One suit in the pair: picture, whose it is, name, price. */\n  function suitCard(who, title, image, price, url, extra) {\n    var card = el(url ? 'a' : 'div', 'tc-pair__suit');\n    if (url) card.href = localUrl(url);\n\n    if (image) {\n      var img = el('img', 'tc-pair__img');\n      img.src = image;\n      img.alt = title || '';\n      img.loading = 'lazy';\n      card.appendChild(img);\n    }\n\n    var body = el('span', 'tc-pair__body');\n    body.appendChild(el('span', 'tc-pair__who', who));\n    body.appendChild(el('span', 'tc-pair__name', title || ''));\n    if (price) body.appendChild(el('span', 'tc-pair__price', price));\n    if (extra) body.appendChild(el('span', 'tc-pair__extra', extra));\n    card.appendChild(body);\n    return card;\n  }\n\n  /*\n   * Both suits, in one action.\n   *\n   * The father is already choosing his own size when he meets the offer, so\n   * the boy's should not cost him a page. A modal over the suit he is on is\n   * the shortest honest route: pick an age, press once, and the basket has\n   * both.\n   *\n   * Only offered from the man's side. His suit is sold as three pieces with a\n   * size each, and asking somebody on the boy's page to choose a blazer, a\n   * waistcoat and a pair of trousers for a man who is not there is a worse\n   * experience than a link. From that side the card stays a link.\n   */\n\n  /** The men's suit as it is currently configured on the page. */\n  function mensItems() {\n    var rows = document.querySelectorAll('[data-tcsep-row]');\n    if (rows.length) {\n      var items = [];\n      var incomplete = false;\n      Array.prototype.forEach.call(rows, function (row) {\n        var tick = row.querySelector('[data-tcsep-tick]');\n        if (tick && !tick.checked) return;              // deselected piece\n        var size = row.querySelector('[data-tcsep-size][aria-pressed=\"true\"]');\n        if (!size) { incomplete = true; return; }\n        items.push({ id: Number(size.getAttribute('data-id')), quantity: 1 });\n      });\n      return incomplete || !items.length ? null : items;\n    }\n\n    /* A suit that is not sold in pieces: the form's own variant. */\n    var form = document.querySelector('form[action*=\"/cart/add\"]');\n    var id = form && form.querySelector('[name=\"id\"]');\n    return id && id.value ? [{ id: Number(id.value), quantity: 1 }] : null;\n  }\n\n  function pairModal(panel) {\n    var them = panel.product;\n    var dialog = el('dialog', 'tc-pairbox');\n\n    var head = el('div', 'tc-pairbox__head');\n    head.appendChild(el('h2', 'tc-pairbox__title', panel.heading));\n    var close = el('button', 'tc-pairbox__close', '\\u00d7');\n    close.type = 'button';\n    close.setAttribute('aria-label', t('close', 'Close'));\n    close.addEventListener('click', function () { dialog.close(); });\n    head.appendChild(close);\n    dialog.appendChild(head);\n\n    /*\n     * Both suits and the arithmetic, which used to be on the page.\n     *\n     * They belong here now that the page carries a list: the saving is the\n     * argument for pressing the button, and the button is in this sheet.\n     */\n    var node = document.querySelector('[data-tc-panels]');\n    var mineTitle = node ? node.getAttribute('data-title') : '';\n    var mineImage = node ? node.getAttribute('data-image') : '';\n    var minePrice = ownPrice();\n\n    var pair = el('div', 'tc-pair');\n    pair.appendChild(suitCard(t('this_suit', 'This suit'), mineTitle, mineImage,\n      minePrice ? shapeMoney(them.price, minePrice) : null, null, null));\n    pair.appendChild(el('span', 'tc-pair__plus', '+'));\n    pair.appendChild(suitCard(t('his', 'His'), them.title,\n      them.image ? them.image + (them.image.indexOf('?') > -1 ? '&' : '?') + 'width=200' : null,\n      them.price, null, null));\n    dialog.appendChild(pair);\n\n    var sums = bundle(panel, minePrice);\n    if (sums) dialog.appendChild(sums);\n\n    dialog.appendChild(el('p', 'tc-pairbox__label', t('choose_his_size', 'Choose his size')));\n\n    var chosen = null;\n    var grid = el('div', 'tc-pairbox__sizes');\n    (them.variants || []).forEach(function (v) {\n      var b = el('button', 'tc-pairbox__size', v.title);\n      b.type = 'button';\n      if (!v.available) {\n        b.disabled = true;\n        b.title = t('sold_out', 'Sold out');\n      }\n      b.addEventListener('click', function () {\n        chosen = v;\n        Array.prototype.forEach.call(grid.children, function (o) {\n          o.setAttribute('aria-pressed', String(o === b));\n        });\n        say('');\n        /* Picking a size after it is in the bag is how a size is corrected,\n           so the button has to become the way to do that rather than staying\n           on \"Added\" and leaving no way back. */\n        if (added) restate();\n      });\n      b.setAttribute('aria-pressed', 'false');\n      grid.appendChild(b);\n    });\n    dialog.appendChild(grid);\n\n    var note = el('p', 'tc-pairbox__note', '');\n    note.hidden = true;\n    dialog.appendChild(note);\n    function say(text, bad) {\n      note.textContent = text;\n      note.hidden = !text;\n      note.classList.toggle('is-bad', !!bad);\n    }\n\n    var add = el('button', 'tc-pairbox__add', t('add_both', 'Add both to bag'));\n    add.type = 'button';\n\n    /*\n     * What is in the bag, and what the button should therefore say.\n     *\n     * The sheet used to close itself the moment the add succeeded, so the last\n     * thing the customer saw was a button reading \"Adding\u2026\" and a sheet\n     * vanishing \u2014 no confirmation, and no way to correct a size they had just\n     * realised was wrong without finding the panel again. It stays open now and\n     * says \"Added\"; picking another size turns the same button into the way to\n     * change it.\n     *\n     * `added` is his variant id, so a size change swaps that line and leaves the\n     * suit alone \u2014 re-adding both would put a second suit in the bag.\n     */\n    var added = null;\n\n    function restate() {\n      var changing = added && chosen && Number(chosen.id.replace(/\\D/g, '')) !== added;\n      add.disabled = false;\n      add.classList.toggle('is-added', !!added && !changing);\n      if (changing) {\n        add.textContent = t('change_his_size', 'Change his size to %s', chosen.title);\n        say('');\n      } else if (added) {\n        add.textContent = t('added_to_bag', 'Added to bag');\n        add.disabled = true;\n        say(t('both_in_bag', 'Both are in your bag. Pick another size above if his needs changing.'));\n      } else {\n        add.textContent = t('add_both', 'Add both to bag');\n      }\n    }\n\n    add.addEventListener('click', function () {\n      if (!chosen) return say('Choose his size first.', true);\n      var his = Number(chosen.id.replace(/\\D/g, ''));\n\n      var mine = mensItems();\n      /* Only on the first add. A size change must not need the suit's own\n         picker to still be answered, and must not add the suit twice. */\n      if (!added && !mine) {\n        return say('Choose your own size on the page behind first \u2014 then both go in together.', true);\n      }\n\n      add.disabled = true;\n      add.textContent = added ? 'Changing\\u2026' : 'Adding\\u2026';\n\n      /* A change is one request that zeroes the old line and sets the new one,\n         so the bag is never briefly missing his suit. */\n      var request = added\n        ? (function () {\n            var updates = {};\n            updates[added] = 0;\n            updates[his] = 1;\n            return fetch('/cart/update.js', {\n              method: 'POST',\n              credentials: 'same-origin',\n              headers: { 'Content-Type': 'application/json', Accept: 'application/json' },\n              body: JSON.stringify({ updates: updates }),\n            });\n          })()\n        : fetch('/cart/add.js', {\n            method: 'POST',\n            headers: { 'Content-Type': 'application/json', Accept: 'application/json' },\n            body: JSON.stringify({ items: mine.concat([{ id: his, quantity: 1 }]) }),\n          });\n\n      request\n        .then(function (r) { return r.json().then(function (b) { return { ok: r.ok, body: b }; }); })\n        .then(function (res) {\n          if (!res.ok) throw new Error((res.body && res.body.description) || 'That could not be added.');\n          added = his;\n          /* Told the way the theme tells it: the drawer listens to both, the\n             header's basket count only to the first. The drawer is deliberately\n             not opened \u2014 it would cover the sheet the customer is still using. */\n          document.dispatchEvent(new CustomEvent('on:cart:change', { bubbles: true }));\n          restate();\n        })\n        .catch(function (err) {\n          add.disabled = false;\n          restate();\n          say(err.message || t('not_added', 'That could not be added.'), true);\n        });\n    });\n    dialog.appendChild(add);\n\n    dialog.appendChild(el('p', 'tc-pairbox__small',\n      panel.note ? panel.note + ' The discount applies while both suits are in your bag.'\n                 : 'The discount applies while both suits are in your bag.'));\n\n    /* Clicking the backdrop closes it; clicking the card must not. */\n    dialog.addEventListener('click', function (event) {\n      if (event.target === dialog) dialog.close();\n    });\n    return dialog;\n  }\n\n  /*\n   * The free shirt, in two steps.\n   *\n   * Their version of this is two links into a collection: leave the suit,\n   * find a shirt, add it, and trust something happens at the till. Ours\n   * happens over the suit \u2014 but not all at once. Nineteen shirts and forty\n   * colour-and-size chips on one sheet is a wall, and the customer has only\n   * one question at a time: which shirt, then which one of it.\n   *\n   * So the sheet shows the shirts, and turns into the shirt once one is\n   * chosen. Back is always there, because choosing the wrong shirt should\n   * cost a click and not the sheet.\n   */\n  function giftSheet(panel) {\n    var offer = panel.gift;\n    var dialog = el('dialog', 'tc-pairbox tc-giftbox');\n    var picked = null;\n    var pickedColour = null;\n    var pickedVariant = null;\n\n    var head = el('div', 'tc-pairbox__head');\n    var back = el('button', 'tc-giftbox__back', '\\u2190');\n    back.type = 'button';\n    back.setAttribute('aria-label', t('back_to_gifts', 'Back to the choices'));\n    back.hidden = true;\n    back.addEventListener('click', function () { picked = null; draw(); });\n    head.appendChild(back);\n\n    var title = el('h2', 'tc-pairbox__title', panel.heading);\n    head.appendChild(title);\n\n    var close = el('button', 'tc-pairbox__close', '\\u00d7');\n    close.type = 'button';\n    close.setAttribute('aria-label', t('close', 'Close'));\n    close.addEventListener('click', function () { dialog.close(); });\n    head.appendChild(close);\n    dialog.appendChild(head);\n\n    var stage = el('div', 'tc-giftbox__stage');\n    dialog.appendChild(stage);\n\n    var note = el('p', 'tc-pairbox__note', '');\n    note.hidden = true;\n    dialog.appendChild(note);\n    function say(text, bad) {\n      note.textContent = text;\n      note.hidden = !text;\n      note.classList.toggle('is-bad', !!bad);\n    }\n\n    var add = el('button', 'tc-pairbox__add', t('add_suit_free_gift', 'Add suit and free gift'));\n    add.type = 'button';\n    add.hidden = true;\n    dialog.appendChild(add);\n\n    var small = el('p', 'tc-pairbox__small',\n      t('gift_comes_off', 'The gift comes off at checkout while the suit is in your bag.'));\n    dialog.appendChild(small);\n\n    /*\n     * Colour and size arrive welded together in the variant title \u2014 \"Blue /\n     * Small\", \"White / Small / Regular Fit\". Splitting on the separator gives\n     * the colour back, and asking for it first turns forty chips into five\n     * and then eight.\n     */\n    function segments(v) { return String(v.title).split(' / '); }\n    function hasColours(variants) {\n      if (!variants.length || segments(variants[0]).length < 2) return false;\n      var seen = {};\n      variants.forEach(function (v) { seen[segments(v)[0]] = true; });\n      return Object.keys(seen).length > 1;\n    }\n    function coloursOf(variants) {\n      var out = [];\n      variants.forEach(function (v) {\n        var c = segments(v)[0];\n        if (out.indexOf(c) === -1) out.push(c);\n      });\n      return out;\n    }\n    function rest(v) { return segments(v).slice(1).join(' / ') || v.title; }\n\n    function chip(text, on, onPick) {\n      var b = el('button', 'tc-pairbox__size', text);\n      b.type = 'button';\n      b.setAttribute('aria-pressed', String(!!on));\n      b.addEventListener('click', onPick);\n      return b;\n    }\n\n    /*\n     * \"A shirt or a tie\".\n     *\n     * A promotion may name more than one collection, and then the first\n     * question is not which shirt but which kind of thing. Only asked when\n     * there is more than one: a single-collection offer goes straight to the\n     * garments, because a chooser with one option is a question with one\n     * answer.\n     */\n    var groups = (offer.groups || []).filter(Boolean);\n    var pickedGroup = groups.length > 1 ? null : (groups[0] || null);\n\n    /*\n     * One preview, moved about, rather than one per tile: nineteen hidden\n     * images would be nineteen more requests for a picture most people never\n     * ask to see.\n     */\n    var preview = null;\n\n  /** Whether this device has a pointer that can hover and, crucially, leave. */\n  var CAN_HOVER = !!(window.matchMedia &&\n    window.matchMedia('(hover: hover) and (pointer: fine)').matches);\n\n    function showPreview(tile, shirt) {\n      if (!preview) {\n        preview = el('div', 'tc-giftbox__preview');\n        var pimg = el('img', 'tc-giftbox__previewimg');\n        preview.appendChild(pimg);\n        preview.appendChild(el('span', 'tc-giftbox__previewname', ''));\n        /*\n         * Inside the dialog, not on the body.\n         *\n         * A modal <dialog> is painted in the browser's top layer, and nothing\n         * outside it can be brought in front \u2014 no z-index reaches. Appended to\n         * the body the preview was drawn underneath the sheet, which looks\n         * like it opened below the shirts rather than beside them.\n         */\n        dialog.appendChild(preview);\n      }\n      preview.querySelector('.tc-giftbox__previewimg').src =\n        shirt.image + (shirt.image.indexOf('?') > -1 ? '&' : '?') + 'width=520';\n      preview.querySelector('.tc-giftbox__previewname').textContent = shirt.title || '';\n      /* Made visible first so offsetHeight is a real number: a hidden element\n         measures zero, and the centring below would then be against nothing. */\n      preview.hidden = false;\n\n      /* Beside the tile, and inside the window: on a narrow screen there is no\n         room to the right, so it goes to the left instead of off the edge. */\n      /*\n       * Beside the shirt it belongs to: level with the tile, to its right, and\n       * flipped to the left when the sheet is close enough to the edge that\n       * there is no room. Clamped top and bottom so a tile near the foot of\n       * the grid does not push it off the screen.\n       */\n      var box = tile.getBoundingClientRect();\n      var w = 240;\n      var h = preview.offsetHeight || 320;\n\n      var left = box.right + 12;\n      if (left + w > window.innerWidth - 8) left = box.left - w - 12;\n      if (left < 8) left = Math.min(box.right + 12, window.innerWidth - w - 8);\n\n      var top = box.top + box.height / 2 - h / 2;\n      top = Math.max(8, Math.min(top, window.innerHeight - h - 8));\n\n      preview.style.left = Math.round(left) + 'px';\n      preview.style.top = Math.round(top) + 'px';\n      preview.hidden = false;\n    }\n\n    function hidePreview() {\n      if (preview) preview.hidden = true;\n    }\n\n    /* It must not outlive the sheet, or it hangs over the page. */\n    dialog.addEventListener('close', function () {\n      if (preview) { preview.remove(); preview = null; }\n    });\n\n    function drawShirts() {\n      back.hidden = true;\n      add.hidden = true;\n      title.textContent = panel.heading;\n      stage.textContent = '';\n\n      if (groups.length > 1) {\n        stage.appendChild(el('p', 'tc-pairbox__label', t('choose_what', 'Choose what you would like')));\n        var kinds = el('div', 'tc-pairbox__sizes');\n        groups.forEach(function (g) {\n          kinds.appendChild(chip(g, pickedGroup === g, function () {\n            pickedGroup = g;\n            drawShirts();\n          }));\n        });\n        stage.appendChild(kinds);\n        if (!pickedGroup) return;\n      }\n\n      /* The collection's own name only earns a mention when there was a\n         choice of them: with one it reads \"choose your men's formal shirts\",\n         which is a shelf label rather than an instruction. */\n      stage.appendChild(el('p', 'tc-pairbox__label',\n        groups.length > 1 && pickedGroup\n          ? t('choose_your', 'Choose your %s', pickedGroup.toLowerCase())\n          : t('choose_your_gift', 'Choose yours')));\n\n      var grid = el('div', 'tc-giftbox__grid');\n      (offer.choices || [])\n        .filter(function (c) { return !pickedGroup || c.group === pickedGroup; })\n        .forEach(function (shirt) {\n        var tile = el('button', 'tc-giftbox__tile');\n        tile.type = 'button';\n        if (shirt.image) {\n          var img = el('img', 'tc-giftbox__img');\n          img.src = shirt.image + (shirt.image.indexOf('?') > -1 ? '&' : '?') + 'width=220';\n          img.alt = shirt.title || '';\n          img.loading = 'lazy';\n          tile.appendChild(img);\n        }\n        tile.appendChild(el('span', 'tc-giftbox__name', shirt.title || ''));\n        /* Struck: it is worth something, and a shirt with no price on it\n           reads as the cheap one being palmed off. */\n        if (shirt.price) tile.appendChild(el('span', 'tc-giftbox__was', shirt.price));\n        tile.addEventListener('click', function () {\n          hidePreview();\n          picked = shirt;\n          pickedColour = null;\n          pickedVariant = null;\n          say('');\n          draw();\n        });\n\n        /*\n         * A bigger picture on hover.\n         *\n         * The tiles are small so that nineteen shirts fit without scrolling\n         * to find them, which makes a white shirt hard to tell from another\n         * white shirt \u2014 a collar and a cuff are the whole difference. The\n         * preview is the same photograph at a size where that shows, and it\n         * costs no room on the sheet because it is only there while the\n         * pointer is.\n         */\n        /*\n         * Only where there is a pointer to leave with.\n         *\n         * A phone fires mouseenter on a tap and frequently never fires\n         * mouseleave, so the preview opened over the grid and stayed there \u2014\n         * covering the very shirts it was meant to help choose between, with\n         * nothing to dismiss it. The same tap had already picked the shirt, so\n         * it was in the way of a decision that had been made.\n         *\n         * Touch does not need it anyway: picking a shirt draws it full size on\n         * the next step, which is the bigger picture the hover was standing in\n         * for. `(hover: hover)` is the question actually being asked \u2014 not the\n         * width of the screen, which says nothing about how it is pointed at.\n         */\n        if (shirt.image && CAN_HOVER) {\n          tile.addEventListener('mouseenter', function () { showPreview(tile, shirt); });\n          tile.addEventListener('focus', function () { showPreview(tile, shirt); });\n          tile.addEventListener('mouseleave', hidePreview);\n          tile.addEventListener('blur', hidePreview);\n        }\n        grid.appendChild(tile);\n      });\n      stage.appendChild(grid);\n    }\n\n    function drawOne() {\n      back.hidden = false;\n      add.hidden = false;\n      title.textContent = t('your_free_gift', 'Your free gift');\n      stage.textContent = '';\n\n      var card = el('div', 'tc-pairbox__suit');\n      if (picked.image) {\n        var img = el('img', 'tc-pairbox__img');\n        img.src = picked.image + (picked.image.indexOf('?') > -1 ? '&' : '?') + 'width=300';\n        img.alt = picked.title || '';\n        card.appendChild(img);\n      }\n      var body = el('div', 'tc-pairbox__body');\n      body.appendChild(el('span', 'tc-pairbox__name', picked.title || ''));\n      /* The one word on the picture, and the only one here that was English in\n         every language: the shirt is free, and the shop says so in its own\n         word \u2014 \"Kostenlos\", \"Bezp\u0142atnie\" \u2014 which the app's string table has\n         had all along. */\n      var price = el('span', 'tc-giftbox__free', t('free', 'FREE'));\n      if (picked.price) {\n        var was = el('span', 'tc-giftbox__was', picked.price);\n        body.appendChild(was);\n      }\n      body.appendChild(price);\n      card.appendChild(body);\n      stage.appendChild(card);\n\n      var variants = picked.variants || [];\n\n      if (hasColours(variants)) {\n        stage.appendChild(el('p', 'tc-pairbox__label', t('colour', 'Colour')));\n        var colours = el('div', 'tc-pairbox__sizes');\n        coloursOf(variants).forEach(function (c) {\n          colours.appendChild(chip(c, pickedColour === c, function () {\n            pickedColour = c;\n            pickedVariant = null;\n            say('');\n            drawOne();\n          }));\n        });\n        stage.appendChild(colours);\n        if (!pickedColour) return;\n      }\n\n      var forColour = hasColours(variants) && pickedColour\n        ? variants.filter(function (v) { return segments(v)[0] === pickedColour; })\n        : variants;\n\n      stage.appendChild(el('p', 'tc-pairbox__label', t('size', 'Size')));\n      var sizes = el('div', 'tc-pairbox__sizes');\n      forColour.forEach(function (v) {\n        sizes.appendChild(chip(\n          hasColours(variants) ? rest(v) : v.title,\n          pickedVariant && pickedVariant.id === v.id,\n          function () {\n            pickedVariant = v;\n            say('');\n            Array.prototype.forEach.call(sizes.children, function (o) {\n              o.setAttribute('aria-pressed', String(o.textContent === (hasColours(variants) ? rest(v) : v.title)));\n            });\n          }\n        ));\n      });\n      stage.appendChild(sizes);\n    }\n\n    function draw() { picked ? drawOne() : drawShirts(); }\n\n    add.addEventListener('click', function () {\n      if (!picked) return say(t('choose_one_first', 'Choose one first.'), true);\n      if (!pickedVariant) return say('Choose a size.', true);\n\n      var mine = mensItems();\n      if (!mine) {\n        return say('Choose your suit size on the page behind first \u2014 then both go in together.', true);\n      }\n\n      add.disabled = true;\n      add.textContent = 'Adding\\u2026';\n      fetch('/cart/add.js', {\n        method: 'POST',\n        headers: { 'Content-Type': 'application/json', Accept: 'application/json' },\n        body: JSON.stringify({\n          items: mine.concat([{ id: Number(pickedVariant.id.replace(/\\D/g, '')), quantity: 1 }]),\n        }),\n      })\n        .then(function (r) { return r.json().then(function (b) { return { ok: r.ok, body: b }; }); })\n        .then(function (res) {\n          if (!res.ok) throw new Error((res.body && res.body.description) || 'That could not be added.');\n          document.dispatchEvent(new CustomEvent('on:cart:change', { bubbles: true }));\n          document.dispatchEvent(new CustomEvent('dispatch:cart-drawer:open'));\n          dialog.close();\n        })\n        .catch(function (err) {\n          add.disabled = false;\n          add.textContent = t('add_suit_free_gift', 'Add suit and free gift');\n          say(err.message || t('not_added', 'That could not be added.'), true);\n        });\n    });\n\n    dialog.addEventListener('click', function (event) {\n      if (event.target === dialog) dialog.close();\n    });\n\n    draw();\n    return dialog;\n  }\n\n  /*\n   * One panel, a tab per offer.\n   *\n   * Two offers meant two full panels stacked down the buying column, which was\n   * a screen of promotion beside a screen of product. A list of one-line rows\n   * fixed the height and lost the thing worth keeping: the pair shown as a\n   * pair, with the arithmetic under it.\n   *\n   * Tabs keep both. One panel, one offer visible at a time, and each gets the\n   * room to be itself. With a single offer there are no tabs at all \u2014 a tab\n   * strip with one tab is a heading that looks broken.\n   */\n\n  /** What this offer is worth, said in the fewest words that are true. */\n  function worthOf(panel) {\n    if (panel.kind === 'pair' && panel.percentage) return t('save_pct_both', 'Save %s% on both', panel.percentage);\n    if (panel.kind === 'gift') {\n      var most = (panel.gift && panel.gift.choices || []).reduce(function (a, c) {\n        return c.amount && c.amount > a ? c.amount : a;\n      }, 0);\n      var sample = (panel.gift && panel.gift.choices || [])[0];\n      return most ? t('worth_up_to', 'Worth up to %s, free', shapeMoney(sample && sample.price, most))\n                  : t('free_with_suit', 'Free with this suit');\n    }\n    if (panel.percentage) return t('save_pct', 'Save %s%', panel.percentage);\n    return panel.lead || '';\n  }\n\n  /** A short name for a tab: the calendar's title minus the number in it. */\n  function shortName(panel) {\n    return String(panel.heading || '').split(/\\s[-\\u2013\\u2014]\\s/)[0].trim();\n  }\n\n  /** The pair, as it was: both suits, the sums, and a way to add them. */\n  /* The centred heading with a rule either side \u2014 the panels had one each\n     before they were combined, and it is what made them look like something\n     rather than a box of text. The tab above selects; this names. */\n  function ruledHead(text) {\n    var head = el('div', 'tc-panel__head');\n    head.appendChild(el('span', 'tc-panel__title', text));\n    return head;\n  }\n\n  function pairBody(panel) {\n    var body = el('div', 'tc-panel__body');\n    body.appendChild(ruledHead(shortName(panel)));\n    body.appendChild(el('p', 'tc-panel__sub',\n      t('buy_pair_save', 'Buy the matching pair and save %s% on both', panel.percentage)));\n\n    var node = document.querySelector('[data-tc-panels]');\n    var them = panel.product;\n    var mine = ownPrice();\n\n    var pair = el('div', 'tc-pair');\n    pair.appendChild(suitCard(t('this_suit', 'This suit'),\n      node ? node.getAttribute('data-title') : '',\n      node ? node.getAttribute('data-image') : '',\n      mine ? shapeMoney(them && them.price, mine) : null, null, null));\n    pair.appendChild(el('span', 'tc-pair__plus', '+'));\n\n    var canAdd = panel.role !== 'boys'\n      && them && (them.variants || []).some(function (v) { return v.available; });\n\n    var card = suitCard(panel.role === 'boys' ? t('dads', \"Dad's\") : t('his', 'His'),\n      them && them.title,\n      them && them.image ? them.image + (them.image.indexOf('?') > -1 ? '&' : '?') + 'width=200' : null,\n      them && them.price,\n      canAdd ? null : (them && localUrl(them.url)),\n      canAdd ? t('choose_his_size_arrow', 'Choose his size \u2192') : t('view_arrow', 'View \u2192'));\n\n    if (canAdd) {\n      card.setAttribute('role', 'button');\n      card.setAttribute('tabindex', '0');\n      var box = null;\n      var open = function (e) {\n        e.preventDefault();\n        if (!box) { box = pairModal(panel); document.body.appendChild(box); }\n        box.showModal();\n      };\n      card.addEventListener('click', open);\n      card.addEventListener('keydown', function (e) {\n        if (e.key === 'Enter' || e.key === ' ') open(e);\n      });\n    }\n    pair.appendChild(card);\n    body.appendChild(pair);\n\n    var sums = bundle(panel, mine);\n    if (sums) body.appendChild(sums);\n    if (panel.note) body.appendChild(el('p', 'tc-panel__note', panel.note));\n    return body;\n  }\n\n  /** The gift: what it is worth, and the way in to choosing it. */\n  function giftBody(panel) {\n    var body = el('div', 'tc-panel__body');\n    var offer = panel.gift;\n    /*\n     * Not said twice on one screen.\n     *\n     * The ribbon on the photograph already reads FREE SHIRT, and this heading\n     * said it again a few centimetres below in white \u2014 which read as a second\n     * badge rather than as the panel's title. Where the ribbon is carrying this\n     * offer the panel goes straight to the part the ribbon cannot do: what the\n     * shirt is worth, and choosing it.\n     */\n    if (RIBBONED !== panel.id) body.appendChild(ruledHead(shortName(panel)));\n\n    if (!offer.eligible) {\n      body.appendChild(el('p', 'tc-panel__locked', offer.because || t('not_available', 'Not available on this suit')));\n      if (offer.minSpend) {\n        body.appendChild(el('p', 'tc-panel__note',\n          t('full_price_over', 'Full-price suits over %s come with one.', offer.minSpend)));\n      }\n      return body;\n    }\n\n    body.appendChild(el('p', 'tc-panel__sub', worthOf(panel)));\n\n    var open = el('button', 'tc-panel__button', t('choose_free_gift', 'Choose your free gift \u2192'));\n    open.type = 'button';\n    var sheet = null;\n    open.addEventListener('click', function () {\n      if (!sheet) { sheet = giftSheet(panel); document.body.appendChild(sheet); }\n      sheet.showModal();\n    });\n    body.appendChild(open);\n\n    if ((offer.choices || []).length) {\n      body.appendChild(el('p', 'tc-panel__choices', t('n_to_choose', '%s to choose from', offer.choices.length)));\n    }\n    if (panel.note) body.appendChild(el('p', 'tc-panel__note', panel.note));\n    return body;\n  }\n\n  function bodyFor(panel) {\n    if (panel.kind === 'pair' && panel.product) return pairBody(panel);\n    if (panel.gift) return giftBody(panel);\n    var body = el('div', 'tc-panel__body');\n    if (panel.lead) body.appendChild(el('p', 'tc-panel__sub', panel.lead));\n    if (panel.note) body.appendChild(el('p', 'tc-panel__note', panel.note));\n    return body;\n  }\n\n  function offersView(panels) {\n    var root = el('div', 'tc-panel');\n\n    /* No outer title. Each body carries its own ruled heading, as the\n       standalone panels did, and a second title above the tabs would name\n       the same offer twice. */\n    if (panels.length === 1) {\n      root.appendChild(bodyFor(panels[0]));\n      return root;\n    }\n\n    var tabs = el('div', 'tc-tabs');\n    tabs.setAttribute('role', 'tablist');\n    var holder = el('div', 'tc-tabs__body');\n\n    function show(i) {\n      Array.prototype.forEach.call(tabs.children, function (b, n) {\n        b.setAttribute('aria-selected', String(n === i));\n      });\n      holder.textContent = '';\n      holder.appendChild(bodyFor(panels[i]));\n    }\n\n    panels.forEach(function (panel, i) {\n      var tab = el('button', 'tc-tabs__tab');\n      tab.type = 'button';\n      tab.setAttribute('role', 'tab');\n      tab.appendChild(el('span', 'tc-tabs__name', shortName(panel)));\n      tab.appendChild(el('span', 'tc-tabs__worth',\n        panel.gift && !panel.gift.eligible ? t('not_on_suit', 'Not on this suit') : worthOf(panel)));\n      tab.addEventListener('click', function () { show(i); });\n      tabs.appendChild(tab);\n    });\n\n    root.appendChild(tabs);\n    root.appendChild(holder);\n    root.classList.add('tc-panel--tabbed');\n    /* The first offer this suit actually earns, so the panel does not open on\n       a refusal when there is something to say instead. */\n    var first = panels.findIndex(function (p) { return !(p.gift && !p.gift.eligible); });\n    show(first > -1 ? first : 0);\n    return root;\n  }\n\n  /*\n   * Previewing an offer that has not opened yet.\n   *\n   * Add ?promo_preview=1 to any product URL and scheduled or draft promotions\n   * are drawn as they will appear. Remembered for the tab, because Shopify\n   * strips its own preview parameter on the first redirect and the next click\n   * would otherwise drop back to showing nothing.\n   *\n   * ?promo_preview=0 forgets it again.\n   */\n  var preview = false;\n  try {\n    var asked = new URLSearchParams(location.search).get('promo_preview');\n    if (asked === '1') sessionStorage.setItem('tc_promo_preview', '1');\n    if (asked === '0') sessionStorage.removeItem('tc_promo_preview');\n    preview = sessionStorage.getItem('tc_promo_preview') === '1';\n  } catch (e) {\n    /* A browser refusing storage still previews for this one page. */\n    preview = new URLSearchParams(location.search).get('promo_preview') === '1';\n  }\n\n  /* The page's language and market ride along, so the panel's words, the\n     product names in it and the prices come back the way this page shows them. */\n  var lang = mount.getAttribute('data-lang') || '';\n  var country = mount.getAttribute('data-country') || '';\n  var url = '/apps/tru/panels?handle=' + encodeURIComponent(handle)\n    + (lang ? '&lang=' + encodeURIComponent(lang) : '')\n    + (country ? '&country=' + encodeURIComponent(country) : '')\n    + (preview ? '&preview=1' : '');\n\n  fetch(url, { headers: { Accept: 'application/json' } })\n    .then(function (r) { return r.ok ? r.json() : null; })\n    .then(function (data) {\n      var panels = ((data && data.panels) || []).filter(function (p) { return p && p.heading; });\n      if (!panels.length) return;\n\n      /* One ribbon at most, and only for an offer this product has earned \u2014\n         two corners on one photograph is a sale rack, not a suit. Chosen before\n         the panels are built, because a panel needs to know whether the ribbon\n         is already saying its name. */\n      var first = panels.filter(function (p) {\n        return p.badge && !(p.gift && !p.gift.eligible);\n      })[0];\n      if (first) RIBBONED = first.id;\n\n      mount.appendChild(offersView(panels));\n      if (first) ribbon(first);\n\n      if (preview) {\n        var flag = el('p', 'tc-panel__preview',\n          'Preview \u2014 showing offers that have not started yet. Customers do not see this.');\n        mount.appendChild(flag);\n      }\n      mount.hidden = false;\n    })\n    .catch(function (err) {\n      /*\n       * A promotion nobody can fetch is a promotion nobody is shown \u2014 the page\n       * is complete without it, so this never interrupts anybody.\n       *\n       * It does say so in the console, though. This catch was silent, and it\n       * sat across the rendering as well as the request: a mistake in drawing\n       * a panel produced a page with no panel, no error and nothing to go on.\n       */\n      if (window.console) console.warn('[promo-panels]', err && err.message ? err.message : err);\n    });\n})();\n\n/* build: offers list */\n"],
  "mappings": "CAsBC,UAAY,CACX,IAAI,MAAQ,SAAS,cAAc,kBAAkB,EACrD,GAAI,CAAC,MAAO,OAEZ,IAAI,OAAS,MAAM,aAAa,aAAa,EAC7C,GAAI,CAAC,OAAQ,OAUb,SAAS,eAAe,IAAK,CAC3B,IAAI,IA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