efiencrypt 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -168,21 +168,31 @@ const fail = (msg) => {
168
168
  throw new Error(msg);
169
169
  };
170
170
  const readBufferBinaryData = (binaryData) => binaryData.type === "buffer" ? binaryData.buffer : Buffer.from(binaryData.buffer, binaryData.type);
171
- const readFileBinaryData = (binaryData) => {
171
+ const readFileBinaryDataStream = (binaryData) => {
172
172
  const start = binaryData.offset ?? 0;
173
173
  return createReadStream(binaryData.file, {
174
174
  start,
175
175
  end: binaryData.size != null ? start + binaryData.size - 1 : Infinity
176
176
  });
177
177
  };
178
- const binaryDataVar = (codeBuilder, binaryData) => codeBuilder.createBinaryVar(binaryData.type === "file" ? readFileBinaryData(binaryData) : readBufferBinaryData(binaryData));
178
+ const readFileBinaryDataBuffer = async (binaryData) => {
179
+ const start = binaryData.offset ?? 0;
180
+ const buffer = await readFile(binaryData.file);
181
+ return start === 0 && binaryData.size == null ? buffer : buffer.subarray(start, binaryData.size != null ? start + binaryData.size - 1 : void 0);
182
+ };
183
+ const readBinaryData = async (binaryData) => {
184
+ if (binaryData.type === "file") {
185
+ return readFileBinaryDataBuffer(binaryData);
186
+ }
187
+ return readBufferBinaryData(binaryData);
188
+ };
179
189
  const hashData = async (hash, binaryData) => {
180
190
  if (binaryData.type === "missing") {
181
191
  return binaryData.size ?? 1;
182
192
  }
183
193
  if (binaryData.type === "file") {
184
194
  const count = new CountTransform();
185
- await pipeline(readFileBinaryData(binaryData), count, hash, { end: false });
195
+ await pipeline(readFileBinaryDataStream(binaryData), count, hash, { end: false });
186
196
  return count.length;
187
197
  }
188
198
  const buffer = readBufferBinaryData(binaryData);
@@ -381,6 +391,25 @@ const codeBlockGetFile = (codeBuilder, file, device) => codeBuilder.insertOnce(`
381
391
  }
382
392
  `);
383
393
  });
