Certificate of Analysis library
Search the current biozone research catalog and review available batch-specific documentation. A document applies only to the exact product and batch identified in that report.
- (HCG) Human Chorionic Gonadotropin — contact support with the exact batch or lot
- 5-Amino-1MQ — contact support with the exact batch or lot
- 5-Amino-1MQ (capsules) — contact support with the exact batch or lot
- Acetic Acid — contact support with the exact batch or lot
- AOD-9604 — contact support with the exact batch or lot
- Bacteriostatic Water — contact support with the exact batch or lot
- BPC-157 — contact support with the exact batch or lot
- BPC-157 + TB-500 — contact support with the exact batch or lot
- BPC-157 + TB-500 + KPV Peptide Blend — contact support with the exact batch or lot
- Cagrilintide — contact support with the exact batch or lot
- Cartalax — contact support with the exact batch or lot
- CJC-1295 + Ipamorelin (5mg + 5mg) — contact support with the exact batch or lot
- CJC-1295 w/ DAC — contact support with the exact batch or lot
- DSIP — contact support with the exact batch or lot
- Epitalon — contact support with the exact batch or lot
- GHK-Cu — contact support with the exact batch or lot
- GHRP-2 — contact support with the exact batch or lot
- GLOW Blend — contact support with the exact batch or lot
- GLP-3-R — contact support with the exact batch or lot
- Glutathione — contact support with the exact batch or lot
- Hexarelin — contact support with the exact batch or lot
- HGH — contact support with the exact batch or lot
- Humanin — contact support with the exact batch or lot
- IGF-1 LR3 — contact support with the exact batch or lot
- Ipamorelin — contact support with the exact batch or lot
- Kisspeptin-10 — contact support with the exact batch or lot
- KLOW (blend) — contact support with the exact batch or lot
- KPV — contact support with the exact batch or lot
- Livagen — contact support with the exact batch or lot
- LL-37 — contact support with the exact batch or lot

