{
  "schema": "easycatalog-composition-plan/1",
  "threads": [
    {
      "name": "catalog-content",
      "gutter": 12,
      "crossAxis": "stretch",
      "content": [
        {
          "type": "formattingRule",
          "name": "record-subheader-title",
          "asset": "__EC_RECIPE_523x770_TITLE_RECORD_TABLE_SUBHEADERS",
          "horizontalAlignment": "center",
          "onEmpty": "error"
        },
        {
          "type": "table",
          "name": "ordinary-record-subheader-table",
          "asset": "__EC_RECIPE_523x770_TABLE_RECORDS_WITH_CONTINUED_SUBHEADERS_V2_GROW",
          "data": {
            "source": "selectionRoot",
            "result": "self",
            "shape": {
              "scope": "records",
              "sort": [
                {
                  "field": "Category1",
                  "missing": "first"
                },
                {
                  "field": "Category2",
                  "missing": "first"
                },
                {
                  "field": "Category3",
                  "missing": "first"
                },
                {
                  "field": "ID",
                  "missing": "first"
                },
                {
                  "field": "AlphaSV"
                }
              ]
            }
          },
          "compositionMode": "place",
          "autoFitVertically": true,
          "minimumHeight": 48,
          "overflow": "continue",
          "table": {
            "mode": "vertical",
            "mergeScope": "composedArea",
            "keep": {
              "atStart": 2,
              "atEnd": 2
            },
            "fields": {
              "include": [
                "Category1",
                "Category2",
                "Category3",
                "ID",
                "AlphaSV",
                "Price"
              ],
              "leading": [
                "Category1",
                "Category2",
                "Category3",
                "ID"
              ],
              "trailing": [
                "Price"
              ],
              "removeEmpty": false
            },
            "subheaders": [
              {
                "field": "Category1",
                "prototypeRow": 0,
                "prototypes": [
                  {
                    "value": "Office",
                    "prototypeRow": 3,
                    "bodyPrototypeRow": 9
                  },
                  {
                    "value": "Outdoor",
                    "prototypeRow": 5,
                    "bodyPrototypeRow": 11
                  }
                ],
                "omitWhenSingle": false,
                "keep": {
                  "atStart": 2,
                  "atEnd": 2,
                  "together": "ifPossible"
                },
                "repeat": {
                  "mode": "every area",
                  "prototypeRow": 2,
                  "prototypes": [
                    {
                      "value": "Office",
                      "prototypeRow": 7
                    },
                    {
                      "value": "Outdoor",
                      "prototypeRow": 8
                    }
                  ]
                },
                "footer": {
                  "prototypeRow": 13,
                  "prototypes": [
                    {
                      "value": "Office",
                      "prototypeRow": 15
                    },
                    {
                      "value": "Outdoor",
                      "prototypeRow": 17
                    }
                  ]
                },
                "fragmentFooter": {
                  "prototypeRow": 21,
                  "prototypes": [
                    {
                      "value": "Office",
                      "prototypeRow": 23
                    },
                    {
                      "value": "Outdoor",
                      "prototypeRow": 25
                    }
                  ]
                }
              }
            ],
            "overrides": {
              "Category1": {
                "label": {
                  "content": "<img>",
                  "fieldOptions": {
                    "css": "img { width: 5mm; height: 5mm; fillcolor: #ff0000; strokecolor: none; strokeweight: 0pt; topleftcorneroption: rounded_corner; toprightcorneroption: rounded_corner; bottomleftcorneroption: rounded_corner; bottomrightcorneroption: rounded_corner; topleftcornerradius: 1mm; toprightcornerradius: 1mm; bottomleftcornerradius: 1mm; bottomrightcornerradius: 1mm; }"
                  }
                }
              },
              "Category2": {
                "label": {
                  "content": "<img>",
                  "fieldOptions": {
                    "css": "img { width: 5mm; height: 5mm; fillcolor: #00ff00; strokecolor: none; strokeweight: 0pt; topleftcorneroption: rounded_corner; toprightcorneroption: rounded_corner; bottomleftcorneroption: rounded_corner; bottomrightcorneroption: rounded_corner; topleftcornerradius: 1mm; toprightcornerradius: 1mm; bottomleftcornerradius: 1mm; bottomrightcornerradius: 1mm; }"
                  }
                }
              },
              "Category3": {
                "label": {
                  "content": "<img>",
                  "fieldOptions": {
                    "css": "img { width: 5mm; height: 5mm; fillcolor: #0000ff; strokecolor: none; strokeweight: 0pt; topleftcorneroption: rounded_corner; toprightcorneroption: rounded_corner; bottomleftcorneroption: rounded_corner; bottomrightcorneroption: rounded_corner; topleftcornerradius: 1mm; toprightcornerradius: 1mm; bottomleftcornerradius: 1mm; bottomrightcornerradius: 1mm; }"
                  }
                }
              },
              "ID": {
                "label": "Code"
              },
              "AlphaSV": {
                "label": "Product"
              },
              "Price": {
                "label": "Price"
              }
            },
            "cellAttributes": {
              "fields": {
                "Category1": {
                  "mergeVertical": "matching"
                },
                "Category2": {
                  "mergeVertical": "matchingNonEmpty",
                  "applyWhenLeftMerges": true
                },
                "Category3": {
                  "mergeVertical": "matchingNonEmpty",
                  "applyWhenLeftMerges": true
                }
              }
            }
          },
          "onEmpty": "error"
        }
      ]
    }
  ],
  "layoutOptimization": {
    "mode": "bounded",
    "lookAhead": 32,
    "maximumBacktracks": 2,
    "scope": "page",
    "score": {
      "areaCount": 100000,
      "unusedArea": 1,
      "raggedness": 1000,
      "overflow": 10000,
      "deferredItems": 0
    }
  }
}
