{
  "version": 3,
  "sources": ["/cdn/shop/t/1237/assets/nt-measure.js?auto=format%2Ccompress"],
  "sourcesContent": ["/* ============================================================================\n   nt-measure.js \u2014 SHARED MEASUREMENT / QUOTING MODULE (task #50)\n\n   The ONE place artwork dimensions are measured for quoting. Every engine\n   (bySize_popular, pdp_transferBySize, bysize-v4, __blanksUploadHelper) is\n   converging on this module; do not add a private dimension path to an\n   engine again \u2014 that drift is how four different spellings of one constant\n   (4.16 / 4.167 / 4.1666\u2026 / 4.168\u2026) and the v4 vector 4.167\u00D7 oversizing\n   happened.\n\n   \u26A0 CONTRACT \u2014 QUOTING ONLY. This module returns NUMBERS, never URLs.\n   NEVER use it (or its internal render URLs) to build an order, cart, or\n   production URL. Quoting cannot damage a print file; asset selection can \u2014\n   they are separate modules by design (Owen 2026-07-28). The one-URL-two-\n   purposes mistake caused the cart-zoom bug (PR #223) and the PixelCut\n   w=2000 production leak (PR #230).\n\n   THE UNIT RULE (verified 2026-07-28 against purchased variant_title\n   history \u2014 the size customers actually bought):\n\n       trueInches = trimmedRenderPx / (vector 72 | raster 300)\n\n   imgix rasterises VECTOR artwork in PostScript POINTS (1pt = 1/72in), so a\n   vector render's pixel size IS its true size at 72dpi. Raster sources are\n   already pixels, read against the 300dpi print basis. psd goes to\n   calculateInches in s3Key mode, which returns TRUE inches for its canvas\n   (verified with a hand-built exactly-10\u00D710in PDF \u2192 10.00 \u00D7 10.00), then is\n   cut to the trimmed art (psdArtMeasure).\n\n   \u26A0 Do NOT reintroduce calculateInches for eps/ai and do NOT re-add a\n   \u00D74.16* constant: calculateInches returns DIFFERENT UNITS per call mode\n   (?url= is a 72dpi render \u00F7300; ?s3Key= is inconsistent per stored object)\n   and its dpi field cannot disambiguate.\n\n   \u26A0 Measurement renders must NEVER carry w=/h= (a kept w=2000 is why every\n   wide file quoted exactly 6.67\") and never bg-remove without the bbox\n   method below (imgix DOWNSCALES any bg-remove render that has no explicit\n   w \u2014 6144px arrived as 3814px \u2014 so its pixel count is not source pixels).\n\n   BG-REMOVED SIZING (content-fraction / mask-bbox method): the customer is\n   charged for the art that remains after background removal, but no single\n   render both preserves the source pixel basis and shows the removal result.\n   So: measure the UNTRIMMED bg-removed render at a known width (\u2264 source, so\n   nothing upscales; no trim, so frame\u2192source mapping stays linear), scan its\n   alpha bounding box on canvas, and rescale:\n\n       contentSourcePx = bboxRenderPx \u00D7 (sourceFramePx / renderFramePx)\n\n   ~1.5% accuracy from bbox quantisation at reduced scale. Do NOT \"simplify\"\n   to pinning w=<source width> on a trimmed render \u2014 trim crops the frame\n   FIRST, so w then upscales the trimmed region and inflates the quote\n   (measured: 1.73\" \u2192 3.00\"). The canvas scan runs on a \u22641600px render, never\n   the full-res source (getImageData at 6600\u00B2 \u2248 174MB = mobile crash).\n   ========================================================================= */\n(function () {\n  'use strict';\n  var MEASUREMENT_BUILD = 'ntm-20261015-rendercap-v5';\n  if (window.NTMeasure && window.NTMeasure.build === MEASUREMENT_BUILD && window.NTMeasure.browserSourceRecovery === true && window.NTMeasure.serverResponseRecovery === true) return;\n\n  var API_URL = 'https://hpz51rjda5.execute-api.us-east-1.amazonaws.com/production';\n  var PRINT_DPI = 300;\n  var RENDER_DPI = { vector: 72, raster: 300 };\n  // pdf joined the vector path 2026-08-03: calculateInches returns the PDF's\n  // PAGE BOX, not the art \u2014 a wide logo on a letter page quoted 8.5x11 while\n  // every other vector type quotes the TRIMMED extent. imgix rasterises PDF at\n  // exact 72dpi points (verified: unimetal-vec letter page rendered 612x792 =\n  // 8.5x11.00 to the pixel; trimmed art 466x106pt = 6.47x1.47). psd keeps the\n  // service for its UNIT only and is cut to its trimmed art (psdArtMeasure, 2026-11-10).\n  var VECTOR_EXTS = ['eps', 'ai', 'svg', 'pdf'];\n  var SERVICE_EXTS = ['psd'];\n  // Matches bg-removal-multi.js ALPHA_TRIM_THRESHOLD \u2014 semi-transparent halo\n  // pixels below this don't count as content.\n  var ALPHA_THRESHOLD = 16;\n  var BBOX_RENDER_MAX_W = 1600;\n  // imgix RENDER CAP (By Size bands > 509 sq in, Owen 2026-10-14/15). imgix trims FIRST and\n  // then FITS the output into a per-side cap. Measured on the sandbox (2026-10-15): a\n  // 6600x20000 PNG loads untrimmed at 5407x16384 and trimmed (6400x19800 of art) at\n  // 5296x16384 \u2014 cap 16384 for raster renders; a 7000x9000 PNG with 6600x8600 of art came\n  // back 6600x8600, untouched. Vector (PDF) renders were seen capped at 8192 by the gang\n  // work. So the cap is NOT hardcoded: when the source is over 8192 px on a side (fm=json,\n  // one tiny CORS-open read), the untrimmed load's natural size vs the source size tells\n  // whether the fit is active and what the cap is (cap = the fitted render's long side).\n  // A trim render whose long side sits at that cap is CLAMPED: dividing it by the dpi gives\n  // the wrong inches (a true 22x66 read 43x133). Recovery: an alpha bounding box scanned on\n  // a 4096-px UNTRIMMED render (the same scan bgRemovedMeasure uses at 1600), scaled by the\n  // true source size, gives the trimmed extent for transparent art (\u00B15 source px on a\n  // 20000-px side); opaque art (colour-trimmed by imgix) falls back to the source page\n  // size \u2014 never a clamped number. Under the cap nothing below changes. The result carries\n  // `clamped` + `srcPxW/srcPxH` so the engine can switch such a file to the raw-S3\n  // production contract (pipeline.js applyRenderCap): the imgix production render\n  // (`?trim=colorUnlessAlpha`, no w/h) IS this same fitted render, so production would get\n  // it downscaled otherwise.\n  // v5 (2026-10-15, live incident): the fm=json read and the untrimmed load are NOT free \u2014\n  // imgix takes 2.5-5.4 s to answer fm=json for a big source \u2014 and v4 awaited them on EVERY\n  // raster measure (and every bg-removed measure via sourceFrame), which stalled the Ninja AI\n  // arm's sizing budget into \"Size unavailable\". Now they run ONLY when a render comes back\n  // with its long side sitting exactly at a known imgix cap (8192 / 16384), which no normal\n  // upload does, and each carries a timeout. Under the cap: zero extra requests, v3 behaviour.\n  var KNOWN_CAPS = [8192, 16384];\n  var CAP_SCAN_PX = 4096;\n  var PROBE_TIMEOUT_MS = 8000;\n  function atKnownCap(w, h) { var m = Math.max(w || 0, h || 0); return KNOWN_CAPS.some(function (c) { return m >= c - 1 && m <= c; }); }\n  var pixelsCache = {};\n  function sourcePixels(imgixUrl, diagnostic) {\n    var bare = String(imgixUrl || '').split('?')[0];\n    if (pixelsCache[bare]) return pixelsCache[bare];\n    var ctl = typeof AbortController === 'function' ? new AbortController() : null;\n    var timer = setTimeout(function () { if (ctl) ctl.abort(); }, PROBE_TIMEOUT_MS);\n    pixelsCache[bare] = fetch(bare + '?fm=json', ctl ? { credentials: 'omit', signal: ctl.signal } : { credentials: 'omit' })\n      .then(function (r) { return r.ok ? r.json() : null; })\n      .then(function (j) {\n        var w = j && +j.PixelWidth, h = j && +j.PixelHeight;\n        return w > 0 && h > 0 ? { w: w, h: h } : null;\n      })\n      .catch(function () { return null; }) // a slow/failed probe never fails or delays a measure beyond its timeout\n      .then(function (v) { clearTimeout(timer); return v; });\n    return pixelsCache[bare];\n  }\n  function overProbe(px) { return !!px && (px.w > KNOWN_CAPS[0] || px.h > KNOWN_CAPS[0]); }\n  // The cap in force for this source (null = none): the untrimmed load (sourceFrame, cached)\n  // comes back smaller than the source only when imgix fitted it; its long side is the cap.\n  // Called only after a render was seen AT a known cap.\n  function renderCap(imgixUrl, px, diagnostic) {\n    if (!overProbe(px)) return Promise.resolve(null);\n    return sourceFrame(imgixUrl, diagnostic, true).then(function (f) { return f.cap || null; }).catch(function () { return null; });\n  }\n  // A trim render whose long side sits at the cap = clamped.\n  function atCap(cap, renderW, renderH) {\n    return cap != null && Math.max(renderW, renderH) >= cap - 1;\n  }\n  function capFields(px, clamped) {\n    return { clamped: !!clamped, srcPxW: px ? px.w : 0, srcPxH: px ? px.h : 0 };\n  }\n  // Trimmed extent (source px) of a render that hit the cap. Alpha bbox on a small\n  // untrimmed render, scaled by the true source size; opaque / full-frame art = page size.\n  function cappedTrimExtent(imgixUrl, px, diagnostic) {\n    var bare = String(imgixUrl || '').split('?')[0];\n    var url = bare + (px.w >= px.h ? '?w=' : '?h=') + CAP_SCAN_PX + '&fm=png';\n    return loadImage(url, true, diagnostic, PROBE_TIMEOUT_MS * 2).then(function (img) {\n      var bbox = scanAlphaBBox(img);\n      if (bbox && bbox.w > 0 && bbox.h > 0 && (bbox.w < bbox.frameW || bbox.h < bbox.frameH)) {\n        return { w: bbox.w * (px.w / bbox.frameW), h: bbox.h * (px.h / bbox.frameH), method: 'cap-alpha-bbox' };\n      }\n      return { w: px.w, h: px.h, method: 'cap-page' };\n    }).catch(function () { return { w: px.w, h: px.h, method: 'cap-page' }; });\n  }\n\n  // Source frame sizes, keyed by bare imgix URL. Frames never change for a\n  // stored upload, so this never invalidates.\n  var frameCache = {};\n\n  // Optional caller-owned observation. Never forward URLs, messages or file data.\n  function note(diagnostic, fields) {\n    try { if (diagnostic) diagnostic(Object.assign({measurementBuild:MEASUREMENT_BUILD},fields)); } catch (_) {}\n  }\n\n  // Only server recovery needs a key in our uploads bucket. Browser measurement\n  // must also accept existing artwork on other HTTPS origins, without mapping\n  // that artwork into our bucket. Geometry transforms are never measure inputs.\n  function measurementSource(value, diagnostic, browserOnly) {\n    function reject(reason) {\n      note(diagnostic,{failureKind:'identity',errorName:'Error',httpStatus:0,\n        measurementReason:reason,measurementStep:'source_normalization'});\n      return null;\n    }\n    if (typeof value !== 'string' || value.length > 8192) return reject('source_url_invalid');\n    var source, key, parts, rawPath;\n    try {\n      rawPath = value.match(/^https:\\/\\/[^/?#]+([^?#]*)/i);\n      if (!rawPath || value.indexOf('\\\\') !== -1) return reject('source_url_invalid');\n      source = new URL(value);\n      if (source.protocol !== 'https:' || source.port || source.username || source.password || source.hash)\n        return reject('source_url_invalid');\n      var owned = ['ninjauploads-production.imgix.net',\n          'ninja-services-production-ninjauploadss3bucket-zks2mguobhe4.s3.amazonaws.com',\n          'ninja-services-production-ninjauploadss3bucket-zks2mguobhe4.s3.us-east-1.amazonaws.com'].indexOf(source.hostname) !== -1;\n      if (!owned && !browserOnly)\n        return reject('source_host_unsupported');\n      for (var pair of source.searchParams) {\n        if (!/^(fm|auto|q|cs|ch)$/.test(pair[0]) || !/^[A-Za-z0-9,._-]{1,80}$/.test(pair[1]))\n          return reject('source_transform_unsupported');\n      }\n      parts = rawPath[1].slice(1).split('/').map(function (part) { return decodeURIComponent(part); });\n      if (parts.some(function (part) { return !part || part === '.' || part === '..' || /[\\\\/\\u0000-\\u001f\\u007f-\\u009f]/.test(part); }))\n        return reject('source_key_invalid');\n      key = parts.join('/');\n      if (!browserOnly && unescape(encodeURIComponent(key)).length > 1024) return reject('source_key_too_long');\n      if (!browserOnly && !/\\.(png|jpe?g|jfif|bmp|webp|heic|heif|avif|gif|ai|pdf|svg|eps|tiff?)$/i.test(key))\n        return reject('source_extension_unsupported');\n      return {key:key,url:(owned ? 'https://ninjauploads-production.imgix.net' : source.origin) + '/' + parts.map(function (part) {\n        return encodeURIComponent(part).replace(/[!'()*]/g,function(c){return '%' + c.charCodeAt(0).toString(16).toUpperCase();});\n      }).join('/')};\n    } catch (_) { return reject('source_encoding_invalid'); }\n  }\n\n  function loadImage(url, needPixels, diagnostic, timeoutMs) {\n    return new Promise(function (resolve, reject) {\n      var img = new Image(), timer, settled = false;\n      var started = timeoutMs ? performance.now() : 0;\n      function finish(error) {\n        if (settled) return;\n        if (!error && timeoutMs && performance.now() - started >= timeoutMs) error = new Error('nt-measure: timeout');\n        settled = true;\n        if (timer) clearTimeout(timer);\n        img.onload = img.onerror = null;\n        if (error) { img.removeAttribute && img.removeAttribute('src'); reject(error); }\n        else resolve(img);\n      }\n      if (needPixels) img.crossOrigin = 'anonymous';\n      img.onload = function () {\n        if (!img.naturalWidth || !img.naturalHeight)\n          note(diagnostic, { failureKind: 'image_decode', errorName: 'Error', httpStatus: 0 });\n        finish();\n      };\n      img.onerror = function () {\n        // An Image error does not distinguish GET transport from decoding.\n        note(diagnostic, { failureKind: 'image_load', errorName: 'Error', httpStatus: 0 });\n        finish(new Error('nt-measure: image failed to load'));\n      };\n      if (timeoutMs) timer = setTimeout(function () {\n        note(diagnostic, { failureKind: 'timeout', errorName: 'Error', httpStatus: 0, timeoutMs: timeoutMs });\n        finish(new Error('nt-measure: timeout'));\n      }, timeoutMs);\n      img.src = url;\n    });\n  }\n\n  // Read the dimensions of the SAME trimmed native-size render, without\n  // allocating a full-resolution browser bitmap. This is quoting only: never\n  // substitute these bytes or this URL for the customer's print artwork.\n  function trimmedPngDimensions(imgixUrl, dpi, diagnostic) {\n    var source = measurementSource(imgixUrl, diagnostic, true);\n    if (!source) return Promise.resolve(null);\n    var url = new URL(source.url);\n    url.search = '?trim=colorUnlessAlpha&fm=png';\n    var controller = new AbortController(), reader, response, timer, expired = false, phase = 'headers', parsing = false;\n    var deadline = performance.now() + 12000;\n    function check() { if (expired || performance.now() >= deadline) throw new Error('nt-measure: timeout'); }\n    var stopped = new Promise(function (_, reject) {\n      timer = setTimeout(function () { expired = true; reject(new Error('nt-measure: timeout')); controller.abort(); }, 12000);\n    });\n    var work = (async function () {\n      response = await fetch(url.href, { signal: controller.signal, credentials: 'omit', redirect: 'error', cache: 'reload' });\n      check();\n      if (!response.ok || !/^image\\/png(?:\\s*;|$)/i.test(response.headers.get('Content-Type') || '')) {\n        parsing = true; throw new Error('nt-measure: invalid PNG response');\n      }\n      phase = 'body';\n      reader = response.body.getReader();\n      var header = new Uint8Array(33), used = 0;\n      while (used < header.length) {\n        var row = await reader.read(); check();\n        if (row.done) { parsing = true; throw new Error('nt-measure: incomplete PNG header'); }\n        var count = Math.min(header.length - used, row.value.byteLength);\n        header.set(row.value.subarray(0, count), used); used += count;\n      }\n      parsing = true;\n      var view = new DataView(header.buffer);\n      if ([137,80,78,71,13,10,26,10].some(function (value, index) { return header[index] !== value; }) ||\n          view.getUint32(8) !== 13 || view.getUint32(12) !== 0x49484452) throw new Error('nt-measure: invalid PNG header');\n      // Verify IHDR integrity before using its geometry for a price.\n      var crc = 0xffffffff;\n      for (var i = 12; i < 29; i++) {\n        crc ^= header[i];\n        for (var bit = 0; bit < 8; bit++) crc = (crc >>> 1) ^ ((crc & 1) ? 0xedb88320 : 0);\n      }\n      var width = view.getUint32(16), height = view.getUint32(20);\n      if (((crc ^ 0xffffffff) >>> 0) !== view.getUint32(29) || !width || !height || width > 65536 || height > 65536)\n        throw new Error('nt-measure: invalid PNG geometry');\n      check();\n      if (!atKnownCap(width, height)) return fromInches(width / dpi, height / dpi, 'trim-png-header', capFields(null, false));\n      var bare = url.origin + url.pathname;\n      var px = await sourcePixels(bare, diagnostic); // a header AT a known cap: confirm the fit (timed)\n      var cap = px ? await renderCap(bare, px, diagnostic) : null;\n      if (!atCap(cap, width, height)) return fromInches(width / dpi, height / dpi, 'trim-png-header', capFields(px, false));\n      var t = await cappedTrimExtent(bare, px, diagnostic);\n      return fromInches(t.w / dpi, t.h / dpi, 'trim-png-header-' + t.method, capFields(px, true));\n    })();\n    return Promise.race([work, stopped]).catch(function (error) {\n      note(diagnostic, { failureKind: expired || performance.now() >= deadline ? 'timeout' : response && !response.ok ? 'http' :\n        !response ? 'network_or_cors' : parsing ? 'invalid_format' : 'response_body', errorName: error && error.name || 'Error', httpStatus: response && response.status || 0,\n        transportPhase: phase });\n      return null;\n    }).finally(function () {\n      clearTimeout(timer); controller.abort();\n      try { var pending = reader ? reader.cancel() : response && response.body && response.body.cancel();\n        if (pending && pending.catch) pending.catch(function () {});\n        if (reader) reader.releaseLock();\n      } catch (_) {}\n    });\n  }\n\n  var trimServiceCache = new Map(), trimServicePending = new Map();\n  function serverTrimDimensions(imgixUrl, dpi, diagnostic) {\n    // Ineligible recovery is not another failed measurement. Keep the actual\n    // browser load/header failure rather than replacing it with a host rejection.\n    var source = measurementSource(imgixUrl);\n    if (!source) return Promise.resolve(null);\n    var key = source.key, cached = trimServiceCache.get(key);\n    if (cached && cached.expires > Date.now()) return Promise.resolve(cached.result);\n    if (trimServicePending.has(key)) return trimServicePending.get(key);\n    var controller = new AbortController(), response, timer, phase = 'headers', requestId, failureKind;\n    var expires = performance.now() + 21000;\n    function check() { if (performance.now() >= expires) throw new Error('measurement timeout'); }\n    var timeout = new Promise(function (_, reject) {\n      timer = setTimeout(function () { reject(new Error('measurement timeout')); controller.abort(); }, 21000);\n    });\n    // A small JSON response may stall after HTTP 200. Fence its body separately,\n    // then retry this read-only request once within the original 21s allowance.\n    // Late responses cannot cache dimensions or win after a retry/cancellation.\n    async function attempt() {\n      var requestController = new AbortController(), bodyTimer, requestTimer, stopped = false;\n      response = null; phase = 'headers'; requestId = undefined; failureKind = undefined;\n      var abort = function () { requestController.abort(); };\n      controller.signal.addEventListener('abort', abort, {once:true});\n      var requestExpires = Math.min(expires, performance.now() + 18000);\n      function checkAttempt() {\n        check();\n        if (stopped || controller.signal.aborted || performance.now() >= requestExpires)\n          throw Object.assign(new Error('measurement timeout'), {failureKind:'timeout'});\n      }\n      var rejectDeadline;\n      var deadline = new Promise(function (_, reject) {\n        rejectDeadline = reject;\n        requestTimer = setTimeout(function () {\n          stopped = true; reject(Object.assign(new Error('measurement timeout'), {failureKind:'timeout'})); requestController.abort();\n        }, Math.max(1, requestExpires-performance.now()));\n      });\n      try {\n        return await Promise.race([deadline, (async function () {\n          checkAttempt();\n          var current = await fetch(API_URL + '/calculateInches?mode=trimmed&s3Key=' + encodeURIComponent(key),\n            { signal: requestController.signal, credentials:'omit', redirect:'error', cache:'no-store' });\n          checkAttempt(); response = current; phase = 'body';\n          bodyTimer = setTimeout(function () {\n            stopped = true; rejectDeadline(Object.assign(new Error('measurement timeout'), {failureKind:'timeout'})); requestController.abort();\n          }, Math.max(1, Math.min(3000, requestExpires-performance.now())));\n          var body = await current.json(); checkAttempt();\n          requestId = body && /^[a-zA-Z0-9_-]{1,80}$/.test(body.requestId || '') ? body.requestId : undefined;\n          if (!current.ok || !body || body.success !== true) throw new Error('measurement failed');\n          var data = body.data;\n          if (!data || data.contract !== 'trim-v1' || data.dpi !== dpi ||\n              ![data.renderWidth, data.renderHeight].every(function (v) { return Number.isInteger(v) && v > 0 && v <= 65536; }))\n            throw new Error('invalid measurement');\n          return data;\n        })()]);\n      } catch (error) {\n        failureKind = error.failureKind || (response && !response.ok ? 'http' : !response ? 'network_or_cors' : 'validation');\n        throw error;\n      } finally {\n        stopped = true; clearTimeout(bodyTimer); clearTimeout(requestTimer);\n        controller.signal.removeEventListener('abort', abort); requestController.abort();\n      }\n    }\n    var work = Promise.race([timeout, (async function () {\n      var data;\n      for (var index=0; index<2; index++) {\n        try { data = await attempt(); break; }\n        catch (error) {\n          var retryable = failureKind === 'timeout' || failureKind === 'network_or_cors' ||\n            failureKind === 'http' && response && response.status >= 500;\n          // Invalid content, geometry and 4xx render rejections need a different\n          // repair, not another identical request. No image upload is retried.\n          if (index || !retryable || expires-performance.now()<1000) throw error;\n          note(diagnostic,{failureKind:failureKind,httpStatus:response && response.status || 0,transportPhase:phase,\n            requestId:requestId,measurementStep:'server_recovery',measurementReason:'server_recovery_failed'});\n        }\n      }\n      check();\n      var result = fromInches(data.renderWidth / dpi, data.renderHeight / dpi, 'trim-server-header');\n      if (trimServiceCache.size >= 128) trimServiceCache.delete(trimServiceCache.keys().next().value);\n      trimServiceCache.set(key, { result: result, expires: Date.now() + 300000 });\n      return result;\n    })()]).catch(function (error) {\n      note(diagnostic, { failureKind: performance.now() >= expires ? 'timeout' : failureKind || (response && !response.ok ? 'http' :\n        !response ? 'network_or_cors' : 'validation'), httpStatus: response && response.status || 0,\n        errorName: error.name || 'Error', transportPhase: phase, requestId: requestId,\n        measurementStep:'server_recovery',measurementReason:'server_recovery_failed' });\n      return null;\n    }).finally(function () { clearTimeout(timer); controller.abort(); trimServicePending.delete(key); });\n    trimServicePending.set(key, work);\n    return work;\n  }\n\n  // Alpha bounding box of a decoded render, in that render's pixels.\n  // Returns null when the canvas is tainted (CORS) or nothing is opaque \u2014\n  // callers fall back to the trim-only measure.\n  function scanAlphaBBox(img) {\n    var w = img.naturalWidth;\n    var h = img.naturalHeight;\n    if (!w || !h) return null;\n    var canvas = document.createElement('canvas');\n    canvas.width = w;\n    canvas.height = h;\n    var ctx = canvas.getContext('2d');\n    ctx.drawImage(img, 0, 0);\n    var data;\n    try {\n      data = ctx.getImageData(0, 0, w, h).data;\n    } catch (e) {\n      return null;\n    }\n    var minX = w, maxX = -1, minY = h, maxY = -1;\n    for (var y = 0; y < h; y++) {\n      var rowStart = y * w * 4;\n      for (var x = 0; x < w; x++) {\n        if (data[rowStart + x * 4 + 3] > ALPHA_THRESHOLD) {\n          if (x < minX) minX = x;\n          if (x > maxX) maxX = x;\n          if (y < minY) minY = y;\n          if (y > maxY) maxY = y;\n        }\n      }\n    }\n    if (maxX < 0) return null;\n    return { w: maxX - minX + 1, h: maxY - minY + 1, frameW: w, frameH: h };\n  }\n\n  function serviceInches(s3Key, diagnostic) {\n    var response, phase = 'headers';\n    return fetch(API_URL + '/calculateInches?s3Key=' + encodeURI(s3Key))\n      .then(function (r) {\n        response = r; phase = 'body';\n        if (r.ok === false) note(diagnostic, { failureKind: 'http', errorName: 'Error', httpStatus: r.status, transportPhase: 'headers' });\n        return r.json();\n      })\n      .then(function (res) {\n        if (res && res.success === true && res.data && res.data.dimensions &&\n            res.data.dimensions.width && res.data.dimensions.height) {\n          return { inW: res.data.dimensions.width, inH: res.data.dimensions.height };\n        }\n        if (!response || response.ok !== false)\n          note(diagnostic, { failureKind: 'validation', errorName: 'Error', httpStatus: response && response.status || 0, transportPhase: phase });\n        return null;\n      })\n      .catch(function (error) {\n        if (!response || response.ok !== false) note(diagnostic, {\n          failureKind: !response ? 'network_or_cors' : error && error.name === 'SyntaxError' ? 'invalid_json' : 'response_body',\n          errorName: error && error.name || 'Error', httpStatus: response && response.status || 0, transportPhase: phase\n        });\n        return null;\n      });\n  }\n\n  function sourceFrame(imgixUrl, diagnostic, probe) {\n    if (frameCache[imgixUrl]) return Promise.resolve(frameCache[imgixUrl]);\n    // The no-param (untrimmed) load is fitted into the cap too. Only when that load comes back AT\n    // a known cap (or the caller already saw a capped render: `probe`) is the true source size read\n    // (fm=json, timed) to report the real frame and the cap; otherwise the load IS the frame \u2014 v3.\n    return loadImage(imgixUrl, false, diagnostic, PROBE_TIMEOUT_MS).then(function (img) {\n      var nw = img.naturalWidth, nh = img.naturalHeight;\n      if (!probe && !atKnownCap(nw, nh)) { var plain = { w: nw, h: nh, px: null, clamped: false, cap: null }; frameCache[imgixUrl] = plain; return plain; }\n      return sourcePixels(imgixUrl, diagnostic).then(function (px) {\n        var fitted = overProbe(px) && Math.max(nw, nh) < Math.max(px.w, px.h) - 1;\n        var f = fitted\n          ? { w: px.w, h: px.h, px: px, clamped: true, cap: Math.max(nw, nh) }\n          : { w: nw, h: nh, px: px, clamped: false, cap: null };\n        frameCache[imgixUrl] = f;\n        return f;\n      });\n    });\n  }\n\n  function fromInches(inW, inH, method, extra) {\n    var r = {\n      pxW: Math.round(inW * PRINT_DPI),\n      pxH: Math.round(inH * PRINT_DPI),\n      inW: inW,\n      inH: inH,\n      method: method\n    };\n    if (extra) for (var k in extra) if (Object.prototype.hasOwnProperty.call(extra, k)) r[k] = extra[k];\n    return r;\n  }\n\n  // Trim-only render at native size \u2014 the default measure for anything the\n  // client can decode. No w/h, no bg-remove, ever (see header). fm=png is\n  // pinned for vectors only: without it imgix serves a JPEG render of an\n  // .ai/.eps (same dimensions, but pin the proven v4 measure params); for\n  // rasters the output format never changes the dimensions, and skipping\n  // fm=png keeps a big JPG's measure render at JPG weight.\n  function trimMeasure(imgixUrl, dpi, method, diagnostic, recover, serverRecovery) {\n    if (recover) {\n      var source = measurementSource(imgixUrl, diagnostic, true);\n      if (!source) return Promise.resolve(null);\n      imgixUrl = source.url;\n    }\n    var params = dpi === RENDER_DPI.vector\n      ? '?trim=colorUnlessAlpha&fm=png'\n      : '?trim=colorUnlessAlpha';\n    var run = loadImage(imgixUrl + params, false, diagnostic, recover ? 6000 : 0).then(function (img) {\n      var nw = img.naturalWidth, nh = img.naturalHeight;\n      if (!nw || !nh) return null;\n      // v3 path for everything that is not sitting exactly at a known imgix cap: no extra requests\n      if (!atKnownCap(nw, nh)) return fromInches(nw / dpi, nh / dpi, method, capFields(null, false));\n      // a render AT a cap: read the true source size (timed) and confirm the fit before recovering\n      return sourcePixels(imgixUrl, diagnostic).then(function (px) {\n        if (!px) return fromInches(nw / dpi, nh / dpi, method, capFields(null, false));\n        return renderCap(imgixUrl, px, diagnostic).then(function (cap) {\n          if (!atCap(cap, nw, nh)) return fromInches(nw / dpi, nh / dpi, method, capFields(px, false));\n          return cappedTrimExtent(imgixUrl, px, diagnostic).then(function (t) {\n            return fromInches(t.w / dpi, t.h / dpi, method + '-' + t.method, capFields(px, true));\n          });\n        });\n      });\n    });\n    if (!recover) return run;\n    return run.catch(function () { return null; }).then(function (result) {\n      return result || trimmedPngDimensions(imgixUrl, dpi, diagnostic);\n    }).then(function (result) {\n      return result || (serverRecovery ? serverTrimDimensions(imgixUrl, dpi, diagnostic) : null);\n    });\n  }\n\n  // PSD = the TRIMMED art, not the canvas (Justin 2026-11-10). Until then a psd quoted its\n  // whole canvas: flat.psd (6250x3750 px @300) priced 20.83x12.5 while its art is 17.37x5.83,\n  // and the rows, rulers and Soft Edges were drawn at the canvas aspect over the trimmed\n  // print. imgix renders psd fine with fm=png pinned (its default output for psd is JPEG,\n  // which would drop the alpha the trim reads). The detect service still sets the UNIT (the\n  // psd's own resolution) and the trim only scales it:\n  //     artIn = canvasIn x trimmedRenderPx / canvasPx (fm=json PixelWidth/PixelHeight)\n  // so a 72 dpi psd keeps the inches it had, cut to its art. Any miss (no canvas px, the\n  // render fails or times out, or it sits at an imgix render cap) keeps the canvas quote \u2014\n  // never a smaller guess. The trim render and the px read are best-effort, so they never\n  // report a diagnostic; only the service read does, as before.\n  function psdArtMeasure(opts, diagnostic) {\n    // The legacy engines can hand over the raw S3 url: our bucket maps to its imgix host.\n    var source = opts.imgixUrl ? measurementSource(String(opts.imgixUrl).split('?')[0], null, true) : null;\n    var bare = source ? source.url : '';\n    var art = bare ? Promise.all([\n      sourcePixels(bare, null),\n      loadImage(bare + '?trim=colorUnlessAlpha&fm=png', false, null, 12000)\n    ]).catch(function () { return null; }) : Promise.resolve(null);\n    return Promise.all([serviceInches(opts.s3Key, diagnostic), art]).then(function (r) {\n      var canvas = r[0], px = r[1] && r[1][0], img = r[1] && r[1][1];\n      if (!canvas) return null;\n      var tw = img ? img.naturalWidth : 0, th = img ? img.naturalHeight : 0;\n      if (!px || !tw || !th || tw > px.w || th > px.h || atKnownCap(tw, th))\n        return fromInches(canvas.inW, canvas.inH, 'service-s3key');\n      return fromInches(tw / psdDpi(px.w, canvas.inW), th / psdDpi(px.h, canvas.inH), 'psd-art-trim');\n    });\n  }\n  // canvas px per service inch. The service rounds inches to 2 places (6250 px @300 reads\n  // 20.83 = 300.05 px/in), so a value within 0.5% of a whole number snaps to it.\n  function psdDpi(canvasPx, canvasIn) {\n    var dpi = canvasPx / canvasIn, whole = Math.round(dpi);\n    return Math.abs(dpi - whole) <= whole * 0.005 ? whole : dpi;\n  }\n\n  // Content-fraction measure of a bg-removed raster (see header). Any failure\n  // (CORS taint, empty bbox, load error) returns null and the caller falls\n  // back to the pre-removal trimmed size \u2014 conservative, never garbage.\n  // modelParam (optional): the imgix bg-remove-model of the render the\n  // CUSTOMER CHOSE (v4 3-option picker; null/undefined = imgix default).\n  // Without it the quote measured the DEFAULT model regardless of choice \u2014\n  // on sources where the default model leaves full-frame residue the\n  // content fraction hit ~1.0 and the customer was quoted the whole source\n  // frame (Owen 2026-08-10: Eiffel 12x12 quoted 12.05x11.06 with a ~3.2in\n  // tower selected on model 4). The 7-11 fix measured the chosen render;\n  // the 7-29 move into this module dropped that \u2014 this restores it.\n  function bgRemovedMeasure(imgixUrl, modelParam, diagnostic) {\n    return sourceFrame(imgixUrl, diagnostic).then(function (frame) {\n      if (!frame.w || !frame.h) return null;\n      var renderW = Math.min(BBOX_RENDER_MAX_W, frame.w);\n      var url = imgixUrl + '?bg-remove=true' +\n        (modelParam ? '&bg-remove-model=' + modelParam : '') +\n        '&fm=png&w=' + renderW;\n      return loadImage(url, true, diagnostic).then(function (img) {\n        var bbox = scanAlphaBBox(img);\n        if (!bbox) return null;\n        var contentSrcW = bbox.w * (frame.w / bbox.frameW);\n        var contentSrcH = bbox.h * (frame.h / bbox.frameH);\n        return fromInches(\n          contentSrcW / RENDER_DPI.raster,\n          contentSrcH / RENDER_DPI.raster,\n          'raster-bgr-bbox',\n          capFields(frame.px, frame.clamped)\n        );\n      });\n    });\n  }\n\n  /**\n   * Measure an upload for QUOTING.\n   *\n   * @param {Object} opts\n   * @param {string} opts.imgixUrl  bare imgix URL of the upload (no params)\n   * @param {string} opts.ext      file extension, any case\n   * @param {string} [opts.s3Key]   stored object key / upload file name \u2014\n   *                                required for pdf/psd (service mode)\n   * @param {boolean} [opts.bgRemove] quote the post-background-removal extent\n   *                                (rasters only; vectors ship untouched and\n   *                                never re-quote for BGR)\n   * @param {number}  [opts.bgRemoveModel] imgix bg-remove-model of the\n   *                                CHOSEN render (omit for the default model)\n   * @param {Function} [opts.onDiagnostic] optional sanitized failure observation;\n   *                                does not change measurement or issue requests\n   * @returns {Promise<{pxW,pxH,inW,inH,method,clamped,srcPxW,srcPxH}|null>} px on the 300dpi print\n   *          basis; `clamped` = the trimmed render sat at imgix's per-side render cap (inches\n   *          were recovered, see KNOWN_CAPS) with the true source px beside it;\n   *          basis, inches as numbers. null = measurement failed; callers\n   *          keep their own fallback (do NOT invent one here).\n   */\n  function measure(opts) {\n    var ext = String(opts.ext || '').toLowerCase();\n    var run, observed = false;\n    var diagnostic = typeof opts.onDiagnostic === 'function' ? function (fields) {\n      observed = true; note(opts.onDiagnostic, fields);\n    } : null;\n\n    if (opts.pageBox && opts.s3Key) {\n      // GANG sheets are quoted at their FULL sheet size, and a large sheet\n      // (>~114in on an axis) exceeds imgix's ~8192px render cap \u2014 a client\n      // render CLAMPS and mis-measures (a true 22x360in sheet rendered as\n      // 7x113.8, failing the ~22in width gate). The detect service reads the\n      // source's true page dimensions WITHOUT rendering, so gang routes there \u2014\n      // this is exactly what the legacy gang flow (pdp_transferBySize) did, and\n      // why real large gang orders came through it. Falls back to the client\n      // render only if the service misses. Single-transfer NEVER sets pageBox,\n      // so its trim-measure below is unchanged (the service over-quotes a single\n      // design to its whole page \u2014 the reason pdf moved off the service 2026-08).\n      run = serviceInches(opts.s3Key, diagnostic).then(function (r) {\n        if (r) return fromInches(r.inW, r.inH, 'service-gang');\n        if (SERVICE_EXTS.indexOf(ext) !== -1) return null;\n        return trimMeasure(\n          opts.imgixUrl,\n          VECTOR_EXTS.indexOf(ext) !== -1 ? RENDER_DPI.vector : RENDER_DPI.raster,\n          'gang-fallback', diagnostic\n        );\n      });\n    } else if (SERVICE_EXTS.indexOf(ext) !== -1) {\n      // psd \u2014 post-trim like every other type (Owen 2026-08-03: \"size needs to be\n      // calculated post trim\"; Justin 2026-11-10: \"size on the art\"). See psdArtMeasure.\n      run = psdArtMeasure(opts, diagnostic);\n    } else if (VECTOR_EXTS.indexOf(ext) !== -1) {\n      run = trimMeasure(opts.imgixUrl, RENDER_DPI.vector, 'vector-72', diagnostic, opts.recover === true, opts.serverRecovery === true);\n    } else if (opts.bgRemove) {\n      // .catch BEFORE the fallback: a rejected bg render (load failure) must\n      // still fall back to the pre-removal trimmed size, same as a null bbox.\n      run = bgRemovedMeasure(opts.imgixUrl, opts.bgRemoveModel, diagnostic)\n        .catch(function () { return null; })\n        .then(function (r) {\n          return r || trimMeasure(opts.imgixUrl, RENDER_DPI.raster, 'raster-trim-fallback', diagnostic);\n        });\n    } else {\n      run = trimMeasure(opts.imgixUrl, RENDER_DPI.raster, 'raster-trim', diagnostic, opts.recover === true, opts.serverRecovery === true);\n    }\n\n    return run.then(function (result) {\n      if (!result && !observed) note(diagnostic, { failureKind: 'validation', errorName: 'Error', httpStatus: 0 });\n      return result;\n    }).catch(function (err) {\n      if (!observed) note(diagnostic, { failureKind: 'unknown', errorName: err && err.name || 'Error', httpStatus: 0 });\n      console.log('ERROR NTMeasure.measure', err && err.message);\n      return null;\n    });\n  }\n\n  window.NTMeasure = Object.freeze({ measure: measure, build: MEASUREMENT_BUILD, recoveryVersion:2, browserSourceRecov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