High Purity Guaranteed
Our commitment to quality is backed by third-party testing. Biozone Peptides provides Certificates of Analysis (COAs) from reputable labs such as Janoshik for select products, verifying purity and consistency. We are continuously expanding our testing program to bring greater transparency across our full catalog.
// BIOZONE_PRODUCT_MASTER_V6 — catalog, cart, and mechanism service import { Permissions, webMethod } from "@wix/web-methods"; import { currentCartV2 } from "@wix/ecom"; import { catalogVersioning, productsV3 } from "@wix/stores"; const STORES_APP_ID = "215238eb-22a5-4c36-9e7b-e7c08025e04e"; const RECOMMENDATION_LIMIT = 5; const CATALOG_PAGE_SIZE = 100; const MAX_CATALOG_CANDIDATES = 500; const CATALOG_CACHE_TTL_MS = 30_000; const RECOMMENDATION_TIMEOUT_MS = 3_500; const SINGLE_PRODUCT_FIELDS = [ "URL", "CURRENCY", "PLAIN_DESCRIPTION", "INFO_SECTION", "INFO_SECTION_PLAIN_DESCRIPTION", "VARIANT_OPTION_CHOICE_NAMES", "MEDIA_ITEMS_INFO", "DIRECT_CATEGORIES_INFO", "THUMBNAIL", ]; const RECOMMENDATION_FIELDS = [ "URL", "CURRENCY", "PLAIN_DESCRIPTION", "MEDIA_ITEMS_INFO", "DIRECT_CATEGORIES_INFO", "THUMBNAIL", "MIN_PRICE_VARIANT", "DISCOUNT_INFO", ]; // Server-side mechanism ontology. Audit identifiers are intentionally not returned // to the browser; visitor-facing copy stays short, neutral, and non-clinical. const MECHANISM_NODES = Object.freeze({ "component:bpc157": node("BPC-157 component", "component", 130, ["PMID:27847966"]), "component:tb500": node("TB-500 / thymosin-beta-4 component", "component", 130, ["PMID:9153421"]), "component:ghkcu": node("GHK-Cu component", "component", 130, ["PMID:11045606"]), "component:kpv": node("KPV component", "component", 130, ["PMID:18061177"]), "component:ipamorelin": node("ipamorelin component", "component", 130, ["PMID:9849822"]), "target:glp1r": node("GLP-1 receptor (GLP-1R)", "target", 110, ["PMID:32730231"]), "target:gipr": node("GIP receptor (GIPR)", "target", 110, ["PMID:32730231"]), "target:gcgr": node("glucagon receptor (GCGR)", "target", 110, ["PMID:37385280"]), "target:amylin-ctr": node("amylin/calcitonin receptor system", "target", 105, ["PMID:40847076", "PMID:40609154"]), "target:ghsr1a": node("growth-hormone secretagogue receptor (GHS-R1a)", "target", 110, ["PMID:9849822"]), "target:ghrhr": node("growth-hormone-releasing hormone receptor (GHRHR)", "target", 110), "target:ghr": node("growth hormone receptor (GHR)", "target", 110), "target:igf1r": node("IGF-1 receptor (IGF-1R)", "target", 110), "target:kiss1r": node("kisspeptin receptor (KISS1R)", "target", 110, ["PMID:23070548"]), "target:lhcgr": node("LH/CG receptor (LHCGR)", "target", 110), "target:mc3r": node("melanocortin-3 receptor (MC3R)", "target", 110, ["PMID:16839319"]), "target:mc4r": node("melanocortin-4 receptor (MC4R)", "target", 110, ["PMID:16839319"]), "target:nnmt": node("nicotinamide N-methyltransferase (NNMT)", "target", 110, ["PMID:39067875"]), "target:err-pan": node("ERR-alpha/beta/gamma nuclear receptors", "target", 110, ["PMID:36988910"]), "target:monoamine-transporters": node("DAT/NET/SERT monoamine transporters", "target", 105), "target:vegfr2": node("VEGFR2-Akt-eNOS signaling", "target", 105, ["PMID:27847966"]), "target:g-actin": node("G-actin binding and sequestration", "target", 105, ["PMID:9153421"]), "target:pept1": node("PepT1-mediated peptide transport", "target", 100, ["PMID:18061177"]), "target:ll37-membrane": node("LL-37 membrane interaction", "target", 105, ["PMID:34049238"]), "target:fpr2": node("formyl peptide receptor 2 (FPR2)", "target", 100), "target:tlr-myd88": node("TLR/MyD88 dendritic-cell signaling", "target", 105, ["PMID:17804687"]), "pathway:incretin": node("incretin-receptor signaling", "pathway", 46), "pathway:neuroendocrine-intake": node("neuroendocrine energy-intake signaling", "context", 45), "pathway:gh-sequence": node("growth-hormone sequence-fragment research", "pathway", 42), "pathway:somatotropic": node("somatotropic-axis signaling", "pathway", 58), "pathway:gh-igf": node("growth-hormone/IGF-axis signaling", "pathway", 60), "pathway:hpg-axis": node("hypothalamic-pituitary-gonadal signaling", "pathway", 60), "pathway:alpha-msh-lineage": node("alpha-MSH-derived peptide research", "context", 13), "pathway:folate-purine-ampk": node("folate/purine stress signaling to AMPK", "pathway", 54, ["PMID:25738459"]), "pathway:mitochondrial-retrograde": node("mitochondrial retrograde stress signaling", "pathway", 46, ["PMID:25738459", "PMID:27384491"]), "pathway:cardiolipin-membrane": node("cardiolipin-rich mitochondrial membrane electrostatics", "pathway", 56, ["PMID:32273339"]), "pathway:oxidative-transcription": node("ERR-linked oxidative transcription", "pathway", 52, ["PMID:36988910"]), "pathway:nad-nicotinamide": node("NAD/nicotinamide metabolism", "pathway", 62), "pathway:nad-cofactor": node("NAD redox-cofactor and enzyme-substrate biology", "pathway", 48), "pathway:mitochondrial-bioenergetics": node("mitochondrial bioenergetics research", "context", 42), "pathway:cellular-redox": node("cellular redox-state research", "context", 45), "pathway:endothelial-migration": node("endothelial migration and eNOS signaling", "pathway", 44, ["PMID:19247195"]), "pathway:epithelial-barrier-response": node("epithelial/barrier-response research", "pathway", 48, ["PMID:18061177", "PMID:25995620"]), "pathway:ecm-remodeling": node("extracellular-matrix remodeling", "pathway", 42, ["PMID:11045606"]), "pathway:nfkb-mapk": node("NF-kappaB/MAPK inflammatory signaling", "pathway", 46, ["PMID:18061177"]), "pathway:host-defense": node("innate host-defense signaling", "context", 40), "pathway:bdnf-trkb": node("BDNF/TrkB-associated signaling", "pathway", 40, ["PMID:16996037"]), "pathway:neuropeptide-neurobiology": node("neuropeptide neurobiology research", "context", 40), "pathway:bioregulator-platform": node("short-peptide bioregulator research platform", "context", 32), }); // Only pathways that describe a defined signaling axis may receive the // visitor-facing "same research axis" label. Broad tissue/process overlap is // intentionally kept contextual. const SAME_AXIS_MECHANISMS = new Set([ "pathway:incretin", "pathway:somatotropic", "pathway:gh-igf", "pathway:hpg-axis", "pathway:folate-purine-ampk", "pathway:cardiolipin-membrane", "pathway:oxidative-transcription", "pathway:nad-nicotinamide", ]); // Conservative name aliases make the engine independent of dosage, capitalization, // punctuation, and variant naming. `inherits` gives branded blends exact component // overlap without trying to infer composition from marketing prose. const CURATED_PRODUCTS = Object.freeze([ product("retatrutide", ["retatrutide", "glp 3 r", "reta"], { "target:glp1r": 1, "target:gipr": 1, "target:gcgr": 1, "pathway:incretin": 1, "pathway:neuroendocrine-intake": 0.8, }), product("tirzepatide", ["tirzepatide", "tirz"], { "target:glp1r": 1, "target:gipr": 1, "pathway:incretin": 1, "pathway:neuroendocrine-intake": 0.8, }), product("semaglutide", ["semaglutide", "sema"], { "target:glp1r": 1, "pathway:incretin": 1, "pathway:neuroendocrine-intake": 0.8, }), product("cagrilintide", ["cagrilintide", "cagri"], { "target:amylin-ctr": 1, "pathway:neuroendocrine-intake": 0.9, }), product("tesofensine", ["tesofensine"], { "target:monoamine-transporters": 1, "pathway:neuroendocrine-intake": 0.55, "pathway:neuropeptide-neurobiology": 0.5, }), product("aod9604", ["aod 9604", "aod9604"], { "pathway:gh-sequence": 1, "pathway:neuroendocrine-intake": 0.45, }), product("hgh", ["human growth hormone", "somatropin", "hgh"], { "target:ghr": 1, "pathway:somatotropic": 1, "pathway:gh-igf": 1, }), product("tesamorelin", ["tesamorelin"], { "target:ghrhr": 1, "pathway:somatotropic": 1, "pathway:gh-igf": 0.7, }), product("cjc1295", ["cjc 1295", "cjc1295", "mod grf 1 29", "cjc"], { "target:ghrhr": 1, "pathway:somatotropic": 1, "pathway:gh-igf": 0.65, }), product("ipamorelin", ["ipamorelin", "ipa"], { "component:ipamorelin": 1, "target:ghsr1a": 1, "pathway:somatotropic": 1, "pathway:gh-igf": 0.6, }), product("ghrp2", ["ghrp 2", "ghrp2"], { "target:ghsr1a": 1, "pathway:somatotropic": 1, "pathway:gh-igf": 0.6, }), product("hexarelin", ["hexarelin"], { "target:ghsr1a": 1, "pathway:somatotropic": 1, "pathway:gh-igf": 0.6, }), product("igf1lr3", ["igf 1 lr3", "igf1 lr3", "igf1lr3"], { "target:igf1r": 1, "pathway:gh-igf": 1, }), product("hcg", ["human chorionic gonadotropin", "hcg"], { "target:lhcgr": 1, "pathway:hpg-axis": 1, }), product("kisspeptin10", ["kisspeptin 10", "kisspeptin"], { "target:kiss1r": 1, "pathway:hpg-axis": 1, }), product("pt141", ["pt 141", "bremelanotide"], { "target:mc3r": 1, "target:mc4r": 1, "pathway:alpha-msh-lineage": 0.85, }), product("melanotan2", ["melanotan 2", "melanotan ii", "mt 2"], { "target:mc3r": 1, "target:mc4r": 1, "pathway:alpha-msh-lineage": 0.85, }), product("motsc", ["mots c", "motsc"], { "pathway:folate-purine-ampk": 1, "pathway:mitochondrial-retrograde": 1, "pathway:mitochondrial-bioenergetics": 0.9, }), product("humanin", ["humanin"], { "pathway:mitochondrial-retrograde": 0.8, "pathway:mitochondrial-bioenergetics": 0.7, }), product("ss31", ["ss 31", "ss31", "elamipretide"], { "pathway:cardiolipin-membrane": 1, "pathway:mitochondrial-bioenergetics": 1, "pathway:cellular-redox": 0.45, }), product("slupp332", ["slu pp 332", "slupp332", "slu 332"], { "target:err-pan": 1, "pathway:oxidative-transcription": 1, "pathway:mitochondrial-bioenergetics": 0.9, }), product("5amino1mq", ["5 amino 1mq", "5 amino 1 mq"], { "target:nnmt": 1, "pathway:nad-nicotinamide": 1, }), product("nad", ["nad plus", "nad"], { "pathway:nad-cofactor": 1, "pathway:nad-nicotinamide": 0.9, "pathway:cellular-redox": 0.85, "pathway:mitochondrial-bioenergetics": 0.5, }), product("methylene-blue", ["methylene blue", "mb oral"], { "pathway:cellular-redox": 0.8, "pathway:mitochondrial-bioenergetics": 0.75, }), product("glutathione", ["glutathione", "gsh"], { "pathway:cellular-redox": 1, }), product("bpc157", ["bpc 157", "bpc157", "bpc"], { "component:bpc157": 1, "target:vegfr2": 1, "pathway:endothelial-migration": 0.9, "pathway:epithelial-barrier-response": 1, "pathway:ecm-remodeling": 0.55, }), product("tb500", ["tb 500", "tb500", "thymosin beta 4", "tb"], { "component:tb500": 1, "target:g-actin": 1, "pathway:endothelial-migration": 0.9, "pathway:ecm-remodeling": 0.45, }), product("ghkcu", ["ghk cu", "ghkcu"], { "component:ghkcu": 1, "pathway:ecm-remodeling": 1, }), product("kpv", ["kpv"], { "component:kpv": 1, "target:pept1": 1, "pathway:nfkb-mapk": 1, "pathway:epithelial-barrier-response": 1, "pathway:alpha-msh-lineage": 0.55, "pathway:host-defense": 0.55, }), product("glow-blend", ["glow blend", "glow"], {}, ["bpc157", "tb500", "ghkcu"]), product("klow-blend", ["klow blend", "klow"], {}, ["bpc157", "tb500", "ghkcu", "kpv"]), product("ll37", ["ll 37", "ll37"], { "target:ll37-membrane": 1, "target:fpr2": 0.75, "pathway:host-defense": 1, }), product("thymosin-alpha1", ["thymosin alpha 1", "thymosin alpha1", "ta 1", "ta1"], { "target:tlr-myd88": 1, "pathway:host-defense": 1, }), product("semax", ["semax"], { "pathway:bdnf-trkb": 0.8, "pathway:neuropeptide-neurobiology": 1, }), product("selank", ["selank"], { "pathway:neuropeptide-neurobiology": 1, }), product("dsip", ["dsip", "delta sleep inducing peptide"], {}), // Evidence for organ-specific mechanisms of these catalog bioregulators is // not strong enough for a target claim; they are grouped only by platform. product("epitalon", ["epitalon", "epithalon"], { "pathway:bioregulator-platform": 1, }), product("ovagen", ["ovagen"], { "pathway:bioregulator-platform": 1 }), product("livagen", ["livagen"], { "pathway:bioregulator-platform": 1 }), product("cartalax", ["cartalax"], { "pathway:bioregulator-platform": 1 }), product("vesugen", ["vesugen"], { "pathway:bioregulator-platform": 1 }), ]); const CURATED_PRODUCT_BY_ID = new Map( CURATED_PRODUCTS.map((definition) => [definition.id, definition]), ); const CURATED_ALIAS_INDEX = CURATED_PRODUCTS.flatMap((definition) => definition.aliases.map((alias) => ({ alias: normalizeCompoundName(alias), definition, })), ).sort((left, right) => right.alias.length - left.alias.length); // Text extraction is intentionally limited to explicit receptor/target phrases. // Generic words such as "metabolism", "inflammation", or "repair" never create // a mechanistic match. const MECHANISM_TEXT_RULES = Object.freeze([ textRule("target:glp1r", /\b(?:glp[- ]?1 receptor|glp1r)\b/i), textRule("target:gipr", /\b(?:gip receptor|gipr)\b/i), textRule("target:gcgr", /\b(?:glucagon receptor|gcgr)\b/i), textRule("target:amylin-ctr", /\b(?:amylin receptor|calcitonin receptor)\b/i), textRule("target:ghsr1a", /\b(?:ghs[- ]?r1a|ghrelin receptor|growth hormone secretagogue receptor)\b/i), textRule("target:ghrhr", /\b(?:ghrhr|growth hormone releasing hormone receptor)\b/i), textRule("target:igf1r", /\b(?:igf[- ]?1 receptor|igf1r)\b/i), textRule("target:kiss1r", /\b(?:kiss1r|gpr54|kisspeptin receptor)\b/i), textRule("target:mc3r", /\b(?:mc3r|melanocortin[- ]?3 receptor)\b/i), textRule("target:mc4r", /\b(?:mc4r|melanocortin[- ]?4 receptor)\b/i), textRule("target:nnmt", /\b(?:nnmt|nicotinamide n[- ]methyltransferase)\b/i), textRule("target:err-pan", /\b(?:erralpha|errbeta|errgamma|err[- ]?alpha|err[- ]?beta|err[- ]?gamma)\b/i), textRule("target:vegfr2", /\bvegfr[- ]?2\b/i), textRule("target:g-actin", /\b(?:g[- ]actin|actin sequestration)\b/i), textRule("target:pept1", /\bpept[- ]?1\b/i), textRule("target:tlr-myd88", /\b(?:tlr9|myd88)\b/i), textRule("pathway:folate-purine-ampk", /\b(?:folate cycle|de novo purine biosynthesis).*\bampk\b|\bampk\b.*\b(?:folate cycle|purine biosynthesis)\b/i), textRule("pathway:cardiolipin-membrane", /\bcardiolipin\b/i), textRule("pathway:nad-nicotinamide", /\b(?:nad\+?|nicotinamide) metabolism\b/i), ]); const ACCESSORY_NAME_PATTERNS = [ /\bbacteriostatic water\b/i, /\bbac water\b/i, /\bsterile water\b/i, /\bacetic acid\b/i, /\bdiluent\b/i, /\bsyring(?:e|es)\b/i, /\bneedle(?:s)?\b/i, /\balcohol wipes?\b/i, /\bnasal sprayer\b/i, ]; let catalogVersionPromise; let catalogCache = { expiresAt: 0, products: [] }; let catalogLoadPromise; async function getCatalogVersion() { if (!catalogVersionPromise) { catalogVersionPromise = catalogVersioning .getCatalogVersion() .then((result) => String(result?.catalogVersion || "")) .catch((error) => { catalogVersionPromise = undefined; throw error; }); } return catalogVersionPromise; } async function requireCurrentCatalog() { const version = await getCatalogVersion(); if (version === "STORES_NOT_INSTALLED") throw new Error("STORES_NOT_INSTALLED"); if (version !== "V3_CATALOG") throw new Error("UNSUPPORTED_STORES_CATALOG"); } async function lookupProductBySlug(slug) { const cleanSlug = String(slug || "").trim(); if (!cleanSlug) throw new Error("PRODUCT_SLUG_REQUIRED"); await requireCurrentCatalog(); let result; try { result = await productsV3.getProductBySlug(cleanSlug, { fields: SINGLE_PRODUCT_FIELDS, }); } catch (error) { console.error("BIOZONE_PRODUCT_QUERY_ERROR", error); throw new Error("PRODUCT_LOOKUP_FAILED"); } const item = result?.product || result; if (!item) throw new Error("PRODUCT_NOT_FOUND"); return item; } async function queryVisibleCatalogProducts() { if (catalogCache.expiresAt > Date.now()) return catalogCache.products; if (!catalogLoadPromise) { catalogLoadPromise = loadVisibleCatalogProducts().finally(() => { catalogLoadPromise = undefined; }); } return catalogLoadPromise; } async function loadVisibleCatalogProducts() { const catalogProducts = []; const seenIds = new Set(); let cursor; while (catalogProducts.length < MAX_CATALOG_CANDIDATES) { const cursorPaging = { limit: CATALOG_PAGE_SIZE }; if (cursor) cursorPaging.cursor = cursor; const result = await productsV3.queryProducts( { cursorPaging, filter: { visible: { $eq: true } }, }, { fields: RECOMMENDATION_FIELDS }, ); const page = Array.isArray(result?.products) ? result.products : Array.isArray(result?.items) ? result.items : []; for (const product of page) { const id = getProductId(product); if (!id || seenIds.has(id)) continue; seenIds.add(id); catalogProducts.push(product); if (catalogProducts.length === MAX_CATALOG_CANDIDATES) break; } const nextCursor = result?.pagingMetadata?.cursors?.next || result?.cursors?.next || ""; const hasNext = result?.pagingMetadata?.hasNext === true || (typeof result?.hasNext === "function" && result.hasNext()); if (!hasNext || !nextCursor || nextCursor === cursor) break; cursor = nextCursor; } catalogCache = { expiresAt: Date.now() + CATALOG_CACHE_TTL_MS, products: catalogProducts, }; return catalogProducts; } async function getRelatedProducts(currentProduct) { const catalogProducts = await queryVisibleCatalogProducts(); return buildRecommendations(currentProduct, catalogProducts, RECOMMENDATION_LIMIT); } async function getRelatedProductsWithTimeout(currentProduct) { let timeoutId; try { return await Promise.race([ getRelatedProducts(currentProduct), new Promise((_, reject) => { timeoutId = setTimeout( () => reject(new Error("RECOMMENDATION_QUERY_TIMEOUT")), RECOMMENDATION_TIMEOUT_MS, ); }), ]); } finally { clearTimeout(timeoutId); } } export const getStorefrontProductBySlug = webMethod( Permissions.Anyone, lookupProductBySlug, ); export const getStorefrontProductPageBySlug = webMethod( Permissions.Anyone, async (slug) => { const product = await lookupProductBySlug(slug); let related = []; try { related = await getRelatedProductsWithTimeout(product); } catch (error) { console.error("BIOZONE_RECOMMENDATION_QUERY_ERROR", error); } return { product, related }; }, ); export const getStorefrontRecommendationsByProductId = webMethod( Permissions.Anyone, async (productId) => { const cleanProductId = String(productId || "").trim(); if (!cleanProductId) throw new Error("PRODUCT_ID_REQUIRED"); const catalogProducts = await queryVisibleCatalogProducts(); const currentProduct = catalogProducts.find( (product) => getProductId(product) === cleanProductId, ); if (!currentProduct) return []; try { return await Promise.race([ Promise.resolve( buildRecommendations( currentProduct, catalogProducts, RECOMMENDATION_LIMIT, ), ), new Promise((_, reject) => { setTimeout( () => reject(new Error("RECOMMENDATION_QUERY_TIMEOUT")), RECOMMENDATION_TIMEOUT_MS, ); }), ]); } catch (error) { console.error("BIOZONE_RECOMMENDATION_QUERY_ERROR", error); return []; } }, ); export const addStorefrontItemToCart = webMethod( Permissions.Anyone, async ({ productId, variantId, quantity }) => { const cleanProductId = String(productId || "").trim(); const cleanVariantId = String(variantId || "").trim(); const cleanQuantity = Math.min( 99, Math.max(1, Number.parseInt(quantity, 10) || 1), ); if (!cleanProductId) { throw new Error("PRODUCT_REQUIRED"); } const catalogReference = { catalogItemId: cleanProductId, appId: STORES_APP_ID, }; if (cleanVariantId) catalogReference.options = { variantId: cleanVariantId }; return currentCartV2.addLineItemsToCurrentCart({ catalogItems: [ { catalogReference, quantity: cleanQuantity, }, ], }); }, ); function buildRecommendations(currentProduct, catalogProducts, limit) { const currentId = getProductId(currentProduct); const sourceProfile = profileProduct(currentProduct); if (sourceProfile.isAccessory) return []; const candidates = catalogProducts .filter((candidate) => isEligibleCandidate(candidate, currentId)) .map((candidate) => scoreCandidate(sourceProfile, candidate)) .filter(Boolean) .sort(compareCandidates); const selected = selectDiverseCandidates(candidates, limit); if (!selected.length) return []; return selected.map(({ product, relation }) => { const price = getCatalogPrice(product); const availability = getAvailability(product); return { id: getProductId(product), slug: String(product.slug || ""), name: String(product.name || ""), href: getCatalogHref(product), image: getCatalogImage(product), imageAlt: getCatalogImageAlt(product), price: price.amount, priceDisplay: price.display, availability: { code: availability.code, label: availability.label }, relationship: { id: relation.id, label: relation.label, reason: relation.reason, tier: relation.tier, tierLabel: relation.tierLabel, confidence: relation.confidence, basis: relation.basis, classification: relation.classification, matchScore: relation.matchScore, sharedMechanisms: relation.sharedMechanisms, methodVersion: "mechanism-v2", }, }; }); } function isEligibleCandidate(product, currentId) { if (!product || typeof product !== "object" || product.visible === false) return false; const id = getProductId(product); if (!id || id === currentId || !String(product.name || "").trim()) return false; if (isAccessoryName(product.name)) return false; if (!getCatalogHref(product) || !getCatalogImage(product)) return false; if (!getAvailability(product).available) return false; return Boolean(getCatalogPrice(product)); } function profileProduct(product) { const text = `${String(product?.name || "")} ${stripHtml( product?.plainDescription || product?.description || "", )}`; const definitions = findCuratedDefinitions(product?.name); const mechanisms = new Map(); for (const definition of definitions) { addDefinitionMechanisms(definition, mechanisms, new Set()); } // Known catalog identities use only the reviewed registry. This prevents a // comparison or negated phrase in merchandising copy from expanding a // curated profile (for example, “does not bind MC4R”). Conservative text // extraction remains a plug-and-play fallback for future unknown products. if (!definitions.length) { for (const rule of MECHANISM_TEXT_RULES) { if ( mechanisms.has(rule.id) || !hasAffirmativeMechanismMatch(text, rule.pattern) ) { continue; } const mechanism = MECHANISM_NODES[rule.id]; if (!mechanism) continue; mechanisms.set(rule.id, { id: rule.id, mechanism, strength: 0.52, basis: "catalog-text", }); } } return { id: getProductId(product), name: String(product?.name || ""), curatedIds: definitions.map((definition) => definition.id), mechanisms, categoryIds: getCategoryIds(product), productType: String(product?.productType || ""), isAccessory: isAccessoryName(product?.name), isBlend: definitions.some((definition) => definition.inherits.length > 0) || /\bblend\b|\+/i.test(String(product?.name || "")), }; } function scoreCandidate(sourceProfile, product) { const candidateProfile = profileProduct(product); if (candidateProfile.isAccessory) return null; if (isSameCuratedIdentity(sourceProfile, candidateProfile)) return null; const sharedMechanisms = getSharedMechanisms(sourceProfile, candidateProfile); const sharedCategories = intersect(sourceProfile.categoryIds, candidateProfile.categoryIds); const sameType = sourceProfile.productType && sourceProfile.productType === candidateProfile.productType; const mechanismScore = sharedMechanisms.reduce( (total, shared) => total + shared.contribution, 0, ); const allowCategoryFallback = sourceProfile.mechanisms.size === 0; const relation = makeRelationship( sharedMechanisms, allowCategoryFallback ? sharedCategories : [], mechanismScore, ); if (!relation) return null; const categoryScore = relation.tier === "CATALOG_CONTEXT" ? Math.min(2, sharedCategories.length) * 4 : Math.min(2, sharedCategories.length) * 0.5; const blendAdjacencyPenalty = candidateProfile.isBlend && relation.classification !== "composition_overlap" ? 2 : 0; const score = mechanismScore + categoryScore + (sameType ? 0.1 : 0) - blendAdjacencyPenalty; return { product, relation, score, identityKey: candidateProfile.curatedIds.length ? [...candidateProfile.curatedIds].sort().join("+") : `catalog:${getProductId(product)}`, tieBreaker: stableHash(`${sourceProfile.id}:${candidateProfile.id}`), }; } function getSharedMechanisms(sourceProfile, candidateProfile) { const shared = []; for (const [id, sourceEntry] of sourceProfile.mechanisms) { const candidateEntry = candidateProfile.mechanisms.get(id); if (!candidateEntry) continue; const bothCurated = sourceEntry.basis === "curated-registry" && candidateEntry.basis === "curated-registry"; const basisFactor = bothCurated ? 1 : sourceEntry.basis === "catalog-text" && candidateEntry.basis === "catalog-text" ? 0.42 : 0.62; const strength = Math.min(sourceEntry.strength, candidateEntry.strength); shared.push({ id, label: sourceEntry.mechanism.label, kind: sourceEntry.mechanism.kind, weight: sourceEntry.mechanism.weight, strength, basis: bothCurated ? "curated-registry" : "catalog-supported", contribution: sourceEntry.mechanism.weight * strength * basisFactor, }); } return shared.sort(compareSharedMechanisms); } function makeRelationship(sharedMechanisms, sharedCategories, mechanismScore) { if (sharedMechanisms.length) { const primary = sharedMechanisms[0]; const visibleShared = sharedMechanisms.slice(0, 3); const labels = visibleShared .filter((entry) => entry.kind === primary.kind) .slice(0, 2) .map((entry) => entry.label); const catalogSupported = visibleShared.some( (entry) => entry.basis !== "curated-registry", ); if (primary.kind === "component") { return relationship({ primary, tier: "DIRECT", tierLabel: "Direct component overlap", label: "Direct component overlap", reason: `Shares ${formatList(labels)} in the mapped catalog composition.`, confidence: confidence("HIGH", "High-confidence mapping", 0.96), basis: "curated-component", classification: "composition_overlap", matchScore: mechanismScore, sharedMechanisms: visibleShared, }); } if (primary.kind === "target") { const highConfidence = !catalogSupported && primary.strength >= 0.75; if (!highConfidence && mechanismScore < 35) return null; return relationship({ primary, tier: highConfidence ? "DIRECT" : "MECHANISTIC", tierLabel: highConfidence ? "Shared molecular target" : "Catalog-supported target", label: highConfidence ? "Shared molecular target" : "Catalog-supported target", reason: `Shares ${formatList(labels)} as ${labels.length === 1 ? "a research target" : "research targets"}.`, confidence: highConfidence ? confidence("HIGH", "High-confidence mapping", 0.94) : confidence("MODERATE", "Moderate-confidence mapping", 0.72), basis: catalogSupported ? "catalog-supported-target" : "curated-target", classification: highConfidence ? "shared_target" : "adjacent_system", matchScore: mechanismScore, sharedMechanisms: visibleShared, }); } if ( primary.kind === "pathway" && SAME_AXIS_MECHANISMS.has(primary.id) && mechanismScore >= 55 ) { return relationship({ primary, tier: "MECHANISTIC", tierLabel: "Same research axis", label: "Same research axis", reason: `Shares mapped ${formatList(labels)}.`, confidence: confidence( catalogSupported ? "CONTEXTUAL" : "MODERATE", catalogSupported ? "Catalog-supported mapping" : "Moderate-confidence mapping", catalogSupported ? 0.58 : 0.8, ), basis: catalogSupported ? "catalog-supported-pathway" : "curated-pathway", classification: "same_axis", matchScore: mechanismScore, sharedMechanisms: visibleShared, }); } if (mechanismScore < 35) return null; return relationship({ primary, tier: "CONTEXTUAL", tierLabel: "Adjacent research context", label: "Adjacent research context", reason: `Adjacent within mapped ${formatList(labels)}.`, confidence: confidence("CONTEXTUAL", "Contextual mapping", 0.55), basis: "curated-context", classification: "adjacent_system", matchScore: mechanismScore, sharedMechanisms: visibleShared, }); } // Category-only overlap remains available to future admin tooling, but is // below the visitor-facing eligibility threshold and is never called a pathway. void sharedCategories; return null; } function compareCandidates(left, right) { const tierDifference = tierRank(right.relation.tier) - tierRank(left.relation.tier); if (tierDifference) return tierDifference; if (left.score !== right.score) return right.score - left.score; if (left.tieBreaker !== right.tieBreaker) return right.tieBreaker - left.tieBreaker; return String(left.product.name || "").localeCompare(String(right.product.name || "")); } function selectDiverseCandidates(candidates, limit) { const selected = []; const primaryMechanismCounts = new Map(); const selectedIdentityKeys = new Set(); let contextualCount = 0; for (const candidate of candidates) { if (selectedIdentityKeys.has(candidate.identityKey)) continue; const isWeak = ["CONTEXTUAL", "CATALOG_CONTEXT"].includes( candidate.relation.tier, ); if (isWeak && contextualCount >= 2) continue; const primaryId = candidate.relation.primaryMechanismId; const primaryCount = primaryMechanismCounts.get(primaryId) || 0; const primaryCap = candidate.relation.classification === "composition_overlap" ? 3 : 2; if (primaryCount >= primaryCap) continue; selected.push(candidate); selectedIdentityKeys.add(candidate.identityKey); primaryMechanismCounts.set(primaryId, primaryCount + 1); if (isWeak) contextualCount += 1; if (selected.length === limit) return selected; } return selected; } function compareSharedMechanisms(left, right) { const kindDifference = mechanismKindRank(right.kind) - mechanismKindRank(left.kind); if (kindDifference) return kindDifference; if (left.contribution !== right.contribution) return right.contribution - left.contribution; return left.id.localeCompare(right.id); } function mechanismKindRank(kind) { return { component: 4, target: 3, pathway: 2, context: 1 }[kind] || 0; } function tierRank(tier) { return { DIRECT: 4, MECHANISTIC: 3, CONTEXTUAL: 2, CATALOG_CONTEXT: 1 }[tier] || 0; } function relationship({ primary, tier, tierLabel, label, reason, confidence: confidenceValue, basis, classification, matchScore, sharedMechanisms, }) { return { id: `mechanism:${primary.id}`, primaryMechanismId: primary.id, tier, tierLabel, label, reason, confidence: confidenceValue, basis, classification, matchScore: normalizePublicMatchScore(classification, matchScore), sharedMechanisms: sharedMechanisms.map((entry) => ({ id: entry.id, label: entry.label, kind: entry.kind, })), }; } function confidence(code, label, score) { return { code, label, score }; } function normalizePublicMatchScore(classification, rawScore) { const score = Math.round(Number(rawScore) || 0); if (["composition_overlap", "shared_target"].includes(classification)) { return Math.max(80, Math.min(98, score)); } if (classification === "same_axis") { return Math.max(55, Math.min(79, score)); } if (classification === "adjacent_system") { return Math.max(35, Math.min(54, score)); } return Math.max(0, Math.min(34, score)); } function formatList(values) { const unique = Array.from(new Set(values.filter(Boolean))); if (unique.length < 2) return unique[0] || "a mapped pathway"; if (unique.length === 2) return `${unique[0]} and ${unique[1]}`; return `${unique.slice(0, -1).join(", ")}, and ${unique[unique.length - 1]}`; } function findCuratedDefinitions(value) { const normalizedName = normalizeCompoundName(value); if (!normalizedName) return []; const paddedName = ` ${normalizedName} `; const matches = []; const seen = new Set(); for (const entry of CURATED_ALIAS_INDEX) { if (!entry.alias || seen.has(entry.definition.id)) continue; if (!paddedName.includes(` ${entry.alias} `)) continue; seen.add(entry.definition.id); matches.push(entry.definition); } return matches; } function isSameCuratedIdentity(sourceProfile, candidateProfile) { if ( sourceProfile.curatedIds.length !== 1 || candidateProfile.curatedIds.length !== 1 ) { return false; } return sourceProfile.curatedIds[0] === candidateProfile.curatedIds[0]; } function addDefinitionMechanisms(definition, mechanismMap, visiting) { if (!definition || visiting.has(definition.id)) return; visiting.add(definition.id); for (const inheritedId of definition.inherits) { addDefinitionMechanisms( CURATED_PRODUCT_BY_ID.get(inheritedId), mechanismMap, visiting, ); } for (const [id, rawStrength] of Object.entries(definition.mechanisms)) { const mechanism = MECHANISM_NODES[id]; if (!mechanism) continue; const strength = Math.max(0, Math.min(1, Number(rawStrength) || 0)); const existing = mechanismMap.get(id); if (existing && existing.strength >= strength) continue; mechanismMap.set(id, { id, mechanism, strength, basis: "curated-registry", }); } visiting.delete(definition.id); } function normalizeCompoundName(value) { return String(value || "") .toLowerCase() .replace(/\+/g, " plus ") .replace(/\b\d+(?:\.\d+)?\s*(?:mg|mcg|iu|ml|g)\b/g, " ") .replace(/[^a-z0-9]+/g, " ") .replace(/\b(?:biozone|peptides?|research|material|oral|blend|vials?|tablets?|capsules?)\b/g, " ") .replace(/\s+/g, " ") .trim(); } function isAccessoryName(value) { const name = String(value || ""); return ACCESSORY_NAME_PATTERNS.some((pattern) => pattern.test(name)); } function node(label, kind, weight, audit = []) { return Object.freeze({ label, kind, weight, audit: Object.freeze([...audit]), }); } function product(id, aliases, mechanisms, inherits = []) { return Object.freeze({ id, aliases: Object.freeze([...aliases]), mechanisms: Object.freeze({ ...mechanisms }), inherits: Object.freeze([...inherits]), }); } function textRule(id, pattern) { return Object.freeze({ id, pattern }); } function hasAffirmativeMechanismMatch(value, pattern) { const text = String(value || ""); const flags = pattern.flags.includes("g") ? pattern.flags : `${pattern.flags}g`; const matcher = new RegExp(pattern.source, flags); for (const match of text.matchAll(matcher)) { const index = Number(match.index) || 0; const preceding = text.slice(Math.max(0, index - 80), index).toLowerCase(); const following = text .slice(index + String(match[0] || "").length, index + String(match[0] || "").length + 80) .toLowerCase(); if ( /\b(?:not|no|never|without|does not|doesn't|isn't|aren't|failed to|fails to|unrelated to|distinct from|independent of|lacks? affinity for|has no affinity for)\b[^.!?]{0,64}$/.test( preceding, ) || /^\s*(?:(?:is|was|remains|appears)\s+)?(?:not|never)\b[^.!?]{0,48}(?:target|receptor|mechanism|pathway)?/.test( following, ) ) { continue; } return true; } return false; } function getCategoryIds(product) { const categories = [ ...(Array.isArray(product?.directCategoriesInfo?.categories) ? product.directCategoriesInfo.categories : []), ...(Array.isArray(product?.allCategoriesInfo?.categories) ? product.allCategoriesInfo.categories : []), ...(Array.isArray(product?.directCategories) ? product.directCategories : []), ...(Array.isArray(product?.allCategories) ? product.allCategories : []), ...(Array.isArray(product?.collectionIds) ? product.collectionIds : []), ]; return Array.from( new Set( categories .filter((category) => { if (!category || typeof category !== "object") return true; const name = String(category.name || category.label || "").trim(); return !/^(?:all products?|shop|store|catalog|research materials?|peptides?)$/i.test( name, ); }) .map((category) => String( category?._id || category?.id || category?.categoryId || category || "", ).trim(), ) .filter(Boolean), ), ); } function getAvailability(product) { const code = String( product?.inventory?.availabilityStatus || product?.stock?.inventoryStatus || "", ).toUpperCase(); const preorderAvailability = String( product?.inventory?.preorderAvailability || "", ).toUpperCase(); const preorderStatus = String(product?.inventory?.preorderStatus || "").toUpperCase(); if (code === "IN_STOCK") return { code, label: "In stock", available: true }; if (code === "PARTIALLY_OUT_OF_STOCK") { return { code, label: "Limited availability", available: true }; } if (code === "PREORDER") { return { code, label: "Available for pre-order", available: true }; } if ( code === "OUT_OF_STOCK" && (preorderStatus === "ENABLED" || preorderStatus === "PARTIALLY_ENABLED" || preorderAvailability === "ALL_VARIANTS" || preorderAvailability === "SOME_VARIANTS") ) { return { code: "PREORDER", label: "Available for pre-order", available: true }; } if (code === "OUT_OF_STOCK") return { code, label: "Out of stock", available: false }; if (product?.inStock === true) { return { code: "IN_STOCK", label: "In stock", available: true }; } return { code: "UNKNOWN", label: "Availability unavailable", available: false }; } function getCatalogPrice(product) { const priceAfterDiscount = product?.variantSummary?.minPriceVariant?.price?.priceAfterDiscount; const minPrice = product?.actualPriceRange?.minValue; const maxPrice = product?.actualPriceRange?.maxValue; const variantPrice = product?.variantSummary?.minPriceVariant?.price?.actualPrice; const amountValue = firstScalar( priceAfterDiscount?.amount, minPrice?.amount, variantPrice?.amount, product?.priceData?.discountedPrice, product?.priceData?.price, ); const amount = Number(amountValue); if (!Number.isFinite(amount) || amount < 0) return null; const formatted = priceAfterDiscount?.formattedAmount || minPrice?.formattedAmount || variantPrice?.formattedAmount || product?.formattedDiscountedPrice || product?.formattedPrice || formatMoney(amount, product?.currency || product?.priceData?.currency); const maxAmount = Number(maxPrice?.amount); const hasRange = Number.isFinite(maxAmount) && maxAmount > amount; return { amount: String(amountValue), display: `${hasRange ? "From " : ""}${formatted}` }; } function getCatalogHref(product) { const candidates = [ product?.url, product?.url?.relativePath, product?.url?.relativeUrl, product?.url?.url, product?.productPageUrl, product?.productPageUrl?.relativePath, product?.productPageUrl?.relativeUrl, product?.productPageUrl?.url, ]; for (const candidate of candidates) { if (typeof candidate !== "string") continue; const href = candidate.trim(); if (href.startsWith("/") || /^https?:\/\//i.test(href)) return href; } return ""; } function getCatalogImage(product) { const mediaItems = [ ...(Array.isArray(product?.media?.itemsInfo?.items) ? product.media.itemsInfo.items : []), ...(Array.isArray(product?.media?.items) ? product.media.items : []), ]; const candidates = [ product?.media?.thumbnail?.url, product?.thumbnail?.image?.url, product?.thumbnail?.imageInfo?.url, product?.thumbnail?.url, product?.thumbnail?.src, product?.media?.main?.image?.url, product?.media?.main?.imageInfo?.url, product?.media?.main?.url, product?.media?.mainMedia?.image?.url, product?.mainMedia?.image?.url, ...mediaItems.map(extractImageIdentifier), ]; for (const candidate of candidates) { if (typeof candidate !== "string") continue; const src = candidate.trim(); if (/^(?:https?:\/\/|wix:image:\/\/)/i.test(src)) return src; } return ""; } function getCatalogImageAlt(product) { return String( product?.media?.thumbnail?.altText || product?.thumbnail?.image?.altText || product?.thumbnail?.imageInfo?.altText || product?.thumbnail?.altText || product?.media?.main?.image?.altText || product?.media?.main?.altText || `${product?.name || "Research material"} product image`, ); } function extractImageIdentifier(item) { if (typeof item === "string") return item; if (!item || typeof item !== "object") return ""; const mediaType = String(item.mediaType || item.type || "").toLowerCase(); if (mediaType.includes("video") && !item.image) return ""; return ( item.image?.url || item.image?.src || item.imageInfo?.url || item.imageInfo?.src || item.src || item.url || item.fileUrl || (typeof item.image === "string" ? item.image : "") ); } function getProductId(product) { return String( product?._id || product?.id || product?.productId || product?.catalogProductId || "", ); } function intersect(left, right) { const rightSet = new Set(right); return left.filter((value) => rightSet.has(value)); } function stableHash(value) { let hash = 2166136261; for (const character of String(value || "")) { hash ^= character.charCodeAt(0); hash = Math.imul(hash, 16777619); } return hash >>> 0; } function firstScalar(...values) { return values.find( (value) => value !== undefined && value !== null && value !== "" && typeof value !== "object", ); } function formatMoney(value, currency) { try { return new Intl.NumberFormat("en-US", { style: "currency", currency: String(currency || "USD"), }).format(Number(value)); } catch (_) { return String(value); } } function stripHtml(value) { return String(value || "") .replace(/<br\s*\/?\s*>/gi, "\n") .replace(/<\/(p|div|li|h[1-6])>/gi, "\n") .replace(/<[^>]+>/g, " ") .replace(/ /gi, " ") .replace(/&/gi, "&") .replace(/\s+/g, " ") .trim(); }


















