"use strict";exports.id=9970,exports.ids=[9970],exports.modules={"./src/utils/labels-file-parser.ts"(e,r,t){t.r(r),t.d(r,{parseJsonLabelsFile:()=>s,parseTomlLabelsFile:()=>a});var o=t("../../../../../../../../../../private/tmp/buildkite-job-019fcd9f-5990-4587-a03d-2002fa32284c/agent-cli-mac-macos-arm64-019fcd9f-5990-4587-a03d-2002fa32284c.ZeeOrv1W/pnpm-virtual-store/smol-toml@1.6.1/node_modules/smol-toml/dist/index.js");function s(e,r){const t=JSON.parse(e);if(Array.isArray(t)){const e=[];for(const o of t){if("object"!=typeof o||null===o||!("key"in o)||!("value"in o)||"string"!=typeof o.key||"string"!=typeof o.value)throw new Error(`Invalid label entry in ${r}: expected {key: string, value: string}`);e.push({key:o.key,value:o.value})}return e}if("object"==typeof t&&null!==t){const e=[];for(const[o,s]of Object.entries(t))if("string"==typeof s)e.push({key:o,value:s});else{if(!Array.isArray(s))throw new Error(`Invalid label value for key "${o}" in ${r}: expected string or array of strings`);for(const t of s){if("string"!=typeof t)throw new Error(`Invalid label value for key "${o}" in ${r}: array values must be strings`);e.push({key:o,value:t})}}return e}throw new Error(`Invalid labels file format in ${r}: expected array or object`)}function a(e,r){const t=(0,o.qg)(e),s=[];for(const[e,o]of Object.entries(t))if("string"==typeof o)s.push({key:e,value:o});else{if(!Array.isArray(o))throw new Error(`Invalid label value for key "${e}" in ${r}: expected string or array of strings`);for(const t of o){if("string"!=typeof t)throw new Error(`Invalid label value for key "${e}" in ${r}: array values must be strings`);s.push({key:e,value:t})}}return s}}};