@meantjs/profile 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ // Generated by packages/resolver/scripts/data.mjs from spec/profile-v0.schema.json with ajv 8.18.0 (standalone code).
2
+ // Do not edit: run `npm run data -w packages/resolver`. The validator generates no code at run time.
3
+ "use strict";export const validate = validate20;export default validate20;const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"urn:candid-profile:v0:schema","title":"Candid Profile v0","description":"Meaning for positions in a Candid interface (units, formats, intent, risk, idempotency, outcome classes). Normative prose: docs/profile-v0.md. Structural checks only; address resolution and tag applicability are checked by scripts/validate.mjs.","type":"object","required":["format","format_version","kind","name","origin","binds","annotations"],"additionalProperties":false,"properties":{"format":{"const":"candid-profile"},"format_version":{"const":0},"kind":{"enum":["canister","pack"]},"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_.-]{0,63}$"},"origin":{"enum":["author","third_party","pack","inferred"]},"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$","default":"en"},"description":{"type":"string"},"binds":{"type":"object"},"annotations":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/annotation"}}},"allOf":[{"if":{"properties":{"kind":{"const":"pack"}}},"then":{"properties":{"origin":{"const":"pack"},"binds":{"$ref":"#/$defs/pack_binds"}}}},{"if":{"properties":{"kind":{"const":"canister"}}},"then":{"properties":{"origin":{"enum":["author","third_party","inferred"]},"binds":{"$ref":"#/$defs/canister_binds"}}}}],"$defs":{"pack_binds":{"type":"object","required":["standard","requires"],"additionalProperties":false,"properties":{"standard":{"type":"string","pattern":"^[A-Z]+-[0-9]+$"},"spec_url":{"type":"string","pattern":"^https://"},"requires":{"type":"string","minLength":10,"description":"A Candid service fragment. The pack applies to a canister whose service type is a subtype of this fragment."}}},"canister_binds":{"type":"object","required":["interface_id"],"additionalProperties":false,"properties":{"interface_id":{"type":"string","pattern":"^candid-core:interface:v1:sha256:[0-9a-f]{64}$"},"contract_id":{"type":"string","pattern":"^candid-core:contract:v1:sha256:[0-9a-f]{64}$"},"canister_id":{"type":"string","pattern":"^[a-z0-9]{5}(-[a-z0-9]{5})*(-[a-z0-9]{1,5})?$"}}},"value_address":{"type":"string","description":"METHOD(i)path | METHOD->(i)path | type:DECL path. Paths: .label, .#id, [] (vec element). opt is transparent.","pattern":"^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},"method_address":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"relpath":{"type":"string","description":"Path relative to a method's argument tuple (or result tuple, for outcome/list.next/list.items). Starts with (i) when the tuple has more than one element; otherwise relative to element 0.","pattern":"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$","minLength":1},"int_string":{"type":"string","pattern":"^(0|-?[1-9][0-9]*)$"},"dynamic":{"type":"object","required":["from"],"additionalProperties":false,"properties":{"from":{"type":"string","pattern":"^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"}}},"time_unit":{"enum":["ns","us","ms","s"]},"outcome_class":{"enum":["success","already_done","retry_same","retry_new","fix_input","fail"]},"annotation":{"type":"object","required":["at","tag","args"],"additionalProperties":false,"properties":{"at":{"type":"string"},"tag":{"enum":["amount","timestamp","duration","account","subaccount","bytes","text","range","default","describe","ui","intent","effect","idempotency","outcome","list","names","named"]},"args":{"type":"object"},"note":{"type":"string"}},"allOf":[{"if":{"properties":{"tag":{"enum":["intent","effect","idempotency","outcome","list","names"]}}},"then":{"properties":{"at":{"$ref":"#/$defs/method_address"}}}},{"if":{"properties":{"tag":{"enum":["amount","timestamp","duration","account","subaccount","bytes","text","range","default","ui","named"]}}},"then":{"properties":{"at":{"$ref":"#/$defs/value_address"}}}},{"if":{"properties":{"tag":{"const":"describe"}}},"then":{"properties":{"at":{"anyOf":[{"$ref":"#/$defs/value_address"},{"$ref":"#/$defs/method_address"}]}}}},{"if":{"properties":{"tag":{"const":"amount"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_amount"}}}},{"if":{"properties":{"tag":{"const":"timestamp"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_timestamp"}}}},{"if":{"properties":{"tag":{"const":"duration"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_duration"}}}},{"if":{"properties":{"tag":{"const":"account"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_account"}}}},{"if":{"properties":{"tag":{"const":"subaccount"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_empty"}}}},{"if":{"properties":{"tag":{"const":"bytes"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_bytes"}}}},{"if":{"properties":{"tag":{"const":"text"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_text"}}}},{"if":{"properties":{"tag":{"const":"range"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_range"}}}},{"if":{"properties":{"tag":{"const":"default"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_default"}}}},{"if":{"properties":{"tag":{"const":"describe"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_describe"}}}},{"if":{"properties":{"tag":{"const":"ui"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_ui"}}}},{"if":{"properties":{"tag":{"const":"intent"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_intent"}}}},{"if":{"properties":{"tag":{"const":"effect"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_effect"}}}},{"if":{"properties":{"tag":{"const":"idempotency"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_idempotency"}}}},{"if":{"properties":{"tag":{"const":"outcome"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_outcome"}}}},{"if":{"properties":{"tag":{"const":"list"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_list"}}}},{"if":{"properties":{"tag":{"const":"names"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_names"}}}},{"if":{"properties":{"tag":{"const":"named"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_named"}}}}]},"args_empty":{"type":"object","additionalProperties":false,"maxProperties":0},"args_amount":{"type":"object","required":["decimals"],"additionalProperties":false,"properties":{"decimals":{"oneOf":[{"type":"integer","minimum":0,"maximum":255},{"$ref":"#/$defs/dynamic"}]},"symbol":{"oneOf":[{"type":"string","minLength":1,"maxLength":32},{"$ref":"#/$defs/dynamic"}]}}},"args_timestamp":{"type":"object","required":["unit"],"additionalProperties":false,"properties":{"unit":{"$ref":"#/$defs/time_unit"},"epoch":{"const":"unix"}}},"args_duration":{"type":"object","required":["unit"],"additionalProperties":false,"properties":{"unit":{"$ref":"#/$defs/time_unit"}}},"args_account":{"type":"object","additionalProperties":false,"properties":{"encoding":{"const":"icrc1"}}},"args_bytes":{"type":"object","required":["encoding"],"additionalProperties":false,"properties":{"encoding":{"enum":["utf8","hex","base64"]},"max_len":{"type":"integer","minimum":0}}},"args_text":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"format":{"enum":["plain","markdown","email","url"]},"max_len":{"type":"integer","minimum":0},"pattern":{"type":"string"}}},"args_range":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"min":{"$ref":"#/$defs/int_string"},"max":{"$ref":"#/$defs/int_string"},"min_len":{"type":"integer","minimum":0},"max_len":{"type":"integer","minimum":0}}},"args_default":{"type":"object","required":["value","mode"],"additionalProperties":false,"properties":{"value":{"oneOf":[{"type":"string","description":"Candid textual literal, e.g. \"null\" or \"opt 0\""},{"$ref":"#/$defs/dynamic"}]},"mode":{"enum":["auto","suggest"]}}},"args_describe":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"label":{"type":"string","minLength":1,"maxLength":80},"help":{"type":"string","minLength":1,"maxLength":2000}}},"args_ui":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"order":{"type":"integer"},"group":{"type":"string"},"hidden":{"type":"boolean"},"widget":{"type":"string"}}},"args_intent":{"type":"object","required":["title","template"],"additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":60},"template":{"type":"string","minLength":1,"maxLength":500}}},"args_effect":{"type":"object","required":["kind","irreversible"],"additionalProperties":false,"properties":{"kind":{"enum":["read","write","transfer","approve","admin","destroy"]},"irreversible":{"type":"boolean"},"replicated":{"type":"boolean"}}},"args_idempotency":{"type":"object","required":["mode","stamp"],"additionalProperties":false,"properties":{"mode":{"const":"replay_same_payload"},"stamp":{"$ref":"#/$defs/relpath"}}},"args_outcome":{"type":"object","description":"classes, default or both: a result with no variant to select has default alone (spec 5.3, D-049)","minProperties":1,"additionalProperties":false,"properties":{"classes":{"type":"object","minProperties":1,"propertyNames":{"$ref":"#/$defs/relpath"},"additionalProperties":{"$ref":"#/$defs/outcome_class"}},"default":{"$ref":"#/$defs/outcome_class"}}},"args_list":{"type":"object","required":["cursor","next","items"],"additionalProperties":false,"properties":{"cursor":{"$ref":"#/$defs/relpath"},"next":{"$ref":"#/$defs/relpath"},"items":{"$ref":"#/$defs/relpath"}}},"set_name":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","maxLength":64,"description":"A names set's name, which named tags refer to."},"args_names":{"type":"object","required":["set","items","name","value"],"additionalProperties":false,"description":"A method that lists named things (spec 5.3, D-045). items is a results relpath to a vec of records; name, value, show and kind are paths inside one item.","properties":{"set":{"$ref":"#/$defs/set_name"},"items":{"$ref":"#/$defs/relpath"},"name":{"$ref":"#/$defs/relpath"},"value":{"$ref":"#/$defs/relpath"},"show":{"$ref":"#/$defs/relpath"},"kind":{"$ref":"#/$defs/relpath"}}},"args_named":{"type":"object","required":["set"],"additionalProperties":false,"description":"A position a name from a names set can stand for (spec 5.3, D-045).","properties":{"set":{"$ref":"#/$defs/set_name"},"by":{"enum":["value","show"]}}}}};const schema32 = {"type":"object","required":["standard","requires"],"additionalProperties":false,"properties":{"standard":{"type":"string","pattern":"^[A-Z]+-[0-9]+$"},"spec_url":{"type":"string","pattern":"^https://"},"requires":{"type":"string","minLength":10,"description":"A Candid service fragment. The pack applies to a canister whose service type is a subtype of this fragment."}}};const schema33 = {"type":"object","required":["interface_id"],"additionalProperties":false,"properties":{"interface_id":{"type":"string","pattern":"^candid-core:interface:v1:sha256:[0-9a-f]{64}$"},"contract_id":{"type":"string","pattern":"^candid-core:contract:v1:sha256:[0-9a-f]{64}$"},"canister_id":{"type":"string","pattern":"^[a-z0-9]{5}(-[a-z0-9]{5})*(-[a-z0-9]{1,5})?$"}}};const pattern4 = new RegExp("^[A-Z]+-[0-9]+$", "u");const pattern5 = new RegExp("^https://", "u");const pattern6 = new RegExp("^candid-core:interface:v1:sha256:[0-9a-f]{64}$", "u");const pattern7 = new RegExp("^candid-core:contract:v1:sha256:[0-9a-f]{64}$", "u");const pattern8 = new RegExp("^[a-z0-9]{5}(-[a-z0-9]{5})*(-[a-z0-9]{1,5})?$", "u");const pattern9 = new RegExp("^[a-z0-9][a-z0-9_.-]{0,63}$", "u");const pattern10 = new RegExp("^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$", "u");const func1 = ucs2length;const func2 = Object.prototype.hasOwnProperty;const schema34 = {"type":"object","required":["at","tag","args"],"additionalProperties":false,"properties":{"at":{"type":"string"},"tag":{"enum":["amount","timestamp","duration","account","subaccount","bytes","text","range","default","describe","ui","intent","effect","idempotency","outcome","list","names","named"]},"args":{"type":"object"},"note":{"type":"string"}},"allOf":[{"if":{"properties":{"tag":{"enum":["intent","effect","idempotency","outcome","list","names"]}}},"then":{"properties":{"at":{"$ref":"#/$defs/method_address"}}}},{"if":{"properties":{"tag":{"enum":["amount","timestamp","duration","account","subaccount","bytes","text","range","default","ui","named"]}}},"then":{"properties":{"at":{"$ref":"#/$defs/value_address"}}}},{"if":{"properties":{"tag":{"const":"describe"}}},"then":{"properties":{"at":{"anyOf":[{"$ref":"#/$defs/value_address"},{"$ref":"#/$defs/method_address"}]}}}},{"if":{"properties":{"tag":{"const":"amount"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_amount"}}}},{"if":{"properties":{"tag":{"const":"timestamp"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_timestamp"}}}},{"if":{"properties":{"tag":{"const":"duration"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_duration"}}}},{"if":{"properties":{"tag":{"const":"account"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_account"}}}},{"if":{"properties":{"tag":{"const":"subaccount"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_empty"}}}},{"if":{"properties":{"tag":{"const":"bytes"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_bytes"}}}},{"if":{"properties":{"tag":{"const":"text"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_text"}}}},{"if":{"properties":{"tag":{"const":"range"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_range"}}}},{"if":{"properties":{"tag":{"const":"default"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_default"}}}},{"if":{"properties":{"tag":{"const":"describe"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_describe"}}}},{"if":{"properties":{"tag":{"const":"ui"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_ui"}}}},{"if":{"properties":{"tag":{"const":"intent"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_intent"}}}},{"if":{"properties":{"tag":{"const":"effect"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_effect"}}}},{"if":{"properties":{"tag":{"const":"idempotency"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_idempotency"}}}},{"if":{"properties":{"tag":{"const":"outcome"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_outcome"}}}},{"if":{"properties":{"tag":{"const":"list"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_list"}}}},{"if":{"properties":{"tag":{"const":"names"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_names"}}}},{"if":{"properties":{"tag":{"const":"named"}}},"then":{"properties":{"args":{"$ref":"#/$defs/args_named"}}}}]};const schema35 = {"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$"};const schema36 = {"type":"string","description":"METHOD(i)path | METHOD->(i)path | type:DECL path. Paths: .label, .#id, [] (vec element). opt is transparent.","pattern":"^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"};const schema46 = {"type":"object","additionalProperties":false,"properties":{"encoding":{"const":"icrc1"}}};const schema47 = {"type":"object","additionalProperties":false,"maxProperties":0};const schema48 = {"type":"object","required":["encoding"],"additionalProperties":false,"properties":{"encoding":{"enum":["utf8","hex","base64"]},"max_len":{"type":"integer","minimum":0}}};const schema49 = {"type":"object","additionalProperties":false,"minProperties":1,"properties":{"format":{"enum":["plain","markdown","email","url"]},"max_len":{"type":"integer","minimum":0},"pattern":{"type":"string"}}};const schema55 = {"type":"object","additionalProperties":false,"minProperties":1,"properties":{"label":{"type":"string","minLength":1,"maxLength":80},"help":{"type":"string","minLength":1,"maxLength":2000}}};const schema56 = {"type":"object","additionalProperties":false,"minProperties":1,"properties":{"order":{"type":"integer"},"group":{"type":"string"},"hidden":{"type":"boolean"},"widget":{"type":"string"}}};const schema57 = {"type":"object","required":["title","template"],"additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":60},"template":{"type":"string","minLength":1,"maxLength":500}}};const schema58 = {"type":"object","required":["kind","irreversible"],"additionalProperties":false,"properties":{"kind":{"enum":["read","write","transfer","approve","admin","destroy"]},"irreversible":{"type":"boolean"},"replicated":{"type":"boolean"}}};const pattern11 = new RegExp("^[A-Za-z_][A-Za-z0-9_]*$", "u");const pattern12 = new RegExp("^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$", "u");const schema39 = {"type":"object","required":["decimals"],"additionalProperties":false,"properties":{"decimals":{"oneOf":[{"type":"integer","minimum":0,"maximum":255},{"$ref":"#/$defs/dynamic"}]},"symbol":{"oneOf":[{"type":"string","minLength":1,"maxLength":32},{"$ref":"#/$defs/dynamic"}]}}};const schema40 = {"type":"object","required":["from"],"additionalProperties":false,"properties":{"from":{"type":"string","pattern":"^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"}}};const pattern15 = new RegExp("^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$", "u");function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.decimals === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "decimals"},message:"must have required property '"+"decimals"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "decimals") || (key0 === "symbol"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.decimals !== undefined){let data0 = data.decimals;const _errs3 = errors;let valid1 = false;let passing0 = null;const _errs4 = errors;if(!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))){const err2 = {instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/oneOf/0/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if((typeof data0 == "number") && (isFinite(data0))){if(data0 > 255 || isNaN(data0)){const err3 = {instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/oneOf/0/maximum",keyword:"maximum",params:{comparison: "<=", limit: 255},message:"must be <= 255"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data0 < 0 || isNaN(data0)){const err4 = {instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/oneOf/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid0 = _errs4 === errors;if(_valid0){valid1 = true;passing0 = 0;}const _errs6 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.from === undefined){const err5 = {instancePath:instancePath+"/decimals",schemaPath:"#/$defs/dynamic/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key1 in data0){if(!(key1 === "from")){const err6 = {instancePath:instancePath+"/decimals",schemaPath:"#/$defs/dynamic/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.from !== undefined){let data1 = data0.from;if(typeof data1 === "string"){if(!pattern15.test(data1)){const err7 = {instancePath:instancePath+"/decimals/from",schemaPath:"#/$defs/dynamic/properties/from/pattern",keyword:"pattern",params:{pattern: "^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"},message:"must match pattern \""+"^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"+"\""};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/decimals/from",schemaPath:"#/$defs/dynamic/properties/from/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath:instancePath+"/decimals",schemaPath:"#/$defs/dynamic/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}var _valid0 = _errs6 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;}}if(!valid1){const err10 = {instancePath:instancePath+"/decimals",schemaPath:"#/properties/decimals/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}}if(data.symbol !== undefined){let data2 = data.symbol;const _errs13 = errors;let valid4 = false;let passing1 = null;const _errs14 = errors;if(typeof data2 === "string"){if(func1(data2) > 32){const err11 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/oneOf/0/maxLength",keyword:"maxLength",params:{limit: 32},message:"must NOT have more than 32 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(func1(data2) < 1){const err12 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/oneOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid1 = _errs14 === errors;if(_valid1){valid4 = true;passing1 = 0;}const _errs16 = errors;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.from === undefined){const err14 = {instancePath:instancePath+"/symbol",schemaPath:"#/$defs/dynamic/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}for(const key2 in data2){if(!(key2 === "from")){const err15 = {instancePath:instancePath+"/symbol",schemaPath:"#/$defs/dynamic/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.from !== undefined){let data3 = data2.from;if(typeof data3 === "string"){if(!pattern15.test(data3)){const err16 = {instancePath:instancePath+"/symbol/from",schemaPath:"#/$defs/dynamic/properties/from/pattern",keyword:"pattern",params:{pattern: "^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"},message:"must match pattern \""+"^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"+"\""};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/symbol/from",schemaPath:"#/$defs/dynamic/properties/from/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}else {const err18 = {instancePath:instancePath+"/symbol",schemaPath:"#/$defs/dynamic/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid1 = _errs16 === errors;if(_valid1 && valid4){valid4 = false;passing1 = [passing1, 1];}else {if(_valid1){valid4 = true;passing1 = 1;}}if(!valid4){const err19 = {instancePath:instancePath+"/symbol",schemaPath:"#/properties/symbol/oneOf",keyword:"oneOf",params:{passingSchemas: passing1},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}else {errors = _errs13;if(vErrors !== null){if(_errs13){vErrors.length = _errs13;}else {vErrors = null;}}}}}else {const err20 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema42 = {"type":"object","required":["unit"],"additionalProperties":false,"properties":{"unit":{"$ref":"#/$defs/time_unit"},"epoch":{"const":"unix"}}};const schema43 = {"enum":["ns","us","ms","s"]};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)){if(data.unit === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "unit"},message:"must have required property '"+"unit"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "unit") || (key0 === "epoch"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.unit !== undefined){let data0 = data.unit;if(!((((data0 === "ns") || (data0 === "us")) || (data0 === "ms")) || (data0 === "s"))){const err2 = {instancePath:instancePath+"/unit",schemaPath:"#/$defs/time_unit/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.epoch !== undefined){if("unix" !== data.epoch){const err3 = {instancePath:instancePath+"/epoch",schemaPath:"#/properties/epoch/const",keyword:"const",params:{allowedValue: "unix"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema44 = {"type":"object","required":["unit"],"additionalProperties":false,"properties":{"unit":{"$ref":"#/$defs/time_unit"}}};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate26.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.unit === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "unit"},message:"must have required property '"+"unit"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "unit")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.unit !== undefined){let data0 = data.unit;if(!((((data0 === "ns") || (data0 === "us")) || (data0 === "ms")) || (data0 === "s"))){const err2 = {instancePath:instancePath+"/unit",schemaPath:"#/$defs/time_unit/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate26.errors = vErrors;return errors === 0;}validate26.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema50 = {"type":"object","additionalProperties":false,"minProperties":1,"properties":{"min":{"$ref":"#/$defs/int_string"},"max":{"$ref":"#/$defs/int_string"},"min_len":{"type":"integer","minimum":0},"max_len":{"type":"integer","minimum":0}}};const schema51 = {"type":"string","pattern":"^(0|-?[1-9][0-9]*)$"};const pattern17 = new RegExp("^(0|-?[1-9][0-9]*)$", "u");function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length < 1){const err0 = {instancePath,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((((key0 === "min") || (key0 === "max")) || (key0 === "min_len")) || (key0 === "max_len"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.min !== undefined){let data0 = data.min;if(typeof data0 === "string"){if(!pattern17.test(data0)){const err2 = {instancePath:instancePath+"/min",schemaPath:"#/$defs/int_string/pattern",keyword:"pattern",params:{pattern: "^(0|-?[1-9][0-9]*)$"},message:"must match pattern \""+"^(0|-?[1-9][0-9]*)$"+"\""};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/min",schemaPath:"#/$defs/int_string/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.max !== undefined){let data1 = data.max;if(typeof data1 === "string"){if(!pattern17.test(data1)){const err4 = {instancePath:instancePath+"/max",schemaPath:"#/$defs/int_string/pattern",keyword:"pattern",params:{pattern: "^(0|-?[1-9][0-9]*)$"},message:"must match pattern \""+"^(0|-?[1-9][0-9]*)$"+"\""};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/max",schemaPath:"#/$defs/int_string/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.min_len !== undefined){let data2 = data.min_len;if(!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))){const err6 = {instancePath:instancePath+"/min_len",schemaPath:"#/properties/min_len/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if((typeof data2 == "number") && (isFinite(data2))){if(data2 < 0 || isNaN(data2)){const err7 = {instancePath:instancePath+"/min_len",schemaPath:"#/properties/min_len/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}if(data.max_len !== undefined){let data3 = data.max_len;if(!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))){const err8 = {instancePath:instancePath+"/max_len",schemaPath:"#/properties/max_len/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data3 == "number") && (isFinite(data3))){if(data3 < 0 || isNaN(data3)){const err9 = {instancePath:instancePath+"/max_len",schemaPath:"#/properties/max_len/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate28.errors = vErrors;return errors === 0;}validate28.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema53 = {"type":"object","required":["value","mode"],"additionalProperties":false,"properties":{"value":{"oneOf":[{"type":"string","description":"Candid textual literal, e.g. \"null\" or \"opt 0\""},{"$ref":"#/$defs/dynamic"}]},"mode":{"enum":["auto","suggest"]}}};function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.value === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.mode === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "value") || (key0 === "mode"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.value !== undefined){let data0 = data.value;const _errs3 = errors;let valid1 = false;let passing0 = null;const _errs4 = errors;if(typeof data0 !== "string"){const err3 = {instancePath:instancePath+"/value",schemaPath:"#/properties/value/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs4 === errors;if(_valid0){valid1 = true;passing0 = 0;}const _errs6 = errors;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.from === undefined){const err4 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/dynamic/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key1 in data0){if(!(key1 === "from")){const err5 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/dynamic/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data0.from !== undefined){let data1 = data0.from;if(typeof data1 === "string"){if(!pattern15.test(data1)){const err6 = {instancePath:instancePath+"/value/from",schemaPath:"#/$defs/dynamic/properties/from/pattern",keyword:"pattern",params:{pattern: "^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"},message:"must match pattern \""+"^(query:[A-Za-z_][A-Za-z0-9_]*|now|caller)$"+"\""};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/value/from",schemaPath:"#/$defs/dynamic/properties/from/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/dynamic/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}var _valid0 = _errs6 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;}}if(!valid1){const err9 = {instancePath:instancePath+"/value",schemaPath:"#/properties/value/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}}if(data.mode !== undefined){let data2 = data.mode;if(!((data2 === "auto") || (data2 === "suggest"))){const err10 = {instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues: schema53.properties.mode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}validate30.errors = vErrors;return errors === 0;}validate30.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema59 = {"type":"object","required":["mode","stamp"],"additionalProperties":false,"properties":{"mode":{"const":"replay_same_payload"},"stamp":{"$ref":"#/$defs/relpath"}}};const schema60 = {"type":"string","description":"Path relative to a method's argument tuple (or result tuple, for outcome/list.next/list.items). Starts with (i) when the tuple has more than one element; otherwise relative to element 0.","pattern":"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$","minLength":1};const pattern20 = new RegExp("^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$", "u");function validate32(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate32.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.mode === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.stamp === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "stamp"},message:"must have required property '"+"stamp"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "mode") || (key0 === "stamp"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.mode !== undefined){if("replay_same_payload" !== data.mode){const err3 = {instancePath:instancePath+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue: "replay_same_payload"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.stamp !== undefined){let data1 = data.stamp;if(typeof data1 === "string"){if(func1(data1) < 1){const err4 = {instancePath:instancePath+"/stamp",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(!pattern20.test(data1)){const err5 = {instancePath:instancePath+"/stamp",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/stamp",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate32.errors = vErrors;return errors === 0;}validate32.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema61 = {"type":"object","description":"classes, default or both: a result with no variant to select has default alone (spec 5.3, D-049)","minProperties":1,"additionalProperties":false,"properties":{"classes":{"type":"object","minProperties":1,"propertyNames":{"$ref":"#/$defs/relpath"},"additionalProperties":{"$ref":"#/$defs/outcome_class"}},"default":{"$ref":"#/$defs/outcome_class"}}};const schema63 = {"enum":["success","already_done","retry_same","retry_new","fix_input","fail"]};function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate34.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(Object.keys(data).length < 1){const err0 = {instancePath,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "classes") || (key0 === "default"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.classes !== undefined){let data0 = data.classes;if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(Object.keys(data0).length < 1){const err2 = {instancePath:instancePath+"/classes",schemaPath:"#/properties/classes/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key1 in data0){const _errs4 = errors;if(typeof key1 === "string"){if(func1(key1) < 1){const err3 = {instancePath:instancePath+"/classes",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters",propertyName:key1};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(!pattern20.test(key1)){const err4 = {instancePath:instancePath+"/classes",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\"",propertyName:key1};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/classes",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string",propertyName:key1};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}var valid1 = _errs4 === errors;if(!valid1){const err6 = {instancePath:instancePath+"/classes",schemaPath:"#/properties/classes/propertyNames",keyword:"propertyNames",params:{propertyName: key1},message:"property name must be valid"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}for(const key2 in data0){let data1 = data0[key2];if(!((((((data1 === "success") || (data1 === "already_done")) || (data1 === "retry_same")) || (data1 === "retry_new")) || (data1 === "fix_input")) || (data1 === "fail"))){const err7 = {instancePath:instancePath+"/classes/" + key2.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/$defs/outcome_class/enum",keyword:"enum",params:{allowedValues: schema63.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath:instancePath+"/classes",schemaPath:"#/properties/classes/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.default !== undefined){let data2 = data.default;if(!((((((data2 === "success") || (data2 === "already_done")) || (data2 === "retry_same")) || (data2 === "retry_new")) || (data2 === "fix_input")) || (data2 === "fail"))){const err9 = {instancePath:instancePath+"/default",schemaPath:"#/$defs/outcome_class/enum",keyword:"enum",params:{allowedValues: schema63.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}}else {const err10 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}validate34.errors = vErrors;return errors === 0;}validate34.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema65 = {"type":"object","required":["cursor","next","items"],"additionalProperties":false,"properties":{"cursor":{"$ref":"#/$defs/relpath"},"next":{"$ref":"#/$defs/relpath"},"items":{"$ref":"#/$defs/relpath"}}};function validate36(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate36.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.cursor === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "cursor"},message:"must have required property '"+"cursor"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.next === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "next"},message:"must have required property '"+"next"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.items === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((key0 === "cursor") || (key0 === "next")) || (key0 === "items"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.cursor !== undefined){let data0 = data.cursor;if(typeof data0 === "string"){if(func1(data0) < 1){const err4 = {instancePath:instancePath+"/cursor",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(!pattern20.test(data0)){const err5 = {instancePath:instancePath+"/cursor",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/cursor",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.next !== undefined){let data1 = data.next;if(typeof data1 === "string"){if(func1(data1) < 1){const err7 = {instancePath:instancePath+"/next",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(!pattern20.test(data1)){const err8 = {instancePath:instancePath+"/next",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/next",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.items !== undefined){let data2 = data.items;if(typeof data2 === "string"){if(func1(data2) < 1){const err10 = {instancePath:instancePath+"/items",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(!pattern20.test(data2)){const err11 = {instancePath:instancePath+"/items",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/items",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}validate36.errors = vErrors;return errors === 0;}validate36.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema69 = {"type":"object","required":["set","items","name","value"],"additionalProperties":false,"description":"A method that lists named things (spec 5.3, D-045). items is a results relpath to a vec of records; name, value, show and kind are paths inside one item.","properties":{"set":{"$ref":"#/$defs/set_name"},"items":{"$ref":"#/$defs/relpath"},"name":{"$ref":"#/$defs/relpath"},"value":{"$ref":"#/$defs/relpath"},"show":{"$ref":"#/$defs/relpath"},"kind":{"$ref":"#/$defs/relpath"}}};const schema70 = {"type":"string","pattern":"^[a-z][a-z0-9_]*$","maxLength":64,"description":"A names set's name, which named tags refer to."};const pattern25 = new RegExp("^[a-z][a-z0-9_]*$", "u");function validate38(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate38.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.set === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "set"},message:"must have required property '"+"set"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.items === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.name === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.value === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((((key0 === "set") || (key0 === "items")) || (key0 === "name")) || (key0 === "value")) || (key0 === "show")) || (key0 === "kind"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.set !== undefined){let data0 = data.set;if(typeof data0 === "string"){if(func1(data0) > 64){const err5 = {instancePath:instancePath+"/set",schemaPath:"#/$defs/set_name/maxLength",keyword:"maxLength",params:{limit: 64},message:"must NOT have more than 64 characters"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(!pattern25.test(data0)){const err6 = {instancePath:instancePath+"/set",schemaPath:"#/$defs/set_name/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9_]*$"},message:"must match pattern \""+"^[a-z][a-z0-9_]*$"+"\""};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/set",schemaPath:"#/$defs/set_name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.items !== undefined){let data1 = data.items;if(typeof data1 === "string"){if(func1(data1) < 1){const err8 = {instancePath:instancePath+"/items",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(!pattern20.test(data1)){const err9 = {instancePath:instancePath+"/items",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/items",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.name !== undefined){let data2 = data.name;if(typeof data2 === "string"){if(func1(data2) < 1){const err11 = {instancePath:instancePath+"/name",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(!pattern20.test(data2)){const err12 = {instancePath:instancePath+"/name",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+"/name",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.value !== undefined){let data3 = data.value;if(typeof data3 === "string"){if(func1(data3) < 1){const err14 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(!pattern20.test(data3)){const err15 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.show !== undefined){let data4 = data.show;if(typeof data4 === "string"){if(func1(data4) < 1){const err17 = {instancePath:instancePath+"/show",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(!pattern20.test(data4)){const err18 = {instancePath:instancePath+"/show",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/show",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.kind !== undefined){let data5 = data.kind;if(typeof data5 === "string"){if(func1(data5) < 1){const err20 = {instancePath:instancePath+"/kind",schemaPath:"#/$defs/relpath/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(!pattern20.test(data5)){const err21 = {instancePath:instancePath+"/kind",schemaPath:"#/$defs/relpath/pattern",keyword:"pattern",params:{pattern: "^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(\\((0|[1-9][0-9]*)\\))?(\\.?([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9}))|\\[\\])?((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/kind",schemaPath:"#/$defs/relpath/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate38.errors = vErrors;return errors === 0;}validate38.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema76 = {"type":"object","required":["set"],"additionalProperties":false,"description":"A position a name from a names set can stand for (spec 5.3, D-045).","properties":{"set":{"$ref":"#/$defs/set_name"},"by":{"enum":["value","show"]}}};function validate40(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate40.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.set === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "set"},message:"must have required property '"+"set"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "set") || (key0 === "by"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.set !== undefined){let data0 = data.set;if(typeof data0 === "string"){if(func1(data0) > 64){const err2 = {instancePath:instancePath+"/set",schemaPath:"#/$defs/set_name/maxLength",keyword:"maxLength",params:{limit: 64},message:"must NOT have more than 64 characters"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(!pattern25.test(data0)){const err3 = {instancePath:instancePath+"/set",schemaPath:"#/$defs/set_name/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9_]*$"},message:"must match pattern \""+"^[a-z][a-z0-9_]*$"+"\""};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/set",schemaPath:"#/$defs/set_name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.by !== undefined){let data1 = data.by;if(!((data1 === "value") || (data1 === "show"))){const err5 = {instancePath:instancePath+"/by",schemaPath:"#/properties/by/enum",keyword:"enum",params:{allowedValues: schema76.properties.by.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate40.errors = vErrors;return errors === 0;}validate40.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};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;}const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){let data0 = data.tag;if(!((((((data0 === "intent") || (data0 === "effect")) || (data0 === "idempotency")) || (data0 === "outcome")) || (data0 === "list")) || (data0 === "names"))){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.at !== undefined){let data1 = data.at;if(typeof data1 === "string"){if(!pattern11.test(data1)){const err1 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/method_address/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z_][A-Za-z0-9_]*$"},message:"must match pattern \""+"^[A-Za-z_][A-Za-z0-9_]*$"+"\""};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}else {const err2 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/method_address/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.at = true;props0.tag = true;}}if(!valid1){const err3 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}const _errs10 = errors;let valid5 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){let data2 = data.tag;if(!(((((((((((data2 === "amount") || (data2 === "timestamp")) || (data2 === "duration")) || (data2 === "account")) || (data2 === "subaccount")) || (data2 === "bytes")) || (data2 === "text")) || (data2 === "range")) || (data2 === "default")) || (data2 === "ui")) || (data2 === "named"))){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.at !== undefined){let data3 = data.at;if(typeof data3 === "string"){if(!pattern12.test(data3)){const err5 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/value_address/pattern",keyword:"pattern",params:{pattern: "^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/value_address/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}var _valid1 = _errs13 === errors;valid5 = _valid1;if(valid5){var props1 = {};props1.at = true;props1.tag = true;}}if(!valid5){const err7 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(props0 !== true && props1 !== undefined){if(props1 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props1);}}const _errs18 = errors;let valid9 = true;const _errs19 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("describe" !== data.tag){const err8 = {};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}var _valid2 = _errs19 === errors;errors = _errs18;if(vErrors !== null){if(_errs18){vErrors.length = _errs18;}else {vErrors = null;}}if(_valid2){const _errs21 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.at !== undefined){let data5 = data.at;const _errs23 = errors;let valid12 = false;const _errs24 = errors;if(typeof data5 === "string"){if(!pattern12.test(data5)){const err9 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/value_address/pattern",keyword:"pattern",params:{pattern: "^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"},message:"must match pattern \""+"^(([A-Za-z_][A-Za-z0-9_]*)(\\((0|[1-9][0-9]*)\\)|->\\((0|[1-9][0-9]*)\\))|type:[A-Za-z_][A-Za-z0-9_]*)((\\.([A-Za-z_][A-Za-z0-9_]*|#(0|[1-9][0-9]{0,9})))|\\[\\])*$"+"\""};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/value_address/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}var _valid3 = _errs24 === errors;valid12 = valid12 || _valid3;const _errs27 = errors;if(typeof data5 === "string"){if(!pattern11.test(data5)){const err11 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/method_address/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z_][A-Za-z0-9_]*$"},message:"must match pattern \""+"^[A-Za-z_][A-Za-z0-9_]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/at",schemaPath:"#/$defs/method_address/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid3 = _errs27 === errors;valid12 = valid12 || _valid3;if(!valid12){const err13 = {instancePath:instancePath+"/at",schemaPath:"#/allOf/2/then/properties/at/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs23;if(vErrors !== null){if(_errs23){vErrors.length = _errs23;}else {vErrors = null;}}}}}var _valid2 = _errs21 === errors;valid9 = _valid2;if(valid9){var props2 = {};props2.at = true;props2.tag = true;}}if(!valid9){const err14 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(props0 !== true && props2 !== undefined){if(props2 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props2);}}const _errs31 = errors;let valid15 = true;const _errs32 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("amount" !== data.tag){const err15 = {};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}var _valid4 = _errs32 === errors;errors = _errs31;if(vErrors !== null){if(_errs31){vErrors.length = _errs31;}else {vErrors = null;}}if(_valid4){const _errs34 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate22(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}}var _valid4 = _errs34 === errors;valid15 = _valid4;if(valid15){var props3 = {};props3.args = true;props3.tag = true;}}if(!valid15){const err16 = {instancePath,schemaPath:"#/allOf/3/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(props0 !== true && props3 !== undefined){if(props3 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props3);}}const _errs37 = errors;let valid18 = true;const _errs38 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("timestamp" !== data.tag){const err17 = {};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}var _valid5 = _errs38 === errors;errors = _errs37;if(vErrors !== null){if(_errs37){vErrors.length = _errs37;}else {vErrors = null;}}if(_valid5){const _errs40 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate24(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}}}var _valid5 = _errs40 === errors;valid18 = _valid5;if(valid18){var props4 = {};props4.args = true;props4.tag = true;}}if(!valid18){const err18 = {instancePath,schemaPath:"#/allOf/4/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(props0 !== true && props4 !== undefined){if(props4 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props4);}}const _errs43 = errors;let valid21 = true;const _errs44 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("duration" !== data.tag){const err19 = {};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}var _valid6 = _errs44 === errors;errors = _errs43;if(vErrors !== null){if(_errs43){vErrors.length = _errs43;}else {vErrors = null;}}if(_valid6){const _errs46 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate26(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}var _valid6 = _errs46 === errors;valid21 = _valid6;if(valid21){var props5 = {};props5.args = true;props5.tag = true;}}if(!valid21){const err20 = {instancePath,schemaPath:"#/allOf/5/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(props0 !== true && props5 !== undefined){if(props5 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props5);}}const _errs49 = errors;let valid24 = true;const _errs50 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("account" !== data.tag){const err21 = {};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}var _valid7 = _errs50 === errors;errors = _errs49;if(vErrors !== null){if(_errs49){vErrors.length = _errs49;}else {vErrors = null;}}if(_valid7){const _errs52 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data13 = data.args;if(data13 && typeof data13 == "object" && !Array.isArray(data13)){for(const key0 in data13){if(!(key0 === "encoding")){const err22 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_account/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data13.encoding !== undefined){if("icrc1" !== data13.encoding){const err23 = {instancePath:instancePath+"/args/encoding",schemaPath:"#/$defs/args_account/properties/encoding/const",keyword:"const",params:{allowedValue: "icrc1"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_account/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}var _valid7 = _errs52 === errors;valid24 = _valid7;if(valid24){var props6 = {};props6.args = true;props6.tag = true;}}if(!valid24){const err25 = {instancePath,schemaPath:"#/allOf/6/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(props0 !== true && props6 !== undefined){if(props6 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props6);}}const _errs59 = errors;let valid29 = true;const _errs60 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("subaccount" !== data.tag){const err26 = {};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}}var _valid8 = _errs60 === errors;errors = _errs59;if(vErrors !== null){if(_errs59){vErrors.length = _errs59;}else {vErrors = null;}}if(_valid8){const _errs62 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data16 = data.args;if(data16 && typeof data16 == "object" && !Array.isArray(data16)){if(Object.keys(data16).length > 0){const err27 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_empty/maxProperties",keyword:"maxProperties",params:{limit: 0},message:"must NOT have more than 0 properties"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}for(const key1 in data16){const err28 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_empty/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else {const err29 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_empty/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}}var _valid8 = _errs62 === errors;valid29 = _valid8;if(valid29){var props7 = {};props7.args = true;props7.tag = true;}}if(!valid29){const err30 = {instancePath,schemaPath:"#/allOf/7/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(props0 !== true && props7 !== undefined){if(props7 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props7);}}const _errs68 = errors;let valid33 = true;const _errs69 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("bytes" !== data.tag){const err31 = {};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}}var _valid9 = _errs69 === errors;errors = _errs68;if(vErrors !== null){if(_errs68){vErrors.length = _errs68;}else {vErrors = null;}}if(_valid9){const _errs71 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data18 = data.args;if(data18 && typeof data18 == "object" && !Array.isArray(data18)){if(data18.encoding === undefined){const err32 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_bytes/required",keyword:"required",params:{missingProperty: "encoding"},message:"must have required property '"+"encoding"+"'"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}for(const key2 in data18){if(!((key2 === "encoding") || (key2 === "max_len"))){const err33 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_bytes/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data18.encoding !== undefined){let data19 = data18.encoding;if(!(((data19 === "utf8") || (data19 === "hex")) || (data19 === "base64"))){const err34 = {instancePath:instancePath+"/args/encoding",schemaPath:"#/$defs/args_bytes/properties/encoding/enum",keyword:"enum",params:{allowedValues: schema48.properties.encoding.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data18.max_len !== undefined){let data20 = data18.max_len;if(!(((typeof data20 == "number") && (!(data20 % 1) && !isNaN(data20))) && (isFinite(data20)))){const err35 = {instancePath:instancePath+"/args/max_len",schemaPath:"#/$defs/args_bytes/properties/max_len/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if((typeof data20 == "number") && (isFinite(data20))){if(data20 < 0 || isNaN(data20)){const err36 = {instancePath:instancePath+"/args/max_len",schemaPath:"#/$defs/args_bytes/properties/max_len/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}}else {const err37 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_bytes/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}var _valid9 = _errs71 === errors;valid33 = _valid9;if(valid33){var props8 = {};props8.args = true;props8.tag = true;}}if(!valid33){const err38 = {instancePath,schemaPath:"#/allOf/8/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(props0 !== true && props8 !== undefined){if(props8 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props8);}}const _errs80 = errors;let valid38 = true;const _errs81 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("text" !== data.tag){const err39 = {};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}}var _valid10 = _errs81 === errors;errors = _errs80;if(vErrors !== null){if(_errs80){vErrors.length = _errs80;}else {vErrors = null;}}if(_valid10){const _errs83 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data22 = data.args;if(data22 && typeof data22 == "object" && !Array.isArray(data22)){if(Object.keys(data22).length < 1){const err40 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_text/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}for(const key3 in data22){if(!(((key3 === "format") || (key3 === "max_len")) || (key3 === "pattern"))){const err41 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_text/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data22.format !== undefined){let data23 = data22.format;if(!((((data23 === "plain") || (data23 === "markdown")) || (data23 === "email")) || (data23 === "url"))){const err42 = {instancePath:instancePath+"/args/format",schemaPath:"#/$defs/args_text/properties/format/enum",keyword:"enum",params:{allowedValues: schema49.properties.format.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data22.max_len !== undefined){let data24 = data22.max_len;if(!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))){const err43 = {instancePath:instancePath+"/args/max_len",schemaPath:"#/$defs/args_text/properties/max_len/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err44 = {instancePath:instancePath+"/args/max_len",schemaPath:"#/$defs/args_text/properties/max_len/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}}if(data22.pattern !== undefined){if(typeof data22.pattern !== "string"){const err45 = {instancePath:instancePath+"/args/pattern",schemaPath:"#/$defs/args_text/properties/pattern/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}}else {const err46 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_text/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}}var _valid10 = _errs83 === errors;valid38 = _valid10;if(valid38){var props9 = {};props9.args = true;props9.tag = true;}}if(!valid38){const err47 = {instancePath,schemaPath:"#/allOf/9/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if(props0 !== true && props9 !== undefined){if(props9 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props9);}}const _errs94 = errors;let valid43 = true;const _errs95 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("range" !== data.tag){const err48 = {};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}}var _valid11 = _errs95 === errors;errors = _errs94;if(vErrors !== null){if(_errs94){vErrors.length = _errs94;}else {vErrors = null;}}if(_valid11){const _errs97 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate28(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}}var _valid11 = _errs97 === errors;valid43 = _valid11;if(valid43){var props10 = {};props10.args = true;props10.tag = true;}}if(!valid43){const err49 = {instancePath,schemaPath:"#/allOf/10/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if(props0 !== true && props10 !== undefined){if(props10 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props10);}}const _errs100 = errors;let valid46 = true;const _errs101 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("default" !== data.tag){const err50 = {};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}}var _valid12 = _errs101 === errors;errors = _errs100;if(vErrors !== null){if(_errs100){vErrors.length = _errs100;}else {vErrors = null;}}if(_valid12){const _errs103 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate30(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}}var _valid12 = _errs103 === errors;valid46 = _valid12;if(valid46){var props11 = {};props11.args = true;props11.tag = true;}}if(!valid46){const err51 = {instancePath,schemaPath:"#/allOf/11/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(props0 !== true && props11 !== undefined){if(props11 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props11);}}const _errs106 = errors;let valid49 = true;const _errs107 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("describe" !== data.tag){const err52 = {};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}var _valid13 = _errs107 === errors;errors = _errs106;if(vErrors !== null){if(_errs106){vErrors.length = _errs106;}else {vErrors = null;}}if(_valid13){const _errs109 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data31 = data.args;if(data31 && typeof data31 == "object" && !Array.isArray(data31)){if(Object.keys(data31).length < 1){const err53 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_describe/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}for(const key4 in data31){if(!((key4 === "label") || (key4 === "help"))){const err54 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_describe/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data31.label !== undefined){let data32 = data31.label;if(typeof data32 === "string"){if(func1(data32) > 80){const err55 = {instancePath:instancePath+"/args/label",schemaPath:"#/$defs/args_describe/properties/label/maxLength",keyword:"maxLength",params:{limit: 80},message:"must NOT have more than 80 characters"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if(func1(data32) < 1){const err56 = {instancePath:instancePath+"/args/label",schemaPath:"#/$defs/args_describe/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}else {const err57 = {instancePath:instancePath+"/args/label",schemaPath:"#/$defs/args_describe/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}if(data31.help !== undefined){let data33 = data31.help;if(typeof data33 === "string"){if(func1(data33) > 2000){const err58 = {instancePath:instancePath+"/args/help",schemaPath:"#/$defs/args_describe/properties/help/maxLength",keyword:"maxLength",params:{limit: 2000},message:"must NOT have more than 2000 characters"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(func1(data33) < 1){const err59 = {instancePath:instancePath+"/args/help",schemaPath:"#/$defs/args_describe/properties/help/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}else {const err60 = {instancePath:instancePath+"/args/help",schemaPath:"#/$defs/args_describe/properties/help/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}}else {const err61 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_describe/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}}var _valid13 = _errs109 === errors;valid49 = _valid13;if(valid49){var props12 = {};props12.args = true;props12.tag = true;}}if(!valid49){const err62 = {instancePath,schemaPath:"#/allOf/12/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}if(props0 !== true && props12 !== undefined){if(props12 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props12);}}const _errs119 = errors;let valid54 = true;const _errs120 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("ui" !== data.tag){const err63 = {};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}}var _valid14 = _errs120 === errors;errors = _errs119;if(vErrors !== null){if(_errs119){vErrors.length = _errs119;}else {vErrors = null;}}if(_valid14){const _errs122 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data35 = data.args;if(data35 && typeof data35 == "object" && !Array.isArray(data35)){if(Object.keys(data35).length < 1){const err64 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_ui/minProperties",keyword:"minProperties",params:{limit: 1},message:"must NOT have fewer than 1 properties"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}for(const key5 in data35){if(!((((key5 === "order") || (key5 === "group")) || (key5 === "hidden")) || (key5 === "widget"))){const err65 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_ui/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data35.order !== undefined){let data36 = data35.order;if(!(((typeof data36 == "number") && (!(data36 % 1) && !isNaN(data36))) && (isFinite(data36)))){const err66 = {instancePath:instancePath+"/args/order",schemaPath:"#/$defs/args_ui/properties/order/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}if(data35.group !== undefined){if(typeof data35.group !== "string"){const err67 = {instancePath:instancePath+"/args/group",schemaPath:"#/$defs/args_ui/properties/group/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data35.hidden !== undefined){if(typeof data35.hidden !== "boolean"){const err68 = {instancePath:instancePath+"/args/hidden",schemaPath:"#/$defs/args_ui/properties/hidden/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data35.widget !== undefined){if(typeof data35.widget !== "string"){const err69 = {instancePath:instancePath+"/args/widget",schemaPath:"#/$defs/args_ui/properties/widget/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}}else {const err70 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_ui/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}var _valid14 = _errs122 === errors;valid54 = _valid14;if(valid54){var props13 = {};props13.args = true;props13.tag = true;}}if(!valid54){const err71 = {instancePath,schemaPath:"#/allOf/13/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if(props0 !== true && props13 !== undefined){if(props13 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props13);}}const _errs136 = errors;let valid59 = true;const _errs137 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("intent" !== data.tag){const err72 = {};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}}var _valid15 = _errs137 === errors;errors = _errs136;if(vErrors !== null){if(_errs136){vErrors.length = _errs136;}else {vErrors = null;}}if(_valid15){const _errs139 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data41 = data.args;if(data41 && typeof data41 == "object" && !Array.isArray(data41)){if(data41.title === undefined){const err73 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_intent/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}if(data41.template === undefined){const err74 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_intent/required",keyword:"required",params:{missingProperty: "template"},message:"must have required property '"+"template"+"'"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}for(const key6 in data41){if(!((key6 === "title") || (key6 === "template"))){const err75 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_intent/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data41.title !== undefined){let data42 = data41.title;if(typeof data42 === "string"){if(func1(data42) > 60){const err76 = {instancePath:instancePath+"/args/title",schemaPath:"#/$defs/args_intent/properties/title/maxLength",keyword:"maxLength",params:{limit: 60},message:"must NOT have more than 60 characters"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}if(func1(data42) < 1){const err77 = {instancePath:instancePath+"/args/title",schemaPath:"#/$defs/args_intent/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}else {const err78 = {instancePath:instancePath+"/args/title",schemaPath:"#/$defs/args_intent/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data41.template !== undefined){let data43 = data41.template;if(typeof data43 === "string"){if(func1(data43) > 500){const err79 = {instancePath:instancePath+"/args/template",schemaPath:"#/$defs/args_intent/properties/template/maxLength",keyword:"maxLength",params:{limit: 500},message:"must NOT have more than 500 characters"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(func1(data43) < 1){const err80 = {instancePath:instancePath+"/args/template",schemaPath:"#/$defs/args_intent/properties/template/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}else {const err81 = {instancePath:instancePath+"/args/template",schemaPath:"#/$defs/args_intent/properties/template/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}}else {const err82 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_intent/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}}var _valid15 = _errs139 === errors;valid59 = _valid15;if(valid59){var props14 = {};props14.args = true;props14.tag = true;}}if(!valid59){const err83 = {instancePath,schemaPath:"#/allOf/14/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(props0 !== true && props14 !== undefined){if(props14 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props14);}}const _errs149 = errors;let valid64 = true;const _errs150 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("effect" !== data.tag){const err84 = {};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}}var _valid16 = _errs150 === errors;errors = _errs149;if(vErrors !== null){if(_errs149){vErrors.length = _errs149;}else {vErrors = null;}}if(_valid16){const _errs152 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){let data45 = data.args;if(data45 && typeof data45 == "object" && !Array.isArray(data45)){if(data45.kind === undefined){const err85 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_effect/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data45.irreversible === undefined){const err86 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_effect/required",keyword:"required",params:{missingProperty: "irreversible"},message:"must have required property '"+"irreversible"+"'"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}for(const key7 in data45){if(!(((key7 === "kind") || (key7 === "irreversible")) || (key7 === "replicated"))){const err87 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_effect/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}if(data45.kind !== undefined){let data46 = data45.kind;if(!((((((data46 === "read") || (data46 === "write")) || (data46 === "transfer")) || (data46 === "approve")) || (data46 === "admin")) || (data46 === "destroy"))){const err88 = {instancePath:instancePath+"/args/kind",schemaPath:"#/$defs/args_effect/properties/kind/enum",keyword:"enum",params:{allowedValues: schema58.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}if(data45.irreversible !== undefined){if(typeof data45.irreversible !== "boolean"){const err89 = {instancePath:instancePath+"/args/irreversible",schemaPath:"#/$defs/args_effect/properties/irreversible/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data45.replicated !== undefined){if(typeof data45.replicated !== "boolean"){const err90 = {instancePath:instancePath+"/args/replicated",schemaPath:"#/$defs/args_effect/properties/replicated/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}}else {const err91 = {instancePath:instancePath+"/args",schemaPath:"#/$defs/args_effect/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}}var _valid16 = _errs152 === errors;valid64 = _valid16;if(valid64){var props15 = {};props15.args = true;props15.tag = true;}}if(!valid64){const err92 = {instancePath,schemaPath:"#/allOf/15/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if(props0 !== true && props15 !== undefined){if(props15 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props15);}}const _errs163 = errors;let valid69 = true;const _errs164 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("idempotency" !== data.tag){const err93 = {};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}}var _valid17 = _errs164 === errors;errors = _errs163;if(vErrors !== null){if(_errs163){vErrors.length = _errs163;}else {vErrors = null;}}if(_valid17){const _errs166 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate32(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);errors = vErrors.length;}}}var _valid17 = _errs166 === errors;valid69 = _valid17;if(valid69){var props16 = {};props16.args = true;props16.tag = true;}}if(!valid69){const err94 = {instancePath,schemaPath:"#/allOf/16/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(props0 !== true && props16 !== undefined){if(props16 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props16);}}const _errs169 = errors;let valid72 = true;const _errs170 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("outcome" !== data.tag){const err95 = {};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}}var _valid18 = _errs170 === errors;errors = _errs169;if(vErrors !== null){if(_errs169){vErrors.length = _errs169;}else {vErrors = null;}}if(_valid18){const _errs172 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate34(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}}var _valid18 = _errs172 === errors;valid72 = _valid18;if(valid72){var props17 = {};props17.args = true;props17.tag = true;}}if(!valid72){const err96 = {instancePath,schemaPath:"#/allOf/17/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}if(props0 !== true && props17 !== undefined){if(props17 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props17);}}const _errs175 = errors;let valid75 = true;const _errs176 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("list" !== data.tag){const err97 = {};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}}var _valid19 = _errs176 === errors;errors = _errs175;if(vErrors !== null){if(_errs175){vErrors.length = _errs175;}else {vErrors = null;}}if(_valid19){const _errs178 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate36(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate36.errors : vErrors.concat(validate36.errors);errors = vErrors.length;}}}var _valid19 = _errs178 === errors;valid75 = _valid19;if(valid75){var props18 = {};props18.args = true;props18.tag = true;}}if(!valid75){const err98 = {instancePath,schemaPath:"#/allOf/18/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}if(props0 !== true && props18 !== undefined){if(props18 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props18);}}const _errs181 = errors;let valid78 = true;const _errs182 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("names" !== data.tag){const err99 = {};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}var _valid20 = _errs182 === errors;errors = _errs181;if(vErrors !== null){if(_errs181){vErrors.length = _errs181;}else {vErrors = null;}}if(_valid20){const _errs184 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate38(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate38.errors : vErrors.concat(validate38.errors);errors = vErrors.length;}}}var _valid20 = _errs184 === errors;valid78 = _valid20;if(valid78){var props19 = {};props19.args = true;props19.tag = true;}}if(!valid78){const err100 = {instancePath,schemaPath:"#/allOf/19/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}if(props0 !== true && props19 !== undefined){if(props19 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props19);}}const _errs187 = errors;let valid81 = true;const _errs188 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.tag !== undefined){if("named" !== data.tag){const err101 = {};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}}var _valid21 = _errs188 === errors;errors = _errs187;if(vErrors !== null){if(_errs187){vErrors.length = _errs187;}else {vErrors = null;}}if(_valid21){const _errs190 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.args !== undefined){if(!(validate40(data.args, {instancePath:instancePath+"/args",parentData:data,parentDataProperty:"args",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);errors = vErrors.length;}}}var _valid21 = _errs190 === errors;valid81 = _valid21;if(valid81){var props20 = {};props20.args = true;props20.tag = true;}}if(!valid81){const err102 = {instancePath,schemaPath:"#/allOf/20/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}if(props0 !== true && props20 !== undefined){if(props20 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props20);}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.at === undefined){const err103 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "at"},message:"must have required property '"+"at"+"'"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}if(data.tag === undefined){const err104 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "tag"},message:"must have required property '"+"tag"+"'"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}if(data.args === undefined){const err105 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "args"},message:"must have required property '"+"args"+"'"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}for(const key8 in data){if(!((((key8 === "at") || (key8 === "tag")) || (key8 === "args")) || (key8 === "note"))){const err106 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data.at !== undefined){if(typeof data.at !== "string"){const err107 = {instancePath:instancePath+"/at",schemaPath:"#/properties/at/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}if(data.tag !== undefined){let data60 = data.tag;if(!((((((((((((((((((data60 === "amount") || (data60 === "timestamp")) || (data60 === "duration")) || (data60 === "account")) || (data60 === "subaccount")) || (data60 === "bytes")) || (data60 === "text")) || (data60 === "range")) || (data60 === "default")) || (data60 === "describe")) || (data60 === "ui")) || (data60 === "intent")) || (data60 === "effect")) || (data60 === "idempotency")) || (data60 === "outcome")) || (data60 === "list")) || (data60 === "names")) || (data60 === "named"))){const err108 = {instancePath:instancePath+"/tag",schemaPath:"#/properties/tag/enum",keyword:"enum",params:{allowedValues: schema34.properties.tag.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}if(data.args !== undefined){let data61 = data.args;if(!(data61 && typeof data61 == "object" && !Array.isArray(data61))){const err109 = {instancePath:instancePath+"/args",schemaPath:"#/properties/args/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data.note !== undefined){if(typeof data.note !== "string"){const err110 = {instancePath:instancePath+"/note",schemaPath:"#/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}}else {const err111 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}validate21.errors = vErrors;return errors === 0;}validate21.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="urn:candid-profile:v0:schema" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind !== undefined){if("pack" !== data.kind){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.origin !== undefined){if("pack" !== data.origin){const err1 = {instancePath:instancePath+"/origin",schemaPath:"#/allOf/0/then/properties/origin/const",keyword:"const",params:{allowedValue: "pack"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.binds !== undefined){let data2 = data.binds;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.standard === undefined){const err2 = {instancePath:instancePath+"/binds",schemaPath:"#/$defs/pack_binds/required",keyword:"required",params:{missingProperty: "standard"},message:"must have required property '"+"standard"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data2.requires === undefined){const err3 = {instancePath:instancePath+"/binds",schemaPath:"#/$defs/pack_binds/required",keyword:"required",params:{missingProperty: "requires"},message:"must have required property '"+"requires"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data2){if(!(((key0 === "standard") || (key0 === "spec_url")) || (key0 === "requires"))){const err4 = {instancePath:instancePath+"/binds",schemaPath:"#/$defs/pack_binds/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data2.standard !== undefined){let data3 = data2.standard;if(typeof data3 === "string"){if(!pattern4.test(data3)){const err5 = {instancePath:instancePath+"/binds/standard",schemaPath:"#/$defs/pack_binds/properties/standard/pattern",keyword:"pattern",params:{pattern: "^[A-Z]+-[0-9]+$"},message:"must match pattern \""+"^[A-Z]+-[0-9]+$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/binds/standard",schemaPath:"#/$defs/pack_binds/properties/standard/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data2.spec_url !== undefined){let data4 = data2.spec_url;if(typeof data4 === "string"){if(!pattern5.test(data4)){const err7 = {instancePath:instancePath+"/binds/spec_url",schemaPath:"#/$defs/pack_binds/properties/spec_url/pattern",keyword:"pattern",params:{pattern: "^https://"},message:"must match pattern \""+"^https://"+"\""};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}else {const err8 = {instancePath:instancePath+"/binds/spec_url",schemaPath:"#/$defs/pack_binds/properties/spec_url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data2.requires !== undefined){let data5 = data2.requires;if(typeof data5 === "string"){if(func1(data5) < 10){const err9 = {instancePath:instancePath+"/binds/requires",schemaPath:"#/$defs/pack_binds/properties/requires/minLength",keyword:"minLength",params:{limit: 10},message:"must NOT have fewer than 10 characters"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/binds/requires",schemaPath:"#/$defs/pack_binds/properties/requires/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath:instancePath+"/binds",schemaPath:"#/$defs/pack_binds/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}var _valid0 = _errs5 === errors;valid1 = _valid0;if(valid1){var props0 = {};props0.origin = true;props0.binds = true;props0.kind = true;}}if(!valid1){const err12 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}const _errs18 = errors;let valid6 = true;const _errs19 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind !== undefined){if("canister" !== data.kind){const err13 = {};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}var _valid1 = _errs19 === errors;errors = _errs18;if(vErrors !== null){if(_errs18){vErrors.length = _errs18;}else {vErrors = null;}}if(_valid1){const _errs21 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.origin !== undefined){let data7 = data.origin;if(!(((data7 === "author") || (data7 === "third_party")) || (data7 === "inferred"))){const err14 = {instancePath:instancePath+"/origin",schemaPath:"#/allOf/1/then/properties/origin/enum",keyword:"enum",params:{allowedValues: schema31.allOf[1].then.properties.origin.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.binds !== undefined){let data8 = data.binds;if(data8 && typeof data8 == "object" && !Array.isArray(data8)){if(data8.interface_id === undefined){const err15 = {instancePath:instancePath+"/binds",schemaPath:"#/$defs/canister_binds/required",keyword:"required",params:{missingProperty: "interface_id"},message:"must have required property '"+"interface_id"+"'"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}for(const key1 in data8){if(!(((key1 === "interface_id") || (key1 === "contract_id")) || (key1 === "canister_id"))){const err16 = {instancePath:instancePath+"/binds",schemaPath:"#/$defs/canister_binds/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data8.interface_id !== undefined){let data9 = data8.interface_id;if(typeof data9 === "string"){if(!pattern6.test(data9)){const err17 = {instancePath:instancePath+"/binds/interface_id",schemaPath:"#/$defs/canister_binds/properties/interface_id/pattern",keyword:"pattern",params:{pattern: "^candid-core:interface:v1:sha256:[0-9a-f]{64}$"},message:"must match pattern \""+"^candid-core:interface:v1:sha256:[0-9a-f]{64}$"+"\""};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/binds/interface_id",schemaPath:"#/$defs/canister_binds/properties/interface_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data8.contract_id !== undefined){let data10 = data8.contract_id;if(typeof data10 === "string"){if(!pattern7.test(data10)){const err19 = {instancePath:instancePath+"/binds/contract_id",schemaPath:"#/$defs/canister_binds/properties/contract_id/pattern",keyword:"pattern",params:{pattern: "^candid-core:contract:v1:sha256:[0-9a-f]{64}$"},message:"must match pattern \""+"^candid-core:contract:v1:sha256:[0-9a-f]{64}$"+"\""};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/binds/contract_id",schemaPath:"#/$defs/canister_binds/properties/contract_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data8.canister_id !== undefined){let data11 = data8.canister_id;if(typeof data11 === "string"){if(!pattern8.test(data11)){const err21 = {instancePath:instancePath+"/binds/canister_id",schemaPath:"#/$defs/canister_binds/properties/canister_id/pattern",keyword:"pattern",params:{pattern: "^[a-z0-9]{5}(-[a-z0-9]{5})*(-[a-z0-9]{1,5})?$"},message:"must match pattern \""+"^[a-z0-9]{5}(-[a-z0-9]{5})*(-[a-z0-9]{1,5})?$"+"\""};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/binds/canister_id",schemaPath:"#/$defs/canister_binds/properties/canister_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath:instancePath+"/binds",schemaPath:"#/$defs/canister_binds/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}var _valid1 = _errs21 === errors;valid6 = _valid1;if(valid6){var props1 = {};props1.origin = true;props1.binds = true;props1.kind = true;}}if(!valid6){const err24 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(props0 !== true && props1 !== undefined){if(props1 === true){props0 = true;}else {props0 = props0 || {};Object.assign(props0, props1);}}if(data && typeof data == "object" && !Array.isArray(data)){if(data.format === undefined){const err25 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "format"},message:"must have required property '"+"format"+"'"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}if(data.format_version === undefined){const err26 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "format_version"},message:"must have required property '"+"format_version"+"'"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(data.kind === undefined){const err27 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data.name === undefined){const err28 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data.origin === undefined){const err29 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "origin"},message:"must have required property '"+"origin"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data.binds === undefined){const err30 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "binds"},message:"must have required property '"+"binds"+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}if(data.annotations === undefined){const err31 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "annotations"},message:"must have required property '"+"annotations"+"'"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}for(const key2 in data){if(!(func2.call(schema31.properties, key2))){const err32 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.format !== undefined){if("candid-profile" !== data.format){const err33 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/const",keyword:"const",params:{allowedValue: "candid-profile"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data.format_version !== undefined){if(0 !== data.format_version){const err34 = {instancePath:instancePath+"/format_version",schemaPath:"#/properties/format_version/const",keyword:"const",params:{allowedValue: 0},message:"must be equal to constant"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.kind !== undefined){let data14 = data.kind;if(!((data14 === "canister") || (data14 === "pack"))){const err35 = {instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues: schema31.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data.name !== undefined){let data15 = data.name;if(typeof data15 === "string"){if(!pattern9.test(data15)){const err36 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern: "^[a-z0-9][a-z0-9_.-]{0,63}$"},message:"must match pattern \""+"^[a-z0-9][a-z0-9_.-]{0,63}$"+"\""};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.origin !== undefined){let data16 = data.origin;if(!((((data16 === "author") || (data16 === "third_party")) || (data16 === "pack")) || (data16 === "inferred"))){const err38 = {instancePath:instancePath+"/origin",schemaPath:"#/properties/origin/enum",keyword:"enum",params:{allowedValues: schema31.properties.origin.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.language !== undefined){let data17 = data.language;if(typeof data17 === "string"){if(!pattern10.test(data17)){const err39 = {instancePath:instancePath+"/language",schemaPath:"#/properties/language/pattern",keyword:"pattern",params:{pattern: "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},message:"must match pattern \""+"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"+"\""};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}else {const err40 = {instancePath:instancePath+"/language",schemaPath:"#/properties/language/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}if(data.description !== undefined){if(typeof data.description !== "string"){const err41 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data.binds !== undefined){let data19 = data.binds;if(!(data19 && typeof data19 == "object" && !Array.isArray(data19))){const err42 = {instancePath:instancePath+"/binds",schemaPath:"#/properties/binds/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data.annotations !== undefined){let data20 = data.annotations;if(Array.isArray(data20)){if(data20.length < 1){const err43 = {instancePath:instancePath+"/annotations",schemaPath:"#/properties/annotations/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}const len0 = data20.length;for(let i0=0; i0<len0; i0++){if(!(validate21(data20[i0], {instancePath:instancePath+"/annotations/" + i0,parentData:data20,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}}}else {const err44 = {instancePath:instancePath+"/annotations",schemaPath:"#/properties/annotations/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}}else {const err45 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
4
+ // Code points, counted as ajv's runtime ucs2length counts them: a surrogate pair is one, a lone surrogate is one.
5
+ function ucs2length(s) {
6
+ let n = 0;
7
+ for (const _ of s) n++;
8
+ return n;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "@meantjs/profile",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Candid Profile resolver: validates profiles, matches packs by Candid subtyping, merges layers (spec section 8) and emits the resolved form (spec section 10).",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/B3Pay/Meant.git",
9
+ "directory": "profile/packages/resolver"
10
+ },
11
+ "homepage": "https://github.com/B3Pay/Meant/tree/main/profile/packages/resolver#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/B3Pay/Meant/issues"
14
+ },
15
+ "keywords": [
16
+ "candid",
17
+ "internet-computer",
18
+ "icp",
19
+ "icrc-1",
20
+ "icrc-2",
21
+ "profile",
22
+ "resolver",
23
+ "json-schema"
24
+ ],
25
+ "type": "module",
26
+ "sideEffects": false,
27
+ "main": "./src/index.mjs",
28
+ "types": "./src/index.d.mts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./src/index.d.mts",
32
+ "default": "./src/index.mjs"
33
+ },
34
+ "./address": {
35
+ "types": "./src/address.d.mts",
36
+ "default": "./src/address.mjs"
37
+ },
38
+ "./browser": {
39
+ "types": "./src/browser.d.mts",
40
+ "default": "./src/browser.mjs"
41
+ },
42
+ "./schema.json": "./data/profile-v0.schema.json",
43
+ "./packs/*": "./data/packs/*",
44
+ "./package.json": "./package.json"
45
+ },
46
+ "bin": {
47
+ "candid-profile": "./bin/candid-profile.mjs"
48
+ },
49
+ "files": [
50
+ "src",
51
+ "bin",
52
+ "data",
53
+ "CHANGELOG.md",
54
+ "LICENSE"
55
+ ],
56
+ "engines": {
57
+ "node": ">=22"
58
+ },
59
+ "scripts": {
60
+ "test": "node --test \"test/*.test.mjs\"",
61
+ "data": "node scripts/data.mjs",
62
+ "data:check": "node scripts/data.mjs --check"
63
+ },
64
+ "dependencies": {
65
+ "@candid-core/cli": "0.4.0",
66
+ "ajv": "8.18.0"
67
+ },
68
+ "devDependencies": {
69
+ "esbuild": "0.28.2",
70
+ "playwright-core": "1.64.0"
71
+ }
72
+ }
@@ -0,0 +1,30 @@
1
+ // Types for @meantjs/profile/address: the address grammar (spec section 3) and the Candid field-name hash, with
2
+ // no dependency, for a browser bundle. Hand-written; the source is src/address.mjs and src/idl.mjs.
3
+ // test/types.test.mjs keeps the declared names equal to the runtime exports.
4
+
5
+ export interface PathSegment {
6
+ kind: "field" | "elem";
7
+ /** The field name, or `#<id>` for a numeric id. */
8
+ label?: string;
9
+ id?: number;
10
+ }
11
+
12
+ export type Address =
13
+ | { kind: "type"; decl: string; segs: PathSegment[] }
14
+ | { kind: "arg" | "result"; method: string; index: number; segs: PathSegment[] }
15
+ | { kind: "method"; method: string; segs: [] };
16
+
17
+ /** The largest Candid field id. */
18
+ export const U32_MAX: 4294967295;
19
+ /** The Candid field-name hash. */
20
+ export function idlHash(label: string): number;
21
+ /** `.amount.e8s`, `.#5`, `[]` to segments; null when the path does not parse. */
22
+ export function parsePath(path: string): PathSegment[] | null;
23
+ /** `send(0).to`, `balance->(0)`, `type:Tokens.e8s` or a method name; null when the address does not parse. */
24
+ export function parseAddress(at: string): Address | null;
25
+ /** A path relative to a method: `(0).to.owner`, `to.owner` or `Ok`; `index` is null without `(n)`. */
26
+ export function parseRelPath(rel: string): { index: number | null; segs: PathSegment[] } | null;
27
+ /** The resolver's key of a method position. */
28
+ export function methodKey(method: string, side: "arg" | "res", index: number, segs: PathSegment[]): string;
29
+ /** The resolver's key of a `type:` edge. */
30
+ export function edgeKey(parent: { container: number; kind: string; id?: number }): string;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Address grammar (spec section 3). Addresses are compared by their resolved form, never as strings (D-011):
3
+ * method positions -> "m:<method>|<arg|res>|<index>|<id>/<id>/[]..."
4
+ * type: edges -> "e:<container>:<id or []>" (applies wherever the edge is reached)
5
+ * type: whole decl -> "n:<node>" (records and variants only, E_TYPE_NODE otherwise)
6
+ *
7
+ * Browser-safe: this module and idl.mjs import nothing else, and the package exports them as
8
+ * `@meantjs/profile/address` (test/address-entry.test.mjs keeps it that way).
9
+ */
10
+ import { idlHash, U32_MAX } from "./idl.mjs";
11
+
12
+ export { idlHash, U32_MAX };
13
+
14
+ const IDENT = "[A-Za-z_][A-Za-z0-9_]*";
15
+ const NUMID = "#(?:0|[1-9][0-9]{0,9})";
16
+ const SEG_RE = new RegExp(`\\.(${IDENT}|${NUMID})|\\[\\]`, "y");
17
+
18
+ export function parsePath(str) {
19
+ const segs = [];
20
+ let i = 0;
21
+ while (i < str.length) {
22
+ SEG_RE.lastIndex = i;
23
+ const m = SEG_RE.exec(str);
24
+ if (!m) return null;
25
+ if (m[0] === "[]") segs.push({ kind: "elem" });
26
+ else if (m[1].startsWith("#")) {
27
+ const id = Number(m[1].slice(1));
28
+ if (id > U32_MAX) return null;
29
+ segs.push({ kind: "field", label: m[1], id });
30
+ } else segs.push({ kind: "field", label: m[1], id: idlHash(m[1]) });
31
+ i = SEG_RE.lastIndex;
32
+ }
33
+ return segs;
34
+ }
35
+
36
+ export function parseAddress(at) {
37
+ let m = new RegExp(`^type:(${IDENT})(.*)$`).exec(at);
38
+ if (m) {
39
+ const segs = parsePath(m[2]);
40
+ return segs && { kind: "type", decl: m[1], segs };
41
+ }
42
+ m = new RegExp(`^(${IDENT})(?:\\((\\d+)\\)|->\\((\\d+)\\))?(.*)$`).exec(at);
43
+ if (!m) return null;
44
+ const segs = parsePath(m[4]);
45
+ if (!segs) return null;
46
+ if (m[2] !== undefined) return { kind: "arg", method: m[1], index: Number(m[2]), segs };
47
+ if (m[3] !== undefined) return { kind: "result", method: m[1], index: Number(m[3]), segs };
48
+ if (segs.length) return null;
49
+ return { kind: "method", method: m[1], segs: [] };
50
+ }
51
+
52
+ export function parseRelPath(rel) {
53
+ const m = /^(?:\((\d+)\))?(.*)$/.exec(rel);
54
+ let rest = m[2];
55
+ if (rest && !rest.startsWith(".") && !rest.startsWith("[")) rest = `.${rest}`;
56
+ const segs = parsePath(rest);
57
+ return segs && { index: m[1] === undefined ? null : Number(m[1]), segs };
58
+ }
59
+
60
+ const segKey = (s) => (s.kind === "elem" ? "[]" : String(s.id));
61
+ export const methodKey = (method, side, index, segs) => `m:${method}|${side}|${index}|${segs.map(segKey).join("/")}`;
62
+ export const edgeKey = (parent) => `e:${parent.container}:${parent.kind === "vec" ? "[]" : parent.id}`;