/* Emerald P13 V1.6.4: consolidated test-only editorial build. */ (() => {if(!location.pathname.includes("1366566-Desks"))return; for(const n of ["EQS_V164_PREVIEW","EQS_V164_PAGE11_V2","EQS_PAGE11_V2","EQS_FLASH_V3","EQS_V164_FINAL_LAYOUT","EQS_V164_BRANDING"]){try{window[n]?.stop?.()}catch(e){console.warn("[V164 cleanup]",n,e)}} for(const id of ["eqs-v164-page11-price-collection-style","eqs-flash-alignment-v6","eqs-flash-alignment-clean-v5","eqs-flash-delivery-alignment-v4","eqs-v164-final-layout","eqs-flash-v164-v3"]){document.getElementById(id)?.remove()} })(); /* V1.6.3 test-only preview cleanup. Protected P9/P10/P13E scripts remain running. */ (() => { for (const name of ["EQS_EDITORIAL_V163_ADDON","EQS_BATCH100_PREVIEW","EQS_BATCH100_TITLE_FIX","EQS_B100_REMAINING36","EQS_BOWFRONT_V2","EQS_NEXT24_DELIVERY_V2","EQS_FLASH_BRANDING_V1"]) { try { window[name]?.stop?.(); } catch (e) { console.warn("[V163 cleanup]", name, e); } } })(); /* * EMERALD QUICK SHIP * P13 EDITORIAL V1.6.2 CONSOLIDATED TEST * * DBLFLOS101, 102, 103, 105 * DBLFDOS105, 102, 103 * COEMARKLE68W * OS169 reception shells and transaction tops (21) * Palisades (2), StandUp height-adjustable desks (7) * OfficeSource single-pedestal desks (10) * OTG SL1 (5), SL2 (5), SL13 (2) * * Desks category only. * Preserves P9/P10/P13E, native pricing, * quantity controls and Add to Cart. */ (() => { "use strict"; const VERSION = "P13_EDITORIAL_V1_6_2"; const STYLE_ID = "eqs-editorial-v162-consolidated"; const CARD_SELECTOR = ".tileparent.product[data-sku]"; const TITLE_CLASS = "eqs-editorial-title"; if (!location.pathname.includes("1366566-Desks")) { return; } if (typeof window.EQS_P13E?.rescan !== "function") { console.error("[P13 V1.6.2] P13E unavailable"); return; } // Retire temporary browser-only previews before V1.4 cleanup. // No protected P9/P10/P13E or native shopping scripts are stopped. [ "EQS_RECEPTION_SYNC", "EQS_OS169_FINISH", "EQS_OS169TT_PREVIEW", "EQS_OS169TT_DIMENSIONS", "EQS_OS169TT_RECOVERY", "EQS_GLASS_TOP_PREVIEW", "EQS_GLASS_TOP_V2", "EQS_PALISADES_PREVIEW", "EQS_STANDUP_PREVIEW", "EQS_STANDUP_MW", "EQS_STANDUP_AE_MH", "EQS_EDITORIAL_V162", "EQS_EDITORIAL_V16", "EQS_V161_OTG", "EQS_OTG_VISIBILITY_V2", "EQS_OTG_BULLET_CLEANUP", "EQS_OTG_BULLET_RECOVERY", "EQS_OTG_DELIVERY_V1", "EQS_V151_ALIGNMENT", "EQS_V152_ALIGNMENT", "EQS_V151_UNIVERSAL", "EQS_EDITORIAL_V15", "EQS_SINGLE_PEDESTAL_PREVIEW", "EQS_OTG_SL1_PREVIEW", "EQS_OTG_SL12_PREVIEW", "EQS_OTG_SL2_SUITE", "EQS_OTG_SL12_V4", "EQS_OTG_SL13_PREVIEW", "EQS_OTG_SL13_V2" ].forEach(name => { try { window[name]?.stop?.(); } catch (error) { console.warn("[P13 V1.6.2] Cleanup", name, error); } }); // Clean up older editorial instances. window.EQS_EDITORIAL_V14?.stop?.(); window.EQS_EDITORIAL_V13?.stop?.(); window.EQS_EDITORIAL_V12?.stop?.(); window.EQS_EDITORIAL_V11?.stop?.(); window.EQS_ALIGNMENT_V141?.stop?.(); window.EQS_FIXES_V142?.stop?.(); [ "eqs-markle-85-percent-test", "eqs-markle-image-135-test", "eqs-markle-image-160-test", "eqs-markle-image-position-final-test", "eqs-markle-image-135-test", "eqs-p13-v142-fixes", "eqs-p13-v141-alignment", "eqs-dedicated-title-test", "eqs-dedicated-title-fit-fix", "eqs-editorial-arial-fix", "eqs-editorial-v15-consolidated", "eqs-editorial-v151-consolidated", "eqs-editorial-v16-consolidated", "eqs-editorial-v161-consolidated", "eqs-v161-otg-typography-fix", "eqs-otg-feature-visibility-v2", "eqs-otg-bullet-cleanup-v1", "eqs-otg-bullet-recovery-style", "eqs-otg-matched-bullet-font", "eqs-v161-otg-final-style", STYLE_ID ].forEach(id => document.getElementById(id)?.remove()); const FINISHES = { AE: "American Elm", AR: "Arcadia White", ES: "Espresso", CH: "Cherry", MH: "Mahogany", CG: "Coastal Gray", MW: "Modern Walnut", MA: "Maple", WH: "White", JV: "Java" }; const FLOS_BULLETS = [ "Reversible left- or right-hand setup", "Matches OS Laminate storage", "Durable, premium-grade laminate" ]; const DOS_BULLETS = [ "Durable laminate work surface", "Locking double-pedestal storage", "Matches OS Laminate storage" ]; const MARKLE_BULLETS = [ "Drop-front keyboard drawer", "Built-in wire-management grommets", "Two locking file drawers" ]; const FAMILIES = { FLOS101: { type: "L-Shaped Double-Pedestal Desk", dimensions: '71"W x 83"D', bullets: FLOS_BULLETS }, FLOS102: { type: "L-Shaped Double-Pedestal Desk", dimensions: '66"W x 77"D', bullets: FLOS_BULLETS }, FLOS103: { type: "L-Shaped Double-Pedestal Desk", dimensions: '60"W x 77"D', bullets: FLOS_BULLETS }, FLOS105: { type: "L-Shaped Double-Pedestal Desk", dimensions: '71"W x 77"D', bullets: FLOS_BULLETS }, DOS105: { type: "Straight Double-Pedestal Desk", dimensions: '71"W x 30"D', bullets: DOS_BULLETS }, DOS102: { type: "Straight Double-Pedestal Desk", dimensions: '66"W x 30"D', bullets: DOS_BULLETS }, DOS103: { type: "Straight Double-Pedestal Desk", dimensions: '60"W x 30"D', bullets: DOS_BULLETS } }; const OS169_SHELL_BULLETS = [ "Designed to impress your visitors", "Aesthetically pleasing design", "Transaction tops sold separately" ]; const OS169_TOP_BULLETS = [ "Smooth surface for visitor interactions", "Durable laminate work surface", "Includes metal risers" ]; const OS169_GLASS_BULLETS = [ "Smooth surface for visitor interactions", "Durable glass transaction surface", "Includes metal risers" ]; const PALISADES = { COEEVRC1LGG: { fixedTitle: "Reception Desk with Glass Counter", bullets: ["Glass transaction counter", "Welcoming reception workspace", "Coordinates with Palisades Collection"] }, COEEV6030LGG: { fixedTitle: 'L-Shaped Double-Pedestal Desk, 60"W x 78"D', bullets: ["Spacious L-shaped work surface", "Double-pedestal storage", "Coordinates with Palisades Collection"] } }; const STANDUP_FINISHES = { JVETC: "Java", MAETC: "Maple", WHETC: "White", CGETC: "Coastal Gray", MWETC: "Modern Walnut", AEETC: "American Elm", MHETC: "Mahogany" }; const STANDUP_BULLETS = [ "Spacious laminate work surface", "Electric sit-stand height adjustment", "Adjustable height for ergonomic comfort" ]; // Approved V1.6 additions. Exact SKU matching prevents SL13/SL1 overlap. const SINGLE_PEDESTAL_BULLETS = [ "Durable laminate work surface", "Locking single-pedestal storage", "Coordinates with OS Laminate storage" ]; const OTG_FINISHES = { AWL: "Autumn Walnut", AML: "American Mahogany", ADC: "American Dark Cherry", AEL: "American Espresso", AGL: "Artisan Grey" }; const OTG_SL1_BULLETS = [ "Durable laminate work surface", "Acrylic privacy/modesty panel", "Locking mobile box/file pedestal" ]; const OTG_SL2_BULLETS = [ "Desk with modesty panel and files", "Matching credenza and storage hutch", "Locking pedestal file drawers" ]; const OTG_SL13_BULLETS = [ "Reversible left/right layout", "Durable laminate surfaces", "Coordinating reception storage" ]; function productData(card) { const sku = (card.dataset.sku || "").toUpperCase(); const single = sku.match(/^COESGLHDOS121(AE|WH|ES|MW|MH|MA|JV|CG|CH|AR)$/); if (single) return { sku, family: "SINGLE_PEDESTAL", finish: FINISHES[single[1]], bullets: SINGLE_PEDESTAL_BULLETS, titleKind: "SINGLE" }; const otg = sku.match(/^OTGLAYOUT(SL1|SL2|SL13)(AWL|AML|ADC|AEL|AGL)$/); if (otg && OTG_FINISHES[otg[2]]) { const family = otg[1]; // SL13 is currently approved only for these two finish SKUs. if (family === "SL13" && !["AWL", "AML"].includes(otg[2])) return null; return { sku, family: "OTG_" + family, finish: OTG_FINISHES[otg[2]], titleKind: family, collection: "OTG Laminate", bullets: family === "SL1" ? OTG_SL1_BULLETS : family === "SL2" ? OTG_SL2_BULLETS : OTG_SL13_BULLETS }; } if (sku === "COEOS169TTGLASSWH") { return { sku, family: "OS169_GLASS_TOP", fixedTitle: 'Glass Reception Transaction Top, 72"W x 18"D', bullets: OS169_GLASS_BULLETS }; } const shell = sku.match(/^COEOS169NTT(AE|AR|ES|CH|MH|CG|MW|MA|WH|JV)$/); if (shell) return { sku, family: "OS169_SHELL", finish: FINISHES[shell[1]], type: "Reception Desk Shell", dimensions: '71"W x 30"D', bullets: OS169_SHELL_BULLETS }; const top = sku.match(/^COEOS169TT(AE|AR|ES|CH|MH|CG|MW|MA|WH|JV)$/); if (top) return { sku, family: "OS169_LAMINATE_TOP", finish: FINISHES[top[1]], type: "Reception Desk Transaction Top", dimensions: '72"W x 18"D', bullets: OS169_TOP_BULLETS }; if (PALISADES[sku]) return { sku, family: "PALISADES", ...PALISADES[sku] }; const standup = sku.match(/^COEOSTHAT5172(JVETC|MAETC|WHETC|CGETC|MWETC|AEETC|MHETC)$/); if (standup) return { sku, family: "STANDUP", finish: STANDUP_FINISHES[standup[1]], type: "Height-Adjustable Desk", dimensions: '72"W x 30"D', bullets: standup[1] === "WHETC" ? [STANDUP_BULLETS[0], STANDUP_BULLETS[1], "Antimicrobial white laminate surface"] : STANDUP_BULLETS }; if (sku === "COEMARKLE68W") { return { sku, family: "MARKLE", fixedTitle: 'Executive Desk, 68"W x 24"D, Espresso Finish', bullets: MARKLE_BULLETS }; } const match = sku.match( /^COEDBL(FLOS101|FLOS102|FLOS103|FLOS105|FDOS105|FDOS102|FDOS103)([A-Z]{2})$/ ); if (!match) return null; const familyKey = match[1].replace(/^FDOS/, "DOS"); const family = FAMILIES[familyKey]; const finish = FINISHES[match[2]]; if (!family || !finish) return null; return { sku, family: familyKey, finish, ...family }; } // Preserve P13 grid and row spacing: no grid/gap/card-height overrides. // Apply styling only to recognized products. const style = document.createElement("style"); style.id = STYLE_ID; style.textContent = ` .tileparent.product[data-eqs-v15="1"] .product-tile-image, .tileparent.product[data-eqs-v15="1"] .imgthumbnail.imglightbox { height: 140px !important; min-height: 140px !important; overflow: visible !important; } .tileparent.product[data-eqs-v15="1"] .product-tile-image img { width: 200px !important; height: 200px !important; object-fit: contain !important; } .tileparent.product[data-eqs-v15="1"] .product-name { display: none !important; } .tileparent.product[data-eqs-v15="1"] .eqs-editorial-title { display: -webkit-box !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; overflow: hidden !important; font-family: Arial, sans-serif !important; font-size: 14px !important; font-weight: 700 !important; line-height: 19px !important; letter-spacing: normal !important; width: 100% !important; max-width: 100% !important; min-height: 38px !important; margin: 0 !important; padding: 0 !important; } /* OTG: match the compact Quick Ship feature presentation. Do not alter the card grid, image, or row gap. */ .tileparent.product[data-eqs-otg-v162="1"] .eqs-p13e-features { display: flex !important; flex-direction: column !important; margin: 0 !important; padding: 0 !important; gap: 0 !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-p13e-feature { display: flex !important; align-items: flex-start !important; list-style: none !important; font-family: Arial, sans-serif !important; font-size: 14px !important; font-weight: 400 !important; line-height: 19px !important; margin: 0 !important; padding: 0 !important; gap: 7px !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-p13e-feature::before, .tileparent.product[data-eqs-otg-v162="1"] .eqs-p13e-feature::marker { content: none !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-v162-dot { color: #438346 !important; flex: 0 0 10px !important; font-family: Arial, sans-serif !important; font-size: 14px !important; line-height: 19px !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-v162-copy { min-width: 0 !important; flex: 1 1 auto !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-v162-collection { font-family: Arial, sans-serif !important; font-size: 14px !important; line-height: 19px !important; color: #64748b !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-v162-collection strong { color: #475569 !important; font-weight: 700 !important; } /* * MARKLE IMAGE: FINAL APPROVED SETTINGS * 200px native base, 85% visual scale, * 9px downward offset. */ .tileparent.product[data-sku="COEMARKLE68W"] .product-tile-image img { width: 200px !important; height: 200px !important; max-width: 200px !important; max-height: 200px !important; object-fit: contain !important; transform: translateY(9px) scale(0.85) !important; transform-origin: center center !important; } .tileparent.product[data-sku="COEMARKLE68W"] .imgthumbnail.imglightbox { display: flex !important; align-items: center !important; justify-content: center !important; height: 140px !important; min-height: 140px !important; overflow: visible !important; } `; document.head.appendChild(style); // V1.6.2: dynamically match the approved OfficeSource typography. // This overrides only OTG feature/dot and Collection fonts, not layout. const TYPO_ID = "eqs-v162-otg-reference-typography"; document.getElementById(TYPO_ID)?.remove(); const typographyStyle = document.createElement("style"); typographyStyle.id = TYPO_ID; document.head.appendChild(typographyStyle); let lastTypography = ""; function syncOTGTypography() { const os = document.querySelector( '[data-sku="COESGLHDOS121JV"]' ) || document.querySelector( '[data-sku^="COESGLHDOS121"]' ); const feature = os?.querySelector(".eqs-p13e-feature"); const meta = os?.querySelector(".eqs-p13e-meta"); if (!feature || !meta) return false; const f = getComputedStyle(feature); const m = getComputedStyle(meta); const font = value => value.replace(/[\n\r;{}]/g, ""); const rules = ` .tileparent.product[data-eqs-otg-v162="1"] .eqs-p13e-feature, .tileparent.product[data-eqs-otg-v162="1"] .eqs-v162-copy { font-family: ${font(f.fontFamily)} !important; font-size: ${f.fontSize} !important; font-weight: ${f.fontWeight} !important; line-height: ${f.lineHeight} !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-v162-dot { font-size: ${f.fontSize} !important; line-height: ${f.lineHeight} !important; } .tileparent.product[data-eqs-otg-v162="1"] .eqs-v162-collection { font-family: ${font(m.fontFamily)} !important; font-size: ${m.fontSize} !important; line-height: ${m.lineHeight} !important; font-weight: ${m.fontWeight} !important; } `; if (rules !== lastTypography) { typographyStyle.textContent = rules; lastTypography = rules; } return true; } const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); ctx.font = "700 14px Arial"; function lineCount(element, text) { if (!element) return Infinity; const width = element.getBoundingClientRect().width; if (!width) return Infinity; let lines = 1; let current = ""; for (const word of text.split(/\s+/)) { const next = current ? current + " " + word : word; if (current && ctx.measureText(next).width > width) { lines++; current = word; } else { current = next; } } return lines; } function approvedTitle(element, data) { // Always keep the full manufacturer finish and the word Finish. // Choose the first measured two-line title; never knowingly truncate. if (data.titleKind) { const finish = data.finish + " Finish"; const choices = { SINGLE: [ `Single-Pedestal Desk, 48"W x 24"D, ${finish}`, `Pedestal Desk, 48"W x 24"D, ${finish}` ], SL1: [ `60" Laminate Desk with Pedestal, ${finish}`, `60" Pedestal Desk, ${finish}` ], SL2: [ `71" Desk Suite with Storage Hutch, ${finish}`, `71" Suite with Storage Hutch, ${finish}`, `71" Desk Suite & Hutch, ${finish}` ], SL13: [ `Frosted Glass Reception Desk, ${finish}`, `Glass Reception Desk, ${finish}` ] }[data.titleKind]; return choices.find(t => lineCount(element, t) <= 2 ) || choices.at(-1); } if (data.fixedTitle) return data.fixedTitle; const base = `${data.type}, ${data.dimensions}, ${data.finish}`; const withFinish = base + " Finish"; if (lineCount(element, withFinish) <= 2) { return withFinish; } // StandUp finish word is mandatory, // including American Elm and Modern Walnut. if (data.family === "STANDUP") { const compact = `Sit-Stand Desk, ${data.dimensions}, ${data.finish} Finish`; return lineCount(element, compact) <= 2 ? compact : withFinish; } return base; } const OTG_DELIVERY_TEXT = "5–7 Day Delivery"; function setOTGBullets(card, data) { const container = card.querySelector( ".eqs-p13e-features" ); if (!container) return false; const existing = [ ...container.querySelectorAll( ".eqs-p13e-feature" ) ]; // Dedicated dot nodes prevent missing or // doubled bullet markers. if ( existing.length !== 3 || existing.some((item, i) => !item.classList.contains("eqs-v162-feature") || item.querySelector( ".eqs-v162-copy" )?.textContent !== data.bullets[i] ) ) { container.replaceChildren(); data.bullets.forEach(copy => { const item = document.createElement("div"); item.className = "eqs-p13e-feature eqs-v162-feature"; const dot = document.createElement("span"); dot.className = "eqs-v162-dot"; dot.textContent = "•"; const text = document.createElement("span"); text.className = "eqs-v162-copy"; text.textContent = copy; item.append(dot, text); container.appendChild(item); }); } return true; } function setOTGCollection(card) { const meta = card.querySelector( ".eqs-p13e-meta" ); if (!meta) return false; let row = meta.querySelector( ".eqs-v162-collection" ); if (!row) { row = document.createElement("div"); row.className = "eqs-v162-collection"; const category = [ ...meta.children ].find(el => /^Category:/i.test(el.textContent.trim()) ); if (category) { category.after(row); } else { meta.prepend(row); } } if ( row.textContent.trim() !== "Collection: OTG Laminate" ) { row.replaceChildren(); const label = document.createElement("strong"); label.textContent = "Collection:"; row.append( label, document.createTextNode(" OTG Laminate") ); } return true; } function setOTGDelivery(card) { const badge = card.querySelector( ".eqs-p542-delivery" ); if (!badge) return false; // Preserve the original Quick Ship truck SVG. badge.classList.remove("unverified"); const reference = document.querySelector( '.tileparent.product[data-sku^="COESGLHDOS121"] .eqs-p542-delivery' ); if (reference) { badge.className = reference.className; } const walker = document.createTreeWalker( badge, NodeFilter.SHOW_TEXT ); let node; while ((node = walker.nextNode())) { if (node.parentElement?.closest("svg")) { continue; } if (/delivery|day/i.test(node.textContent)) { if ( node.textContent.trim() !== OTG_DELIVERY_TEXT ) { node.textContent = OTG_DELIVERY_TEXT; } return true; } } return false; } function applyCard(card) { const data = productData(card); if (!data) return false; const native = card.querySelector( ".product-name" ); if (!native) return false; card.dataset.eqsV15 = "1"; // Remove obsolete preview-only title nodes. // Preserve the shared editorial title. card.querySelectorAll([ ".eqs-single-pedestal-title", ".eqs-otg-sl1-title", ".eqs-otg-sl12-title", ".eqs-otg-sl2-suite-title", ".eqs-otg-sl12-v4-title", ".eqs-otg-sl13-title", ".eqs-sl13-v2-title" ].join(",")).forEach(node => node.remove()); let editorial = card.querySelector( "." + TITLE_CLASS ); if (!editorial) { editorial = document.createElement("div"); editorial.className = TITLE_CLASS; native.after(editorial); } // Keep title directly beneath brand/delivery row. const brand = card.querySelector( ".eqs-p542-brandrow" ); if ( brand && brand.nextElementSibling !== editorial ) { brand.after(editorial); } editorial.style.setProperty( "font-family", "Arial, sans-serif", "important" ); const desired = approvedTitle( editorial, data ); if ( editorial.textContent.trim() !== desired ) { editorial.textContent = desired; } if (data.family.startsWith("OTG_")) { card.dataset.eqsOtgV162 = "1"; setOTGBullets(card, data); setOTGCollection(card); setOTGDelivery(card); return true; } const features = [ ...card.querySelectorAll( ".eqs-p13e-feature" ) ]; if (features.length) { const template = features[0]; while (features.length < 3) { const clone = template.cloneNode(true); features[features.length - 1].after(clone); features.push(clone); } while (features.length > 3) { features.pop().remove(); } features.forEach((element, index) => { if ( element.textContent.trim() !== data.bullets[index] ) { element.textContent = data.bullets[index]; } }); } return true; } let runs = 0; let rescans = 0; let pending = false; let stopped = false; function apply() { if (stopped) return null; let matched = 0; document.querySelectorAll( CARD_SELECTOR ).forEach(card => { if (applyCard(card)) matched++; }); // Apply the approved OfficeSource font sizes // after product cards are populated. syncOTGTypography(); runs++; return { version: VERSION, runs, matched }; } function schedule() { if (pending || stopped) return; pending = true; requestAnimationFrame(() => { requestAnimationFrame(() => { pending = false; if (!stopped) { apply(); } }); }); } // Preserve original P13E behavior and return value. const originalRescan = window.EQS_P13E.rescan; function wrappedRescan(...args) { const result = originalRescan.apply(this, args); rescans++; schedule(); if ( result && typeof result.then === "function" ) { result.then( () => schedule(), () => schedule() ); } return result; } window.EQS_P13E.rescan = wrappedRescan; // Detect newly inserted native product cards. const observer = new MutationObserver(mutations => { const added = mutations.some(mutation => [...mutation.addedNodes].some(node => node.nodeType === 1 && ( node.matches?.(CARD_SELECTOR) || node.querySelector?.(CARD_SELECTOR) ) ) ); if (added) schedule(); }); observer.observe(document.body, { childList: true, subtree: true }); function status() { const cards = [ ...document.querySelectorAll(CARD_SELECTOR) ].filter(card => productData(card)); const rows = cards.map(card => { const data = productData(card); const title = card.querySelector( "." + TITLE_CLASS ); const features = [ ...card.querySelectorAll( ".eqs-p13e-feature" ) ]; const featureLines = features.map(el => { const css = getComputedStyle(el); const lineHeight = parseFloat(css.lineHeight) || 16; return Math.round( el.getBoundingClientRect().height / lineHeight ); }); return { sku: data.sku, family: data.family, intendedCollection: data.collection || "", titlePresent: !!title, titleAligned: !!title && card.querySelector( ".eqs-p542-brandrow" )?.nextElementSibling === title, titleCorrect: !!title && title.textContent.trim() === approvedTitle(title, data), twoLineTitle: !!title && lineCount( title, title.textContent.trim() ) <= 2, bulletsCorrect: features.length === 3 && features.every((el, i) => ( data.family.startsWith("OTG_") ? el.querySelector( ".eqs-v162-copy" )?.textContent.trim() : el.textContent.trim() ) === data.bullets[i] ), singleLineBullets: featureLines.join("/") === "1/1/1", compactImage: Math.round( card.querySelector( ".product-tile-image" )?.getBoundingClientRect().height || 0 ) === 140, otgDelivery: !data.family.startsWith("OTG_") || !!card.querySelector( ".eqs-p542-delivery" )?.textContent.includes( OTG_DELIVERY_TEXT ), otgTruck: !data.family.startsWith("OTG_") || !!card.querySelector( ".eqs-p542-delivery svg" ), otgCollection: !data.family.startsWith("OTG_") || !!card.querySelector( ".eqs-v162-collection" )?.textContent.includes( "OTG Laminate" ), bulletsVisible: features.length === 3 && features.every(el => el.getBoundingClientRect().height > 0 ), cart: !!card.querySelector( ".btn-add-to-cart" ), pricing: !!card.querySelector( ".eqs-r2-pricebar" ) }; }); const count = key => rows.filter(row => row[key]).length; const summary = { version: VERSION, runs, rescans, products: rows.length, editorialTitles: count("titlePresent"), alignedTitles: count("titleAligned"), correctTitles: count("titleCorrect"), twoLineTitles: count("twoLineTitle"), approvedBullets: count("bulletsCorrect"), visibleBullets: count("bulletsVisible"), correctOTGDelivery: count("otgDelivery"), originalOTGTruck: count("otgTruck"), OTGCollection: count("otgCollection"), singleLineBullets: count("singleLineBullets"), compactImages: count("compactImage"), cartButtons: count("cart"), pricingOverlays: count("pricing"), families: Object.fromEntries( [...new Set( rows.map(r => r.family) )].map(f => [ f, rows.filter(r => r.family === f ).length ]) ) }; console.log( "[P13 EDITORIAL V1.6.2]", summary ); console.table( rows.filter(r => !r.titleCorrect || !r.titleAligned || !r.twoLineTitle || !r.bulletsCorrect || !r.singleLineBullets || !r.bulletsVisible || !r.otgDelivery || !r.otgTruck || !r.otgCollection || !r.compactImage || !r.cart || !r.pricing ) ); return summary; } window.EQS_EDITORIAL_V162 = { version: VERSION, apply, status, stop() { stopped = true; observer.disconnect(); if ( window.EQS_P13E.rescan === wrappedRescan ) { window.EQS_P13E.rescan = originalRescan; } style.remove(); typographyStyle.remove(); document.querySelectorAll( '[data-eqs-v15="1"]' ).forEach(card => { card.removeAttribute( "data-eqs-v15" ); card.removeAttribute( "data-eqs-otg-v162" ); card.querySelector( "." + TITLE_CLASS )?.remove(); }); console.log( "[P13 EDITORIAL V1.6.2] Stopped" ); } }; console.log( "[P13 EDITORIAL V1.6.2] Loaded", apply() ); })(); /* P13 V1.6.3: 100 saved editorial records + 24 prior preview records. */ (() => { "use strict"; if (!location.pathname.includes("1366566-Desks")) return; const VERSION="P13_EDITORIAL_V1_6_3_ADDON"; const STYLE_ID="eqs-editorial-v163-addon-style"; const LOGO_URL="https://us.evocdn.io/dealer/1516/content/media/FLASH LOGO.png"; const RECORDS={"OTGLAYOUTSL18AML":{"title":"U-Shaped Peninsula Desk, 71\" x 102\", American Mahogany Finish","bullets":["Peninsula-style work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL18ADC":{"title":"U-Shaped Peninsula Desk, American Dark Cherry Finish","bullets":["Peninsula-style work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL18AEL":{"title":"U-Shaped Peninsula Desk, 71\" x 102\", American Espresso Finish","bullets":["Peninsula-style work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL18AGL":{"title":"U-Shaped Peninsula Desk, 71\" x 102\", Artisan Grey Finish","bullets":["Peninsula-style work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL19AWL":{"title":"U-Shaped Peninsula & Hutch, 71\" x 102\", Autumn Walnut Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL19AML":{"title":"U-Shaped Peninsula & Hutch, American Mahogany Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL19ADC":{"title":"U-Shaped Peninsula & Hutch, American Dark Cherry Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL19AEL":{"title":"U-Shaped Peninsula & Hutch, American Espresso Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL19AGL":{"title":"U-Shaped Peninsula & Hutch, 71\" x 102\", Artisan Grey Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL22AWL":{"title":"Bowfront Desk & Hutch, Autumn Walnut Finish","bullets":["71\" x 42\" bowfront work surface","Double-pedestal credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL22AML":{"title":"Bowfront Desk & Hutch, American Mahogany Finish","bullets":["71\" x 42\" bowfront work surface","Double-pedestal credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL22ADC":{"title":"Bowfront Desk & Hutch, American Dark Cherry Finish","bullets":["71\" x 42\" bowfront work surface","Double-pedestal credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL22AEL":{"title":"Bowfront Desk & Hutch, American Espresso Finish","bullets":["71\" x 42\" bowfront work surface","Double-pedestal credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL22AGL":{"title":"Bowfront Desk & Hutch, Artisan Grey Finish","bullets":["71\" x 42\" bowfront work surface","Double-pedestal credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL23AWL":{"title":"Bowfront & Storage Hutch, Autumn Walnut Finish","bullets":["71\" x 42\" bowfront work surface","Storage credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL23AML":{"title":"Bowfront & Storage Hutch, American Mahogany Finish","bullets":["71\" x 42\" bowfront work surface","Storage credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL23ADC":{"title":"Bowfront & Storage Hutch, American Dark Cherry Finish","bullets":["71\" x 42\" bowfront work surface","Storage credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL23AEL":{"title":"Bowfront & Storage Hutch, American Espresso Finish","bullets":["71\" x 42\" bowfront work surface","Storage credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL23AGL":{"title":"Bowfront & Storage Hutch, Artisan Grey Finish","bullets":["71\" x 42\" bowfront work surface","Storage credenza and hutch","Locking full-file storage"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL24AWL":{"title":"L-Shaped Peninsula Desk, 71\" x 72\", Autumn Walnut Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL24AML":{"title":"L-Shaped Peninsula Desk, 71\" x 72\", American Mahogany Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL24ADC":{"title":"L-Shaped Peninsula Desk, 71\" x 72\", American Dark Cherry Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL24AEL":{"title":"L-Shaped Peninsula Desk, 71\" x 72\", American Espresso Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL24AGL":{"title":"L-Shaped Peninsula Desk, 71\" x 72\", Artisan Grey Finish","bullets":["Peninsula-style work surface","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL25AWL":{"title":"L-Shaped Desk & Hutch, 71\" x 72\", Autumn Walnut Finish","bullets":["Spacious L-shaped work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL25AML":{"title":"L-Shaped Desk & Hutch, 71\" x 72\", American Mahogany Finish","bullets":["Spacious L-shaped work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL25ADC":{"title":"L-Shaped Desk & Hutch, 71\" x 72\", American Dark Cherry Finish","bullets":["Spacious L-shaped work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL25AEL":{"title":"L-Shaped Desk & Hutch, 71\" x 72\", American Espresso Finish","bullets":["Spacious L-shaped work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL25AGL":{"title":"L-Shaped Desk & Hutch, 71\" x 72\", Artisan Grey Finish","bullets":["Spacious L-shaped work surface","Locking full-file storage","Matching storage hutch"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL26AWL":{"title":"Reversible L-Shaped Desk, 71\" x 72\", Autumn Walnut Finish","bullets":["Reversible left/right configuration","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL26AML":{"title":"Reversible L-Shaped Desk, 71\" x 72\", American Mahogany Finish","bullets":["Reversible left/right configuration","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL26ADC":{"title":"Reversible L-Shaped Desk, 71\" x 72\", American Dark Cherry Finish","bullets":["Reversible left/right configuration","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL26AEL":{"title":"Reversible L-Shaped Desk, 71\" x 72\", American Espresso Finish","bullets":["Reversible left/right configuration","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL26AGL":{"title":"Reversible L-Shaped Desk, 71\" x 72\", Artisan Grey Finish","bullets":["Reversible left/right configuration","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL27AWL":{"title":"L-Shaped Desk & Lateral File, 108\" x 72\", Autumn Walnut Finish","bullets":["Reversible L-shaped configuration","Locking full-file storage","Two-drawer locking lateral file"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL27AML":{"title":"L-Shaped Desk & Lateral File, American Mahogany Finish","bullets":["Reversible L-shaped configuration","Locking full-file storage","Two-drawer locking lateral file"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL27ADC":{"title":"L-Shaped Desk & Lateral File, American Dark Cherry Finish","bullets":["Reversible L-shaped configuration","Locking full-file storage","Two-drawer locking lateral file"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL27AEL":{"title":"L-Shaped Desk & Lateral File, American Espresso Finish","bullets":["Reversible L-shaped configuration","Locking full-file storage","Two-drawer locking lateral file"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL27AGL":{"title":"L-Shaped Desk & Lateral File, 108\" x 72\", Artisan Grey Finish","bullets":["Reversible L-shaped configuration","Locking full-file storage","Two-drawer locking lateral file"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL28AWL":{"title":"L-Shaped Reception Desk, 71\" x 72\", Autumn Walnut Finish","bullets":["Reversible reception layout","Laminate transaction counter","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL28AML":{"title":"L-Shaped Reception Desk, 71\" x 72\", American Mahogany Finish","bullets":["Reversible reception layout","Laminate transaction counter","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL28ADC":{"title":"L-Shaped Reception Desk, 71\" x 72\", American Dark Cherry Finish","bullets":["Reversible reception layout","Laminate transaction counter","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL28AEL":{"title":"L-Shaped Reception Desk, 71\" x 72\", American Espresso Finish","bullets":["Reversible reception layout","Laminate transaction counter","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL28AGL":{"title":"L-Shaped Reception Desk, 71\" x 72\", Artisan Grey Finish","bullets":["Reversible reception layout","Laminate transaction counter","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL30AWL":{"title":"Double-Pedestal Desk, 71\" x 36\", Autumn Walnut Finish","bullets":["Spacious laminate work surface","Full-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL30AML":{"title":"Double-Pedestal Desk, 71\" x 36\", American Mahogany Finish","bullets":["Spacious laminate work surface","Full-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL30ADC":{"title":"Double-Pedestal Desk, 71\" x 36\", American Dark Cherry Finish","bullets":["Spacious laminate work surface","Full-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL30AEL":{"title":"Double-Pedestal Desk, 71\" x 36\", American Espresso Finish","bullets":["Spacious laminate work surface","Full-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL30AGL":{"title":"Double-Pedestal Desk, 71\" x 36\", Artisan Grey Finish","bullets":["Spacious laminate work surface","Full-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL31AWL":{"title":"Double-Pedestal Desk, 71\" x 36\", Autumn Walnut Finish","bullets":["Spacious laminate work surface","Hanging-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL31AML":{"title":"Double-Pedestal Desk, 71\" x 36\", American Mahogany Finish","bullets":["Spacious laminate work surface","Hanging-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL31ADC":{"title":"Double-Pedestal Desk, 71\" x 36\", American Dark Cherry Finish","bullets":["Spacious laminate work surface","Hanging-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL31AEL":{"title":"Double-Pedestal Desk, 71\" x 36\", American Espresso Finish","bullets":["Spacious laminate work surface","Hanging-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL31AGL":{"title":"Double-Pedestal Desk, 71\" x 36\", Artisan Grey Finish","bullets":["Spacious laminate work surface","Hanging-file pedestal storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL32AWL":{"title":"Reversible L-Shaped Desk, 71\" x 78\", Autumn Walnut Finish","bullets":["Reversible left/right configuration","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL32AML":{"title":"Reversible L-Shaped Desk, 71\" x 78\", American Mahogany Finish","bullets":["Reversible left/right configuration","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL32ADC":{"title":"Reversible L-Shaped Desk, 71\" x 78\", American Dark Cherry Finish","bullets":["Reversible left/right configuration","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL32AEL":{"title":"Reversible L-Shaped Desk, 71\" x 78\", American Espresso Finish","bullets":["Reversible left/right configuration","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL32AGL":{"title":"Reversible L-Shaped Desk, 71\" x 78\", Artisan Grey Finish","bullets":["Reversible left/right configuration","Locking full-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL33AWL":{"title":"Laminate Desk, 71\" x 36\", Autumn Walnut Finish","bullets":["Spacious laminate work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL33AML":{"title":"Laminate Desk, 71\" x 36\", American Mahogany Finish","bullets":["Spacious laminate work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL33ADC":{"title":"Laminate Desk, 71\" x 36\", American Dark Cherry Finish","bullets":["Spacious laminate work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL33AEL":{"title":"Laminate Desk, 71\" x 36\", American Espresso Finish","bullets":["Spacious laminate work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"OTGLAYOUTSL33AGL":{"title":"Laminate Desk, 71\" x 36\", Artisan Grey Finish","bullets":["Spacious laminate work surface","Locking hanging-file storage","Premium grade laminate"],"collection":"OTG Laminate","delivery":"5–7 Day Delivery"},"COECOSMO4CB":{"title":"L-Shaped Reception Desk, Cordova Brown Finish","bullets":["Glass transaction counter","L-shaped reception workspace","Cordova Brown laminate finish"],"collection":"Cosmo","delivery":"3–5 Day Delivery"},"COECOSMO4SG":{"title":"L-Shaped Reception Desk, Steely Gray Finish","bullets":["Glass transaction counter","L-shaped reception workspace","Steely Gray laminate finish"],"collection":"Cosmo","delivery":"3–5 Day Delivery"},"COEIDD3072DB":{"title":"Industrial Desk, 72\"W x 30\"D, Distressed Brown Finish","bullets":["Industrial-style metal corners","Spacious rectangular work surface","Distressed Brown finish"],"collection":"Epitome","delivery":"3–5 Day Delivery"},"COEIDD3060DB":{"title":"Industrial Desk, 60\"W x 30\"D, Distressed Brown Finish","bullets":["Industrial-style metal corners","Rectangular laminate work surface","Distressed Brown finish"],"collection":"Epitome","delivery":"3–5 Day Delivery"},"COEMNM680NA":{"title":"Executive Desk, 66\"W, Natural Wood-Look Finish","bullets":["66\" wide executive workspace","Natural wood-look laminate finish","Coordinates with Artisan Collection"],"collection":"Artisan","delivery":"3–5 Day Delivery"},"COEMNC680CT":{"title":"Executive Desk, 66\"W, Cement Finish","bullets":["66\" wide executive workspace","Stone-inspired laminate finish","Coordinates with Artisan Collection"],"collection":"Artisan","delivery":"3–5 Day Delivery"},"COEMNC689CT":{"title":"Kneespace Credenza, 66\"W, Cement Finish","bullets":["66\" wide credenza workspace","Stone-inspired laminate finish","Coordinates with Artisan Collection"],"collection":"Artisan","delivery":"3–5 Day Delivery"},"COEMNM689NA":{"title":"Kneespace Credenza, 66\"W, Natural Wood-Look Finish","bullets":["66\" wide credenza workspace","Natural wood-look laminate finish","Coordinates with Artisan Collection"],"collection":"Artisan","delivery":"3–5 Day Delivery"},"COEFL689RE":{"title":"Kneespace Credenza, 68\"W x 24\"D, Espresso Finish","bullets":["Built-in wire-management grommets","68\" wide kneespace workspace","Coordinates with Markle Collection"],"collection":"Markle","delivery":"3–5 Day Delivery"},"N9NRISLD1000CG":{"title":"L-Shaped Desk, 60\" x 66\", Coastal Gray Finish","bullets":["L-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISLD1000ES":{"title":"L-Shaped Desk, 60\" x 66\", Espresso Finish","bullets":["L-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISLD1000MW":{"title":"L-Shaped Desk, 60\" x 66\", Modern Walnut Finish","bullets":["L-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISLD1000SB":{"title":"L-Shaped Desk, 60\" x 66\", Silver Birch Finish","bullets":["L-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISLD1000AS":{"title":"L-Shaped Desk, 60\" x 66\", Aspen Finish","bullets":["L-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISLD1000NG":{"title":"L-Shaped Desk, 60\" x 66\", Newport Gray Finish","bullets":["L-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISLD1000CH":{"title":"L-Shaped Desk, 60\" x 66\", Cherry Finish","bullets":["L-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISSD1000CH":{"title":"Double-Pedestal Desk, 60\" x 24\", Cherry Finish","bullets":["Laminate desk work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISSD1000NG":{"title":"Double-Pedestal Desk, 60\" x 24\", Newport Gray Finish","bullets":["Laminate desk work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISSD1000AS":{"title":"Double-Pedestal Desk, 60\" x 24\", Aspen Finish","bullets":["Laminate desk work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISSD1000SB":{"title":"Double-Pedestal Desk, 60\" x 24\", Silver Birch Finish","bullets":["Laminate desk work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISSD1000MW":{"title":"Double-Pedestal Desk, 60\" x 24\", Modern Walnut Finish","bullets":["Laminate desk work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISSD1000ES":{"title":"Double-Pedestal Desk, 60\" x 24\", Espresso Finish","bullets":["Laminate desk work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISSD1000CG":{"title":"Double-Pedestal Desk, 60\" x 24\", Coastal Gray Finish","bullets":["Laminate desk work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISUD1003CH":{"title":"U-Shaped Desk, 60\" x 102\", Cherry Finish","bullets":["U-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISUD1003NG":{"title":"U-Shaped Desk, 60\" x 102\", Newport Gray Finish","bullets":["U-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISUD1003AS":{"title":"U-Shaped Desk, 60\" x 102\", Aspen Finish","bullets":["U-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISUD1003SB":{"title":"U-Shaped Desk, 60\" x 102\", Silver Birch Finish","bullets":["U-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISUD1003MW":{"title":"U-Shaped Desk, 60\" x 102\", Modern Walnut Finish","bullets":["U-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISUD1003ES":{"title":"U-Shaped Desk, 60\" x 102\", Espresso Finish","bullets":["U-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NRISUD1003CG":{"title":"U-Shaped Desk, 60\" x 102\", Coastal Gray Finish","bullets":["U-shaped laminate work surface","White base with laminate top","Black metal modesty panels"],"collection":"Riser Series","delivery":"3–5 Day Delivery"},"N9NCLALD1056AP":{"title":"L-Shaped Reception Desk, Aspen Finish","bullets":["White deluxe transaction top","73\" x 72\" reception footprint","L-shaped laminate workspace"],"collection":"N9N Series","delivery":"3–5 Day Delivery"},"N9NCLALD1056ES":{"title":"L-Shaped Reception Desk, Espresso Finish","bullets":["White deluxe transaction top","73\" x 72\" reception footprint","L-shaped laminate workspace"],"collection":"N9N Series","delivery":"3–5 Day Delivery"},"N9NCLALD1056MW":{"title":"L-Shaped Reception Desk, Modern Walnut Finish","bullets":["White deluxe transaction top","73\" x 72\" reception footprint","L-shaped laminate workspace"],"collection":"N9N Series","delivery":"3–5 Day Delivery"},"N9NCLALD1056NPG":{"title":"L-Shaped Reception Desk, Newport Gray Finish","bullets":["White deluxe transaction top","73\" x 72\" reception footprint","L-shaped laminate workspace"],"collection":"N9N Series","delivery":"3–5 Day Delivery"},"N9NCLALD1056SLB":{"title":"L-Shaped Reception Desk, Silver Birch Finish","bullets":["White deluxe transaction top","73\" x 72\" reception footprint","L-shaped laminate workspace"],"collection":"N9N Series","delivery":"3–5 Day Delivery"},"FLANANNJHDJ":{"title":"Computer Desk, 41.25\"W x 19.25\"D, Rustic Coffee Finish","bullets":["Rustic coffee wood-grain finish","Durable metal frame","Compact computer workspace"],"collection":"Northbrook","delivery":"7–10 Day Delivery"}}; const FINISHES={AWL:"Autumn Walnut",AML:"American Mahogany",ADC:"American Dark Cherry",AEL:"American Espresso",AGL:"Artisan Grey"}; const FAMILIES={ SL13:{titles:f=>[`Frosted Glass Reception Desk, ${f} Finish`,`Glass Reception Desk, ${f} Finish`],bullets:["Reversible left/right layout","Durable laminate surfaces","Coordinating reception storage"]}, SL14:{titles:f=>[`U-Shaped Reversible Desk, 66\" x 96\", ${f} Finish`,`U-Shaped Reversible Desk, ${f} Finish`],bullets:["Reversible U-shaped configuration","Locking hanging-file storage","Premium grade laminate"]}, SL15:{titles:f=>[`U-Shaped Desk & Hutch, 71\" x 102\", ${f} Finish`,`U-Shaped Desk & Hutch, ${f} Finish`],bullets:["Reversible U-shaped configuration","Matching storage hutch","Locking full-file storage"]}, SL16:{titles:f=>[`U-Shaped Bowfront, 71\" x 106\", ${f} Finish`,`U-Shaped Bowfront, ${f} Finish`],bullets:["Bowfront extension workspace","Locking full-file storage","Premium grade laminate"]}, SL17:{titles:f=>[`U-Shaped Bowfront & Hutch, 71\" x 106\", ${f} Finish`,`Bowfront & Hutch, 71\" x 106\", ${f} Finish`],bullets:["Bowfront extension workspace","Matching storage hutch","Premium grade laminate"]}, SL18:{titles:f=>[`U-Shaped Peninsula Desk, 71\" x 102\", ${f} Finish`,`U-Shaped Peninsula Desk, ${f} Finish`],bullets:["Peninsula-style work surface","Locking hanging-file storage","Premium grade laminate"]} }; const extraSKUs=[]; for(const family of ["SL13","SL14","SL15","SL16","SL17","SL18"]){ const codes=family==="SL13"?["ADC","AEL","AGL"]:family==="SL18"?["AWL"]:Object.keys(FINISHES); for(const code of codes){ const sku=`OTGLAYOUT${family}${code}`; if(RECORDS[sku]) continue; extraSKUs.push(sku); const f=FINISHES[code],cfg=FAMILIES[family]; RECORDS[sku]={titles:cfg.titles(f),bullets:cfg.bullets,collection:"OTG Laminate",delivery:"5–7 Day Delivery"}; } } const expected=Object.keys(RECORDS).length; if(expected!==124 || extraSKUs.length!==24){console.error("[V163] Unexpected inventory",expected,extraSKUs.length);return;} document.getElementById(STYLE_ID)?.remove(); const style=document.createElement("style");style.id=STYLE_ID; style.textContent=` .tileparent.product[data-eqs-v163="1"] .product-name {display:none!important} .tileparent.product[data-eqs-v163="1"] .eqs-v163-title {display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;font-family:Arial,sans-serif!important;font-size:14px!important;font-weight:700!important;line-height:19px!important;min-height:38px!important;margin:0!important;padding:0!important} .tileparent.product[data-eqs-v163="1"] .eqs-p13e-features {display:flex!important;flex-direction:column!important;gap:0!important} .tileparent.product[data-eqs-v163="1"] .eqs-v163-feature {display:flex!important;align-items:flex-start!important;gap:7px!important;margin:0!important;padding:0!important;list-style:none!important;font-family:Arial,sans-serif!important;font-size:13px!important;line-height:16px!important} .tileparent.product[data-eqs-v163="1"] .eqs-v163-feature::before,.tileparent.product[data-eqs-v163="1"] .eqs-v163-feature::marker {content:none!important} .tileparent.product[data-eqs-v163="1"] .eqs-v163-dot {flex:0 0 10px!important;color:#438346!important} .tileparent.product[data-eqs-v163="1"] .eqs-v163-copy {flex:1 1 auto!important;min-width:0!important} .tileparent.product[data-sku^="N9N"] .eqs-p542-brandrow img {transform:scale(.90)!important;transform-origin:left center!important} .tileparent.product[data-eqs-v163-flash="1"] .eqs-p542-brandrow img {width:116px!important;max-width:116px!important;height:22px!important;max-height:22px!important;object-fit:contain!important;object-position:left center!important;flex-shrink:0!important;margin:0!important;padding:0!important} `; document.head.appendChild(style); const originals=new Map();let runs=0,stopped=false,pending=false; function match(card){return RECORDS[(card.dataset.sku||"").toUpperCase()]||null;} function fitTitle(el,rec){ if(rec.title)return rec.title; const css=getComputedStyle(el),font=`${css.fontWeight} ${css.fontSize} ${css.fontFamily}`; const canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");ctx.font=font; const width=el.getBoundingClientRect().width; function lines(t){if(!width)return Infinity;let count=1,s="";for(const w of t.split(/\s+/)){const n=s?s+" "+w:w;if(s&&ctx.measureText(n).width>width){count++;s=w;}else s=n;}return count;} return rec.titles.find(t=>lines(t)<=2)||rec.titles.at(-1); } function updateBadge(badge,text){ if(!badge||!text)return; const ref=document.querySelector('[data-sku^="COESGLHDOS121"] .eqs-p542-delivery'); if(ref)badge.className=ref.className; badge.classList.remove("unverified"); const walker=document.createTreeWalker(badge,NodeFilter.SHOW_TEXT);let node; while((node=walker.nextNode())){ if(node.parentElement?.closest("svg"))continue; if(/delivery|day/i.test(node.textContent)){node.textContent=text;return;} } const span=document.createElement("span");span.textContent=text;badge.append(span); } function collection(meta,value){ if(!meta||!value)return; const rows=[...meta.children].filter(e=>/^Collection:/i.test(e.textContent.trim())); let row=rows.find(e=>!e.classList.contains("eqs-v163-collection"))||rows[0]; if(!row){row=document.createElement("div");row.className="eqs-v163-collection";const category=[...meta.children].find(e=>/^Category:/i.test(e.textContent.trim()));category?category.after(row):meta.prepend(row);} // Keep the existing native row and its formatting if already correct. if(row.textContent.trim()!==`Collection: ${value}`){row.replaceChildren();const strong=document.createElement("strong");strong.textContent="Collection:";row.append(strong,document.createTextNode(" "+value));} for(const duplicate of rows){if(duplicate!==row)duplicate.remove();} } function applyCard(card){ const sku=(card.dataset.sku||"").toUpperCase(),rec=match(card); if(!rec)return false; const brand=card.querySelector(".eqs-p542-brandrow"),native=card.querySelector(".product-name"),features=card.querySelector(".eqs-p13e-features"),meta=card.querySelector(".eqs-p13e-meta"),badge=card.querySelector(".eqs-p542-delivery"); if(!brand||!native||!features||!meta)return false; if(!originals.has(card)) originals.set(card,{features:features.innerHTML,meta:meta.innerHTML,badgeHTML:badge?.innerHTML,badgeClass:badge?.className,logo:brand.querySelector("img")?.getAttribute("src"),logoAlt:brand.querySelector("img")?.getAttribute("alt"),logoSrcset:brand.querySelector("img")?.getAttribute("srcset")}); card.dataset.eqsV163="1"; let title=card.querySelector(".eqs-v163-title");if(!title){title=document.createElement("div");title.className="eqs-v163-title";} if(brand.nextElementSibling!==title)brand.after(title); const text=fitTitle(title,rec);if(title.textContent!==text)title.textContent=text; const current=[...features.querySelectorAll(".eqs-v163-feature")]; if(current.length!==3||current.some((el,i)=>el.querySelector(".eqs-v163-copy")?.textContent!==rec.bullets[i])){ features.replaceChildren();for(const bullet of rec.bullets){const item=document.createElement("div");item.className="eqs-p13e-feature eqs-v163-feature";const dot=document.createElement("span");dot.className="eqs-v163-dot";dot.textContent="•";const copy=document.createElement("span");copy.className="eqs-v163-copy";copy.textContent=bullet;item.append(dot,copy);features.append(item);} } collection(meta,rec.collection); if(rec.delivery && rec.delivery!=="Delivery to verify")updateBadge(badge,rec.delivery); if(sku.startsWith("FLA")){ const logo=brand.querySelector("img");if(logo){card.dataset.eqsV163Flash="1";if(logo.getAttribute("src")!==LOGO_URL){logo.removeAttribute("srcset");logo.src=LOGO_URL;}logo.alt="Flash Furniture";} updateBadge(badge,"7–10 Day Delivery"); } return true; } function apply(){if(stopped)return null;let matched=0;document.querySelectorAll(".tileparent.product[data-sku]").forEach(card=>{if(applyCard(card))matched++;});runs++;return{version:VERSION,runs,matched,expected};} function schedule(){if(stopped||pending)return;pending=true;requestAnimationFrame(()=>{pending=false;apply();});} const observer=new MutationObserver(ms=>{if(ms.some(m=>[...m.addedNodes].some(n=>n.nodeType===1&&(n.matches?.(".tileparent.product[data-sku]")||n.querySelector?.(".tileparent.product[data-sku]")))))schedule();}); observer.observe(document.body,{childList:true,subtree:true}); function status(){const rows=[...document.querySelectorAll(".tileparent.product[data-sku]")].filter(c=>match(c)).map(c=>{const rec=match(c),title=c.querySelector(".eqs-v163-title"),bullets=[...c.querySelectorAll(".eqs-v163-copy")].map(x=>x.textContent),meta=c.querySelector(".eqs-p13e-meta"),badge=c.querySelector(".eqs-p542-delivery");return{sku:c.dataset.sku,title:!!title&&title.textContent===(rec.title||fitTitle(title,rec)),bullets:bullets.length===3&&bullets.every((x,i)=>x===rec.bullets[i]),collection:(meta?.textContent.match(/Collection:/gi)||[]).length===1,delivery:!rec.delivery||rec.delivery==="Delivery to verify"||badge?.textContent.includes(rec.delivery),price:!!c.querySelector(".eqs-r2-pricebar,.price-label.has-price"),cart:!!c.querySelector(".btn-add-to-cart")};});const failures=rows.filter(r=>!r.title||!r.bullets||!r.collection||!r.delivery||!r.price||!r.cart);const summary={version:VERSION,expected,rendered:rows.length,passed:rows.length-failures.length,failed:failures.length,runs};console.log("[P13 V1.6.3]",summary);console.table(failures);return summary;} function stop(){stopped=true;observer.disconnect();style.remove();for(const [card,o] of originals){const f=card.querySelector(".eqs-p13e-features"),m=card.querySelector(".eqs-p13e-meta"),b=card.querySelector(".eqs-p542-delivery"),logo=card.querySelector(".eqs-p542-brandrow img");if(f)f.innerHTML=o.features;if(m)m.innerHTML=o.meta;if(b&&o.badgeHTML!=null){b.innerHTML=o.badgeHTML;b.className=o.badgeClass;}if(logo){if(o.logo==null)logo.removeAttribute("src");else logo.setAttribute("src",o.logo);if(o.logoSrcset==null)logo.removeAttribute("srcset");else logo.setAttribute("srcset",o.logoSrcset);if(o.logoAlt==null)logo.removeAttribute("alt");else logo.setAttribute("alt",o.logoAlt);}card.querySelector(".eqs-v163-title")?.remove();card.removeAttribute("data-eqs-v163");card.removeAttribute("data-eqs-v163-flash");}originals.clear();} window.EQS_EDITORIAL_V163_ADDON={version:VERSION,apply,status,stop}; console.log("[P13 V1.6.3 ADDON] Loaded",apply());status(); })(); /* V1.6.4 approved Page 11 editorial, collections, delivery, pricing and logo alignment. */ (() => { "use strict"; const VERSION="P13_EDITORIAL_V1_6_4_R6_ADDON"; const STYLE_ID="eqs-v164-consolidated-style"; const FLASH_LOGO="https://us.evocdn.io/dealer/1516/content/media/FLASH LOGO.png"; const RECORDS={"FLANANCDGGJ":{"title":"83.5\" L-Shaped Computer & Gaming Desk","bullets":["Spacious corner work surface","Space-saving L-shaped design","Home office or gaming setup"],"delivery":"7–10 Day Delivery","list":600,"collection":"Flash Contemporary"},"FLANANWK055J":{"title":"47.25\" Glass-Top Computer Desk with Pedestal","bullets":["Sleek glass work surface","Integrated pedestal storage","Sturdy metal support frame"],"delivery":"7–10 Day Delivery","list":650,"collection":"Flash Contemporary"},"FLANANJN2824SLJ":{"title":"Black Glass L-Shaped Desk with Keyboard Tray","bullets":["Black glass work surfaces","Space-saving corner configuration","Pull-out keyboard tray"],"delivery":"7–10 Day Delivery","list":800,"collection":"Flash Contemporary"},"FLANANWK004":{"title":"47.25\" Computer Desk with Keyboard Tray","bullets":["Durable black laminate surface","Convenient pull-out keyboard tray","Cross-brace metal support frame"],"delivery":"7–10 Day Delivery","list":750,"collection":"Flash Contemporary"},"COECOSMO6SG":{"title":"Reception Desk with ADA Return, Steely Gray Finish","bullets":["Floating tempered-glass counter","Reversible ADA-accessible return","Durable, easy-clean work surfaces"],"delivery":"3–5 Day Delivery","list":null,"collection":"Cosmo"},"COECOSMO6CB":{"title":"Reception Desk with ADA Return, Cordova Brown Finish","bullets":["Floating tempered-glass counter","Reversible ADA-accessible return","Durable, easy-clean work surfaces"],"delivery":"3–5 Day Delivery","list":null,"collection":"Cosmo"},"N9NPL245CG":{"title":"47.25\" Flex Storage Credenza, Coastal Gray Finish","bullets":["Reversible drawer and cabinet layout","Sliding doors for convenient access","Locking drawers for secure storage"],"delivery":"3–5 Day Delivery","list":null,"collection":"Flex Storage"},"N9NPL245APN":{"title":"47.25\" Flex Storage Credenza, Aspen Finish","bullets":["Reversible drawer and cabinet layout","Sliding doors for convenient access","Locking drawers for secure storage"],"delivery":"3–5 Day Delivery","list":null,"collection":"Flex Storage"},"N9NPL245ESP":{"title":"47.25\" Flex Storage Credenza, Espresso Finish","bullets":["Reversible drawer and cabinet layout","Sliding doors for convenient access","Locking drawers for secure storage"],"delivery":"3–5 Day Delivery","list":null,"collection":"Flex Storage"}}; const COLLECTIONS={"FLANANCDGGJ":"Flash Contemporary","FLANANJN2824SLJ":"Flash Contemporary","FLANANNJHDJ":"Northbrook","FLANANWK004":"Flash Contemporary","FLANANWK055J":"Flash Contemporary","N9NCLALD1056AP":"Classic Reception","N9NCLALD1056ES":"Classic Reception","N9NCLALD1056MW":"Classic Reception","N9NCLALD1056NPG":"Classic Reception","N9NCLALD1056SLB":"Classic Reception","N9NPL245APN":"Flex Storage","N9NPL245CG":"Flex Storage","N9NPL245ESP":"Flex Storage","N9NRISLD1000AS":"Riser Series","N9NRISLD1000CG":"Riser Series","N9NRISLD1000CH":"Riser Series","N9NRISLD1000ES":"Riser Series","N9NRISLD1000MW":"Riser Series","N9NRISLD1000NG":"Riser Series","N9NRISLD1000SB":"Riser Series","N9NRISSD1000AS":"Riser Series","N9NRISSD1000CG":"Riser Series","N9NRISSD1000CH":"Riser Series","N9NRISSD1000ES":"Riser Series","N9NRISSD1000MW":"Riser Series","N9NRISSD1000NG":"Riser Series","N9NRISSD1000SB":"Riser Series","N9NRISUD1003AS":"Riser Series","N9NRISUD1003CG":"Riser Series","N9NRISUD1003CH":"Riser Series","N9NRISUD1003ES":"Riser Series","N9NRISUD1003MW":"Riser Series","N9NRISUD1003NG":"Riser Series","N9NRISUD1003SB":"Riser Series","COECOSMO4CB":"Cosmo","COECOSMO4SG":"Cosmo","COECOSMO6CB":"Cosmo","COECOSMO6SG":"Cosmo","COEEV6030LGG":"Palisades","COEEVRC1LGG":"Palisades","COEFL689RE":"Markle","COEIDD3060DB":"Epitome","COEIDD3072DB":"Epitome","COEMARKLE68W":"Markle","COEMNC680CT":"Artisan","COEMNC689CT":"Artisan","COEMNM680NA":"Artisan","COEMNM689NA":"Artisan","COEOS169NTTAE":"OS Laminate","COEOS169NTTAR":"OS Laminate","COEOS169NTTCG":"OS Laminate","COEOS169NTTCH":"OS Laminate","COEOS169NTTES":"OS Laminate","COEOS169NTTJV":"OS Laminate","COEOS169NTTMA":"OS Laminate","COEOS169NTTMH":"OS Laminate","COEOS169NTTMW":"OS Laminate","COEOS169NTTWH":"OS Laminate","COEOS169TTAE":"OS Laminate","COEOS169TTAR":"OS Laminate","COEOS169TTCG":"OS Laminate","COEOS169TTCH":"OS Laminate","COEOS169TTES":"OS Laminate","COEOS169TTGLASSWH":"OS Laminate","COEOS169TTJV":"OS Laminate","COEOS169TTMA":"OS Laminate","COEOS169TTMH":"OS Laminate","COEOS169TTMW":"OS Laminate","COEOS169TTWH":"OS Laminate","COEOSTHAT5172AEETC":"StandUp","COEOSTHAT5172CGETC":"StandUp","COEOSTHAT5172JVETC":"StandUp","COEOSTHAT5172MAETC":"StandUp","COEOSTHAT5172MHETC":"StandUp","COEOSTHAT5172MWETC":"StandUp","COEOSTHAT5172WHETC":"StandUp","COESGLHDOS121AE":"OS Laminate","COESGLHDOS121AR":"OS Laminate","COESGLHDOS121CG":"OS Laminate","COESGLHDOS121CH":"OS Laminate","COESGLHDOS121ES":"OS Laminate","COESGLHDOS121JV":"OS Laminate","COESGLHDOS121MA":"OS Laminate","COESGLHDOS121MH":"OS Laminate","COESGLHDOS121MW":"OS Laminate","COESGLHDOS121WH":"OS Laminate","OTGLAYOUTSL13ADC":"OTG Laminate","OTGLAYOUTSL13AEL":"OTG Laminate","OTGLAYOUTSL13AGL":"OTG Laminate","OTGLAYOUTSL13AML":"OTG Laminate","OTGLAYOUTSL13AWL":"OTG Laminate","OTGLAYOUTSL14ADC":"OTG Laminate","OTGLAYOUTSL14AEL":"OTG Laminate","OTGLAYOUTSL14AGL":"OTG Laminate","OTGLAYOUTSL14AML":"OTG Laminate","OTGLAYOUTSL14AWL":"OTG Laminate","OTGLAYOUTSL15ADC":"OTG Laminate","OTGLAYOUTSL15AEL":"OTG Laminate","OTGLAYOUTSL15AGL":"OTG Laminate","OTGLAYOUTSL15AML":"OTG Laminate","OTGLAYOUTSL15AWL":"OTG Laminate","OTGLAYOUTSL16ADC":"OTG Laminate","OTGLAYOUTSL16AEL":"OTG Laminate","OTGLAYOUTSL16AGL":"OTG Laminate","OTGLAYOUTSL16AML":"OTG Laminate","OTGLAYOUTSL16AWL":"OTG Laminate","OTGLAYOUTSL17ADC":"OTG Laminate","OTGLAYOUTSL17AEL":"OTG Laminate","OTGLAYOUTSL17AGL":"OTG Laminate","OTGLAYOUTSL17AML":"OTG Laminate","OTGLAYOUTSL17AWL":"OTG Laminate","OTGLAYOUTSL18ADC":"OTG Laminate","OTGLAYOUTSL18AEL":"OTG Laminate","OTGLAYOUTSL18AGL":"OTG Laminate","OTGLAYOUTSL18AML":"OTG Laminate","OTGLAYOUTSL18AWL":"OTG Laminate","OTGLAYOUTSL19ADC":"OTG Laminate","OTGLAYOUTSL19AEL":"OTG Laminate","OTGLAYOUTSL19AGL":"OTG Laminate","OTGLAYOUTSL19AML":"OTG Laminate","OTGLAYOUTSL19AWL":"OTG Laminate","OTGLAYOUTSL1ADC":"OTG Laminate","OTGLAYOUTSL1AEL":"OTG Laminate","OTGLAYOUTSL1AGL":"OTG Laminate","OTGLAYOUTSL1AML":"OTG Laminate","OTGLAYOUTSL1AWL":"OTG Laminate","OTGLAYOUTSL22ADC":"OTG Laminate","OTGLAYOUTSL22AEL":"OTG Laminate","OTGLAYOUTSL22AGL":"OTG Laminate","OTGLAYOUTSL22AML":"OTG Laminate","OTGLAYOUTSL22AWL":"OTG Laminate","OTGLAYOUTSL23ADC":"OTG Laminate","OTGLAYOUTSL23AEL":"OTG Laminate","OTGLAYOUTSL23AGL":"OTG Laminate","OTGLAYOUTSL23AML":"OTG Laminate","OTGLAYOUTSL23AWL":"OTG Laminate","OTGLAYOUTSL24ADC":"OTG Laminate","OTGLAYOUTSL24AEL":"OTG Laminate","OTGLAYOUTSL24AGL":"OTG Laminate","OTGLAYOUTSL24AML":"OTG Laminate","OTGLAYOUTSL24AWL":"OTG Laminate","OTGLAYOUTSL25ADC":"OTG Laminate","OTGLAYOUTSL25AEL":"OTG Laminate","OTGLAYOUTSL25AGL":"OTG Laminate","OTGLAYOUTSL25AML":"OTG Laminate","OTGLAYOUTSL25AWL":"OTG Laminate","OTGLAYOUTSL26ADC":"OTG Laminate","OTGLAYOUTSL26AEL":"OTG Laminate","OTGLAYOUTSL26AGL":"OTG Laminate","OTGLAYOUTSL26AML":"OTG Laminate","OTGLAYOUTSL26AWL":"OTG Laminate","OTGLAYOUTSL27ADC":"OTG Laminate","OTGLAYOUTSL27AEL":"OTG Laminate","OTGLAYOUTSL27AGL":"OTG Laminate","OTGLAYOUTSL27AML":"OTG Laminate","OTGLAYOUTSL27AWL":"OTG Laminate","OTGLAYOUTSL28ADC":"OTG Laminate","OTGLAYOUTSL28AEL":"OTG Laminate","OTGLAYOUTSL28AGL":"OTG Laminate","OTGLAYOUTSL28AML":"OTG Laminate","OTGLAYOUTSL28AWL":"OTG Laminate","OTGLAYOUTSL2ADC":"OTG Laminate","OTGLAYOUTSL2AEL":"OTG Laminate","OTGLAYOUTSL2AGL":"OTG Laminate","OTGLAYOUTSL2AML":"OTG Laminate","OTGLAYOUTSL2AWL":"OTG Laminate","OTGLAYOUTSL30ADC":"OTG Laminate","OTGLAYOUTSL30AEL":"OTG Laminate","OTGLAYOUTSL30AGL":"OTG Laminate","OTGLAYOUTSL30AML":"OTG Laminate","OTGLAYOUTSL30AWL":"OTG Laminate","OTGLAYOUTSL31ADC":"OTG Laminate","OTGLAYOUTSL31AEL":"OTG Laminate","OTGLAYOUTSL31AGL":"OTG Laminate","OTGLAYOUTSL31AML":"OTG Laminate","OTGLAYOUTSL31AWL":"OTG Laminate","OTGLAYOUTSL32ADC":"OTG Laminate","OTGLAYOUTSL32AEL":"OTG Laminate","OTGLAYOUTSL32AGL":"OTG Laminate","OTGLAYOUTSL32AML":"OTG Laminate","OTGLAYOUTSL32AWL":"OTG Laminate","OTGLAYOUTSL33ADC":"OTG Laminate","OTGLAYOUTSL33AEL":"OTG Laminate","OTGLAYOUTSL33AGL":"OTG Laminate","OTGLAYOUTSL33AML":"OTG Laminate","OTGLAYOUTSL33AWL":"OTG Laminate"}; if(!location.pathname.includes("1366566-Desks")){console.warn("[V164] Desks test page only");return;} window.EQS_EDITORIAL_V164_ADDON?.stop?.(); // Retire only temporary preview scripts, never the protected V1.6.3 or P13 scripts. for(const name of ["EQS_PAGE11_V2","EQS_V164_PAGE11_V2","EQS_V164_PAGE11","EQS_FLASH_V3","EQS_V164_BRANDING"]){ try{window[name]?.stop?.();}catch(e){console.warn("[V164] Temporary cleanup",name,e);} } for(const id of ["eqs-flash-alignment-v6","eqs-flash-alignment-clean-v5","eqs-flash-delivery-alignment-v4","eqs-v164-final-layout","eqs-flash-logo-size-v2","eqs-flash-v164-v3","eqs-v164-page11-price-collection-style","eqs-page11-v2-recovery-css","eqs-v164-page11-v2-style"]){document.getElementById(id)?.remove();} document.getElementById(STYLE_ID)?.remove(); const css=document.createElement("style");css.id=STYLE_ID; css.textContent=` .tileparent.product[data-eqs-v164-page11="1"] .product-name{display:none!important} .tileparent.product[data-eqs-v164-page11="1"] .eqs-v164-title{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;font:700 14px/19px Arial,sans-serif!important;min-height:38px!important;margin:0!important;padding:0!important} .tileparent.product[data-eqs-v164-page11="1"] .eqs-p13e-features{display:flex!important;flex-direction:column!important;gap:0!important} .tileparent.product[data-eqs-v164-page11="1"] .eqs-v164-feature{display:flex!important;align-items:flex-start!important;gap:7px!important;margin:0!important;padding:0!important;list-style:none!important;font:400 11.5px/16px Arial,sans-serif!important} .tileparent.product[data-eqs-v164-page11="1"] .eqs-v164-feature::before{content:none!important} .tileparent.product[data-eqs-v164-page11="1"] .eqs-v164-dot{flex:0 0 10px!important;color:#438346!important} .tileparent.product[data-eqs-v164-page11="1"] .eqs-v164-copy{min-width:0!important;flex:1 1 auto!important} body .tileparent.product[data-sku^="FLA"] .eqs-p542-brandrow{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important} body .tileparent.product[data-sku^="FLA"] .eqs-p542-brandrow img{width:96px!important;min-width:96px!important;max-width:96px!important;height:22px!important;max-height:22px!important;object-fit:contain!important;object-position:left center!important;flex:0 0 96px!important;margin:0!important;padding:0!important} body .tileparent.product[data-sku^="FLA"] .eqs-p542-delivery{margin:0!important;flex:0 0 auto!important;white-space:nowrap!important} .tileparent.product[data-eqs-v164-flash="1"] .footer-wrapper-price.eqs-v164-native-hidden{display:none!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:6px!important;width:100%!important;margin:0 0 9px!important;padding:0!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar .eqs-r2-left{min-width:0!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar .eqs-r2-list{font-size:11px!important;color:#64748b!important;white-space:nowrap!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar .eqs-r2-display{font-size:27px!important;font-weight:800!important;line-height:31px!important;color:#238445!important;white-space:nowrap!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar .eqs-r2-cents{font-size:13px!important;vertical-align:super!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar .eqs-r2-savings{text-align:right!important;white-space:nowrap!important;color:#64748b!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar .eqs-r2-label{font-size:10px!important} .tileparent.product[data-eqs-v164-flash="1"] .eqs-v164-pricebar .eqs-r2-percent{font-size:13px!important} /* R6: approved visible-price adjustment for all four applicable Flash cards. Do not move buttons or native prices. */ .tileparent.product[data-sku="FLANANCDGGJ"] .eqs-v164-pricebar, .tileparent.product[data-sku="FLANANWK055J"] .eqs-v164-pricebar, .tileparent.product[data-sku="FLANANJN2824SLJ"] .eqs-v164-pricebar, .tileparent.product[data-sku="FLANANNJHDJ"] .eqs-v164-pricebar{transform:translateY(10px)!important} `; document.head.append(css); const originals=new Map();let runs=0,stopped=false,pending=false; const getCard=sku=>document.querySelector(`.tileparent.product[data-sku="${sku}"]`); const countCollections=meta=>(meta?.textContent.match(/Collection:/gi)||[]).length; function setCollection(meta,value){ if(!meta)return; const rows=[...meta.children].filter(x=>/^Collection:/i.test(x.textContent.trim())); if(!value){return;} let row=rows.find(x=>!x.classList.contains("eqs-v164-collection"))||rows[0]; if(!row){row=document.createElement("div");row.className="eqs-v164-collection";const category=[...meta.children].find(x=>/^Category:/i.test(x.textContent.trim()));category?category.after(row):meta.prepend(row);} if(row.textContent.trim()!==`Collection: ${value}`){row.replaceChildren();const label=document.createElement("strong");label.textContent="Collection:";row.append(label,document.createTextNode(" "+value));} rows.forEach(x=>{if(x!==row)x.remove();}); } function badgeText(badge,text){ if(!badge)return; const ref=[...document.querySelectorAll(".eqs-p542-delivery")].find(x=>x!==badge&&x.querySelector("svg")&&!x.classList.contains("unverified")&&/3.5 Day Delivery|5.7 Day Delivery/.test(x.textContent)); if(ref)badge.className=ref.className; badge.classList.remove("unverified"); const walker=document.createTreeWalker(badge,NodeFilter.SHOW_TEXT);let n; while((n=walker.nextNode())){if(n.parentElement?.closest("svg"))continue;if(/delivery|day/i.test(n.textContent)){if(n.textContent!==text)n.textContent=text;return;}} const span=document.createElement("span");span.textContent=text;badge.append(span); } function ensureOverlay(card,rec){ if(!rec.list)return; const price=card.querySelector(".footer-wrapper-price"); const sell=Number(price?.querySelector(".price-label.has-price")?.getAttribute("data-value")||card.dataset.nativePrice); const list=Number(rec.list); if(!Number.isFinite(sell)||sell<=0||!Number.isFinite(list)||list<=sell){console.warn("[V164] Invalid price",card.dataset.sku);return;} const percent=Math.round((1-sell/list)*100); if(percent<36){console.warn("[V164] Below 36% threshold",card.dataset.sku);return;} // If the protected pricing layer already built a standard overlay, correct // only this SKU's list/savings display. Never create a duplicate overlay. const standard=card.querySelector(".eqs-r2-pricebar:not(.eqs-v164-pricebar)"); if(standard){ if(["FLANANWK004","FLANANNJHDJ"].includes(card.dataset.sku)){ const strike=standard.querySelector(".eqs-r2-list s"); const percentNode=standard.querySelector(".eqs-r2-percent"); if(strike&&percentNode){ if(!standard.hasAttribute("data-eqs-v164-original-html")){ standard.setAttribute("data-eqs-v164-original-html",encodeURIComponent(standard.innerHTML)); } strike.textContent=list.toLocaleString("en-US",{style:"currency",currency:"USD"}); percentNode.textContent=percent+"% off list"; standard.dataset.eqsV164List=String(list); } } return; } if(!price)return; price.classList.add("eqs-v164-native-hidden"); let bar=card.querySelector(".eqs-v164-pricebar"); if(!bar){bar=document.createElement("div");bar.className="eqs-v164-pricebar";price.after(bar);} const dollars=Math.floor(sell).toLocaleString("en-US"); const cents=Math.round((sell-Math.floor(sell))*100).toString().padStart(2,"0"); const listStr=list.toLocaleString("en-US",{style:"currency",currency:"USD"}); bar.replaceChildren(); const left=document.createElement("div");left.className="eqs-r2-left"; const listEl=document.createElement("div");listEl.className="eqs-r2-list";listEl.append("List Price: ");const strike=document.createElement("s");strike.textContent=listStr;listEl.append(strike); const sellEl=document.createElement("div");sellEl.className="eqs-r2-display";sellEl.append(document.createTextNode("$"+dollars+"."));const centEl=document.createElement("span");centEl.className="eqs-r2-cents";centEl.textContent=cents;sellEl.append(centEl); left.append(listEl,sellEl); const savings=document.createElement("div");savings.className="eqs-r2-savings"; const label=document.createElement("div");label.className="eqs-r2-label";label.textContent="Your Emerald Savings"; const pct=document.createElement("div");pct.className="eqs-r2-percent";pct.textContent=percent+"% off list";savings.append(label,pct);bar.append(left,savings); bar.dataset.list=String(list);bar.dataset.sell=String(sell); } function applyCard(card){ const sku=(card.dataset.sku||"").toUpperCase(),rec=RECORDS[sku]; const meta=card.querySelector(".eqs-p13e-meta"); if(!rec){if(COLLECTIONS[sku]&&meta){if(!originals.has(card))originals.set(card,{meta:meta.innerHTML});setCollection(meta,COLLECTIONS[sku]);}return false;} const brand=card.querySelector(".eqs-p542-brandrow"),native=card.querySelector(".product-name"),features=card.querySelector(".eqs-p13e-features"),badge=card.querySelector(".eqs-p542-delivery"); if(!brand||!native||!features||!meta||!badge)return false; if(!originals.has(card)){const logo=brand.querySelector("img");originals.set(card,{features:features.innerHTML,meta:meta.innerHTML,badgeHTML:badge.innerHTML,badgeClass:badge.className,logoSrc:logo?.getAttribute("src"),logoSrcset:logo?.getAttribute("srcset"),logoAlt:logo?.getAttribute("alt")});} card.dataset.eqsV164Page11="1"; let title=card.querySelector(".eqs-v164-title");if(!title){title=document.createElement("div");title.className="eqs-v164-title";}if(brand.nextElementSibling!==title)brand.after(title);if(title.textContent!==rec.title)title.textContent=rec.title; const current=[...features.querySelectorAll(".eqs-v164-copy")]; if(current.length!==3||current.some((x,i)=>x.textContent!==rec.bullets[i])){features.replaceChildren();for(const bullet of rec.bullets){const row=document.createElement("div");row.className="eqs-p13e-feature eqs-v164-feature";const dot=document.createElement("span");dot.className="eqs-v164-dot";dot.textContent="•";const copy=document.createElement("span");copy.className="eqs-v164-copy";copy.textContent=bullet;row.append(dot,copy);features.append(row);}} setCollection(meta,rec.collection||COLLECTIONS[sku]);badgeText(badge,rec.delivery); if(sku.startsWith("FLA")){ card.dataset.eqsV164Flash="1";const logo=brand.querySelector("img");if(logo){if(logo.getAttribute("src")!==FLASH_LOGO){logo.removeAttribute("srcset");logo.src=FLASH_LOGO;}logo.alt="Flash Furniture";} ensureOverlay(card,rec); } return true; } function applyGlobalBrand(card){ const sku=(card.dataset.sku||"").toUpperCase(); if(!sku.startsWith("FLA")&&!sku.startsWith("N9N"))return; const brand=card.querySelector(".eqs-p542-brandrow"),badge=card.querySelector(".eqs-p542-delivery"); if(!brand||!badge)return; if(!originals.has(card)){const logo=brand.querySelector("img");originals.set(card,{meta:card.querySelector(".eqs-p13e-meta")?.innerHTML,badgeHTML:badge.innerHTML,badgeClass:badge.className,logoSrc:logo?.getAttribute("src"),logoSrcset:logo?.getAttribute("srcset"),logoAlt:logo?.getAttribute("alt")});} if(sku.startsWith("FLA")){ const logo=brand.querySelector("img");if(logo){if(logo.getAttribute("src")!==FLASH_LOGO){logo.removeAttribute("srcset");logo.src=FLASH_LOGO;}logo.alt="Flash Furniture";} badgeText(badge,"7–10 Day Delivery"); // Fifth Flash desk: source-confirmed manufacturer list $575, native sell $199. // Use the existing price layer if present, otherwise add exactly one V164 bar. if(sku==="FLANANNJHDJ"){ card.dataset.eqsV164Flash="1"; ensureOverlay(card,{list:575}); } }else badgeText(badge,"3–5 Day Delivery"); } function syncApprovedFlashList(){ const map=window.EQS_MANUFACTURER_LIST_PRICES; if(map && typeof map==="object" && map.FLANANWK004!==750){ map.FLANANWK004=750; } } const hiddenEmpty=new Map(); function hideEmptyCards(){ document.querySelectorAll(".tileparent.product").forEach(card=>{ if((card.dataset.sku||"").trim()||card.getAttribute("data-item-name")||card.querySelector(".price-label.has-price,.eqs-r2-pricebar,.btn-add-to-cart"))return; if(!hiddenEmpty.has(card))hiddenEmpty.set(card,card.style.getPropertyValue("display")); card.dataset.eqsEmptyShell="1"; card.style.setProperty("display","none","important"); }); } function apply(){if(stopped)return null;syncApprovedFlashList();let matched=0;document.querySelectorAll(".tileparent.product[data-sku]").forEach(c=>{if(applyCard(c))matched++;applyGlobalBrand(c);});hideEmptyCards();runs++;return{version:VERSION,runs,matched,expected:9,emptyShellsHidden:hiddenEmpty.size};} function status(){const rows=Object.entries(RECORDS).map(([sku,rec])=>{const card=getCard(sku),title=card?.querySelector(".eqs-v164-title"),bullets=[...(card?.querySelectorAll(".eqs-v164-copy")||[])],meta=card?.querySelector(".eqs-p13e-meta"),badge=card?.querySelector(".eqs-p542-delivery"),bar=card?.querySelector(".eqs-v164-pricebar"),price=card?.querySelector(".footer-wrapper-price"),cart=card?.querySelector(".btn-add-to-cart");const p=(bar||card?.querySelector(".eqs-r2-pricebar")||price)?.getBoundingClientRect(),b=cart?.getBoundingClientRect();return{sku,found:!!card,title:!!title&&title.textContent===rec.title,bullets:bullets.length===3&&bullets.every((x,i)=>x.textContent===rec.bullets[i]),collection:!rec.collection||meta?.textContent.includes("Collection: "+rec.collection),duplicates:countCollections(meta)>1,delivery:!!badge?.textContent.includes(rec.delivery),logo:!sku.startsWith("FLA")||card?.querySelector(".eqs-p542-brandrow img")?.getAttribute("src")===FLASH_LOGO,list:!rec.list||!!bar&&Number(bar.dataset.list)===rec.list||!!card?.querySelector(".eqs-r2-pricebar:not(.eqs-v164-pricebar)")&&card.querySelector(".eqs-r2-pricebar:not(.eqs-v164-pricebar) .eqs-r2-list s")?.textContent.trim()===Number(rec.list).toLocaleString("en-US",{style:"currency",currency:"USD"})&&card.querySelector(".eqs-r2-pricebar:not(.eqs-v164-pricebar) .eqs-r2-percent")?.textContent.trim()===Math.round((1-Number(card.querySelector(".price-label.has-price")?.dataset.value)/Number(rec.list))*100)+"% off list",price:!!card?.querySelector(".price-label.has-price"),cart:!!cart,priceToCartGap:p&&b?Math.round(b.top-p.bottom):null};});const present=rows.filter(x=>x.found),fails=present.filter(x=>!x.title||!x.bullets||!x.collection||x.duplicates||!x.delivery||!x.logo||!x.list||!x.price||!x.cart);const summary={version:VERSION,expected:9,present:present.length,passed:present.length-fails.length,failed:fails.length,runs,flashListPrices:[575,600,650,800,750]};console.log("[P13 V1.6.4 PREVIEW]",summary);console.table(fails);console.table(rows.filter(x=>x.sku.startsWith("FLA"))); const fifth=getCard("FLANANNJHDJ"),fifthBar=fifth?.querySelector(".eqs-v164-pricebar, .eqs-r2-pricebar"),fifthList=fifthBar?.querySelector(".eqs-r2-list s")?.textContent.trim(),fifthPct=fifthBar?.querySelector(".eqs-r2-percent")?.textContent.trim(); const fifthAudit={sku:"FLANANNJHDJ",present:!!fifth,barCount:fifth?.querySelectorAll(".eqs-v164-pricebar, .eqs-r2-pricebar").length||0,list:fifthList||"",savings:fifthPct||"",correct:!fifth||!!fifthBar&&fifthList==="$575.00"&&fifthPct==="65% off list",nativeSell:fifth?.querySelector(".price-label.has-price")?.dataset.value||""}; summary.fifthFlash=fifthAudit;console.log("[P13 V1.6.4 R3 FIFTH FLASH]",fifthAudit);return summary;} function stop(){stopped=true;observer.disconnect();css.remove();for(const [card,old] of originals){const f=card.querySelector(".eqs-p13e-features"),m=card.querySelector(".eqs-p13e-meta"),b=card.querySelector(".eqs-p542-delivery"),logo=card.querySelector(".eqs-p542-brandrow img");if(f&&old.features!==undefined)f.innerHTML=old.features;if(m)m.innerHTML=old.meta;if(b&&old.badgeHTML!==undefined){b.innerHTML=old.badgeHTML;b.className=old.badgeClass;}if(logo&&old.logoSrc!==undefined){for(const [attr,value] of [["src",old.logoSrc],["srcset",old.logoSrcset],["alt",old.logoAlt]]){if(value===null)logo.removeAttribute(attr);else logo.setAttribute(attr,value);}}card.querySelector(".eqs-v164-title")?.remove();card.querySelector(".eqs-v164-pricebar")?.remove();const std=card.querySelector(".eqs-r2-pricebar[data-eqs-v164-original-html]");if(std){try{std.innerHTML=decodeURIComponent(std.getAttribute("data-eqs-v164-original-html"));}catch(e){}std.removeAttribute("data-eqs-v164-original-html");delete std.dataset.eqsV164List;}card.querySelector(".footer-wrapper-price")?.classList.remove("eqs-v164-native-hidden");card.removeAttribute("data-eqs-v164-page11");card.removeAttribute("data-eqs-v164-flash");}for(const [card,display] of hiddenEmpty){if(display)card.style.setProperty("display",display);else card.style.removeProperty("display");}document.querySelectorAll("[data-eqs-empty-shell]").forEach(c=>delete c.dataset.eqsEmptyShell);hiddenEmpty.clear();originals.clear();console.log("[V164] Add-on stopped");} function schedule(){if(stopped||pending)return;pending=true;requestAnimationFrame(()=>{pending=false;apply();});} const observer=new MutationObserver(ms=>{ const newCards=ms.some(m=>[...m.addedNodes].some(n=>n.nodeType===1&& (n.matches?.(".tileparent.product")||n.querySelector?.(".tileparent.product")))); const card=getCard("FLANANWK004"); const bar=card?.querySelector(".eqs-r2-pricebar:not(.eqs-v164-pricebar),.eqs-v164-pricebar"); const list=bar?.querySelector(".eqs-r2-list s")?.textContent.trim(); const pct=bar?.querySelector(".eqs-r2-percent")?.textContent.trim(); const priceWrong=!!bar&&(list!=="$750.00"||pct!=="65% off list"); const emptyVisible=[...document.querySelectorAll(".tileparent.product")].some(c=> !c.dataset.sku&&!c.getAttribute("data-item-name")&& !c.querySelector(".price-label.has-price,.eqs-r2-pricebar,.btn-add-to-cart")&& getComputedStyle(c).display!=="none"); if(newCards||priceWrong||emptyVisible)schedule(); }); observer.observe(document.body,{childList:true,subtree:true,characterData:true}); window.EQS_EDITORIAL_V164_ADDON={version:VERSION,apply,status,stop};console.log("[P13 V1.6.4] Preview loaded",apply());status(); })(); /* ============================================================= EMERALD DESKS R8 | SOURCE-GROUNDED EDITORIAL REFINEMENT Test page only. Preserves R7 editorial, pricing, shopping, grid and row spacing. No list-price or sell-price changes. ============================================================= */ (() => { 'use strict'; if (!/^\/category\/1366566-desks(?:\.html)?\/?$/i.test(location.pathname)) return; if (window.EQS_DESKS_R8?.active) return; const VERSION = 'EQS_DESKS_R8_EDITORIAL_REFINEMENT'; const STYLE_ID = 'eqs-desks-r8-feature-typography'; const edits = new Map(); const COSMO = { COECOSMO4CB: [ 'Glass counter welcomes visitors', 'L-shaped layout adds work space', 'Durable laminate is easy to maintain' ], COECOSMO4SG: [ 'Glass counter welcomes visitors', 'L-shaped layout adds work space', 'Durable laminate is easy to maintain' ] }; const OTG_BOWFRONT = { SL22: [ 'Bowfront surface welcomes guests', 'Credenza and hutch organize supplies', 'Locking files secure documents' ], SL23: [ 'Bowfront surface welcomes guests', 'Credenza and hutch organize supplies', 'Locking files secure documents' ] }; // Override only visible feature text. Leave R7 titles, // collections, delivery, native prices and shopping intact. function desired(sku) { if (COSMO[sku]) return COSMO[sku]; const m = sku.match(/^OTGLAYOUT(SL22|SL23)(AWL|AML|ADC|AEL|AGL)$/); return m ? OTG_BOWFRONT[m[1]] : null; } function applyCard(card) { const sku = (card.dataset.sku || '').toUpperCase(); const bullets = desired(sku); if (!bullets) return false; const nodes = [...card.querySelectorAll('.eqs-p13e-features .eqs-p13e-feature')]; if (nodes.length !== 3) return false; if (!edits.has(card)) { edits.set(card, nodes.map(n => n.querySelector('.eqs-v163-copy, .eqs-v164-copy, .eqs-v162-copy')?.textContent ?? n.textContent)); } nodes.forEach((node, i) => { const copy = node.querySelector('.eqs-v163-copy, .eqs-v164-copy, .eqs-v162-copy'); if (copy) { if (copy.textContent !== bullets[i]) copy.textContent = bullets[i]; } else if (node.textContent !== bullets[i]) { node.textContent = bullets[i]; } }); card.dataset.eqsDesksR8 = '1'; return true; } function apply() { let matched = 0; document.querySelectorAll('.tileparent.product[data-sku]').forEach(card => { if (applyCard(card)) matched++; }); return {version: VERSION, matched, editedSKUs: [...new Set([...edits.keys()].map(c => c.dataset.sku))]}; } // Match the approved 12px typography on the R8-edited cards only. // Do not alter card heights, row spacing or pricing positions. const style = document.createElement('style'); style.id = STYLE_ID; style.textContent = ` .tileparent.product[data-eqs-desks-r8="1"] .eqs-p13e-feature, .tileparent.product[data-eqs-desks-r8="1"] .eqs-v163-copy { font-size:12px!important; line-height:16px!important; } .tileparent.product[data-eqs-desks-r8="1"] .eqs-v163-dot { font-size:12px!important; line-height:16px!important; } `; document.head.appendChild(style); let queued = false; const observer = new MutationObserver(mutations => { if (queued) return; const newCards = mutations.some(m => [...m.addedNodes].some(n => n.nodeType === 1 && (n.matches?.('.tileparent.product[data-sku]') || n.querySelector?.('.tileparent.product[data-sku]')) )); if (!newCards) return; queued = true; requestAnimationFrame(() => { queued = false; apply(); }); }); observer.observe(document.body, {childList:true, subtree:true}); window.EQS_DESKS_R8 = { active:true, version:VERSION, apply, status() { return { ...apply(), priceBars: document.querySelectorAll('.eqs-r2-pricebar').length, carts: document.querySelectorAll('.tileparent.product .btn-add-to-cart').length }; }, stop() { observer.disconnect(); for (const [card, previous] of edits) { const nodes = [...card.querySelectorAll('.eqs-p13e-features .eqs-p13e-feature')]; nodes.forEach((node, i) => { const copy = node.querySelector('.eqs-v163-copy, .eqs-v164-copy, .eqs-v162-copy'); if (previous[i] !== undefined) (copy || node).textContent = previous[i]; }); delete card.dataset.eqsDesksR8; } edits.clear(); style.remove(); delete window.EQS_DESKS_R8; } }; console.info('[DESKS R8] Editorial refinement ready', apply()); })();