394
+ const codeBlockEfiVariable = (codeBuilder, varName, guid) => codeBuilder.insertOnce(`efivar:${guid}-${varName}`, (data) => {
395
+ const valueVar = codeBuilder.newVar();
396
+ codeBuilder.write(`UINTN ${valueVar}_len = 1;
397
+ uint8_t *${valueVar} = NULL;
398
+ `, "gen_compute_hash_vars");
399
+ codeBuilder.write(`FREE_POOL(${valueVar});
400
+ `, "gen_compute_hash_clean");
401
+ data.varName = valueVar;
402
+ });
403
+ const generateReadEfiVariable = (codeBuilder, varName, guid) => {
404
+ const { varName: varNameVar } = codeBlockUTF16String(codeBuilder, varName);
405
+ const { varName: guidVar } = codeBlockGuid(codeBuilder, guid);
406
+ const { varName: valueVar } = codeBlockEfiVariable(codeBuilder, varName, guid);
407
+ codeBuilder.write(`if (${valueVar}_len == 1 && ! ${valueVar}) {
408
+ ${valueVar} = LibGetVariableAndSize((void*) ${varNameVar}, (void*) ${guidVar}, &${valueVar}_len);
409
+ }
410
+ `);
411
+ return { valueVar, varNameVar, guidVar };
412
+ };
384
413
  const handlers = {
385
414
  random({ hash, codeBuilder, hashComponent }) {
386
415
  const secret = randomBytes(hashComponent.length);
@@ -389,16 +418,14 @@ const handlers = {
389
418
  codeBuilder.write(`sha256_update(hash, ${secretVar}, ${secretVar}_len);
390
419
  `);
391
420
  },
392
- async efivar({ hash, codeBuilder, hashComponent }) {
393
- await hashData(hash, hashComponent.value);
394
- const { varName: varNameVar } = codeBlockUTF16String(codeBuilder, hashComponent.name);
395
- const { varName: guidVar } = codeBlockGuid(codeBuilder, hashComponent.guid);
396
- const valueVar = codeBuilder.newVar();
397
- codeBuilder.write(`UINTN ${valueVar}_len = 0;
398
- uint8_t *${valueVar} = LibGetVariableAndSize((void*) ${varNameVar}, (void*) ${guidVar}, &${valueVar}_len);
399
- if (${valueVar}) {
421
+ async efivar({ hash, codeBuilder, hashComponent, secureBoot }) {
422
+ const value = hashComponent.value ?? secureBoot?.find(({ name, guid }) => hashComponent.name === name && hashComponent.guid === guid)?.value ?? fail(`Missing value for EFI variable ${hashComponent.guid}-${hashComponent.name}`);
423
+ if (value != "missing") {
424
+ await hashData(hash, value);
425
+ }
426
+ const { valueVar } = generateReadEfiVariable(codeBuilder, hashComponent.name, hashComponent.guid);
427
+ codeBuilder.write(`if (${valueVar}) {
400
428
  sha256_update(hash, ${valueVar}, ${valueVar}_len);
401
- FREE_POOL(${valueVar});
402
429
  }
403
430
  `);
404
431
  },
@@ -518,46 +545,84 @@ if (${valueVar}) {
518
545
  `);
519
546
  }
520
547
  };
521
- const enrollSecureBoot = async ({ codeBuilder, config: { enrollSecureBoot: enrollSecureBoot2 } }) => {
522
- if (enrollSecureBoot2) {
523
- const efiGlobalVarGuid = codeBlockGuid(codeBuilder, "8be4df61-93ca-11d2-aa0d-00e098032b8c").varName;
524
- const setupModeVariable = codeBlockUTF16String(codeBuilder, "SetupMode").varName;
525
- const varsToSet = [
526
- {
527
- name: codeBlockUTF16String(codeBuilder, "KEK").varName,
528
- guid: efiGlobalVarGuid,
529
- value: binaryDataVar(codeBuilder, enrollSecureBoot2.kek)
530
- },
531
- {
532
- name: codeBlockUTF16String(codeBuilder, "db").varName,
533
- guid: codeBlockGuid(codeBuilder, "d719b2cb-3d3a-4596-a3bc-dad00e67656f").varName,
534
- value: binaryDataVar(codeBuilder, enrollSecureBoot2.db)
535
- },
536
- {
537
- name: codeBlockUTF16String(codeBuilder, "PK").varName,
538
- guid: efiGlobalVarGuid,
539
- value: binaryDataVar(codeBuilder, enrollSecureBoot2.pk)
540
- }
541
- ];
542
- codeBuilder.write(`
543
- UINT8 byteVarContent = 0;
544
- UINTN byteVarSize = sizeof(byteVarContent);
545
- status = uefi_call_wrapper(RT->GetVariable, 5, ${setupModeVariable}, &${efiGlobalVarGuid}, NULL, &byteVarSize, &byteVarContent);
546
- if (status == EFI_SUCCESS && byteVarSize == 1 && byteVarContent) {
548
+ const toArray = (value) => value == null ? [] : Array.isArray(value) ? value : [value];
549
+ const EFI_GLOBAL_VARIABLE_GUID = "8be4df61-93ca-11d2-aa0d-00e098032b8c";
550
+ const EFI_IMAGE_SECURITY_DATABASE_GUID = "d719b2cb-3d3a-4596-a3bc-dad00e67656f";
551
+ const EFI_VAR_PK = { name: "PK", guid: EFI_GLOBAL_VARIABLE_GUID, type: "efivar" };
552
+ const EFI_VAR_KEK = { name: "KEK", guid: EFI_GLOBAL_VARIABLE_GUID, type: "efivar" };
553
+ const EFI_VAR_DB = { name: "db", guid: EFI_IMAGE_SECURITY_DATABASE_GUID, type: "efivar" };
554
+ const EFI_VAR_DBX = { name: "dbx", guid: EFI_IMAGE_SECURITY_DATABASE_GUID, type: "efivar" };
555
+ const parseAuthVar = (authVar) => {
556
+ const valueOffset = 16 + authVar.readUint32LE(16);
557
+ const auth = authVar.subarray(0, valueOffset);
558
+ const value = authVar.subarray(valueOffset);
559
+ return {
560
+ auth,
561
+ value
562
+ };
563
+ };
564
+ const generateSecureBootSetVariable = async (codeBuilder, { name, guid }, binaryData) => {
565
+ let value = null;
566
+ const auth = [];
567
+ let maxAuthLength = 0;
568
+ for (const data of toArray(binaryData)) {
569
+ const decodedData = parseAuthVar(await readBinaryData(data));
570
+ if (!value) {
571
+ value = decodedData.value;
572
+ } else if (!value.equals(decodedData.value)) {
573
+ throw new Error(`Inconsistent values for ${name}`);
574
+ }
575
+ maxAuthLength = Math.max(maxAuthLength, decodedData.auth.length);
576
+ auth.push(decodedData.auth);
577
+ }
578
+ if (!value) {
579
+ return [];
580
+ }
581
+ const expectedEfiVarValue = codeBuilder.createBinaryVar(value);
582
+ const { valueVar: efiVarValue, guidVar, varNameVar } = generateReadEfiVariable(codeBuilder, name, guid);
583
+ codeBuilder.write(`if (!${efiVarValue} || ${value.length} != ${efiVarValue}_len || RtCompareMem(${efiVarValue}, ${expectedEfiVarValue}, ${value.length}) != 0) {
584
+ `);
585
+ const authValueName = codeBuilder.newVar();
586
+ codeBuilder.write(`UINT8 *${authValueName} = AllocatePool(${value.length + maxAuthLength});
587
+ if (${authValueName}) {
588
+ RtCopyMem(&${authValueName}[${maxAuthLength}], ${expectedEfiVarValue}, ${value.length});
547
589
  `);
548
- for (const { name, guid, value } of varsToSet) {
549
- codeBuilder.write(`
550
- status = uefi_call_wrapper(RT->SetVariable, 5, ${name}, &${guid}, EFI_VARIABLE_NON_VOLATILE
590
+ let closingBraces = "";
591
+ for (const tryAuth of auth) {
592
+ const authVar = codeBuilder.createBinaryVar(tryAuth);
593
+ const pointer = `&${authValueName}[${maxAuthLength - tryAuth.length}]`;
594
+ codeBuilder.write(`
595
+ RtCopyMem(${pointer}, ${authVar}, ${tryAuth.length});
596
+ status = uefi_call_wrapper(RT->SetVariable, 5, ${varNameVar}, &${guidVar}, EFI_VARIABLE_NON_VOLATILE
551
597
  | EFI_VARIABLE_RUNTIME_ACCESS
552
598
  | EFI_VARIABLE_BOOTSERVICE_ACCESS
553
- | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS, ${value}_len, ${value});
554
- CHECK_ERROR(0);
555
- `);
556
- }
557
- codeBuilder.write(`}
599
+ | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS, ${tryAuth.length + value.length}, ${pointer});
600
+ if (status == EFI_SECURITY_VIOLATION) {
558
601
  `);
602
+ closingBraces += "}";
559
603
  }
604
+ codeBuilder.write(`${closingBraces}
605
+ FREE_POOL(${authValueName});
606
+ if (status == EFI_SUCCESS) {
607
+ FREE_POOL(${efiVarValue});
608
+ ${efiVarValue}_len = 1;
609
+ }
610
+ }}
611
+ `);
612
+ return [
613
+ {
614
+ value: { type: "buffer", buffer: value },
615
+ name,
616
+ guid
617
+ }
618
+ ];
560
619
  };
620
+ const enrollSecureBoot = async ({ codeBuilder, config: { enrollSecureBoot: enrollSecureBoot2 } }) => enrollSecureBoot2 ? [
621
+ ...await generateSecureBootSetVariable(codeBuilder, EFI_VAR_PK, enrollSecureBoot2.pk),
622
+ ...await generateSecureBootSetVariable(codeBuilder, EFI_VAR_KEK, enrollSecureBoot2.kek),
623
+ ...await generateSecureBootSetVariable(codeBuilder, EFI_VAR_DB, enrollSecureBoot2.db),
624
+ ...await generateSecureBootSetVariable(codeBuilder, EFI_VAR_DBX, enrollSecureBoot2.dbx)
625
+ ] : [];
561
626
  const genCode = async (config) => {
562
627
  const codeBuilder = new CodeBuilder("/*\n * DO NOT EDIT! This file was generated automatically!\n */\n");
563
628
  codeBuilder.addHeader('"gen-code.h"');
@@ -570,15 +635,16 @@ EFI_STATUS status = 0;
570
635
  codeBuilder.writeNewBlock("gen_compute_hash_prep");
571
636
  codeBuilder.writeNewBlock("enroll_secure_boot");
572
637
  codeBuilder.writeNewBlock("gen_compute_hash");
638
+ codeBuilder.writeNewBlock("gen_compute_hash_clean");
573
639
  codeBuilder.write("return status;\n}\n");
574
640
  codeBuilder.curBlock = "enroll_secure_boot";
575
- await enrollSecureBoot({ codeBuilder, config });
641
+ const secureBoot = await enrollSecureBoot({ codeBuilder, config });
576
642
  codeBuilder.curBlock = "gen_compute_hash";
577
643
  const hash = createHash("sha256");
578
644
  const smbios = config.smbios ? parseSmbios(await readFile(config.smbios)) : void 0;
579
645
  for (const hashComponent of config.hashComponents) {
580
646
  const handler = handlers[hashComponent.type];
581
- await handler({ hashComponent, codeBuilder, config, hash, smbios });
647
+ await handler({ hashComponent, codeBuilder, config, hash, smbios, secureBoot });
582
648
  }
583
649
  const iv = randomBytes(16);
584
650
  codeBuilder.createBinaryVar(iv, "iv");
@@ -587,23 +653,23 @@ EFI_STATUS status = 0;
587
653
  await pipeline(codeBuilder.toReadable(), createWriteStream(join(config.buildFolder, "gen-code.c")));
588
654
  };
589
655
  const validate = validate10;
590
- const schema11 = { "properties": { "$schema": { "type": "string" }, "inputFile": { "description": "Path to the input efi file to embed.", "type": "string" }, "outputFile": { "description": "Path to the output efi file to write.", "type": "string" }, "skipGenCode": { "description": "Whether to skip generating code", "type": "boolean" }, "skipExtract": { "description": "Whether to skip extracting source code\n(can be useful if the extraction was already done)", "type": "boolean" }, "skipMake": { "description": "Whether to skip calling make\n(can be useful to change the code before calling make)", "type": "boolean" }, "buildFolder": { "description": "Folder where to build the code.\nDefaults to a temporary folder that is removed when the build is finished.", "type": "string" }, "hashComponents": { "description": "Data to include in the hash for encryption.", "type": "array", "items": { "$ref": "#/definitions/HashComponent" } }, "smbios": { "description": "Path to the input smbios dump file.\nCan be produced by: dmidecode --dump-bin <filePath>", "type": "string" }, "enrollSecureBoot": { "description": "Secure boot keys to enroll automatically if the system is in setup mode.", "$ref": "#/definitions/SecureBootEnrollConfig" } } };
656
+ const schema11 = { "properties": { "$schema": { "type": "string" }, "inputFile": { "description": "Path to the input efi file to embed.", "type": "string" }, "outputFile": { "description": "Path to the output efi file to write.", "type": "string" }, "skipGenCode": { "description": "Whether to skip generating code", "type": "boolean" }, "skipExtract": { "description": "Whether to skip extracting source code\n(can be useful if the extraction was already done)", "type": "boolean" }, "skipMake": { "description": "Whether to skip calling make\n(can be useful to change the code before calling make)", "type": "boolean" }, "buildFolder": { "description": "Folder where to build the code.\nDefaults to a temporary folder that is removed when the build is finished.", "type": "string" }, "hashComponents": { "description": "Data to include in the hash for encryption.", "type": "array", "items": { "$ref": "#/definitions/HashComponent" } }, "smbios": { "description": "Path to the input smbios dump file.\nCan be produced by: dmidecode --dump-bin <filePath>", "type": "string" }, "enrollSecureBoot": { "description": "Secure boot keys to enroll automatically if the keys to enroll are different than already installed keys.", "$ref": "#/definitions/SecureBootEnrollConfig" } } };
591
657
  const func2 = Object.prototype.hasOwnProperty;
592
- const schema36 = { "properties": { "type": { "enum": ["boot-file", "boot-hd-device", "boot-partition-device"] } } };
593
- const schema18 = { "enum": ["ascii", "base64", "base64url", "binary", "hex", "latin1", "ucs-2", "ucs2", "utf-16le", "utf-8", "utf16le", "utf8"] };
594
- function validate14(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
658
+ const schema35 = { "properties": { "type": { "enum": ["boot-file", "boot-hd-device", "boot-partition-device"] } } };
659
+ const schema17 = { "enum": ["ascii", "base64", "base64url", "binary", "hex", "latin1", "ucs-2", "ucs2", "utf-16le", "utf-8", "utf16le", "utf8"] };
660
+ function validate13(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
595
661
  let vErrors = null;
596
662
  let errors = 0;
597
663
  {
598
664
  if (data && typeof data == "object" && !Array.isArray(data)) {
599
665
  let missing0;
600
666
  if (data.buffer === void 0 && (missing0 = "buffer") || data.type === void 0 && (missing0 = "type")) {
601
- validate14.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
667
+ validate13.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
602
668
  return false;
603
669
  } else {
604
670
  for (const key0 in data) {
605
671
  if (!(key0 === "type" || key0 === "buffer")) {
606
- validate14.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
672
+ validate13.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
607
673
  return false;
608
674
  }
609
675
  }
@@ -612,11 +678,11 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
612
678
  let data0 = data.type;
613
679
  const _errs2 = errors;
614
680
  if (typeof data0 !== "string") {
615
- validate14.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/definitions/global.BufferEncoding/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
681
+ validate13.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/definitions/global.BufferEncoding/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
616
682
  return false;
617
683
  }
618
684
  if (!(data0 === "ascii" || data0 === "base64" || data0 === "base64url" || data0 === "binary" || data0 === "hex" || data0 === "latin1" || data0 === "ucs-2" || data0 === "ucs2" || data0 === "utf-16le" || data0 === "utf-8" || data0 === "utf16le" || data0 === "utf8")) {
619
- validate14.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/definitions/global.BufferEncoding/enum", keyword: "enum", params: { allowedValues: schema18.enum }, message: "must be equal to one of the allowed values" }];
685
+ validate13.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/definitions/global.BufferEncoding/enum", keyword: "enum", params: { allowedValues: schema17.enum }, message: "must be equal to one of the allowed values" }];
620
686
  return false;
621
687
  }
622
688
  var valid0 = _errs2 === errors;
@@ -627,7 +693,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
627
693
  if (data.buffer !== void 0) {
628
694
  const _errs5 = errors;
629
695
  if (typeof data.buffer !== "string") {
630
- validate14.errors = [{ instancePath: instancePath + "/buffer", schemaPath: "#/properties/buffer/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
696
+ validate13.errors = [{ instancePath: instancePath + "/buffer", schemaPath: "#/properties/buffer/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
631
697
  return false;
632
698
  }
633
699
  var valid0 = _errs5 === errors;
@@ -638,318 +704,332 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
638
704
  }
639
705
  }
640
706
  } else {
641
- validate14.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
707
+ validate13.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
642
708
  return false;
643
709
  }
644
710
  }
645
- validate14.errors = vErrors;
711
+ validate13.errors = vErrors;
646
712
  return errors === 0;
647
713
  }
648
- function validate13(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
714
+ function validate12(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
649
715
  let vErrors = null;
650
716
  let errors = 0;
651
- const _errs0 = errors;
652
- let valid0 = false;
653
- const _errs1 = errors;
654
- const _errs2 = errors;
655
- if (errors === _errs2) {
717
+ if (errors === 0) {
656
718
  if (data && typeof data == "object" && !Array.isArray(data)) {
657
719
  let missing0;
658
- if (data.file === void 0 && (missing0 = "file") || data.type === void 0 && (missing0 = "type")) {
659
- const err0 = { instancePath, schemaPath: "#/definitions/BinaryDataFromFile/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" };
660
- if (vErrors === null) {
661
- vErrors = [err0];
662
- } else {
663
- vErrors.push(err0);
664
- }
665
- errors++;
720
+ if (data.guid === void 0 && (missing0 = "guid") || data.name === void 0 && (missing0 = "name") || data.type === void 0 && (missing0 = "type")) {
721
+ validate12.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
722
+ return false;
666
723
  } else {
667
- const _errs4 = errors;
724
+ const _errs1 = errors;
668
725
  for (const key0 in data) {
669
- if (!(key0 === "type" || key0 === "file" || key0 === "offset" || key0 === "size")) {
670
- const err1 = { instancePath, schemaPath: "#/definitions/BinaryDataFromFile/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
671
- if (vErrors === null) {
672
- vErrors = [err1];
673
- } else {
674
- vErrors.push(err1);
675
- }
676
- errors++;
677
- break;
726
+ if (!(key0 === "type" || key0 === "guid" || key0 === "name" || key0 === "value")) {
727
+ validate12.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
728
+ return false;
678
729
  }
679
730
  }
680
- if (_errs4 === errors) {
731
+ if (_errs1 === errors) {
681
732
  if (data.type !== void 0) {
682
733
  let data0 = data.type;
683
- const _errs5 = errors;
734
+ const _errs2 = errors;
684
735
  if (typeof data0 !== "string") {
685
- const err2 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
686
- if (vErrors === null) {
687
- vErrors = [err2];
688
- } else {
689
- vErrors.push(err2);
690
- }
691
- errors++;
736
+ validate12.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
737
+ return false;
692
738
  }
693
- if ("file" !== data0) {
694
- const err3 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/const", keyword: "const", params: { allowedValue: "file" }, message: "must be equal to constant" };
695
- if (vErrors === null) {
696
- vErrors = [err3];
697
- } else {
698
- vErrors.push(err3);
699
- }
700
- errors++;
739
+ if ("efivar" !== data0) {
740
+ validate12.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "efivar" }, message: "must be equal to constant" }];
741
+ return false;
701
742
  }
702
- var valid2 = _errs5 === errors;
743
+ var valid0 = _errs2 === errors;
703
744
  } else {
704
- var valid2 = true;
745
+ var valid0 = true;
705
746
  }
706
- if (valid2) {
707
- if (data.file !== void 0) {
708
- const _errs7 = errors;
709
- if (typeof data.file !== "string") {
710
- const err4 = { instancePath: instancePath + "/file", schemaPath: "#/definitions/BinaryDataFromFile/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" };
711
- if (vErrors === null) {
712
- vErrors = [err4];
713
- } else {
714
- vErrors.push(err4);
715
- }
716
- errors++;
747
+ if (valid0) {
748
+ if (data.guid !== void 0) {
749
+ const _errs4 = errors;
750
+ if (typeof data.guid !== "string") {
751
+ validate12.errors = [{ instancePath: instancePath + "/guid", schemaPath: "#/properties/guid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
752
+ return false;
717
753
  }
718
- var valid2 = _errs7 === errors;
754
+ var valid0 = _errs4 === errors;
719
755
  } else {
720
- var valid2 = true;
756
+ var valid0 = true;
721
757
  }
722
- if (valid2) {
723
- if (data.offset !== void 0) {
724
- let data2 = data.offset;
725
- const _errs9 = errors;
726
- if (!(typeof data2 == "number" && isFinite(data2))) {
727
- const err5 = { instancePath: instancePath + "/offset", schemaPath: "#/definitions/BinaryDataFromFile/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number" };
728
- if (vErrors === null) {
729
- vErrors = [err5];
730
- } else {
731
- vErrors.push(err5);
732
- }
733
- errors++;
758
+ if (valid0) {
759
+ if (data.name !== void 0) {
760
+ const _errs6 = errors;
761
+ if (typeof data.name !== "string") {
762
+ validate12.errors = [{ instancePath: instancePath + "/name", schemaPath: "#/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
763
+ return false;
734
764
  }
735
- var valid2 = _errs9 === errors;
765
+ var valid0 = _errs6 === errors;
736
766
  } else {
737
- var valid2 = true;
767
+ var valid0 = true;
738
768
  }
739
- if (valid2) {
740
- if (data.size !== void 0) {
741
- let data3 = data.size;
769
+ if (valid0) {
770
+ if (data.value !== void 0) {
771
+ let data3 = data.value;
772
+ const _errs8 = errors;
773
+ const _errs9 = errors;
774
+ let valid1 = false;
775
+ const _errs10 = errors;
742
776
  const _errs11 = errors;
743
- if (!(typeof data3 == "number" && isFinite(data3))) {
744
- const err6 = { instancePath: instancePath + "/size", schemaPath: "#/definitions/BinaryDataFromFile/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
745
- if (vErrors === null) {
746
- vErrors = [err6];
777
+ if (errors === _errs11) {
778
+ if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
779
+ let missing1;
780
+ if (data3.file === void 0 && (missing1 = "file") || data3.type === void 0 && (missing1 = "type")) {
781
+ const err0 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/BinaryDataFromFile/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
782
+ if (vErrors === null) {
783
+ vErrors = [err0];
784
+ } else {
785
+ vErrors.push(err0);
786
+ }
787
+ errors++;
788
+ } else {
789
+ const _errs13 = errors;
790
+ for (const key1 in data3) {
791
+ if (!(key1 === "type" || key1 === "file" || key1 === "offset" || key1 === "size")) {
792
+ const err1 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/BinaryDataFromFile/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
793
+ if (vErrors === null) {
794
+ vErrors = [err1];
795
+ } else {
796
+ vErrors.push(err1);
797
+ }
798
+ errors++;
799
+ break;
800
+ }
801
+ }
802
+ if (_errs13 === errors) {
803
+ if (data3.type !== void 0) {
804
+ let data4 = data3.type;
805
+ const _errs14 = errors;
806
+ if (typeof data4 !== "string") {
807
+ const err2 = { instancePath: instancePath + "/value/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
808
+ if (vErrors === null) {
809
+ vErrors = [err2];
810
+ } else {
811
+ vErrors.push(err2);
812
+ }
813
+ errors++;
814
+ }
815
+ if ("file" !== data4) {
816
+ const err3 = { instancePath: instancePath + "/value/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/const", keyword: "const", params: { allowedValue: "file" }, message: "must be equal to constant" };
817
+ if (vErrors === null) {
818
+ vErrors = [err3];
819
+ } else {
820
+ vErrors.push(err3);
821
+ }
822
+ errors++;
823
+ }
824
+ var valid3 = _errs14 === errors;
825
+ } else {
826
+ var valid3 = true;
827
+ }
828
+ if (valid3) {
829
+ if (data3.file !== void 0) {
830
+ const _errs16 = errors;
831
+ if (typeof data3.file !== "string") {
832
+ const err4 = { instancePath: instancePath + "/value/file", schemaPath: "#/definitions/BinaryDataFromFile/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" };
833
+ if (vErrors === null) {
834
+ vErrors = [err4];
835
+ } else {
836
+ vErrors.push(err4);
837
+ }
838
+ errors++;
839
+ }
840
+ var valid3 = _errs16 === errors;
841
+ } else {
842
+ var valid3 = true;
843
+ }
844
+ if (valid3) {
845
+ if (data3.offset !== void 0) {
846
+ let data6 = data3.offset;
847
+ const _errs18 = errors;
848
+ if (!(typeof data6 == "number" && isFinite(data6))) {
849
+ const err5 = { instancePath: instancePath + "/value/offset", schemaPath: "#/definitions/BinaryDataFromFile/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number" };
850
+ if (vErrors === null) {
851
+ vErrors = [err5];
852
+ } else {
853
+ vErrors.push(err5);
854
+ }
855
+ errors++;
856
+ }
857
+ var valid3 = _errs18 === errors;
858
+ } else {
859
+ var valid3 = true;
860
+ }
861
+ if (valid3) {
862
+ if (data3.size !== void 0) {
863
+ let data7 = data3.size;
864
+ const _errs20 = errors;
865
+ if (!(typeof data7 == "number" && isFinite(data7))) {
866
+ const err6 = { instancePath: instancePath + "/value/size", schemaPath: "#/definitions/BinaryDataFromFile/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
867
+ if (vErrors === null) {
868
+ vErrors = [err6];
869
+ } else {
870
+ vErrors.push(err6);
871
+ }
872
+ errors++;
873
+ }
874
+ var valid3 = _errs20 === errors;
875
+ } else {
876
+ var valid3 = true;
877
+ }
878
+ }
879
+ }
880
+ }
881
+ }
882
+ }
747
883
  } else {
748
- vErrors.push(err6);
884
+ const err7 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/BinaryDataFromFile/type", keyword: "type", params: { type: "object" }, message: "must be object" };
885
+ if (vErrors === null) {
886
+ vErrors = [err7];
887
+ } else {
888
+ vErrors.push(err7);
889
+ }
890
+ errors++;
749
891
  }
750
- errors++;
751
892
  }
752
- var valid2 = _errs11 === errors;
753
- } else {
754
- var valid2 = true;
755
- }
756
- }
757
- }
758
- }
759
- }
760
- }
761
- } else {
762
- const err7 = { instancePath, schemaPath: "#/definitions/BinaryDataFromFile/type", keyword: "type", params: { type: "object" }, message: "must be object" };
763
- if (vErrors === null) {
764
- vErrors = [err7];
765
- } else {
766
- vErrors.push(err7);
767
- }
768
- errors++;
769
- }
770
- }
771
- var _valid0 = _errs1 === errors;
772
- valid0 = valid0 || _valid0;
773
- if (!valid0) {
774
- const _errs13 = errors;
775
- if (!validate14(data, { instancePath, parentData, parentDataProperty, rootData })) {
776
- vErrors = vErrors === null ? validate14.errors : vErrors.concat(validate14.errors);
777
- errors = vErrors.length;
778
- }
779
- var _valid0 = _errs13 === errors;
780
- valid0 = valid0 || _valid0;
781
- if (!valid0) {
782
- const _errs14 = errors;
783
- const _errs15 = errors;
784
- if (errors === _errs15) {
785
- if (data && typeof data == "object" && !Array.isArray(data)) {
786
- let missing1;
787
- if (data.buffer === void 0 && (missing1 = "buffer") || data.type === void 0 && (missing1 = "type")) {
788
- const err8 = { instancePath, schemaPath: "#/definitions/BinaryDataFromBuffer/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
789
- if (vErrors === null) {
790
- vErrors = [err8];
791
- } else {
792
- vErrors.push(err8);
793
- }
794
- errors++;
795
- } else {
796
- const _errs17 = errors;
797
- for (const key1 in data) {
798
- if (!(key1 === "type" || key1 === "buffer")) {
799
- const err9 = { instancePath, schemaPath: "#/definitions/BinaryDataFromBuffer/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
800
- if (vErrors === null) {
801
- vErrors = [err9];
802
- } else {
803
- vErrors.push(err9);
804
- }
805
- errors++;
806
- break;
807
- }
808
- }
809
- if (_errs17 === errors) {
810
- if (data.type !== void 0) {
811
- let data4 = data.type;
812
- const _errs18 = errors;
813
- if (typeof data4 !== "string") {
814
- const err10 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
815
- if (vErrors === null) {
816
- vErrors = [err10];
817
- } else {
818
- vErrors.push(err10);
819
- }
820
- errors++;
821
- }
822
- if ("buffer" !== data4) {
823
- const err11 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/const", keyword: "const", params: { allowedValue: "buffer" }, message: "must be equal to constant" };
824
- if (vErrors === null) {
825
- vErrors = [err11];
826
- } else {
827
- vErrors.push(err11);
893
+ var _valid0 = _errs10 === errors;
894
+ valid1 = valid1 || _valid0;
895
+ if (!valid1) {
896
+ const _errs22 = errors;
897
+ if (!validate13(data3, { instancePath: instancePath + "/value", parentData: data, parentDataProperty: "value", rootData })) {
898
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
899
+ errors = vErrors.length;
900
+ }
901
+ var _valid0 = _errs22 === errors;
902
+ valid1 = valid1 || _valid0;
903
+ if (!valid1) {
904
+ const _errs23 = errors;
905
+ const _errs24 = errors;
906
+ if (errors === _errs24) {
907
+ if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
908
+ let missing2;
909
+ if (data3.buffer === void 0 && (missing2 = "buffer") || data3.type === void 0 && (missing2 = "type")) {
910
+ const err8 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/BinaryDataFromBuffer/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
911
+ if (vErrors === null) {
912
+ vErrors = [err8];
913
+ } else {
914
+ vErrors.push(err8);
915
+ }
916
+ errors++;
917
+ } else {
918
+ const _errs26 = errors;
919
+ for (const key2 in data3) {
920
+ if (!(key2 === "type" || key2 === "buffer")) {
921
+ const err9 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/BinaryDataFromBuffer/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
922
+ if (vErrors === null) {
923
+ vErrors = [err9];
924
+ } else {
925
+ vErrors.push(err9);
926
+ }
927
+ errors++;
928
+ break;
929
+ }
930
+ }
931
+ if (_errs26 === errors) {
932
+ if (data3.type !== void 0) {
933
+ let data8 = data3.type;
934
+ const _errs27 = errors;
935
+ if (typeof data8 !== "string") {
936
+ const err10 = { instancePath: instancePath + "/value/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
937
+ if (vErrors === null) {
938
+ vErrors = [err10];
939
+ } else {
940
+ vErrors.push(err10);
941
+ }
942
+ errors++;
943
+ }
944
+ if ("buffer" !== data8) {
945
+ const err11 = { instancePath: instancePath + "/value/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/const", keyword: "const", params: { allowedValue: "buffer" }, message: "must be equal to constant" };
946
+ if (vErrors === null) {
947
+ vErrors = [err11];
948
+ } else {
949
+ vErrors.push(err11);
950
+ }
951
+ errors++;
952
+ }
953
+ var valid5 = _errs27 === errors;
954
+ } else {
955
+ var valid5 = true;
956
+ }
957
+ if (valid5) {
958
+ if (data3.buffer !== void 0) {
959
+ let data9 = data3.buffer;
960
+ const _errs29 = errors;
961
+ if (!(data9 && typeof data9 == "object" && !Array.isArray(data9))) {
962
+ const err12 = { instancePath: instancePath + "/value/buffer", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/buffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
963
+ if (vErrors === null) {
964
+ vErrors = [err12];
965
+ } else {
966
+ vErrors.push(err12);
967
+ }
968
+ errors++;
969
+ }
970
+ var valid5 = _errs29 === errors;
971
+ } else {
972
+ var valid5 = true;
973
+ }
974
+ }
975
+ }
976
+ }
977
+ } else {
978
+ const err13 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/BinaryDataFromBuffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
979
+ if (vErrors === null) {
980
+ vErrors = [err13];
981
+ } else {
982
+ vErrors.push(err13);
983
+ }
984
+ errors++;
985
+ }
986
+ }
987
+ var _valid0 = _errs23 === errors;
988
+ valid1 = valid1 || _valid0;
989
+ if (!valid1) {
990
+ const _errs31 = errors;
991
+ if (typeof data3 !== "string") {
992
+ const err14 = { instancePath: instancePath + "/value", schemaPath: "#/properties/value/anyOf/3/type", keyword: "type", params: { type: "string" }, message: "must be string" };
993
+ if (vErrors === null) {
994
+ vErrors = [err14];
995
+ } else {
996
+ vErrors.push(err14);
997
+ }
998
+ errors++;
999
+ }
1000
+ if ("missing" !== data3) {
1001
+ const err15 = { instancePath: instancePath + "/value", schemaPath: "#/properties/value/anyOf/3/const", keyword: "const", params: { allowedValue: "missing" }, message: "must be equal to constant" };
1002
+ if (vErrors === null) {
1003
+ vErrors = [err15];
1004
+ } else {
1005
+ vErrors.push(err15);
1006
+ }
1007
+ errors++;
1008
+ }
1009
+ var _valid0 = _errs31 === errors;
1010
+ valid1 = valid1 || _valid0;
1011
+ }
1012
+ }
828
1013
  }
829
- errors++;
830
- }
831
- var valid4 = _errs18 === errors;
832
- } else {
833
- var valid4 = true;
834
- }
835
- if (valid4) {
836
- if (data.buffer !== void 0) {
837
- let data5 = data.buffer;
838
- const _errs20 = errors;
839
- if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
840
- const err12 = { instancePath: instancePath + "/buffer", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/buffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
1014
+ if (!valid1) {
1015
+ const err16 = { instancePath: instancePath + "/value", schemaPath: "#/properties/value/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
841
1016
  if (vErrors === null) {
842
- vErrors = [err12];
1017
+ vErrors = [err16];
843
1018
  } else {
844
- vErrors.push(err12);
1019
+ vErrors.push(err16);
845
1020
  }
846
1021
  errors++;
847
- }
848
- var valid4 = _errs20 === errors;
849
- } else {
850
- var valid4 = true;
851
- }
852
- }
853
- }
854
- }
855
- } else {
856
- const err13 = { instancePath, schemaPath: "#/definitions/BinaryDataFromBuffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
857
- if (vErrors === null) {
858
- vErrors = [err13];
859
- } else {
860
- vErrors.push(err13);
861
- }
862
- errors++;
863
- }
864
- }
865
- var _valid0 = _errs14 === errors;
866
- valid0 = valid0 || _valid0;
867
- }
868
- }
869
- if (!valid0) {
870
- const err14 = { instancePath, schemaPath: "#/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
871
- if (vErrors === null) {
872
- vErrors = [err14];
873
- } else {
874
- vErrors.push(err14);
875
- }
876
- errors++;
877
- validate13.errors = vErrors;
878
- return false;
879
- } else {
880
- errors = _errs0;
881
- if (vErrors !== null) {
882
- if (_errs0) {
883
- vErrors.length = _errs0;
884
- } else {
885
- vErrors = null;
886
- }
887
- }
888
- }
889
- validate13.errors = vErrors;
890
- return errors === 0;
891
- }
892
- function validate12(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
893
- let vErrors = null;
894
- let errors = 0;
895
- if (errors === 0) {
896
- if (data && typeof data == "object" && !Array.isArray(data)) {
897
- let missing0;
898
- if (data.guid === void 0 && (missing0 = "guid") || data.name === void 0 && (missing0 = "name") || data.type === void 0 && (missing0 = "type") || data.value === void 0 && (missing0 = "value")) {
899
- validate12.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
900
- return false;
901
- } else {
902
- const _errs1 = errors;
903
- for (const key0 in data) {
904
- if (!(key0 === "type" || key0 === "guid" || key0 === "name" || key0 === "value")) {
905
- validate12.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
906
- return false;
907
- }
908
- }
909
- if (_errs1 === errors) {
910
- if (data.type !== void 0) {
911
- let data0 = data.type;
912
- const _errs2 = errors;
913
- if (typeof data0 !== "string") {
914
- validate12.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
915
- return false;
916
- }
917
- if ("efivar" !== data0) {
918
- validate12.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "efivar" }, message: "must be equal to constant" }];
919
- return false;
920
- }
921
- var valid0 = _errs2 === errors;
922
- } else {
923
- var valid0 = true;
924
- }
925
- if (valid0) {
926
- if (data.guid !== void 0) {
927
- const _errs4 = errors;
928
- if (typeof data.guid !== "string") {
929
- validate12.errors = [{ instancePath: instancePath + "/guid", schemaPath: "#/properties/guid/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
930
- return false;
931
- }
932
- var valid0 = _errs4 === errors;
933
- } else {
934
- var valid0 = true;
935
- }
936
- if (valid0) {
937
- if (data.name !== void 0) {
938
- const _errs6 = errors;
939
- if (typeof data.name !== "string") {
940
- validate12.errors = [{ instancePath: instancePath + "/name", schemaPath: "#/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
941
- return false;
942
- }
943
- var valid0 = _errs6 === errors;
944
- } else {
945
- var valid0 = true;
946
- }
947
- if (valid0) {
948
- if (data.value !== void 0) {
949
- const _errs8 = errors;
950
- if (!validate13(data.value, { instancePath: instancePath + "/value", parentData: data, parentDataProperty: "value", rootData })) {
951
- vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
952
- errors = vErrors.length;
1022
+ validate12.errors = vErrors;
1023
+ return false;
1024
+ } else {
1025
+ errors = _errs9;
1026
+ if (vErrors !== null) {
1027
+ if (_errs9) {
1028
+ vErrors.length = _errs9;
1029
+ } else {
1030
+ vErrors = null;
1031
+ }
1032
+ }
953
1033
  }
954
1034
  var valid0 = _errs8 === errors;
955
1035
  } else {
@@ -968,9 +1048,9 @@ function validate12(data, { instancePath = "", parentData, parentDataProperty, r
968
1048
  validate12.errors = vErrors;
969
1049
  return errors === 0;
970
1050
  }
971
- const schema21 = { "anyOf": [{ "type": "object", "properties": { "table": { "$ref": "#/definitions/SmbiosTableRef" }, "offset": { "type": "number" }, "type": { "enum": ["byte", "dword", "qword", "string", "uuid", "word"], "type": "string" } }, "additionalProperties": false, "required": ["offset", "table", "type"] }, { "enum": ["baseboard-asset-tag", "baseboard-manufacturer", "baseboard-product-name", "baseboard-serial-number", "baseboard-version", "bios-release-date", "bios-revision", "bios-vendor", "bios-version", "chassis-asset-tag", "chassis-manufacturer", "chassis-serial-number", "chassis-version", "processor-manufacturer", "processor-version", "system-family", "system-manufacturer", "system-product-name", "system-serial-number", "system-sku-number", "system-uuid", "system-version"], "type": "string" }] };
972
- const schema22 = { "anyOf": [{ "type": "object", "properties": { "handle": { "type": "number" } }, "additionalProperties": false, "required": ["handle"] }, { "type": "object", "properties": { "type": { "type": "number" }, "index": { "type": "number" } }, "additionalProperties": false, "required": ["type"] }, { "enum": ["32-bit Memory Error", "64-bit Memory Error", "Additional Information", "Baseboard", "Boot Integrity Services", "Built-in Pointing Device", "Cache", "Chassis", "Cooling Device", "Electrical Current Probe", "Firmware Inventory", "Firmware Language", "Group Associations", "Hardware Security", "IPMI Device", "Management Controller Host Interface", "Management Device", "Management Device Component", "Management Device Threshold Data", "Memory Array Mapped Address", "Memory Channel", "Memory Controller", "Memory Device", "Memory Device Mapped Address", "Memory Module", "OEM Strings", "Onboard Devices", "Onboard Devices Extended Information", "Out-of-band Remote Access", "Physical Memory Array", "Platform Firmware", "Port Connector", "Portable Battery", "Power Supply", "Processor", "Processor Additional Information", "String Property", "System", "System Boot", "System Configuration Options", "System Event Log", "System Power Controls", "System Reset", "System Slots", "TPM Device", "Temperature Probe", "Voltage Probe"], "type": "string" }, { "type": "number" }] };
973
- function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1051
+ const schema20 = { "anyOf": [{ "type": "object", "properties": { "table": { "$ref": "#/definitions/SmbiosTableRef" }, "offset": { "type": "number" }, "type": { "enum": ["byte", "dword", "qword", "string", "uuid", "word"], "type": "string" } }, "additionalProperties": false, "required": ["offset", "table", "type"] }, { "enum": ["baseboard-asset-tag", "baseboard-manufacturer", "baseboard-product-name", "baseboard-serial-number", "baseboard-version", "bios-release-date", "bios-revision", "bios-vendor", "bios-version", "chassis-asset-tag", "chassis-manufacturer", "chassis-serial-number", "chassis-version", "processor-manufacturer", "processor-version", "system-family", "system-manufacturer", "system-product-name", "system-serial-number", "system-sku-number", "system-uuid", "system-version"], "type": "string" }] };
1052
+ const schema21 = { "anyOf": [{ "type": "object", "properties": { "handle": { "type": "number" } }, "additionalProperties": false, "required": ["handle"] }, { "type": "object", "properties": { "type": { "type": "number" }, "index": { "type": "number" } }, "additionalProperties": false, "required": ["type"] }, { "enum": ["32-bit Memory Error", "64-bit Memory Error", "Additional Information", "Baseboard", "Boot Integrity Services", "Built-in Pointing Device", "Cache", "Chassis", "Cooling Device", "Electrical Current Probe", "Firmware Inventory", "Firmware Language", "Group Associations", "Hardware Security", "IPMI Device", "Management Controller Host Interface", "Management Device", "Management Device Component", "Management Device Threshold Data", "Memory Array Mapped Address", "Memory Channel", "Memory Controller", "Memory Device", "Memory Device Mapped Address", "Memory Module", "OEM Strings", "Onboard Devices", "Onboard Devices Extended Information", "Out-of-band Remote Access", "Physical Memory Array", "Platform Firmware", "Port Connector", "Portable Battery", "Power Supply", "Processor", "Processor Additional Information", "String Property", "System", "System Boot", "System Configuration Options", "System Event Log", "System Power Controls", "System Reset", "System Slots", "TPM Device", "Temperature Probe", "Voltage Probe"], "type": "string" }, { "type": "number" }] };
1053
+ function validate17(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
974
1054
  let vErrors = null;
975
1055
  let errors = 0;
976
1056
  const _errs0 = errors;
@@ -1148,7 +1228,7 @@ function validate19(data, { instancePath = "", parentData, parentDataProperty, r
1148
1228
  errors++;
1149
1229
  }
1150
1230
  if (!(data0 === "32-bit Memory Error" || data0 === "64-bit Memory Error" || data0 === "Additional Information" || data0 === "Baseboard" || data0 === "Boot Integrity Services" || data0 === "Built-in Pointing Device" || data0 === "Cache" || data0 === "Chassis" || data0 === "Cooling Device" || data0 === "Electrical Current Probe" || data0 === "Firmware Inventory" || data0 === "Firmware Language" || data0 === "Group Associations" || data0 === "Hardware Security" || data0 === "IPMI Device" || data0 === "Management Controller Host Interface" || data0 === "Management Device" || data0 === "Management Device Component" || data0 === "Management Device Threshold Data" || data0 === "Memory Array Mapped Address" || data0 === "Memory Channel" || data0 === "Memory Controller" || data0 === "Memory Device" || data0 === "Memory Device Mapped Address" || data0 === "Memory Module" || data0 === "OEM Strings" || data0 === "Onboard Devices" || data0 === "Onboard Devices Extended Information" || data0 === "Out-of-band Remote Access" || data0 === "Physical Memory Array" || data0 === "Platform Firmware" || data0 === "Port Connector" || data0 === "Portable Battery" || data0 === "Power Supply" || data0 === "Processor" || data0 === "Processor Additional Information" || data0 === "String Property" || data0 === "System" || data0 === "System Boot" || data0 === "System Configuration Options" || data0 === "System Event Log" || data0 === "System Power Controls" || data0 === "System Reset" || data0 === "System Slots" || data0 === "TPM Device" || data0 === "Temperature Probe" || data0 === "Voltage Probe")) {
1151
- const err12 = { instancePath: instancePath + "/table", schemaPath: "#/definitions/SmbiosTableRef/anyOf/2/enum", keyword: "enum", params: { allowedValues: schema22.anyOf[2].enum }, message: "must be equal to one of the allowed values" };
1231
+ const err12 = { instancePath: instancePath + "/table", schemaPath: "#/definitions/SmbiosTableRef/anyOf/2/enum", keyword: "enum", params: { allowedValues: schema21.anyOf[2].enum }, message: "must be equal to one of the allowed values" };
1152
1232
  if (vErrors === null) {
1153
1233
  vErrors = [err12];
1154
1234
  } else {
@@ -1227,7 +1307,7 @@ function validate19(data, { instancePath = "", parentData, parentDataProperty, r
1227
1307
  errors++;
1228
1308
  }
1229
1309
  if (!(data5 === "byte" || data5 === "dword" || data5 === "qword" || data5 === "string" || data5 === "uuid" || data5 === "word")) {
1230
- const err17 = { instancePath: instancePath + "/type", schemaPath: "#/anyOf/0/properties/type/enum", keyword: "enum", params: { allowedValues: schema21.anyOf[0].properties.type.enum }, message: "must be equal to one of the allowed values" };
1310
+ const err17 = { instancePath: instancePath + "/type", schemaPath: "#/anyOf/0/properties/type/enum", keyword: "enum", params: { allowedValues: schema20.anyOf[0].properties.type.enum }, message: "must be equal to one of the allowed values" };
1231
1311
  if (vErrors === null) {
1232
1312
  vErrors = [err17];
1233
1313
  } else {
@@ -1267,7 +1347,7 @@ function validate19(data, { instancePath = "", parentData, parentDataProperty, r
1267
1347
  errors++;
1268
1348
  }
1269
1349
  if (!(data === "baseboard-asset-tag" || data === "baseboard-manufacturer" || data === "baseboard-product-name" || data === "baseboard-serial-number" || data === "baseboard-version" || data === "bios-release-date" || data === "bios-revision" || data === "bios-vendor" || data === "bios-version" || data === "chassis-asset-tag" || data === "chassis-manufacturer" || data === "chassis-serial-number" || data === "chassis-version" || data === "processor-manufacturer" || data === "processor-version" || data === "system-family" || data === "system-manufacturer" || data === "system-product-name" || data === "system-serial-number" || data === "system-sku-number" || data === "system-uuid" || data === "system-version")) {
1270
- const err20 = { instancePath, schemaPath: "#/anyOf/1/enum", keyword: "enum", params: { allowedValues: schema21.anyOf[1].enum }, message: "must be equal to one of the allowed values" };
1350
+ const err20 = { instancePath, schemaPath: "#/anyOf/1/enum", keyword: "enum", params: { allowedValues: schema20.anyOf[1].enum }, message: "must be equal to one of the allowed values" };
1271
1351
  if (vErrors === null) {
1272
1352
  vErrors = [err20];
1273
1353
  } else {
@@ -1286,7 +1366,7 @@ function validate19(data, { instancePath = "", parentData, parentDataProperty, r
1286
1366
  vErrors.push(err21);
1287
1367
  }
1288
1368
  errors++;
1289
- validate19.errors = vErrors;
1369
+ validate17.errors = vErrors;
1290
1370
  return false;
1291
1371
  } else {
1292
1372
  errors = _errs0;
@@ -1298,23 +1378,23 @@ function validate19(data, { instancePath = "", parentData, parentDataProperty, r
1298
1378
  }
1299
1379
  }
1300
1380
  }
1301
- validate19.errors = vErrors;
1381
+ validate17.errors = vErrors;
1302
1382
  return errors === 0;
1303
1383
  }
1304
- function validate18(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1384
+ function validate16(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1305
1385
  let vErrors = null;
1306
1386
  let errors = 0;
1307
1387
  if (errors === 0) {
1308
1388
  if (data && typeof data == "object" && !Array.isArray(data)) {
1309
1389
  let missing0;
1310
1390
  if (data.ref === void 0 && (missing0 = "ref") || data.type === void 0 && (missing0 = "type")) {
1311
- validate18.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1391
+ validate16.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1312
1392
  return false;
1313
1393
  } else {
1314
1394
  const _errs1 = errors;
1315
1395
  for (const key0 in data) {
1316
1396
  if (!(key0 === "type" || key0 === "ref" || key0 === "value")) {
1317
- validate18.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1397
+ validate16.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1318
1398
  return false;
1319
1399
  }
1320
1400
  }
@@ -1323,11 +1403,11 @@ function validate18(data, { instancePath = "", parentData, parentDataProperty, r
1323
1403
  let data0 = data.type;
1324
1404
  const _errs2 = errors;
1325
1405
  if (typeof data0 !== "string") {
1326
- validate18.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1406
+ validate16.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1327
1407
  return false;
1328
1408
  }
1329
1409
  if ("smbios" !== data0) {
1330
- validate18.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "smbios" }, message: "must be equal to constant" }];
1410
+ validate16.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "smbios" }, message: "must be equal to constant" }];
1331
1411
  return false;
1332
1412
  }
1333
1413
  var valid0 = _errs2 === errors;
@@ -1337,8 +1417,8 @@ function validate18(data, { instancePath = "", parentData, parentDataProperty, r
1337
1417
  if (valid0) {
1338
1418
  if (data.ref !== void 0) {
1339
1419
  const _errs4 = errors;
1340
- if (!validate19(data.ref, { instancePath: instancePath + "/ref", parentData: data, parentDataProperty: "ref", rootData })) {
1341
- vErrors = vErrors === null ? validate19.errors : vErrors.concat(validate19.errors);
1420
+ if (!validate17(data.ref, { instancePath: instancePath + "/ref", parentData: data, parentDataProperty: "ref", rootData })) {
1421
+ vErrors = vErrors === null ? validate17.errors : vErrors.concat(validate17.errors);
1342
1422
  errors = vErrors.length;
1343
1423
  }
1344
1424
  var valid0 = _errs4 === errors;
@@ -1349,7 +1429,7 @@ function validate18(data, { instancePath = "", parentData, parentDataProperty, r
1349
1429
  if (data.value !== void 0) {
1350
1430
  const _errs5 = errors;
1351
1431
  if (typeof data.value !== "string") {
1352
- validate18.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/properties/value/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1432
+ validate16.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/properties/value/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1353
1433
  return false;
1354
1434
  }
1355
1435
  var valid0 = _errs5 === errors;
@@ -1361,29 +1441,29 @@ function validate18(data, { instancePath = "", parentData, parentDataProperty, r
1361
1441
  }
1362
1442
  }
1363
1443
  } else {
1364
- validate18.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1444
+ validate16.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1365
1445
  return false;
1366
1446
  }
1367
1447
  }
1368
- validate18.errors = vErrors;
1448
+ validate16.errors = vErrors;
1369
1449
  return errors === 0;
1370
1450
  }
1371
- const schema23 = { "properties": { "offsetRef": { "enum": ["end", "start"] } } };
1372
- const schema24 = { "type": ["string", "number"] };
1373
- function validate22(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1451
+ const schema22 = { "properties": { "offsetRef": { "enum": ["end", "start"] } } };
1452
+ const schema23 = { "type": ["string", "number"] };
1453
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1374
1454
  let vErrors = null;
1375
1455
  let errors = 0;
1376
1456
  if (errors === 0) {
1377
1457
  if (data && typeof data == "object" && !Array.isArray(data)) {
1378
1458
  let missing0;
1379
1459
  if (data.offset === void 0 && (missing0 = "offset") || data.offsetRef === void 0 && (missing0 = "offsetRef") || data.type === void 0 && (missing0 = "type") || data.value === void 0 && (missing0 = "value")) {
1380
- validate22.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1460
+ validate20.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1381
1461
  return false;
1382
1462
  } else {
1383
1463
  const _errs1 = errors;
1384
1464
  for (const key0 in data) {
1385
1465
  if (!(key0 === "type" || key0 === "device" || key0 === "offsetRef" || key0 === "offset" || key0 === "value")) {
1386
- validate22.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1466
+ validate20.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1387
1467
  return false;
1388
1468
  }
1389
1469
  }
@@ -1392,11 +1472,11 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1392
1472
  let data0 = data.type;
1393
1473
  const _errs2 = errors;
1394
1474
  if (typeof data0 !== "string") {
1395
- validate22.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1475
+ validate20.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1396
1476
  return false;
1397
1477
  }
1398
1478
  if ("hd-data" !== data0) {
1399
- validate22.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "hd-data" }, message: "must be equal to constant" }];
1479
+ validate20.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "hd-data" }, message: "must be equal to constant" }];
1400
1480
  return false;
1401
1481
  }
1402
1482
  var valid0 = _errs2 === errors;
@@ -1407,7 +1487,7 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1407
1487
  if (data.device !== void 0) {
1408
1488
  const _errs4 = errors;
1409
1489
  if (typeof data.device !== "string") {
1410
- validate22.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1490
+ validate20.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1411
1491
  return false;
1412
1492
  }
1413
1493
  var valid0 = _errs4 === errors;
@@ -1419,11 +1499,11 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1419
1499
  let data2 = data.offsetRef;
1420
1500
  const _errs6 = errors;
1421
1501
  if (typeof data2 !== "string") {
1422
- validate22.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1502
+ validate20.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1423
1503
  return false;
1424
1504
  }
1425
1505
  if (!(data2 === "end" || data2 === "start")) {
1426
- validate22.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/enum", keyword: "enum", params: { allowedValues: schema23.properties.offsetRef.enum }, message: "must be equal to one of the allowed values" }];
1506
+ validate20.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/enum", keyword: "enum", params: { allowedValues: schema22.properties.offsetRef.enum }, message: "must be equal to one of the allowed values" }];
1427
1507
  return false;
1428
1508
  }
1429
1509
  var valid0 = _errs6 === errors;
@@ -1435,7 +1515,7 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1435
1515
  let data3 = data.offset;
1436
1516
  const _errs8 = errors;
1437
1517
  if (typeof data3 !== "string" && !(typeof data3 == "number" && isFinite(data3))) {
1438
- validate22.errors = [{ instancePath: instancePath + "/offset", schemaPath: "#/definitions/BigNumber/type", keyword: "type", params: { type: schema24.type }, message: "must be string,number" }];
1518
+ validate20.errors = [{ instancePath: instancePath + "/offset", schemaPath: "#/definitions/BigNumber/type", keyword: "type", params: { type: schema23.type }, message: "must be string,number" }];
1439
1519
  return false;
1440
1520
  }
1441
1521
  var valid0 = _errs8 === errors;
@@ -1570,8 +1650,8 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1570
1650
  valid2 = valid2 || _valid0;
1571
1651
  if (!valid2) {
1572
1652
  const _errs25 = errors;
1573
- if (!validate14(data4, { instancePath: instancePath + "/value", parentData: data, parentDataProperty: "value", rootData })) {
1574
- vErrors = vErrors === null ? validate14.errors : vErrors.concat(validate14.errors);
1653
+ if (!validate13(data4, { instancePath: instancePath + "/value", parentData: data, parentDataProperty: "value", rootData })) {
1654
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
1575
1655
  errors = vErrors.length;
1576
1656
  }
1577
1657
  var _valid0 = _errs25 === errors;
@@ -1759,7 +1839,7 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1759
1839
  vErrors.push(err20);
1760
1840
  }
1761
1841
  errors++;
1762
- validate22.errors = vErrors;
1842
+ validate20.errors = vErrors;
1763
1843
  return false;
1764
1844
  } else {
1765
1845
  errors = _errs12;
@@ -1782,26 +1862,26 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
1782
1862
  }
1783
1863
  }
1784
1864
  } else {
1785
- validate22.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1865
+ validate20.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1786
1866
  return false;
1787
1867
  }
1788
1868
  }
1789
- validate22.errors = vErrors;
1869
+ validate20.errors = vErrors;
1790
1870
  return errors === 0;
1791
1871
  }
1792
- function validate25(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1872
+ function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1793
1873
  let vErrors = null;
1794
1874
  let errors = 0;
1795
1875
  {
1796
1876
  if (data && typeof data == "object" && !Array.isArray(data)) {
1797
1877
  let missing0;
1798
1878
  if (data.type === void 0 && (missing0 = "type") || data.value === void 0 && (missing0 = "value")) {
1799
- validate25.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1879
+ validate23.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1800
1880
  return false;
1801
1881
  } else {
1802
1882
  for (const key0 in data) {
1803
1883
  if (!(key0 === "type" || key0 === "device" || key0 === "value")) {
1804
- validate25.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1884
+ validate23.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1805
1885
  return false;
1806
1886
  }
1807
1887
  }
@@ -1810,11 +1890,11 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
1810
1890
  let data0 = data.type;
1811
1891
  const _errs2 = errors;
1812
1892
  if (typeof data0 !== "string") {
1813
- validate25.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1893
+ validate23.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1814
1894
  return false;
1815
1895
  }
1816
1896
  if ("hd-size" !== data0) {
1817
- validate25.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "hd-size" }, message: "must be equal to constant" }];
1897
+ validate23.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "hd-size" }, message: "must be equal to constant" }];
1818
1898
  return false;
1819
1899
  }
1820
1900
  var valid0 = _errs2 === errors;
@@ -1825,7 +1905,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
1825
1905
  if (data.device !== void 0) {
1826
1906
  const _errs4 = errors;
1827
1907
  if (typeof data.device !== "string") {
1828
- validate25.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1908
+ validate23.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1829
1909
  return false;
1830
1910
  }
1831
1911
  var valid0 = _errs4 === errors;
@@ -1837,7 +1917,7 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
1837
1917
  let data2 = data.value;
1838
1918
  const _errs6 = errors;
1839
1919
  if (typeof data2 !== "string" && !(typeof data2 == "number" && isFinite(data2))) {
1840
- validate25.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/definitions/BigNumber/type", keyword: "type", params: { type: schema24.type }, message: "must be string,number" }];
1920
+ validate23.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/definitions/BigNumber/type", keyword: "type", params: { type: schema23.type }, message: "must be string,number" }];
1841
1921
  return false;
1842
1922
  }
1843
1923
  var valid0 = _errs6 === errors;
@@ -1849,28 +1929,28 @@ function validate25(data, { instancePath = "", parentData, parentDataProperty, r
1849
1929
  }
1850
1930
  }
1851
1931
  } else {
1852
- validate25.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1932
+ validate23.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1853
1933
  return false;
1854
1934
  }
1855
1935
  }
1856
- validate25.errors = vErrors;
1936
+ validate23.errors = vErrors;
1857
1937
  return errors === 0;
1858
1938
  }
1859
- const schema30 = { "properties": { "offsetRef": { "enum": ["end", "full", "start"] }, "offset": { "type": ["string", "number"] } } };
1860
- function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1939
+ const schema29 = { "properties": { "offsetRef": { "enum": ["end", "full", "start"] }, "offset": { "type": ["string", "number"] } } };
1940
+ function validate25(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
1861
1941
  let vErrors = null;
1862
1942
  let errors = 0;
1863
1943
  if (errors === 0) {
1864
1944
  if (data && typeof data == "object" && !Array.isArray(data)) {
1865
1945
  let missing0;
1866
1946
  if (data.file === void 0 && (missing0 = "file") || data.type === void 0 && (missing0 = "type") || data.value === void 0 && (missing0 = "value")) {
1867
- validate27.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1947
+ validate25.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1868
1948
  return false;
1869
1949
  } else {
1870
1950
  const _errs1 = errors;
1871
1951
  for (const key0 in data) {
1872
1952
  if (!(key0 === "type" || key0 === "device" || key0 === "file" || key0 === "offsetRef" || key0 === "offset" || key0 === "value")) {
1873
- validate27.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1953
+ validate25.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
1874
1954
  return false;
1875
1955
  }
1876
1956
  }
@@ -1879,11 +1959,11 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
1879
1959
  let data0 = data.type;
1880
1960
  const _errs2 = errors;
1881
1961
  if (typeof data0 !== "string") {
1882
- validate27.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1962
+ validate25.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1883
1963
  return false;
1884
1964
  }
1885
1965
  if ("file-data" !== data0) {
1886
- validate27.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "file-data" }, message: "must be equal to constant" }];
1966
+ validate25.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "file-data" }, message: "must be equal to constant" }];
1887
1967
  return false;
1888
1968
  }
1889
1969
  var valid0 = _errs2 === errors;
@@ -1894,7 +1974,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
1894
1974
  if (data.device !== void 0) {
1895
1975
  const _errs4 = errors;
1896
1976
  if (typeof data.device !== "string") {
1897
- validate27.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1977
+ validate25.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1898
1978
  return false;
1899
1979
  }
1900
1980
  var valid0 = _errs4 === errors;
@@ -1905,7 +1985,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
1905
1985
  if (data.file !== void 0) {
1906
1986
  const _errs6 = errors;
1907
1987
  if (typeof data.file !== "string") {
1908
- validate27.errors = [{ instancePath: instancePath + "/file", schemaPath: "#/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1988
+ validate25.errors = [{ instancePath: instancePath + "/file", schemaPath: "#/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1909
1989
  return false;
1910
1990
  }
1911
1991
  var valid0 = _errs6 === errors;
@@ -1917,11 +1997,11 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
1917
1997
  let data3 = data.offsetRef;
1918
1998
  const _errs8 = errors;
1919
1999
  if (typeof data3 !== "string") {
1920
- validate27.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2000
+ validate25.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1921
2001
  return false;
1922
2002
  }
1923
2003
  if (!(data3 === "end" || data3 === "full" || data3 === "start")) {
1924
- validate27.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/enum", keyword: "enum", params: { allowedValues: schema30.properties.offsetRef.enum }, message: "must be equal to one of the allowed values" }];
2004
+ validate25.errors = [{ instancePath: instancePath + "/offsetRef", schemaPath: "#/properties/offsetRef/enum", keyword: "enum", params: { allowedValues: schema29.properties.offsetRef.enum }, message: "must be equal to one of the allowed values" }];
1925
2005
  return false;
1926
2006
  }
1927
2007
  var valid0 = _errs8 === errors;
@@ -1933,7 +2013,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
1933
2013
  let data4 = data.offset;
1934
2014
  const _errs10 = errors;
1935
2015
  if (typeof data4 !== "string" && !(typeof data4 == "number" && isFinite(data4))) {
1936
- validate27.errors = [{ instancePath: instancePath + "/offset", schemaPath: "#/properties/offset/type", keyword: "type", params: { type: schema30.properties.offset.type }, message: "must be string,number" }];
2016
+ validate25.errors = [{ instancePath: instancePath + "/offset", schemaPath: "#/properties/offset/type", keyword: "type", params: { type: schema29.properties.offset.type }, message: "must be string,number" }];
1937
2017
  return false;
1938
2018
  }
1939
2019
  var valid0 = _errs10 === errors;
@@ -2068,8 +2148,8 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2068
2148
  valid1 = valid1 || _valid0;
2069
2149
  if (!valid1) {
2070
2150
  const _errs26 = errors;
2071
- if (!validate14(data5, { instancePath: instancePath + "/value", parentData: data, parentDataProperty: "value", rootData })) {
2072
- vErrors = vErrors === null ? validate14.errors : vErrors.concat(validate14.errors);
2151
+ if (!validate13(data5, { instancePath: instancePath + "/value", parentData: data, parentDataProperty: "value", rootData })) {
2152
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
2073
2153
  errors = vErrors.length;
2074
2154
  }
2075
2155
  var _valid0 = _errs26 === errors;
@@ -2257,7 +2337,7 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2257
2337
  vErrors.push(err20);
2258
2338
  }
2259
2339
  errors++;
2260
- validate27.errors = vErrors;
2340
+ validate25.errors = vErrors;
2261
2341
  return false;
2262
2342
  } else {
2263
2343
  errors = _errs13;
@@ -2281,26 +2361,26 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
2281
2361
  }
2282
2362
  }
2283
2363
  } else {
2284
- validate27.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
2364
+ validate25.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
2285
2365
  return false;
2286
2366
  }
2287
2367
  }
2288
- validate27.errors = vErrors;
2368
+ validate25.errors = vErrors;
2289
2369
  return errors === 0;
2290
2370
  }
2291
- function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
2371
+ function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
2292
2372
  let vErrors = null;
2293
2373
  let errors = 0;
2294
2374
  {
2295
2375
  if (data && typeof data == "object" && !Array.isArray(data)) {
2296
2376
  let missing0;
2297
2377
  if (data.file === void 0 && (missing0 = "file") || data.type === void 0 && (missing0 = "type") || data.value === void 0 && (missing0 = "value")) {
2298
- validate30.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
2378
+ validate28.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
2299
2379
  return false;
2300
2380
  } else {
2301
2381
  for (const key0 in data) {
2302
2382
  if (!(key0 === "type" || key0 === "device" || key0 === "file" || key0 === "value")) {
2303
- validate30.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
2383
+ validate28.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
2304
2384
  return false;
2305
2385
  }
2306
2386
  }
@@ -2309,11 +2389,11 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
2309
2389
  let data0 = data.type;
2310
2390
  const _errs2 = errors;
2311
2391
  if (typeof data0 !== "string") {
2312
- validate30.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2392
+ validate28.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2313
2393
  return false;
2314
2394
  }
2315
2395
  if ("file-size" !== data0) {
2316
- validate30.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "file-size" }, message: "must be equal to constant" }];
2396
+ validate28.errors = [{ instancePath: instancePath + "/type", schemaPath: "#/properties/type/const", keyword: "const", params: { allowedValue: "file-size" }, message: "must be equal to constant" }];
2317
2397
  return false;
2318
2398
  }
2319
2399
  var valid0 = _errs2 === errors;
@@ -2324,7 +2404,7 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
2324
2404
  if (data.device !== void 0) {
2325
2405
  const _errs4 = errors;
2326
2406
  if (typeof data.device !== "string") {
2327
- validate30.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2407
+ validate28.errors = [{ instancePath: instancePath + "/device", schemaPath: "#/properties/device/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2328
2408
  return false;
2329
2409
  }
2330
2410
  var valid0 = _errs4 === errors;
@@ -2335,7 +2415,7 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
2335
2415
  if (data.file !== void 0) {
2336
2416
  const _errs6 = errors;
2337
2417
  if (typeof data.file !== "string") {
2338
- validate30.errors = [{ instancePath: instancePath + "/file", schemaPath: "#/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2418
+ validate28.errors = [{ instancePath: instancePath + "/file", schemaPath: "#/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
2339
2419
  return false;
2340
2420
  }
2341
2421
  var valid0 = _errs6 === errors;
@@ -2347,7 +2427,7 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
2347
2427
  let data3 = data.value;
2348
2428
  const _errs8 = errors;
2349
2429
  if (typeof data3 !== "string" && !(typeof data3 == "number" && isFinite(data3))) {
2350
- validate30.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/definitions/BigNumber/type", keyword: "type", params: { type: schema24.type }, message: "must be string,number" }];
2430
+ validate28.errors = [{ instancePath: instancePath + "/value", schemaPath: "#/definitions/BigNumber/type", keyword: "type", params: { type: schema23.type }, message: "must be string,number" }];
2351
2431
  return false;
2352
2432
  }
2353
2433
  var valid0 = _errs8 === errors;
@@ -2360,11 +2440,11 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
2360
2440
  }
2361
2441
  }
2362
2442
  } else {
2363
- validate30.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
2443
+ validate28.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
2364
2444
  return false;
2365
2445
  }
2366
2446
  }
2367
- validate30.errors = vErrors;
2447
+ validate28.errors = vErrors;
2368
2448
  return errors === 0;
2369
2449
  }
2370
2450
  function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
@@ -2467,40 +2547,40 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2467
2547
  valid0 = valid0 || _valid0;
2468
2548
  if (!valid0) {
2469
2549
  const _errs10 = errors;
2470
- if (!validate18(data, { instancePath, parentData, parentDataProperty, rootData })) {
2471
- vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors);
2550
+ if (!validate16(data, { instancePath, parentData, parentDataProperty, rootData })) {
2551
+ vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors);
2472
2552
  errors = vErrors.length;
2473
2553
  }
2474
2554
  var _valid0 = _errs10 === errors;
2475
2555
  valid0 = valid0 || _valid0;
2476
2556
  if (!valid0) {
2477
2557
  const _errs11 = errors;
2478
- if (!validate22(data, { instancePath, parentData, parentDataProperty, rootData })) {
2479
- vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
2558
+ if (!validate20(data, { instancePath, parentData, parentDataProperty, rootData })) {
2559
+ vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors);
2480
2560
  errors = vErrors.length;
2481
2561
  }
2482
2562
  var _valid0 = _errs11 === errors;
2483
2563
  valid0 = valid0 || _valid0;
2484
2564
  if (!valid0) {
2485
2565
  const _errs12 = errors;
2486
- if (!validate25(data, { instancePath, parentData, parentDataProperty, rootData })) {
2487
- vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);
2566
+ if (!validate23(data, { instancePath, parentData, parentDataProperty, rootData })) {
2567
+ vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
2488
2568
  errors = vErrors.length;
2489
2569
  }
2490
2570
  var _valid0 = _errs12 === errors;
2491
2571
  valid0 = valid0 || _valid0;
2492
2572
  if (!valid0) {
2493
2573
  const _errs13 = errors;
2494
- if (!validate27(data, { instancePath, parentData, parentDataProperty, rootData })) {
2495
- vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
2574
+ if (!validate25(data, { instancePath, parentData, parentDataProperty, rootData })) {
2575
+ vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);
2496
2576
  errors = vErrors.length;
2497
2577
  }
2498
2578
  var _valid0 = _errs13 === errors;
2499
2579
  valid0 = valid0 || _valid0;
2500
2580
  if (!valid0) {
2501
2581
  const _errs14 = errors;
2502
- if (!validate30(data, { instancePath, parentData, parentDataProperty, rootData })) {
2503
- vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
2582
+ if (!validate28(data, { instancePath, parentData, parentDataProperty, rootData })) {
2583
+ vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
2504
2584
  errors = vErrors.length;
2505
2585
  }
2506
2586
  var _valid0 = _errs14 === errors;
@@ -2547,7 +2627,7 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2547
2627
  errors++;
2548
2628
  }
2549
2629
  if (!(data2 === "boot-file" || data2 === "boot-hd-device" || data2 === "boot-partition-device")) {
2550
- const err9 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/HashComponentMiscStringData/properties/type/enum", keyword: "enum", params: { allowedValues: schema36.properties.type.enum }, message: "must be equal to one of the allowed values" };
2630
+ const err9 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/HashComponentMiscStringData/properties/type/enum", keyword: "enum", params: { allowedValues: schema35.properties.type.enum }, message: "must be equal to one of the allowed values" };
2551
2631
  if (vErrors === null) {
2552
2632
  vErrors = [err9];
2553
2633
  } else {
@@ -2623,50 +2703,1360 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2623
2703
  function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
2624
2704
  let vErrors = null;
2625
2705
  let errors = 0;
2626
- if (errors === 0) {
2706
+ const _errs0 = errors;
2707
+ let valid0 = false;
2708
+ const _errs1 = errors;
2709
+ const _errs2 = errors;
2710
+ if (errors === _errs2) {
2627
2711
  if (data && typeof data == "object" && !Array.isArray(data)) {
2628
2712
  let missing0;
2629
- if (data.db === void 0 && (missing0 = "db") || data.kek === void 0 && (missing0 = "kek") || data.pk === void 0 && (missing0 = "pk")) {
2630
- validate33.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
2631
- return false;
2713
+ if (data.file === void 0 && (missing0 = "file") || data.type === void 0 && (missing0 = "type")) {
2714
+ const err0 = { instancePath, schemaPath: "#/definitions/BinaryDataFromFile/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" };
2715
+ if (vErrors === null) {
2716
+ vErrors = [err0];
2717
+ } else {
2718
+ vErrors.push(err0);
2719
+ }
2720
+ errors++;
2632
2721
  } else {
2633
- const _errs1 = errors;
2722
+ const _errs4 = errors;
2634
2723
  for (const key0 in data) {
2635
- if (!(key0 === "kek" || key0 === "db" || key0 === "pk")) {
2636
- validate33.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
2637
- return false;
2638
- }
2639
- }
2640
- if (_errs1 === errors) {
2641
- if (data.kek !== void 0) {
2642
- const _errs2 = errors;
2643
- if (!validate13(data.kek, { instancePath: instancePath + "/kek", parentData: data, parentDataProperty: "kek", rootData })) {
2644
- vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
2645
- errors = vErrors.length;
2724
+ if (!(key0 === "type" || key0 === "file" || key0 === "offset" || key0 === "size")) {
2725
+ const err1 = { instancePath, schemaPath: "#/definitions/BinaryDataFromFile/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
2726
+ if (vErrors === null) {
2727
+ vErrors = [err1];
2728
+ } else {
2729
+ vErrors.push(err1);
2646
2730
  }
2647
- var valid0 = _errs2 === errors;
2648
- } else {
2649
- var valid0 = true;
2731
+ errors++;
2732
+ break;
2650
2733
  }
2651
- if (valid0) {
2652
- if (data.db !== void 0) {
2653
- const _errs3 = errors;
2654
- if (!validate13(data.db, { instancePath: instancePath + "/db", parentData: data, parentDataProperty: "db", rootData })) {
2734
+ }
2735
+ if (_errs4 === errors) {
2736
+ if (data.type !== void 0) {
2737
+ let data0 = data.type;
2738
+ const _errs5 = errors;
2739
+ if (typeof data0 !== "string") {
2740
+ const err2 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2741
+ if (vErrors === null) {
2742
+ vErrors = [err2];
2743
+ } else {
2744
+ vErrors.push(err2);
2745
+ }
2746
+ errors++;
2747
+ }
2748
+ if ("file" !== data0) {
2749
+ const err3 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/const", keyword: "const", params: { allowedValue: "file" }, message: "must be equal to constant" };
2750
+ if (vErrors === null) {
2751
+ vErrors = [err3];
2752
+ } else {
2753
+ vErrors.push(err3);
2754
+ }
2755
+ errors++;
2756
+ }
2757
+ var valid2 = _errs5 === errors;
2758
+ } else {
2759
+ var valid2 = true;
2760
+ }
2761
+ if (valid2) {
2762
+ if (data.file !== void 0) {
2763
+ const _errs7 = errors;
2764
+ if (typeof data.file !== "string") {
2765
+ const err4 = { instancePath: instancePath + "/file", schemaPath: "#/definitions/BinaryDataFromFile/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2766
+ if (vErrors === null) {
2767
+ vErrors = [err4];
2768
+ } else {
2769
+ vErrors.push(err4);
2770
+ }
2771
+ errors++;
2772
+ }
2773
+ var valid2 = _errs7 === errors;
2774
+ } else {
2775
+ var valid2 = true;
2776
+ }
2777
+ if (valid2) {
2778
+ if (data.offset !== void 0) {
2779
+ let data2 = data.offset;
2780
+ const _errs9 = errors;
2781
+ if (!(typeof data2 == "number" && isFinite(data2))) {
2782
+ const err5 = { instancePath: instancePath + "/offset", schemaPath: "#/definitions/BinaryDataFromFile/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2783
+ if (vErrors === null) {
2784
+ vErrors = [err5];
2785
+ } else {
2786
+ vErrors.push(err5);
2787
+ }
2788
+ errors++;
2789
+ }
2790
+ var valid2 = _errs9 === errors;
2791
+ } else {
2792
+ var valid2 = true;
2793
+ }
2794
+ if (valid2) {
2795
+ if (data.size !== void 0) {
2796
+ let data3 = data.size;
2797
+ const _errs11 = errors;
2798
+ if (!(typeof data3 == "number" && isFinite(data3))) {
2799
+ const err6 = { instancePath: instancePath + "/size", schemaPath: "#/definitions/BinaryDataFromFile/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
2800
+ if (vErrors === null) {
2801
+ vErrors = [err6];
2802
+ } else {
2803
+ vErrors.push(err6);
2804
+ }
2805
+ errors++;
2806
+ }
2807
+ var valid2 = _errs11 === errors;
2808
+ } else {
2809
+ var valid2 = true;
2810
+ }
2811
+ }
2812
+ }
2813
+ }
2814
+ }
2815
+ }
2816
+ } else {
2817
+ const err7 = { instancePath, schemaPath: "#/definitions/BinaryDataFromFile/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2818
+ if (vErrors === null) {
2819
+ vErrors = [err7];
2820
+ } else {
2821
+ vErrors.push(err7);
2822
+ }
2823
+ errors++;
2824
+ }
2825
+ }
2826
+ var _valid0 = _errs1 === errors;
2827
+ valid0 = valid0 || _valid0;
2828
+ if (!valid0) {
2829
+ const _errs13 = errors;
2830
+ if (!validate13(data, { instancePath, parentData, parentDataProperty, rootData })) {
2831
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
2832
+ errors = vErrors.length;
2833
+ }
2834
+ var _valid0 = _errs13 === errors;
2835
+ valid0 = valid0 || _valid0;
2836
+ if (!valid0) {
2837
+ const _errs14 = errors;
2838
+ const _errs15 = errors;
2839
+ if (errors === _errs15) {
2840
+ if (data && typeof data == "object" && !Array.isArray(data)) {
2841
+ let missing1;
2842
+ if (data.buffer === void 0 && (missing1 = "buffer") || data.type === void 0 && (missing1 = "type")) {
2843
+ const err8 = { instancePath, schemaPath: "#/definitions/BinaryDataFromBuffer/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
2844
+ if (vErrors === null) {
2845
+ vErrors = [err8];
2846
+ } else {
2847
+ vErrors.push(err8);
2848
+ }
2849
+ errors++;
2850
+ } else {
2851
+ const _errs17 = errors;
2852
+ for (const key1 in data) {
2853
+ if (!(key1 === "type" || key1 === "buffer")) {
2854
+ const err9 = { instancePath, schemaPath: "#/definitions/BinaryDataFromBuffer/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
2855
+ if (vErrors === null) {
2856
+ vErrors = [err9];
2857
+ } else {
2858
+ vErrors.push(err9);
2859
+ }
2860
+ errors++;
2861
+ break;
2862
+ }
2863
+ }
2864
+ if (_errs17 === errors) {
2865
+ if (data.type !== void 0) {
2866
+ let data4 = data.type;
2867
+ const _errs18 = errors;
2868
+ if (typeof data4 !== "string") {
2869
+ const err10 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2870
+ if (vErrors === null) {
2871
+ vErrors = [err10];
2872
+ } else {
2873
+ vErrors.push(err10);
2874
+ }
2875
+ errors++;
2876
+ }
2877
+ if ("buffer" !== data4) {
2878
+ const err11 = { instancePath: instancePath + "/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/const", keyword: "const", params: { allowedValue: "buffer" }, message: "must be equal to constant" };
2879
+ if (vErrors === null) {
2880
+ vErrors = [err11];
2881
+ } else {
2882
+ vErrors.push(err11);
2883
+ }
2884
+ errors++;
2885
+ }
2886
+ var valid4 = _errs18 === errors;
2887
+ } else {
2888
+ var valid4 = true;
2889
+ }
2890
+ if (valid4) {
2891
+ if (data.buffer !== void 0) {
2892
+ let data5 = data.buffer;
2893
+ const _errs20 = errors;
2894
+ if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
2895
+ const err12 = { instancePath: instancePath + "/buffer", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/buffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2896
+ if (vErrors === null) {
2897
+ vErrors = [err12];
2898
+ } else {
2899
+ vErrors.push(err12);
2900
+ }
2901
+ errors++;
2902
+ }
2903
+ var valid4 = _errs20 === errors;
2904
+ } else {
2905
+ var valid4 = true;
2906
+ }
2907
+ }
2908
+ }
2909
+ }
2910
+ } else {
2911
+ const err13 = { instancePath, schemaPath: "#/definitions/BinaryDataFromBuffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
2912
+ if (vErrors === null) {
2913
+ vErrors = [err13];
2914
+ } else {
2915
+ vErrors.push(err13);
2916
+ }
2917
+ errors++;
2918
+ }
2919
+ }
2920
+ var _valid0 = _errs14 === errors;
2921
+ valid0 = valid0 || _valid0;
2922
+ }
2923
+ }
2924
+ if (!valid0) {
2925
+ const err14 = { instancePath, schemaPath: "#/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
2926
+ if (vErrors === null) {
2927
+ vErrors = [err14];
2928
+ } else {
2929
+ vErrors.push(err14);
2930
+ }
2931
+ errors++;
2932
+ validate33.errors = vErrors;
2933
+ return false;
2934
+ } else {
2935
+ errors = _errs0;
2936
+ if (vErrors !== null) {
2937
+ if (_errs0) {
2938
+ vErrors.length = _errs0;
2939
+ } else {
2940
+ vErrors = null;
2941
+ }
2942
+ }
2943
+ }
2944
+ validate33.errors = vErrors;
2945
+ return errors === 0;
2946
+ }
2947
+ function validate31(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
2948
+ let vErrors = null;
2949
+ let errors = 0;
2950
+ if (errors === 0) {
2951
+ if (data && typeof data == "object" && !Array.isArray(data)) {
2952
+ const _errs1 = errors;
2953
+ for (const key0 in data) {
2954
+ if (!(key0 === "pk" || key0 === "kek" || key0 === "db" || key0 === "dbx")) {
2955
+ validate31.errors = [{ instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" }];
2956
+ return false;
2957
+ }
2958
+ }
2959
+ if (_errs1 === errors) {
2960
+ if (data.pk !== void 0) {
2961
+ let data0 = data.pk;
2962
+ const _errs2 = errors;
2963
+ const _errs3 = errors;
2964
+ let valid1 = false;
2965
+ const _errs4 = errors;
2966
+ const _errs5 = errors;
2967
+ if (errors === _errs5) {
2968
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
2969
+ let missing0;
2970
+ if (data0.file === void 0 && (missing0 = "file") || data0.type === void 0 && (missing0 = "type")) {
2971
+ const err0 = { instancePath: instancePath + "/pk", schemaPath: "#/definitions/BinaryDataFromFile/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" };
2972
+ if (vErrors === null) {
2973
+ vErrors = [err0];
2974
+ } else {
2975
+ vErrors.push(err0);
2976
+ }
2977
+ errors++;
2978
+ } else {
2979
+ const _errs7 = errors;
2980
+ for (const key1 in data0) {
2981
+ if (!(key1 === "type" || key1 === "file" || key1 === "offset" || key1 === "size")) {
2982
+ const err1 = { instancePath: instancePath + "/pk", schemaPath: "#/definitions/BinaryDataFromFile/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key1 }, message: "must NOT have additional properties" };
2983
+ if (vErrors === null) {
2984
+ vErrors = [err1];
2985
+ } else {
2986
+ vErrors.push(err1);
2987
+ }
2988
+ errors++;
2989
+ break;
2990
+ }
2991
+ }
2992
+ if (_errs7 === errors) {
2993
+ if (data0.type !== void 0) {
2994
+ let data1 = data0.type;
2995
+ const _errs8 = errors;
2996
+ if (typeof data1 !== "string") {
2997
+ const err2 = { instancePath: instancePath + "/pk/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
2998
+ if (vErrors === null) {
2999
+ vErrors = [err2];
3000
+ } else {
3001
+ vErrors.push(err2);
3002
+ }
3003
+ errors++;
3004
+ }
3005
+ if ("file" !== data1) {
3006
+ const err3 = { instancePath: instancePath + "/pk/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/const", keyword: "const", params: { allowedValue: "file" }, message: "must be equal to constant" };
3007
+ if (vErrors === null) {
3008
+ vErrors = [err3];
3009
+ } else {
3010
+ vErrors.push(err3);
3011
+ }
3012
+ errors++;
3013
+ }
3014
+ var valid3 = _errs8 === errors;
3015
+ } else {
3016
+ var valid3 = true;
3017
+ }
3018
+ if (valid3) {
3019
+ if (data0.file !== void 0) {
3020
+ const _errs10 = errors;
3021
+ if (typeof data0.file !== "string") {
3022
+ const err4 = { instancePath: instancePath + "/pk/file", schemaPath: "#/definitions/BinaryDataFromFile/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3023
+ if (vErrors === null) {
3024
+ vErrors = [err4];
3025
+ } else {
3026
+ vErrors.push(err4);
3027
+ }
3028
+ errors++;
3029
+ }
3030
+ var valid3 = _errs10 === errors;
3031
+ } else {
3032
+ var valid3 = true;
3033
+ }
3034
+ if (valid3) {
3035
+ if (data0.offset !== void 0) {
3036
+ let data3 = data0.offset;
3037
+ const _errs12 = errors;
3038
+ if (!(typeof data3 == "number" && isFinite(data3))) {
3039
+ const err5 = { instancePath: instancePath + "/pk/offset", schemaPath: "#/definitions/BinaryDataFromFile/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3040
+ if (vErrors === null) {
3041
+ vErrors = [err5];
3042
+ } else {
3043
+ vErrors.push(err5);
3044
+ }
3045
+ errors++;
3046
+ }
3047
+ var valid3 = _errs12 === errors;
3048
+ } else {
3049
+ var valid3 = true;
3050
+ }
3051
+ if (valid3) {
3052
+ if (data0.size !== void 0) {
3053
+ let data4 = data0.size;
3054
+ const _errs14 = errors;
3055
+ if (!(typeof data4 == "number" && isFinite(data4))) {
3056
+ const err6 = { instancePath: instancePath + "/pk/size", schemaPath: "#/definitions/BinaryDataFromFile/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3057
+ if (vErrors === null) {
3058
+ vErrors = [err6];
3059
+ } else {
3060
+ vErrors.push(err6);
3061
+ }
3062
+ errors++;
3063
+ }
3064
+ var valid3 = _errs14 === errors;
3065
+ } else {
3066
+ var valid3 = true;
3067
+ }
3068
+ }
3069
+ }
3070
+ }
3071
+ }
3072
+ }
3073
+ } else {
3074
+ const err7 = { instancePath: instancePath + "/pk", schemaPath: "#/definitions/BinaryDataFromFile/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3075
+ if (vErrors === null) {
3076
+ vErrors = [err7];
3077
+ } else {
3078
+ vErrors.push(err7);
3079
+ }
3080
+ errors++;
3081
+ }
3082
+ }
3083
+ var _valid0 = _errs4 === errors;
3084
+ valid1 = valid1 || _valid0;
3085
+ if (!valid1) {
3086
+ const _errs16 = errors;
3087
+ if (!validate13(data0, { instancePath: instancePath + "/pk", parentData: data, parentDataProperty: "pk", rootData })) {
3088
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
3089
+ errors = vErrors.length;
3090
+ }
3091
+ var _valid0 = _errs16 === errors;
3092
+ valid1 = valid1 || _valid0;
3093
+ if (!valid1) {
3094
+ const _errs17 = errors;
3095
+ const _errs18 = errors;
3096
+ if (errors === _errs18) {
3097
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
3098
+ let missing1;
3099
+ if (data0.buffer === void 0 && (missing1 = "buffer") || data0.type === void 0 && (missing1 = "type")) {
3100
+ const err8 = { instancePath: instancePath + "/pk", schemaPath: "#/definitions/BinaryDataFromBuffer/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" };
3101
+ if (vErrors === null) {
3102
+ vErrors = [err8];
3103
+ } else {
3104
+ vErrors.push(err8);
3105
+ }
3106
+ errors++;
3107
+ } else {
3108
+ const _errs20 = errors;
3109
+ for (const key2 in data0) {
3110
+ if (!(key2 === "type" || key2 === "buffer")) {
3111
+ const err9 = { instancePath: instancePath + "/pk", schemaPath: "#/definitions/BinaryDataFromBuffer/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties" };
3112
+ if (vErrors === null) {
3113
+ vErrors = [err9];
3114
+ } else {
3115
+ vErrors.push(err9);
3116
+ }
3117
+ errors++;
3118
+ break;
3119
+ }
3120
+ }
3121
+ if (_errs20 === errors) {
3122
+ if (data0.type !== void 0) {
3123
+ let data5 = data0.type;
3124
+ const _errs21 = errors;
3125
+ if (typeof data5 !== "string") {
3126
+ const err10 = { instancePath: instancePath + "/pk/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3127
+ if (vErrors === null) {
3128
+ vErrors = [err10];
3129
+ } else {
3130
+ vErrors.push(err10);
3131
+ }
3132
+ errors++;
3133
+ }
3134
+ if ("buffer" !== data5) {
3135
+ const err11 = { instancePath: instancePath + "/pk/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/const", keyword: "const", params: { allowedValue: "buffer" }, message: "must be equal to constant" };
3136
+ if (vErrors === null) {
3137
+ vErrors = [err11];
3138
+ } else {
3139
+ vErrors.push(err11);
3140
+ }
3141
+ errors++;
3142
+ }
3143
+ var valid5 = _errs21 === errors;
3144
+ } else {
3145
+ var valid5 = true;
3146
+ }
3147
+ if (valid5) {
3148
+ if (data0.buffer !== void 0) {
3149
+ let data6 = data0.buffer;
3150
+ const _errs23 = errors;
3151
+ if (!(data6 && typeof data6 == "object" && !Array.isArray(data6))) {
3152
+ const err12 = { instancePath: instancePath + "/pk/buffer", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/buffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3153
+ if (vErrors === null) {
3154
+ vErrors = [err12];
3155
+ } else {
3156
+ vErrors.push(err12);
3157
+ }
3158
+ errors++;
3159
+ }
3160
+ var valid5 = _errs23 === errors;
3161
+ } else {
3162
+ var valid5 = true;
3163
+ }
3164
+ }
3165
+ }
3166
+ }
3167
+ } else {
3168
+ const err13 = { instancePath: instancePath + "/pk", schemaPath: "#/definitions/BinaryDataFromBuffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3169
+ if (vErrors === null) {
3170
+ vErrors = [err13];
3171
+ } else {
3172
+ vErrors.push(err13);
3173
+ }
3174
+ errors++;
3175
+ }
3176
+ }
3177
+ var _valid0 = _errs17 === errors;
3178
+ valid1 = valid1 || _valid0;
3179
+ if (!valid1) {
3180
+ const _errs25 = errors;
3181
+ if (errors === _errs25) {
3182
+ if (Array.isArray(data0)) {
3183
+ var valid6 = true;
3184
+ const len0 = data0.length;
3185
+ for (let i0 = 0; i0 < len0; i0++) {
3186
+ const _errs27 = errors;
3187
+ if (!validate33(data0[i0], { instancePath: instancePath + "/pk/" + i0, parentData: data0, parentDataProperty: i0, rootData })) {
3188
+ vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
3189
+ errors = vErrors.length;
3190
+ }
3191
+ var valid6 = _errs27 === errors;
3192
+ if (!valid6) {
3193
+ break;
3194
+ }
3195
+ }
3196
+ } else {
3197
+ const err14 = { instancePath: instancePath + "/pk", schemaPath: "#/properties/pk/anyOf/3/type", keyword: "type", params: { type: "array" }, message: "must be array" };
3198
+ if (vErrors === null) {
3199
+ vErrors = [err14];
3200
+ } else {
3201
+ vErrors.push(err14);
3202
+ }
3203
+ errors++;
3204
+ }
3205
+ }
3206
+ var _valid0 = _errs25 === errors;
3207
+ valid1 = valid1 || _valid0;
3208
+ }
3209
+ }
3210
+ }
3211
+ if (!valid1) {
3212
+ const err15 = { instancePath: instancePath + "/pk", schemaPath: "#/properties/pk/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
3213
+ if (vErrors === null) {
3214
+ vErrors = [err15];
3215
+ } else {
3216
+ vErrors.push(err15);
3217
+ }
3218
+ errors++;
3219
+ validate31.errors = vErrors;
3220
+ return false;
3221
+ } else {
3222
+ errors = _errs3;
3223
+ if (vErrors !== null) {
3224
+ if (_errs3) {
3225
+ vErrors.length = _errs3;
3226
+ } else {
3227
+ vErrors = null;
3228
+ }
3229
+ }
3230
+ }
3231
+ var valid0 = _errs2 === errors;
3232
+ } else {
3233
+ var valid0 = true;
3234
+ }
3235
+ if (valid0) {
3236
+ if (data.kek !== void 0) {
3237
+ let data8 = data.kek;
3238
+ const _errs28 = errors;
3239
+ const _errs29 = errors;
3240
+ let valid7 = false;
3241
+ const _errs30 = errors;
3242
+ const _errs31 = errors;
3243
+ if (errors === _errs31) {
3244
+ if (data8 && typeof data8 == "object" && !Array.isArray(data8)) {
3245
+ let missing2;
3246
+ if (data8.file === void 0 && (missing2 = "file") || data8.type === void 0 && (missing2 = "type")) {
3247
+ const err16 = { instancePath: instancePath + "/kek", schemaPath: "#/definitions/BinaryDataFromFile/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" };
3248
+ if (vErrors === null) {
3249
+ vErrors = [err16];
3250
+ } else {
3251
+ vErrors.push(err16);
3252
+ }
3253
+ errors++;
3254
+ } else {
3255
+ const _errs33 = errors;
3256
+ for (const key3 in data8) {
3257
+ if (!(key3 === "type" || key3 === "file" || key3 === "offset" || key3 === "size")) {
3258
+ const err17 = { instancePath: instancePath + "/kek", schemaPath: "#/definitions/BinaryDataFromFile/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties" };
3259
+ if (vErrors === null) {
3260
+ vErrors = [err17];
3261
+ } else {
3262
+ vErrors.push(err17);
3263
+ }
3264
+ errors++;
3265
+ break;
3266
+ }
3267
+ }
3268
+ if (_errs33 === errors) {
3269
+ if (data8.type !== void 0) {
3270
+ let data9 = data8.type;
3271
+ const _errs34 = errors;
3272
+ if (typeof data9 !== "string") {
3273
+ const err18 = { instancePath: instancePath + "/kek/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3274
+ if (vErrors === null) {
3275
+ vErrors = [err18];
3276
+ } else {
3277
+ vErrors.push(err18);
3278
+ }
3279
+ errors++;
3280
+ }
3281
+ if ("file" !== data9) {
3282
+ const err19 = { instancePath: instancePath + "/kek/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/const", keyword: "const", params: { allowedValue: "file" }, message: "must be equal to constant" };
3283
+ if (vErrors === null) {
3284
+ vErrors = [err19];
3285
+ } else {
3286
+ vErrors.push(err19);
3287
+ }
3288
+ errors++;
3289
+ }
3290
+ var valid9 = _errs34 === errors;
3291
+ } else {
3292
+ var valid9 = true;
3293
+ }
3294
+ if (valid9) {
3295
+ if (data8.file !== void 0) {
3296
+ const _errs36 = errors;
3297
+ if (typeof data8.file !== "string") {
3298
+ const err20 = { instancePath: instancePath + "/kek/file", schemaPath: "#/definitions/BinaryDataFromFile/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3299
+ if (vErrors === null) {
3300
+ vErrors = [err20];
3301
+ } else {
3302
+ vErrors.push(err20);
3303
+ }
3304
+ errors++;
3305
+ }
3306
+ var valid9 = _errs36 === errors;
3307
+ } else {
3308
+ var valid9 = true;
3309
+ }
3310
+ if (valid9) {
3311
+ if (data8.offset !== void 0) {
3312
+ let data11 = data8.offset;
3313
+ const _errs38 = errors;
3314
+ if (!(typeof data11 == "number" && isFinite(data11))) {
3315
+ const err21 = { instancePath: instancePath + "/kek/offset", schemaPath: "#/definitions/BinaryDataFromFile/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3316
+ if (vErrors === null) {
3317
+ vErrors = [err21];
3318
+ } else {
3319
+ vErrors.push(err21);
3320
+ }
3321
+ errors++;
3322
+ }
3323
+ var valid9 = _errs38 === errors;
3324
+ } else {
3325
+ var valid9 = true;
3326
+ }
3327
+ if (valid9) {
3328
+ if (data8.size !== void 0) {
3329
+ let data12 = data8.size;
3330
+ const _errs40 = errors;
3331
+ if (!(typeof data12 == "number" && isFinite(data12))) {
3332
+ const err22 = { instancePath: instancePath + "/kek/size", schemaPath: "#/definitions/BinaryDataFromFile/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3333
+ if (vErrors === null) {
3334
+ vErrors = [err22];
3335
+ } else {
3336
+ vErrors.push(err22);
3337
+ }
3338
+ errors++;
3339
+ }
3340
+ var valid9 = _errs40 === errors;
3341
+ } else {
3342
+ var valid9 = true;
3343
+ }
3344
+ }
3345
+ }
3346
+ }
3347
+ }
3348
+ }
3349
+ } else {
3350
+ const err23 = { instancePath: instancePath + "/kek", schemaPath: "#/definitions/BinaryDataFromFile/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3351
+ if (vErrors === null) {
3352
+ vErrors = [err23];
3353
+ } else {
3354
+ vErrors.push(err23);
3355
+ }
3356
+ errors++;
3357
+ }
3358
+ }
3359
+ var _valid1 = _errs30 === errors;
3360
+ valid7 = valid7 || _valid1;
3361
+ if (!valid7) {
3362
+ const _errs42 = errors;
3363
+ if (!validate13(data8, { instancePath: instancePath + "/kek", parentData: data, parentDataProperty: "kek", rootData })) {
2655
3364
  vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
2656
3365
  errors = vErrors.length;
2657
3366
  }
2658
- var valid0 = _errs3 === errors;
3367
+ var _valid1 = _errs42 === errors;
3368
+ valid7 = valid7 || _valid1;
3369
+ if (!valid7) {
3370
+ const _errs43 = errors;
3371
+ const _errs44 = errors;
3372
+ if (errors === _errs44) {
3373
+ if (data8 && typeof data8 == "object" && !Array.isArray(data8)) {
3374
+ let missing3;
3375
+ if (data8.buffer === void 0 && (missing3 = "buffer") || data8.type === void 0 && (missing3 = "type")) {
3376
+ const err24 = { instancePath: instancePath + "/kek", schemaPath: "#/definitions/BinaryDataFromBuffer/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" };
3377
+ if (vErrors === null) {
3378
+ vErrors = [err24];
3379
+ } else {
3380
+ vErrors.push(err24);
3381
+ }
3382
+ errors++;
3383
+ } else {
3384
+ const _errs46 = errors;
3385
+ for (const key4 in data8) {
3386
+ if (!(key4 === "type" || key4 === "buffer")) {
3387
+ const err25 = { instancePath: instancePath + "/kek", schemaPath: "#/definitions/BinaryDataFromBuffer/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key4 }, message: "must NOT have additional properties" };
3388
+ if (vErrors === null) {
3389
+ vErrors = [err25];
3390
+ } else {
3391
+ vErrors.push(err25);
3392
+ }
3393
+ errors++;
3394
+ break;
3395
+ }
3396
+ }
3397
+ if (_errs46 === errors) {
3398
+ if (data8.type !== void 0) {
3399
+ let data13 = data8.type;
3400
+ const _errs47 = errors;
3401
+ if (typeof data13 !== "string") {
3402
+ const err26 = { instancePath: instancePath + "/kek/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3403
+ if (vErrors === null) {
3404
+ vErrors = [err26];
3405
+ } else {
3406
+ vErrors.push(err26);
3407
+ }
3408
+ errors++;
3409
+ }
3410
+ if ("buffer" !== data13) {
3411
+ const err27 = { instancePath: instancePath + "/kek/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/const", keyword: "const", params: { allowedValue: "buffer" }, message: "must be equal to constant" };
3412
+ if (vErrors === null) {
3413
+ vErrors = [err27];
3414
+ } else {
3415
+ vErrors.push(err27);
3416
+ }
3417
+ errors++;
3418
+ }
3419
+ var valid11 = _errs47 === errors;
3420
+ } else {
3421
+ var valid11 = true;
3422
+ }
3423
+ if (valid11) {
3424
+ if (data8.buffer !== void 0) {
3425
+ let data14 = data8.buffer;
3426
+ const _errs49 = errors;
3427
+ if (!(data14 && typeof data14 == "object" && !Array.isArray(data14))) {
3428
+ const err28 = { instancePath: instancePath + "/kek/buffer", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/buffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3429
+ if (vErrors === null) {
3430
+ vErrors = [err28];
3431
+ } else {
3432
+ vErrors.push(err28);
3433
+ }
3434
+ errors++;
3435
+ }
3436
+ var valid11 = _errs49 === errors;
3437
+ } else {
3438
+ var valid11 = true;
3439
+ }
3440
+ }
3441
+ }
3442
+ }
3443
+ } else {
3444
+ const err29 = { instancePath: instancePath + "/kek", schemaPath: "#/definitions/BinaryDataFromBuffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3445
+ if (vErrors === null) {
3446
+ vErrors = [err29];
3447
+ } else {
3448
+ vErrors.push(err29);
3449
+ }
3450
+ errors++;
3451
+ }
3452
+ }
3453
+ var _valid1 = _errs43 === errors;
3454
+ valid7 = valid7 || _valid1;
3455
+ if (!valid7) {
3456
+ const _errs51 = errors;
3457
+ if (errors === _errs51) {
3458
+ if (Array.isArray(data8)) {
3459
+ var valid12 = true;
3460
+ const len1 = data8.length;
3461
+ for (let i1 = 0; i1 < len1; i1++) {
3462
+ const _errs53 = errors;
3463
+ if (!validate33(data8[i1], { instancePath: instancePath + "/kek/" + i1, parentData: data8, parentDataProperty: i1, rootData })) {
3464
+ vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
3465
+ errors = vErrors.length;
3466
+ }
3467
+ var valid12 = _errs53 === errors;
3468
+ if (!valid12) {
3469
+ break;
3470
+ }
3471
+ }
3472
+ } else {
3473
+ const err30 = { instancePath: instancePath + "/kek", schemaPath: "#/properties/kek/anyOf/3/type", keyword: "type", params: { type: "array" }, message: "must be array" };
3474
+ if (vErrors === null) {
3475
+ vErrors = [err30];
3476
+ } else {
3477
+ vErrors.push(err30);
3478
+ }
3479
+ errors++;
3480
+ }
3481
+ }
3482
+ var _valid1 = _errs51 === errors;
3483
+ valid7 = valid7 || _valid1;
3484
+ }
3485
+ }
3486
+ }
3487
+ if (!valid7) {
3488
+ const err31 = { instancePath: instancePath + "/kek", schemaPath: "#/properties/kek/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
3489
+ if (vErrors === null) {
3490
+ vErrors = [err31];
3491
+ } else {
3492
+ vErrors.push(err31);
3493
+ }
3494
+ errors++;
3495
+ validate31.errors = vErrors;
3496
+ return false;
3497
+ } else {
3498
+ errors = _errs29;
3499
+ if (vErrors !== null) {
3500
+ if (_errs29) {
3501
+ vErrors.length = _errs29;
3502
+ } else {
3503
+ vErrors = null;
3504
+ }
3505
+ }
3506
+ }
3507
+ var valid0 = _errs28 === errors;
3508
+ } else {
3509
+ var valid0 = true;
3510
+ }
3511
+ if (valid0) {
3512
+ if (data.db !== void 0) {
3513
+ let data16 = data.db;
3514
+ const _errs54 = errors;
3515
+ const _errs55 = errors;
3516
+ let valid13 = false;
3517
+ const _errs56 = errors;
3518
+ const _errs57 = errors;
3519
+ if (errors === _errs57) {
3520
+ if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
3521
+ let missing4;
3522
+ if (data16.file === void 0 && (missing4 = "file") || data16.type === void 0 && (missing4 = "type")) {
3523
+ const err32 = { instancePath: instancePath + "/db", schemaPath: "#/definitions/BinaryDataFromFile/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" };
3524
+ if (vErrors === null) {
3525
+ vErrors = [err32];
3526
+ } else {
3527
+ vErrors.push(err32);
3528
+ }
3529
+ errors++;
3530
+ } else {
3531
+ const _errs59 = errors;
3532
+ for (const key5 in data16) {
3533
+ if (!(key5 === "type" || key5 === "file" || key5 === "offset" || key5 === "size")) {
3534
+ const err33 = { instancePath: instancePath + "/db", schemaPath: "#/definitions/BinaryDataFromFile/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key5 }, message: "must NOT have additional properties" };
3535
+ if (vErrors === null) {
3536
+ vErrors = [err33];
3537
+ } else {
3538
+ vErrors.push(err33);
3539
+ }
3540
+ errors++;
3541
+ break;
3542
+ }
3543
+ }
3544
+ if (_errs59 === errors) {
3545
+ if (data16.type !== void 0) {
3546
+ let data17 = data16.type;
3547
+ const _errs60 = errors;
3548
+ if (typeof data17 !== "string") {
3549
+ const err34 = { instancePath: instancePath + "/db/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3550
+ if (vErrors === null) {
3551
+ vErrors = [err34];
3552
+ } else {
3553
+ vErrors.push(err34);
3554
+ }
3555
+ errors++;
3556
+ }
3557
+ if ("file" !== data17) {
3558
+ const err35 = { instancePath: instancePath + "/db/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/const", keyword: "const", params: { allowedValue: "file" }, message: "must be equal to constant" };
3559
+ if (vErrors === null) {
3560
+ vErrors = [err35];
3561
+ } else {
3562
+ vErrors.push(err35);
3563
+ }
3564
+ errors++;
3565
+ }
3566
+ var valid15 = _errs60 === errors;
3567
+ } else {
3568
+ var valid15 = true;
3569
+ }
3570
+ if (valid15) {
3571
+ if (data16.file !== void 0) {
3572
+ const _errs62 = errors;
3573
+ if (typeof data16.file !== "string") {
3574
+ const err36 = { instancePath: instancePath + "/db/file", schemaPath: "#/definitions/BinaryDataFromFile/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3575
+ if (vErrors === null) {
3576
+ vErrors = [err36];
3577
+ } else {
3578
+ vErrors.push(err36);
3579
+ }
3580
+ errors++;
3581
+ }
3582
+ var valid15 = _errs62 === errors;
3583
+ } else {
3584
+ var valid15 = true;
3585
+ }
3586
+ if (valid15) {
3587
+ if (data16.offset !== void 0) {
3588
+ let data19 = data16.offset;
3589
+ const _errs64 = errors;
3590
+ if (!(typeof data19 == "number" && isFinite(data19))) {
3591
+ const err37 = { instancePath: instancePath + "/db/offset", schemaPath: "#/definitions/BinaryDataFromFile/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3592
+ if (vErrors === null) {
3593
+ vErrors = [err37];
3594
+ } else {
3595
+ vErrors.push(err37);
3596
+ }
3597
+ errors++;
3598
+ }
3599
+ var valid15 = _errs64 === errors;
3600
+ } else {
3601
+ var valid15 = true;
3602
+ }
3603
+ if (valid15) {
3604
+ if (data16.size !== void 0) {
3605
+ let data20 = data16.size;
3606
+ const _errs66 = errors;
3607
+ if (!(typeof data20 == "number" && isFinite(data20))) {
3608
+ const err38 = { instancePath: instancePath + "/db/size", schemaPath: "#/definitions/BinaryDataFromFile/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3609
+ if (vErrors === null) {
3610
+ vErrors = [err38];
3611
+ } else {
3612
+ vErrors.push(err38);
3613
+ }
3614
+ errors++;
3615
+ }
3616
+ var valid15 = _errs66 === errors;
3617
+ } else {
3618
+ var valid15 = true;
3619
+ }
3620
+ }
3621
+ }
3622
+ }
3623
+ }
3624
+ }
3625
+ } else {
3626
+ const err39 = { instancePath: instancePath + "/db", schemaPath: "#/definitions/BinaryDataFromFile/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3627
+ if (vErrors === null) {
3628
+ vErrors = [err39];
3629
+ } else {
3630
+ vErrors.push(err39);
3631
+ }
3632
+ errors++;
3633
+ }
3634
+ }
3635
+ var _valid2 = _errs56 === errors;
3636
+ valid13 = valid13 || _valid2;
3637
+ if (!valid13) {
3638
+ const _errs68 = errors;
3639
+ if (!validate13(data16, { instancePath: instancePath + "/db", parentData: data, parentDataProperty: "db", rootData })) {
3640
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
3641
+ errors = vErrors.length;
3642
+ }
3643
+ var _valid2 = _errs68 === errors;
3644
+ valid13 = valid13 || _valid2;
3645
+ if (!valid13) {
3646
+ const _errs69 = errors;
3647
+ const _errs70 = errors;
3648
+ if (errors === _errs70) {
3649
+ if (data16 && typeof data16 == "object" && !Array.isArray(data16)) {
3650
+ let missing5;
3651
+ if (data16.buffer === void 0 && (missing5 = "buffer") || data16.type === void 0 && (missing5 = "type")) {
3652
+ const err40 = { instancePath: instancePath + "/db", schemaPath: "#/definitions/BinaryDataFromBuffer/required", keyword: "required", params: { missingProperty: missing5 }, message: "must have required property '" + missing5 + "'" };
3653
+ if (vErrors === null) {
3654
+ vErrors = [err40];
3655
+ } else {
3656
+ vErrors.push(err40);
3657
+ }
3658
+ errors++;
3659
+ } else {
3660
+ const _errs72 = errors;
3661
+ for (const key6 in data16) {
3662
+ if (!(key6 === "type" || key6 === "buffer")) {
3663
+ const err41 = { instancePath: instancePath + "/db", schemaPath: "#/definitions/BinaryDataFromBuffer/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key6 }, message: "must NOT have additional properties" };
3664
+ if (vErrors === null) {
3665
+ vErrors = [err41];
3666
+ } else {
3667
+ vErrors.push(err41);
3668
+ }
3669
+ errors++;
3670
+ break;
3671
+ }
3672
+ }
3673
+ if (_errs72 === errors) {
3674
+ if (data16.type !== void 0) {
3675
+ let data21 = data16.type;
3676
+ const _errs73 = errors;
3677
+ if (typeof data21 !== "string") {
3678
+ const err42 = { instancePath: instancePath + "/db/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3679
+ if (vErrors === null) {
3680
+ vErrors = [err42];
3681
+ } else {
3682
+ vErrors.push(err42);
3683
+ }
3684
+ errors++;
3685
+ }
3686
+ if ("buffer" !== data21) {
3687
+ const err43 = { instancePath: instancePath + "/db/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/const", keyword: "const", params: { allowedValue: "buffer" }, message: "must be equal to constant" };
3688
+ if (vErrors === null) {
3689
+ vErrors = [err43];
3690
+ } else {
3691
+ vErrors.push(err43);
3692
+ }
3693
+ errors++;
3694
+ }
3695
+ var valid17 = _errs73 === errors;
3696
+ } else {
3697
+ var valid17 = true;
3698
+ }
3699
+ if (valid17) {
3700
+ if (data16.buffer !== void 0) {
3701
+ let data22 = data16.buffer;
3702
+ const _errs75 = errors;
3703
+ if (!(data22 && typeof data22 == "object" && !Array.isArray(data22))) {
3704
+ const err44 = { instancePath: instancePath + "/db/buffer", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/buffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3705
+ if (vErrors === null) {
3706
+ vErrors = [err44];
3707
+ } else {
3708
+ vErrors.push(err44);
3709
+ }
3710
+ errors++;
3711
+ }
3712
+ var valid17 = _errs75 === errors;
3713
+ } else {
3714
+ var valid17 = true;
3715
+ }
3716
+ }
3717
+ }
3718
+ }
3719
+ } else {
3720
+ const err45 = { instancePath: instancePath + "/db", schemaPath: "#/definitions/BinaryDataFromBuffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3721
+ if (vErrors === null) {
3722
+ vErrors = [err45];
3723
+ } else {
3724
+ vErrors.push(err45);
3725
+ }
3726
+ errors++;
3727
+ }
3728
+ }
3729
+ var _valid2 = _errs69 === errors;
3730
+ valid13 = valid13 || _valid2;
3731
+ if (!valid13) {
3732
+ const _errs77 = errors;
3733
+ if (errors === _errs77) {
3734
+ if (Array.isArray(data16)) {
3735
+ var valid18 = true;
3736
+ const len2 = data16.length;
3737
+ for (let i2 = 0; i2 < len2; i2++) {
3738
+ const _errs79 = errors;
3739
+ if (!validate33(data16[i2], { instancePath: instancePath + "/db/" + i2, parentData: data16, parentDataProperty: i2, rootData })) {
3740
+ vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
3741
+ errors = vErrors.length;
3742
+ }
3743
+ var valid18 = _errs79 === errors;
3744
+ if (!valid18) {
3745
+ break;
3746
+ }
3747
+ }
3748
+ } else {
3749
+ const err46 = { instancePath: instancePath + "/db", schemaPath: "#/properties/db/anyOf/3/type", keyword: "type", params: { type: "array" }, message: "must be array" };
3750
+ if (vErrors === null) {
3751
+ vErrors = [err46];
3752
+ } else {
3753
+ vErrors.push(err46);
3754
+ }
3755
+ errors++;
3756
+ }
3757
+ }
3758
+ var _valid2 = _errs77 === errors;
3759
+ valid13 = valid13 || _valid2;
3760
+ }
3761
+ }
3762
+ }
3763
+ if (!valid13) {
3764
+ const err47 = { instancePath: instancePath + "/db", schemaPath: "#/properties/db/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
3765
+ if (vErrors === null) {
3766
+ vErrors = [err47];
3767
+ } else {
3768
+ vErrors.push(err47);
3769
+ }
3770
+ errors++;
3771
+ validate31.errors = vErrors;
3772
+ return false;
3773
+ } else {
3774
+ errors = _errs55;
3775
+ if (vErrors !== null) {
3776
+ if (_errs55) {
3777
+ vErrors.length = _errs55;
3778
+ } else {
3779
+ vErrors = null;
3780
+ }
3781
+ }
3782
+ }
3783
+ var valid0 = _errs54 === errors;
2659
3784
  } else {
2660
3785
  var valid0 = true;
2661
3786
  }
2662
3787
  if (valid0) {
2663
- if (data.pk !== void 0) {
2664
- const _errs4 = errors;
2665
- if (!validate13(data.pk, { instancePath: instancePath + "/pk", parentData: data, parentDataProperty: "pk", rootData })) {
2666
- vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
2667
- errors = vErrors.length;
3788
+ if (data.dbx !== void 0) {
3789
+ let data24 = data.dbx;
3790
+ const _errs80 = errors;
3791
+ const _errs81 = errors;
3792
+ let valid19 = false;
3793
+ const _errs82 = errors;
3794
+ const _errs83 = errors;
3795
+ if (errors === _errs83) {
3796
+ if (data24 && typeof data24 == "object" && !Array.isArray(data24)) {
3797
+ let missing6;
3798
+ if (data24.file === void 0 && (missing6 = "file") || data24.type === void 0 && (missing6 = "type")) {
3799
+ const err48 = { instancePath: instancePath + "/dbx", schemaPath: "#/definitions/BinaryDataFromFile/required", keyword: "required", params: { missingProperty: missing6 }, message: "must have required property '" + missing6 + "'" };
3800
+ if (vErrors === null) {
3801
+ vErrors = [err48];
3802
+ } else {
3803
+ vErrors.push(err48);
3804
+ }
3805
+ errors++;
3806
+ } else {
3807
+ const _errs85 = errors;
3808
+ for (const key7 in data24) {
3809
+ if (!(key7 === "type" || key7 === "file" || key7 === "offset" || key7 === "size")) {
3810
+ const err49 = { instancePath: instancePath + "/dbx", schemaPath: "#/definitions/BinaryDataFromFile/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key7 }, message: "must NOT have additional properties" };
3811
+ if (vErrors === null) {
3812
+ vErrors = [err49];
3813
+ } else {
3814
+ vErrors.push(err49);
3815
+ }
3816
+ errors++;
3817
+ break;
3818
+ }
3819
+ }
3820
+ if (_errs85 === errors) {
3821
+ if (data24.type !== void 0) {
3822
+ let data25 = data24.type;
3823
+ const _errs86 = errors;
3824
+ if (typeof data25 !== "string") {
3825
+ const err50 = { instancePath: instancePath + "/dbx/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3826
+ if (vErrors === null) {
3827
+ vErrors = [err50];
3828
+ } else {
3829
+ vErrors.push(err50);
3830
+ }
3831
+ errors++;
3832
+ }
3833
+ if ("file" !== data25) {
3834
+ const err51 = { instancePath: instancePath + "/dbx/type", schemaPath: "#/definitions/BinaryDataFromFile/properties/type/const", keyword: "const", params: { allowedValue: "file" }, message: "must be equal to constant" };
3835
+ if (vErrors === null) {
3836
+ vErrors = [err51];
3837
+ } else {
3838
+ vErrors.push(err51);
3839
+ }
3840
+ errors++;
3841
+ }
3842
+ var valid21 = _errs86 === errors;
3843
+ } else {
3844
+ var valid21 = true;
3845
+ }
3846
+ if (valid21) {
3847
+ if (data24.file !== void 0) {
3848
+ const _errs88 = errors;
3849
+ if (typeof data24.file !== "string") {
3850
+ const err52 = { instancePath: instancePath + "/dbx/file", schemaPath: "#/definitions/BinaryDataFromFile/properties/file/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3851
+ if (vErrors === null) {
3852
+ vErrors = [err52];
3853
+ } else {
3854
+ vErrors.push(err52);
3855
+ }
3856
+ errors++;
3857
+ }
3858
+ var valid21 = _errs88 === errors;
3859
+ } else {
3860
+ var valid21 = true;
3861
+ }
3862
+ if (valid21) {
3863
+ if (data24.offset !== void 0) {
3864
+ let data27 = data24.offset;
3865
+ const _errs90 = errors;
3866
+ if (!(typeof data27 == "number" && isFinite(data27))) {
3867
+ const err53 = { instancePath: instancePath + "/dbx/offset", schemaPath: "#/definitions/BinaryDataFromFile/properties/offset/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3868
+ if (vErrors === null) {
3869
+ vErrors = [err53];
3870
+ } else {
3871
+ vErrors.push(err53);
3872
+ }
3873
+ errors++;
3874
+ }
3875
+ var valid21 = _errs90 === errors;
3876
+ } else {
3877
+ var valid21 = true;
3878
+ }
3879
+ if (valid21) {
3880
+ if (data24.size !== void 0) {
3881
+ let data28 = data24.size;
3882
+ const _errs92 = errors;
3883
+ if (!(typeof data28 == "number" && isFinite(data28))) {
3884
+ const err54 = { instancePath: instancePath + "/dbx/size", schemaPath: "#/definitions/BinaryDataFromFile/properties/size/type", keyword: "type", params: { type: "number" }, message: "must be number" };
3885
+ if (vErrors === null) {
3886
+ vErrors = [err54];
3887
+ } else {
3888
+ vErrors.push(err54);
3889
+ }
3890
+ errors++;
3891
+ }
3892
+ var valid21 = _errs92 === errors;
3893
+ } else {
3894
+ var valid21 = true;
3895
+ }
3896
+ }
3897
+ }
3898
+ }
3899
+ }
3900
+ }
3901
+ } else {
3902
+ const err55 = { instancePath: instancePath + "/dbx", schemaPath: "#/definitions/BinaryDataFromFile/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3903
+ if (vErrors === null) {
3904
+ vErrors = [err55];
3905
+ } else {
3906
+ vErrors.push(err55);
3907
+ }
3908
+ errors++;
3909
+ }
3910
+ }
3911
+ var _valid3 = _errs82 === errors;
3912
+ valid19 = valid19 || _valid3;
3913
+ if (!valid19) {
3914
+ const _errs94 = errors;
3915
+ if (!validate13(data24, { instancePath: instancePath + "/dbx", parentData: data, parentDataProperty: "dbx", rootData })) {
3916
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
3917
+ errors = vErrors.length;
3918
+ }
3919
+ var _valid3 = _errs94 === errors;
3920
+ valid19 = valid19 || _valid3;
3921
+ if (!valid19) {
3922
+ const _errs95 = errors;
3923
+ const _errs96 = errors;
3924
+ if (errors === _errs96) {
3925
+ if (data24 && typeof data24 == "object" && !Array.isArray(data24)) {
3926
+ let missing7;
3927
+ if (data24.buffer === void 0 && (missing7 = "buffer") || data24.type === void 0 && (missing7 = "type")) {
3928
+ const err56 = { instancePath: instancePath + "/dbx", schemaPath: "#/definitions/BinaryDataFromBuffer/required", keyword: "required", params: { missingProperty: missing7 }, message: "must have required property '" + missing7 + "'" };
3929
+ if (vErrors === null) {
3930
+ vErrors = [err56];
3931
+ } else {
3932
+ vErrors.push(err56);
3933
+ }
3934
+ errors++;
3935
+ } else {
3936
+ const _errs98 = errors;
3937
+ for (const key8 in data24) {
3938
+ if (!(key8 === "type" || key8 === "buffer")) {
3939
+ const err57 = { instancePath: instancePath + "/dbx", schemaPath: "#/definitions/BinaryDataFromBuffer/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" };
3940
+ if (vErrors === null) {
3941
+ vErrors = [err57];
3942
+ } else {
3943
+ vErrors.push(err57);
3944
+ }
3945
+ errors++;
3946
+ break;
3947
+ }
3948
+ }
3949
+ if (_errs98 === errors) {
3950
+ if (data24.type !== void 0) {
3951
+ let data29 = data24.type;
3952
+ const _errs99 = errors;
3953
+ if (typeof data29 !== "string") {
3954
+ const err58 = { instancePath: instancePath + "/dbx/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3955
+ if (vErrors === null) {
3956
+ vErrors = [err58];
3957
+ } else {
3958
+ vErrors.push(err58);
3959
+ }
3960
+ errors++;
3961
+ }
3962
+ if ("buffer" !== data29) {
3963
+ const err59 = { instancePath: instancePath + "/dbx/type", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/type/const", keyword: "const", params: { allowedValue: "buffer" }, message: "must be equal to constant" };
3964
+ if (vErrors === null) {
3965
+ vErrors = [err59];
3966
+ } else {
3967
+ vErrors.push(err59);
3968
+ }
3969
+ errors++;
3970
+ }
3971
+ var valid23 = _errs99 === errors;
3972
+ } else {
3973
+ var valid23 = true;
3974
+ }
3975
+ if (valid23) {
3976
+ if (data24.buffer !== void 0) {
3977
+ let data30 = data24.buffer;
3978
+ const _errs101 = errors;
3979
+ if (!(data30 && typeof data30 == "object" && !Array.isArray(data30))) {
3980
+ const err60 = { instancePath: instancePath + "/dbx/buffer", schemaPath: "#/definitions/BinaryDataFromBuffer/properties/buffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3981
+ if (vErrors === null) {
3982
+ vErrors = [err60];
3983
+ } else {
3984
+ vErrors.push(err60);
3985
+ }
3986
+ errors++;
3987
+ }
3988
+ var valid23 = _errs101 === errors;
3989
+ } else {
3990
+ var valid23 = true;
3991
+ }
3992
+ }
3993
+ }
3994
+ }
3995
+ } else {
3996
+ const err61 = { instancePath: instancePath + "/dbx", schemaPath: "#/definitions/BinaryDataFromBuffer/type", keyword: "type", params: { type: "object" }, message: "must be object" };
3997
+ if (vErrors === null) {
3998
+ vErrors = [err61];
3999
+ } else {
4000
+ vErrors.push(err61);
4001
+ }
4002
+ errors++;
4003
+ }
4004
+ }
4005
+ var _valid3 = _errs95 === errors;
4006
+ valid19 = valid19 || _valid3;
4007
+ if (!valid19) {
4008
+ const _errs103 = errors;
4009
+ if (errors === _errs103) {
4010
+ if (Array.isArray(data24)) {
4011
+ var valid24 = true;
4012
+ const len3 = data24.length;
4013
+ for (let i3 = 0; i3 < len3; i3++) {
4014
+ const _errs105 = errors;
4015
+ if (!validate33(data24[i3], { instancePath: instancePath + "/dbx/" + i3, parentData: data24, parentDataProperty: i3, rootData })) {
4016
+ vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
4017
+ errors = vErrors.length;
4018
+ }
4019
+ var valid24 = _errs105 === errors;
4020
+ if (!valid24) {
4021
+ break;
4022
+ }
4023
+ }
4024
+ } else {
4025
+ const err62 = { instancePath: instancePath + "/dbx", schemaPath: "#/properties/dbx/anyOf/3/type", keyword: "type", params: { type: "array" }, message: "must be array" };
4026
+ if (vErrors === null) {
4027
+ vErrors = [err62];
4028
+ } else {
4029
+ vErrors.push(err62);
4030
+ }
4031
+ errors++;
4032
+ }
4033
+ }
4034
+ var _valid3 = _errs103 === errors;
4035
+ valid19 = valid19 || _valid3;
4036
+ }
4037
+ }
4038
+ }
4039
+ if (!valid19) {
4040
+ const err63 = { instancePath: instancePath + "/dbx", schemaPath: "#/properties/dbx/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
4041
+ if (vErrors === null) {
4042
+ vErrors = [err63];
4043
+ } else {
4044
+ vErrors.push(err63);
4045
+ }
4046
+ errors++;
4047
+ validate31.errors = vErrors;
4048
+ return false;
4049
+ } else {
4050
+ errors = _errs81;
4051
+ if (vErrors !== null) {
4052
+ if (_errs81) {
4053
+ vErrors.length = _errs81;
4054
+ } else {
4055
+ vErrors = null;
4056
+ }
4057
+ }
2668
4058
  }
2669
- var valid0 = _errs4 === errors;
4059
+ var valid0 = _errs80 === errors;
2670
4060
  } else {
2671
4061
  var valid0 = true;
2672
4062
  }
@@ -2675,11 +4065,11 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
2675
4065
  }
2676
4066
  }
2677
4067
  } else {
2678
- validate33.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
4068
+ validate31.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
2679
4069
  return false;
2680
4070
  }
2681
4071
  }
2682
- validate33.errors = vErrors;
4072
+ validate31.errors = vErrors;
2683
4073
  return errors === 0;
2684
4074
  }
2685
4075
  function validate10(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
@@ -2818,8 +4208,8 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
2818
4208
  if (valid0) {
2819
4209
  if (data.enrollSecureBoot !== void 0) {
2820
4210
  const _errs21 = errors;
2821
- if (!validate33(data.enrollSecureBoot, { instancePath: instancePath + "/enrollSecureBoot", parentData: data, parentDataProperty: "enrollSecureBoot", rootData })) {
2822
- vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
4211
+ if (!validate31(data.enrollSecureBoot, { instancePath: instancePath + "/enrollSecureBoot", parentData: data, parentDataProperty: "enrollSecureBoot", rootData })) {
4212
+ vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);
2823
4213
  errors = vErrors.length;
2824
4214
  }
2825
4215
  var valid0 = _errs21 === errors;
@@ -2883,7 +4273,7 @@ const build = async (config) => {
2883
4273
  await genCode(config);
2884
4274
  }
2885
4275
  if (!config.skipExtract) {
2886
- const extract = (await import("./extract-BvhlZgSs.js")).extract;
4276
+ const extract = (await import("./extract-DWqQqF9y.js")).extract;
2887
4277
  await extract(config.buildFolder);
2888
4278
  }
2889
4279
  if (!config.skipMake) {
@@ -2903,5 +4293,9 @@ const build = async (config) => {
2903
4293
  }
2904
4294
  };
2905
4295
  export {
2906
- build as b
4296
+ EFI_VAR_DB as E,
4297
+ EFI_VAR_DBX as a,
4298
+ build as b,
4299
+ EFI_VAR_KEK as c,
4300
+ EFI_VAR_PK as d
2907
4301
  };