[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[%
  cost_centers = [
    "1000 - Support Services"
    "1001 - Office of Chair"
    "1002 - Participation"
    "1003 - Office of CIO"
    "1005 - Corp Consolidation & Elimination"
    "1006 - Taipei Development Center"
    "1010 - Emerging Technologies"
    "1011 - Research"
    "1012 - Tech Evangelism"
    "1014 - Technology Strategy"
    "1020 - Chief of Staff"
    "1100 - Policy"
    "1120 - Legal"
    "1150 - Business Development"
    "1210 - Finance and Accounting"
    "1211 - Accounting"
    "1212 - Finance"
    "1213 - Payroll"
    "1250 - Facilities"
    "1320 - People Operations"
    "1340 - People"
    "1350 - Recruiting"
    "1370 - Organization Strategy"
    "1400 - IT and Network"
    "1410 - Infrastructure Eng and Ops (Infra)"
    "1420 - Enterprise Information Security (EIS)"
    "1430 - End User Services (EUS)"
    "1440 - Enterprise Applications and Services (EApps)"
    "2000 - General Marketing"
    "2200 - Mar Com"
    "2300 - Lifecycle Marketing"
    "2320 - Developer Marketing"
    "2400 - Brand Engagement"
    "2500 - Marketing Operations"
    "2700 - Product Marketing"
    "5000 - Firefox"
    "5010 - Advanced Technology"
    "5500 - Product Engineering"
    "5510 - Firefox Platform Engineering"
    "5650 - Services Engineering"
    "5660 - Production Cloud Infrastructure"
    "5670 - Development Cloud Infrastructure"
    "5680 - Firefox Platform Operations"
    "5700 - Firefox UX"
    "5800 - Product Management"
    "5900 - Program Management"
    "6000 - Connected Devices"
    "6110 - Connected Devices Engineering"
    "6150 - Connected Devices Program Management"
    "6200 - Connected Devices Product Management"
    "6600 - Connected Devices Strategy and Insights"
    "6650 - Connected Devices Design"
    "6700 - Connected Devices Business Operations"
    "6750 - Connected Devices Product/UX"
    "900 - Mozilla Foundation"
    "901 - MoFo NSF"
  ];

  # the above list is in a format that mirrors the output we get from our financial system
  # some forms prefer different ordering, so cut it up and reorder
  cost_centers_by_name = [];
  cost_centers_by_number = [];
  FOREACH cost_center IN cost_centers;
    matches = cost_center.match('^(\d+) - (.+)');
    cost_centers_by_name.push(matches.1 _ " (" _ matches.0 _ ")");
    num = matches.0 FILTER format("%04d");
    cost_centers_by_number.push(num _ " - " _ matches.1);
  END;
  cost_centers_by_name = cost_centers_by_name.sort;
  cost_centers = cost_centers_by_number.sort;
%]
