{
  "schemaVersion": 1,
  "slug": "party-tent-size-calculator",
  "category": "party",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "83c50e856c96a1b44714efc692ad66e79ccaa0cae76f98de1472997c332090ef",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/party-tent-size-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": "A = t·s + 2d + 50b + 100·bar; side = ceil(10·√(1.1A) ÷ 10)·10; tent = side × side ft",
    "vars": [
      [
        "t",
        "Number of tables"
      ],
      [
        "s",
        "Area per table: 60 / 100 / 145 sq ft by seating"
      ],
      [
        "d",
        "Guests using the dance floor"
      ],
      [
        "b",
        "Buffet tables"
      ],
      [
        "bar",
        "1 if a bar area is added"
      ],
      [
        "A",
        "Base layout area before 10% allowance"
      ],
      [
        "side",
        "Square side rounded up to next 10 ft"
      ]
    ],
    "note": "Seating: 60 sq ft per table for up to 4 seats, 100 for 5–8, 145 for 9+; dance floor 2 sq ft per guest; buffet 50 sq ft per table; bar 100 sq ft. Dimensions add 10% and round the square side up to the next 10 ft."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const seatingFt = seatsPerTable <= 4 ? 60 : seatsPerTable <= 8 ? 100 : 145; const seating = tables*seatingFt; const dance = danceGuests*2; const buffet = buffetTables*50 + (barArea === 'yes' ? 100 : 0); const total = seating + dance + buffet; const side = Math.sqrt(total*1.1); return { seatingArea: seating, danceArea: dance, buffetArea: buffet, totalArea: total, tentDimensions: Math.ceil(side/10)*10 + ' x ' + Math.ceil(side/10)*10 + ' ft', totalGuests: tables*seatsPerTable };",
    "inputs": [
      {
        "name": "tables",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 300,
        "step": 1,
        "slider": true
      },
      {
        "name": "seatsPerTable",
        "type": "number",
        "default": 10,
        "min": 2,
        "max": 20,
        "step": 1,
        "slider": true
      },
      {
        "name": "danceGuests",
        "type": "number",
        "default": 40,
        "min": 0,
        "max": 2000,
        "step": 1,
        "slider": true
      },
      {
        "name": "buffetTables",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 30,
        "step": 1,
        "slider": true
      },
      {
        "name": "barArea",
        "type": "select",
        "default": "yes",
        "options": [
          {
            "value": "yes"
          },
          {
            "value": "no"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "seatingArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "danceArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "buffetArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "totalArea",
        "precision": 0,
        "unit": "sq ft"
      },
      {
        "name": "tentDimensions",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "totalGuests",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
