tachyon-protocol 1.9.0 → 1.9.2

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.
@@ -17,4 +17,4 @@ function ucs2length(str) {
17
17
  }
18
18
  return length;
19
19
  }
20
- "use strict";export const user_updated_event = validate10;const schema11 = {"$id":"https://schema.beyondallreason.dev/tachyon/user/updated/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"UserUpdatedEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"user/updated"},"data":{"title":"UserUpdatedEventData","type":"object","properties":{"users":{"type":"array","items":{"type":"object","allOf":[{"type":"object","properties":{"userId":{"type":"string","format":"uuid","examples":["f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"]},"username":{"type":"string"},"displayName":{"type":"string"},"clanId":{"anyOf":[{"type":"string"},{"type":"null"}]},"partyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"countryCode":{"type":"string"},"status":{"anyOf":[{"const":"offline"},{"const":"menu"},{"const":"playing"},{"const":"lobby"}]}}},{"type":"object","properties":{"friendIds":{"type":"array","items":{"type":"string"}},"outgoingFriendRequestIds":{"type":"array","items":{"type":"string"}},"incomingFriendRequestIds":{"type":"array","items":{"type":"string"}},"ignoreIds":{"type":"array","items":{"type":"string"}}}}]}}},"required":["users"]}},"required":["type","messageId","commandId","data"]};const formats0 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/user/updated/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate10.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate10.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("user/updated" !== data.commandId){validate10.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "user/updated"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.users === undefined) && (missing1 = "users")){validate10.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.users !== undefined){let data4 = data3.users;const _errs7 = errors;if(errors === _errs7){if(Array.isArray(data4)){var valid2 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];const _errs9 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0,schemaPath:"#/properties/data/properties/users/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs11 = errors;if(errors === _errs11){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.userId !== undefined){let data6 = data5.userId;const _errs13 = errors;if(errors === _errs13){if(errors === _errs13){if(typeof data6 === "string"){if(!(formats0.test(data6))){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/userId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/userId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/userId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/userId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid4 = _errs13 === errors;}else {var valid4 = true;}if(valid4){if(data5.username !== undefined){const _errs15 = errors;if(typeof data5.username !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/username",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/username/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs15 === errors;}else {var valid4 = true;}if(valid4){if(data5.displayName !== undefined){const _errs17 = errors;if(typeof data5.displayName !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/displayName",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/displayName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs17 === errors;}else {var valid4 = true;}if(valid4){if(data5.clanId !== undefined){let data9 = data5.clanId;const _errs19 = errors;const _errs20 = errors;let valid5 = false;const _errs21 = errors;if(typeof data9 !== "string"){const err0 = {instancePath:instancePath+"/data/users/" + i0+"/clanId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/clanId/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs21 === errors;valid5 = valid5 || _valid0;if(!valid5){const _errs23 = errors;if(data9 !== null){const err1 = {instancePath:instancePath+"/data/users/" + i0+"/clanId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/clanId/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs23 === errors;valid5 = valid5 || _valid0;}if(!valid5){const err2 = {instancePath:instancePath+"/data/users/" + i0+"/clanId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/clanId/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate10.errors = vErrors;return false;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}var valid4 = _errs19 === errors;}else {var valid4 = true;}if(valid4){if(data5.partyId !== undefined){let data10 = data5.partyId;const _errs25 = errors;const _errs26 = errors;let valid6 = false;const _errs27 = errors;if(typeof data10 !== "string"){const err3 = {instancePath:instancePath+"/data/users/" + i0+"/partyId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/partyId/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs27 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs29 = errors;if(data10 !== null){const err4 = {instancePath:instancePath+"/data/users/" + i0+"/partyId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/partyId/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs29 === errors;valid6 = valid6 || _valid1;}if(!valid6){const err5 = {instancePath:instancePath+"/data/users/" + i0+"/partyId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/partyId/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate10.errors = vErrors;return false;}else {errors = _errs26;if(vErrors !== null){if(_errs26){vErrors.length = _errs26;}else {vErrors = null;}}}var valid4 = _errs25 === errors;}else {var valid4 = true;}if(valid4){if(data5.scopes !== undefined){let data11 = data5.scopes;const _errs31 = errors;if(errors === _errs31){if(Array.isArray(data11)){var valid7 = true;const len1 = data11.length;for(let i1=0; i1<len1; i1++){const _errs33 = errors;if(typeof data11[i1] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/scopes/" + i1,schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/scopes/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs33 === errors;if(!valid7){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/scopes",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/scopes/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid4 = _errs31 === errors;}else {var valid4 = true;}if(valid4){if(data5.countryCode !== undefined){const _errs35 = errors;if(typeof data5.countryCode !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/countryCode",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/countryCode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs35 === errors;}else {var valid4 = true;}if(valid4){if(data5.status !== undefined){let data14 = data5.status;const _errs37 = errors;const _errs38 = errors;let valid8 = false;const _errs39 = errors;if("offline" !== data14){const err6 = {instancePath:instancePath+"/data/users/" + i0+"/status",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/status/anyOf/0/const",keyword:"const",params:{allowedValue: "offline"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid2 = _errs39 === errors;valid8 = valid8 || _valid2;if(!valid8){const _errs40 = errors;if("menu" !== data14){const err7 = {instancePath:instancePath+"/data/users/" + i0+"/status",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/status/anyOf/1/const",keyword:"const",params:{allowedValue: "menu"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid2 = _errs40 === errors;valid8 = valid8 || _valid2;if(!valid8){const _errs41 = errors;if("playing" !== data14){const err8 = {instancePath:instancePath+"/data/users/" + i0+"/status",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/status/anyOf/2/const",keyword:"const",params:{allowedValue: "playing"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid2 = _errs41 === errors;valid8 = valid8 || _valid2;if(!valid8){const _errs42 = errors;if("lobby" !== data14){const err9 = {instancePath:instancePath+"/data/users/" + i0+"/status",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/status/anyOf/3/const",keyword:"const",params:{allowedValue: "lobby"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid2 = _errs42 === errors;valid8 = valid8 || _valid2;}}}if(!valid8){const err10 = {instancePath:instancePath+"/data/users/" + i0+"/status",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/status/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;validate10.errors = vErrors;return false;}else {errors = _errs38;if(vErrors !== null){if(_errs38){vErrors.length = _errs38;}else {vErrors = null;}}}var valid4 = _errs37 === errors;}else {var valid4 = true;}}}}}}}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0,schemaPath:"#/properties/data/properties/users/items/allOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs11 === errors;if(valid3){const _errs43 = errors;if(errors === _errs43){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.friendIds !== undefined){let data15 = data5.friendIds;const _errs45 = errors;if(errors === _errs45){if(Array.isArray(data15)){var valid10 = true;const len2 = data15.length;for(let i2=0; i2<len2; i2++){const _errs47 = errors;if(typeof data15[i2] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/friendIds/" + i2,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/friendIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid10 = _errs47 === errors;if(!valid10){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/friendIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/friendIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid9 = _errs45 === errors;}else {var valid9 = true;}if(valid9){if(data5.outgoingFriendRequestIds !== undefined){let data17 = data5.outgoingFriendRequestIds;const _errs49 = errors;if(errors === _errs49){if(Array.isArray(data17)){var valid11 = true;const len3 = data17.length;for(let i3=0; i3<len3; i3++){const _errs51 = errors;if(typeof data17[i3] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/outgoingFriendRequestIds/" + i3,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/outgoingFriendRequestIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs51 === errors;if(!valid11){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/outgoingFriendRequestIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/outgoingFriendRequestIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid9 = _errs49 === errors;}else {var valid9 = true;}if(valid9){if(data5.incomingFriendRequestIds !== undefined){let data19 = data5.incomingFriendRequestIds;const _errs53 = errors;if(errors === _errs53){if(Array.isArray(data19)){var valid12 = true;const len4 = data19.length;for(let i4=0; i4<len4; i4++){const _errs55 = errors;if(typeof data19[i4] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/incomingFriendRequestIds/" + i4,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/incomingFriendRequestIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs55 === errors;if(!valid12){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/incomingFriendRequestIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/incomingFriendRequestIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid9 = _errs53 === errors;}else {var valid9 = true;}if(valid9){if(data5.ignoreIds !== undefined){let data21 = data5.ignoreIds;const _errs57 = errors;if(errors === _errs57){if(Array.isArray(data21)){var valid13 = true;const len5 = data21.length;for(let i5=0; i5<len5; i5++){const _errs59 = errors;if(typeof data21[i5] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/ignoreIds/" + i5,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/ignoreIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid13 = _errs59 === errors;if(!valid13){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/ignoreIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/ignoreIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid9 = _errs57 === errors;}else {var valid9 = true;}}}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0,schemaPath:"#/properties/data/properties/users/items/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs43 === errors;}var valid2 = _errs9 === errors;if(!valid2){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users",schemaPath:"#/properties/data/properties/users/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate10.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;}export const system_serverStats_request = validate11;const schema12 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/serverStats/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemServerStatsRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"system/serverStats"}},"required":["type","messageId","commandId"]};function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/serverStats/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate11.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate11.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("system/serverStats" !== data.commandId){validate11.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "system/serverStats"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}export const system_serverStats_response = validate12;const schema13 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/serverStats/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemServerStatsResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"SystemServerStatsOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/serverStats"},"status":{"const":"success"},"data":{"title":"SystemServerStatsOkResponseData","type":"object","properties":{"userCount":{"type":"integer"}},"required":["userCount"]}},"required":["type","messageId","commandId","status","data"]},{"title":"SystemServerStatsFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/serverStats"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/serverStats/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.data === undefined) && (missing0 = "data"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("system/serverStats" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "system/serverStats"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data.data !== undefined){let data4 = data.data;const _errs8 = errors;if(errors === _errs8){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){let missing1;if((data4.userCount === undefined) && (missing1 = "userCount")){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {if(data4.userCount !== undefined){let data5 = data4.userCount;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err6 = {instancePath:instancePath+"/data/userCount",schemaPath:"#/anyOf/0/properties/data/properties/userCount/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}}}}else {const err8 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs12 = errors;if(errors === _errs12){if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((((((data.type === undefined) && (missing2 = "type")) || ((data.messageId === undefined) && (missing2 = "messageId"))) || ((data.commandId === undefined) && (missing2 = "commandId"))) || ((data.status === undefined) && (missing2 = "status"))) || ((data.reason === undefined) && (missing2 = "reason"))){const err9 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data.type !== undefined){const _errs14 = errors;if("response" !== data.type){const err10 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid3 = _errs14 === errors;}else {var valid3 = true;}if(valid3){if(data.messageId !== undefined){const _errs15 = errors;if(typeof data.messageId !== "string"){const err11 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid3 = _errs15 === errors;}else {var valid3 = true;}if(valid3){if(data.commandId !== undefined){const _errs17 = errors;if("system/serverStats" !== data.commandId){const err12 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "system/serverStats"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid3 = _errs17 === errors;}else {var valid3 = true;}if(valid3){if(data.status !== undefined){const _errs18 = errors;if("failed" !== data.status){const err13 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var valid3 = _errs18 === errors;}else {var valid3 = true;}if(valid3){if(data.reason !== undefined){let data10 = data.reason;const _errs19 = errors;if(!((((data10 === "internal_error") || (data10 === "unauthorized")) || (data10 === "invalid_request")) || (data10 === "command_unimplemented"))){const err14 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema13.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var valid3 = _errs19 === errors;}else {var valid3 = true;}if(valid3){if(data.details !== undefined){const _errs20 = errors;if(typeof data.details !== "string"){const err15 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var valid3 = _errs20 === errors;}else {var valid3 = true;}}}}}}}}else {const err16 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}var _valid0 = _errs12 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err17 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate12.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate12.errors = vErrors;return errors === 0;}export const system_disconnect_request = validate13;const schema14 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/disconnect/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemDisconnectRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"system/disconnect"},"data":{"title":"SystemDisconnectRequestData","type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}},"required":["type","messageId","commandId"]};function validate13(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/disconnect/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate13.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate13.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate13.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("system/disconnect" !== data.commandId){validate13.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "system/disconnect"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.reason === undefined) && (missing1 = "reason")){validate13.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.reason !== undefined){if(typeof data3.reason !== "string"){validate13.errors = [{instancePath:instancePath+"/data/reason",schemaPath:"#/properties/data/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate13.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate13.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate13.errors = vErrors;return errors === 0;}export const system_disconnect_response = validate14;const schema15 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/disconnect/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemDisconnectResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"SystemDisconnectOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/disconnect"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"SystemDisconnectFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/disconnect"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate14(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/disconnect/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("system/disconnect" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "system/disconnect"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("system/disconnect" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "system/disconnect"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema15.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate14.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate14.errors = vErrors;return errors === 0;}export const matchmaking_readyUpdate_event = validate15;const schema16 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/readyUpdate/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingReadyUpdateEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/readyUpdate"},"data":{"title":"MatchmakingReadyUpdateEventData","type":"object","properties":{"readyMax":{"type":"integer"},"readyCurrent":{"type":"integer"}},"required":["readyMax","readyCurrent"]}},"required":["type","messageId","commandId","data"]};function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/readyUpdate/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate15.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate15.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate15.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/readyUpdate" !== data.commandId){validate15.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/readyUpdate"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.readyMax === undefined) && (missing1 = "readyMax")) || ((data3.readyCurrent === undefined) && (missing1 = "readyCurrent"))){validate15.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.readyMax !== undefined){let data4 = data3.readyMax;const _errs7 = errors;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate15.errors = [{instancePath:instancePath+"/data/readyMax",schemaPath:"#/properties/data/properties/readyMax/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.readyCurrent !== undefined){let data5 = data3.readyCurrent;const _errs9 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate15.errors = [{instancePath:instancePath+"/data/readyCurrent",schemaPath:"#/properties/data/properties/readyCurrent/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate15.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate15.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate15.errors = vErrors;return errors === 0;}export const matchmaking_ready_request = validate16;const schema17 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/ready/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingReadyRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/ready"}},"required":["type","messageId","commandId"]};function validate16(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/ready/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate16.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate16.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate16.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/ready" !== data.commandId){validate16.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/ready"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate16.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate16.errors = vErrors;return errors === 0;}export const matchmaking_ready_response = validate17;const schema18 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/ready/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingReadyResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingReadyOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/ready"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"MatchmakingReadyFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/ready"},"status":{"const":"failed"},"reason":{"enum":["no_match","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate17(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/ready/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/ready" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/ready"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("matchmaking/ready" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/ready"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!(((((data8 === "no_match") || (data8 === "internal_error")) || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema18.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate17.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate17.errors = vErrors;return errors === 0;}export const matchmaking_queueUpdate_event = validate18;const schema19 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/queueUpdate/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingQueueUpdateEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queueUpdate"},"data":{"title":"MatchmakingQueueUpdateEventData","type":"object","properties":{"playersQueued":{"type":"string"}},"required":["playersQueued"]}},"required":["type","messageId","commandId","data"]};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/queueUpdate/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate18.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate18.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate18.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/queueUpdate" !== data.commandId){validate18.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queueUpdate"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.playersQueued === undefined) && (missing1 = "playersQueued")){validate18.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.playersQueued !== undefined){if(typeof data3.playersQueued !== "string"){validate18.errors = [{instancePath:instancePath+"/data/playersQueued",schemaPath:"#/properties/data/properties/playersQueued/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate18.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate18.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate18.errors = vErrors;return errors === 0;}export const matchmaking_queue_request = validate19;const schema20 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/queue/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingQueueRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queue"},"data":{"title":"MatchmakingQueueRequestData","type":"object","properties":{"queues":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["queues"]}},"required":["type","messageId","commandId","data"]};function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/queue/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate19.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate19.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate19.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/queue" !== data.commandId){validate19.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queue"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.queues === undefined) && (missing1 = "queues")){validate19.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.queues !== undefined){let data4 = data3.queues;const _errs7 = errors;if(errors === _errs7){if(Array.isArray(data4)){if(data4.length < 1){validate19.errors = [{instancePath:instancePath+"/data/queues",schemaPath:"#/properties/data/properties/queues/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid2 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){const _errs9 = errors;if(typeof data4[i0] !== "string"){validate19.errors = [{instancePath:instancePath+"/data/queues/" + i0,schemaPath:"#/properties/data/properties/queues/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs9 === errors;if(!valid2){break;}}}}else {validate19.errors = [{instancePath:instancePath+"/data/queues",schemaPath:"#/properties/data/properties/queues/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate19.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate19.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate19.errors = vErrors;return errors === 0;}export const matchmaking_queue_response = validate20;const schema21 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/queue/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingQueueResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingQueueOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queue"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"MatchmakingQueueFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queue"},"status":{"const":"failed"},"reason":{"enum":["invalid_queue_specified","already_queued","already_inbattle","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/queue/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/queue" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queue"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("matchmaking/queue" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queue"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!(((((((data8 === "invalid_queue_specified") || (data8 === "already_queued")) || (data8 === "already_inbattle")) || (data8 === "internal_error")) || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema21.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate20.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate20.errors = vErrors;return errors === 0;}export const matchmaking_lost_event = validate21;const schema22 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/lost/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingLostEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/lost"}},"required":["type","messageId","commandId"]};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/lost/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate21.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate21.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate21.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/lost" !== data.commandId){validate21.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/lost"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate21.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate21.errors = vErrors;return errors === 0;}export const matchmaking_list_request = validate22;const schema23 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/list/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingListRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/list"}},"required":["type","messageId","commandId"]};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/list/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate22.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate22.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate22.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/list" !== data.commandId){validate22.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/list"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate22.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate22.errors = vErrors;return errors === 0;}export const matchmaking_list_response = validate23;const schema24 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/list/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingListResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingListOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/list"},"status":{"const":"success"},"data":{"title":"MatchmakingListOkResponseData","type":"object","properties":{"playlists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numOfTeams":{"type":"integer"},"teamSize":{"type":"integer"},"ranked":{"type":"boolean"}},"required":["id","name","numOfTeams","teamSize","ranked"]}}},"required":["playlists"],"examples":[{"playlists":[{"id":"1v1","name":"Duel","numOfTeams":2,"teamSize":1,"ranked":true},{"id":"1v1v1","name":"3 Way FFA","numOfTeams":3,"teamSize":1,"ranked":true}]}]}},"required":["type","messageId","commandId","status","data"]},{"title":"MatchmakingListFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/list"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/list/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.data === undefined) && (missing0 = "data"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/list" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/list"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data.data !== undefined){let data4 = data.data;const _errs8 = errors;if(errors === _errs8){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){let missing1;if((data4.playlists === undefined) && (missing1 = "playlists")){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {if(data4.playlists !== undefined){let data5 = data4.playlists;const _errs10 = errors;if(errors === _errs10){if(Array.isArray(data5)){var valid3 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];const _errs12 = errors;if(errors === _errs12){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing2;if((((((data6.id === undefined) && (missing2 = "id")) || ((data6.name === undefined) && (missing2 = "name"))) || ((data6.numOfTeams === undefined) && (missing2 = "numOfTeams"))) || ((data6.teamSize === undefined) && (missing2 = "teamSize"))) || ((data6.ranked === undefined) && (missing2 = "ranked"))){const err6 = {instancePath:instancePath+"/data/playlists/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data6.id !== undefined){const _errs14 = errors;if(typeof data6.id !== "string"){const err7 = {instancePath:instancePath+"/data/playlists/" + i0+"/id",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid4 = _errs14 === errors;}else {var valid4 = true;}if(valid4){if(data6.name !== undefined){const _errs16 = errors;if(typeof data6.name !== "string"){const err8 = {instancePath:instancePath+"/data/playlists/" + i0+"/name",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid4 = _errs16 === errors;}else {var valid4 = true;}if(valid4){if(data6.numOfTeams !== undefined){let data9 = data6.numOfTeams;const _errs18 = errors;if(!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))){const err9 = {instancePath:instancePath+"/data/playlists/" + i0+"/numOfTeams",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/numOfTeams/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid4 = _errs18 === errors;}else {var valid4 = true;}if(valid4){if(data6.teamSize !== undefined){let data10 = data6.teamSize;const _errs20 = errors;if(!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))){const err10 = {instancePath:instancePath+"/data/playlists/" + i0+"/teamSize",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/teamSize/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid4 = _errs20 === errors;}else {var valid4 = true;}if(valid4){if(data6.ranked !== undefined){const _errs22 = errors;if(typeof data6.ranked !== "boolean"){const err11 = {instancePath:instancePath+"/data/playlists/" + i0+"/ranked",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/ranked/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid4 = _errs22 === errors;}else {var valid4 = true;}}}}}}}else {const err12 = {instancePath:instancePath+"/data/playlists/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}var valid3 = _errs12 === errors;if(!valid3){break;}}}else {const err13 = {instancePath:instancePath+"/data/playlists",schemaPath:"#/anyOf/0/properties/data/properties/playlists/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}}}else {const err14 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}}}}else {const err15 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs24 = errors;if(errors === _errs24){if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if((((((data.type === undefined) && (missing3 = "type")) || ((data.messageId === undefined) && (missing3 = "messageId"))) || ((data.commandId === undefined) && (missing3 = "commandId"))) || ((data.status === undefined) && (missing3 = "status"))) || ((data.reason === undefined) && (missing3 = "reason"))){const err16 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {if(data.type !== undefined){const _errs26 = errors;if("response" !== data.type){const err17 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var valid5 = _errs26 === errors;}else {var valid5 = true;}if(valid5){if(data.messageId !== undefined){const _errs27 = errors;if(typeof data.messageId !== "string"){const err18 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var valid5 = _errs27 === errors;}else {var valid5 = true;}if(valid5){if(data.commandId !== undefined){const _errs29 = errors;if("matchmaking/list" !== data.commandId){const err19 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/list"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var valid5 = _errs29 === errors;}else {var valid5 = true;}if(valid5){if(data.status !== undefined){const _errs30 = errors;if("failed" !== data.status){const err20 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var valid5 = _errs30 === errors;}else {var valid5 = true;}if(valid5){if(data.reason !== undefined){let data16 = data.reason;const _errs31 = errors;if(!((((data16 === "internal_error") || (data16 === "unauthorized")) || (data16 === "invalid_request")) || (data16 === "command_unimplemented"))){const err21 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema24.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var valid5 = _errs31 === errors;}else {var valid5 = true;}if(valid5){if(data.details !== undefined){const _errs32 = errors;if(typeof data.details !== "string"){const err22 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var valid5 = _errs32 === errors;}else {var valid5 = true;}}}}}}}}else {const err23 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}var _valid0 = _errs24 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err24 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;validate23.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate23.errors = vErrors;return errors === 0;}export const matchmaking_foundUpdate_event = validate24;const schema25 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/foundUpdate/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingFoundUpdateEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/foundUpdate"},"data":{"title":"MatchmakingFoundUpdateEventData","type":"object","properties":{"readyCount":{"type":"integer"}},"required":["readyCount"]}},"required":["type","messageId","commandId","data"]};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/foundUpdate/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate24.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate24.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/foundUpdate" !== data.commandId){validate24.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/foundUpdate"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.readyCount === undefined) && (missing1 = "readyCount")){validate24.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.readyCount !== undefined){let data4 = data3.readyCount;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate24.errors = [{instancePath:instancePath+"/data/readyCount",schemaPath:"#/properties/data/properties/readyCount/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}}}}else {validate24.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}export const matchmaking_found_event = validate25;const schema26 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/found/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingFoundEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/found"},"data":{"title":"MatchmakingFoundEventData","type":"object","properties":{"queueId":{"type":"string"},"timeoutMs":{"type":"integer"}},"required":["queueId","timeoutMs"]}},"required":["type","messageId","commandId","data"]};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/found/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate25.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate25.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate25.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/found" !== data.commandId){validate25.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/found"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.queueId === undefined) && (missing1 = "queueId")) || ((data3.timeoutMs === undefined) && (missing1 = "timeoutMs"))){validate25.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.queueId !== undefined){const _errs7 = errors;if(typeof data3.queueId !== "string"){validate25.errors = [{instancePath:instancePath+"/data/queueId",schemaPath:"#/properties/data/properties/queueId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.timeoutMs !== undefined){let data5 = data3.timeoutMs;const _errs9 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate25.errors = [{instancePath:instancePath+"/data/timeoutMs",schemaPath:"#/properties/data/properties/timeoutMs/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate25.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate25.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate25.errors = vErrors;return errors === 0;}export const matchmaking_cancel_request = validate26;const schema27 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingCancelRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/cancel"}},"required":["type","messageId","commandId"]};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate26.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate26.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate26.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/cancel" !== data.commandId){validate26.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/cancel"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate26.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate26.errors = vErrors;return errors === 0;}export const matchmaking_cancel_response = validate27;const schema28 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingCancelResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingCancelOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/cancel"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"MatchmakingCancelFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/cancel"},"status":{"const":"failed"},"reason":{"enum":["not_queued","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/cancel" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/cancel"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("matchmaking/cancel" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/cancel"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!(((((data8 === "not_queued") || (data8 === "internal_error")) || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema28.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate27.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate27.errors = vErrors;return errors === 0;}export const battle_start_request = validate28;const schema29 = {"$id":"https://schema.beyondallreason.dev/tachyon/battle/start/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"BattleStartRequest","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"battle/start"},"data":{"title":"BattleStartRequestData","type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"ip":{"type":"string"},"port":{"type":"number"}},"required":["username","password","ip","port"]}},"required":["type","messageId","commandId","data"]};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/battle/start/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate28.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate28.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate28.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("battle/start" !== data.commandId){validate28.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "battle/start"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((data3.username === undefined) && (missing1 = "username")) || ((data3.password === undefined) && (missing1 = "password"))) || ((data3.ip === undefined) && (missing1 = "ip"))) || ((data3.port === undefined) && (missing1 = "port"))){validate28.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.username !== undefined){const _errs7 = errors;if(typeof data3.username !== "string"){validate28.errors = [{instancePath:instancePath+"/data/username",schemaPath:"#/properties/data/properties/username/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.password !== undefined){const _errs9 = errors;if(typeof data3.password !== "string"){validate28.errors = [{instancePath:instancePath+"/data/password",schemaPath:"#/properties/data/properties/password/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.ip !== undefined){const _errs11 = errors;if(typeof data3.ip !== "string"){validate28.errors = [{instancePath:instancePath+"/data/ip",schemaPath:"#/properties/data/properties/ip/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs11 === errors;}else {var valid1 = true;}if(valid1){if(data3.port !== undefined){let data7 = data3.port;const _errs13 = errors;if(!((typeof data7 == "number") && (isFinite(data7)))){validate28.errors = [{instancePath:instancePath+"/data/port",schemaPath:"#/properties/data/properties/port/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}var valid1 = _errs13 === errors;}else {var valid1 = true;}}}}}}else {validate28.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate28.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate28.errors = vErrors;return errors === 0;}export const battle_start_response = validate29;const schema30 = {"$id":"https://schema.beyondallreason.dev/tachyon/battle/start/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"BattleStartResponse","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"BattleStartOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"battle/start"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"BattleStartFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"battle/start"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate29(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/battle/start/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("battle/start" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "battle/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("battle/start" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "battle/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema30.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate29.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate29.errors = vErrors;return errors === 0;}export const autohost_update_event = validate30;const schema31 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/update/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostUpdateEvent","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"autohost/update"},"data":{"title":"AutohostUpdateEventData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"time":{"$ref":"../../definitions/unixTime.json"},"update":{"anyOf":[{"title":"StartUpdate","description":"The battle has started.","type":"object","properties":{"type":{"const":"start"}},"required":["type"]},{"title":"FinishedUpdate","description":"The battle finished, generated once per every single player reporting who won.","type":"object","properties":{"type":{"const":"finished"},"userId":{"$ref":"../../definitions/userId.json"},"winningAllyTeams":{"description":"Ally team IDs","type":"array","items":{"type":"integer"},"minItems":1}},"required":["type","userId","winningAllyTeams"]},{"title":"EngineMessageUpdate","description":"A message from the engine, e.g. some ip is trying to connect.","type":"object","properties":{"type":{"const":"engine_message"},"message":{"type":"string"}},"required":["type","message"]},{"title":"EngineWarningUpdate","description":"A warning from the engine.","type":"object","properties":{"type":{"const":"engine_warning"},"message":{"type":"string"}},"required":["type","message"]},{"title":"EngineQuitUpdate","description":"The engine process for battle has quit cleanly, no more updates will be sent for this battle.","type":"object","properties":{"type":{"const":"engine_quit"}},"required":["type"]},{"title":"EngineCrashUpdate","description":"The engine process for battle has crashed, no more updates will be sent for this battle.","type":"object","properties":{"type":{"const":"engine_crash"},"details":{"description":"Optional, short, details of the crash.","type":"string"}},"required":["type"]},{"title":"PlayerJoinedUpdate","type":"object","properties":{"type":{"const":"player_joined"},"userId":{"$ref":"../../definitions/userId.json"},"playerNumber":{"description":"Player number in the game, can be useful for custom commands","type":"integer"}},"required":["type","userId","playerNumber"]},{"title":"PlayerLeftUpdate","type":"object","properties":{"type":{"const":"player_left"},"userId":{"$ref":"../../definitions/userId.json"},"reason":{"enum":["lost_connection","left","kicked"]}},"required":["type","userId","reason"]},{"title":"PlayerChatUpdate","anyOf":[{"type":"object","properties":{"type":{"const":"player_chat"},"userId":{"$ref":"../../definitions/userId.json"},"message":{"type":"string"},"destination":{"enum":["allies","all","spectators"]}},"required":["type","userId","message","destination"]},{"type":"object","properties":{"type":{"const":"player_chat"},"userId":{"$ref":"../../definitions/userId.json"},"message":{"type":"string"},"destination":{"const":"player"},"toUserId":{"$ref":"../../definitions/userId.json"}},"required":["type","userId","message","destination","toUserId"]}]},{"title":"PlayerDefeatedUpdate","type":"object","properties":{"type":{"const":"player_defeated"},"userId":{"$ref":"../../definitions/userId.json"}},"required":["type","userId"]},{"title":"LuaMsgUpdate","description":"This update is generated only for messages matching luamsgRegexp set in the battle start script.","type":"object","properties":{"type":{"const":"luamsg"},"userId":{"$ref":"../../definitions/userId.json"},"script":{"enum":["ui","game","rules"]},"uiMode":{"description":"Set when script is 'ui'","enum":["all","allies","spectators"]},"data":{"type":"string","contentEncoding":"base64","contentMediaType":"application/octet-stream"}},"required":["type","userId","script","data"]}]}},"required":["battleId","time","update"]}},"required":["type","messageId","commandId","data"]};const schema32 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/unixTime.json","title":"UnixTime","description":"Unix timestamp in microseconds","type":"integer","examples":[1705432698000000]};const schema33 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/userId.json","title":"UserId","type":"string","format":"uuid","examples":["f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"]};function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/update/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate30.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate30.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate30.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/update" !== data.commandId){validate30.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/update"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.time === undefined) && (missing1 = "time"))) || ((data3.update === undefined) && (missing1 = "update"))){validate30.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate30.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate30.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.time !== undefined){let data5 = data3.time;const _errs9 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate30.errors = [{instancePath:instancePath+"/data/time",schemaPath:"../../definitions/unixTime.json/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.update !== undefined){let data6 = data3.update;const _errs12 = errors;const _errs13 = errors;let valid3 = false;const _errs14 = errors;if(errors === _errs14){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing2;if((data6.type === undefined) && (missing2 = "type")){const err0 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/0/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data6.type !== undefined){if("start" !== data6.type){const err1 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}else {const err2 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs14 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs17 = errors;if(errors === _errs17){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing3;if((((data6.type === undefined) && (missing3 = "type")) || ((data6.userId === undefined) && (missing3 = "userId"))) || ((data6.winningAllyTeams === undefined) && (missing3 = "winningAllyTeams"))){const err3 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/1/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data6.type !== undefined){const _errs19 = errors;if("finished" !== data6.type){const err4 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "finished"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid5 = _errs19 === errors;}else {var valid5 = true;}if(valid5){if(data6.userId !== undefined){let data9 = data6.userId;const _errs20 = errors;const _errs21 = errors;if(errors === _errs21){if(errors === _errs21){if(typeof data9 === "string"){if(!(formats0.test(data9))){const err5 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}var valid5 = _errs20 === errors;}else {var valid5 = true;}if(valid5){if(data6.winningAllyTeams !== undefined){let data10 = data6.winningAllyTeams;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data10)){if(data10.length < 1){const err7 = {instancePath:instancePath+"/data/update/winningAllyTeams",schemaPath:"#/properties/data/properties/update/anyOf/1/properties/winningAllyTeams/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}else {var valid7 = true;const len0 = data10.length;for(let i0=0; i0<len0; i0++){let data11 = data10[i0];const _errs25 = errors;if(!(((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11))) && (isFinite(data11)))){const err8 = {instancePath:instancePath+"/data/update/winningAllyTeams/" + i0,schemaPath:"#/properties/data/properties/update/anyOf/1/properties/winningAllyTeams/items/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid7 = _errs25 === errors;if(!valid7){break;}}}}else {const err9 = {instancePath:instancePath+"/data/update/winningAllyTeams",schemaPath:"#/properties/data/properties/update/anyOf/1/properties/winningAllyTeams/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}var valid5 = _errs23 === errors;}else {var valid5 = true;}}}}}else {const err10 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}var _valid0 = _errs17 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs27 = errors;if(errors === _errs27){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing4;if(((data6.type === undefined) && (missing4 = "type")) || ((data6.message === undefined) && (missing4 = "message"))){const err11 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/2/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}else {if(data6.type !== undefined){const _errs29 = errors;if("engine_message" !== data6.type){const err12 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/2/properties/type/const",keyword:"const",params:{allowedValue: "engine_message"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid8 = _errs29 === errors;}else {var valid8 = true;}if(valid8){if(data6.message !== undefined){const _errs30 = errors;if(typeof data6.message !== "string"){const err13 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/2/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var valid8 = _errs30 === errors;}else {var valid8 = true;}}}}else {const err14 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}var _valid0 = _errs27 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs32 = errors;if(errors === _errs32){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing5;if(((data6.type === undefined) && (missing5 = "type")) || ((data6.message === undefined) && (missing5 = "message"))){const err15 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/3/required",keyword:"required",params:{missingProperty: missing5},message:"must have required property '"+missing5+"'"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}else {if(data6.type !== undefined){const _errs34 = errors;if("engine_warning" !== data6.type){const err16 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/3/properties/type/const",keyword:"const",params:{allowedValue: "engine_warning"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var valid9 = _errs34 === errors;}else {var valid9 = true;}if(valid9){if(data6.message !== undefined){const _errs35 = errors;if(typeof data6.message !== "string"){const err17 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/3/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var valid9 = _errs35 === errors;}else {var valid9 = true;}}}}else {const err18 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/3/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}var _valid0 = _errs32 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs37 = errors;if(errors === _errs37){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing6;if((data6.type === undefined) && (missing6 = "type")){const err19 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/4/required",keyword:"required",params:{missingProperty: missing6},message:"must have required property '"+missing6+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}else {if(data6.type !== undefined){if("engine_quit" !== data6.type){const err20 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/4/properties/type/const",keyword:"const",params:{allowedValue: "engine_quit"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}}else {const err21 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/4/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}var _valid0 = _errs37 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs40 = errors;if(errors === _errs40){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing7;if((data6.type === undefined) && (missing7 = "type")){const err22 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/5/required",keyword:"required",params:{missingProperty: missing7},message:"must have required property '"+missing7+"'"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}else {if(data6.type !== undefined){const _errs42 = errors;if("engine_crash" !== data6.type){const err23 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/5/properties/type/const",keyword:"const",params:{allowedValue: "engine_crash"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var valid11 = _errs42 === errors;}else {var valid11 = true;}if(valid11){if(data6.details !== undefined){const _errs43 = errors;if(typeof data6.details !== "string"){const err24 = {instancePath:instancePath+"/data/update/details",schemaPath:"#/properties/data/properties/update/anyOf/5/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}var valid11 = _errs43 === errors;}else {var valid11 = true;}}}}else {const err25 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/5/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}var _valid0 = _errs40 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs45 = errors;if(errors === _errs45){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing8;if((((data6.type === undefined) && (missing8 = "type")) || ((data6.userId === undefined) && (missing8 = "userId"))) || ((data6.playerNumber === undefined) && (missing8 = "playerNumber"))){const err26 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/6/required",keyword:"required",params:{missingProperty: missing8},message:"must have required property '"+missing8+"'"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {if(data6.type !== undefined){const _errs47 = errors;if("player_joined" !== data6.type){const err27 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/6/properties/type/const",keyword:"const",params:{allowedValue: "player_joined"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}var valid12 = _errs47 === errors;}else {var valid12 = true;}if(valid12){if(data6.userId !== undefined){let data20 = data6.userId;const _errs48 = errors;const _errs49 = errors;if(errors === _errs49){if(errors === _errs49){if(typeof data20 === "string"){if(!(formats0.test(data20))){const err28 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else {const err29 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}}var valid12 = _errs48 === errors;}else {var valid12 = true;}if(valid12){if(data6.playerNumber !== undefined){let data21 = data6.playerNumber;const _errs51 = errors;if(!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))){const err30 = {instancePath:instancePath+"/data/update/playerNumber",schemaPath:"#/properties/data/properties/update/anyOf/6/properties/playerNumber/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var valid12 = _errs51 === errors;}else {var valid12 = true;}}}}}else {const err31 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/6/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}var _valid0 = _errs45 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs53 = errors;if(errors === _errs53){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing9;if((((data6.type === undefined) && (missing9 = "type")) || ((data6.userId === undefined) && (missing9 = "userId"))) || ((data6.reason === undefined) && (missing9 = "reason"))){const err32 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/7/required",keyword:"required",params:{missingProperty: missing9},message:"must have required property '"+missing9+"'"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {if(data6.type !== undefined){const _errs55 = errors;if("player_left" !== data6.type){const err33 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/7/properties/type/const",keyword:"const",params:{allowedValue: "player_left"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var valid14 = _errs55 === errors;}else {var valid14 = true;}if(valid14){if(data6.userId !== undefined){let data23 = data6.userId;const _errs56 = errors;const _errs57 = errors;if(errors === _errs57){if(errors === _errs57){if(typeof data23 === "string"){if(!(formats0.test(data23))){const err34 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}var valid14 = _errs56 === errors;}else {var valid14 = true;}if(valid14){if(data6.reason !== undefined){let data24 = data6.reason;const _errs59 = errors;if(!(((data24 === "lost_connection") || (data24 === "left")) || (data24 === "kicked"))){const err36 = {instancePath:instancePath+"/data/update/reason",schemaPath:"#/properties/data/properties/update/anyOf/7/properties/reason/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[7].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}var valid14 = _errs59 === errors;}else {var valid14 = true;}}}}}else {const err37 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/7/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}var _valid0 = _errs53 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs60 = errors;const _errs61 = errors;let valid16 = false;const _errs62 = errors;if(errors === _errs62){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing10;if(((((data6.type === undefined) && (missing10 = "type")) || ((data6.userId === undefined) && (missing10 = "userId"))) || ((data6.message === undefined) && (missing10 = "message"))) || ((data6.destination === undefined) && (missing10 = "destination"))){const err38 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/required",keyword:"required",params:{missingProperty: missing10},message:"must have required property '"+missing10+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}else {if(data6.type !== undefined){const _errs64 = errors;if("player_chat" !== data6.type){const err39 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "player_chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}var valid17 = _errs64 === errors;}else {var valid17 = true;}if(valid17){if(data6.userId !== undefined){let data26 = data6.userId;const _errs65 = errors;const _errs66 = errors;if(errors === _errs66){if(errors === _errs66){if(typeof data26 === "string"){if(!(formats0.test(data26))){const err40 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}else {const err41 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}}var valid17 = _errs65 === errors;}else {var valid17 = true;}if(valid17){if(data6.message !== undefined){const _errs68 = errors;if(typeof data6.message !== "string"){const err42 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var valid17 = _errs68 === errors;}else {var valid17 = true;}if(valid17){if(data6.destination !== undefined){let data28 = data6.destination;const _errs70 = errors;if(!(((data28 === "allies") || (data28 === "all")) || (data28 === "spectators"))){const err43 = {instancePath:instancePath+"/data/update/destination",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/properties/destination/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[8].anyOf[0].properties.destination.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var valid17 = _errs70 === errors;}else {var valid17 = true;}}}}}}else {const err44 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}var _valid1 = _errs62 === errors;valid16 = valid16 || _valid1;if(!valid16){const _errs71 = errors;if(errors === _errs71){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing11;if((((((data6.type === undefined) && (missing11 = "type")) || ((data6.userId === undefined) && (missing11 = "userId"))) || ((data6.message === undefined) && (missing11 = "message"))) || ((data6.destination === undefined) && (missing11 = "destination"))) || ((data6.toUserId === undefined) && (missing11 = "toUserId"))){const err45 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/required",keyword:"required",params:{missingProperty: missing11},message:"must have required property '"+missing11+"'"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}else {if(data6.type !== undefined){const _errs73 = errors;if("player_chat" !== data6.type){const err46 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "player_chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}var valid19 = _errs73 === errors;}else {var valid19 = true;}if(valid19){if(data6.userId !== undefined){let data30 = data6.userId;const _errs74 = errors;const _errs75 = errors;if(errors === _errs75){if(errors === _errs75){if(typeof data30 === "string"){if(!(formats0.test(data30))){const err47 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}else {const err48 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}}var valid19 = _errs74 === errors;}else {var valid19 = true;}if(valid19){if(data6.message !== undefined){const _errs77 = errors;if(typeof data6.message !== "string"){const err49 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}var valid19 = _errs77 === errors;}else {var valid19 = true;}if(valid19){if(data6.destination !== undefined){const _errs79 = errors;if("player" !== data6.destination){const err50 = {instancePath:instancePath+"/data/update/destination",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/properties/destination/const",keyword:"const",params:{allowedValue: "player"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}var valid19 = _errs79 === errors;}else {var valid19 = true;}if(valid19){if(data6.toUserId !== undefined){let data33 = data6.toUserId;const _errs80 = errors;const _errs81 = errors;if(errors === _errs81){if(errors === _errs81){if(typeof data33 === "string"){if(!(formats0.test(data33))){const err51 = {instancePath:instancePath+"/data/update/toUserId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}else {const err52 = {instancePath:instancePath+"/data/update/toUserId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}var valid19 = _errs80 === errors;}else {var valid19 = true;}}}}}}}else {const err53 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}var _valid1 = _errs71 === errors;valid16 = valid16 || _valid1;}if(!valid16){const err54 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}else {errors = _errs61;if(vErrors !== null){if(_errs61){vErrors.length = _errs61;}else {vErrors = null;}}}var _valid0 = _errs60 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs83 = errors;if(errors === _errs83){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing12;if(((data6.type === undefined) && (missing12 = "type")) || ((data6.userId === undefined) && (missing12 = "userId"))){const err55 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/9/required",keyword:"required",params:{missingProperty: missing12},message:"must have required property '"+missing12+"'"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}else {if(data6.type !== undefined){const _errs85 = errors;if("player_defeated" !== data6.type){const err56 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/9/properties/type/const",keyword:"const",params:{allowedValue: "player_defeated"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}var valid22 = _errs85 === errors;}else {var valid22 = true;}if(valid22){if(data6.userId !== undefined){let data35 = data6.userId;const _errs86 = errors;const _errs87 = errors;if(errors === _errs87){if(errors === _errs87){if(typeof data35 === "string"){if(!(formats0.test(data35))){const err57 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}else {const err58 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}var valid22 = _errs86 === errors;}else {var valid22 = true;}}}}else {const err59 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/9/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}var _valid0 = _errs83 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs89 = errors;if(errors === _errs89){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing13;if(((((data6.type === undefined) && (missing13 = "type")) || ((data6.userId === undefined) && (missing13 = "userId"))) || ((data6.script === undefined) && (missing13 = "script"))) || ((data6.data === undefined) && (missing13 = "data"))){const err60 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/10/required",keyword:"required",params:{missingProperty: missing13},message:"must have required property '"+missing13+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}else {if(data6.type !== undefined){const _errs91 = errors;if("luamsg" !== data6.type){const err61 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/type/const",keyword:"const",params:{allowedValue: "luamsg"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}var valid24 = _errs91 === errors;}else {var valid24 = true;}if(valid24){if(data6.userId !== undefined){let data37 = data6.userId;const _errs92 = errors;const _errs93 = errors;if(errors === _errs93){if(errors === _errs93){if(typeof data37 === "string"){if(!(formats0.test(data37))){const err62 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}}var valid24 = _errs92 === errors;}else {var valid24 = true;}if(valid24){if(data6.script !== undefined){let data38 = data6.script;const _errs95 = errors;if(!(((data38 === "ui") || (data38 === "game")) || (data38 === "rules"))){const err64 = {instancePath:instancePath+"/data/update/script",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/script/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[10].properties.script.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}var valid24 = _errs95 === errors;}else {var valid24 = true;}if(valid24){if(data6.uiMode !== undefined){let data39 = data6.uiMode;const _errs96 = errors;if(!(((data39 === "all") || (data39 === "allies")) || (data39 === "spectators"))){const err65 = {instancePath:instancePath+"/data/update/uiMode",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/uiMode/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[10].properties.uiMode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}var valid24 = _errs96 === errors;}else {var valid24 = true;}if(valid24){if(data6.data !== undefined){const _errs97 = errors;if(typeof data6.data !== "string"){const err66 = {instancePath:instancePath+"/data/update/data",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/data/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}var valid24 = _errs97 === errors;}else {var valid24 = true;}}}}}}}else {const err67 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/10/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}var _valid0 = _errs89 === errors;valid3 = valid3 || _valid0;}}}}}}}}}}if(!valid3){const err68 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;validate30.errors = vErrors;return false;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}var valid1 = _errs12 === errors;}else {var valid1 = true;}}}}}else {validate30.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate30.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate30.errors = vErrors;return errors === 0;}export const autohost_subscribeUpdates_request = validate31;const schema41 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSubscribeUpdatesRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/subscribeUpdates"},"data":{"title":"AutohostSubscribeUpdatesRequestData","type":"object","properties":{"since":{"$ref":"../../definitions/unixTime.json"}},"required":["since"]}},"required":["type","messageId","commandId","data"]};function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate31.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate31.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate31.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/subscribeUpdates" !== data.commandId){validate31.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/subscribeUpdates"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.since === undefined) && (missing1 = "since")){validate31.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.since !== undefined){let data4 = data3.since;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate31.errors = [{instancePath:instancePath+"/data/since",schemaPath:"../../definitions/unixTime.json/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}}}}else {validate31.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate31.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate31.errors = vErrors;return errors === 0;}export const autohost_subscribeUpdates_response = validate32;const schema43 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSubscribeUpdatesResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSubscribeUpdatesOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/subscribeUpdates"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSubscribeUpdatesFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/subscribeUpdates"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate32(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/subscribeUpdates" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/subscribeUpdates"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/subscribeUpdates" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/subscribeUpdates"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema43.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate32.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate32.errors = vErrors;return errors === 0;}export const autohost_status_event = validate33;const schema44 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/status/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostStatusEvent","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"autohost/status"},"data":{"title":"AutohostStatusEventData","type":"object","properties":{"maxBattles":{"type":"integer","minimum":0},"currentBattles":{"type":"integer","minimum":0}},"required":["maxBattles","currentBattles"]}},"required":["type","messageId","commandId","data"]};function validate33(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/status/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate33.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate33.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate33.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/status" !== data.commandId){validate33.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/status"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.maxBattles === undefined) && (missing1 = "maxBattles")) || ((data3.currentBattles === undefined) && (missing1 = "currentBattles"))){validate33.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.maxBattles !== undefined){let data4 = data3.maxBattles;const _errs7 = errors;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate33.errors = [{instancePath:instancePath+"/data/maxBattles",schemaPath:"#/properties/data/properties/maxBattles/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs7){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){validate33.errors = [{instancePath:instancePath+"/data/maxBattles",schemaPath:"#/properties/data/properties/maxBattles/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.currentBattles !== undefined){let data5 = data3.currentBattles;const _errs9 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate33.errors = [{instancePath:instancePath+"/data/currentBattles",schemaPath:"#/properties/data/properties/currentBattles/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs9){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 0 || isNaN(data5)){validate33.errors = [{instancePath:instancePath+"/data/currentBattles",schemaPath:"#/properties/data/properties/currentBattles/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate33.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate33.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate33.errors = vErrors;return errors === 0;}export const autohost_start_request = validate34;const schema45 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/start/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostStartRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/start"},"data":{"title":"AutohostStartRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"engineVersion":{"type":"string","pattern":"^[0-9a-zA-Z .+-]+$"},"gameName":{"type":"string"},"mapName":{"type":"string"},"gameArchiveHash":{"type":"string","pattern":"^[a-fA-F0-9]{128}$"},"mapArchiveHash":{"type":"string","pattern":"^[a-fA-F0-9]{128}$"},"startDelay":{"type":"integer"},"startPosType":{"$ref":"../../definitions/startPosType.json"},"allyTeams":{"type":"array","items":{"$ref":"../../definitions/allyTeam.json"},"minItems":1},"spectators":{"type":"array","items":{"$ref":"../../definitions/player.json"}},"mapOptions":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"gameOptions":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"restrictions":{"description":"Mapping from unitDefId to the maximum number of units of that type that can be built.","type":"object","patternProperties":{"^(.*)$":{"type":"integer","minimum":0}}},"luamsgRegexp":{"description":"When set, battle will generate updates for luamsgs matching this regexp. No updates will be generated if this is not set.","type":"string","format":"regex"}},"required":["battleId","engineVersion","gameName","mapName","startPosType","allyTeams"]}},"required":["type","messageId","commandId","data"]};const schema46 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/startPosType.json","title":"StartPosType","enum":["fixed","random","ingame","beforegame"]};const formats26 = ajvFormats.fullFormats.regex;const pattern0 = new RegExp("^[0-9a-zA-Z .+-]+$", "u");const pattern1 = new RegExp("^[a-fA-F0-9]{128}$", "u");const pattern4 = new RegExp("^(.*)$", "u");const schema47 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/allyTeam.json","title":"AllyTeam","type":"object","properties":{"teams":{"type":"array","items":{"$ref":"../definitions/team.json"},"minItems":1},"startBox":{"$ref":"../definitions/startBox.json"},"allies":{"description":"0-based indexes into of the other allyteams to ally with","type":"array","items":{"type":"integer"}},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}},"required":["teams"]};const schema55 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/startBox.json","title":"StartBox","type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"left":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1}},"required":["top","bottom","left","right"]};const schema51 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/customStartScriptProperties.json","title":"CustomStartScriptProperties","description":"Additional custom properties to set in engine StartScript for this object, must not collide with existing properties","type":"object","patternProperties":{"^[a-zA-Z0-9_-]$":{"type":"string"}}};const schema48 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/team.json","title":"Team","type":"object","properties":{"players":{"type":"array","items":{"$ref":"../definitions/player.json"}},"bots":{"type":"array","items":{"$ref":"../definitions/bot.json"}},"advantage":{"type":"number","minimum":-1},"incomeMultiplier":{"type":"number","minimum":0},"faction":{"type":"string"},"color":{"type":"object","properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}},"required":["r","g","b"]},"startPos":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}},"required":["x","y"]},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}}};const schema49 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/player.json","title":"Player","type":"object","properties":{"userId":{"$ref":"../definitions/userId.json"},"name":{"description":"Name of the player, must be unique just like userId","type":"string"},"password":{"type":"string"},"rank":{"type":"integer"},"countryCode":{"type":"string"},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}},"required":["userId","name","password"]};const pattern3 = new RegExp("^[a-zA-Z0-9_-]$", "u");function validate37(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/player.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.userId === undefined) && (missing0 = "userId")) || ((data.name === undefined) && (missing0 = "name"))) || ((data.password === undefined) && (missing0 = "password"))){validate37.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.userId !== undefined){let data0 = data.userId;const _errs1 = errors;const _errs2 = errors;if(errors === _errs2){if(errors === _errs2){if(typeof data0 === "string"){if(!(formats0.test(data0))){validate37.errors = [{instancePath:instancePath+"/userId",schemaPath:"../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate37.errors = [{instancePath:instancePath+"/userId",schemaPath:"../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){const _errs4 = errors;if(typeof data.name !== "string"){validate37.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.password !== undefined){const _errs6 = errors;if(typeof data.password !== "string"){validate37.errors = [{instancePath:instancePath+"/password",schemaPath:"#/properties/password/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}if(valid0){if(data.rank !== undefined){let data3 = data.rank;const _errs8 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate37.errors = [{instancePath:instancePath+"/rank",schemaPath:"#/properties/rank/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid0 = _errs8 === errors;}else {var valid0 = true;}if(valid0){if(data.countryCode !== undefined){const _errs10 = errors;if(typeof data.countryCode !== "string"){validate37.errors = [{instancePath:instancePath+"/countryCode",schemaPath:"#/properties/countryCode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs10 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data5 = data.customProperties;const _errs12 = errors;const _errs13 = errors;if(errors === _errs13){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){var valid3 = true;for(const key0 in data5){if(pattern3.test(key0)){const _errs15 = errors;if(typeof data5[key0] !== "string"){validate37.errors = [{instancePath:instancePath+"/customProperties/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs15 === errors;if(!valid3){break;}}}}else {validate37.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs12 === errors;}else {var valid0 = true;}}}}}}}}else {validate37.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate37.errors = vErrors;return errors === 0;}const schema52 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/bot.json","title":"Bot","type":"object","properties":{"hostUserId":{"description":"UserId of the player hosting this AI","type":"string","format":"uuid"},"name":{"type":"string"},"aiShortName":{"description":"Short name of the AI library","type":"string"},"aiVersion":{"type":"string"},"aiOptions":{"description":"AI-specific options","type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}},"required":["hostUserId","aiShortName"]};function validate39(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/bot.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.hostUserId === undefined) && (missing0 = "hostUserId")) || ((data.aiShortName === undefined) && (missing0 = "aiShortName"))){validate39.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.hostUserId !== undefined){let data0 = data.hostUserId;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0.test(data0))){validate39.errors = [{instancePath:instancePath+"/hostUserId",schemaPath:"#/properties/hostUserId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate39.errors = [{instancePath:instancePath+"/hostUserId",schemaPath:"#/properties/hostUserId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){const _errs3 = errors;if(typeof data.name !== "string"){validate39.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.aiShortName !== undefined){const _errs5 = errors;if(typeof data.aiShortName !== "string"){validate39.errors = [{instancePath:instancePath+"/aiShortName",schemaPath:"#/properties/aiShortName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.aiVersion !== undefined){const _errs7 = errors;if(typeof data.aiVersion !== "string"){validate39.errors = [{instancePath:instancePath+"/aiVersion",schemaPath:"#/properties/aiVersion/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.aiOptions !== undefined){let data4 = data.aiOptions;const _errs9 = errors;if(errors === _errs9){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){var valid1 = true;for(const key0 in data4){if(pattern4.test(key0)){const _errs11 = errors;if(typeof data4[key0] !== "string"){validate39.errors = [{instancePath:instancePath+"/aiOptions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/aiOptions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs11 === errors;if(!valid1){break;}}}}else {validate39.errors = [{instancePath:instancePath+"/aiOptions",schemaPath:"#/properties/aiOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data6 = data.customProperties;const _errs13 = errors;const _errs14 = errors;if(errors === _errs14){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){var valid3 = true;for(const key1 in data6){if(pattern3.test(key1)){const _errs16 = errors;if(typeof data6[key1] !== "string"){validate39.errors = [{instancePath:instancePath+"/customProperties/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs16 === errors;if(!valid3){break;}}}}else {validate39.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs13 === errors;}else {var valid0 = true;}}}}}}}}else {validate39.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate39.errors = vErrors;return errors === 0;}function validate36(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/team.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.players !== undefined){let data0 = data.players;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate37(data0[i0], {instancePath:instancePath+"/players/" + i0,parentData:data0,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate37.errors : vErrors.concat(validate37.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate36.errors = [{instancePath:instancePath+"/players",schemaPath:"#/properties/players/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.bots !== undefined){let data2 = data.bots;const _errs4 = errors;if(errors === _errs4){if(Array.isArray(data2)){var valid2 = true;const len1 = data2.length;for(let i1=0; i1<len1; i1++){const _errs6 = errors;if(!(validate39(data2[i1], {instancePath:instancePath+"/bots/" + i1,parentData:data2,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate39.errors : vErrors.concat(validate39.errors);errors = vErrors.length;}var valid2 = _errs6 === errors;if(!valid2){break;}}}else {validate36.errors = [{instancePath:instancePath+"/bots",schemaPath:"#/properties/bots/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.advantage !== undefined){let data4 = data.advantage;const _errs7 = errors;if(errors === _errs7){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < -1 || isNaN(data4)){validate36.errors = [{instancePath:instancePath+"/advantage",schemaPath:"#/properties/advantage/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"}];return false;}}else {validate36.errors = [{instancePath:instancePath+"/advantage",schemaPath:"#/properties/advantage/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.incomeMultiplier !== undefined){let data5 = data.incomeMultiplier;const _errs9 = errors;if(errors === _errs9){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 0 || isNaN(data5)){validate36.errors = [{instancePath:instancePath+"/incomeMultiplier",schemaPath:"#/properties/incomeMultiplier/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}else {validate36.errors = [{instancePath:instancePath+"/incomeMultiplier",schemaPath:"#/properties/incomeMultiplier/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.faction !== undefined){const _errs11 = errors;if(typeof data.faction !== "string"){validate36.errors = [{instancePath:instancePath+"/faction",schemaPath:"#/properties/faction/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.color !== undefined){let data7 = data.color;const _errs13 = errors;if(errors === _errs13){if(data7 && typeof data7 == "object" && !Array.isArray(data7)){let missing0;if((((data7.r === undefined) && (missing0 = "r")) || ((data7.g === undefined) && (missing0 = "g"))) || ((data7.b === undefined) && (missing0 = "b"))){validate36.errors = [{instancePath:instancePath+"/color",schemaPath:"#/properties/color/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data7.r !== undefined){let data8 = data7.r;const _errs15 = errors;if(errors === _errs15){if((typeof data8 == "number") && (isFinite(data8))){if(data8 > 1 || isNaN(data8)){validate36.errors = [{instancePath:instancePath+"/color/r",schemaPath:"#/properties/color/properties/r/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data8 < 0 || isNaN(data8)){validate36.errors = [{instancePath:instancePath+"/color/r",schemaPath:"#/properties/color/properties/r/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate36.errors = [{instancePath:instancePath+"/color/r",schemaPath:"#/properties/color/properties/r/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs15 === errors;}else {var valid3 = true;}if(valid3){if(data7.g !== undefined){let data9 = data7.g;const _errs17 = errors;if(errors === _errs17){if((typeof data9 == "number") && (isFinite(data9))){if(data9 > 1 || isNaN(data9)){validate36.errors = [{instancePath:instancePath+"/color/g",schemaPath:"#/properties/color/properties/g/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data9 < 0 || isNaN(data9)){validate36.errors = [{instancePath:instancePath+"/color/g",schemaPath:"#/properties/color/properties/g/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate36.errors = [{instancePath:instancePath+"/color/g",schemaPath:"#/properties/color/properties/g/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs17 === errors;}else {var valid3 = true;}if(valid3){if(data7.b !== undefined){let data10 = data7.b;const _errs19 = errors;if(errors === _errs19){if((typeof data10 == "number") && (isFinite(data10))){if(data10 > 1 || isNaN(data10)){validate36.errors = [{instancePath:instancePath+"/color/b",schemaPath:"#/properties/color/properties/b/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data10 < 0 || isNaN(data10)){validate36.errors = [{instancePath:instancePath+"/color/b",schemaPath:"#/properties/color/properties/b/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate36.errors = [{instancePath:instancePath+"/color/b",schemaPath:"#/properties/color/properties/b/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs19 === errors;}else {var valid3 = true;}}}}}else {validate36.errors = [{instancePath:instancePath+"/color",schemaPath:"#/properties/color/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs13 === errors;}else {var valid0 = true;}if(valid0){if(data.startPos !== undefined){let data11 = data.startPos;const _errs21 = errors;if(errors === _errs21){if(data11 && typeof data11 == "object" && !Array.isArray(data11)){let missing1;if(((data11.x === undefined) && (missing1 = "x")) || ((data11.y === undefined) && (missing1 = "y"))){validate36.errors = [{instancePath:instancePath+"/startPos",schemaPath:"#/properties/startPos/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data11.x !== undefined){let data12 = data11.x;const _errs23 = errors;if(!(((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12))) && (isFinite(data12)))){validate36.errors = [{instancePath:instancePath+"/startPos/x",schemaPath:"#/properties/startPos/properties/x/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid4 = _errs23 === errors;}else {var valid4 = true;}if(valid4){if(data11.y !== undefined){let data13 = data11.y;const _errs25 = errors;if(!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))){validate36.errors = [{instancePath:instancePath+"/startPos/y",schemaPath:"#/properties/startPos/properties/y/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid4 = _errs25 === errors;}else {var valid4 = true;}}}}else {validate36.errors = [{instancePath:instancePath+"/startPos",schemaPath:"#/properties/startPos/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs21 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data14 = data.customProperties;const _errs27 = errors;const _errs28 = errors;if(errors === _errs28){if(data14 && typeof data14 == "object" && !Array.isArray(data14)){var valid6 = true;for(const key0 in data14){if(pattern3.test(key0)){const _errs30 = errors;if(typeof data14[key0] !== "string"){validate36.errors = [{instancePath:instancePath+"/customProperties/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs30 === errors;if(!valid6){break;}}}}else {validate36.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs27 === errors;}else {var valid0 = true;}}}}}}}}}else {validate36.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate36.errors = vErrors;return errors === 0;}function validate35(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/allyTeam.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.teams === undefined) && (missing0 = "teams")){validate35.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.teams !== undefined){let data0 = data.teams;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){if(data0.length < 1){validate35.errors = [{instancePath:instancePath+"/teams",schemaPath:"#/properties/teams/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate36(data0[i0], {instancePath:instancePath+"/teams/" + i0,parentData:data0,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate36.errors : vErrors.concat(validate36.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}}else {validate35.errors = [{instancePath:instancePath+"/teams",schemaPath:"#/properties/teams/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.startBox !== undefined){let data2 = data.startBox;const _errs4 = errors;const _errs5 = errors;if(errors === _errs5){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){let missing1;if(((((data2.top === undefined) && (missing1 = "top")) || ((data2.bottom === undefined) && (missing1 = "bottom"))) || ((data2.left === undefined) && (missing1 = "left"))) || ((data2.right === undefined) && (missing1 = "right"))){validate35.errors = [{instancePath:instancePath+"/startBox",schemaPath:"../definitions/startBox.json/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data2.top !== undefined){let data3 = data2.top;const _errs7 = errors;if(errors === _errs7){if((typeof data3 == "number") && (isFinite(data3))){if(data3 > 1 || isNaN(data3)){validate35.errors = [{instancePath:instancePath+"/startBox/top",schemaPath:"../definitions/startBox.json/properties/top/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data3 < 0 || isNaN(data3)){validate35.errors = [{instancePath:instancePath+"/startBox/top",schemaPath:"../definitions/startBox.json/properties/top/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/top",schemaPath:"../definitions/startBox.json/properties/top/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs7 === errors;}else {var valid3 = true;}if(valid3){if(data2.bottom !== undefined){let data4 = data2.bottom;const _errs9 = errors;if(errors === _errs9){if((typeof data4 == "number") && (isFinite(data4))){if(data4 > 1 || isNaN(data4)){validate35.errors = [{instancePath:instancePath+"/startBox/bottom",schemaPath:"../definitions/startBox.json/properties/bottom/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data4 < 0 || isNaN(data4)){validate35.errors = [{instancePath:instancePath+"/startBox/bottom",schemaPath:"../definitions/startBox.json/properties/bottom/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/bottom",schemaPath:"../definitions/startBox.json/properties/bottom/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs9 === errors;}else {var valid3 = true;}if(valid3){if(data2.left !== undefined){let data5 = data2.left;const _errs11 = errors;if(errors === _errs11){if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 1 || isNaN(data5)){validate35.errors = [{instancePath:instancePath+"/startBox/left",schemaPath:"../definitions/startBox.json/properties/left/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data5 < 0 || isNaN(data5)){validate35.errors = [{instancePath:instancePath+"/startBox/left",schemaPath:"../definitions/startBox.json/properties/left/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/left",schemaPath:"../definitions/startBox.json/properties/left/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs11 === errors;}else {var valid3 = true;}if(valid3){if(data2.right !== undefined){let data6 = data2.right;const _errs13 = errors;if(errors === _errs13){if((typeof data6 == "number") && (isFinite(data6))){if(data6 > 1 || isNaN(data6)){validate35.errors = [{instancePath:instancePath+"/startBox/right",schemaPath:"../definitions/startBox.json/properties/right/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data6 < 0 || isNaN(data6)){validate35.errors = [{instancePath:instancePath+"/startBox/right",schemaPath:"../definitions/startBox.json/properties/right/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/right",schemaPath:"../definitions/startBox.json/properties/right/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs13 === errors;}else {var valid3 = true;}}}}}}else {validate35.errors = [{instancePath:instancePath+"/startBox",schemaPath:"../definitions/startBox.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.allies !== undefined){let data7 = data.allies;const _errs15 = errors;if(errors === _errs15){if(Array.isArray(data7)){var valid4 = true;const len1 = data7.length;for(let i1=0; i1<len1; i1++){let data8 = data7[i1];const _errs17 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){validate35.errors = [{instancePath:instancePath+"/allies/" + i1,schemaPath:"#/properties/allies/items/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid4 = _errs17 === errors;if(!valid4){break;}}}else {validate35.errors = [{instancePath:instancePath+"/allies",schemaPath:"#/properties/allies/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs15 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data9 = data.customProperties;const _errs19 = errors;const _errs20 = errors;if(errors === _errs20){if(data9 && typeof data9 == "object" && !Array.isArray(data9)){var valid6 = true;for(const key0 in data9){if(pattern3.test(key0)){const _errs22 = errors;if(typeof data9[key0] !== "string"){validate35.errors = [{instancePath:instancePath+"/customProperties/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs22 === errors;if(!valid6){break;}}}}else {validate35.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs19 === errors;}else {var valid0 = true;}}}}}}else {validate35.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate35.errors = vErrors;return errors === 0;}function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/start/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate34.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate34.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate34.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/start" !== data.commandId){validate34.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/start"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.engineVersion === undefined) && (missing1 = "engineVersion"))) || ((data3.gameName === undefined) && (missing1 = "gameName"))) || ((data3.mapName === undefined) && (missing1 = "mapName"))) || ((data3.startPosType === undefined) && (missing1 = "startPosType"))) || ((data3.allyTeams === undefined) && (missing1 = "allyTeams"))){validate34.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate34.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.engineVersion !== undefined){let data5 = data3.engineVersion;const _errs9 = errors;if(errors === _errs9){if(typeof data5 === "string"){if(!pattern0.test(data5)){validate34.errors = [{instancePath:instancePath+"/data/engineVersion",schemaPath:"#/properties/data/properties/engineVersion/pattern",keyword:"pattern",params:{pattern: "^[0-9a-zA-Z .+-]+$"},message:"must match pattern \""+"^[0-9a-zA-Z .+-]+$"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/engineVersion",schemaPath:"#/properties/data/properties/engineVersion/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.gameName !== undefined){const _errs11 = errors;if(typeof data3.gameName !== "string"){validate34.errors = [{instancePath:instancePath+"/data/gameName",schemaPath:"#/properties/data/properties/gameName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs11 === errors;}else {var valid1 = true;}if(valid1){if(data3.mapName !== undefined){const _errs13 = errors;if(typeof data3.mapName !== "string"){validate34.errors = [{instancePath:instancePath+"/data/mapName",schemaPath:"#/properties/data/properties/mapName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs13 === errors;}else {var valid1 = true;}if(valid1){if(data3.gameArchiveHash !== undefined){let data8 = data3.gameArchiveHash;const _errs15 = errors;if(errors === _errs15){if(typeof data8 === "string"){if(!pattern1.test(data8)){validate34.errors = [{instancePath:instancePath+"/data/gameArchiveHash",schemaPath:"#/properties/data/properties/gameArchiveHash/pattern",keyword:"pattern",params:{pattern: "^[a-fA-F0-9]{128}$"},message:"must match pattern \""+"^[a-fA-F0-9]{128}$"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/gameArchiveHash",schemaPath:"#/properties/data/properties/gameArchiveHash/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs15 === errors;}else {var valid1 = true;}if(valid1){if(data3.mapArchiveHash !== undefined){let data9 = data3.mapArchiveHash;const _errs17 = errors;if(errors === _errs17){if(typeof data9 === "string"){if(!pattern1.test(data9)){validate34.errors = [{instancePath:instancePath+"/data/mapArchiveHash",schemaPath:"#/properties/data/properties/mapArchiveHash/pattern",keyword:"pattern",params:{pattern: "^[a-fA-F0-9]{128}$"},message:"must match pattern \""+"^[a-fA-F0-9]{128}$"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/mapArchiveHash",schemaPath:"#/properties/data/properties/mapArchiveHash/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs17 === errors;}else {var valid1 = true;}if(valid1){if(data3.startDelay !== undefined){let data10 = data3.startDelay;const _errs19 = errors;if(!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))){validate34.errors = [{instancePath:instancePath+"/data/startDelay",schemaPath:"#/properties/data/properties/startDelay/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs19 === errors;}else {var valid1 = true;}if(valid1){if(data3.startPosType !== undefined){let data11 = data3.startPosType;const _errs21 = errors;if(!((((data11 === "fixed") || (data11 === "random")) || (data11 === "ingame")) || (data11 === "beforegame"))){validate34.errors = [{instancePath:instancePath+"/data/startPosType",schemaPath:"../../definitions/startPosType.json/enum",keyword:"enum",params:{allowedValues: schema46.enum},message:"must be equal to one of the allowed values"}];return false;}var valid1 = _errs21 === errors;}else {var valid1 = true;}if(valid1){if(data3.allyTeams !== undefined){let data12 = data3.allyTeams;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data12)){if(data12.length < 1){validate34.errors = [{instancePath:instancePath+"/data/allyTeams",schemaPath:"#/properties/data/properties/allyTeams/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid3 = true;const len0 = data12.length;for(let i0=0; i0<len0; i0++){const _errs25 = errors;if(!(validate35(data12[i0], {instancePath:instancePath+"/data/allyTeams/" + i0,parentData:data12,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);errors = vErrors.length;}var valid3 = _errs25 === errors;if(!valid3){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/allyTeams",schemaPath:"#/properties/data/properties/allyTeams/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs23 === errors;}else {var valid1 = true;}if(valid1){if(data3.spectators !== undefined){let data14 = data3.spectators;const _errs26 = errors;if(errors === _errs26){if(Array.isArray(data14)){var valid4 = true;const len1 = data14.length;for(let i1=0; i1<len1; i1++){const _errs28 = errors;if(!(validate37(data14[i1], {instancePath:instancePath+"/data/spectators/" + i1,parentData:data14,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate37.errors : vErrors.concat(validate37.errors);errors = vErrors.length;}var valid4 = _errs28 === errors;if(!valid4){break;}}}else {validate34.errors = [{instancePath:instancePath+"/data/spectators",schemaPath:"#/properties/data/properties/spectators/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs26 === errors;}else {var valid1 = true;}if(valid1){if(data3.mapOptions !== undefined){let data16 = data3.mapOptions;const _errs29 = errors;if(errors === _errs29){if(data16 && typeof data16 == "object" && !Array.isArray(data16)){var valid5 = true;for(const key0 in data16){if(pattern4.test(key0)){const _errs31 = errors;if(typeof data16[key0] !== "string"){validate34.errors = [{instancePath:instancePath+"/data/mapOptions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/mapOptions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid5 = _errs31 === errors;if(!valid5){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/mapOptions",schemaPath:"#/properties/data/properties/mapOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs29 === errors;}else {var valid1 = true;}if(valid1){if(data3.gameOptions !== undefined){let data18 = data3.gameOptions;const _errs33 = errors;if(errors === _errs33){if(data18 && typeof data18 == "object" && !Array.isArray(data18)){var valid6 = true;for(const key1 in data18){if(pattern4.test(key1)){const _errs35 = errors;if(typeof data18[key1] !== "string"){validate34.errors = [{instancePath:instancePath+"/data/gameOptions/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/gameOptions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs35 === errors;if(!valid6){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/gameOptions",schemaPath:"#/properties/data/properties/gameOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs33 === errors;}else {var valid1 = true;}if(valid1){if(data3.restrictions !== undefined){let data20 = data3.restrictions;const _errs37 = errors;if(errors === _errs37){if(data20 && typeof data20 == "object" && !Array.isArray(data20)){var valid7 = true;for(const key2 in data20){if(pattern4.test(key2)){let data21 = data20[key2];const _errs39 = errors;if(!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))){validate34.errors = [{instancePath:instancePath+"/data/restrictions/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/restrictions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs39){if((typeof data21 == "number") && (isFinite(data21))){if(data21 < 0 || isNaN(data21)){validate34.errors = [{instancePath:instancePath+"/data/restrictions/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/restrictions/patternProperties/%5E(.*)%24/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid7 = _errs39 === errors;if(!valid7){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/restrictions",schemaPath:"#/properties/data/properties/restrictions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs37 === errors;}else {var valid1 = true;}if(valid1){if(data3.luamsgRegexp !== undefined){let data22 = data3.luamsgRegexp;const _errs41 = errors;if(errors === _errs41){if(errors === _errs41){if(typeof data22 === "string"){if(!(formats26(data22))){validate34.errors = [{instancePath:instancePath+"/data/luamsgRegexp",schemaPath:"#/properties/data/properties/luamsgRegexp/format",keyword:"format",params:{format: "regex"},message:"must match format \""+"regex"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/luamsgRegexp",schemaPath:"#/properties/data/properties/luamsgRegexp/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs41 === errors;}else {var valid1 = true;}}}}}}}}}}}}}}}}else {validate34.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate34.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate34.errors = vErrors;return errors === 0;}export const autohost_start_response = validate44;const schema57 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/start/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostStartResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostStartOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/start"},"status":{"const":"success"},"data":{"title":"AutohostStartOkResponseData","type":"object","properties":{"ips":{"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"ipv6"}]}},"port":{"type":"integer","minimum":1024,"maximum":65535}},"required":["ips","port"]}},"required":["type","messageId","commandId","status","data"]},{"title":"AutohostStartFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/start"},"status":{"const":"failed"},"reason":{"enum":["battle_already_exists","engine_version_not_available","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};const formats28 = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;const formats30 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function validate44(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/start/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.data === undefined) && (missing0 = "data"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/start" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data.data !== undefined){let data4 = data.data;const _errs8 = errors;if(errors === _errs8){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){let missing1;if(((data4.ips === undefined) && (missing1 = "ips")) || ((data4.port === undefined) && (missing1 = "port"))){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {if(data4.ips !== undefined){let data5 = data4.ips;const _errs10 = errors;if(errors === _errs10){if(Array.isArray(data5)){var valid3 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];const _errs12 = errors;const _errs13 = errors;let valid4 = false;const _errs14 = errors;if(errors === _errs14){if(errors === _errs14){if(typeof data6 === "string"){if(!(formats28.test(data6))){const err6 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/0/format",keyword:"format",params:{format: "ipv4"},message:"must match format \""+"ipv4"+"\""};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}var _valid1 = _errs14 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs16 = errors;if(errors === _errs16){if(errors === _errs16){if(typeof data6 === "string"){if(!(formats30.test(data6))){const err8 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/1/format",keyword:"format",params:{format: "ipv6"},message:"must match format \""+"ipv6"+"\""};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}var _valid1 = _errs16 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err10 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}var valid3 = _errs12 === errors;if(!valid3){break;}}}else {const err11 = {instancePath:instancePath+"/data/ips",schemaPath:"#/anyOf/0/properties/data/properties/ips/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data4.port !== undefined){let data7 = data4.port;const _errs18 = errors;if(!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))){const err12 = {instancePath:instancePath+"/data/port",schemaPath:"#/anyOf/0/properties/data/properties/port/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(errors === _errs18){if((typeof data7 == "number") && (isFinite(data7))){if(data7 > 65535 || isNaN(data7)){const err13 = {instancePath:instancePath+"/data/port",schemaPath:"#/anyOf/0/properties/data/properties/port/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {if(data7 < 1024 || isNaN(data7)){const err14 = {instancePath:instancePath+"/data/port",schemaPath:"#/anyOf/0/properties/data/properties/port/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1024},message:"must be >= 1024"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}}var valid2 = _errs18 === errors;}else {var valid2 = true;}}}}else {const err15 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}}}}else {const err16 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs20 = errors;if(errors === _errs20){if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((((((data.type === undefined) && (missing2 = "type")) || ((data.messageId === undefined) && (missing2 = "messageId"))) || ((data.commandId === undefined) && (missing2 = "commandId"))) || ((data.status === undefined) && (missing2 = "status"))) || ((data.reason === undefined) && (missing2 = "reason"))){const err17 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {if(data.type !== undefined){const _errs22 = errors;if("response" !== data.type){const err18 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var valid5 = _errs22 === errors;}else {var valid5 = true;}if(valid5){if(data.messageId !== undefined){const _errs23 = errors;if(typeof data.messageId !== "string"){const err19 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var valid5 = _errs23 === errors;}else {var valid5 = true;}if(valid5){if(data.commandId !== undefined){const _errs25 = errors;if("autohost/start" !== data.commandId){const err20 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var valid5 = _errs25 === errors;}else {var valid5 = true;}if(valid5){if(data.status !== undefined){const _errs26 = errors;if("failed" !== data.status){const err21 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var valid5 = _errs26 === errors;}else {var valid5 = true;}if(valid5){if(data.reason !== undefined){let data12 = data.reason;const _errs27 = errors;if(!((((((data12 === "battle_already_exists") || (data12 === "engine_version_not_available")) || (data12 === "internal_error")) || (data12 === "unauthorized")) || (data12 === "invalid_request")) || (data12 === "command_unimplemented"))){const err22 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema57.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var valid5 = _errs27 === errors;}else {var valid5 = true;}if(valid5){if(data.details !== undefined){const _errs28 = errors;if(typeof data.details !== "string"){const err23 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var valid5 = _errs28 === errors;}else {var valid5 = true;}}}}}}}}else {const err24 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}var _valid0 = _errs20 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err25 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;validate44.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate44.errors = vErrors;return errors === 0;}export const autohost_specPlayers_request = validate45;const schema58 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSpecPlayersRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/specPlayers"},"data":{"title":"AutohostSpecPlayersRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userIds":{"type":"array","items":{"$ref":"../../definitions/userId.json"}}},"required":["battleId","userIds"]}},"required":["type","messageId","commandId","data"]};function validate45(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate45.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate45.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate45.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/specPlayers" !== data.commandId){validate45.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/specPlayers"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userIds === undefined) && (missing1 = "userIds"))){validate45.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate45.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate45.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userIds !== undefined){let data5 = data3.userIds;const _errs9 = errors;if(errors === _errs9){if(Array.isArray(data5)){var valid2 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];const _errs11 = errors;const _errs12 = errors;if(errors === _errs12){if(errors === _errs12){if(typeof data6 === "string"){if(!(formats0.test(data6))){validate45.errors = [{instancePath:instancePath+"/data/userIds/" + i0,schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate45.errors = [{instancePath:instancePath+"/data/userIds/" + i0,schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid2 = _errs11 === errors;if(!valid2){break;}}}else {validate45.errors = [{instancePath:instancePath+"/data/userIds",schemaPath:"#/properties/data/properties/userIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate45.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate45.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate45.errors = vErrors;return errors === 0;}export const autohost_specPlayers_response = validate46;const schema60 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSpecPlayersResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSpecPlayersOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/specPlayers"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSpecPlayersFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/specPlayers"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate46(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/specPlayers" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/specPlayers"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/specPlayers" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/specPlayers"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema60.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate46.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate46.errors = vErrors;return errors === 0;}export const autohost_sendMessage_request = validate47;const schema61 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendMessageRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendMessage"},"data":{"title":"AutohostSendMessageRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"message":{"type":"string","maxLength":127}},"required":["battleId","message"]}},"required":["type","messageId","commandId","data"]};const func2 = ucs2length;function validate47(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate47.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate47.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate47.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/sendMessage" !== data.commandId){validate47.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendMessage"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.message === undefined) && (missing1 = "message"))){validate47.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate47.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate47.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.message !== undefined){let data5 = data3.message;const _errs9 = errors;if(errors === _errs9){if(typeof data5 === "string"){if(func2(data5) > 127){validate47.errors = [{instancePath:instancePath+"/data/message",schemaPath:"#/properties/data/properties/message/maxLength",keyword:"maxLength",params:{limit: 127},message:"must NOT have more than 127 characters"}];return false;}}else {validate47.errors = [{instancePath:instancePath+"/data/message",schemaPath:"#/properties/data/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate47.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate47.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate47.errors = vErrors;return errors === 0;}export const autohost_sendMessage_response = validate48;const schema62 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendMessageResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSendMessageOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendMessage"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSendMessageFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendMessage"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate48(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/sendMessage" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendMessage"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/sendMessage" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendMessage"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema62.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate48.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate48.errors = vErrors;return errors === 0;}export const autohost_sendCommand_request = validate49;const schema63 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendCommandRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendCommand"},"data":{"title":"AutohostSendCommandRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"command":{"type":"string"},"arguments":{"type":"array","items":{"type":"string"}}},"required":["battleId","command"]}},"required":["type","messageId","commandId","data"]};function validate49(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate49.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate49.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate49.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/sendCommand" !== data.commandId){validate49.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendCommand"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.command === undefined) && (missing1 = "command"))){validate49.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate49.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate49.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.command !== undefined){const _errs9 = errors;if(typeof data3.command !== "string"){validate49.errors = [{instancePath:instancePath+"/data/command",schemaPath:"#/properties/data/properties/command/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.arguments !== undefined){let data6 = data3.arguments;const _errs11 = errors;if(errors === _errs11){if(Array.isArray(data6)){var valid2 = true;const len0 = data6.length;for(let i0=0; i0<len0; i0++){const _errs13 = errors;if(typeof data6[i0] !== "string"){validate49.errors = [{instancePath:instancePath+"/data/arguments/" + i0,schemaPath:"#/properties/data/properties/arguments/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs13 === errors;if(!valid2){break;}}}else {validate49.errors = [{instancePath:instancePath+"/data/arguments",schemaPath:"#/properties/data/properties/arguments/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs11 === errors;}else {var valid1 = true;}}}}}else {validate49.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate49.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate49.errors = vErrors;return errors === 0;}export const autohost_sendCommand_response = validate50;const schema64 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendCommandResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSendCommandOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendCommand"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSendCommandFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendCommand"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate50(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/sendCommand" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendCommand"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/sendCommand" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendCommand"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema64.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate50.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate50.errors = vErrors;return errors === 0;}export const autohost_mutePlayer_request = validate51;const schema65 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostMutePlayerRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/mutePlayer"},"data":{"title":"AutohostMutePlayerRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userId":{"$ref":"../../definitions/userId.json"},"chat":{"type":"boolean"},"draw":{"type":"boolean"}},"required":["battleId","userId","chat","draw"]}},"required":["type","messageId","commandId","data"]};function validate51(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate51.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate51.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate51.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/mutePlayer" !== data.commandId){validate51.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/mutePlayer"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userId === undefined) && (missing1 = "userId"))) || ((data3.chat === undefined) && (missing1 = "chat"))) || ((data3.draw === undefined) && (missing1 = "draw"))){validate51.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate51.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate51.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userId !== undefined){let data5 = data3.userId;const _errs9 = errors;const _errs10 = errors;if(errors === _errs10){if(errors === _errs10){if(typeof data5 === "string"){if(!(formats0.test(data5))){validate51.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate51.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.chat !== undefined){const _errs12 = errors;if(typeof data3.chat !== "boolean"){validate51.errors = [{instancePath:instancePath+"/data/chat",schemaPath:"#/properties/data/properties/chat/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs12 === errors;}else {var valid1 = true;}if(valid1){if(data3.draw !== undefined){const _errs14 = errors;if(typeof data3.draw !== "boolean"){validate51.errors = [{instancePath:instancePath+"/data/draw",schemaPath:"#/properties/data/properties/draw/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs14 === errors;}else {var valid1 = true;}}}}}}else {validate51.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate51.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate51.errors = vErrors;return errors === 0;}export const autohost_mutePlayer_response = validate52;const schema67 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostMutePlayerResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostMutePlayerOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/mutePlayer"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostMutePlayerFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/mutePlayer"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate52(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/mutePlayer" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/mutePlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/mutePlayer" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/mutePlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema67.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate52.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate52.errors = vErrors;return errors === 0;}export const autohost_kill_request = validate53;const schema68 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kill/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKillRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kill"},"data":{"title":"AutohostKillRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"}},"required":["battleId"]}},"required":["type","messageId","commandId","data"]};function validate53(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kill/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate53.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate53.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate53.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/kill" !== data.commandId){validate53.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kill"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.battleId === undefined) && (missing1 = "battleId")){validate53.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate53.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate53.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}}}else {validate53.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate53.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate53.errors = vErrors;return errors === 0;}export const autohost_kill_response = validate54;const schema69 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kill/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKillResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostKillOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kill"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostKillFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kill"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate54(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kill/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/kill" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kill"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/kill" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kill"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema69.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate54.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate54.errors = vErrors;return errors === 0;}export const autohost_kickPlayer_request = validate55;const schema70 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKickPlayerRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kickPlayer"},"data":{"title":"AutohostKickPlayerRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userId":{"$ref":"../../definitions/userId.json"}},"required":["battleId","userId"]}},"required":["type","messageId","commandId","data"]};function validate55(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate55.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate55.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate55.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/kickPlayer" !== data.commandId){validate55.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kickPlayer"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userId === undefined) && (missing1 = "userId"))){validate55.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate55.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate55.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userId !== undefined){let data5 = data3.userId;const _errs9 = errors;const _errs10 = errors;if(errors === _errs10){if(errors === _errs10){if(typeof data5 === "string"){if(!(formats0.test(data5))){validate55.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate55.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate55.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate55.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate55.errors = vErrors;return errors === 0;}export const autohost_kickPlayer_response = validate56;const schema72 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKickPlayerResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostKickPlayerOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kickPlayer"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostKickPlayerFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kickPlayer"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate56(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/kickPlayer" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kickPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/kickPlayer" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kickPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema72.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate56.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate56.errors = vErrors;return errors === 0;}export const autohost_addPlayer_request = validate57;const schema73 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostAddPlayerRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/addPlayer"},"data":{"title":"AutohostAddPlayerRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userId":{"$ref":"../../definitions/userId.json"},"name":{"type":"string"},"password":{"type":"string"}},"required":["battleId","userId","name","password"]}},"required":["type","messageId","commandId","data"]};function validate57(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate57.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate57.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate57.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/addPlayer" !== data.commandId){validate57.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/addPlayer"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userId === undefined) && (missing1 = "userId"))) || ((data3.name === undefined) && (missing1 = "name"))) || ((data3.password === undefined) && (missing1 = "password"))){validate57.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate57.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate57.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userId !== undefined){let data5 = data3.userId;const _errs9 = errors;const _errs10 = errors;if(errors === _errs10){if(errors === _errs10){if(typeof data5 === "string"){if(!(formats0.test(data5))){validate57.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate57.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.name !== undefined){const _errs12 = errors;if(typeof data3.name !== "string"){validate57.errors = [{instancePath:instancePath+"/data/name",schemaPath:"#/properties/data/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs12 === errors;}else {var valid1 = true;}if(valid1){if(data3.password !== undefined){const _errs14 = errors;if(typeof data3.password !== "string"){validate57.errors = [{instancePath:instancePath+"/data/password",schemaPath:"#/properties/data/properties/password/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs14 === errors;}else {var valid1 = true;}}}}}}else {validate57.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate57.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate57.errors = vErrors;return errors === 0;}export const autohost_addPlayer_response = validate58;const schema75 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostAddPlayerResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostAddPlayerOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/addPlayer"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostAddPlayerFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/addPlayer"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate58(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/addPlayer" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/addPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/addPlayer" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/addPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema75.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate58.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate58.errors = vErrors;return errors === 0;}export const validator = {"user/updated": {"event": user_updated_event,},"system/serverStats": {"request": system_serverStats_request,"response": system_serverStats_response,},"system/disconnect": {"request": system_disconnect_request,"response": system_disconnect_response,},"matchmaking/readyUpdate": {"event": matchmaking_readyUpdate_event,},"matchmaking/ready": {"request": matchmaking_ready_request,"response": matchmaking_ready_response,},"matchmaking/queueUpdate": {"event": matchmaking_queueUpdate_event,},"matchmaking/queue": {"request": matchmaking_queue_request,"response": matchmaking_queue_response,},"matchmaking/lost": {"event": matchmaking_lost_event,},"matchmaking/list": {"request": matchmaking_list_request,"response": matchmaking_list_response,},"matchmaking/foundUpdate": {"event": matchmaking_foundUpdate_event,},"matchmaking/found": {"event": matchmaking_found_event,},"matchmaking/cancel": {"request": matchmaking_cancel_request,"response": matchmaking_cancel_response,},"battle/start": {"request": battle_start_request,"response": battle_start_response,},"autohost/update": {"event": autohost_update_event,},"autohost/subscribeUpdates": {"request": autohost_subscribeUpdates_request,"response": autohost_subscribeUpdates_response,},"autohost/status": {"event": autohost_status_event,},"autohost/start": {"request": autohost_start_request,"response": autohost_start_response,},"autohost/specPlayers": {"request": autohost_specPlayers_request,"response": autohost_specPlayers_response,},"autohost/sendMessage": {"request": autohost_sendMessage_request,"response": autohost_sendMessage_response,},"autohost/sendCommand": {"request": autohost_sendCommand_request,"response": autohost_sendCommand_response,},"autohost/mutePlayer": {"request": autohost_mutePlayer_request,"response": autohost_mutePlayer_response,},"autohost/kill": {"request": autohost_kill_request,"response": autohost_kill_response,},"autohost/kickPlayer": {"request": autohost_kickPlayer_request,"response": autohost_kickPlayer_response,},"autohost/addPlayer": {"request": autohost_addPlayer_request,"response": autohost_addPlayer_response,},};
20
+ "use strict";export const user_updated_event = validate10;const schema11 = {"$id":"https://schema.beyondallreason.dev/tachyon/user/updated/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"UserUpdatedEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"user/updated"},"data":{"title":"UserUpdatedEventData","type":"object","properties":{"users":{"type":"array","items":{"type":"object","allOf":[{"type":"object","properties":{"userId":{"type":"string","examples":["351"]},"username":{"type":"string"},"displayName":{"type":"string"},"clanId":{"anyOf":[{"type":"string"},{"type":"null"}]},"partyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"countryCode":{"type":"string"},"status":{"enum":["offline","menu","playing","lobby"]}}},{"type":"object","properties":{"friendIds":{"type":"array","items":{"type":"string"}},"outgoingFriendRequestIds":{"type":"array","items":{"type":"string"}},"incomingFriendRequestIds":{"type":"array","items":{"type":"string"}},"ignoreIds":{"type":"array","items":{"type":"string"}}}}]}}},"required":["users"]}},"required":["type","messageId","commandId","data"]};function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/user/updated/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate10.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate10.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate10.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("user/updated" !== data.commandId){validate10.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "user/updated"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.users === undefined) && (missing1 = "users")){validate10.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.users !== undefined){let data4 = data3.users;const _errs7 = errors;if(errors === _errs7){if(Array.isArray(data4)){var valid2 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];const _errs9 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0,schemaPath:"#/properties/data/properties/users/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}const _errs11 = errors;if(errors === _errs11){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.userId !== undefined){const _errs13 = errors;if(typeof data5.userId !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/userId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/userId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs13 === errors;}else {var valid4 = true;}if(valid4){if(data5.username !== undefined){const _errs15 = errors;if(typeof data5.username !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/username",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/username/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs15 === errors;}else {var valid4 = true;}if(valid4){if(data5.displayName !== undefined){const _errs17 = errors;if(typeof data5.displayName !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/displayName",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/displayName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs17 === errors;}else {var valid4 = true;}if(valid4){if(data5.clanId !== undefined){let data9 = data5.clanId;const _errs19 = errors;const _errs20 = errors;let valid5 = false;const _errs21 = errors;if(typeof data9 !== "string"){const err0 = {instancePath:instancePath+"/data/users/" + i0+"/clanId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/clanId/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs21 === errors;valid5 = valid5 || _valid0;if(!valid5){const _errs23 = errors;if(data9 !== null){const err1 = {instancePath:instancePath+"/data/users/" + i0+"/clanId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/clanId/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var _valid0 = _errs23 === errors;valid5 = valid5 || _valid0;}if(!valid5){const err2 = {instancePath:instancePath+"/data/users/" + i0+"/clanId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/clanId/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;validate10.errors = vErrors;return false;}else {errors = _errs20;if(vErrors !== null){if(_errs20){vErrors.length = _errs20;}else {vErrors = null;}}}var valid4 = _errs19 === errors;}else {var valid4 = true;}if(valid4){if(data5.partyId !== undefined){let data10 = data5.partyId;const _errs25 = errors;const _errs26 = errors;let valid6 = false;const _errs27 = errors;if(typeof data10 !== "string"){const err3 = {instancePath:instancePath+"/data/users/" + i0+"/partyId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/partyId/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid1 = _errs27 === errors;valid6 = valid6 || _valid1;if(!valid6){const _errs29 = errors;if(data10 !== null){const err4 = {instancePath:instancePath+"/data/users/" + i0+"/partyId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/partyId/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid1 = _errs29 === errors;valid6 = valid6 || _valid1;}if(!valid6){const err5 = {instancePath:instancePath+"/data/users/" + i0+"/partyId",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/partyId/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;validate10.errors = vErrors;return false;}else {errors = _errs26;if(vErrors !== null){if(_errs26){vErrors.length = _errs26;}else {vErrors = null;}}}var valid4 = _errs25 === errors;}else {var valid4 = true;}if(valid4){if(data5.scopes !== undefined){let data11 = data5.scopes;const _errs31 = errors;if(errors === _errs31){if(Array.isArray(data11)){var valid7 = true;const len1 = data11.length;for(let i1=0; i1<len1; i1++){const _errs33 = errors;if(typeof data11[i1] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/scopes/" + i1,schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/scopes/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs33 === errors;if(!valid7){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/scopes",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/scopes/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid4 = _errs31 === errors;}else {var valid4 = true;}if(valid4){if(data5.countryCode !== undefined){const _errs35 = errors;if(typeof data5.countryCode !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/countryCode",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/countryCode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid4 = _errs35 === errors;}else {var valid4 = true;}if(valid4){if(data5.status !== undefined){let data14 = data5.status;const _errs37 = errors;if(!((((data14 === "offline") || (data14 === "menu")) || (data14 === "playing")) || (data14 === "lobby"))){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/status",schemaPath:"#/properties/data/properties/users/items/allOf/0/properties/status/enum",keyword:"enum",params:{allowedValues: schema11.properties.data.properties.users.items.allOf[0].properties.status.enum},message:"must be equal to one of the allowed values"}];return false;}var valid4 = _errs37 === errors;}else {var valid4 = true;}}}}}}}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0,schemaPath:"#/properties/data/properties/users/items/allOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs11 === errors;if(valid3){const _errs38 = errors;if(errors === _errs38){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.friendIds !== undefined){let data15 = data5.friendIds;const _errs40 = errors;if(errors === _errs40){if(Array.isArray(data15)){var valid9 = true;const len2 = data15.length;for(let i2=0; i2<len2; i2++){const _errs42 = errors;if(typeof data15[i2] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/friendIds/" + i2,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/friendIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid9 = _errs42 === errors;if(!valid9){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/friendIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/friendIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid8 = _errs40 === errors;}else {var valid8 = true;}if(valid8){if(data5.outgoingFriendRequestIds !== undefined){let data17 = data5.outgoingFriendRequestIds;const _errs44 = errors;if(errors === _errs44){if(Array.isArray(data17)){var valid10 = true;const len3 = data17.length;for(let i3=0; i3<len3; i3++){const _errs46 = errors;if(typeof data17[i3] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/outgoingFriendRequestIds/" + i3,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/outgoingFriendRequestIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid10 = _errs46 === errors;if(!valid10){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/outgoingFriendRequestIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/outgoingFriendRequestIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid8 = _errs44 === errors;}else {var valid8 = true;}if(valid8){if(data5.incomingFriendRequestIds !== undefined){let data19 = data5.incomingFriendRequestIds;const _errs48 = errors;if(errors === _errs48){if(Array.isArray(data19)){var valid11 = true;const len4 = data19.length;for(let i4=0; i4<len4; i4++){const _errs50 = errors;if(typeof data19[i4] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/incomingFriendRequestIds/" + i4,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/incomingFriendRequestIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs50 === errors;if(!valid11){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/incomingFriendRequestIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/incomingFriendRequestIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid8 = _errs48 === errors;}else {var valid8 = true;}if(valid8){if(data5.ignoreIds !== undefined){let data21 = data5.ignoreIds;const _errs52 = errors;if(errors === _errs52){if(Array.isArray(data21)){var valid12 = true;const len5 = data21.length;for(let i5=0; i5<len5; i5++){const _errs54 = errors;if(typeof data21[i5] !== "string"){validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/ignoreIds/" + i5,schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/ignoreIds/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid12 = _errs54 === errors;if(!valid12){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0+"/ignoreIds",schemaPath:"#/properties/data/properties/users/items/allOf/1/properties/ignoreIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid8 = _errs52 === errors;}else {var valid8 = true;}}}}}else {validate10.errors = [{instancePath:instancePath+"/data/users/" + i0,schemaPath:"#/properties/data/properties/users/items/allOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs38 === errors;}var valid2 = _errs9 === errors;if(!valid2){break;}}}else {validate10.errors = [{instancePath:instancePath+"/data/users",schemaPath:"#/properties/data/properties/users/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate10.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate10.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate10.errors = vErrors;return errors === 0;}export const system_serverStats_request = validate11;const schema12 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/serverStats/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemServerStatsRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"system/serverStats"}},"required":["type","messageId","commandId"]};function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/serverStats/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate11.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate11.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate11.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("system/serverStats" !== data.commandId){validate11.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "system/serverStats"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate11.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate11.errors = vErrors;return errors === 0;}export const system_serverStats_response = validate12;const schema13 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/serverStats/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemServerStatsResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"SystemServerStatsOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/serverStats"},"status":{"const":"success"},"data":{"title":"SystemServerStatsOkResponseData","type":"object","properties":{"userCount":{"type":"integer"}},"required":["userCount"]}},"required":["type","messageId","commandId","status","data"]},{"title":"SystemServerStatsFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/serverStats"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate12(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/serverStats/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.data === undefined) && (missing0 = "data"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("system/serverStats" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "system/serverStats"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data.data !== undefined){let data4 = data.data;const _errs8 = errors;if(errors === _errs8){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){let missing1;if((data4.userCount === undefined) && (missing1 = "userCount")){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {if(data4.userCount !== undefined){let data5 = data4.userCount;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){const err6 = {instancePath:instancePath+"/data/userCount",schemaPath:"#/anyOf/0/properties/data/properties/userCount/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}}}}else {const err8 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs12 = errors;if(errors === _errs12){if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((((((data.type === undefined) && (missing2 = "type")) || ((data.messageId === undefined) && (missing2 = "messageId"))) || ((data.commandId === undefined) && (missing2 = "commandId"))) || ((data.status === undefined) && (missing2 = "status"))) || ((data.reason === undefined) && (missing2 = "reason"))){const err9 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {if(data.type !== undefined){const _errs14 = errors;if("response" !== data.type){const err10 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid3 = _errs14 === errors;}else {var valid3 = true;}if(valid3){if(data.messageId !== undefined){const _errs15 = errors;if(typeof data.messageId !== "string"){const err11 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid3 = _errs15 === errors;}else {var valid3 = true;}if(valid3){if(data.commandId !== undefined){const _errs17 = errors;if("system/serverStats" !== data.commandId){const err12 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "system/serverStats"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid3 = _errs17 === errors;}else {var valid3 = true;}if(valid3){if(data.status !== undefined){const _errs18 = errors;if("failed" !== data.status){const err13 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var valid3 = _errs18 === errors;}else {var valid3 = true;}if(valid3){if(data.reason !== undefined){let data10 = data.reason;const _errs19 = errors;if(!((((data10 === "internal_error") || (data10 === "unauthorized")) || (data10 === "invalid_request")) || (data10 === "command_unimplemented"))){const err14 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema13.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var valid3 = _errs19 === errors;}else {var valid3 = true;}if(valid3){if(data.details !== undefined){const _errs20 = errors;if(typeof data.details !== "string"){const err15 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var valid3 = _errs20 === errors;}else {var valid3 = true;}}}}}}}}else {const err16 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}var _valid0 = _errs12 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err17 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;validate12.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate12.errors = vErrors;return errors === 0;}export const system_disconnect_request = validate13;const schema14 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/disconnect/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemDisconnectRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"system/disconnect"},"data":{"title":"SystemDisconnectRequestData","type":"object","properties":{"reason":{"type":"string"}},"required":["reason"]}},"required":["type","messageId","commandId"]};function validate13(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/disconnect/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate13.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate13.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate13.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("system/disconnect" !== data.commandId){validate13.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "system/disconnect"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.reason === undefined) && (missing1 = "reason")){validate13.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.reason !== undefined){if(typeof data3.reason !== "string"){validate13.errors = [{instancePath:instancePath+"/data/reason",schemaPath:"#/properties/data/properties/reason/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate13.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate13.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate13.errors = vErrors;return errors === 0;}export const system_disconnect_response = validate14;const schema15 = {"$id":"https://schema.beyondallreason.dev/tachyon/system/disconnect/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"SystemDisconnectResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"SystemDisconnectOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/disconnect"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"SystemDisconnectFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"system/disconnect"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate14(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/system/disconnect/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("system/disconnect" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "system/disconnect"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("system/disconnect" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "system/disconnect"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema15.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate14.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate14.errors = vErrors;return errors === 0;}export const matchmaking_ready_request = validate15;const schema16 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/ready/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingReadyRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/ready"}},"required":["type","messageId","commandId"]};function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/ready/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate15.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate15.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate15.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/ready" !== data.commandId){validate15.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/ready"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate15.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate15.errors = vErrors;return errors === 0;}export const matchmaking_ready_response = validate16;const schema17 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/ready/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingReadyResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingReadyOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/ready"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"MatchmakingReadyFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/ready"},"status":{"const":"failed"},"reason":{"enum":["no_match","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate16(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/ready/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/ready" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/ready"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("matchmaking/ready" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/ready"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!(((((data8 === "no_match") || (data8 === "internal_error")) || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema17.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate16.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate16.errors = vErrors;return errors === 0;}export const matchmaking_queueUpdate_event = validate17;const schema18 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/queueUpdate/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingQueueUpdateEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queueUpdate"},"data":{"title":"MatchmakingQueueUpdateEventData","type":"object","properties":{"playersQueued":{"type":"string"}},"required":["playersQueued"]}},"required":["type","messageId","commandId","data"]};function validate17(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/queueUpdate/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate17.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate17.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate17.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/queueUpdate" !== data.commandId){validate17.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queueUpdate"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.playersQueued === undefined) && (missing1 = "playersQueued")){validate17.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.playersQueued !== undefined){if(typeof data3.playersQueued !== "string"){validate17.errors = [{instancePath:instancePath+"/data/playersQueued",schemaPath:"#/properties/data/properties/playersQueued/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate17.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate17.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate17.errors = vErrors;return errors === 0;}export const matchmaking_queue_request = validate18;const schema19 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/queue/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingQueueRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queue"},"data":{"title":"MatchmakingQueueRequestData","type":"object","properties":{"queues":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["queues"]}},"required":["type","messageId","commandId","data"]};function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/queue/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate18.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate18.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate18.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/queue" !== data.commandId){validate18.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queue"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.queues === undefined) && (missing1 = "queues")){validate18.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.queues !== undefined){let data4 = data3.queues;const _errs7 = errors;if(errors === _errs7){if(Array.isArray(data4)){if(data4.length < 1){validate18.errors = [{instancePath:instancePath+"/data/queues",schemaPath:"#/properties/data/properties/queues/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid2 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){const _errs9 = errors;if(typeof data4[i0] !== "string"){validate18.errors = [{instancePath:instancePath+"/data/queues/" + i0,schemaPath:"#/properties/data/properties/queues/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs9 === errors;if(!valid2){break;}}}}else {validate18.errors = [{instancePath:instancePath+"/data/queues",schemaPath:"#/properties/data/properties/queues/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}}}}else {validate18.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate18.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate18.errors = vErrors;return errors === 0;}export const matchmaking_queue_response = validate19;const schema20 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/queue/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingQueueResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingQueueOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queue"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"MatchmakingQueueFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/queue"},"status":{"const":"failed"},"reason":{"enum":["invalid_queue_specified","already_queued","already_inbattle","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/queue/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/queue" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queue"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("matchmaking/queue" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/queue"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!(((((((data8 === "invalid_queue_specified") || (data8 === "already_queued")) || (data8 === "already_inbattle")) || (data8 === "internal_error")) || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema20.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate19.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate19.errors = vErrors;return errors === 0;}export const matchmaking_lost_event = validate20;const schema21 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/lost/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingLostEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/lost"}},"required":["type","messageId","commandId"]};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/lost/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate20.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate20.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/lost" !== data.commandId){validate20.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/lost"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}export const matchmaking_list_request = validate21;const schema22 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/list/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingListRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/list"}},"required":["type","messageId","commandId"]};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/list/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate21.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate21.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate21.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/list" !== data.commandId){validate21.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/list"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate21.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate21.errors = vErrors;return errors === 0;}export const matchmaking_list_response = validate22;const schema23 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/list/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingListResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingListOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/list"},"status":{"const":"success"},"data":{"title":"MatchmakingListOkResponseData","type":"object","properties":{"playlists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"numOfTeams":{"type":"integer"},"teamSize":{"type":"integer"},"ranked":{"type":"boolean"}},"required":["id","name","numOfTeams","teamSize","ranked"]}}},"required":["playlists"],"examples":[{"playlists":[{"id":"1v1","name":"Duel","numOfTeams":2,"teamSize":1,"ranked":true},{"id":"1v1v1","name":"3 Way FFA","numOfTeams":3,"teamSize":1,"ranked":true}]}]}},"required":["type","messageId","commandId","status","data"]},{"title":"MatchmakingListFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/list"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/list/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.data === undefined) && (missing0 = "data"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/list" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/list"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data.data !== undefined){let data4 = data.data;const _errs8 = errors;if(errors === _errs8){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){let missing1;if((data4.playlists === undefined) && (missing1 = "playlists")){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {if(data4.playlists !== undefined){let data5 = data4.playlists;const _errs10 = errors;if(errors === _errs10){if(Array.isArray(data5)){var valid3 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];const _errs12 = errors;if(errors === _errs12){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing2;if((((((data6.id === undefined) && (missing2 = "id")) || ((data6.name === undefined) && (missing2 = "name"))) || ((data6.numOfTeams === undefined) && (missing2 = "numOfTeams"))) || ((data6.teamSize === undefined) && (missing2 = "teamSize"))) || ((data6.ranked === undefined) && (missing2 = "ranked"))){const err6 = {instancePath:instancePath+"/data/playlists/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data6.id !== undefined){const _errs14 = errors;if(typeof data6.id !== "string"){const err7 = {instancePath:instancePath+"/data/playlists/" + i0+"/id",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid4 = _errs14 === errors;}else {var valid4 = true;}if(valid4){if(data6.name !== undefined){const _errs16 = errors;if(typeof data6.name !== "string"){const err8 = {instancePath:instancePath+"/data/playlists/" + i0+"/name",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid4 = _errs16 === errors;}else {var valid4 = true;}if(valid4){if(data6.numOfTeams !== undefined){let data9 = data6.numOfTeams;const _errs18 = errors;if(!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))){const err9 = {instancePath:instancePath+"/data/playlists/" + i0+"/numOfTeams",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/numOfTeams/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid4 = _errs18 === errors;}else {var valid4 = true;}if(valid4){if(data6.teamSize !== undefined){let data10 = data6.teamSize;const _errs20 = errors;if(!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))){const err10 = {instancePath:instancePath+"/data/playlists/" + i0+"/teamSize",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/teamSize/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid4 = _errs20 === errors;}else {var valid4 = true;}if(valid4){if(data6.ranked !== undefined){const _errs22 = errors;if(typeof data6.ranked !== "boolean"){const err11 = {instancePath:instancePath+"/data/playlists/" + i0+"/ranked",schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/properties/ranked/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid4 = _errs22 === errors;}else {var valid4 = true;}}}}}}}else {const err12 = {instancePath:instancePath+"/data/playlists/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/playlists/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}var valid3 = _errs12 === errors;if(!valid3){break;}}}else {const err13 = {instancePath:instancePath+"/data/playlists",schemaPath:"#/anyOf/0/properties/data/properties/playlists/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}}}else {const err14 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}}}}else {const err15 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs24 = errors;if(errors === _errs24){if(data && typeof data == "object" && !Array.isArray(data)){let missing3;if((((((data.type === undefined) && (missing3 = "type")) || ((data.messageId === undefined) && (missing3 = "messageId"))) || ((data.commandId === undefined) && (missing3 = "commandId"))) || ((data.status === undefined) && (missing3 = "status"))) || ((data.reason === undefined) && (missing3 = "reason"))){const err16 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}else {if(data.type !== undefined){const _errs26 = errors;if("response" !== data.type){const err17 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}var valid5 = _errs26 === errors;}else {var valid5 = true;}if(valid5){if(data.messageId !== undefined){const _errs27 = errors;if(typeof data.messageId !== "string"){const err18 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var valid5 = _errs27 === errors;}else {var valid5 = true;}if(valid5){if(data.commandId !== undefined){const _errs29 = errors;if("matchmaking/list" !== data.commandId){const err19 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/list"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var valid5 = _errs29 === errors;}else {var valid5 = true;}if(valid5){if(data.status !== undefined){const _errs30 = errors;if("failed" !== data.status){const err20 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var valid5 = _errs30 === errors;}else {var valid5 = true;}if(valid5){if(data.reason !== undefined){let data16 = data.reason;const _errs31 = errors;if(!((((data16 === "internal_error") || (data16 === "unauthorized")) || (data16 === "invalid_request")) || (data16 === "command_unimplemented"))){const err21 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema23.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var valid5 = _errs31 === errors;}else {var valid5 = true;}if(valid5){if(data.details !== undefined){const _errs32 = errors;if(typeof data.details !== "string"){const err22 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var valid5 = _errs32 === errors;}else {var valid5 = true;}}}}}}}}else {const err23 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}var _valid0 = _errs24 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err24 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;validate22.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate22.errors = vErrors;return errors === 0;}export const matchmaking_foundUpdate_event = validate23;const schema24 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/foundUpdate/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingFoundUpdateEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/foundUpdate"},"data":{"title":"MatchmakingFoundUpdateEventData","type":"object","properties":{"readyCount":{"type":"integer"}},"required":["readyCount"]}},"required":["type","messageId","commandId","data"]};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/foundUpdate/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate23.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate23.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate23.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/foundUpdate" !== data.commandId){validate23.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/foundUpdate"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.readyCount === undefined) && (missing1 = "readyCount")){validate23.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.readyCount !== undefined){let data4 = data3.readyCount;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate23.errors = [{instancePath:instancePath+"/data/readyCount",schemaPath:"#/properties/data/properties/readyCount/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}}}}else {validate23.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate23.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate23.errors = vErrors;return errors === 0;}export const matchmaking_found_event = validate24;const schema25 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/found/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingFoundEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/found"},"data":{"title":"MatchmakingFoundEventData","type":"object","properties":{"queueId":{"type":"string"},"timeoutMs":{"type":"integer"}},"required":["queueId","timeoutMs"]}},"required":["type","messageId","commandId","data"]};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/found/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate24.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate24.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate24.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/found" !== data.commandId){validate24.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/found"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.queueId === undefined) && (missing1 = "queueId")) || ((data3.timeoutMs === undefined) && (missing1 = "timeoutMs"))){validate24.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.queueId !== undefined){const _errs7 = errors;if(typeof data3.queueId !== "string"){validate24.errors = [{instancePath:instancePath+"/data/queueId",schemaPath:"#/properties/data/properties/queueId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.timeoutMs !== undefined){let data5 = data3.timeoutMs;const _errs9 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate24.errors = [{instancePath:instancePath+"/data/timeoutMs",schemaPath:"#/properties/data/properties/timeoutMs/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate24.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}export const matchmaking_cancelled_event = validate25;const schema26 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/cancelled/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingCancelledEvent","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/cancelled"},"data":{"title":"MatchmakingCancelledEventData","type":"object","properties":{"reason":{"enum":["intentional","server_error","party_user_left","ready_timeout"]}},"required":["reason"]}},"required":["type","messageId","commandId","data"]};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/cancelled/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate25.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate25.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate25.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/cancelled" !== data.commandId){validate25.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/cancelled"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.reason === undefined) && (missing1 = "reason")){validate25.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.reason !== undefined){let data4 = data3.reason;if(!((((data4 === "intentional") || (data4 === "server_error")) || (data4 === "party_user_left")) || (data4 === "ready_timeout"))){validate25.errors = [{instancePath:instancePath+"/data/reason",schemaPath:"#/properties/data/properties/reason/enum",keyword:"enum",params:{allowedValues: schema26.properties.data.properties.reason.enum},message:"must be equal to one of the allowed values"}];return false;}}}}else {validate25.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate25.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate25.errors = vErrors;return errors === 0;}export const matchmaking_cancel_request = validate26;const schema27 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingCancelRequest","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/cancel"}},"required":["type","messageId","commandId"]};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))){validate26.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate26.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate26.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("matchmaking/cancel" !== data.commandId){validate26.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/cancel"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}}}}}else {validate26.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate26.errors = vErrors;return errors === 0;}export const matchmaking_cancel_response = validate27;const schema28 = {"$id":"https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"MatchmakingCancelResponse","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"anyOf":[{"title":"MatchmakingCancelOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/cancel"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"MatchmakingCancelFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"matchmaking/cancel"},"status":{"const":"failed"},"reason":{"enum":["not_queued","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/matchmaking/cancel/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("matchmaking/cancel" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/cancel"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("matchmaking/cancel" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "matchmaking/cancel"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!(((((data8 === "not_queued") || (data8 === "internal_error")) || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema28.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate27.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate27.errors = vErrors;return errors === 0;}export const battle_start_request = validate28;const schema29 = {"$id":"https://schema.beyondallreason.dev/tachyon/battle/start/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"BattleStartRequest","tachyon":{"source":"server","target":"user","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"battle/start"},"data":{"title":"BattleStartRequestData","type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"},"ip":{"type":"string"},"port":{"type":"number"}},"required":["username","password","ip","port"]}},"required":["type","messageId","commandId","data"]};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/battle/start/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate28.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate28.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate28.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("battle/start" !== data.commandId){validate28.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "battle/start"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((data3.username === undefined) && (missing1 = "username")) || ((data3.password === undefined) && (missing1 = "password"))) || ((data3.ip === undefined) && (missing1 = "ip"))) || ((data3.port === undefined) && (missing1 = "port"))){validate28.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.username !== undefined){const _errs7 = errors;if(typeof data3.username !== "string"){validate28.errors = [{instancePath:instancePath+"/data/username",schemaPath:"#/properties/data/properties/username/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.password !== undefined){const _errs9 = errors;if(typeof data3.password !== "string"){validate28.errors = [{instancePath:instancePath+"/data/password",schemaPath:"#/properties/data/properties/password/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.ip !== undefined){const _errs11 = errors;if(typeof data3.ip !== "string"){validate28.errors = [{instancePath:instancePath+"/data/ip",schemaPath:"#/properties/data/properties/ip/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs11 === errors;}else {var valid1 = true;}if(valid1){if(data3.port !== undefined){let data7 = data3.port;const _errs13 = errors;if(!((typeof data7 == "number") && (isFinite(data7)))){validate28.errors = [{instancePath:instancePath+"/data/port",schemaPath:"#/properties/data/properties/port/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}var valid1 = _errs13 === errors;}else {var valid1 = true;}}}}}}else {validate28.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate28.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate28.errors = vErrors;return errors === 0;}export const battle_start_response = validate29;const schema30 = {"$id":"https://schema.beyondallreason.dev/tachyon/battle/start/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"BattleStartResponse","tachyon":{"source":"user","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"BattleStartOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"battle/start"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"BattleStartFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"battle/start"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate29(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/battle/start/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("battle/start" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "battle/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("battle/start" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "battle/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema30.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate29.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate29.errors = vErrors;return errors === 0;}export const autohost_update_event = validate30;const schema31 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/update/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostUpdateEvent","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"autohost/update"},"data":{"title":"AutohostUpdateEventData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"time":{"$ref":"../../definitions/unixTime.json"},"update":{"anyOf":[{"title":"StartUpdate","description":"The battle has started.","type":"object","properties":{"type":{"const":"start"}},"required":["type"]},{"title":"FinishedUpdate","description":"The battle finished, generated once per every single player reporting who won.","type":"object","properties":{"type":{"const":"finished"},"userId":{"$ref":"../../definitions/userId.json"},"winningAllyTeams":{"description":"Ally team IDs","type":"array","items":{"type":"integer"},"minItems":1}},"required":["type","userId","winningAllyTeams"]},{"title":"EngineMessageUpdate","description":"A message from the engine, e.g. some ip is trying to connect.","type":"object","properties":{"type":{"const":"engine_message"},"message":{"type":"string"}},"required":["type","message"]},{"title":"EngineWarningUpdate","description":"A warning from the engine.","type":"object","properties":{"type":{"const":"engine_warning"},"message":{"type":"string"}},"required":["type","message"]},{"title":"EngineQuitUpdate","description":"The engine process for battle has quit cleanly, no more updates will be sent for this battle.","type":"object","properties":{"type":{"const":"engine_quit"}},"required":["type"]},{"title":"EngineCrashUpdate","description":"The engine process for battle has crashed, no more updates will be sent for this battle.","type":"object","properties":{"type":{"const":"engine_crash"},"details":{"description":"Optional, short, details of the crash.","type":"string"}},"required":["type"]},{"title":"PlayerJoinedUpdate","type":"object","properties":{"type":{"const":"player_joined"},"userId":{"$ref":"../../definitions/userId.json"},"playerNumber":{"description":"Player number in the game, can be useful for custom commands","type":"integer"}},"required":["type","userId","playerNumber"]},{"title":"PlayerLeftUpdate","type":"object","properties":{"type":{"const":"player_left"},"userId":{"$ref":"../../definitions/userId.json"},"reason":{"enum":["lost_connection","left","kicked"]}},"required":["type","userId","reason"]},{"title":"PlayerChatUpdate","anyOf":[{"type":"object","properties":{"type":{"const":"player_chat"},"userId":{"$ref":"../../definitions/userId.json"},"message":{"type":"string"},"destination":{"enum":["allies","all","spectators"]}},"required":["type","userId","message","destination"]},{"type":"object","properties":{"type":{"const":"player_chat"},"userId":{"$ref":"../../definitions/userId.json"},"message":{"type":"string"},"destination":{"const":"player"},"toUserId":{"$ref":"../../definitions/userId.json"}},"required":["type","userId","message","destination","toUserId"]}]},{"title":"PlayerDefeatedUpdate","type":"object","properties":{"type":{"const":"player_defeated"},"userId":{"$ref":"../../definitions/userId.json"}},"required":["type","userId"]},{"title":"LuaMsgUpdate","description":"This update is generated only for messages matching luamsgRegexp set in the battle start script.","type":"object","properties":{"type":{"const":"luamsg"},"userId":{"$ref":"../../definitions/userId.json"},"script":{"enum":["ui","game","rules"]},"uiMode":{"description":"Set when script is 'ui'","enum":["all","allies","spectators"]},"data":{"type":"string","contentEncoding":"base64","contentMediaType":"application/octet-stream"}},"required":["type","userId","script","data"]}]}},"required":["battleId","time","update"]}},"required":["type","messageId","commandId","data"]};const schema32 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/unixTime.json","title":"UnixTime","description":"Unix timestamp in microseconds","type":"integer","examples":[1705432698000000]};const schema33 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/userId.json","title":"UserId","type":"string","examples":["351"]};const formats0 = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/update/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate30.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate30.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate30.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/update" !== data.commandId){validate30.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/update"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.time === undefined) && (missing1 = "time"))) || ((data3.update === undefined) && (missing1 = "update"))){validate30.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate30.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate30.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.time !== undefined){let data5 = data3.time;const _errs9 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate30.errors = [{instancePath:instancePath+"/data/time",schemaPath:"../../definitions/unixTime.json/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.update !== undefined){let data6 = data3.update;const _errs12 = errors;const _errs13 = errors;let valid3 = false;const _errs14 = errors;if(errors === _errs14){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing2;if((data6.type === undefined) && (missing2 = "type")){const err0 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/0/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data6.type !== undefined){if("start" !== data6.type){const err1 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}}}else {const err2 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var _valid0 = _errs14 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs17 = errors;if(errors === _errs17){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing3;if((((data6.type === undefined) && (missing3 = "type")) || ((data6.userId === undefined) && (missing3 = "userId"))) || ((data6.winningAllyTeams === undefined) && (missing3 = "winningAllyTeams"))){const err3 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/1/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {if(data6.type !== undefined){const _errs19 = errors;if("finished" !== data6.type){const err4 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "finished"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid5 = _errs19 === errors;}else {var valid5 = true;}if(valid5){if(data6.userId !== undefined){const _errs20 = errors;if(typeof data6.userId !== "string"){const err5 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var valid5 = _errs20 === errors;}else {var valid5 = true;}if(valid5){if(data6.winningAllyTeams !== undefined){let data10 = data6.winningAllyTeams;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data10)){if(data10.length < 1){const err6 = {instancePath:instancePath+"/data/update/winningAllyTeams",schemaPath:"#/properties/data/properties/update/anyOf/1/properties/winningAllyTeams/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {var valid7 = true;const len0 = data10.length;for(let i0=0; i0<len0; i0++){let data11 = data10[i0];const _errs25 = errors;if(!(((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11))) && (isFinite(data11)))){const err7 = {instancePath:instancePath+"/data/update/winningAllyTeams/" + i0,schemaPath:"#/properties/data/properties/update/anyOf/1/properties/winningAllyTeams/items/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid7 = _errs25 === errors;if(!valid7){break;}}}}else {const err8 = {instancePath:instancePath+"/data/update/winningAllyTeams",schemaPath:"#/properties/data/properties/update/anyOf/1/properties/winningAllyTeams/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}var valid5 = _errs23 === errors;}else {var valid5 = true;}}}}}else {const err9 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}var _valid0 = _errs17 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs27 = errors;if(errors === _errs27){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing4;if(((data6.type === undefined) && (missing4 = "type")) || ((data6.message === undefined) && (missing4 = "message"))){const err10 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/2/required",keyword:"required",params:{missingProperty: missing4},message:"must have required property '"+missing4+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {if(data6.type !== undefined){const _errs29 = errors;if("engine_message" !== data6.type){const err11 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/2/properties/type/const",keyword:"const",params:{allowedValue: "engine_message"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid8 = _errs29 === errors;}else {var valid8 = true;}if(valid8){if(data6.message !== undefined){const _errs30 = errors;if(typeof data6.message !== "string"){const err12 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/2/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid8 = _errs30 === errors;}else {var valid8 = true;}}}}else {const err13 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs27 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs32 = errors;if(errors === _errs32){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing5;if(((data6.type === undefined) && (missing5 = "type")) || ((data6.message === undefined) && (missing5 = "message"))){const err14 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/3/required",keyword:"required",params:{missingProperty: missing5},message:"must have required property '"+missing5+"'"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {if(data6.type !== undefined){const _errs34 = errors;if("engine_warning" !== data6.type){const err15 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/3/properties/type/const",keyword:"const",params:{allowedValue: "engine_warning"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}var valid9 = _errs34 === errors;}else {var valid9 = true;}if(valid9){if(data6.message !== undefined){const _errs35 = errors;if(typeof data6.message !== "string"){const err16 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/3/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}var valid9 = _errs35 === errors;}else {var valid9 = true;}}}}else {const err17 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/3/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}var _valid0 = _errs32 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs37 = errors;if(errors === _errs37){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing6;if((data6.type === undefined) && (missing6 = "type")){const err18 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/4/required",keyword:"required",params:{missingProperty: missing6},message:"must have required property '"+missing6+"'"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}else {if(data6.type !== undefined){if("engine_quit" !== data6.type){const err19 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/4/properties/type/const",keyword:"const",params:{allowedValue: "engine_quit"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}else {const err20 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/4/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}var _valid0 = _errs37 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs40 = errors;if(errors === _errs40){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing7;if((data6.type === undefined) && (missing7 = "type")){const err21 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/5/required",keyword:"required",params:{missingProperty: missing7},message:"must have required property '"+missing7+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}else {if(data6.type !== undefined){const _errs42 = errors;if("engine_crash" !== data6.type){const err22 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/5/properties/type/const",keyword:"const",params:{allowedValue: "engine_crash"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var valid11 = _errs42 === errors;}else {var valid11 = true;}if(valid11){if(data6.details !== undefined){const _errs43 = errors;if(typeof data6.details !== "string"){const err23 = {instancePath:instancePath+"/data/update/details",schemaPath:"#/properties/data/properties/update/anyOf/5/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var valid11 = _errs43 === errors;}else {var valid11 = true;}}}}else {const err24 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/5/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}var _valid0 = _errs40 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs45 = errors;if(errors === _errs45){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing8;if((((data6.type === undefined) && (missing8 = "type")) || ((data6.userId === undefined) && (missing8 = "userId"))) || ((data6.playerNumber === undefined) && (missing8 = "playerNumber"))){const err25 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/6/required",keyword:"required",params:{missingProperty: missing8},message:"must have required property '"+missing8+"'"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}else {if(data6.type !== undefined){const _errs47 = errors;if("player_joined" !== data6.type){const err26 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/6/properties/type/const",keyword:"const",params:{allowedValue: "player_joined"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}var valid12 = _errs47 === errors;}else {var valid12 = true;}if(valid12){if(data6.userId !== undefined){const _errs48 = errors;if(typeof data6.userId !== "string"){const err27 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}var valid12 = _errs48 === errors;}else {var valid12 = true;}if(valid12){if(data6.playerNumber !== undefined){let data21 = data6.playerNumber;const _errs51 = errors;if(!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))){const err28 = {instancePath:instancePath+"/data/update/playerNumber",schemaPath:"#/properties/data/properties/update/anyOf/6/properties/playerNumber/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var valid12 = _errs51 === errors;}else {var valid12 = true;}}}}}else {const err29 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/6/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}var _valid0 = _errs45 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs53 = errors;if(errors === _errs53){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing9;if((((data6.type === undefined) && (missing9 = "type")) || ((data6.userId === undefined) && (missing9 = "userId"))) || ((data6.reason === undefined) && (missing9 = "reason"))){const err30 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/7/required",keyword:"required",params:{missingProperty: missing9},message:"must have required property '"+missing9+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}else {if(data6.type !== undefined){const _errs55 = errors;if("player_left" !== data6.type){const err31 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/7/properties/type/const",keyword:"const",params:{allowedValue: "player_left"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var valid14 = _errs55 === errors;}else {var valid14 = true;}if(valid14){if(data6.userId !== undefined){const _errs56 = errors;if(typeof data6.userId !== "string"){const err32 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}var valid14 = _errs56 === errors;}else {var valid14 = true;}if(valid14){if(data6.reason !== undefined){let data24 = data6.reason;const _errs59 = errors;if(!(((data24 === "lost_connection") || (data24 === "left")) || (data24 === "kicked"))){const err33 = {instancePath:instancePath+"/data/update/reason",schemaPath:"#/properties/data/properties/update/anyOf/7/properties/reason/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[7].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var valid14 = _errs59 === errors;}else {var valid14 = true;}}}}}else {const err34 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/7/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}var _valid0 = _errs53 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs60 = errors;const _errs61 = errors;let valid16 = false;const _errs62 = errors;if(errors === _errs62){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing10;if(((((data6.type === undefined) && (missing10 = "type")) || ((data6.userId === undefined) && (missing10 = "userId"))) || ((data6.message === undefined) && (missing10 = "message"))) || ((data6.destination === undefined) && (missing10 = "destination"))){const err35 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/required",keyword:"required",params:{missingProperty: missing10},message:"must have required property '"+missing10+"'"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {if(data6.type !== undefined){const _errs64 = errors;if("player_chat" !== data6.type){const err36 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "player_chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}var valid17 = _errs64 === errors;}else {var valid17 = true;}if(valid17){if(data6.userId !== undefined){const _errs65 = errors;if(typeof data6.userId !== "string"){const err37 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}var valid17 = _errs65 === errors;}else {var valid17 = true;}if(valid17){if(data6.message !== undefined){const _errs68 = errors;if(typeof data6.message !== "string"){const err38 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}var valid17 = _errs68 === errors;}else {var valid17 = true;}if(valid17){if(data6.destination !== undefined){let data28 = data6.destination;const _errs70 = errors;if(!(((data28 === "allies") || (data28 === "all")) || (data28 === "spectators"))){const err39 = {instancePath:instancePath+"/data/update/destination",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/properties/destination/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[8].anyOf[0].properties.destination.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}var valid17 = _errs70 === errors;}else {var valid17 = true;}}}}}}else {const err40 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}var _valid1 = _errs62 === errors;valid16 = valid16 || _valid1;if(!valid16){const _errs71 = errors;if(errors === _errs71){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing11;if((((((data6.type === undefined) && (missing11 = "type")) || ((data6.userId === undefined) && (missing11 = "userId"))) || ((data6.message === undefined) && (missing11 = "message"))) || ((data6.destination === undefined) && (missing11 = "destination"))) || ((data6.toUserId === undefined) && (missing11 = "toUserId"))){const err41 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/required",keyword:"required",params:{missingProperty: missing11},message:"must have required property '"+missing11+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}else {if(data6.type !== undefined){const _errs73 = errors;if("player_chat" !== data6.type){const err42 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "player_chat"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}var valid19 = _errs73 === errors;}else {var valid19 = true;}if(valid19){if(data6.userId !== undefined){const _errs74 = errors;if(typeof data6.userId !== "string"){const err43 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}var valid19 = _errs74 === errors;}else {var valid19 = true;}if(valid19){if(data6.message !== undefined){const _errs77 = errors;if(typeof data6.message !== "string"){const err44 = {instancePath:instancePath+"/data/update/message",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}var valid19 = _errs77 === errors;}else {var valid19 = true;}if(valid19){if(data6.destination !== undefined){const _errs79 = errors;if("player" !== data6.destination){const err45 = {instancePath:instancePath+"/data/update/destination",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/properties/destination/const",keyword:"const",params:{allowedValue: "player"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}var valid19 = _errs79 === errors;}else {var valid19 = true;}if(valid19){if(data6.toUserId !== undefined){const _errs80 = errors;if(typeof data6.toUserId !== "string"){const err46 = {instancePath:instancePath+"/data/update/toUserId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}var valid19 = _errs80 === errors;}else {var valid19 = true;}}}}}}}else {const err47 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}var _valid1 = _errs71 === errors;valid16 = valid16 || _valid1;}if(!valid16){const err48 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/8/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}else {errors = _errs61;if(vErrors !== null){if(_errs61){vErrors.length = _errs61;}else {vErrors = null;}}}var _valid0 = _errs60 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs83 = errors;if(errors === _errs83){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing12;if(((data6.type === undefined) && (missing12 = "type")) || ((data6.userId === undefined) && (missing12 = "userId"))){const err49 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/9/required",keyword:"required",params:{missingProperty: missing12},message:"must have required property '"+missing12+"'"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}else {if(data6.type !== undefined){const _errs85 = errors;if("player_defeated" !== data6.type){const err50 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/9/properties/type/const",keyword:"const",params:{allowedValue: "player_defeated"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}var valid22 = _errs85 === errors;}else {var valid22 = true;}if(valid22){if(data6.userId !== undefined){const _errs86 = errors;if(typeof data6.userId !== "string"){const err51 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}var valid22 = _errs86 === errors;}else {var valid22 = true;}}}}else {const err52 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/9/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}var _valid0 = _errs83 === errors;valid3 = valid3 || _valid0;if(!valid3){const _errs89 = errors;if(errors === _errs89){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){let missing13;if(((((data6.type === undefined) && (missing13 = "type")) || ((data6.userId === undefined) && (missing13 = "userId"))) || ((data6.script === undefined) && (missing13 = "script"))) || ((data6.data === undefined) && (missing13 = "data"))){const err53 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/10/required",keyword:"required",params:{missingProperty: missing13},message:"must have required property '"+missing13+"'"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}else {if(data6.type !== undefined){const _errs91 = errors;if("luamsg" !== data6.type){const err54 = {instancePath:instancePath+"/data/update/type",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/type/const",keyword:"const",params:{allowedValue: "luamsg"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}var valid24 = _errs91 === errors;}else {var valid24 = true;}if(valid24){if(data6.userId !== undefined){const _errs92 = errors;if(typeof data6.userId !== "string"){const err55 = {instancePath:instancePath+"/data/update/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}var valid24 = _errs92 === errors;}else {var valid24 = true;}if(valid24){if(data6.script !== undefined){let data38 = data6.script;const _errs95 = errors;if(!(((data38 === "ui") || (data38 === "game")) || (data38 === "rules"))){const err56 = {instancePath:instancePath+"/data/update/script",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/script/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[10].properties.script.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}var valid24 = _errs95 === errors;}else {var valid24 = true;}if(valid24){if(data6.uiMode !== undefined){let data39 = data6.uiMode;const _errs96 = errors;if(!(((data39 === "all") || (data39 === "allies")) || (data39 === "spectators"))){const err57 = {instancePath:instancePath+"/data/update/uiMode",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/uiMode/enum",keyword:"enum",params:{allowedValues: schema31.properties.data.properties.update.anyOf[10].properties.uiMode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}var valid24 = _errs96 === errors;}else {var valid24 = true;}if(valid24){if(data6.data !== undefined){const _errs97 = errors;if(typeof data6.data !== "string"){const err58 = {instancePath:instancePath+"/data/update/data",schemaPath:"#/properties/data/properties/update/anyOf/10/properties/data/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}var valid24 = _errs97 === errors;}else {var valid24 = true;}}}}}}}else {const err59 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf/10/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}var _valid0 = _errs89 === errors;valid3 = valid3 || _valid0;}}}}}}}}}}if(!valid3){const err60 = {instancePath:instancePath+"/data/update",schemaPath:"#/properties/data/properties/update/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;validate30.errors = vErrors;return false;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}var valid1 = _errs12 === errors;}else {var valid1 = true;}}}}}else {validate30.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate30.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate30.errors = vErrors;return errors === 0;}export const autohost_subscribeUpdates_request = validate31;const schema41 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSubscribeUpdatesRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/subscribeUpdates"},"data":{"title":"AutohostSubscribeUpdatesRequestData","type":"object","properties":{"since":{"$ref":"../../definitions/unixTime.json"}},"required":["since"]}},"required":["type","messageId","commandId","data"]};function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate31.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate31.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate31.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/subscribeUpdates" !== data.commandId){validate31.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/subscribeUpdates"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.since === undefined) && (missing1 = "since")){validate31.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.since !== undefined){let data4 = data3.since;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate31.errors = [{instancePath:instancePath+"/data/since",schemaPath:"../../definitions/unixTime.json/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}}}}else {validate31.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate31.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate31.errors = vErrors;return errors === 0;}export const autohost_subscribeUpdates_response = validate32;const schema43 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSubscribeUpdatesResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSubscribeUpdatesOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/subscribeUpdates"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSubscribeUpdatesFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/subscribeUpdates"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate32(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/subscribeUpdates/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/subscribeUpdates" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/subscribeUpdates"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/subscribeUpdates" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/subscribeUpdates"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema43.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate32.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate32.errors = vErrors;return errors === 0;}export const autohost_status_event = validate33;const schema44 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/status/event.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostStatusEvent","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"event"},"messageId":{"type":"string"},"commandId":{"const":"autohost/status"},"data":{"title":"AutohostStatusEventData","type":"object","properties":{"maxBattles":{"type":"integer","minimum":0},"currentBattles":{"type":"integer","minimum":0}},"required":["maxBattles","currentBattles"]}},"required":["type","messageId","commandId","data"]};function validate33(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/status/event.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate33.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("event" !== data.type){validate33.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "event"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate33.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/status" !== data.commandId){validate33.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/status"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.maxBattles === undefined) && (missing1 = "maxBattles")) || ((data3.currentBattles === undefined) && (missing1 = "currentBattles"))){validate33.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.maxBattles !== undefined){let data4 = data3.maxBattles;const _errs7 = errors;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){validate33.errors = [{instancePath:instancePath+"/data/maxBattles",schemaPath:"#/properties/data/properties/maxBattles/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs7){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){validate33.errors = [{instancePath:instancePath+"/data/maxBattles",schemaPath:"#/properties/data/properties/maxBattles/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.currentBattles !== undefined){let data5 = data3.currentBattles;const _errs9 = errors;if(!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))){validate33.errors = [{instancePath:instancePath+"/data/currentBattles",schemaPath:"#/properties/data/properties/currentBattles/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs9){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 0 || isNaN(data5)){validate33.errors = [{instancePath:instancePath+"/data/currentBattles",schemaPath:"#/properties/data/properties/currentBattles/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate33.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate33.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate33.errors = vErrors;return errors === 0;}export const autohost_start_request = validate34;const schema45 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/start/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostStartRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/start"},"data":{"title":"AutohostStartRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"engineVersion":{"type":"string","pattern":"^[0-9a-zA-Z .+-]+$"},"gameName":{"type":"string"},"mapName":{"type":"string"},"gameArchiveHash":{"type":"string","pattern":"^[a-fA-F0-9]{128}$"},"mapArchiveHash":{"type":"string","pattern":"^[a-fA-F0-9]{128}$"},"startDelay":{"type":"integer"},"startPosType":{"$ref":"../../definitions/startPosType.json"},"allyTeams":{"type":"array","items":{"$ref":"../../definitions/allyTeam.json"},"minItems":1},"spectators":{"type":"array","items":{"$ref":"../../definitions/player.json"}},"mapOptions":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"gameOptions":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"restrictions":{"description":"Mapping from unitDefId to the maximum number of units of that type that can be built.","type":"object","patternProperties":{"^(.*)$":{"type":"integer","minimum":0}}},"luamsgRegexp":{"description":"When set, battle will generate updates for luamsgs matching this regexp. No updates will be generated if this is not set.","type":"string","format":"regex"}},"required":["battleId","engineVersion","gameName","mapName","startPosType","allyTeams"]}},"required":["type","messageId","commandId","data"]};const schema46 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/startPosType.json","title":"StartPosType","enum":["fixed","random","ingame","beforegame"]};const formats6 = ajvFormats.fullFormats.regex;const pattern0 = new RegExp("^[0-9a-zA-Z .+-]+$", "u");const pattern1 = new RegExp("^[a-fA-F0-9]{128}$", "u");const pattern4 = new RegExp("^(.*)$", "u");const schema47 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/allyTeam.json","title":"AllyTeam","type":"object","properties":{"teams":{"type":"array","items":{"$ref":"../definitions/team.json"},"minItems":1},"startBox":{"$ref":"../definitions/startBox.json"},"allies":{"description":"0-based indexes into of the other allyteams to ally with","type":"array","items":{"type":"integer"}},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}},"required":["teams"]};const schema55 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/startBox.json","title":"StartBox","type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":1},"bottom":{"type":"number","minimum":0,"maximum":1},"left":{"type":"number","minimum":0,"maximum":1},"right":{"type":"number","minimum":0,"maximum":1}},"required":["top","bottom","left","right"]};const schema51 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/customStartScriptProperties.json","title":"CustomStartScriptProperties","description":"Additional custom properties to set in engine StartScript for this object, must not collide with existing properties","type":"object","patternProperties":{"^[a-zA-Z0-9_-]$":{"type":"string"}}};const schema48 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/team.json","title":"Team","type":"object","properties":{"players":{"type":"array","items":{"$ref":"../definitions/player.json"}},"bots":{"type":"array","items":{"$ref":"../definitions/bot.json"}},"advantage":{"type":"number","minimum":-1},"incomeMultiplier":{"type":"number","minimum":0},"faction":{"type":"string"},"color":{"type":"object","properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}},"required":["r","g","b"]},"startPos":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}},"required":["x","y"]},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}}};const schema49 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/player.json","title":"Player","type":"object","properties":{"userId":{"$ref":"../definitions/userId.json"},"name":{"description":"Name of the player, must be unique just like userId","type":"string"},"password":{"type":"string"},"rank":{"type":"integer"},"countryCode":{"type":"string"},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}},"required":["userId","name","password"]};const pattern3 = new RegExp("^[a-zA-Z0-9_-]$", "u");function validate37(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/player.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.userId === undefined) && (missing0 = "userId")) || ((data.name === undefined) && (missing0 = "name"))) || ((data.password === undefined) && (missing0 = "password"))){validate37.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.userId !== undefined){const _errs1 = errors;if(typeof data.userId !== "string"){validate37.errors = [{instancePath:instancePath+"/userId",schemaPath:"../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){const _errs4 = errors;if(typeof data.name !== "string"){validate37.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.password !== undefined){const _errs6 = errors;if(typeof data.password !== "string"){validate37.errors = [{instancePath:instancePath+"/password",schemaPath:"#/properties/password/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs6 === errors;}else {var valid0 = true;}if(valid0){if(data.rank !== undefined){let data3 = data.rank;const _errs8 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate37.errors = [{instancePath:instancePath+"/rank",schemaPath:"#/properties/rank/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid0 = _errs8 === errors;}else {var valid0 = true;}if(valid0){if(data.countryCode !== undefined){const _errs10 = errors;if(typeof data.countryCode !== "string"){validate37.errors = [{instancePath:instancePath+"/countryCode",schemaPath:"#/properties/countryCode/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs10 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data5 = data.customProperties;const _errs12 = errors;const _errs13 = errors;if(errors === _errs13){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){var valid3 = true;for(const key0 in data5){if(pattern3.test(key0)){const _errs15 = errors;if(typeof data5[key0] !== "string"){validate37.errors = [{instancePath:instancePath+"/customProperties/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs15 === errors;if(!valid3){break;}}}}else {validate37.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs12 === errors;}else {var valid0 = true;}}}}}}}}else {validate37.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate37.errors = vErrors;return errors === 0;}const schema52 = {"$id":"https://schema.beyondallreason.dev/tachyon/definitions/bot.json","title":"Bot","type":"object","properties":{"hostUserId":{"description":"UserId of the player hosting this AI","type":"string","format":"uuid"},"name":{"type":"string"},"aiShortName":{"description":"Short name of the AI library","type":"string"},"aiVersion":{"type":"string"},"aiOptions":{"description":"AI-specific options","type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"customProperties":{"$ref":"../definitions/customStartScriptProperties.json"}},"required":["hostUserId","aiShortName"]};function validate39(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/bot.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.hostUserId === undefined) && (missing0 = "hostUserId")) || ((data.aiShortName === undefined) && (missing0 = "aiShortName"))){validate39.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.hostUserId !== undefined){let data0 = data.hostUserId;const _errs1 = errors;if(errors === _errs1){if(errors === _errs1){if(typeof data0 === "string"){if(!(formats0.test(data0))){validate39.errors = [{instancePath:instancePath+"/hostUserId",schemaPath:"#/properties/hostUserId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate39.errors = [{instancePath:instancePath+"/hostUserId",schemaPath:"#/properties/hostUserId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.name !== undefined){const _errs3 = errors;if(typeof data.name !== "string"){validate39.errors = [{instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === errors;}else {var valid0 = true;}if(valid0){if(data.aiShortName !== undefined){const _errs5 = errors;if(typeof data.aiShortName !== "string"){validate39.errors = [{instancePath:instancePath+"/aiShortName",schemaPath:"#/properties/aiShortName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs5 === errors;}else {var valid0 = true;}if(valid0){if(data.aiVersion !== undefined){const _errs7 = errors;if(typeof data.aiVersion !== "string"){validate39.errors = [{instancePath:instancePath+"/aiVersion",schemaPath:"#/properties/aiVersion/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.aiOptions !== undefined){let data4 = data.aiOptions;const _errs9 = errors;if(errors === _errs9){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){var valid1 = true;for(const key0 in data4){if(pattern4.test(key0)){const _errs11 = errors;if(typeof data4[key0] !== "string"){validate39.errors = [{instancePath:instancePath+"/aiOptions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/aiOptions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs11 === errors;if(!valid1){break;}}}}else {validate39.errors = [{instancePath:instancePath+"/aiOptions",schemaPath:"#/properties/aiOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data6 = data.customProperties;const _errs13 = errors;const _errs14 = errors;if(errors === _errs14){if(data6 && typeof data6 == "object" && !Array.isArray(data6)){var valid3 = true;for(const key1 in data6){if(pattern3.test(key1)){const _errs16 = errors;if(typeof data6[key1] !== "string"){validate39.errors = [{instancePath:instancePath+"/customProperties/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs16 === errors;if(!valid3){break;}}}}else {validate39.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs13 === errors;}else {var valid0 = true;}}}}}}}}else {validate39.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate39.errors = vErrors;return errors === 0;}function validate36(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/team.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){if(data.players !== undefined){let data0 = data.players;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate37(data0[i0], {instancePath:instancePath+"/players/" + i0,parentData:data0,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate37.errors : vErrors.concat(validate37.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}else {validate36.errors = [{instancePath:instancePath+"/players",schemaPath:"#/properties/players/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.bots !== undefined){let data2 = data.bots;const _errs4 = errors;if(errors === _errs4){if(Array.isArray(data2)){var valid2 = true;const len1 = data2.length;for(let i1=0; i1<len1; i1++){const _errs6 = errors;if(!(validate39(data2[i1], {instancePath:instancePath+"/bots/" + i1,parentData:data2,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate39.errors : vErrors.concat(validate39.errors);errors = vErrors.length;}var valid2 = _errs6 === errors;if(!valid2){break;}}}else {validate36.errors = [{instancePath:instancePath+"/bots",schemaPath:"#/properties/bots/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.advantage !== undefined){let data4 = data.advantage;const _errs7 = errors;if(errors === _errs7){if((typeof data4 == "number") && (isFinite(data4))){if(data4 < -1 || isNaN(data4)){validate36.errors = [{instancePath:instancePath+"/advantage",schemaPath:"#/properties/advantage/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"}];return false;}}else {validate36.errors = [{instancePath:instancePath+"/advantage",schemaPath:"#/properties/advantage/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid0 = _errs7 === errors;}else {var valid0 = true;}if(valid0){if(data.incomeMultiplier !== undefined){let data5 = data.incomeMultiplier;const _errs9 = errors;if(errors === _errs9){if((typeof data5 == "number") && (isFinite(data5))){if(data5 < 0 || isNaN(data5)){validate36.errors = [{instancePath:instancePath+"/incomeMultiplier",schemaPath:"#/properties/incomeMultiplier/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}else {validate36.errors = [{instancePath:instancePath+"/incomeMultiplier",schemaPath:"#/properties/incomeMultiplier/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid0 = _errs9 === errors;}else {var valid0 = true;}if(valid0){if(data.faction !== undefined){const _errs11 = errors;if(typeof data.faction !== "string"){validate36.errors = [{instancePath:instancePath+"/faction",schemaPath:"#/properties/faction/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs11 === errors;}else {var valid0 = true;}if(valid0){if(data.color !== undefined){let data7 = data.color;const _errs13 = errors;if(errors === _errs13){if(data7 && typeof data7 == "object" && !Array.isArray(data7)){let missing0;if((((data7.r === undefined) && (missing0 = "r")) || ((data7.g === undefined) && (missing0 = "g"))) || ((data7.b === undefined) && (missing0 = "b"))){validate36.errors = [{instancePath:instancePath+"/color",schemaPath:"#/properties/color/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data7.r !== undefined){let data8 = data7.r;const _errs15 = errors;if(errors === _errs15){if((typeof data8 == "number") && (isFinite(data8))){if(data8 > 1 || isNaN(data8)){validate36.errors = [{instancePath:instancePath+"/color/r",schemaPath:"#/properties/color/properties/r/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data8 < 0 || isNaN(data8)){validate36.errors = [{instancePath:instancePath+"/color/r",schemaPath:"#/properties/color/properties/r/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate36.errors = [{instancePath:instancePath+"/color/r",schemaPath:"#/properties/color/properties/r/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs15 === errors;}else {var valid3 = true;}if(valid3){if(data7.g !== undefined){let data9 = data7.g;const _errs17 = errors;if(errors === _errs17){if((typeof data9 == "number") && (isFinite(data9))){if(data9 > 1 || isNaN(data9)){validate36.errors = [{instancePath:instancePath+"/color/g",schemaPath:"#/properties/color/properties/g/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data9 < 0 || isNaN(data9)){validate36.errors = [{instancePath:instancePath+"/color/g",schemaPath:"#/properties/color/properties/g/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate36.errors = [{instancePath:instancePath+"/color/g",schemaPath:"#/properties/color/properties/g/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs17 === errors;}else {var valid3 = true;}if(valid3){if(data7.b !== undefined){let data10 = data7.b;const _errs19 = errors;if(errors === _errs19){if((typeof data10 == "number") && (isFinite(data10))){if(data10 > 1 || isNaN(data10)){validate36.errors = [{instancePath:instancePath+"/color/b",schemaPath:"#/properties/color/properties/b/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data10 < 0 || isNaN(data10)){validate36.errors = [{instancePath:instancePath+"/color/b",schemaPath:"#/properties/color/properties/b/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate36.errors = [{instancePath:instancePath+"/color/b",schemaPath:"#/properties/color/properties/b/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs19 === errors;}else {var valid3 = true;}}}}}else {validate36.errors = [{instancePath:instancePath+"/color",schemaPath:"#/properties/color/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs13 === errors;}else {var valid0 = true;}if(valid0){if(data.startPos !== undefined){let data11 = data.startPos;const _errs21 = errors;if(errors === _errs21){if(data11 && typeof data11 == "object" && !Array.isArray(data11)){let missing1;if(((data11.x === undefined) && (missing1 = "x")) || ((data11.y === undefined) && (missing1 = "y"))){validate36.errors = [{instancePath:instancePath+"/startPos",schemaPath:"#/properties/startPos/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data11.x !== undefined){let data12 = data11.x;const _errs23 = errors;if(!(((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12))) && (isFinite(data12)))){validate36.errors = [{instancePath:instancePath+"/startPos/x",schemaPath:"#/properties/startPos/properties/x/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid4 = _errs23 === errors;}else {var valid4 = true;}if(valid4){if(data11.y !== undefined){let data13 = data11.y;const _errs25 = errors;if(!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))){validate36.errors = [{instancePath:instancePath+"/startPos/y",schemaPath:"#/properties/startPos/properties/y/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid4 = _errs25 === errors;}else {var valid4 = true;}}}}else {validate36.errors = [{instancePath:instancePath+"/startPos",schemaPath:"#/properties/startPos/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs21 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data14 = data.customProperties;const _errs27 = errors;const _errs28 = errors;if(errors === _errs28){if(data14 && typeof data14 == "object" && !Array.isArray(data14)){var valid6 = true;for(const key0 in data14){if(pattern3.test(key0)){const _errs30 = errors;if(typeof data14[key0] !== "string"){validate36.errors = [{instancePath:instancePath+"/customProperties/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs30 === errors;if(!valid6){break;}}}}else {validate36.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs27 === errors;}else {var valid0 = true;}}}}}}}}}else {validate36.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate36.errors = vErrors;return errors === 0;}function validate35(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/definitions/allyTeam.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.teams === undefined) && (missing0 = "teams")){validate35.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.teams !== undefined){let data0 = data.teams;const _errs1 = errors;if(errors === _errs1){if(Array.isArray(data0)){if(data0.length < 1){validate35.errors = [{instancePath:instancePath+"/teams",schemaPath:"#/properties/teams/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid1 = true;const len0 = data0.length;for(let i0=0; i0<len0; i0++){const _errs3 = errors;if(!(validate36(data0[i0], {instancePath:instancePath+"/teams/" + i0,parentData:data0,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate36.errors : vErrors.concat(validate36.errors);errors = vErrors.length;}var valid1 = _errs3 === errors;if(!valid1){break;}}}}else {validate35.errors = [{instancePath:instancePath+"/teams",schemaPath:"#/properties/teams/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.startBox !== undefined){let data2 = data.startBox;const _errs4 = errors;const _errs5 = errors;if(errors === _errs5){if(data2 && typeof data2 == "object" && !Array.isArray(data2)){let missing1;if(((((data2.top === undefined) && (missing1 = "top")) || ((data2.bottom === undefined) && (missing1 = "bottom"))) || ((data2.left === undefined) && (missing1 = "left"))) || ((data2.right === undefined) && (missing1 = "right"))){validate35.errors = [{instancePath:instancePath+"/startBox",schemaPath:"../definitions/startBox.json/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data2.top !== undefined){let data3 = data2.top;const _errs7 = errors;if(errors === _errs7){if((typeof data3 == "number") && (isFinite(data3))){if(data3 > 1 || isNaN(data3)){validate35.errors = [{instancePath:instancePath+"/startBox/top",schemaPath:"../definitions/startBox.json/properties/top/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data3 < 0 || isNaN(data3)){validate35.errors = [{instancePath:instancePath+"/startBox/top",schemaPath:"../definitions/startBox.json/properties/top/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/top",schemaPath:"../definitions/startBox.json/properties/top/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs7 === errors;}else {var valid3 = true;}if(valid3){if(data2.bottom !== undefined){let data4 = data2.bottom;const _errs9 = errors;if(errors === _errs9){if((typeof data4 == "number") && (isFinite(data4))){if(data4 > 1 || isNaN(data4)){validate35.errors = [{instancePath:instancePath+"/startBox/bottom",schemaPath:"../definitions/startBox.json/properties/bottom/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data4 < 0 || isNaN(data4)){validate35.errors = [{instancePath:instancePath+"/startBox/bottom",schemaPath:"../definitions/startBox.json/properties/bottom/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/bottom",schemaPath:"../definitions/startBox.json/properties/bottom/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs9 === errors;}else {var valid3 = true;}if(valid3){if(data2.left !== undefined){let data5 = data2.left;const _errs11 = errors;if(errors === _errs11){if((typeof data5 == "number") && (isFinite(data5))){if(data5 > 1 || isNaN(data5)){validate35.errors = [{instancePath:instancePath+"/startBox/left",schemaPath:"../definitions/startBox.json/properties/left/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data5 < 0 || isNaN(data5)){validate35.errors = [{instancePath:instancePath+"/startBox/left",schemaPath:"../definitions/startBox.json/properties/left/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/left",schemaPath:"../definitions/startBox.json/properties/left/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs11 === errors;}else {var valid3 = true;}if(valid3){if(data2.right !== undefined){let data6 = data2.right;const _errs13 = errors;if(errors === _errs13){if((typeof data6 == "number") && (isFinite(data6))){if(data6 > 1 || isNaN(data6)){validate35.errors = [{instancePath:instancePath+"/startBox/right",schemaPath:"../definitions/startBox.json/properties/right/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"}];return false;}else {if(data6 < 0 || isNaN(data6)){validate35.errors = [{instancePath:instancePath+"/startBox/right",schemaPath:"../definitions/startBox.json/properties/right/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}else {validate35.errors = [{instancePath:instancePath+"/startBox/right",schemaPath:"../definitions/startBox.json/properties/right/type",keyword:"type",params:{type: "number"},message:"must be number"}];return false;}}var valid3 = _errs13 === errors;}else {var valid3 = true;}}}}}}else {validate35.errors = [{instancePath:instancePath+"/startBox",schemaPath:"../definitions/startBox.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.allies !== undefined){let data7 = data.allies;const _errs15 = errors;if(errors === _errs15){if(Array.isArray(data7)){var valid4 = true;const len1 = data7.length;for(let i1=0; i1<len1; i1++){let data8 = data7[i1];const _errs17 = errors;if(!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))){validate35.errors = [{instancePath:instancePath+"/allies/" + i1,schemaPath:"#/properties/allies/items/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid4 = _errs17 === errors;if(!valid4){break;}}}else {validate35.errors = [{instancePath:instancePath+"/allies",schemaPath:"#/properties/allies/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid0 = _errs15 === errors;}else {var valid0 = true;}if(valid0){if(data.customProperties !== undefined){let data9 = data.customProperties;const _errs19 = errors;const _errs20 = errors;if(errors === _errs20){if(data9 && typeof data9 == "object" && !Array.isArray(data9)){var valid6 = true;for(const key0 in data9){if(pattern3.test(key0)){const _errs22 = errors;if(typeof data9[key0] !== "string"){validate35.errors = [{instancePath:instancePath+"/customProperties/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"../definitions/customStartScriptProperties.json/patternProperties/%5E%5Ba-zA-Z0-9_-%5D%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs22 === errors;if(!valid6){break;}}}}else {validate35.errors = [{instancePath:instancePath+"/customProperties",schemaPath:"../definitions/customStartScriptProperties.json/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs19 === errors;}else {var valid0 = true;}}}}}}else {validate35.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate35.errors = vErrors;return errors === 0;}function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/start/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate34.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate34.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate34.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/start" !== data.commandId){validate34.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/start"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.engineVersion === undefined) && (missing1 = "engineVersion"))) || ((data3.gameName === undefined) && (missing1 = "gameName"))) || ((data3.mapName === undefined) && (missing1 = "mapName"))) || ((data3.startPosType === undefined) && (missing1 = "startPosType"))) || ((data3.allyTeams === undefined) && (missing1 = "allyTeams"))){validate34.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate34.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.engineVersion !== undefined){let data5 = data3.engineVersion;const _errs9 = errors;if(errors === _errs9){if(typeof data5 === "string"){if(!pattern0.test(data5)){validate34.errors = [{instancePath:instancePath+"/data/engineVersion",schemaPath:"#/properties/data/properties/engineVersion/pattern",keyword:"pattern",params:{pattern: "^[0-9a-zA-Z .+-]+$"},message:"must match pattern \""+"^[0-9a-zA-Z .+-]+$"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/engineVersion",schemaPath:"#/properties/data/properties/engineVersion/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.gameName !== undefined){const _errs11 = errors;if(typeof data3.gameName !== "string"){validate34.errors = [{instancePath:instancePath+"/data/gameName",schemaPath:"#/properties/data/properties/gameName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs11 === errors;}else {var valid1 = true;}if(valid1){if(data3.mapName !== undefined){const _errs13 = errors;if(typeof data3.mapName !== "string"){validate34.errors = [{instancePath:instancePath+"/data/mapName",schemaPath:"#/properties/data/properties/mapName/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs13 === errors;}else {var valid1 = true;}if(valid1){if(data3.gameArchiveHash !== undefined){let data8 = data3.gameArchiveHash;const _errs15 = errors;if(errors === _errs15){if(typeof data8 === "string"){if(!pattern1.test(data8)){validate34.errors = [{instancePath:instancePath+"/data/gameArchiveHash",schemaPath:"#/properties/data/properties/gameArchiveHash/pattern",keyword:"pattern",params:{pattern: "^[a-fA-F0-9]{128}$"},message:"must match pattern \""+"^[a-fA-F0-9]{128}$"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/gameArchiveHash",schemaPath:"#/properties/data/properties/gameArchiveHash/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs15 === errors;}else {var valid1 = true;}if(valid1){if(data3.mapArchiveHash !== undefined){let data9 = data3.mapArchiveHash;const _errs17 = errors;if(errors === _errs17){if(typeof data9 === "string"){if(!pattern1.test(data9)){validate34.errors = [{instancePath:instancePath+"/data/mapArchiveHash",schemaPath:"#/properties/data/properties/mapArchiveHash/pattern",keyword:"pattern",params:{pattern: "^[a-fA-F0-9]{128}$"},message:"must match pattern \""+"^[a-fA-F0-9]{128}$"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/mapArchiveHash",schemaPath:"#/properties/data/properties/mapArchiveHash/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs17 === errors;}else {var valid1 = true;}if(valid1){if(data3.startDelay !== undefined){let data10 = data3.startDelay;const _errs19 = errors;if(!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))){validate34.errors = [{instancePath:instancePath+"/data/startDelay",schemaPath:"#/properties/data/properties/startDelay/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs19 === errors;}else {var valid1 = true;}if(valid1){if(data3.startPosType !== undefined){let data11 = data3.startPosType;const _errs21 = errors;if(!((((data11 === "fixed") || (data11 === "random")) || (data11 === "ingame")) || (data11 === "beforegame"))){validate34.errors = [{instancePath:instancePath+"/data/startPosType",schemaPath:"../../definitions/startPosType.json/enum",keyword:"enum",params:{allowedValues: schema46.enum},message:"must be equal to one of the allowed values"}];return false;}var valid1 = _errs21 === errors;}else {var valid1 = true;}if(valid1){if(data3.allyTeams !== undefined){let data12 = data3.allyTeams;const _errs23 = errors;if(errors === _errs23){if(Array.isArray(data12)){if(data12.length < 1){validate34.errors = [{instancePath:instancePath+"/data/allyTeams",schemaPath:"#/properties/data/properties/allyTeams/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"}];return false;}else {var valid3 = true;const len0 = data12.length;for(let i0=0; i0<len0; i0++){const _errs25 = errors;if(!(validate35(data12[i0], {instancePath:instancePath+"/data/allyTeams/" + i0,parentData:data12,parentDataProperty:i0,rootData}))){vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);errors = vErrors.length;}var valid3 = _errs25 === errors;if(!valid3){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/allyTeams",schemaPath:"#/properties/data/properties/allyTeams/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs23 === errors;}else {var valid1 = true;}if(valid1){if(data3.spectators !== undefined){let data14 = data3.spectators;const _errs26 = errors;if(errors === _errs26){if(Array.isArray(data14)){var valid4 = true;const len1 = data14.length;for(let i1=0; i1<len1; i1++){const _errs28 = errors;if(!(validate37(data14[i1], {instancePath:instancePath+"/data/spectators/" + i1,parentData:data14,parentDataProperty:i1,rootData}))){vErrors = vErrors === null ? validate37.errors : vErrors.concat(validate37.errors);errors = vErrors.length;}var valid4 = _errs28 === errors;if(!valid4){break;}}}else {validate34.errors = [{instancePath:instancePath+"/data/spectators",schemaPath:"#/properties/data/properties/spectators/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs26 === errors;}else {var valid1 = true;}if(valid1){if(data3.mapOptions !== undefined){let data16 = data3.mapOptions;const _errs29 = errors;if(errors === _errs29){if(data16 && typeof data16 == "object" && !Array.isArray(data16)){var valid5 = true;for(const key0 in data16){if(pattern4.test(key0)){const _errs31 = errors;if(typeof data16[key0] !== "string"){validate34.errors = [{instancePath:instancePath+"/data/mapOptions/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/mapOptions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid5 = _errs31 === errors;if(!valid5){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/mapOptions",schemaPath:"#/properties/data/properties/mapOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs29 === errors;}else {var valid1 = true;}if(valid1){if(data3.gameOptions !== undefined){let data18 = data3.gameOptions;const _errs33 = errors;if(errors === _errs33){if(data18 && typeof data18 == "object" && !Array.isArray(data18)){var valid6 = true;for(const key1 in data18){if(pattern4.test(key1)){const _errs35 = errors;if(typeof data18[key1] !== "string"){validate34.errors = [{instancePath:instancePath+"/data/gameOptions/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/gameOptions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs35 === errors;if(!valid6){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/gameOptions",schemaPath:"#/properties/data/properties/gameOptions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs33 === errors;}else {var valid1 = true;}if(valid1){if(data3.restrictions !== undefined){let data20 = data3.restrictions;const _errs37 = errors;if(errors === _errs37){if(data20 && typeof data20 == "object" && !Array.isArray(data20)){var valid7 = true;for(const key2 in data20){if(pattern4.test(key2)){let data21 = data20[key2];const _errs39 = errors;if(!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))){validate34.errors = [{instancePath:instancePath+"/data/restrictions/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/restrictions/patternProperties/%5E(.*)%24/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs39){if((typeof data21 == "number") && (isFinite(data21))){if(data21 < 0 || isNaN(data21)){validate34.errors = [{instancePath:instancePath+"/data/restrictions/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/data/properties/restrictions/patternProperties/%5E(.*)%24/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}var valid7 = _errs39 === errors;if(!valid7){break;}}}}else {validate34.errors = [{instancePath:instancePath+"/data/restrictions",schemaPath:"#/properties/data/properties/restrictions/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs37 === errors;}else {var valid1 = true;}if(valid1){if(data3.luamsgRegexp !== undefined){let data22 = data3.luamsgRegexp;const _errs41 = errors;if(errors === _errs41){if(errors === _errs41){if(typeof data22 === "string"){if(!(formats6(data22))){validate34.errors = [{instancePath:instancePath+"/data/luamsgRegexp",schemaPath:"#/properties/data/properties/luamsgRegexp/format",keyword:"format",params:{format: "regex"},message:"must match format \""+"regex"+"\""}];return false;}}else {validate34.errors = [{instancePath:instancePath+"/data/luamsgRegexp",schemaPath:"#/properties/data/properties/luamsgRegexp/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs41 === errors;}else {var valid1 = true;}}}}}}}}}}}}}}}}else {validate34.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate34.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate34.errors = vErrors;return errors === 0;}export const autohost_start_response = validate44;const schema57 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/start/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostStartResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostStartOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/start"},"status":{"const":"success"},"data":{"title":"AutohostStartOkResponseData","type":"object","properties":{"ips":{"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"ipv6"}]}},"port":{"type":"integer","minimum":1024,"maximum":65535}},"required":["ips","port"]}},"required":["type","messageId","commandId","status","data"]},{"title":"AutohostStartFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/start"},"status":{"const":"failed"},"reason":{"enum":["battle_already_exists","engine_version_not_available","internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};const formats8 = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;const formats10 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function validate44(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/start/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))) || ((data.data === undefined) && (missing0 = "data"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/start" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data.data !== undefined){let data4 = data.data;const _errs8 = errors;if(errors === _errs8){if(data4 && typeof data4 == "object" && !Array.isArray(data4)){let missing1;if(((data4.ips === undefined) && (missing1 = "ips")) || ((data4.port === undefined) && (missing1 = "port"))){const err5 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {if(data4.ips !== undefined){let data5 = data4.ips;const _errs10 = errors;if(errors === _errs10){if(Array.isArray(data5)){var valid3 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){let data6 = data5[i0];const _errs12 = errors;const _errs13 = errors;let valid4 = false;const _errs14 = errors;if(errors === _errs14){if(errors === _errs14){if(typeof data6 === "string"){if(!(formats8.test(data6))){const err6 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/0/format",keyword:"format",params:{format: "ipv4"},message:"must match format \""+"ipv4"+"\""};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}var _valid1 = _errs14 === errors;valid4 = valid4 || _valid1;if(!valid4){const _errs16 = errors;if(errors === _errs16){if(errors === _errs16){if(typeof data6 === "string"){if(!(formats10.test(data6))){const err8 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/1/format",keyword:"format",params:{format: "ipv6"},message:"must match format \""+"ipv6"+"\""};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf/1/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}var _valid1 = _errs16 === errors;valid4 = valid4 || _valid1;}if(!valid4){const err10 = {instancePath:instancePath+"/data/ips/" + i0,schemaPath:"#/anyOf/0/properties/data/properties/ips/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}var valid3 = _errs12 === errors;if(!valid3){break;}}}else {const err11 = {instancePath:instancePath+"/data/ips",schemaPath:"#/anyOf/0/properties/data/properties/ips/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data4.port !== undefined){let data7 = data4.port;const _errs18 = errors;if(!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))){const err12 = {instancePath:instancePath+"/data/port",schemaPath:"#/anyOf/0/properties/data/properties/port/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(errors === _errs18){if((typeof data7 == "number") && (isFinite(data7))){if(data7 > 65535 || isNaN(data7)){const err13 = {instancePath:instancePath+"/data/port",schemaPath:"#/anyOf/0/properties/data/properties/port/maximum",keyword:"maximum",params:{comparison: "<=", limit: 65535},message:"must be <= 65535"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {if(data7 < 1024 || isNaN(data7)){const err14 = {instancePath:instancePath+"/data/port",schemaPath:"#/anyOf/0/properties/data/properties/port/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1024},message:"must be >= 1024"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}}var valid2 = _errs18 === errors;}else {var valid2 = true;}}}}else {const err15 = {instancePath:instancePath+"/data",schemaPath:"#/anyOf/0/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}var valid1 = _errs8 === errors;}else {var valid1 = true;}}}}}}}else {const err16 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs20 = errors;if(errors === _errs20){if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((((((data.type === undefined) && (missing2 = "type")) || ((data.messageId === undefined) && (missing2 = "messageId"))) || ((data.commandId === undefined) && (missing2 = "commandId"))) || ((data.status === undefined) && (missing2 = "status"))) || ((data.reason === undefined) && (missing2 = "reason"))){const err17 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}else {if(data.type !== undefined){const _errs22 = errors;if("response" !== data.type){const err18 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var valid5 = _errs22 === errors;}else {var valid5 = true;}if(valid5){if(data.messageId !== undefined){const _errs23 = errors;if(typeof data.messageId !== "string"){const err19 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var valid5 = _errs23 === errors;}else {var valid5 = true;}if(valid5){if(data.commandId !== undefined){const _errs25 = errors;if("autohost/start" !== data.commandId){const err20 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/start"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var valid5 = _errs25 === errors;}else {var valid5 = true;}if(valid5){if(data.status !== undefined){const _errs26 = errors;if("failed" !== data.status){const err21 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}var valid5 = _errs26 === errors;}else {var valid5 = true;}if(valid5){if(data.reason !== undefined){let data12 = data.reason;const _errs27 = errors;if(!((((((data12 === "battle_already_exists") || (data12 === "engine_version_not_available")) || (data12 === "internal_error")) || (data12 === "unauthorized")) || (data12 === "invalid_request")) || (data12 === "command_unimplemented"))){const err22 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema57.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}var valid5 = _errs27 === errors;}else {var valid5 = true;}if(valid5){if(data.details !== undefined){const _errs28 = errors;if(typeof data.details !== "string"){const err23 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}var valid5 = _errs28 === errors;}else {var valid5 = true;}}}}}}}}else {const err24 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}var _valid0 = _errs20 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err25 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;validate44.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate44.errors = vErrors;return errors === 0;}export const autohost_specPlayers_request = validate45;const schema58 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSpecPlayersRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/specPlayers"},"data":{"title":"AutohostSpecPlayersRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userIds":{"type":"array","items":{"$ref":"../../definitions/userId.json"}}},"required":["battleId","userIds"]}},"required":["type","messageId","commandId","data"]};function validate45(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate45.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate45.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate45.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/specPlayers" !== data.commandId){validate45.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/specPlayers"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userIds === undefined) && (missing1 = "userIds"))){validate45.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate45.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate45.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userIds !== undefined){let data5 = data3.userIds;const _errs9 = errors;if(errors === _errs9){if(Array.isArray(data5)){var valid2 = true;const len0 = data5.length;for(let i0=0; i0<len0; i0++){const _errs11 = errors;if(typeof data5[i0] !== "string"){validate45.errors = [{instancePath:instancePath+"/data/userIds/" + i0,schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs11 === errors;if(!valid2){break;}}}else {validate45.errors = [{instancePath:instancePath+"/data/userIds",schemaPath:"#/properties/data/properties/userIds/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate45.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate45.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate45.errors = vErrors;return errors === 0;}export const autohost_specPlayers_response = validate46;const schema60 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSpecPlayersResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSpecPlayersOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/specPlayers"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSpecPlayersFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/specPlayers"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate46(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/specPlayers/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/specPlayers" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/specPlayers"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/specPlayers" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/specPlayers"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema60.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate46.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate46.errors = vErrors;return errors === 0;}export const autohost_sendMessage_request = validate47;const schema61 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendMessageRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendMessage"},"data":{"title":"AutohostSendMessageRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"message":{"type":"string","maxLength":127}},"required":["battleId","message"]}},"required":["type","messageId","commandId","data"]};const func2 = ucs2length;function validate47(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate47.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate47.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate47.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/sendMessage" !== data.commandId){validate47.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendMessage"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.message === undefined) && (missing1 = "message"))){validate47.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate47.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate47.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.message !== undefined){let data5 = data3.message;const _errs9 = errors;if(errors === _errs9){if(typeof data5 === "string"){if(func2(data5) > 127){validate47.errors = [{instancePath:instancePath+"/data/message",schemaPath:"#/properties/data/properties/message/maxLength",keyword:"maxLength",params:{limit: 127},message:"must NOT have more than 127 characters"}];return false;}}else {validate47.errors = [{instancePath:instancePath+"/data/message",schemaPath:"#/properties/data/properties/message/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate47.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate47.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate47.errors = vErrors;return errors === 0;}export const autohost_sendMessage_response = validate48;const schema62 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendMessageResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSendMessageOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendMessage"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSendMessageFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendMessage"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate48(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendMessage/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/sendMessage" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendMessage"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/sendMessage" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendMessage"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema62.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate48.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate48.errors = vErrors;return errors === 0;}export const autohost_sendCommand_request = validate49;const schema63 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendCommandRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendCommand"},"data":{"title":"AutohostSendCommandRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"command":{"type":"string"},"arguments":{"type":"array","items":{"type":"string"}}},"required":["battleId","command"]}},"required":["type","messageId","commandId","data"]};function validate49(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate49.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate49.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate49.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/sendCommand" !== data.commandId){validate49.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendCommand"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.command === undefined) && (missing1 = "command"))){validate49.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate49.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate49.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.command !== undefined){const _errs9 = errors;if(typeof data3.command !== "string"){validate49.errors = [{instancePath:instancePath+"/data/command",schemaPath:"#/properties/data/properties/command/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.arguments !== undefined){let data6 = data3.arguments;const _errs11 = errors;if(errors === _errs11){if(Array.isArray(data6)){var valid2 = true;const len0 = data6.length;for(let i0=0; i0<len0; i0++){const _errs13 = errors;if(typeof data6[i0] !== "string"){validate49.errors = [{instancePath:instancePath+"/data/arguments/" + i0,schemaPath:"#/properties/data/properties/arguments/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs13 === errors;if(!valid2){break;}}}else {validate49.errors = [{instancePath:instancePath+"/data/arguments",schemaPath:"#/properties/data/properties/arguments/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs11 === errors;}else {var valid1 = true;}}}}}else {validate49.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate49.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate49.errors = vErrors;return errors === 0;}export const autohost_sendCommand_response = validate50;const schema64 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostSendCommandResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostSendCommandOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendCommand"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostSendCommandFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/sendCommand"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate50(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/sendCommand/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/sendCommand" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendCommand"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/sendCommand" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/sendCommand"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema64.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate50.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate50.errors = vErrors;return errors === 0;}export const autohost_mutePlayer_request = validate51;const schema65 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostMutePlayerRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/mutePlayer"},"data":{"title":"AutohostMutePlayerRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userId":{"$ref":"../../definitions/userId.json"},"chat":{"type":"boolean"},"draw":{"type":"boolean"}},"required":["battleId","userId","chat","draw"]}},"required":["type","messageId","commandId","data"]};function validate51(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate51.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate51.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate51.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/mutePlayer" !== data.commandId){validate51.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/mutePlayer"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userId === undefined) && (missing1 = "userId"))) || ((data3.chat === undefined) && (missing1 = "chat"))) || ((data3.draw === undefined) && (missing1 = "draw"))){validate51.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate51.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate51.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userId !== undefined){const _errs9 = errors;if(typeof data3.userId !== "string"){validate51.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.chat !== undefined){const _errs12 = errors;if(typeof data3.chat !== "boolean"){validate51.errors = [{instancePath:instancePath+"/data/chat",schemaPath:"#/properties/data/properties/chat/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs12 === errors;}else {var valid1 = true;}if(valid1){if(data3.draw !== undefined){const _errs14 = errors;if(typeof data3.draw !== "boolean"){validate51.errors = [{instancePath:instancePath+"/data/draw",schemaPath:"#/properties/data/properties/draw/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}var valid1 = _errs14 === errors;}else {var valid1 = true;}}}}}}else {validate51.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate51.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate51.errors = vErrors;return errors === 0;}export const autohost_mutePlayer_response = validate52;const schema67 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostMutePlayerResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostMutePlayerOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/mutePlayer"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostMutePlayerFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/mutePlayer"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate52(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/mutePlayer/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/mutePlayer" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/mutePlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/mutePlayer" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/mutePlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema67.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate52.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate52.errors = vErrors;return errors === 0;}export const autohost_kill_request = validate53;const schema68 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kill/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKillRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kill"},"data":{"title":"AutohostKillRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"}},"required":["battleId"]}},"required":["type","messageId","commandId","data"]};function validate53(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kill/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate53.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate53.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate53.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/kill" !== data.commandId){validate53.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kill"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if((data3.battleId === undefined) && (missing1 = "battleId")){validate53.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate53.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate53.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}}}else {validate53.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate53.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate53.errors = vErrors;return errors === 0;}export const autohost_kill_response = validate54;const schema69 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kill/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKillResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostKillOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kill"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostKillFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kill"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate54(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kill/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/kill" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kill"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/kill" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kill"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema69.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate54.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate54.errors = vErrors;return errors === 0;}export const autohost_kickPlayer_request = validate55;const schema70 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKickPlayerRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kickPlayer"},"data":{"title":"AutohostKickPlayerRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userId":{"$ref":"../../definitions/userId.json"}},"required":["battleId","userId"]}},"required":["type","messageId","commandId","data"]};function validate55(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate55.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate55.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate55.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/kickPlayer" !== data.commandId){validate55.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kickPlayer"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userId === undefined) && (missing1 = "userId"))){validate55.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate55.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate55.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userId !== undefined){const _errs9 = errors;if(typeof data3.userId !== "string"){validate55.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}}}}else {validate55.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate55.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate55.errors = vErrors;return errors === 0;}export const autohost_kickPlayer_response = validate56;const schema72 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostKickPlayerResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostKickPlayerOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kickPlayer"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostKickPlayerFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/kickPlayer"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate56(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/kickPlayer/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/kickPlayer" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kickPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/kickPlayer" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/kickPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema72.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate56.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate56.errors = vErrors;return errors === 0;}export const autohost_addPlayer_request = validate57;const schema73 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/request.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostAddPlayerRequest","tachyon":{"source":"server","target":"autohost","scopes":["tachyon.lobby"]},"type":"object","properties":{"type":{"const":"request"},"messageId":{"type":"string"},"commandId":{"const":"autohost/addPlayer"},"data":{"title":"AutohostAddPlayerRequestData","type":"object","properties":{"battleId":{"type":"string","format":"uuid"},"userId":{"$ref":"../../definitions/userId.json"},"name":{"type":"string"},"password":{"type":"string"}},"required":["battleId","userId","name","password"]}},"required":["type","messageId","commandId","data"]};function validate57(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/request.json" */;let vErrors = null;let errors = 0;if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.data === undefined) && (missing0 = "data"))){validate57.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.type !== undefined){const _errs1 = errors;if("request" !== data.type){validate57.errors = [{instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "request"},message:"must be equal to constant"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.messageId !== undefined){const _errs2 = errors;if(typeof data.messageId !== "string"){validate57.errors = [{instancePath:instancePath+"/messageId",schemaPath:"#/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs2 === errors;}else {var valid0 = true;}if(valid0){if(data.commandId !== undefined){const _errs4 = errors;if("autohost/addPlayer" !== data.commandId){validate57.errors = [{instancePath:instancePath+"/commandId",schemaPath:"#/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/addPlayer"},message:"must be equal to constant"}];return false;}var valid0 = _errs4 === errors;}else {var valid0 = true;}if(valid0){if(data.data !== undefined){let data3 = data.data;const _errs5 = errors;if(errors === _errs5){if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((((data3.battleId === undefined) && (missing1 = "battleId")) || ((data3.userId === undefined) && (missing1 = "userId"))) || ((data3.name === undefined) && (missing1 = "name"))) || ((data3.password === undefined) && (missing1 = "password"))){validate57.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.battleId !== undefined){let data4 = data3.battleId;const _errs7 = errors;if(errors === _errs7){if(errors === _errs7){if(typeof data4 === "string"){if(!(formats0.test(data4))){validate57.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/format",keyword:"format",params:{format: "uuid"},message:"must match format \""+"uuid"+"\""}];return false;}}else {validate57.errors = [{instancePath:instancePath+"/data/battleId",schemaPath:"#/properties/data/properties/battleId/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data3.userId !== undefined){const _errs9 = errors;if(typeof data3.userId !== "string"){validate57.errors = [{instancePath:instancePath+"/data/userId",schemaPath:"../../definitions/userId.json/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs9 === errors;}else {var valid1 = true;}if(valid1){if(data3.name !== undefined){const _errs12 = errors;if(typeof data3.name !== "string"){validate57.errors = [{instancePath:instancePath+"/data/name",schemaPath:"#/properties/data/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs12 === errors;}else {var valid1 = true;}if(valid1){if(data3.password !== undefined){const _errs14 = errors;if(typeof data3.password !== "string"){validate57.errors = [{instancePath:instancePath+"/data/password",schemaPath:"#/properties/data/properties/password/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs14 === errors;}else {var valid1 = true;}}}}}}else {validate57.errors = [{instancePath:instancePath+"/data",schemaPath:"#/properties/data/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs5 === errors;}else {var valid0 = true;}}}}}}else {validate57.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate57.errors = vErrors;return errors === 0;}export const autohost_addPlayer_response = validate58;const schema75 = {"$id":"https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/response.json","$schema":"http://json-schema.org/draft-07/schema#","title":"AutohostAddPlayerResponse","tachyon":{"source":"autohost","target":"server","scopes":["tachyon.lobby"]},"anyOf":[{"title":"AutohostAddPlayerOkResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/addPlayer"},"status":{"const":"success"}},"required":["type","messageId","commandId","status"]},{"title":"AutohostAddPlayerFailResponse","type":"object","properties":{"type":{"const":"response"},"messageId":{"type":"string"},"commandId":{"const":"autohost/addPlayer"},"status":{"const":"failed"},"reason":{"enum":["internal_error","unauthorized","invalid_request","command_unimplemented"]},"details":{"type":"string"}},"required":["type","messageId","commandId","status","reason"]}]};function validate58(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://schema.beyondallreason.dev/tachyon/autohost/addPlayer/response.json" */;let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(errors === _errs1){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((((data.type === undefined) && (missing0 = "type")) || ((data.messageId === undefined) && (missing0 = "messageId"))) || ((data.commandId === undefined) && (missing0 = "commandId"))) || ((data.status === undefined) && (missing0 = "status"))){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.type !== undefined){const _errs3 = errors;if("response" !== data.type){const err1 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/0/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data.messageId !== undefined){const _errs4 = errors;if(typeof data.messageId !== "string"){const err2 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/0/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid1 = _errs4 === errors;}else {var valid1 = true;}if(valid1){if(data.commandId !== undefined){const _errs6 = errors;if("autohost/addPlayer" !== data.commandId){const err3 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/0/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/addPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var valid1 = _errs6 === errors;}else {var valid1 = true;}if(valid1){if(data.status !== undefined){const _errs7 = errors;if("success" !== data.status){const err4 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/0/properties/status/const",keyword:"const",params:{allowedValue: "success"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var valid1 = _errs7 === errors;}else {var valid1 = true;}}}}}}else {const err5 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs8 = errors;if(errors === _errs8){if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if((((((data.type === undefined) && (missing1 = "type")) || ((data.messageId === undefined) && (missing1 = "messageId"))) || ((data.commandId === undefined) && (missing1 = "commandId"))) || ((data.status === undefined) && (missing1 = "status"))) || ((data.reason === undefined) && (missing1 = "reason"))){const err6 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {if(data.type !== undefined){const _errs10 = errors;if("response" !== data.type){const err7 = {instancePath:instancePath+"/type",schemaPath:"#/anyOf/1/properties/type/const",keyword:"const",params:{allowedValue: "response"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var valid2 = _errs10 === errors;}else {var valid2 = true;}if(valid2){if(data.messageId !== undefined){const _errs11 = errors;if(typeof data.messageId !== "string"){const err8 = {instancePath:instancePath+"/messageId",schemaPath:"#/anyOf/1/properties/messageId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var valid2 = _errs11 === errors;}else {var valid2 = true;}if(valid2){if(data.commandId !== undefined){const _errs13 = errors;if("autohost/addPlayer" !== data.commandId){const err9 = {instancePath:instancePath+"/commandId",schemaPath:"#/anyOf/1/properties/commandId/const",keyword:"const",params:{allowedValue: "autohost/addPlayer"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var valid2 = _errs13 === errors;}else {var valid2 = true;}if(valid2){if(data.status !== undefined){const _errs14 = errors;if("failed" !== data.status){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/anyOf/1/properties/status/const",keyword:"const",params:{allowedValue: "failed"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var valid2 = _errs14 === errors;}else {var valid2 = true;}if(valid2){if(data.reason !== undefined){let data8 = data.reason;const _errs15 = errors;if(!((((data8 === "internal_error") || (data8 === "unauthorized")) || (data8 === "invalid_request")) || (data8 === "command_unimplemented"))){const err11 = {instancePath:instancePath+"/reason",schemaPath:"#/anyOf/1/properties/reason/enum",keyword:"enum",params:{allowedValues: schema75.anyOf[1].properties.reason.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var valid2 = _errs15 === errors;}else {var valid2 = true;}if(valid2){if(data.details !== undefined){const _errs16 = errors;if(typeof data.details !== "string"){const err12 = {instancePath:instancePath+"/details",schemaPath:"#/anyOf/1/properties/details/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var valid2 = _errs16 === errors;}else {var valid2 = true;}}}}}}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}var _valid0 = _errs8 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;validate58.errors = vErrors;return false;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate58.errors = vErrors;return errors === 0;}export const validator = {"user/updated": {"event": user_updated_event,},"system/serverStats": {"request": system_serverStats_request,"response": system_serverStats_response,},"system/disconnect": {"request": system_disconnect_request,"response": system_disconnect_response,},"matchmaking/ready": {"request": matchmaking_ready_request,"response": matchmaking_ready_response,},"matchmaking/queueUpdate": {"event": matchmaking_queueUpdate_event,},"matchmaking/queue": {"request": matchmaking_queue_request,"response": matchmaking_queue_response,},"matchmaking/lost": {"event": matchmaking_lost_event,},"matchmaking/list": {"request": matchmaking_list_request,"response": matchmaking_list_response,},"matchmaking/foundUpdate": {"event": matchmaking_foundUpdate_event,},"matchmaking/found": {"event": matchmaking_found_event,},"matchmaking/cancelled": {"event": matchmaking_cancelled_event,},"matchmaking/cancel": {"request": matchmaking_cancel_request,"response": matchmaking_cancel_response,},"battle/start": {"request": battle_start_request,"response": battle_start_response,},"autohost/update": {"event": autohost_update_event,},"autohost/subscribeUpdates": {"request": autohost_subscribeUpdates_request,"response": autohost_subscribeUpdates_response,},"autohost/status": {"event": autohost_status_event,},"autohost/start": {"request": autohost_start_request,"response": autohost_start_response,},"autohost/specPlayers": {"request": autohost_specPlayers_request,"response": autohost_specPlayers_response,},"autohost/sendMessage": {"request": autohost_sendMessage_request,"response": autohost_sendMessage_response,},"autohost/sendCommand": {"request": autohost_sendCommand_request,"response": autohost_sendCommand_response,},"autohost/mutePlayer": {"request": autohost_mutePlayer_request,"response": autohost_mutePlayer_response,},"autohost/kill": {"request": autohost_kill_request,"response": autohost_kill_response,},"autohost/kickPlayer": {"request": autohost_kickPlayer_request,"response": autohost_kickPlayer_response,},"autohost/addPlayer": {"request": autohost_addPlayer_request,"response": autohost_addPlayer_response,},};