{
  "schemaVersion": 1,
  "slug": "clothing-size-converter-calculator",
  "category": "fashion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "f72794a5a6b674956dcb46ca2938cd0ab7d22df6cc107ab453bf077102456805",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/clothing-size-converter-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "US n ↔ UK n+4 ↔ EU n+32 ↔ IT n+36",
    "vars": [
      [
        "US",
        "US size"
      ],
      [
        "UK",
        "UK size"
      ],
      [
        "EU",
        "European size"
      ],
      [
        "IT",
        "Italian size"
      ]
    ],
    "note": "ASOS own-brand women’s crosswalk: US n ↔ UK n+4 ↔ EU n+32 ↔ Italy n+36. This retailer chart is not a universal standard."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const bounds={us:[0,24],uk:[4,28],eu:[32,56],it:[36,60]},[min,max]=bounds[system]||bounds.us;if(!Number.isInteger(size)||size<min||size>max)return {us:null,uk:null,eu:null,it:null,letterSize:null,__error:'inputError'};const us=Math.round(system==='us'?size:system==='uk'?size-4:system==='eu'?size-32:size-36),n=us;return {us:String(n),uk:String(n+4),eu:String(n+32),it:String(n+36),letterSize:n<=2?'XS':n<=6?'S':n<=10?'M':n<=14?'L':n<=18?'XL':'XXL'};",
    "inputs": [
      {
        "name": "system",
        "type": "select",
        "default": "us",
        "options": [
          {
            "value": "us"
          },
          {
            "value": "uk"
          },
          {
            "value": "eu"
          },
          {
            "value": "it"
          }
        ]
      },
      {
        "name": "size",
        "type": "number",
        "default": 8,
        "min": 0,
        "max": 24,
        "step": 1,
        "unitField": "system",
        "minByUnit": {
          "us": 0,
          "uk": 4,
          "eu": 32,
          "it": 36
        },
        "maxByUnit": {
          "us": 24,
          "uk": 28,
          "eu": 56,
          "it": 60
        },
        "unitOffsets": {
          "us": 0,
          "uk": -4,
          "eu": -32,
          "it": -36
        }
      }
    ],
    "outputs": [
      {
        "name": "us",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "uk",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "eu",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "it",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "letterSize",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
