@rootintf/protocol-subverseinfo 1.0.13-api.2 → 2.0.3-api.4

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.
@@ -1,124 +1,1636 @@
1
1
  'use strict';
2
2
 
3
- const schema_SubverseInfo_query = validate19;function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate19.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.query === undefined) && (missing0 = "query")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate19.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.query !== undefined){let data0 = data.query;const _errs1 = errors;{if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((((data0.name === undefined) && (missing1 = "name")) || ((data0.graphql === undefined) && (missing1 = "graphql"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))){validate19.errors = [{instancePath:instancePath+"/query",schemaPath:"#/properties/query/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.name !== undefined){const _errs3 = errors;if(typeof data0.name !== "string"){validate19.errors = [{instancePath:instancePath+"/query/name",schemaPath:"#/properties/query/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data0.graphql !== undefined){const _errs5 = errors;if(typeof data0.graphql !== "string"){validate19.errors = [{instancePath:instancePath+"/query/graphql",schemaPath:"#/properties/query/properties/graphql/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid1 = _errs5 === errors;}else {var valid1 = true;}if(valid1){if(data0.ttl_msec !== undefined){let data3 = data0.ttl_msec;const _errs7 = errors;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){validate19.errors = [{instancePath:instancePath+"/query/ttl_msec",schemaPath:"#/properties/query/properties/ttl_msec/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}var valid1 = _errs7 === errors;}else {var valid1 = true;}if(valid1){if(data0.unevaluatedProperties !== undefined){var valid1 = false;validate19.errors = [{instancePath:instancePath+"/query/unevaluatedProperties",schemaPath:"#/properties/query/properties/unevaluatedProperties/false schema",keyword:"false schema",params:{},message:"boolean schema is false"}];return false;}else {var valid1 = true;}}}}}}else {validate19.errors = [{instancePath:instancePath+"/query",schemaPath:"#/properties/query/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs9 = errors;if("2" !== data.subverse_info){validate19.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs9 === 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;}validate19.evaluated = {"props":{"query":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};const schema_SubverseInfo_expanse = validate20;function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))){validate21.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.uri !== undefined){const _errs4 = errors;if(typeof data.uri !== "string"){validate21.errors = [{instancePath:instancePath+"/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.name !== undefined){const _errs6 = errors;if(typeof data.name !== "string"){validate21.errors = [{instancePath:instancePath+"/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}else {validate21.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}{if(data && typeof data == "object" && !Array.isArray(data)){if(data.favicon !== undefined){const _errs8 = errors;if(typeof data.favicon !== "string"){validate21.errors = [{instancePath:instancePath+"/favicon",schemaPath:"#/properties/favicon/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.hyperport !== undefined){let data3 = data.hyperport;const _errs10 = errors;{if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))){validate21.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.uri !== undefined){if(typeof data3.uri !== "string"){validate21.errors = [{instancePath:instancePath+"/hyperport/uri",schemaPath:"definitions#/definitions/hyperport/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate21.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.info !== undefined){let data5 = data.info;const _errs15 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate21.errors = [{instancePath:instancePath+"/info",schemaPath:"definitions#/definitions/info/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid3 = _errs15 === errors;}else {var valid3 = true;}}}}else {validate21.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate21.errors = vErrors;return errors === 0;}validate21.evaluated = {"props":{"favicon":true,"hyperport":true,"info":true,"uri":true,"name":true},"dynamicProps":false,"dynamicItems":false};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))){validate24.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.uri !== undefined){const _errs4 = errors;if(typeof data.uri !== "string"){validate24.errors = [{instancePath:instancePath+"/uri",schemaPath:"definitions#/definitions/unique-id/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.name !== undefined){const _errs6 = errors;if(typeof data.name !== "string"){validate24.errors = [{instancePath:instancePath+"/name",schemaPath:"definitions#/definitions/unique-id/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}else {validate24.errors = [{instancePath,schemaPath:"definitions#/definitions/unique-id/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}{if(data && typeof data == "object" && !Array.isArray(data)){if(data.favicon !== undefined){const _errs8 = errors;if(typeof data.favicon !== "string"){validate24.errors = [{instancePath:instancePath+"/favicon",schemaPath:"#/properties/favicon/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){if(data.hyperport !== undefined){let data3 = data.hyperport;const _errs10 = errors;{if(data3 && typeof data3 == "object" && !Array.isArray(data3)){let missing1;if(((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))){validate24.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data3.uri !== undefined){if(typeof data3.uri !== "string"){validate24.errors = [{instancePath:instancePath+"/hyperport/uri",schemaPath:"definitions#/definitions/hyperport/properties/uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}}}}else {validate24.errors = [{instancePath:instancePath+"/hyperport",schemaPath:"definitions#/definitions/hyperport/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid3 = _errs10 === errors;}else {var valid3 = true;}if(valid3){if(data.info !== undefined){let data5 = data.info;const _errs15 = errors;if(!(data5 && typeof data5 == "object" && !Array.isArray(data5))){validate24.errors = [{instancePath:instancePath+"/info",schemaPath:"definitions#/definitions/info/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}var valid3 = _errs15 === errors;}else {var valid3 = true;}}}}else {validate24.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":{"favicon":true,"hyperport":true,"info":true,"uri":true,"name":true},"dynamicProps":false,"dynamicItems":false};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate23.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(Array.isArray(data)){var valid0 = true;const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];const _errs1 = errors;if(!(validate24(data0, {instancePath:instancePath+"/" + i0,parentData:data,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){for(const key0 in data0){if(((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate23.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;}}}else {validate23.errors = [{instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;if(!valid0){break;}}}else {validate23.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}validate23.errors = vErrors;return errors === 0;}validate23.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(errors === 0){if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.expanse !== undefined){let data0 = data.expanse;const _errs1 = errors;if(errors === _errs1){if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if(((data0.subverse === undefined) && (missing1 = "subverse")) || ((data0.protocols === undefined) && (missing1 = "protocols"))){validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.subverse !== undefined){let data1 = data0.subverse;const _errs3 = errors;if(!(validate21(data1, {instancePath:instancePath+"/expanse/subverse",parentData:data0,parentDataProperty:"subverse",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}if(errors === _errs3){if(data1 && typeof data1 == "object" && !Array.isArray(data1)){if(data1["map-uri"] !== undefined){const _errs6 = errors;if(typeof data1["map-uri"] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/subverse/map-uri",schemaPath:"#/properties/expanse/properties/subverse/properties/map-uri/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid3 = _errs6 === errors;}else {var valid3 = true;}if(valid3){if(data1.instances !== undefined){const _errs8 = errors;if(!(validate23(data1.instances, {instancePath:instancePath+"/expanse/subverse/instances",parentData:data1,parentDataProperty:"instances",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}var valid3 = _errs8 === errors;}else {var valid3 = true;}if(valid3){for(const key0 in data1){if(((((((key0 !== "map-uri") && (key0 !== "instances")) && (key0 !== "favicon")) && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")){validate20.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/unevaluatedProperties",keyword:"unevaluatedProperties",params:{unevaluatedProperty: key0},message:"must NOT have unevaluated properties"}];return false;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/subverse",schemaPath:"#/properties/expanse/properties/subverse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid1 = _errs3 === errors;}else {var valid1 = true;}if(valid1){if(data0.platforms !== undefined){let data4 = data0.platforms;const _errs10 = errors;const _errs11 = errors;if(errors === _errs11){if(Array.isArray(data4)){var valid5 = true;const len0 = data4.length;for(let i0=0; i0<len0; i0++){let data5 = data4[i0];const _errs13 = errors;if(errors === _errs13){if(data5 && typeof data5 == "object" && !Array.isArray(data5)){let missing2;if((data5.id === undefined) && (missing2 = "id")){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/required",keyword:"required",params:{missingProperty: missing2},message:"must have required property '"+missing2+"'"}];return false;}else {if(data5.id !== undefined){const _errs15 = errors;if(typeof data5.id !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/id",schemaPath:"definitions#/definitions/platforms/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid6 = _errs15 === errors;}else {var valid6 = true;}if(valid6){if(data5.archs !== undefined){let data7 = data5.archs;const _errs17 = errors;if(errors === _errs17){if(Array.isArray(data7)){var valid7 = true;const len1 = data7.length;for(let i1=0; i1<len1; i1++){const _errs19 = errors;if(typeof data7[i1] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs/" + i1,schemaPath:"definitions#/definitions/platforms/items/properties/archs/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid7 = _errs19 === errors;if(!valid7){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/archs",schemaPath:"definitions#/definitions/platforms/items/properties/archs/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid6 = _errs17 === errors;}else {var valid6 = true;}if(valid6){if(data5.agents !== undefined){let data9 = data5.agents;const _errs21 = errors;if(errors === _errs21){if(Array.isArray(data9)){var valid8 = true;const len2 = data9.length;for(let i2=0; i2<len2; i2++){const _errs23 = errors;if(typeof data9[i2] !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents/" + i2,schemaPath:"definitions#/definitions/platforms/items/properties/agents/items/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid8 = _errs23 === errors;if(!valid8){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0+"/agents",schemaPath:"definitions#/definitions/platforms/items/properties/agents/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid6 = _errs21 === errors;}else {var valid6 = true;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms/" + i0,schemaPath:"definitions#/definitions/platforms/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid5 = _errs13 === errors;if(!valid5){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/platforms",schemaPath:"definitions#/definitions/platforms/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs10 === errors;}else {var valid1 = true;}if(valid1){if(data0.protocols !== undefined){let data11 = data0.protocols;const _errs25 = errors;const _errs26 = errors;if(errors === _errs26){if(Array.isArray(data11)){var valid10 = true;const len3 = data11.length;for(let i3=0; i3<len3; i3++){let data12 = data11[i3];const _errs28 = errors;if(errors === _errs28){if(data12 && typeof data12 == "object" && !Array.isArray(data12)){let missing3;if(((data12.id === undefined) && (missing3 = "id")) || ((data12.attr === undefined) && (missing3 = "attr"))){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/required",keyword:"required",params:{missingProperty: missing3},message:"must have required property '"+missing3+"'"}];return false;}else {if(data12.id !== undefined){const _errs30 = errors;if(typeof data12.id !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/id",schemaPath:"definitions#/definitions/protocols/items/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs30 === errors;}else {var valid11 = true;}if(valid11){if(data12.name !== undefined){const _errs32 = errors;if(typeof data12.name !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/name",schemaPath:"definitions#/definitions/protocols/items/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs32 === errors;}else {var valid11 = true;}if(valid11){if(data12.version !== undefined){const _errs34 = errors;if(typeof data12.version !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/version",schemaPath:"definitions#/definitions/protocols/items/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs34 === errors;}else {var valid11 = true;}if(valid11){if(data12.attr !== undefined){const _errs36 = errors;if(typeof data12.attr !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/attr",schemaPath:"definitions#/definitions/protocols/items/properties/attr/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs36 === errors;}else {var valid11 = true;}if(valid11){if(data12.url !== undefined){const _errs38 = errors;if(typeof data12.url !== "string"){validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3+"/url",schemaPath:"definitions#/definitions/protocols/items/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid11 = _errs38 === errors;}else {var valid11 = true;}}}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/protocols/" + i3,schemaPath:"definitions#/definitions/protocols/items/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid10 = _errs28 === errors;if(!valid10){break;}}}else {validate20.errors = [{instancePath:instancePath+"/expanse/protocols",schemaPath:"definitions#/definitions/protocols/type",keyword:"type",params:{type: "array"},message:"must be array"}];return false;}}var valid1 = _errs25 === errors;}else {var valid1 = true;}}}}}else {validate20.errors = [{instancePath:instancePath+"/expanse",schemaPath:"#/properties/expanse/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.subverse_info !== undefined){const _errs40 = errors;if("2" !== data.subverse_info){validate20.errors = [{instancePath:instancePath+"/subverse_info",schemaPath:"definitions#/definitions/_v/const",keyword:"const",params:{allowedValue: "2"},message:"must be equal to constant"}];return false;}var valid0 = _errs40 === 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;}validate20.evaluated = {"props":{"expanse":true,"subverse_info":true},"dynamicProps":false,"dynamicItems":false};
3
+ const schema_SubverseInfo_query = validate19;
4
+ function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate19.evaluated; if (evaluated0.dynamicProps) {
5
+ evaluated0.props = undefined;
6
+ } if (evaluated0.dynamicItems) {
7
+ evaluated0.items = undefined;
8
+ } {
9
+ if (data && typeof data == "object" && !Array.isArray(data)) {
10
+ let missing0;
11
+ if (((data.query === undefined) && (missing0 = "query")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))) {
12
+ validate19.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
13
+ return false;
14
+ }
15
+ else {
16
+ if (data.query !== undefined) {
17
+ let data0 = data.query;
18
+ const _errs1 = errors;
19
+ {
20
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
21
+ let missing1;
22
+ if ((((data0.name === undefined) && (missing1 = "name")) || ((data0.graphql === undefined) && (missing1 = "graphql"))) || ((data0.ttl_msec === undefined) && (missing1 = "ttl_msec"))) {
23
+ validate19.errors = [{ instancePath: instancePath + "/query", schemaPath: "#/properties/query/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
24
+ return false;
25
+ }
26
+ else {
27
+ if (data0.name !== undefined) {
28
+ const _errs3 = errors;
29
+ if (typeof data0.name !== "string") {
30
+ validate19.errors = [{ instancePath: instancePath + "/query/name", schemaPath: "#/properties/query/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
31
+ return false;
32
+ }
33
+ var valid1 = _errs3 === errors;
34
+ }
35
+ else {
36
+ var valid1 = true;
37
+ }
38
+ if (valid1) {
39
+ if (data0.graphql !== undefined) {
40
+ const _errs5 = errors;
41
+ if (typeof data0.graphql !== "string") {
42
+ validate19.errors = [{ instancePath: instancePath + "/query/graphql", schemaPath: "#/properties/query/properties/graphql/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
43
+ return false;
44
+ }
45
+ var valid1 = _errs5 === errors;
46
+ }
47
+ else {
48
+ var valid1 = true;
49
+ }
50
+ if (valid1) {
51
+ if (data0.ttl_msec !== undefined) {
52
+ let data3 = data0.ttl_msec;
53
+ const _errs7 = errors;
54
+ if (!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) {
55
+ validate19.errors = [{ instancePath: instancePath + "/query/ttl_msec", schemaPath: "#/properties/query/properties/ttl_msec/type", keyword: "type", params: { type: "integer" }, message: "must be integer" }];
56
+ return false;
57
+ }
58
+ var valid1 = _errs7 === errors;
59
+ }
60
+ else {
61
+ var valid1 = true;
62
+ }
63
+ if (valid1) {
64
+ if (data0.unevaluatedProperties !== undefined) {
65
+ var valid1 = false;
66
+ validate19.errors = [{ instancePath: instancePath + "/query/unevaluatedProperties", schemaPath: "#/properties/query/properties/unevaluatedProperties/false schema", keyword: "false schema", params: {}, message: "boolean schema is false" }];
67
+ return false;
68
+ }
69
+ else {
70
+ var valid1 = true;
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ else {
78
+ validate19.errors = [{ instancePath: instancePath + "/query", schemaPath: "#/properties/query/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
79
+ return false;
80
+ }
81
+ }
82
+ var valid0 = _errs1 === errors;
83
+ }
84
+ else {
85
+ var valid0 = true;
86
+ }
87
+ if (valid0) {
88
+ if (data.subverse_info !== undefined) {
89
+ const _errs9 = errors;
90
+ if ("4" !== data.subverse_info) {
91
+ validate19.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "4" }, message: "must be equal to constant" }];
92
+ return false;
93
+ }
94
+ var valid0 = _errs9 === errors;
95
+ }
96
+ else {
97
+ var valid0 = true;
98
+ }
99
+ }
100
+ }
101
+ }
102
+ else {
103
+ validate19.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
104
+ return false;
105
+ }
106
+ } validate19.errors = vErrors; return errors === 0; }
107
+ validate19.evaluated = { "props": { "query": true, "subverse_info": true }, "dynamicProps": false, "dynamicItems": false };
108
+ const schema_SubverseInfo_subverse = validate20;
109
+ function validate21(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate21.evaluated; if (evaluated0.dynamicProps) {
110
+ evaluated0.props = undefined;
111
+ } if (evaluated0.dynamicItems) {
112
+ evaluated0.items = undefined;
113
+ } {
114
+ if (data && typeof data == "object" && !Array.isArray(data)) {
115
+ let missing0;
116
+ if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
117
+ validate21.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
118
+ return false;
119
+ }
120
+ else {
121
+ if (data.uri !== undefined) {
122
+ const _errs4 = errors;
123
+ if (typeof data.uri !== "string") {
124
+ validate21.errors = [{ instancePath: instancePath + "/uri", schemaPath: "definitions#/definitions/unique-id/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
125
+ return false;
126
+ }
127
+ var valid2 = _errs4 === errors;
128
+ }
129
+ else {
130
+ var valid2 = true;
131
+ }
132
+ if (valid2) {
133
+ if (data.name !== undefined) {
134
+ const _errs6 = errors;
135
+ if (typeof data.name !== "string") {
136
+ validate21.errors = [{ instancePath: instancePath + "/name", schemaPath: "definitions#/definitions/unique-id/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
137
+ return false;
138
+ }
139
+ var valid2 = _errs6 === errors;
140
+ }
141
+ else {
142
+ var valid2 = true;
143
+ }
144
+ }
145
+ }
146
+ }
147
+ else {
148
+ validate21.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
149
+ return false;
150
+ }
151
+ } {
152
+ if (data && typeof data == "object" && !Array.isArray(data)) {
153
+ if (data.favicon !== undefined) {
154
+ const _errs8 = errors;
155
+ if (typeof data.favicon !== "string") {
156
+ validate21.errors = [{ instancePath: instancePath + "/favicon", schemaPath: "#/properties/favicon/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
157
+ return false;
158
+ }
159
+ var valid3 = _errs8 === errors;
160
+ }
161
+ else {
162
+ var valid3 = true;
163
+ }
164
+ if (valid3) {
165
+ if (data.hyperport !== undefined) {
166
+ let data3 = data.hyperport;
167
+ const _errs10 = errors;
168
+ {
169
+ if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
170
+ let missing1;
171
+ if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
172
+ validate21.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
173
+ return false;
174
+ }
175
+ else {
176
+ if (data3.uri !== undefined) {
177
+ if (typeof data3.uri !== "string") {
178
+ validate21.errors = [{ instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
179
+ return false;
180
+ }
181
+ }
182
+ }
183
+ }
184
+ else {
185
+ validate21.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
186
+ return false;
187
+ }
188
+ }
189
+ var valid3 = _errs10 === errors;
190
+ }
191
+ else {
192
+ var valid3 = true;
193
+ }
194
+ if (valid3) {
195
+ if (data.info !== undefined) {
196
+ let data5 = data.info;
197
+ const _errs15 = errors;
198
+ if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
199
+ validate21.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
200
+ return false;
201
+ }
202
+ var valid3 = _errs15 === errors;
203
+ }
204
+ else {
205
+ var valid3 = true;
206
+ }
207
+ }
208
+ }
209
+ }
210
+ else {
211
+ validate21.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
212
+ return false;
213
+ }
214
+ } validate21.errors = vErrors; return errors === 0; }
215
+ validate21.evaluated = { "props": { "favicon": true, "hyperport": true, "info": true, "uri": true, "name": true }, "dynamicProps": false, "dynamicItems": false };
216
+ function validate24(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate24.evaluated; if (evaluated0.dynamicProps) {
217
+ evaluated0.props = undefined;
218
+ } if (evaluated0.dynamicItems) {
219
+ evaluated0.items = undefined;
220
+ } {
221
+ if (data && typeof data == "object" && !Array.isArray(data)) {
222
+ let missing0;
223
+ if (((data.uri === undefined) && (missing0 = "uri")) || ((data.name === undefined) && (missing0 = "name"))) {
224
+ validate24.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
225
+ return false;
226
+ }
227
+ else {
228
+ if (data.uri !== undefined) {
229
+ const _errs4 = errors;
230
+ if (typeof data.uri !== "string") {
231
+ validate24.errors = [{ instancePath: instancePath + "/uri", schemaPath: "definitions#/definitions/unique-id/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
232
+ return false;
233
+ }
234
+ var valid2 = _errs4 === errors;
235
+ }
236
+ else {
237
+ var valid2 = true;
238
+ }
239
+ if (valid2) {
240
+ if (data.name !== undefined) {
241
+ const _errs6 = errors;
242
+ if (typeof data.name !== "string") {
243
+ validate24.errors = [{ instancePath: instancePath + "/name", schemaPath: "definitions#/definitions/unique-id/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
244
+ return false;
245
+ }
246
+ var valid2 = _errs6 === errors;
247
+ }
248
+ else {
249
+ var valid2 = true;
250
+ }
251
+ }
252
+ }
253
+ }
254
+ else {
255
+ validate24.errors = [{ instancePath, schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
256
+ return false;
257
+ }
258
+ } {
259
+ if (data && typeof data == "object" && !Array.isArray(data)) {
260
+ if (data.favicon !== undefined) {
261
+ const _errs8 = errors;
262
+ if (typeof data.favicon !== "string") {
263
+ validate24.errors = [{ instancePath: instancePath + "/favicon", schemaPath: "#/properties/favicon/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
264
+ return false;
265
+ }
266
+ var valid3 = _errs8 === errors;
267
+ }
268
+ else {
269
+ var valid3 = true;
270
+ }
271
+ if (valid3) {
272
+ if (data.hyperport !== undefined) {
273
+ let data3 = data.hyperport;
274
+ const _errs10 = errors;
275
+ {
276
+ if (data3 && typeof data3 == "object" && !Array.isArray(data3)) {
277
+ let missing1;
278
+ if (((data3.uri === undefined) && (missing1 = "uri")) || ((data3.port === undefined) && (missing1 = "port"))) {
279
+ validate24.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
280
+ return false;
281
+ }
282
+ else {
283
+ if (data3.uri !== undefined) {
284
+ if (typeof data3.uri !== "string") {
285
+ validate24.errors = [{ instancePath: instancePath + "/hyperport/uri", schemaPath: "definitions#/definitions/hyperport/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
286
+ return false;
287
+ }
288
+ }
289
+ }
290
+ }
291
+ else {
292
+ validate24.errors = [{ instancePath: instancePath + "/hyperport", schemaPath: "definitions#/definitions/hyperport/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
293
+ return false;
294
+ }
295
+ }
296
+ var valid3 = _errs10 === errors;
297
+ }
298
+ else {
299
+ var valid3 = true;
300
+ }
301
+ if (valid3) {
302
+ if (data.info !== undefined) {
303
+ let data5 = data.info;
304
+ const _errs15 = errors;
305
+ if (!(data5 && typeof data5 == "object" && !Array.isArray(data5))) {
306
+ validate24.errors = [{ instancePath: instancePath + "/info", schemaPath: "definitions#/definitions/info/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
307
+ return false;
308
+ }
309
+ var valid3 = _errs15 === errors;
310
+ }
311
+ else {
312
+ var valid3 = true;
313
+ }
314
+ }
315
+ }
316
+ }
317
+ else {
318
+ validate24.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
319
+ return false;
320
+ }
321
+ } validate24.errors = vErrors; return errors === 0; }
322
+ validate24.evaluated = { "props": { "favicon": true, "hyperport": true, "info": true, "uri": true, "name": true }, "dynamicProps": false, "dynamicItems": false };
323
+ function validate23(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate23.evaluated; if (evaluated0.dynamicProps) {
324
+ evaluated0.props = undefined;
325
+ } if (evaluated0.dynamicItems) {
326
+ evaluated0.items = undefined;
327
+ } if (errors === 0) {
328
+ if (Array.isArray(data)) {
329
+ var valid0 = true;
330
+ const len0 = data.length;
331
+ for (let i0 = 0; i0 < len0; i0++) {
332
+ let data0 = data[i0];
333
+ const _errs1 = errors;
334
+ if (!(validate24(data0, { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData, dynamicAnchors }))) {
335
+ vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);
336
+ errors = vErrors.length;
337
+ }
338
+ if (errors === _errs1) {
339
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
340
+ for (const key0 in data0) {
341
+ if (((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")) {
342
+ validate23.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
343
+ return false;
344
+ }
345
+ }
346
+ }
347
+ else {
348
+ validate23.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
349
+ return false;
350
+ }
351
+ }
352
+ var valid0 = _errs1 === errors;
353
+ if (!valid0) {
354
+ break;
355
+ }
356
+ }
357
+ }
358
+ else {
359
+ validate23.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
360
+ return false;
361
+ }
362
+ } validate23.errors = vErrors; return errors === 0; }
363
+ validate23.evaluated = { "items": true, "dynamicProps": false, "dynamicItems": false };
364
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate20.evaluated; if (evaluated0.dynamicProps) {
365
+ evaluated0.props = undefined;
366
+ } if (evaluated0.dynamicItems) {
367
+ evaluated0.items = undefined;
368
+ } if (errors === 0) {
369
+ if (data && typeof data == "object" && !Array.isArray(data)) {
370
+ let missing0;
371
+ if (((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))) {
372
+ validate20.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
373
+ return false;
374
+ }
375
+ else {
376
+ if (data.expanse !== undefined) {
377
+ let data0 = data.expanse;
378
+ const _errs1 = errors;
379
+ const _errs3 = errors;
380
+ const _errs4 = errors;
381
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
382
+ if ((data0.instances === undefined) && ("instances")) {
383
+ const err0 = {};
384
+ if (vErrors === null) {
385
+ vErrors = [err0];
386
+ }
387
+ else {
388
+ vErrors.push(err0);
389
+ }
390
+ errors++;
391
+ }
392
+ }
393
+ var valid1 = _errs4 === errors;
394
+ if (valid1) {
395
+ validate20.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/not", keyword: "not", params: {}, message: "must NOT be valid" }];
396
+ return false;
397
+ }
398
+ else {
399
+ errors = _errs3;
400
+ if (vErrors !== null) {
401
+ if (_errs3) {
402
+ vErrors.length = _errs3;
403
+ }
404
+ else {
405
+ vErrors = null;
406
+ }
407
+ }
408
+ }
409
+ if (errors === _errs1) {
410
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
411
+ let missing2;
412
+ if (((data0.subverse === undefined) && (missing2 = "subverse")) || ((data0.protocols === undefined) && (missing2 = "protocols"))) {
413
+ validate20.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
414
+ return false;
415
+ }
416
+ else {
417
+ if (data0.subverse !== undefined) {
418
+ let data1 = data0.subverse;
419
+ const _errs5 = errors;
420
+ if (!(validate21(data1, { instancePath: instancePath + "/expanse/subverse", parentData: data0, parentDataProperty: "subverse", rootData, dynamicAnchors }))) {
421
+ vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);
422
+ errors = vErrors.length;
423
+ }
424
+ if (errors === _errs5) {
425
+ if (data1 && typeof data1 == "object" && !Array.isArray(data1)) {
426
+ if (data1["map-uri"] !== undefined) {
427
+ const _errs8 = errors;
428
+ if (typeof data1["map-uri"] !== "string") {
429
+ validate20.errors = [{ instancePath: instancePath + "/expanse/subverse/map-uri", schemaPath: "#/properties/expanse/properties/subverse/properties/map-uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
430
+ return false;
431
+ }
432
+ var valid4 = _errs8 === errors;
433
+ }
434
+ else {
435
+ var valid4 = true;
436
+ }
437
+ if (valid4) {
438
+ if (data1.instances !== undefined) {
439
+ const _errs10 = errors;
440
+ if (!(validate23(data1.instances, { instancePath: instancePath + "/expanse/subverse/instances", parentData: data1, parentDataProperty: "instances", rootData, dynamicAnchors }))) {
441
+ vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);
442
+ errors = vErrors.length;
443
+ }
444
+ var valid4 = _errs10 === errors;
445
+ }
446
+ else {
447
+ var valid4 = true;
448
+ }
449
+ if (valid4) {
450
+ for (const key0 in data1) {
451
+ if (((((((key0 !== "map-uri") && (key0 !== "instances")) && (key0 !== "favicon")) && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")) {
452
+ validate20.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
453
+ return false;
454
+ }
455
+ }
456
+ }
457
+ }
458
+ }
459
+ else {
460
+ validate20.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
461
+ return false;
462
+ }
463
+ }
464
+ var valid2 = _errs5 === errors;
465
+ }
466
+ else {
467
+ var valid2 = true;
468
+ }
469
+ if (valid2) {
470
+ if (data0.platforms !== undefined) {
471
+ let data4 = data0.platforms;
472
+ const _errs12 = errors;
473
+ const _errs13 = errors;
474
+ if (errors === _errs13) {
475
+ if (Array.isArray(data4)) {
476
+ var valid6 = true;
477
+ const len0 = data4.length;
478
+ for (let i0 = 0; i0 < len0; i0++) {
479
+ let data5 = data4[i0];
480
+ const _errs15 = errors;
481
+ if (errors === _errs15) {
482
+ if (data5 && typeof data5 == "object" && !Array.isArray(data5)) {
483
+ let missing3;
484
+ if ((data5.id === undefined) && (missing3 = "id")) {
485
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
486
+ return false;
487
+ }
488
+ else {
489
+ if (data5.id !== undefined) {
490
+ const _errs17 = errors;
491
+ if (typeof data5.id !== "string") {
492
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/id", schemaPath: "definitions#/definitions/platforms/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
493
+ return false;
494
+ }
495
+ var valid7 = _errs17 === errors;
496
+ }
497
+ else {
498
+ var valid7 = true;
499
+ }
500
+ if (valid7) {
501
+ if (data5.archs !== undefined) {
502
+ let data7 = data5.archs;
503
+ const _errs19 = errors;
504
+ if (errors === _errs19) {
505
+ if (Array.isArray(data7)) {
506
+ var valid8 = true;
507
+ const len1 = data7.length;
508
+ for (let i1 = 0; i1 < len1; i1++) {
509
+ const _errs21 = errors;
510
+ if (typeof data7[i1] !== "string") {
511
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/archs/" + i1, schemaPath: "definitions#/definitions/platforms/items/properties/archs/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
512
+ return false;
513
+ }
514
+ var valid8 = _errs21 === errors;
515
+ if (!valid8) {
516
+ break;
517
+ }
518
+ }
519
+ }
520
+ else {
521
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/archs", schemaPath: "definitions#/definitions/platforms/items/properties/archs/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
522
+ return false;
523
+ }
524
+ }
525
+ var valid7 = _errs19 === errors;
526
+ }
527
+ else {
528
+ var valid7 = true;
529
+ }
530
+ if (valid7) {
531
+ if (data5.agents !== undefined) {
532
+ let data9 = data5.agents;
533
+ const _errs23 = errors;
534
+ if (errors === _errs23) {
535
+ if (Array.isArray(data9)) {
536
+ var valid9 = true;
537
+ const len2 = data9.length;
538
+ for (let i2 = 0; i2 < len2; i2++) {
539
+ const _errs25 = errors;
540
+ if (typeof data9[i2] !== "string") {
541
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/agents/" + i2, schemaPath: "definitions#/definitions/platforms/items/properties/agents/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
542
+ return false;
543
+ }
544
+ var valid9 = _errs25 === errors;
545
+ if (!valid9) {
546
+ break;
547
+ }
548
+ }
549
+ }
550
+ else {
551
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/agents", schemaPath: "definitions#/definitions/platforms/items/properties/agents/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
552
+ return false;
553
+ }
554
+ }
555
+ var valid7 = _errs23 === errors;
556
+ }
557
+ else {
558
+ var valid7 = true;
559
+ }
560
+ }
561
+ }
562
+ }
563
+ }
564
+ else {
565
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
566
+ return false;
567
+ }
568
+ }
569
+ var valid6 = _errs15 === errors;
570
+ if (!valid6) {
571
+ break;
572
+ }
573
+ }
574
+ }
575
+ else {
576
+ validate20.errors = [{ instancePath: instancePath + "/expanse/platforms", schemaPath: "definitions#/definitions/platforms/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
577
+ return false;
578
+ }
579
+ }
580
+ var valid2 = _errs12 === errors;
581
+ }
582
+ else {
583
+ var valid2 = true;
584
+ }
585
+ if (valid2) {
586
+ if (data0.protocols !== undefined) {
587
+ let data11 = data0.protocols;
588
+ const _errs27 = errors;
589
+ const _errs28 = errors;
590
+ if (errors === _errs28) {
591
+ if (Array.isArray(data11)) {
592
+ var valid11 = true;
593
+ const len3 = data11.length;
594
+ for (let i3 = 0; i3 < len3; i3++) {
595
+ let data12 = data11[i3];
596
+ const _errs30 = errors;
597
+ if (errors === _errs30) {
598
+ if (data12 && typeof data12 == "object" && !Array.isArray(data12)) {
599
+ let missing4;
600
+ if (((data12.id === undefined) && (missing4 = "id")) || ((data12.attr === undefined) && (missing4 = "attr"))) {
601
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" }];
602
+ return false;
603
+ }
604
+ else {
605
+ if (data12.id !== undefined) {
606
+ const _errs32 = errors;
607
+ if (typeof data12.id !== "string") {
608
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/id", schemaPath: "definitions#/definitions/protocols/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
609
+ return false;
610
+ }
611
+ var valid12 = _errs32 === errors;
612
+ }
613
+ else {
614
+ var valid12 = true;
615
+ }
616
+ if (valid12) {
617
+ if (data12.name !== undefined) {
618
+ const _errs34 = errors;
619
+ if (typeof data12.name !== "string") {
620
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/name", schemaPath: "definitions#/definitions/protocols/items/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
621
+ return false;
622
+ }
623
+ var valid12 = _errs34 === errors;
624
+ }
625
+ else {
626
+ var valid12 = true;
627
+ }
628
+ if (valid12) {
629
+ if (data12.version !== undefined) {
630
+ const _errs36 = errors;
631
+ if (typeof data12.version !== "string") {
632
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/version", schemaPath: "definitions#/definitions/protocols/items/properties/version/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
633
+ return false;
634
+ }
635
+ var valid12 = _errs36 === errors;
636
+ }
637
+ else {
638
+ var valid12 = true;
639
+ }
640
+ if (valid12) {
641
+ if (data12.attr !== undefined) {
642
+ const _errs38 = errors;
643
+ if (typeof data12.attr !== "string") {
644
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/attr", schemaPath: "definitions#/definitions/protocols/items/properties/attr/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
645
+ return false;
646
+ }
647
+ var valid12 = _errs38 === errors;
648
+ }
649
+ else {
650
+ var valid12 = true;
651
+ }
652
+ if (valid12) {
653
+ if (data12.url !== undefined) {
654
+ const _errs40 = errors;
655
+ if (typeof data12.url !== "string") {
656
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/url", schemaPath: "definitions#/definitions/protocols/items/properties/url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
657
+ return false;
658
+ }
659
+ var valid12 = _errs40 === errors;
660
+ }
661
+ else {
662
+ var valid12 = true;
663
+ }
664
+ }
665
+ }
666
+ }
667
+ }
668
+ }
669
+ }
670
+ else {
671
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
672
+ return false;
673
+ }
674
+ }
675
+ var valid11 = _errs30 === errors;
676
+ if (!valid11) {
677
+ break;
678
+ }
679
+ }
680
+ }
681
+ else {
682
+ validate20.errors = [{ instancePath: instancePath + "/expanse/protocols", schemaPath: "definitions#/definitions/protocols/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
683
+ return false;
684
+ }
685
+ }
686
+ var valid2 = _errs27 === errors;
687
+ }
688
+ else {
689
+ var valid2 = true;
690
+ }
691
+ }
692
+ }
693
+ }
694
+ }
695
+ else {
696
+ validate20.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
697
+ return false;
698
+ }
699
+ }
700
+ var valid0 = _errs1 === errors;
701
+ }
702
+ else {
703
+ var valid0 = true;
704
+ }
705
+ if (valid0) {
706
+ if (data.subverse_info !== undefined) {
707
+ const _errs42 = errors;
708
+ if ("4" !== data.subverse_info) {
709
+ validate20.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "4" }, message: "must be equal to constant" }];
710
+ return false;
711
+ }
712
+ var valid0 = _errs42 === errors;
713
+ }
714
+ else {
715
+ var valid0 = true;
716
+ }
717
+ }
718
+ }
719
+ }
720
+ else {
721
+ validate20.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
722
+ return false;
723
+ }
724
+ } validate20.errors = vErrors; return errors === 0; }
725
+ validate20.evaluated = { "props": { "expanse": true, "subverse_info": true }, "dynamicProps": false, "dynamicItems": false };
726
+ const schema_SubverseInfo_instances = validate27;
727
+ function validate28(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate28.evaluated; if (evaluated0.dynamicProps) {
728
+ evaluated0.props = undefined;
729
+ } if (evaluated0.dynamicItems) {
730
+ evaluated0.items = undefined;
731
+ } if (errors === 0) {
732
+ if (Array.isArray(data)) {
733
+ var valid0 = true;
734
+ const len0 = data.length;
735
+ for (let i0 = 0; i0 < len0; i0++) {
736
+ let data0 = data[i0];
737
+ const _errs1 = errors;
738
+ if (!(validate24(data0, { instancePath: instancePath + "/" + i0, parentData: data, parentDataProperty: i0, rootData, dynamicAnchors }))) {
739
+ vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);
740
+ errors = vErrors.length;
741
+ }
742
+ if (errors === _errs1) {
743
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
744
+ for (const key0 in data0) {
745
+ if (((((key0 !== "favicon") && (key0 !== "hyperport")) && (key0 !== "info")) && (key0 !== "uri")) && (key0 !== "name")) {
746
+ validate28.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
747
+ return false;
748
+ }
749
+ }
750
+ }
751
+ else {
752
+ validate28.errors = [{ instancePath: instancePath + "/" + i0, schemaPath: "#/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
753
+ return false;
754
+ }
755
+ }
756
+ var valid0 = _errs1 === errors;
757
+ if (!valid0) {
758
+ break;
759
+ }
760
+ }
761
+ }
762
+ else {
763
+ validate28.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
764
+ return false;
765
+ }
766
+ } validate28.errors = vErrors; return errors === 0; }
767
+ validate28.evaluated = { "items": true, "dynamicProps": false, "dynamicItems": false };
768
+ function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate27.evaluated; if (evaluated0.dynamicProps) {
769
+ evaluated0.props = undefined;
770
+ } if (evaluated0.dynamicItems) {
771
+ evaluated0.items = undefined;
772
+ } if (errors === 0) {
773
+ if (data && typeof data == "object" && !Array.isArray(data)) {
774
+ let missing0;
775
+ if (((data.expanse === undefined) && (missing0 = "expanse")) || ((data.subverse_info === undefined) && (missing0 = "subverse_info"))) {
776
+ validate27.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
777
+ return false;
778
+ }
779
+ else {
780
+ if (data.expanse !== undefined) {
781
+ let data0 = data.expanse;
782
+ const _errs1 = errors;
783
+ if (errors === _errs1) {
784
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
785
+ let missing1;
786
+ if ((data0.instances === undefined) && (missing1 = "instances")) {
787
+ validate27.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
788
+ return false;
789
+ }
790
+ else {
791
+ if (data0.instances !== undefined) {
792
+ const _errs3 = errors;
793
+ if (!(validate28(data0.instances, { instancePath: instancePath + "/expanse/instances", parentData: data0, parentDataProperty: "instances", rootData, dynamicAnchors }))) {
794
+ vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);
795
+ errors = vErrors.length;
796
+ }
797
+ var valid1 = _errs3 === errors;
798
+ }
799
+ else {
800
+ var valid1 = true;
801
+ }
802
+ if (valid1) {
803
+ if (data0.subverse !== undefined) {
804
+ let data2 = data0.subverse;
805
+ const _errs4 = errors;
806
+ const _errs7 = errors;
807
+ if (errors === _errs7) {
808
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
809
+ let missing2;
810
+ if (((data2.uri === undefined) && (missing2 = "uri")) || ((data2.name === undefined) && (missing2 = "name"))) {
811
+ validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "definitions#/definitions/unique-id/required", keyword: "required", params: { missingProperty: missing2 }, message: "must have required property '" + missing2 + "'" }];
812
+ return false;
813
+ }
814
+ else {
815
+ if (data2.uri !== undefined) {
816
+ const _errs9 = errors;
817
+ if (typeof data2.uri !== "string") {
818
+ validate27.errors = [{ instancePath: instancePath + "/expanse/subverse/uri", schemaPath: "definitions#/definitions/unique-id/properties/uri/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
819
+ return false;
820
+ }
821
+ var valid4 = _errs9 === errors;
822
+ }
823
+ else {
824
+ var valid4 = true;
825
+ }
826
+ if (valid4) {
827
+ if (data2.name !== undefined) {
828
+ const _errs11 = errors;
829
+ if (typeof data2.name !== "string") {
830
+ validate27.errors = [{ instancePath: instancePath + "/expanse/subverse/name", schemaPath: "definitions#/definitions/unique-id/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
831
+ return false;
832
+ }
833
+ var valid4 = _errs11 === errors;
834
+ }
835
+ else {
836
+ var valid4 = true;
837
+ }
838
+ }
839
+ }
840
+ }
841
+ else {
842
+ validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "definitions#/definitions/unique-id/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
843
+ return false;
844
+ }
845
+ }
846
+ if (errors === _errs4) {
847
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
848
+ for (const key0 in data2) {
849
+ if ((key0 !== "uri") && (key0 !== "name")) {
850
+ validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/unevaluatedProperties", keyword: "unevaluatedProperties", params: { unevaluatedProperty: key0 }, message: "must NOT have unevaluated properties" }];
851
+ return false;
852
+ }
853
+ }
854
+ }
855
+ else {
856
+ validate27.errors = [{ instancePath: instancePath + "/expanse/subverse", schemaPath: "#/properties/expanse/properties/subverse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
857
+ return false;
858
+ }
859
+ }
860
+ var valid1 = _errs4 === errors;
861
+ }
862
+ else {
863
+ var valid1 = true;
864
+ }
865
+ if (valid1) {
866
+ if (data0.platforms !== undefined) {
867
+ let data5 = data0.platforms;
868
+ const _errs14 = errors;
869
+ const _errs15 = errors;
870
+ if (errors === _errs15) {
871
+ if (Array.isArray(data5)) {
872
+ var valid6 = true;
873
+ const len0 = data5.length;
874
+ for (let i0 = 0; i0 < len0; i0++) {
875
+ let data6 = data5[i0];
876
+ const _errs17 = errors;
877
+ if (errors === _errs17) {
878
+ if (data6 && typeof data6 == "object" && !Array.isArray(data6)) {
879
+ let missing3;
880
+ if ((data6.id === undefined) && (missing3 = "id")) {
881
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/required", keyword: "required", params: { missingProperty: missing3 }, message: "must have required property '" + missing3 + "'" }];
882
+ return false;
883
+ }
884
+ else {
885
+ if (data6.id !== undefined) {
886
+ const _errs19 = errors;
887
+ if (typeof data6.id !== "string") {
888
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/id", schemaPath: "definitions#/definitions/platforms/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
889
+ return false;
890
+ }
891
+ var valid7 = _errs19 === errors;
892
+ }
893
+ else {
894
+ var valid7 = true;
895
+ }
896
+ if (valid7) {
897
+ if (data6.archs !== undefined) {
898
+ let data8 = data6.archs;
899
+ const _errs21 = errors;
900
+ if (errors === _errs21) {
901
+ if (Array.isArray(data8)) {
902
+ var valid8 = true;
903
+ const len1 = data8.length;
904
+ for (let i1 = 0; i1 < len1; i1++) {
905
+ const _errs23 = errors;
906
+ if (typeof data8[i1] !== "string") {
907
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/archs/" + i1, schemaPath: "definitions#/definitions/platforms/items/properties/archs/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
908
+ return false;
909
+ }
910
+ var valid8 = _errs23 === errors;
911
+ if (!valid8) {
912
+ break;
913
+ }
914
+ }
915
+ }
916
+ else {
917
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/archs", schemaPath: "definitions#/definitions/platforms/items/properties/archs/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
918
+ return false;
919
+ }
920
+ }
921
+ var valid7 = _errs21 === errors;
922
+ }
923
+ else {
924
+ var valid7 = true;
925
+ }
926
+ if (valid7) {
927
+ if (data6.agents !== undefined) {
928
+ let data10 = data6.agents;
929
+ const _errs25 = errors;
930
+ if (errors === _errs25) {
931
+ if (Array.isArray(data10)) {
932
+ var valid9 = true;
933
+ const len2 = data10.length;
934
+ for (let i2 = 0; i2 < len2; i2++) {
935
+ const _errs27 = errors;
936
+ if (typeof data10[i2] !== "string") {
937
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/agents/" + i2, schemaPath: "definitions#/definitions/platforms/items/properties/agents/items/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
938
+ return false;
939
+ }
940
+ var valid9 = _errs27 === errors;
941
+ if (!valid9) {
942
+ break;
943
+ }
944
+ }
945
+ }
946
+ else {
947
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0 + "/agents", schemaPath: "definitions#/definitions/platforms/items/properties/agents/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
948
+ return false;
949
+ }
950
+ }
951
+ var valid7 = _errs25 === errors;
952
+ }
953
+ else {
954
+ var valid7 = true;
955
+ }
956
+ }
957
+ }
958
+ }
959
+ }
960
+ else {
961
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms/" + i0, schemaPath: "definitions#/definitions/platforms/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
962
+ return false;
963
+ }
964
+ }
965
+ var valid6 = _errs17 === errors;
966
+ if (!valid6) {
967
+ break;
968
+ }
969
+ }
970
+ }
971
+ else {
972
+ validate27.errors = [{ instancePath: instancePath + "/expanse/platforms", schemaPath: "definitions#/definitions/platforms/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
973
+ return false;
974
+ }
975
+ }
976
+ var valid1 = _errs14 === errors;
977
+ }
978
+ else {
979
+ var valid1 = true;
980
+ }
981
+ if (valid1) {
982
+ if (data0.protocols !== undefined) {
983
+ let data12 = data0.protocols;
984
+ const _errs29 = errors;
985
+ const _errs30 = errors;
986
+ if (errors === _errs30) {
987
+ if (Array.isArray(data12)) {
988
+ var valid11 = true;
989
+ const len3 = data12.length;
990
+ for (let i3 = 0; i3 < len3; i3++) {
991
+ let data13 = data12[i3];
992
+ const _errs32 = errors;
993
+ if (errors === _errs32) {
994
+ if (data13 && typeof data13 == "object" && !Array.isArray(data13)) {
995
+ let missing4;
996
+ if (((data13.id === undefined) && (missing4 = "id")) || ((data13.attr === undefined) && (missing4 = "attr"))) {
997
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/required", keyword: "required", params: { missingProperty: missing4 }, message: "must have required property '" + missing4 + "'" }];
998
+ return false;
999
+ }
1000
+ else {
1001
+ if (data13.id !== undefined) {
1002
+ const _errs34 = errors;
1003
+ if (typeof data13.id !== "string") {
1004
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/id", schemaPath: "definitions#/definitions/protocols/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1005
+ return false;
1006
+ }
1007
+ var valid12 = _errs34 === errors;
1008
+ }
1009
+ else {
1010
+ var valid12 = true;
1011
+ }
1012
+ if (valid12) {
1013
+ if (data13.name !== undefined) {
1014
+ const _errs36 = errors;
1015
+ if (typeof data13.name !== "string") {
1016
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/name", schemaPath: "definitions#/definitions/protocols/items/properties/name/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1017
+ return false;
1018
+ }
1019
+ var valid12 = _errs36 === errors;
1020
+ }
1021
+ else {
1022
+ var valid12 = true;
1023
+ }
1024
+ if (valid12) {
1025
+ if (data13.version !== undefined) {
1026
+ const _errs38 = errors;
1027
+ if (typeof data13.version !== "string") {
1028
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/version", schemaPath: "definitions#/definitions/protocols/items/properties/version/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1029
+ return false;
1030
+ }
1031
+ var valid12 = _errs38 === errors;
1032
+ }
1033
+ else {
1034
+ var valid12 = true;
1035
+ }
1036
+ if (valid12) {
1037
+ if (data13.attr !== undefined) {
1038
+ const _errs40 = errors;
1039
+ if (typeof data13.attr !== "string") {
1040
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/attr", schemaPath: "definitions#/definitions/protocols/items/properties/attr/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1041
+ return false;
1042
+ }
1043
+ var valid12 = _errs40 === errors;
1044
+ }
1045
+ else {
1046
+ var valid12 = true;
1047
+ }
1048
+ if (valid12) {
1049
+ if (data13.url !== undefined) {
1050
+ const _errs42 = errors;
1051
+ if (typeof data13.url !== "string") {
1052
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3 + "/url", schemaPath: "definitions#/definitions/protocols/items/properties/url/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1053
+ return false;
1054
+ }
1055
+ var valid12 = _errs42 === errors;
1056
+ }
1057
+ else {
1058
+ var valid12 = true;
1059
+ }
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ else {
1067
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols/" + i3, schemaPath: "definitions#/definitions/protocols/items/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1068
+ return false;
1069
+ }
1070
+ }
1071
+ var valid11 = _errs32 === errors;
1072
+ if (!valid11) {
1073
+ break;
1074
+ }
1075
+ }
1076
+ }
1077
+ else {
1078
+ validate27.errors = [{ instancePath: instancePath + "/expanse/protocols", schemaPath: "definitions#/definitions/protocols/type", keyword: "type", params: { type: "array" }, message: "must be array" }];
1079
+ return false;
1080
+ }
1081
+ }
1082
+ var valid1 = _errs29 === errors;
1083
+ }
1084
+ else {
1085
+ var valid1 = true;
1086
+ }
1087
+ }
1088
+ }
1089
+ }
1090
+ }
1091
+ }
1092
+ else {
1093
+ validate27.errors = [{ instancePath: instancePath + "/expanse", schemaPath: "#/properties/expanse/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1094
+ return false;
1095
+ }
1096
+ }
1097
+ var valid0 = _errs1 === errors;
1098
+ }
1099
+ else {
1100
+ var valid0 = true;
1101
+ }
1102
+ if (valid0) {
1103
+ if (data.subverse_info !== undefined) {
1104
+ const _errs44 = errors;
1105
+ if ("4" !== data.subverse_info) {
1106
+ validate27.errors = [{ instancePath: instancePath + "/subverse_info", schemaPath: "definitions#/definitions/_v/const", keyword: "const", params: { allowedValue: "4" }, message: "must be equal to constant" }];
1107
+ return false;
1108
+ }
1109
+ var valid0 = _errs44 === errors;
1110
+ }
1111
+ else {
1112
+ var valid0 = true;
1113
+ }
1114
+ }
1115
+ }
1116
+ }
1117
+ else {
1118
+ validate27.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1119
+ return false;
1120
+ }
1121
+ } validate27.errors = vErrors; return errors === 0; }
1122
+ validate27.evaluated = { "props": { "expanse": true, "subverse_info": true }, "dynamicProps": false, "dynamicItems": false };
4
1123
 
1124
+ // https://stackoverflow.com/questions/4602141/variable-name-as-a-string-in-javascript
5
1125
  // console.log('OUT', __name({variableName}) );
6
-
7
-
1126
+ //-------------------------------------------------------------------------------------------------
1127
+ function l_length_(obj_labels) {
1128
+ if (!obj_labels || typeof obj_labels !== 'object')
1129
+ throw new Error('obj_labels must be an object');
1130
+ const obj_1label = Object.values(obj_labels);
1131
+ if (!obj_1label.every(v => typeof v === 'number' && Number.isFinite(v)))
1132
+ throw new Error('All values must be finite numbers');
1133
+ const labels = Object.values(obj_labels);
1134
+ if (labels.length === 0)
1135
+ return 1; // Empty object case, start at 1
1136
+ const value_max = Math.max(...labels);
1137
+ if (value_max <= 0)
1138
+ return 1;
1139
+ const bit_highest = Math.floor(Math.log2(value_max));
1140
+ return 1 << (bit_highest + 1);
1141
+ }
1142
+ function l_array_(arr_labels, start = 1) {
1143
+ if (!Array.isArray(arr_labels))
1144
+ throw new Error('arr_labels must be an array');
1145
+ if (!Number.isSafeInteger(start) || start < 0)
1146
+ throw new Error('start must be a safe, non-negative integer');
1147
+ return Object.freeze(arr_labels.reduce((acc, key, index) => {
1148
+ acc[key] = start << index;
1149
+ return acc;
1150
+ }, {}));
1151
+ }
1152
+ function l_concat_(obj_labels, arg) {
1153
+ if (!obj_labels || typeof obj_labels !== 'object')
1154
+ throw new Error('obj_labels must be an object');
1155
+ const obj_1label = Object.values(obj_labels);
1156
+ if (!obj_1label.every(v => typeof v === 'number' && Number.isFinite(v)))
1157
+ throw new Error('All values must be finite numbers');
1158
+ if (!arg || (typeof arg !== 'object' && !Array.isArray(arg)))
1159
+ throw new Error('arg must be an object or array');
1160
+ if (Array.isArray(arg)) {
1161
+ const len = l_length_(obj_labels);
1162
+ const arr_labels_new = l_array_(arg, len);
1163
+ return l_concat_(obj_labels, arr_labels_new);
1164
+ }
1165
+ const next_pos = l_length_(obj_labels);
1166
+ const arg_entries = Object.entries(arg);
1167
+ const result = Object.create(null);
1168
+ Object.entries(obj_labels).forEach(([k, v]) => {
1169
+ if (k !== '__proto__' && k !== 'constructor')
1170
+ result[k] = v;
1171
+ });
1172
+ let min_arg = Infinity;
1173
+ for (const [, value] of arg_entries) {
1174
+ if (typeof value !== 'number' || !Number.isFinite(value))
1175
+ continue; // Skip non-numeric
1176
+ if (value > 0 && value < min_arg)
1177
+ min_arg = value;
1178
+ }
1179
+ // Shift only if min_arg is less than next_pos
1180
+ const shift = min_arg === Infinity || min_arg >= next_pos
1181
+ ? 0
1182
+ : Math.floor(Math.log2(next_pos / min_arg));
1183
+ for (const [key, value] of arg_entries) {
1184
+ if (!(key in result)) {
1185
+ result[key] = value === 0 ? 0 : value << shift;
1186
+ }
1187
+ }
1188
+ return Object.freeze(result);
1189
+ }
1190
+ function l_merge_(obj_labels1, obj_labels2) {
1191
+ if (!obj_labels1 || typeof obj_labels1 !== 'object')
1192
+ throw new Error('obj_labels must be an object');
1193
+ const obj_1label1 = Object.values(obj_labels1);
1194
+ if (!obj_1label1.every(v => typeof v === 'number' && Number.isFinite(v)))
1195
+ throw new Error('All values must be finite numbers');
1196
+ if (!obj_labels2 || typeof obj_labels2 !== 'object')
1197
+ throw new Error('obj_labels must be an object');
1198
+ const obj_1label2 = Object.values(obj_labels2);
1199
+ if (!obj_1label2.every(v => typeof v === 'number' && Number.isFinite(v)))
1200
+ throw new Error('All values must be finite numbers');
1201
+ const result = Object.create(null);
1202
+ Object.entries(obj_labels1).forEach(([k, v]) => {
1203
+ if (k !== '__proto__' && k !== 'constructor')
1204
+ result[k] = v;
1205
+ });
1206
+ const set_values = new Set(Object.values(obj_labels1)); // Track all used bit values
1207
+ // Find the highest bit position to start shifting from if needed
1208
+ const value_highest = Math.max(0, ...Array.from(set_values));
1209
+ let next_shift = value_highest ? Math.floor(Math.log2(value_highest)) + 1 : 0;
1210
+ // Process second set
1211
+ for (const [key, value] of Object.entries(obj_labels2)) {
1212
+ if (key in result) {
1213
+ // Same key: Values must match
1214
+ if (result[key] !== value) {
1215
+ throw new Error(`Key '${key}' has conflicting values: ${result[key]} (obj_labels1) vs ${value} (obj_labels2)`);
1216
+ }
1217
+ // No action needed if values match, already in result
1218
+ }
1219
+ else {
1220
+ let maxIterations = 1000;
1221
+ // New key: Add if value is unique, otherwise shift
1222
+ let value_new = value;
1223
+ while (set_values.has(value_new) && maxIterations--) {
1224
+ value_new = 1 << next_shift++;
1225
+ }
1226
+ if (maxIterations <= 0)
1227
+ throw new Error('Too many collisions in l_merge_');
1228
+ result[key] = value_new;
1229
+ set_values.add(value_new);
1230
+ }
1231
+ }
1232
+ return Object.freeze(result);
1233
+ }
8
1234
  function l_LL_(obj, x) {
9
- if (! obj || typeof obj !== 'object')
10
- throw new Error('obj must be an object');
11
- if (! Number.isSafeInteger(x) || x < 0)
12
- throw new Error('Shift value must be a safe, non-negative integer');
13
-
14
- const obj_new= {};
15
- for (const [k,v] of Object.entries(obj)) {
16
- if (typeof v !== 'number' || ! Number.isFinite(v))
17
- continue; // Skip non-numeric
18
- obj_new[k] = v<<x;
19
- }
20
- return Object.freeze(obj_new);
1235
+ if (!obj || typeof obj !== 'object')
1236
+ throw new Error('obj must be an object');
1237
+ if (!Number.isSafeInteger(x) || x < 0)
1238
+ throw new Error('Shift value must be a safe, non-negative integer');
1239
+ const obj_new = {};
1240
+ for (const [k, v] of Object.entries(obj)) {
1241
+ if (typeof v !== 'number' || !Number.isFinite(v))
1242
+ continue; // Skip non-numeric
1243
+ obj_new[k] = v << x;
1244
+ }
1245
+ return Object.freeze(obj_new);
21
1246
  }
22
-
23
- //-------------------------------------------------------------------------------------------------
24
-
25
- function handler_default_( /* ... */ ) {
26
- // https://stackoverflow.com/questions/18746440/passing-multiple-arguments-to-console-log
27
- var args = Array.prototype.slice.call(arguments);
28
- console.log.apply(console, args);
1247
+ function l_RR_(obj, x) {
1248
+ if (!obj || typeof obj !== 'object')
1249
+ throw new Error('obj must be an object');
1250
+ if (!Number.isSafeInteger(x) || x < 0)
1251
+ throw new Error('Shift value must be a safe, non-negative integer');
1252
+ const obj_new = {};
1253
+ for (const [k, v] of Object.entries(obj)) {
1254
+ if (typeof v !== 'number' || !Number.isFinite(v))
1255
+ continue; // Skip non-numeric
1256
+ obj_new[k] = v >> x;
1257
+ }
1258
+ return Object.freeze(obj_new);
29
1259
  }
30
-
31
1260
  //-------------------------------------------------------------------------------------------------
32
-
33
- function l_toBigInt_(obj_labels, obj, ignore= false) {
34
- if (! obj_labels || typeof obj_labels !== 'object')
35
- throw new Error('obj_labels must be an object');
36
- if (! obj || typeof obj !== 'object')
37
- throw new Error('obj must be an object');
38
-
39
- let bigInt = BigInt(0);
40
- for (const [k,v] of Object.entries(obj)) {
41
- if ( ( ignore || v ) && obj_labels[k] !== undefined && typeof obj_labels[k] === 'number')
42
- bigInt|= BigInt( obj_labels[k] );
43
- // console.log('0b'+ bigInt.toString(2) );
44
- }
45
- return bigInt;
1261
+ function handler_default_( /* ... */) {
1262
+ // https://stackoverflow.com/questions/18746440/passing-multiple-arguments-to-console-log
1263
+ var args = Array.prototype.slice.call(arguments);
1264
+ console.log.apply(console, args);
1265
+ }
1266
+ function l_toBigInt_(obj_labels, obj, ignore = false) {
1267
+ if (!obj_labels || typeof obj_labels !== 'object')
1268
+ throw new Error('obj_labels must be an object');
1269
+ if (!obj || typeof obj !== 'object')
1270
+ throw new Error('obj must be an object');
1271
+ let bigint_l = BigInt(0);
1272
+ for (const [k, v] of Object.entries(obj)) {
1273
+ if ((ignore || v) && obj_labels[k] !== undefined && typeof obj_labels[k] === 'number')
1274
+ bigint_l |= BigInt(obj_labels[k]);
1275
+ // console.log('0b'+ bigInt.toString(2) );
1276
+ }
1277
+ return bigint_l;
1278
+ }
1279
+ function lRef(initial) {
1280
+ if (arguments.length === 0 || initial === undefined) {
1281
+ return undefined;
1282
+ }
1283
+ let value = initial;
1284
+ return {
1285
+ get: () => value,
1286
+ set: (newVal) => { value = newVal; }
1287
+ };
1288
+ }
1289
+ /*
1290
+ const l_ = {
1291
+ get VALIDATION() { return logr_.lref.get().VALIDATION; }
46
1292
  }
47
1293
 
48
- // console.log(l_toBigInt_({},{}))
1294
+ function createBitFlags(ref) {
1295
+ // Create a proxy so that any property access computes the current bit
1296
+ return new Proxy({}, {
1297
+ get(target, prop, receiver) {
1298
+ const positions = ref.get(); // get current { VALIDATION: n, ... }
1299
+ const position = positions[prop]; // e.g., positions['VALIDATION']
49
1300
 
50
- const LOGR = (function () {
51
- let _instance; // Private variable to hold the single instance
52
-
53
- function _create_instance() {
54
- // Private state (replacing constructor properties)
55
- let _handler_log = handler_default_;
56
- let _obj_labels = undefined;
57
- let _Bint_toggled = BigInt(0);
1301
+ if (position === undefined) {
1302
+ // Optional: warn or return 0 for unknown keys
1303
+ console.warn(`Unknown bitflag key: ${String(prop)}`);
1304
+ return 0;
1305
+ }
58
1306
 
59
- function _log_fxn(nr_logged, argsFn /* args */) {
60
- if ((BigInt(nr_logged) & _Bint_toggled) === BigInt(0))
61
- return false;
1307
+ return 0b1 << position; // or 1 << position
1308
+ },
62
1309
 
63
- const args = argsFn();
64
- _handler_log.apply(this, args);
65
- // _handler_log.apply(this, args);
66
- return true;
67
- }
1310
+ // Optional: make Object.keys(l_) show the actual keys
1311
+ ownKeys(target) {
1312
+ return Object.keys(ref.get());
1313
+ },
68
1314
 
69
- return {
70
- set handler(fx) {
71
- _handler_log = fx;
72
- },
73
- get handler() {
74
- return _handler_log;
75
- },
1315
+ getOwnPropertyDescriptor(target, prop) {
1316
+ return {
1317
+ enumerable: true,
1318
+ configurable: true,
1319
+ };
1320
+ }
1321
+ });
1322
+ }
76
1323
 
77
- get labels() { return _obj_labels; },
78
- set labels(obj) {
79
- _obj_labels = obj;
80
- _Bint_toggled = BigInt(0);
81
- },
1324
+ type BitPositions = Record<string, number>;
82
1325
 
83
- // put= function(label, abbrv) {
84
- // let name= __name(label);
85
- // _labels[name]= label[name];
86
- // console.log(_labels);
87
- // }
1326
+ function createBitFlags<T extends BitPositions>(ref: { get: () => T }) {
1327
+ return new Proxy({} as { [K in keyof T]: number }, {
1328
+ get(target, prop: string | symbol) {
1329
+ if (typeof prop !== 'string') return undefined;
1330
+ const positions = ref.get();
1331
+ const position = positions[prop as keyof T];
1332
+ if (position === undefined) return 0;
1333
+ return 1 << position;
1334
+ },
1335
+ ownKeys() {
1336
+ return Object.keys(ref.get());
1337
+ },
1338
+ getOwnPropertyDescriptor() {
1339
+ return { enumerable: true, configurable: true };
1340
+ }
1341
+ });
1342
+ }
1343
+ */
1344
+ function create_Referenced_l_(ref) {
1345
+ return new Proxy({}, {
1346
+ get(target, prop) {
1347
+ if (typeof prop !== 'string')
1348
+ return undefined;
1349
+ // if (prop === 'get') {
1350
+ // return () => {
1351
+ // const positions = ref.get();
1352
+ // const result: Partial<Record<keyof T, number>> = {};
1353
+ // for (const key in positions) {
1354
+ // result[key as keyof T] = positions[key];
1355
+ // }
1356
+ // return result as Record<keyof T, number>;
1357
+ // };
1358
+ // }
1359
+ if (prop === 'get')
1360
+ return () => ref.get();
1361
+ const positions = ref.get();
1362
+ const value = positions[prop];
1363
+ if (value === undefined)
1364
+ return 0;
1365
+ return value;
1366
+ },
1367
+ ownKeys() {
1368
+ return Object.keys(ref.get());
1369
+ },
1370
+ getOwnPropertyDescriptor() {
1371
+ return { enumerable: true, configurable: true };
1372
+ }
1373
+ });
1374
+ }
1375
+ const LOGR = (function () {
1376
+ let _instance; // Private variable to hold the single instance
1377
+ // Module-level state would work - but only when the module is loaded once.
1378
+ // Your bundler is currently bundling @knev/bitlogr into your distribution file,
1379
+ // creating a second copy. The Global Symbol approach would work around this,
1380
+ // but it's treating the symptom, not the cause.
1381
+ const GLOBAL_KEY = Symbol.for('@knev/bitlogr/LOGR');
1382
+ // The real issue is your build configuration bundling dependencies that should remain external.
1383
+ // rollup.config.mjs: external: ['@knev/bitlogr', 'uuid'], // Don't bundle these
1384
+ function _create_instance() {
1385
+ const _id = Math.random();
1386
+ if (globalThis.LOGR_ENABLED ?? true)
1387
+ console.log('creating LOGR instance:', _id);
1388
+ // Private state (replacing constructor properties)
1389
+ let _Bint_toggled = BigInt(0);
1390
+ let _handler_log = handler_default_;
1391
+ function _log_fxn(nr_logged, argsFn /* args */) {
1392
+ // console.log('_log_fxn: ', BigInt(nr_logged), _Bint_toggled, (BigInt(nr_logged) & _Bint_toggled));
1393
+ if ((BigInt(nr_logged) & _Bint_toggled) === BigInt(0))
1394
+ return;
1395
+ const args = argsFn();
1396
+ _handler_log.apply(this, args);
1397
+ }
1398
+ return {
1399
+ _id, // for testing
1400
+ get handler() { return _handler_log; },
1401
+ set handler(fx) {
1402
+ _handler_log = fx;
1403
+ },
1404
+ get toggled() { return _Bint_toggled; },
1405
+ // toggle(obj_labels, obj_toggled) {
1406
+ // _Bint_toggled= l_toBigInt_(obj_labels, obj_toggled);
1407
+ // },
1408
+ toggle(labels, obj_toggled) {
1409
+ const obj_labels = typeof labels?.get === 'function'
1410
+ ? labels.get()
1411
+ : labels;
1412
+ // console.log('obj_labels', obj_labels)
1413
+ _Bint_toggled = l_toBigInt_(obj_labels, obj_toggled);
1414
+ },
1415
+ // Core internal log function (exposed only to created loggers)
1416
+ _log_fxn,
1417
+ create(options = {}) {
1418
+ // This constant will be replaced at build time
1419
+ if (!(globalThis.LOGR_ENABLED ?? true)) {
1420
+ return {
1421
+ _obj_labels: undefined, // optional: keep shape compatible if needed
1422
+ log: () => { }, // does nothing
1423
+ raw: () => { }, // does nothing
1424
+ };
1425
+ }
1426
+ const _logger = {
1427
+ // _lref_labels: (options.arr_labels === undefined) ? undefined : lRef( l_array_(options.arr_labels) ),
1428
+ _lref_labels: (options.labels === undefined)
1429
+ ? undefined
1430
+ : lRef(options.labels),
1431
+ get l() {
1432
+ // Always create a fresh proxy pointing to the current labels
1433
+ return create_Referenced_l_({
1434
+ get: () => this._lref_labels?.get() || {}
1435
+ });
1436
+ },
1437
+ get lref() { return this._lref_labels; },
1438
+ set lref(lref_labels_new) {
1439
+ this._lref_labels = lref_labels_new;
1440
+ },
1441
+ log(nr_logged, argsFn) {
1442
+ // This constant will be replaced at build time
1443
+ if (!(globalThis.LOGR_ENABLED ?? true))
1444
+ return;
1445
+ _log_fxn.call(this, nr_logged, argsFn);
1446
+ },
1447
+ // Optional shorthand for common cases
1448
+ raw(...args) {
1449
+ _handler_log.apply(this, args);
1450
+ }
1451
+ };
1452
+ return _logger;
1453
+ },
1454
+ };
1455
+ }
1456
+ // Public interface
1457
+ return {
1458
+ get_instance() {
1459
+ if (!(globalThis.LOGR_USE_GLOBAL_KEY ?? true)) {
1460
+ if (!_instance)
1461
+ _instance = _create_instance(); // Lazy initialization
1462
+ return _instance;
1463
+ }
1464
+ if (!globalThis[GLOBAL_KEY])
1465
+ globalThis[GLOBAL_KEY] = _create_instance();
1466
+ return globalThis[GLOBAL_KEY];
1467
+ },
1468
+ // For testing only - reset the singleton
1469
+ _reset_for_testing() {
1470
+ delete globalThis[GLOBAL_KEY];
1471
+ }
1472
+ };
1473
+ })();
88
1474
 
89
- get toggled() { return _Bint_toggled; },
90
- set toggled(obj_toggled) {
91
- _Bint_toggled= l_toBigInt_(_obj_labels, obj_toggled);
92
- },
1475
+ var logr_es = /*#__PURE__*/Object.freeze({
1476
+ __proto__: null,
1477
+ LOGR: LOGR,
1478
+ _create_Referenced_l: create_Referenced_l_,
1479
+ lRef: lRef,
1480
+ l_LL: l_LL_,
1481
+ l_RR: l_RR_,
1482
+ l_array: l_array_,
1483
+ l_concat: l_concat_,
1484
+ l_length: l_length_,
1485
+ l_merge: l_merge_
1486
+ });
93
1487
 
94
- log(nr_logged, argsFn) {
95
-
96
- return _log_fxn.call(this, nr_logged, argsFn); // Pass the thunk
97
- }
1488
+ function getAugmentedNamespace(n) {
1489
+ if (n.__esModule) return n;
1490
+ var f = n.default;
1491
+ if (typeof f == "function") {
1492
+ var a = function a () {
1493
+ if (this instanceof a) {
1494
+ return Reflect.construct(f, arguments, this.constructor);
1495
+ }
1496
+ return f.apply(this, arguments);
98
1497
  };
99
- }
100
-
101
- // Public interface
102
- return {
103
- get_instance() {
104
- if (!_instance) {
105
- _instance = _create_instance(); // Lazy initialization
1498
+ a.prototype = f.prototype;
1499
+ } else a = {};
1500
+ Object.defineProperty(a, '__esModule', {value: true});
1501
+ Object.keys(n).forEach(function (k) {
1502
+ var d = Object.getOwnPropertyDescriptor(n, k);
1503
+ Object.defineProperty(a, k, d.get ? d : {
1504
+ enumerable: true,
1505
+ get: function () {
1506
+ return n[k];
106
1507
  }
107
- return _instance;
108
- }
109
- };
110
-
111
- })();
1508
+ });
1509
+ });
1510
+ return a;
1511
+ }
112
1512
 
113
1513
  var jsonMsg_cjs = {};
114
1514
 
1515
+ var require$$0 = /*@__PURE__*/getAugmentedNamespace(logr_es);
1516
+
115
1517
  var hasRequiredJsonMsg_cjs;
116
1518
 
117
1519
  function requireJsonMsg_cjs () {
118
1520
  if (hasRequiredJsonMsg_cjs) return jsonMsg_cjs;
119
1521
  hasRequiredJsonMsg_cjs = 1;
120
1522
 
121
- const schema_Msg = validate18;function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate18.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((((data.id === undefined) && (missing0 = "id")) || ((data.referer === undefined) && (missing0 = "referer"))) || ((data.dt === undefined) && (missing0 = "dt"))){validate18.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.id !== undefined){const _errs1 = errors;if(typeof data.id !== "string"){validate18.errors = [{instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs1 === errors;}else {var valid0 = true;}if(valid0){if(data.dt !== undefined){const _errs3 = errors;if(typeof data.dt !== "string"){validate18.errors = [{instancePath:instancePath+"/dt",schemaPath:"#/properties/dt/type",keyword:"type",params:{type: "string"},message:"must be string"}];return false;}var valid0 = _errs3 === 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;}validate18.evaluated = {"props":{"id":true,"dt":true},"dynamicProps":false,"dynamicItems":false};const schema_Msg_msg = validate19;function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate19.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data._msg === undefined) && (missing0 = "_msg")){validate19.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}}else {validate19.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate19.errors = vErrors;return errors === 0;}validate19.evaluated = {"dynamicProps":false,"dynamicItems":false};const schema_MsgAck_msg = validate20;function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}{if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.ack === undefined) && (missing0 = "ack")){validate20.errors = [{instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: missing0},message:"must have required property '"+missing0+"'"}];return false;}else {if(data.ack !== undefined){let data0 = data.ack;{if(data0 && typeof data0 == "object" && !Array.isArray(data0)){let missing1;if((data0.ok === undefined) && (missing1 = "ok")){validate20.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/required",keyword:"required",params:{missingProperty: missing1},message:"must have required property '"+missing1+"'"}];return false;}else {if(data0.ok !== undefined){if(typeof data0.ok !== "boolean"){validate20.errors = [{instancePath:instancePath+"/ack/ok",schemaPath:"#/properties/ack/properties/ok/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"}];return false;}}}}else {validate20.errors = [{instancePath:instancePath+"/ack",schemaPath:"#/properties/ack/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}}}}else {validate20.errors = [{instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"}];return false;}}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":{"ack":true},"dynamicProps":false,"dynamicItems":false};
1523
+ var bitlogr = require$$0;
1524
+
1525
+ const schema_Msg = validate18;
1526
+ function validate18(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate18.evaluated; if (evaluated0.dynamicProps) {
1527
+ evaluated0.props = undefined;
1528
+ } if (evaluated0.dynamicItems) {
1529
+ evaluated0.items = undefined;
1530
+ } {
1531
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1532
+ let missing0;
1533
+ if ((((data.id === undefined) && (missing0 = "id")) || ((data.referer === undefined) && (missing0 = "referer"))) || ((data.dt === undefined) && (missing0 = "dt"))) {
1534
+ validate18.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1535
+ return false;
1536
+ }
1537
+ else {
1538
+ if (data.id !== undefined) {
1539
+ const _errs1 = errors;
1540
+ if (typeof data.id !== "string") {
1541
+ validate18.errors = [{ instancePath: instancePath + "/id", schemaPath: "#/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1542
+ return false;
1543
+ }
1544
+ var valid0 = _errs1 === errors;
1545
+ }
1546
+ else {
1547
+ var valid0 = true;
1548
+ }
1549
+ if (valid0) {
1550
+ if (data.dt !== undefined) {
1551
+ const _errs3 = errors;
1552
+ if (typeof data.dt !== "string") {
1553
+ validate18.errors = [{ instancePath: instancePath + "/dt", schemaPath: "#/properties/dt/type", keyword: "type", params: { type: "string" }, message: "must be string" }];
1554
+ return false;
1555
+ }
1556
+ var valid0 = _errs3 === errors;
1557
+ }
1558
+ else {
1559
+ var valid0 = true;
1560
+ }
1561
+ }
1562
+ }
1563
+ }
1564
+ else {
1565
+ validate18.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1566
+ return false;
1567
+ }
1568
+ } validate18.errors = vErrors; return errors === 0; }
1569
+ validate18.evaluated = { "props": { "id": true, "dt": true }, "dynamicProps": false, "dynamicItems": false };
1570
+ const schema_MsgEffect = validate19;
1571
+ function validate19(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate19.evaluated; if (evaluated0.dynamicProps) {
1572
+ evaluated0.props = undefined;
1573
+ } if (evaluated0.dynamicItems) {
1574
+ evaluated0.items = undefined;
1575
+ } {
1576
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1577
+ let missing0;
1578
+ if ((data._cause === undefined) && (missing0 = "_cause")) {
1579
+ validate19.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1580
+ return false;
1581
+ }
1582
+ }
1583
+ else {
1584
+ validate19.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1585
+ return false;
1586
+ }
1587
+ } validate19.errors = vErrors; return errors === 0; }
1588
+ validate19.evaluated = { "dynamicProps": false, "dynamicItems": false };
1589
+ const schema_MsgAckEffect = validate20;
1590
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data, dynamicAnchors = {} } = {}) { let vErrors = null; let errors = 0; const evaluated0 = validate20.evaluated; if (evaluated0.dynamicProps) {
1591
+ evaluated0.props = undefined;
1592
+ } if (evaluated0.dynamicItems) {
1593
+ evaluated0.items = undefined;
1594
+ } {
1595
+ if (data && typeof data == "object" && !Array.isArray(data)) {
1596
+ let missing0;
1597
+ if ((data.ack === undefined) && (missing0 = "ack")) {
1598
+ validate20.errors = [{ instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: missing0 }, message: "must have required property '" + missing0 + "'" }];
1599
+ return false;
1600
+ }
1601
+ else {
1602
+ if (data.ack !== undefined) {
1603
+ let data0 = data.ack;
1604
+ {
1605
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
1606
+ let missing1;
1607
+ if ((data0.ok === undefined) && (missing1 = "ok")) {
1608
+ validate20.errors = [{ instancePath: instancePath + "/ack", schemaPath: "#/properties/ack/required", keyword: "required", params: { missingProperty: missing1 }, message: "must have required property '" + missing1 + "'" }];
1609
+ return false;
1610
+ }
1611
+ else {
1612
+ if (data0.ok !== undefined) {
1613
+ if (typeof data0.ok !== "boolean") {
1614
+ validate20.errors = [{ instancePath: instancePath + "/ack/ok", schemaPath: "#/properties/ack/properties/ok/type", keyword: "type", params: { type: "boolean" }, message: "must be boolean" }];
1615
+ return false;
1616
+ }
1617
+ }
1618
+ }
1619
+ }
1620
+ else {
1621
+ validate20.errors = [{ instancePath: instancePath + "/ack", schemaPath: "#/properties/ack/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1622
+ return false;
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+ }
1628
+ else {
1629
+ validate20.errors = [{ instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" }];
1630
+ return false;
1631
+ }
1632
+ } validate20.errors = vErrors; return errors === 0; }
1633
+ validate20.evaluated = { "props": { "ack": true }, "dynamicProps": false, "dynamicItems": false };
122
1634
 
123
1635
  const byteToHex = [];
124
1636
  for (let i = 0; i < 256; ++i) {
@@ -162,10 +1674,7 @@ function requireJsonMsg_cjs () {
162
1674
  const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
163
1675
  var native = { randomUUID };
164
1676
 
165
- function v4(options, buf, offset) {
166
- if (native.randomUUID && true && !options) {
167
- return native.randomUUID();
168
- }
1677
+ function _v4(options, buf, offset) {
169
1678
  options = options || {};
170
1679
  const rnds = options.random ?? options.rng?.() ?? rng();
171
1680
  if (rnds.length < 16) {
@@ -175,264 +1684,174 @@ function requireJsonMsg_cjs () {
175
1684
  rnds[8] = (rnds[8] & 0x3f) | 0x80;
176
1685
  return unsafeStringify(rnds);
177
1686
  }
178
-
179
- // console.log('OUT', __name({variableName}) );
180
-
181
-
182
- //-------------------------------------------------------------------------------------------------
183
-
184
- function handler_default_( /* ... */ ) {
185
- // https://stackoverflow.com/questions/18746440/passing-multiple-arguments-to-console-log
186
- var args = Array.prototype.slice.call(arguments);
187
- console.log.apply(console, args);
1687
+ function v4(options, buf, offset) {
1688
+ if (native.randomUUID && true && !options) {
1689
+ return native.randomUUID();
1690
+ }
1691
+ return _v4(options);
188
1692
  }
189
1693
 
190
1694
  //-------------------------------------------------------------------------------------------------
191
-
192
- function l_toBigInt_(obj_labels, obj, ignore= false) {
193
- if (! obj_labels || typeof obj_labels !== 'object')
194
- throw new Error('obj_labels must be an object');
195
- if (! obj || typeof obj !== 'object')
196
- throw new Error('obj must be an object');
197
-
198
- let bigInt = BigInt(0);
199
- for (const [k,v] of Object.entries(obj)) {
200
- if ( ( ignore || v ) && obj_labels[k] !== undefined && typeof obj_labels[k] === 'number')
201
- bigInt|= BigInt( obj_labels[k] );
202
- // console.log('0b'+ bigInt.toString(2) );
203
- }
204
- return bigInt;
205
- }
206
-
207
- // console.log(l_toBigInt_({},{}))
208
-
209
- const LOGR = (function () {
210
- let _instance; // Private variable to hold the single instance
211
-
212
- function _create_instance() {
213
- // Private state (replacing constructor properties)
214
- let _handler_log = handler_default_;
215
- let _obj_labels = undefined;
216
- let _Bint_toggled = BigInt(0);
217
-
218
- function _log_fxn(nr_logged, argsFn /* args */) {
219
- if ((BigInt(nr_logged) & _Bint_toggled) === BigInt(0))
220
- return false;
221
-
222
- const args = argsFn();
223
- _handler_log.apply(this, args);
224
- // _handler_log.apply(this, args);
225
- return true;
226
- }
227
-
228
- return {
229
- set handler(fx) {
230
- _handler_log = fx;
231
- },
232
- get handler() {
233
- return _handler_log;
234
- },
235
-
236
- get labels() { return _obj_labels; },
237
- set labels(obj) {
238
- _obj_labels = obj;
239
- _Bint_toggled = BigInt(0);
240
- },
241
-
242
- // put= function(label, abbrv) {
243
- // let name= __name(label);
244
- // _labels[name]= label[name];
245
- // console.log(_labels);
246
- // }
247
-
248
- get toggled() { return _Bint_toggled; },
249
- set toggled(obj_toggled) {
250
- _Bint_toggled= l_toBigInt_(_obj_labels, obj_toggled);
251
- },
252
-
253
- log(nr_logged, argsFn) {
254
-
255
- return _log_fxn.call(this, nr_logged, argsFn); // Pass the thunk
256
- }
257
- };
258
- }
259
-
260
- // Public interface
261
- return {
262
- get_instance() {
263
- if (!_instance) {
264
- _instance = _create_instance(); // Lazy initialization
265
- }
266
- return _instance;
267
- }
268
- };
269
-
270
- })();
271
-
272
- let LOGR_= LOGR.get_instance();
273
- const log_= LOGR_.log;
274
-
275
- const l_= {
276
- VALIDATION : 0b1 << 0,
277
- };
278
- LOGR_.labels= l_;
279
-
1695
+ const LOGR_ = bitlogr.LOGR.get_instance();
1696
+ const logr_ = LOGR_.create({ labels: bitlogr.l_array(['VALIDATION', 'DROPS', 'HANDLERS']) });
1697
+ const l_ = logr_.l;
1698
+ // console.log('File location:', import.meta.url, '[Implementation]');
1699
+ //-------------------------------------------------------------------------------------------------
280
1700
  // TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
281
-
282
1701
  // "module" pattern to avoid "static" and "#" private : https://stackoverflow.com/a/1479341/298545
283
- var JSON_Msg = (function() {
284
- return {
285
- merge: function(json) {
286
- return Object.assign({
287
- id: v4(),
288
- referer: null,
289
- dt: new Date().toISOString()
290
- }, json || {});
291
- },
292
- validate : function (json) {
293
- const b_valid = schema_Msg(json);
294
- if (!b_valid)
295
- log_(l_.VALIDATION, () => ['JSON_Msg: validate: ', schema_Msg.errors]);
296
- return b_valid;
297
- },
298
- // TODO: requires a separate ajv module require, and JTD specific schema
299
- // https://ajv.js.org/guide/getting-started.html#parsing-and-serializing-json
300
- // static #ajv_parse_= ajv.compileParser(this.#schema_json_Msg);
301
- // static parse(json) {
302
- // return this.#ajv_parse_(json);
303
- // }
304
- }
1702
+ var JSON_Msg = (function () {
1703
+ return {
1704
+ merge: function (json) {
1705
+ return Object.assign({
1706
+ id: v4(),
1707
+ referer: null,
1708
+ dt: new Date().toISOString()
1709
+ }, json || {});
1710
+ },
1711
+ validate: function (json) {
1712
+ const b_valid = schema_Msg(json);
1713
+ if (!b_valid)
1714
+ logr_.log(l_.VALIDATION, () => ['JSON_Msg: validate: ', schema_Msg.errors]);
1715
+ return b_valid;
1716
+ },
1717
+ // TODO: requires a separate ajv module require, and JTD specific schema
1718
+ // https://ajv.js.org/guide/getting-started.html#parsing-and-serializing-json
1719
+ // static #ajv_parse_= ajv.compileParser(this.#schema_json_Msg);
1720
+ // static parse(json) {
1721
+ // return this.#ajv_parse_(json);
1722
+ // }
1723
+ };
305
1724
  })();
306
-
307
- var JSON_Msg_msg = (function() {
308
- return {
309
- create_with_msg_merge: function(_msg, json) {
310
- return Object.assign(JSON_Msg.merge(json), { _msg });
311
- },
312
- validate : function(json) {
313
- if (! JSON_Msg.validate(json))
314
- return false;
315
- const b_valid= schema_Msg_msg(json);
316
- if (!b_valid)
317
- log_(l_.VALIDATION, () => ['JSON_Msg_msg: validate: ', schema_Msg_msg.errors]);
318
- return b_valid;
319
- }
320
- }
1725
+ var JSON_MsgEffect = (function () {
1726
+ return {
1727
+ create_with_cause_merge: function (msg_cause, json) {
1728
+ const _cause = msg_cause;
1729
+ return Object.assign(JSON_Msg.merge(json), { _cause });
1730
+ },
1731
+ validate: function (json) {
1732
+ if (!JSON_Msg.validate(json))
1733
+ return false;
1734
+ const b_valid = schema_MsgEffect(json);
1735
+ if (!b_valid)
1736
+ logr_.log(l_.VALIDATION, () => ['JSON_MsgEffect: validate: ', schema_MsgEffect.errors]);
1737
+ return b_valid;
1738
+ }
1739
+ };
321
1740
  })();
322
-
323
- var JSON_MsgAck_msg = (function() {
324
- return {
325
- create_with_msgOk : function(_msg, b_ok= true) {
326
- return JSON_Msg_msg.create_with_msg_merge(_msg, {
327
- ack : {
328
- "ok" : b_ok,
329
- },
330
- });
331
- },
332
- create_with_msgExpired : function(_msg) {
333
- return JSON_Msg_msg.create_with_msg_merge(_msg, {
334
- ack : {
335
- "ok" : false,
336
- "expired" : true
337
- },
338
- });
339
- },
340
- validate : function(json) {
341
- if (! JSON_Msg_msg.validate(json))
342
- return false;
343
- const b_valid= schema_MsgAck_msg(json);
344
- if (!b_valid)
345
- log_(l_.VALIDATION, () => ['JSON_MsgAck: validate: ', schema_MsgAck_msg.errors]);
346
- return b_valid;
347
- }
348
- }
1741
+ var JSON_MsgAck = (function () {
1742
+ return {
1743
+ create_with_cause_Ok: function (msg_cause, b_ok = true) {
1744
+ return JSON_MsgEffect.create_with_cause_merge(msg_cause, {
1745
+ ack: {
1746
+ "ok": b_ok,
1747
+ },
1748
+ });
1749
+ },
1750
+ create_with_cause_Expired: function (msg_cause) {
1751
+ return JSON_MsgEffect.create_with_cause_merge(msg_cause, {
1752
+ ack: {
1753
+ "ok": false,
1754
+ "expired": true
1755
+ },
1756
+ });
1757
+ },
1758
+ validate: function (json) {
1759
+ if (!JSON_MsgEffect.validate(json))
1760
+ return false;
1761
+ const b_valid = schema_MsgAckEffect(json);
1762
+ if (!b_valid)
1763
+ logr_.log(l_.VALIDATION, () => ['JSON_MsgAckEffect: validate: ', schema_MsgAckEffect.errors]);
1764
+ return b_valid;
1765
+ }
1766
+ };
349
1767
  })();
350
1768
 
351
1769
  jsonMsg_cjs.JSON_Msg = JSON_Msg;
352
- jsonMsg_cjs.JSON_MsgAck_msg = JSON_MsgAck_msg;
353
- jsonMsg_cjs.JSON_Msg_msg = JSON_Msg_msg;
354
- jsonMsg_cjs.l = l_;
1770
+ jsonMsg_cjs.JSON_MsgAck = JSON_MsgAck;
1771
+ jsonMsg_cjs.JSON_MsgEffect = JSON_MsgEffect;
1772
+ jsonMsg_cjs.logr = logr_;
355
1773
  return jsonMsg_cjs;
356
1774
  }
357
1775
 
358
1776
  var jsonMsg_cjsExports = requireJsonMsg_cjs();
359
1777
 
360
- let LOGR_= LOGR.get_instance();
361
- const log_ = LOGR_.log;
362
-
363
- Object.assign(jsonMsg_cjsExports.l, l_LL_(jsonMsg_cjsExports.l, 2)); // VALIDATION : 4
364
-
365
- const l_= {
366
- VALIDATION : 0b1 << 2, //4
367
- };
368
- LOGR_.labels= l_;
369
-
370
- LOGR_.toggled= {
371
- // VALIDATION : true
372
- };
373
-
374
- const kstr_VERSION= "2";
375
-
376
- // TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
377
-
378
- // const regex_IOI= new RegExp('\\bquery\\s*\\{\\s*IOI\\s*\\(\\s*pkg\\s*:\\s*"([^"]*)"\\s*\\)\\s*\\{.*heartbeat\\s*\\}\\s*\\}');
379
-
380
- var JSON_MsgSubverseInfo_query = (function() {
381
- return {
382
- merge : function(json) {
383
- let json_msg= jsonMsg_cjsExports.JSON_Msg.merge(json);
384
- json_msg["subverse_info"]= kstr_VERSION;
385
-
386
- return json_msg;
387
- },
388
- validate : function(json, _pkg) {
389
- if (! jsonMsg_cjsExports.JSON_Msg.validate(json))
390
- return false;
391
-
392
- if (! schema_SubverseInfo_query(json)) {
393
- log_(l_.VALIDATION, () => ['schema_SubverseInfo_query_: validate: ', schema_SubverseInfo_query.errors]);
394
- return false;
395
- }
396
-
397
- // const str_graphql = json["discovery"]["graphql"];
398
-
399
- // const regex_match= str_graphql.match(regex_IOI);
400
- // if (regex_match === null || regex_match.length !== 2)
401
- // return false;
402
-
403
- // if (pkg !== regex_match[1])
404
- // return false;
405
-
406
- return true;
407
- }
408
- }
409
- })();
410
-
411
- var JSON_MsgSubverseInfo_expanse = (function() {
412
- return {
413
- create_with_msg_merge : function(_msg, json) {
414
- let json_msg_msg= jsonMsg_cjsExports.JSON_Msg_msg.create_with_msg_merge(_msg, json);
415
- json_msg_msg["subverse_info"]= kstr_VERSION;
416
-
417
- return json_msg_msg;
418
- },
419
- validate : function(json) {
420
- if (! jsonMsg_cjsExports.JSON_Msg_msg.validate(json))
421
- return false;
422
-
423
- if (json._msg)
424
- if (! JSON_MsgSubverseInfo_query.validate(json._msg))
425
- return false;
426
-
427
- if (! schema_SubverseInfo_expanse(json)) {
428
- log_(l_.VALIDATION, () => ['JSON_SubverseInfo_expanse: validate: ', schema_SubverseInfo_expanse.errors]);
429
- return false;
430
- }
431
- return true;
432
- }
433
- }
1778
+ const kstr_VERSION = "4";
1779
+ // TODO: use RFC3339 "timestamp"? https://ajv.js.org/json-type-definition.html
1780
+ //-------------------------------------------------------------------------------------------------
1781
+ LOGR.get_instance();
1782
+ const obj_labels_shift_ = l_LL_(jsonMsg_cjsExports.logr.lref.get(), 2); // VALIDATION : 4
1783
+ jsonMsg_cjsExports.logr.lref.set(obj_labels_shift_);
1784
+ const l_ = jsonMsg_cjsExports.logr.l;
1785
+ //-------------------------------------------------------------------------------------------------
1786
+ // const regex_IOI= new RegExp('\\bquery\\s*\\{\\s*IOI\\s*\\(\\s*pkg\\s*:\\s*"([^"]*)"\\s*\\)\\s*\\{.*heartbeat\\s*\\}\\s*\\}');
1787
+ var JSON_MsgSubverseInfo_query = (function () {
1788
+ return {
1789
+ merge: function (json) {
1790
+ let json_msg = jsonMsg_cjsExports.JSON_Msg.merge(json);
1791
+ json_msg["subverse_info"] = kstr_VERSION;
1792
+ return json_msg;
1793
+ },
1794
+ validate: function (json, _pkg = {}) {
1795
+ // if (! JSON_Msg.validate(json))
1796
+ // return false;
1797
+ if (!schema_SubverseInfo_query(json)) {
1798
+ jsonMsg_cjsExports.logr.log(l_.VALIDATION, () => ['schema_SubverseInfo_query_: validate: ', schema_SubverseInfo_query.errors]);
1799
+ return false;
1800
+ }
1801
+ // const str_graphql = json["discovery"]["graphql"];
1802
+ // const regex_match= str_graphql.match(regex_IOI);
1803
+ // if (regex_match === null || regex_match.length !== 2)
1804
+ // return false;
1805
+ // if (pkg !== regex_match[1])
1806
+ // return false;
1807
+ return true;
1808
+ }
1809
+ };
1810
+ })();
1811
+ var JSON_MsgSubverseInfo_subverse = (function () {
1812
+ return {
1813
+ create_with_cause_merge: function (msg_cause, json) {
1814
+ let json_msgeffect = jsonMsg_cjsExports.JSON_MsgEffect.create_with_cause_merge(msg_cause, json);
1815
+ json_msgeffect["subverse_info"] = kstr_VERSION;
1816
+ return json_msgeffect;
1817
+ },
1818
+ validate: function (json_msg) {
1819
+ // if (! JSON_Msg_msg.validate(json))
1820
+ // return false;
1821
+ if (json_msg._cause)
1822
+ if (!JSON_MsgSubverseInfo_query.validate(json_msg._cause))
1823
+ return false;
1824
+ if (!schema_SubverseInfo_subverse(json_msg)) {
1825
+ jsonMsg_cjsExports.logr.log(l_.VALIDATION, () => ['JSON_SubverseInfo_expanse: validate: ', schema_SubverseInfo_subverse.errors]);
1826
+ return false;
1827
+ }
1828
+ return true;
1829
+ }
1830
+ };
1831
+ })();
1832
+ var JSON_MsgSubverseInfo_instances = (function () {
1833
+ return {
1834
+ create_with_cause_merge: function (msg_cause, json) {
1835
+ let json_msgeffect = jsonMsg_cjsExports.JSON_MsgEffect.create_with_cause_merge(msg_cause, json);
1836
+ json_msgeffect["subverse_info"] = kstr_VERSION;
1837
+ return json_msgeffect;
1838
+ },
1839
+ validate: function (json_msg) {
1840
+ // if (! JSON_Msg_msg.validate(json))
1841
+ // return false;
1842
+ if (json_msg._cause)
1843
+ if (!JSON_MsgSubverseInfo_query.validate(json_msg._cause))
1844
+ return false;
1845
+ if (!schema_SubverseInfo_instances(json_msg)) {
1846
+ jsonMsg_cjsExports.logr.log(l_.VALIDATION, () => ['JSON_SubverseInfo_instances: validate: ', schema_SubverseInfo_instances.errors]);
1847
+ return false;
1848
+ }
1849
+ return true;
1850
+ }
1851
+ };
434
1852
  })();
435
1853
 
436
- exports.JSON_MsgSubverseInfo_expanse = JSON_MsgSubverseInfo_expanse;
1854
+ exports.JSON_MsgSubverseInfo_instances = JSON_MsgSubverseInfo_instances;
437
1855
  exports.JSON_MsgSubverseInfo_query = JSON_MsgSubverseInfo_query;
438
- exports.l = l_;
1856
+ exports.JSON_MsgSubverseInfo_subverse = JSON_MsgSubverseInfo_subverse;
1857
+ exports.logr = jsonMsg_cjsExports.logr;