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