@equinor/fusion-framework-cli 13.3.16 → 13.3.17

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.
package/bin/build/cli.mjs CHANGED
@@ -4,4 +4,4 @@ import{createCommand as e,createOption as t,InvalidOptionArgumentError as r,Comm
4
4
  || ${c} === "boolean" || ${i} === null`).assign(d,n._`[${i}]`)}}o.else(),u(e),o.endIf(),o.if(n._`${d} !== undefined`,()=>{o.assign(i,d),function({gen:e,parentData:t,parentDataProperty:r},o){e.if(n._`${t} !== undefined`,()=>e.assign(n._`${t}[${r}]`,o))}(e,d)})}(e,r,d):u(e)})}return p};const a=new Set(["string","number","integer","boolean","null"]);function c(e,t,r,o=i.Correct){const s=o===i.Correct?n.operators.EQ:n.operators.NEQ;let a;switch(e){case"null":return n._`${t} ${s} null`;case"array":a=n._`Array.isArray(${t})`;break;case"object":a=n._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=c(n._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=c();break;default:return n._`typeof ${t} ${s} ${e}`}return o===i.Correct?a:(0,n.not)(a);function c(e=n.nil){return(0,n.and)(n._`typeof ${t} == "number"`,e,r?n._`isFinite(${t})`:n.nil)}}function l(e,t,r,i){if(1===e.length)return c(e[0],t,r,i);let s;const a=(0,o.toHash)(e);if(a.array&&a.object){const e=n._`typeof ${t} != "object"`;s=a.null?e:n._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else s=n.nil;a.number&&delete a.integer;for(const e in a)s=(0,n.and)(s,c(e,t,r,i));return s}yn.checkDataType=c,yn.checkDataTypes=l;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?n._`{type: ${e}}`:n._`{type: ${t}}`};function u(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,o.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,r.reportError)(t,d)}return yn.reportTypeError=u,yn}var kn,_n={};function Ln(){if(kn)return _n;kn=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.assignDefaults=void 0;const e=on(),t=cn();function r(r,n,o){const{gen:i,compositeRule:s,data:a,opts:c}=r;if(void 0===o)return;const l=e._`${a}${(0,e.getProperty)(n)}`;if(s)return void(0,t.checkStrictMode)(r,`default is ignored for: ${l}`);let d=e._`${l} === undefined`;"empty"===c.useDefaults&&(d=e._`${d} || ${l} === null || ${l} === ""`),i.if(d,e._`${l} = ${(0,e.stringify)(o)}`)}return _n.assignDefaults=function(e,t){const{properties:n,items:o}=e.schema;if("object"===t&&n)for(const t in n)r(e,t,n[t].default);else"array"===t&&Array.isArray(o)&&o.forEach((t,n)=>r(e,n,t.default))},_n}var Cn,Nn,In={},On={};function An(){if(Cn)return On;Cn=1,Object.defineProperty(On,"__esModule",{value:!0}),On.validateUnion=On.validateArray=On.usePattern=On.callValidateCode=On.schemaProperties=On.allSchemaProperties=On.noPropertyInData=On.propertyInData=On.isOwnProperty=On.hasPropFunc=On.reportMissingProp=On.checkMissingProp=On.checkReportMissingProp=void 0;const e=on(),t=cn(),r=fn(),n=cn();function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function i(t,r,n){return e._`${o(t)}.call(${r}, ${n})`}function s(t,r,n,o){const s=e._`${r}${(0,e.getProperty)(n)} === undefined`;return o?(0,e.or)(s,(0,e.not)(i(t,r,n))):s}function a(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}On.checkReportMissingProp=function(t,r){const{gen:n,data:o,it:i}=t;n.if(s(n,o,r,i.opts.ownProperties),()=>{t.setParams({missingProperty:e._`${r}`},!0),t.error()})},On.checkMissingProp=function({gen:t,data:r,it:{opts:n}},o,i){return(0,e.or)(...o.map(o=>(0,e.and)(s(t,r,o,n.ownProperties),e._`${i} = ${o}`)))},On.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},On.hasPropFunc=o,On.isOwnProperty=i,On.propertyInData=function(t,r,n,o){const s=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return o?e._`${s} && ${i(t,r,n)}`:s},On.noPropertyInData=s,On.allSchemaProperties=a,On.schemaProperties=function(e,r){return a(r).filter(n=>!(0,t.alwaysValidSchema)(e,r[n]))},On.callValidateCode=function({schemaCode:t,data:n,it:{gen:o,topSchemaRef:i,schemaPath:s,errorPath:a},it:c},l,d,u){const p=u?e._`${t}, ${n}, ${i}${s}`:n,f=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,a)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&f.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const h=e._`${p}, ${o.object(...f)}`;return d!==e.nil?e._`${l}.call(${d}, ${h})`:e._`${l}(${h})`};const c=e._`new RegExp`;return On.usePattern=function({gen:t,it:{opts:r}},o){const i=r.unicodeRegExp?"u":"",{regExp:s}=r.code,a=s(o,i);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:e._`${"new RegExp"===s.code?c:(0,n.useFunc)(t,s)}(${o}, ${i})`})},On.validateArray=function(r){const{gen:n,data:o,keyword:i,it:s}=r,a=n.name("valid");if(s.allErrors){const e=n.let("valid",!0);return c(()=>n.assign(e,!1)),e}return n.var(a,!0),c(()=>n.break()),a;function c(s){const c=n.const("len",e._`${o}.length`);n.forRange("i",0,c,o=>{r.subschema({keyword:i,dataProp:o,dataPropType:t.Type.Num},a),n.if((0,e.not)(a),s)})}},On.validateUnion=function(r){const{gen:n,schema:o,keyword:i,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(o.some(e=>(0,t.alwaysValidSchema)(s,e))&&!s.opts.unevaluated)return;const a=n.let("valid",!1),c=n.name("_valid");n.block(()=>o.forEach((t,o)=>{const s=r.subschema({keyword:i,schemaProp:o,compositeRule:!0},c);n.assign(a,e._`${a} || ${c}`);r.mergeValidEvaluated(s,c)||n.if((0,e.not)(a))})),r.result(a,()=>r.reset(),()=>r.error(!0))},On}function Tn(){if(Nn)return In;Nn=1,Object.defineProperty(In,"__esModule",{value:!0}),In.validateKeywordUsage=In.validSchemaType=In.funcKeywordCode=In.macroKeywordCode=void 0;const e=on(),t=fn(),r=An(),n=hn();function o(t){const{gen:r,data:n,it:o}=t;r.if(o.parentData,()=>r.assign(n,e._`${o.parentData}[${o.parentDataProperty}]`))}function i(t,r,n){if(void 0===n)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return In.macroKeywordCode=function(t,r){const{gen:n,keyword:o,schema:s,parentSchema:a,it:c}=t,l=r.macro.call(c.self,s,a,c),d=i(n,o,l);!1!==c.opts.validateSchema&&c.self.validateSchema(l,!0);const u=n.name("valid");t.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${c.errSchemaPath}/${o}`,topSchemaRef:d,compositeRule:!0},u),t.pass(u,()=>t.error(!0))},In.funcKeywordCode=function(s,a){var c;const{gen:l,keyword:d,schema:u,parentSchema:p,$data:f,it:h}=s;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,a);const m=!f&&a.compile?a.compile.call(h.self,u,p,h):a.validate,g=i(l,d,m),y=l.let("valid");function v(n=(a.async?e._`await `:e.nil)){const o=h.opts.passContext?t.default.this:t.default.self,i=!("compile"in a&&!f||!1===a.schema);l.assign(y,e._`${n}${(0,r.callValidateCode)(s,g,o,i)}`,a.modifying)}function b(t){var r;l.if((0,e.not)(null!==(r=a.valid)&&void 0!==r?r:y),t)}s.block$data(y,function(){if(!1===a.errors)v(),a.modifying&&o(s),b(()=>s.error());else{const r=a.async?function(){const t=l.let("ruleErrs",null);return l.try(()=>v(e._`await `),r=>l.assign(y,!1).if(e._`${r} instanceof ${h.ValidationError}`,()=>l.assign(t,e._`${r}.errors`),()=>l.throw(r))),t}():function(){const t=e._`${g}.errors`;return l.assign(t,null),v(e.nil),t}();a.modifying&&o(s),b(()=>function(r,o){const{gen:i}=r;i.if(e._`Array.isArray(${o})`,()=>{i.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${o} : ${t.default.vErrors}.concat(${o})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)},()=>r.error())}(s,r))}}),s.ok(null!==(c=a.valid)&&void 0!==c?c:y)},In.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},In.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},In}var xn,Dn={};function jn(){if(xn)return Dn;xn=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.extendSubschemaMode=Dn.extendSubschemaData=Dn.getSubschema=void 0;const e=on(),t=cn();return Dn.getSubschema=function(r,{keyword:n,schemaProp:o,schema:i,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==n&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const i=r.schema[n];return void 0===o?{schema:i,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:i[o],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(o)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(o)}`}}if(void 0!==i){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},Dn.extendSubschemaData=function(r,n,{dataProp:o,dataPropType:i,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==o)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=n;if(void 0!==o){const{errorPath:s,dataPathArr:a,opts:c}=n;d(l.let("data",e._`${n.data}${(0,e.getProperty)(o)}`,!0)),r.errorPath=e.str`${s}${(0,t.getErrorPath)(o,i,c.jsPropertySyntax)}`,r.parentDataProperty=e._`${o}`,r.dataPathArr=[...a,r.parentDataProperty]}if(void 0!==s){d(s instanceof e.Name?s:l.let("data",s,!0)),void 0!==c&&(r.propertyName=c)}function d(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}a&&(r.dataTypes=a)},Dn.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r},Dn}var Rn,Fn,Mn={};function Gn(){return Fn||(Fn=1,Rn=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!==o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!==o--;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}),Rn}var Un,Bn,zn,Hn={exports:{}};function Vn(){if(Un)return Hn.exports;Un=1;var e=Hn.exports=function(e,r,n){"function"==typeof r&&(n=r,r={}),t(r,"function"==typeof(n=r.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function t(n,o,i,s,a,c,l,d,u,p){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var f in o(s,a,c,l,d,u,p),s){var h=s[f];if(Array.isArray(h)){if(f in e.arrayKeywords)for(var m=0;m<h.length;m++)t(n,o,i,h[m],a+"/"+f+"/"+m,c,a,f,s,m)}else if(f in e.propsKeywords){if(h&&"object"==typeof h)for(var g in h)t(n,o,i,h[g],a+"/"+f+"/"+r(g),c,a,f,s,g)}else(f in e.keywords||n.allKeys&&!(f in e.skipKeywords))&&t(n,o,i,h,a+"/"+f,c,a,f,s)}i(s,a,c,l,d,u,p)}}function r(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}return e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Hn.exports}function Wn(){if(Bn)return Mn;Bn=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.getSchemaRefs=Mn.resolveUrl=Mn.normalizeId=Mn._getFullPath=Mn.getFullPath=Mn.inlineRef=void 0;const e=cn(),t=Gn(),r=Vn(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Mn.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!i(e):!!t&&s(e)<=t)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function i(e){for(const t in e){if(o.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(i))return!0;if("object"==typeof r&&i(r))return!0}return!1}function s(t){let r=0;for(const o in t){if("$ref"===o)return 1/0;if(r++,!n.has(o)&&("object"==typeof t[o]&&(0,e.eachItem)(t[o],e=>r+=s(e)),r===1/0))return 1/0}return r}function a(e,t="",r){!1!==r&&(t=d(t));const n=e.parse(t);return c(e,n)}function c(e,t){return e.serialize(t).split("#")[0]+"#"}Mn.getFullPath=a,Mn._getFullPath=c;const l=/#\/?$/;function d(e){return e?e.replace(l,""):""}Mn.normalizeId=d,Mn.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const u=/^[a-z_][-a-z0-9._]*$/i;return Mn.getSchemaRefs=function(e,n){if("boolean"==typeof e)return{};const{schemaId:o,uriResolver:i}=this.opts,s=d(e[o]||n),c={"":s},l=a(i,s,!1),p={},f=new Set;return r(e,{allKeys:!0},(e,t,r,n)=>{if(void 0===n)return;const i=l+t;let s=c[n];function a(t){const r=this.opts.uriResolver.resolve;if(t=d(s?r(s,t):t),f.has(t))throw m(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?h(e,n.schema,t):t!==d(i)&&("#"===t[0]?(h(e,p[t],t),p[t]=e):this.refs[t]=i),t}function g(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);a.call(this,`#${e}`)}}"string"==typeof e[o]&&(s=a.call(this,e[o])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),c[t]=s}),p;function h(e,r,n){if(void 0!==r&&!t(e,r))throw m(n)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Mn}function qn(){if(zn)return Kr;zn=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.getData=Kr.KeywordCxt=Kr.validateFunctionCode=void 0;const e=mn(),t=Pn(),r=Sn(),n=Pn(),o=Ln(),i=Tn(),s=jn(),a=on(),c=fn(),l=Wn(),d=cn(),u=hn();function p({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,a._`${c.default.data}, ${c.default.valCxt}`,n.$async,()=>{e.code(a._`"use strict"; ${f(r,o)}`),function(e,t){e.if(c.default.valCxt,()=>{e.var(c.default.instancePath,a._`${c.default.valCxt}.${c.default.instancePath}`),e.var(c.default.parentData,a._`${c.default.valCxt}.${c.default.parentData}`),e.var(c.default.parentDataProperty,a._`${c.default.valCxt}.${c.default.parentDataProperty}`),e.var(c.default.rootData,a._`${c.default.valCxt}.${c.default.rootData}`),t.dynamicRef&&e.var(c.default.dynamicAnchors,a._`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{e.var(c.default.instancePath,a._`""`),e.var(c.default.parentData,a._`undefined`),e.var(c.default.parentDataProperty,a._`undefined`),e.var(c.default.rootData,c.default.data),t.dynamicRef&&e.var(c.default.dynamicAnchors,a._`{}`)})}(e,o),e.code(i)}):e.func(t,a._`${c.default.data}, ${function(e){return a._`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${e.dynamicRef?a._`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}(o)}`,n.$async,()=>e.code(f(r,o)).code(i))}function f(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?a._`/*# sourceURL=${r} */`:a.nil}function h(t,r){g(t)&&(y(t),m(t))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&b(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",c.default.errors);v(e,i),n.var(t,a._`${i} === ${c.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function g(e){return"boolean"!=typeof e.schema}function y(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function v(e,r){if(e.opts.jtd)return $(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);$(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function b({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(a._`${c.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=a.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(a._`${c.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function $(e,t,o,i){const{gen:s,schema:l,data:u,allErrors:p,opts:f,self:h}=e,{RULES:m}=h;function g(d){(0,r.shouldUseGroup)(l,d)&&(d.type?(s.if((0,n.checkDataType)(d.type,u,f.strictNumbers)),w(e,d),1===t.length&&t[0]===d.type&&o&&(s.else(),(0,n.reportTypeError)(e)),s.endIf()):w(e,d),p||s.if(a._`${c.default.errors} === ${i||0}`))}!l.$ref||!f.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(l,m)?(f.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach(t=>{S(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){const r=[];for(const n of e.dataTypes)S(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const o in n){const i=n[o];if("object"==typeof i&&(0,r.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some(e=>E(t,e))&&P(e,`missing type "${r.join(",")}" for keyword "${o}"`)}}}(e,e.dataTypes)}(e,t),s.block(()=>{for(const e of m.rules)g(e);g(m.post)})):s.block(()=>_(e,"$ref",m.all.$ref.definition))}function w(e,t){const{gen:n,schema:i,opts:{useDefaults:s}}=e;s&&(0,o.assignDefaults)(e,t.type),n.block(()=>{for(const n of t.rules)(0,r.shouldUseRule)(i,n)&&_(e,n.keyword,n.definition,t.type)})}function E(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}Kr.validateFunctionCode=function(t){g(t)&&(y(t),m(t))?function(e){const{schema:t,opts:r,gen:n}=e;p(e,()=>{r.$comment&&t.$comment&&b(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(c.default.vErrors,null),n.let(c.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",a._`${r}.evaluated`),t.if(a._`${e.evaluated}.dynamicProps`,()=>t.assign(a._`${e.evaluated}.props`,a._`undefined`)),t.if(a._`${e.evaluated}.dynamicItems`,()=>t.assign(a._`${e.evaluated}.items`,a._`undefined`))}(e),v(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(a._`${c.default.errors} === 0`,()=>t.return(c.default.data),()=>t.throw(a._`new ${o}(${c.default.vErrors})`)):(t.assign(a._`${n}.errors`,c.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof a.Name&&e.assign(a._`${t}.props`,r);n instanceof a.Name&&e.assign(a._`${t}.items`,n)}(e),t.return(a._`${c.default.errors} === 0`))}(e)})}(t):p(t,()=>(0,e.topBoolOrEmptySchema)(t))};class k{constructor(e,t,r){if((0,i.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",c.default.errors))}result(e,t,r){this.failResult((0,a.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,a.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(a._`${t} !== undefined && (${(0,a.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?u.reportExtraError:u.reportError)(this,this.def.error,t)}$dataError(){(0,u.reportError)(this,this.def.$dataError||u.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,u.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=a.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=a.nil,t=a.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if((0,a.or)(a._`${n} === undefined`,t)),e!==a.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==a.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:o,it:i}=this;return(0,a.or)(function(){if(r.length){if(!(t instanceof a.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return a._`${(0,n.checkDataTypes)(e,t,i.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}(),function(){if(o.validateSchema){const r=e.scopeValue("validate$data",{ref:o.validateSchema});return a._`!${r}(${t})`}return a.nil}())}subschema(e,t){const r=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(r,this.it,e),(0,s.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return h(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,()=>this.mergeEvaluated(e,a.Name)),!0}}function _(e,t,r,n){const o=new k(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,i.funcKeywordCode)(o,r):"macro"in r?(0,i.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,i.funcKeywordCode)(o,r)}Kr.KeywordCxt=k;const L=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return c.default.rootData;if("/"===e[0]){if(!L.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=c.default.rootData}else{const s=C.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(i=r[t-a],!o)return i}let s=i;const l=o.split("/");for(const e of l)e&&(i=a._`${i}${(0,a.getProperty)((0,d.unescapeJsonPointer)(e))}`,s=a._`${s} && ${i}`);return s;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return Kr.getData=N,Kr}var Kn,Jn={};function Yn(){if(Kn)return Jn;Kn=1,Object.defineProperty(Jn,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return Jn.default=e,Jn}var Xn,Zn={};function Qn(){if(Xn)return Zn;Xn=1,Object.defineProperty(Zn,"__esModule",{value:!0});const e=Wn();class t extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}return Zn.default=t,Zn}var eo,to={};function ro(){if(eo)return to;eo=1,Object.defineProperty(to,"__esModule",{value:!0}),to.resolveSchema=to.getCompilingSchema=to.resolveRef=to.compileSchema=to.SchemaEnv=void 0;const e=on(),t=Yn(),r=fn(),n=Wn(),o=cn(),i=qn();class s{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,n.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function a(o){const s=l.call(this,o);if(s)return s;const a=(0,n.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:c,lines:d}=this.opts.code,{ownProperties:u}=this.opts,p=new e.CodeGen(this.scope,{es5:c,lines:d,ownProperties:u});let f;o.$async&&(f=p.scopeValue("Error",{ref:t.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));const h=p.scopeName("validate");o.validateName=h;const m={gen:p,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:h,ValidationError:f,schema:o.schema,schemaEnv:o,rootId:a,baseId:o.baseId||a,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(o),(0,i.validateFunctionCode)(m),p.optimize(this.opts.code.optimize);const t=p.toString();g=`${p.scopeRefs(r.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,o));const n=new Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:n}),n.errors=null,n.schema=o.schema,n.schemaEnv=o,o.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:h,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:t,items:r}=m;n.evaluated={props:t instanceof e.Name?void 0:t,items:r instanceof e.Name?void 0:r,dynamicProps:t instanceof e.Name,dynamicItems:r instanceof e.Name},n.source&&(n.source.evaluated=(0,e.stringify)(n.evaluated))}return o.validate=n,o}catch(e){throw delete o.validate,delete o.validateName,g&&this.logger.error("Error compiling schema, function code:",g),e}finally{this._compilations.delete(o)}}function c(e){return(0,n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:a.call(this,e)}function l(e){for(const t of this._compilations)if(d(t,e))return t}function d(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function u(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||p.call(this,e,t)}function p(e,t){const r=this.opts.uriResolver.parse(t),o=(0,n._getFullPath)(this.opts.uriResolver,r);let i=(0,n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===i)return h.call(this,r,e);const c=(0,n.normalizeId)(o),l=this.refs[c]||this.schemas[c];if("string"==typeof l){const t=p.call(this,e,l);if("object"!=typeof(null==t?void 0:t.schema))return;return h.call(this,r,t)}if("object"==typeof(null==l?void 0:l.schema)){if(l.validate||a.call(this,l),c===(0,n.normalizeId)(t)){const{schema:t}=l,{schemaId:r}=this.opts,o=t[r];return o&&(i=(0,n.resolveUrl)(this.opts.uriResolver,i,o)),new s({schema:t,schemaId:r,root:e,baseId:i})}return h.call(this,r,l)}}to.SchemaEnv=s,to.compileSchema=a,to.resolveRef=function(e,t,r){var o;r=(0,n.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let a=u.call(this,e,r);if(void 0===a){const n=null===(o=e.localRefs)||void 0===o?void 0:o[r],{schemaId:i}=this.opts;n&&(a=new s({schema:n,schemaId:i,root:e,baseId:t}))}return void 0!==a?e.refs[r]=c.call(this,a):void 0},to.getCompilingSchema=l,to.resolveSchema=p;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,{baseId:t,schema:r,root:i}){var a;if("/"!==(null===(a=e.fragment)||void 0===a?void 0:a[0]))return;for(const i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,o.unescapeFragment)(i)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!f.has(i)&&s&&(t=(0,n.resolveUrl)(this.opts.uriResolver,t,s))}let c;if("boolean"!=typeof r&&r.$ref&&!(0,o.schemaHasRulesButRef)(r,this.RULES)){const e=(0,n.resolveUrl)(this.opts.uriResolver,t,r.$ref);c=p.call(this,i,e)}const{schemaId:l}=this.opts;return c=c||new s({schema:r,schemaId:l,root:i,baseId:t}),c.schema!==c.root.schema?c:void 0}return to}var no,oo,io,so,ao,co,lo,uo={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},po={},fo={exports:{}};function ho(){if(oo)return no;oo=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),48!==r){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(e){return e.length=0,!0}function i(e,t,n){if(e.length){const o=r(e);if(""===o)return n.error=!0,!1;t.push(o),e.length=0}return!0}function s(e){if(function(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const n={error:!1,address:"",zone:""},s=[],a=[];let c=!1,l=!1,d=i;for(let r=0;r<e.length;r++){const i=e[r];if("["!==i&&"]"!==i)if(":"!==i)if("%"===i){if(!d(a,s,n))break;d=o}else a.push(i);else{if(!0===c&&(l=!0),!d(a,s,n))break;if(++t>7){n.error=!0;break}r>0&&":"===e[r-1]&&(c=!0),s.push(":")}}return a.length&&(d===o?n.zone=a.join(""):l?s.push(a.join("")):s.push(r(a))),n.address=s.join(""),n}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}return no={nonSimpleDomain:n,recomposeAuthority:function(e){const r=[];if(void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host){let n=unescape(e.host);if(!t(n)){const t=s(n);n=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}r.push(n)}return"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0},normalizeComponentEncoding:function(e,t){const r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e;const r=[];let n=-1,o=0;for(;o=t.length;){if(1===o){if("."===t)break;if("/"===t){r.push("/");break}r.push(t);break}if(2===o){if("."===t[0]){if("."===t[1])break;if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===o&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(n=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")},isIPv4:t,isUUID:e,normalizeIPv6:s,stringArrayToHexStripped:r}}function mo(){if(ao)return fo.exports;ao=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:i}=ho(),{SCHEMES:s,getSchemeHandler:a}=function(){if(so)return io;so=1;const{isUUID:e}=ho(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&!(3!==e.scheme.length||"w"!==e.scheme[0]&&"W"!==e.scheme[0]||"s"!==e.scheme[1]&&"S"!==e.scheme[1]||"s"!==e.scheme[2]&&"S"!==e.scheme[2])}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const s={scheme:"http",domainHost:!0,parse:o,serialize:i},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:s,https:{scheme:"https",domainHost:s.domainHost,parse:o,serialize:i},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,r){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(t);if(n){const t=r.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const o=l(`${t}:${r.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,r))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw new Error("URN without nid cannot be serialized");const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=l(`${r}:${t.nid||n}`);o&&(e=o.serialize(e,t));const i=e,s=e.nss;return i.path=`${n||t.nid}:${s}`,t.skipEscape=!0,i},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(t,r){const n=t;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&e(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};function l(e){return e&&(c[e]||c[e.toLowerCase()])||void 0}return Object.setPrototypeOf(c,null),io={wsIsSecure:n,SCHEMES:c,isValidSchemeName:function(e){return-1!==r.indexOf(e)},getSchemeHandler:l}}();function c(e,r,n,o){const i={};return o||(e=u(l(e,n),n),r=u(l(r,n),n)),!(n=n||{}).tolerant&&r.scheme?(i.scheme=r.scheme,i.userinfo=r.userinfo,i.host=r.host,i.port=r.port,i.path=t(r.path||""),i.query=r.query):(void 0!==r.userinfo||void 0!==r.host||void 0!==r.port?(i.userinfo=r.userinfo,i.host=r.host,i.port=r.port,i.path=t(r.path||""),i.query=r.query):(r.path?("/"===r.path[0]?i.path=t(r.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:i.path=r.path:i.path="/"+r.path,i.path=t(i.path)),i.query=r.query):(i.path=e.path,void 0!==r.query?i.query=r.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=r.fragment,i}function l(e,n){const o={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},n),s=[],c=a(i.scheme||o.scheme);c&&c.serialize&&c.serialize(o,i),void 0!==o.path&&(i.skipEscape?o.path=unescape(o.path):(o.path=escape(o.path),void 0!==o.scheme&&(o.path=o.path.split("%3A").join(":")))),"suffix"!==i.reference&&o.scheme&&s.push(o.scheme,":");const l=r(o);if(void 0!==l&&("suffix"!==i.reference&&s.push("//"),s.push(l),o.path&&"/"!==o.path[0]&&s.push("/")),void 0!==o.path){let e=o.path;i.absolutePath||c&&c.absolutePath||(e=t(e)),void 0===l&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),s.push(e)}return void 0!==o.query&&s.push("?",o.query),void 0!==o.fragment&&s.push("#",o.fragment),s.join("")}const d=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function u(t,r){const n=Object.assign({},r),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let c=!1;"suffix"===n.reference&&(t=n.scheme?n.scheme+":"+t:"//"+t);const l=t.match(d);if(l){if(s.scheme=l[1],s.userinfo=l[3],s.host=l[4],s.port=parseInt(l[5],10),s.path=l[6]||"",s.query=l[7],s.fragment=l[8],isNaN(s.port)&&(s.port=l[5]),s.host){if(!1===o(s.host)){const t=e(s.host);s.host=t.host.toLowerCase(),c=t.isIPV6}else c=!0}void 0!==s.scheme||void 0!==s.userinfo||void 0!==s.host||void 0!==s.port||void 0!==s.query||s.path?void 0===s.scheme?s.reference="relative":void 0===s.fragment?s.reference="absolute":s.reference="uri":s.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==s.reference&&(s.error=s.error||"URI is not a "+n.reference+" reference.");const r=a(n.scheme||s.scheme);if(!(n.unicodeSupport||r&&r.unicodeSupport)&&s.host&&(n.domainHost||r&&r.domainHost)&&!1===c&&i(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(e){s.error=s.error||"Host's domain name can not be converted to ASCII: "+e}(!r||r&&!r.skipNormalize)&&(-1!==t.indexOf("%")&&(void 0!==s.scheme&&(s.scheme=unescape(s.scheme)),void 0!==s.host&&(s.host=unescape(s.host))),s.path&&(s.path=escape(unescape(s.path))),s.fragment&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),r&&r.parse&&r.parse(s,n)}else s.error=s.error||"URI can not be parsed.";return s}const p={SCHEMES:s,normalize:function(e,t){return"string"==typeof e?e=l(u(e,t),t):"object"==typeof e&&(e=u(l(e,t),t)),e},resolve:function(e,t,r){const n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=c(u(e,n),u(t,n),n,!0);return n.skipEscape=!0,l(o,n)},resolveComponent:c,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=l(n(u(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=l(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=l(n(u(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=l(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:l,parse:u};return fo.exports=p,fo.exports.default=p,fo.exports.fastUri=p,fo.exports}function go(){if(co)return po;co=1,Object.defineProperty(po,"__esModule",{value:!0});const e=mo();return e.code='require("ajv/dist/runtime/uri").default',po.default=e,po}function yo(){return lo||(lo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=qn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=on();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Yn(),o=Qn(),i=bn(),s=ro(),a=on(),c=Wn(),l=Pn(),d=cn(),u=uo,p=go(),f=(e,t)=>new RegExp(e,t);f.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,n,o,i,s,a,c,l,d,u,h,m,g,y,v,b,$,w,E,S,P,k,_,L;const C=e.strict,N=null===(t=e.code)||void 0===t?void 0:t.optimize,I=!0===N||void 0===N?1:N||0,O=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:f,A=null!==(o=e.uriResolver)&&void 0!==o?o:p.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:C)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:C)||void 0===c||c,strictTypes:null!==(d=null!==(l=e.strictTypes)&&void 0!==l?l:C)&&void 0!==d?d:"log",strictTuples:null!==(h=null!==(u=e.strictTuples)&&void 0!==u?u:C)&&void 0!==h?h:"log",strictRequired:null!==(g=null!==(m=e.strictRequired)&&void 0!==m?m:C)&&void 0!==g&&g,code:e.code?{...e.code,optimize:I,regExp:O}:{optimize:I,regExp:O},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(P=e.validateSchema)||void 0===P||P,validateFormats:null===(k=e.validateFormats)||void 0===k||k,unicodeRegExp:null===(_=e.unicodeRegExp)||void 0===_||_,int32range:null===(L=e.int32range)||void 0===L||L,uriResolver:A}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return _;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),$.call(this,g,e,"NOT SUPPORTED"),$.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=k.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=u;"id"===r&&(n={...u},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||s.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),s.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=w.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new s.SchemaEnv({schema:{},schemaId:r});if(t=s.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=w.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(C.call(this,r,t),!t)return(0,d.eachItem)(r,e=>N.call(this,e)),this;O.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===n.type.length?e=>N.call(this,e,n):e=>n.type.forEach(t=>N.call(this,e,n,t))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=T(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(void 0!==l)return l;r=(0,c.normalizeId)(i||r);const d=c.getSchemaRefs.call(this,e,r);return l=new s.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:d}),this._cache.set(l.schema,l),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),n&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):s.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,e)}finally{this.opts=t}}}function $(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function w(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function S(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function P(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function k(){const e={...this.opts};for(const t of h)delete e[t];return e}b.ValidationError=n.default,b.MissingRefError=o.default,e.default=b;const _={log(){},warn(){},error(){}};const L=/^[a-z_$][a-z0-9_$:-]*$/i;function C(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!L.test(e))throw new Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function N(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let s=o?i.post:i.rules.find(({type:e})=>e===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?I.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach(e=>this.addKeyword(e))}function I(e,t,r){const n=e.rules.findIndex(e=>e.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function O(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=T(t)),e.validateSchema=this.compile(t,!0))}const A={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function T(e){return{anyOf:[e,A]}}}(qr)),qr}var vo,bo={},$o={},wo={};function Eo(){if(vo)return wo;vo=1,Object.defineProperty(wo,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return wo.default=e,wo}var So,Po,ko={};function _o(){if(So)return ko;So=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.callRef=ko.getValidate=void 0;const e=Qn(),t=An(),r=on(),n=fn(),o=ro(),i=cn(),s={keyword:"$ref",schemaType:"string",code(t){const{gen:n,schema:i,it:s}=t,{baseId:l,schemaEnv:d,validateName:u,opts:p,self:f}=s,{root:h}=d;if(("#"===i||"#/"===i)&&l===h.baseId)return function(){if(d===h)return c(t,u,d,d.$async);const e=n.scopeValue("root",{ref:h});return c(t,r._`${e}.validate`,h,h.$async)}();const m=o.resolveRef.call(f,h,l,i);if(void 0===m)throw new e.default(s.opts.uriResolver,l,i);return m instanceof o.SchemaEnv?function(e){const r=a(t,e);c(t,r,e,e.$async)}(m):function(e){const o=n.scopeValue("schema",!0===p.code.source?{ref:e,code:(0,r.stringify)(e)}:{ref:e}),s=n.name("valid"),a=t.subschema({schema:e,dataTypes:[],schemaPath:r.nil,topSchemaRef:o,errSchemaPath:i},s);t.mergeEvaluated(a),t.ok(s)}(m)}};function a(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):r._`${n.scopeValue("wrapper",{ref:t})}.validate`}function c(e,o,s,a){const{gen:c,it:l}=e,{allErrors:d,schemaEnv:u,opts:p}=l,f=p.passContext?n.default.this:r.nil;function h(e){const t=r._`${e}.errors`;c.assign(n.default.vErrors,r._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),c.assign(n.default.errors,r._`${n.default.vErrors}.length`)}function m(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==s?void 0:s.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=i.mergeEvaluated.props(c,n.props,l.props));else{const t=c.var("props",r._`${e}.evaluated.props`);l.props=i.mergeEvaluated.props(c,t,l.props,r.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=i.mergeEvaluated.items(c,n.items,l.items));else{const t=c.var("items",r._`${e}.evaluated.items`);l.items=i.mergeEvaluated.items(c,t,l.items,r.Name)}}a?function(){if(!u.$async)throw new Error("async schema referenced by sync schema");const n=c.let("valid");c.try(()=>{c.code(r._`await ${(0,t.callValidateCode)(e,o,f)}`),m(o),d||c.assign(n,!0)},e=>{c.if(r._`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),h(e),d||c.assign(n,!1)}),e.ok(n)}():e.result((0,t.callValidateCode)(e,o,f),()=>m(o),()=>h(o))}return ko.getValidate=a,ko.callRef=c,ko.default=s,ko}function Lo(){if(Po)return $o;Po=1,Object.defineProperty($o,"__esModule",{value:!0});const e=Eo(),t=_o(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $o.default=r,$o}var Co,No={},Io={};function Oo(){if(Co)return Io;Co=1,Object.defineProperty(Io,"__esModule",{value:!0});const e=on(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:t,schemaCode:n})=>e.str`must be ${r[t].okStr} ${n}`,params:({keyword:t,schemaCode:n})=>e._`{comparison: ${r[t].okStr}, limit: ${n}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(t){const{keyword:n,data:o,schemaCode:i}=t;t.fail$data(e._`${o} ${r[n].fail} ${i} || isNaN(${o})`)}};return Io.default=o,Io}var Ao,To={};function xo(){if(Ao)return To;Ao=1,Object.defineProperty(To,"__esModule",{value:!0});const e=on(),t={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>e.str`must be multiple of ${t}`,params:({schemaCode:t})=>e._`{multipleOf: ${t}}`},code(t){const{gen:r,data:n,schemaCode:o,it:i}=t,s=i.opts.multipleOfPrecision,a=r.let("res"),c=s?e._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:e._`${a} !== parseInt(${a})`;t.fail$data(e._`(${o} === 0 || (${a} = ${n}/${o}, ${c}))`)}};return To.default=t,To}var Do,jo,Ro={},Fo={};function Mo(){if(Do)return Fo;function e(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}return Do=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Fo}function Go(){if(jo)return Ro;jo=1,Object.defineProperty(Ro,"__esModule",{value:!0});const e=on(),t=cn(),r=Mo(),n={message({keyword:t,schemaCode:r}){const n="maxLength"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} characters`},params:({schemaCode:t})=>e._`{limit: ${t}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:n,code(n){const{keyword:o,data:i,schemaCode:s,it:a}=n,c="maxLength"===o?e.operators.GT:e.operators.LT,l=!1===a.opts.unicode?e._`${i}.length`:e._`${(0,t.useFunc)(n.gen,r.default)}(${i})`;n.fail$data(e._`${l} ${c} ${s}`)}};return Ro.default=o,Ro}var Uo,Bo={};function zo(){if(Uo)return Bo;Uo=1,Object.defineProperty(Bo,"__esModule",{value:!0});const e=An(),t=cn(),r=on(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match pattern "${e}"`,params:({schemaCode:e})=>r._`{pattern: ${e}}`},code(n){const{gen:o,data:i,$data:s,schema:a,schemaCode:c,it:l}=n,d=l.opts.unicodeRegExp?"u":"";if(s){const{regExp:e}=l.opts.code,s="new RegExp"===e.code?r._`new RegExp`:(0,t.useFunc)(o,e),a=o.let("valid");o.try(()=>o.assign(a,r._`${s}(${c}, ${d}).test(${i})`),()=>o.assign(a,!1)),n.fail$data(r._`!${a}`)}else{const t=(0,e.usePattern)(n,a);n.fail$data(r._`!${t}.test(${i})`)}}};return Bo.default=n,Bo}var Ho,Vo={};function Wo(){if(Ho)return Vo;Ho=1,Object.defineProperty(Vo,"__esModule",{value:!0});const e=on(),t={message({keyword:t,schemaCode:r}){const n="maxProperties"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} properties`},params:({schemaCode:t})=>e._`{limit: ${t}}`},r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:t,code(t){const{keyword:r,data:n,schemaCode:o}=t,i="maxProperties"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`Object.keys(${n}).length ${i} ${o}`)}};return Vo.default=r,Vo}var qo,Ko={};function Jo(){if(qo)return Ko;qo=1,Object.defineProperty(Ko,"__esModule",{value:!0});const e=An(),t=on(),r=cn(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>t.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>t._`{missingProperty: ${e}}`},code(n){const{gen:o,schema:i,schemaCode:s,data:a,$data:c,it:l}=n,{opts:d}=l;if(!c&&0===i.length)return;const u=i.length>=d.loopRequired;if(l.allErrors?function(){if(u||c)n.block$data(t.nil,p);else for(const t of i)(0,e.checkReportMissingProp)(n,t)}():function(){const r=o.let("missing");if(u||c){const i=o.let("valid",!0);n.block$data(i,()=>function(r,i){n.setParams({missingProperty:r}),o.forOf(r,s,()=>{o.assign(i,(0,e.propertyInData)(o,a,r,d.ownProperties)),o.if((0,t.not)(i),()=>{n.error(),o.break()})},t.nil)}(r,i)),n.ok(i)}else o.if((0,e.checkMissingProp)(n,i,r)),(0,e.reportMissingProp)(n,r),o.else()}(),d.strictRequired){const e=n.parentSchema.properties,{definedProperties:t}=n.it;for(const n of i)if(void 0===(null==e?void 0:e[n])&&!t.has(n)){const e=`required property "${n}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,e,l.opts.strictRequired)}}function p(){o.forOf("prop",s,t=>{n.setParams({missingProperty:t}),o.if((0,e.noPropertyInData)(o,a,t,d.ownProperties),()=>n.error())})}}};return Ko.default=n,Ko}var Yo,Xo={};function Zo(){if(Yo)return Xo;Yo=1,Object.defineProperty(Xo,"__esModule",{value:!0});const e=on(),t={message({keyword:t,schemaCode:r}){const n="maxItems"===t?"more":"fewer";return e.str`must NOT have ${n} than ${r} items`},params:({schemaCode:t})=>e._`{limit: ${t}}`},r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:t,code(t){const{keyword:r,data:n,schemaCode:o}=t,i="maxItems"===r?e.operators.GT:e.operators.LT;t.fail$data(e._`${n}.length ${i} ${o}`)}};return Xo.default=r,Xo}var Qo,ei,ti={},ri={};function ni(){if(Qo)return ri;Qo=1,Object.defineProperty(ri,"__esModule",{value:!0});const e=Gn();return e.code='require("ajv/dist/runtime/equal").default',ri.default=e,ri}function oi(){if(ei)return ti;ei=1,Object.defineProperty(ti,"__esModule",{value:!0});const e=Pn(),t=on(),r=cn(),n=ni(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:r}})=>t.str`must NOT have duplicate items (items ## ${r} and ${e} are identical)`,params:({params:{i:e,j:r}})=>t._`{i: ${e}, j: ${r}}`},code(o){const{gen:i,data:s,$data:a,schema:c,parentSchema:l,schemaCode:d,it:u}=o;if(!a&&!c)return;const p=i.let("valid"),f=l.items?(0,e.getSchemaTypes)(l.items):[];function h(r,n){const a=i.name("item"),c=(0,e.checkDataTypes)(f,a,u.opts.strictNumbers,e.DataType.Wrong),l=i.const("indices",t._`{}`);i.for(t._`;${r}--;`,()=>{i.let(a,t._`${s}[${r}]`),i.if(c,t._`continue`),f.length>1&&i.if(t._`typeof ${a} == "string"`,t._`${a} += "_"`),i.if(t._`typeof ${l}[${a}] == "number"`,()=>{i.assign(n,t._`${l}[${a}]`),o.error(),i.assign(p,!1).break()}).code(t._`${l}[${a}] = ${r}`)})}function m(e,a){const c=(0,r.useFunc)(i,n.default),l=i.name("outer");i.label(l).for(t._`;${e}--;`,()=>i.for(t._`${a} = ${e}; ${a}--;`,()=>i.if(t._`${c}(${s}[${e}], ${s}[${a}])`,()=>{o.error(),i.assign(p,!1).break(l)})))}o.block$data(p,function(){const e=i.let("i",t._`${s}.length`),r=i.let("j");o.setParams({i:e,j:r}),i.assign(p,!0),i.if(t._`${e} > 1`,()=>(f.length>0&&!f.some(e=>"object"===e||"array"===e)?h:m)(e,r))},t._`${d} === false`),o.ok(p)}};return ti.default=o,ti}var ii,si={};function ai(){if(ii)return si;ii=1,Object.defineProperty(si,"__esModule",{value:!0});const e=on(),t=cn(),r=ni(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>e._`{allowedValue: ${t}}`},code(n){const{gen:o,data:i,$data:s,schemaCode:a,schema:c}=n;s||c&&"object"==typeof c?n.fail$data(e._`!${(0,t.useFunc)(o,r.default)}(${i}, ${a})`):n.fail(e._`${c} !== ${i}`)}};return si.default=n,si}var ci,li,di={};function ui(){if(ci)return di;ci=1,Object.defineProperty(di,"__esModule",{value:!0});const e=on(),t=cn(),r=ni(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>e._`{allowedValues: ${t}}`},code(n){const{gen:o,data:i,$data:s,schema:a,schemaCode:c,it:l}=n;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=l.opts.loopEnum;let u;const p=()=>null!=u?u:u=(0,t.useFunc)(o,r.default);let f;if(d||s)f=o.let("valid"),n.block$data(f,function(){o.assign(f,!1),o.forOf("v",c,t=>o.if(e._`${p()}(${i}, ${t})`,()=>o.assign(f,!0).break()))});else{if(!Array.isArray(a))throw new Error("ajv implementation error");const t=o.const("vSchema",c);f=(0,e.or)(...a.map((r,n)=>function(t,r){const n=a[r];return"object"==typeof n&&null!==n?e._`${p()}(${i}, ${t}[${r}])`:e._`${i} === ${n}`}(t,n)))}n.pass(f)}};return di.default=n,di}function pi(){if(li)return No;li=1,Object.defineProperty(No,"__esModule",{value:!0});const e=Oo(),t=xo(),r=Go(),n=zo(),o=Wo(),i=Jo(),s=Zo(),a=oi(),c=ai(),l=ui(),d=[e.default,t.default,r.default,n.default,o.default,i.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return No.default=d,No}var fi,hi={},mi={};function gi(){if(fi)return mi;fi=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.validateAdditionalItems=void 0;const e=on(),t=cn(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{parentSchema:r,it:o}=e,{items:i}=r;Array.isArray(i)?n(e,i):(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(r,n){const{gen:o,schema:i,data:s,keyword:a,it:c}=r;c.items=!0;const l=o.const("len",e._`${s}.length`);if(!1===i)r.setParams({len:n.length}),r.pass(e._`${l} <= ${n.length}`);else if("object"==typeof i&&!(0,t.alwaysValidSchema)(c,i)){const i=o.var("valid",e._`${l} <= ${n.length}`);o.if((0,e.not)(i),()=>function(i){o.forRange("i",n.length,l,n=>{r.subschema({keyword:a,dataProp:n,dataPropType:t.Type.Num},i),c.allErrors||o.if((0,e.not)(i),()=>o.break())})}(i)),r.ok(i)}}return mi.validateAdditionalItems=n,mi.default=r,mi}var yi,vi,bi={},$i={};function wi(){if(yi)return $i;yi=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.validateTuple=void 0;const e=on(),t=cn(),r=An(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:n,it:i}=e;if(Array.isArray(n))return o(e,"additionalItems",n);i.items=!0,(0,t.alwaysValidSchema)(i,n)||e.ok((0,r.validateArray)(e))}};function o(r,n,o=r.schema){const{gen:i,parentSchema:s,data:a,keyword:c,it:l}=r;!function(e){const{opts:r,errSchemaPath:i}=l,s=o.length,a=s===e.minItems&&(s===e.maxItems||!1===e[n]);if(r.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${n} are not specified or different at path "${i}"`;(0,t.checkStrictMode)(l,e,r.strictTuples)}}(s),l.opts.unevaluated&&o.length&&!0!==l.items&&(l.items=t.mergeEvaluated.items(i,o.length,l.items));const d=i.name("valid"),u=i.const("len",e._`${a}.length`);o.forEach((n,o)=>{(0,t.alwaysValidSchema)(l,n)||(i.if(e._`${u} > ${o}`,()=>r.subschema({keyword:c,schemaProp:o,dataProp:o},d)),r.ok(d))})}return $i.validateTuple=o,$i.default=n,$i}function Ei(){if(vi)return bi;vi=1,Object.defineProperty(bi,"__esModule",{value:!0});const e=wi(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,e.validateTuple)(t,"items")};return bi.default=t,bi}var Si,Pi={};function ki(){if(Si)return Pi;Si=1,Object.defineProperty(Pi,"__esModule",{value:!0});const e=on(),t=cn(),r=An(),n=gi(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(e){const{schema:o,parentSchema:i,it:s}=e,{prefixItems:a}=i;s.items=!0,(0,t.alwaysValidSchema)(s,o)||(a?(0,n.validateAdditionalItems)(e,a):e.ok((0,r.validateArray)(e)))}};return Pi.default=o,Pi}var _i,Li={};function Ci(){if(_i)return Li;_i=1,Object.defineProperty(Li,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:r}})=>void 0===r?e.str`must contain at least ${t} valid item(s)`:e.str`must contain at least ${t} and no more than ${r} valid item(s)`,params:({params:{min:t,max:r}})=>void 0===r?e._`{minContains: ${t}}`:e._`{minContains: ${t}, maxContains: ${r}}`},code(r){const{gen:n,schema:o,parentSchema:i,data:s,it:a}=r;let c,l;const{minContains:d,maxContains:u}=i;a.opts.next?(c=void 0===d?1:d,l=u):c=1;const p=n.const("len",e._`${s}.length`);if(r.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,t.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,t.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void r.fail();if((0,t.alwaysValidSchema)(a,o)){let t=e._`${p} >= ${c}`;return void 0!==l&&(t=e._`${t} && ${p} <= ${l}`),void r.pass(t)}a.items=!0;const f=n.name("valid");function h(){const t=n.name("_valid"),r=n.let("count",0);m(t,()=>n.if(t,()=>function(t){n.code(e._`${t}++`),void 0===l?n.if(e._`${t} >= ${c}`,()=>n.assign(f,!0).break()):(n.if(e._`${t} > ${l}`,()=>n.assign(f,!1).break()),1===c?n.assign(f,!0):n.if(e._`${t} >= ${c}`,()=>n.assign(f,!0)))}(r)))}function m(e,o){n.forRange("i",0,p,n=>{r.subschema({keyword:"contains",dataProp:n,dataPropType:t.Type.Num,compositeRule:!0},e),o()})}void 0===l&&1===c?m(f,()=>n.if(f,()=>n.break())):0===c?(n.let(f,!0),void 0!==l&&n.if(e._`${s}.length > 0`,h)):(n.let(f,!1),h()),r.result(f,()=>r.reset())}};return Li.default=r,Li}var Ni,Ii={};function Oi(){return Ni||(Ni=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=on(),r=cn(),n=An();e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const o=1===r?"property":"properties";return t.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:o}})=>t._`{property: ${e},
5
5
  missingProperty: ${o},
6
6
  depsCount: ${r},
7
- deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);i(e,t),s(e,r)}};function i(e,r=e.schema){const{gen:o,data:i,it:s}=e;if(0===Object.keys(r).length)return;const a=o.let("missing");for(const c in r){const l=r[c];if(0===l.length)continue;const d=(0,n.propertyInData)(o,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?o.if(d,()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)}):(o.if(t._`${d} && (${(0,n.checkMissingProp)(e,l,a)})`),(0,n.reportMissingProp)(e,a),o.else())}}function s(e,t=e.schema){const{gen:o,data:i,keyword:s,it:a}=e,c=o.name("valid");for(const l in t)(0,r.alwaysValidSchema)(a,t[l])||(o.if((0,n.propertyInData)(o,i,l,a.opts.ownProperties),()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=i,e.validateSchemaDeps=s,e.default=o}(Ii)),Ii}var Ai,Ti={};function xi(){if(Ai)return Ti;Ai=1,Object.defineProperty(Ti,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(r){const{gen:n,schema:o,data:i,it:s}=r;if((0,t.alwaysValidSchema)(s,o))return;const a=n.name("valid");n.forIn("key",i,t=>{r.setParams({propertyName:t}),r.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},a),n.if((0,e.not)(a),()=>{r.error(!0),s.allErrors||n.break()})}),r.ok(a)}};return Ti.default=r,Ti}var Di,ji={};function Ri(){if(Di)return ji;Di=1,Object.defineProperty(ji,"__esModule",{value:!0});const e=An(),t=on(),r=fn(),n=cn(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>t._`{additionalProperty: ${e.additionalProperty}}`},code(o){const{gen:i,schema:s,parentSchema:a,data:c,errsCount:l,it:d}=o;if(!l)throw new Error("ajv implementation error");const{allErrors:u,opts:p}=d;if(d.props=!0,"all"!==p.removeAdditional&&(0,n.alwaysValidSchema)(d,s))return;const f=(0,e.allSchemaProperties)(a.properties),h=(0,e.allSchemaProperties)(a.patternProperties);function m(e){i.code(t._`delete ${c}[${e}]`)}function g(e){if("all"===p.removeAdditional||p.removeAdditional&&!1===s)m(e);else{if(!1===s)return o.setParams({additionalProperty:e}),o.error(),void(u||i.break());if("object"==typeof s&&!(0,n.alwaysValidSchema)(d,s)){const r=i.name("valid");"failing"===p.removeAdditional?(y(e,r,!1),i.if((0,t.not)(r),()=>{o.reset(),m(e)})):(y(e,r),u||i.if((0,t.not)(r),()=>i.break()))}}}function y(e,t,r){const i={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(i,t)}i.forIn("key",c,r=>{f.length||h.length?i.if(function(r){let s;if(f.length>8){const t=(0,n.schemaRefOrVal)(d,a.properties,"properties");s=(0,e.isOwnProperty)(i,t,r)}else s=f.length?(0,t.or)(...f.map(e=>t._`${r} === ${e}`)):t.nil;return h.length&&(s=(0,t.or)(s,...h.map(n=>t._`${(0,e.usePattern)(o,n)}.test(${r})`))),(0,t.not)(s)}(r),()=>g(r)):g(r)}),o.ok(t._`${l} === ${r.default.errors}`)}};return ji.default=o,ji}var Fi,Mi={};function Gi(){if(Fi)return Mi;Fi=1,Object.defineProperty(Mi,"__esModule",{value:!0});const e=qn(),t=An(),r=cn(),n=Ri(),o={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:i,schema:s,parentSchema:a,data:c,it:l}=o;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&n.default.code(new e.KeywordCxt(l,n.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(s);for(const e of d)l.definedProperties.add(e);l.opts.unevaluated&&d.length&&!0!==l.props&&(l.props=r.mergeEvaluated.props(i,(0,r.toHash)(d),l.props));const u=d.filter(e=>!(0,r.alwaysValidSchema)(l,s[e]));if(0===u.length)return;const p=i.name("valid");for(const e of u)f(e)?h(e):(i.if((0,t.propertyInData)(i,c,e,l.opts.ownProperties)),h(e),l.allErrors||i.else().var(p,!0),i.endIf()),o.it.definedProperties.add(e),o.ok(p);function f(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==s[e].default}function h(e){o.subschema({keyword:"properties",schemaProp:e,dataProp:e},p)}}};return Mi.default=o,Mi}var Ui,Bi={};function zi(){if(Ui)return Bi;Ui=1,Object.defineProperty(Bi,"__esModule",{value:!0});const e=An(),t=on(),r=cn(),n=cn(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:i,schema:s,data:a,parentSchema:c,it:l}=o,{opts:d}=l,u=(0,e.allSchemaProperties)(s),p=u.filter(e=>(0,r.alwaysValidSchema)(l,s[e]));if(0===u.length||p.length===u.length&&(!l.opts.unevaluated||!0===l.props))return;const f=d.strictSchema&&!d.allowMatchingProperties&&c.properties,h=i.name("valid");!0===l.props||l.props instanceof t.Name||(l.props=(0,n.evaluatedPropsToName)(i,l.props));const{props:m}=l;function g(e){for(const t in f)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){i.forIn("key",a,s=>{i.if(t._`${(0,e.usePattern)(o,r)}.test(${s})`,()=>{const e=p.includes(r);e||o.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:n.Type.Str},h),l.opts.unevaluated&&!0!==m?i.assign(t._`${m}[${s}]`,!0):e||l.allErrors||i.if((0,t.not)(h),()=>i.break())})})}!function(){for(const e of u)f&&g(e),l.allErrors?y(e):(i.var(h,!0),y(e),i.if(h))}()}};return Bi.default=o,Bi}var Hi,Vi={};function Wi(){if(Hi)return Vi;Hi=1,Object.defineProperty(Vi,"__esModule",{value:!0});const e=cn(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:r,schema:n,it:o}=t;if((0,e.alwaysValidSchema)(o,n))return void t.fail();const i=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return Vi.default=t,Vi}var qi,Ki={};function Ji(){if(qi)return Ki;qi=1,Object.defineProperty(Ki,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:An().validateUnion,error:{message:"must match a schema in anyOf"}};return Ki.default=e,Ki}var Yi,Xi={};function Zi(){if(Yi)return Xi;Yi=1,Object.defineProperty(Xi,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(r){const{gen:n,schema:o,parentSchema:i,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.discriminator)return;const a=o,c=n.let("valid",!1),l=n.let("passing",null),d=n.name("_valid");r.setParams({passing:l}),n.block(function(){a.forEach((o,i)=>{let a;(0,t.alwaysValidSchema)(s,o)?n.var(d,!0):a=r.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},d),i>0&&n.if(e._`${d} && ${c}`).assign(c,!1).assign(l,e._`[${l}, ${i}]`).else(),n.if(d,()=>{n.assign(c,!0),n.assign(l,i),a&&r.mergeEvaluated(a,e.Name)})})}),r.result(c,()=>r.reset(),()=>r.error(!0))}};return Xi.default=r,Xi}var Qi,es={};function ts(){if(Qi)return es;Qi=1,Object.defineProperty(es,"__esModule",{value:!0});const e=cn(),t={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:n,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const i=r.name("valid");n.forEach((r,n)=>{if((0,e.alwaysValidSchema)(o,r))return;const s=t.subschema({keyword:"allOf",schemaProp:n},i);t.ok(i),t.mergeEvaluated(s)})}};return es.default=t,es}var rs,ns={};function os(){if(rs)return ns;rs=1,Object.defineProperty(ns,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(r){const{gen:o,parentSchema:i,it:s}=r;void 0===i.then&&void 0===i.else&&(0,t.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=n(s,"then"),c=n(s,"else");if(!a&&!c)return;const l=o.let("valid",!0),d=o.name("_valid");if(function(){const e=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);r.mergeEvaluated(e)}(),r.reset(),a&&c){const e=o.let("ifClause");r.setParams({ifClause:e}),o.if(d,u("then",e),u("else",e))}else a?o.if(d,u("then")):o.if((0,e.not)(d),u("else"));function u(t,n){return()=>{const i=r.subschema({keyword:t},d);o.assign(l,d),r.mergeValidEvaluated(i,l),n?o.assign(n,e._`${t}`):r.setParams({ifClause:t})}}r.pass(l,()=>r.error(!0))}};function n(e,r){const n=e.schema[r];return void 0!==n&&!(0,t.alwaysValidSchema)(e,n)}return ns.default=r,ns}var is,ss,as={};function cs(){if(is)return as;is=1,Object.defineProperty(as,"__esModule",{value:!0});const e=cn(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:n}){void 0===r.if&&(0,e.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};return as.default=t,as}function ls(){if(ss)return hi;ss=1,Object.defineProperty(hi,"__esModule",{value:!0});const e=gi(),t=Ei(),r=wi(),n=ki(),o=Ci(),i=Oi(),s=xi(),a=Ri(),c=Gi(),l=zi(),d=Wi(),u=Ji(),p=Zi(),f=ts(),h=os(),m=cs();return hi.default=function(g=!1){const y=[d.default,u.default,p.default,f.default,h.default,m.default,s.default,a.default,i.default,c.default,l.default];return g?y.push(t.default,n.default):y.push(e.default,r.default),y.push(o.default),y},hi}var ds,us={},ps={};function fs(){if(ds)return ps;ds=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.dynamicAnchor=void 0;const e=on(),t=fn(),r=ro(),n=_o(),o={keyword:"$dynamicAnchor",schemaType:"string",code:e=>i(e,e.schema)};function i(o,i){const{gen:s,it:a}=o;a.schemaEnv.root.dynamicAnchors[i]=!0;const c=e._`${t.default.dynamicAnchors}${(0,e.getProperty)(i)}`,l="#"===a.errSchemaPath?a.validateName:function(e){const{schemaEnv:t,schema:o,self:i}=e.it,{root:s,baseId:a,localRefs:c,meta:l}=t.root,{schemaId:d}=i.opts,u=new r.SchemaEnv({schema:o,schemaId:d,root:s,baseId:a,localRefs:c,meta:l});return r.compileSchema.call(i,u),(0,n.getValidate)(e,u)}(o);s.if(e._`!${c}`,()=>s.assign(c,l))}return ps.dynamicAnchor=i,ps.default=o,ps}var hs,ms={};function gs(){if(hs)return ms;hs=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.dynamicRef=void 0;const e=on(),t=fn(),r=_o(),n={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)};function o(n,o){const{gen:i,keyword:s,it:a}=n;if("#"!==o[0])throw new Error(`"${s}" only supports hash fragment reference`);const c=o.slice(1);if(a.allErrors)l();else{const e=i.let("valid",!1);l(e),n.ok(e)}function l(r){if(a.schemaEnv.root.dynamicAnchors[c]){const n=i.let("_v",e._`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`);i.if(n,d(n,r),d(a.validateName,r))}else d(a.validateName,r)()}function d(e,t){return t?()=>i.block(()=>{(0,r.callRef)(n,e),i.let(t,!0)}):()=>(0,r.callRef)(n,e)}}return ms.dynamicRef=o,ms.default=n,ms}var ys,vs={};function bs(){if(ys)return vs;ys=1,Object.defineProperty(vs,"__esModule",{value:!0});const e=fs(),t=cn(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return vs.default=r,vs}var $s,ws,Es={};function Ss(){if($s)return Es;$s=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=gs(),t={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,e.dynamicRef)(t,t.schema)};return Es.default=t,Es}function Ps(){if(ws)return us;ws=1,Object.defineProperty(us,"__esModule",{value:!0});const e=fs(),t=gs(),r=bs(),n=Ss(),o=[e.default,t.default,r.default,n.default];return us.default=o,us}var ks,_s={},Ls={};function Cs(){if(ks)return Ls;ks=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=Oi(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:t=>(0,e.validatePropertyDeps)(t)};return Ls.default=t,Ls}var Ns,Is={};function Os(){if(Ns)return Is;Ns=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=Oi(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,e.validateSchemaDeps)(t)};return Is.default=t,Is}var As,Ts,xs={};function Ds(){if(As)return xs;As=1,Object.defineProperty(xs,"__esModule",{value:!0});const e=cn(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:r,it:n}){void 0===r.contains&&(0,e.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};return xs.default=t,xs}function js(){if(Ts)return _s;Ts=1,Object.defineProperty(_s,"__esModule",{value:!0});const e=Cs(),t=Os(),r=Ds(),n=[e.default,t.default,r.default];return _s.default=n,_s}var Rs,Fs={},Ms={};function Gs(){if(Rs)return Ms;Rs=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=on(),t=cn(),r=fn(),n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:t})=>e._`{unevaluatedProperty: ${t.unevaluatedProperty}}`},code(n){const{gen:o,schema:i,data:s,errsCount:a,it:c}=n;if(!a)throw new Error("ajv implementation error");const{allErrors:l,props:d}=c;function u(r){if(!1===i)return n.setParams({unevaluatedProperty:r}),n.error(),void(l||o.break());if(!(0,t.alwaysValidSchema)(c,i)){const i=o.name("valid");n.subschema({keyword:"unevaluatedProperties",dataProp:r,dataPropType:t.Type.Str},i),l||o.if((0,e.not)(i),()=>o.break())}}d instanceof e.Name?o.if(e._`${d} !== true`,()=>o.forIn("key",s,t=>o.if(function(t,r){return e._`!${t} || !${t}[${r}]`}(d,t),()=>u(t)))):!0!==d&&o.forIn("key",s,t=>void 0===d?u(t):o.if(function(t,r){const n=[];for(const o in t)!0===t[o]&&n.push(e._`${r} !== ${o}`);return(0,e.and)(...n)}(d,t),()=>u(t))),c.props=!0,n.ok(e._`${a} === ${r.default.errors}`)}};return Ms.default=n,Ms}var Us,Bs,zs={};function Hs(){if(Us)return zs;Us=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(r){const{gen:n,schema:o,data:i,it:s}=r,a=s.items||0;if(!0===a)return;const c=n.const("len",e._`${i}.length`);if(!1===o)r.setParams({len:a}),r.fail(e._`${c} > ${a}`);else if("object"==typeof o&&!(0,t.alwaysValidSchema)(s,o)){const o=n.var("valid",e._`${c} <= ${a}`);n.if((0,e.not)(o),()=>function(o,i){n.forRange("i",i,c,i=>{r.subschema({keyword:"unevaluatedItems",dataProp:i,dataPropType:t.Type.Num},o),s.allErrors||n.if((0,e.not)(o),()=>n.break())})}(o,a)),r.ok(o)}s.items=!0}};return zs.default=r,zs}function Vs(){if(Bs)return Fs;Bs=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=Gs(),t=Hs(),r=[e.default,t.default];return Fs.default=r,Fs}var Ws,qs,Ks={},Js={};function Ys(){if(Ws)return Js;Ws=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=on(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,r){const{gen:n,data:o,$data:i,schema:s,schemaCode:a,it:c}=t,{opts:l,errSchemaPath:d,schemaEnv:u,self:p}=c;l.validateFormats&&(i?function(){const i=n.scopeValue("formats",{ref:p.formats,code:l.code.formats}),s=n.const("fDef",e._`${i}[${a}]`),c=n.let("fType"),d=n.let("format");n.if(e._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,()=>n.assign(c,e._`${s}.type || "string"`).assign(d,e._`${s}.validate`),()=>n.assign(c,e._`"string"`).assign(d,s)),t.fail$data((0,e.or)(!1===l.strictSchema?e.nil:e._`${a} && !${d}`,function(){const t=u.$async?e._`(${s}.async ? await ${d}(${o}) : ${d}(${o}))`:e._`${d}(${o})`,n=e._`(typeof ${d} == "function" ? ${t} : ${d}.test(${o}))`;return e._`${d} && ${d} !== true && ${c} === ${r} && !${n}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1===l.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${d}"`}}();if(!0===i)return;const[a,c,f]=function(t){const r=t instanceof RegExp?(0,e.regexpCode)(t):l.code.formats?e._`${l.code.formats}${(0,e.getProperty)(s)}`:void 0,o=n.scopeValue("formats",{key:s,ref:t,code:r});if("object"==typeof t&&!(t instanceof RegExp))return[t.type||"string",t.validate,e._`${o}.validate`];return["string",t,o]}(i);a===r&&t.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!u.$async)throw new Error("async format in sync schema");return e._`await ${f}(${o})`}return"function"==typeof c?e._`${f}(${o})`:e._`${f}.test(${o})`}())}())}};return Js.default=t,Js}function Xs(){if(qs)return Ks;qs=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=[Ys().default];return Ks.default=e,Ks}var Zs,Qs,ea={};function ta(){return Zs||(Zs=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.contentVocabulary=ea.metadataVocabulary=void 0,ea.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ea.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ea}function ra(){if(Qs)return bo;Qs=1,Object.defineProperty(bo,"__esModule",{value:!0});const e=Lo(),t=pi(),r=ls(),n=Ps(),o=js(),i=Vs(),s=Xs(),a=ta(),c=[n.default,e.default,t.default,(0,r.default)(!0),s.default,a.metadataVocabulary,a.contentVocabulary,o.default,i.default];return bo.default=c,bo}var na,oa,ia={},sa={};function aa(){return na||(na=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(e||(sa.DiscrError=e={}))),sa;var e}function ca(){if(oa)return ia;oa=1,Object.defineProperty(ia,"__esModule",{value:!0});const e=on(),t=aa(),r=ro(),n=Qn(),o=cn(),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:r}})=>e===t.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:n}})=>e._`{error: ${t}, tag: ${n}, tagValue: ${r}}`},code(i){const{gen:s,data:a,schema:c,parentSchema:l,it:d}=i,{oneOf:u}=l;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=c.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const f=s.let("valid",!1),h=s.const("tag",e._`${a}${(0,e.getProperty)(p)}`);function m(t){const r=s.name("valid"),n=i.subschema({keyword:"oneOf",schemaProp:t},r);return i.mergeEvaluated(n,e.Name),r}s.if(e._`typeof ${h} == "string"`,()=>function(){const a=function(){var e;const t={},i=a(l);let s=!0;for(let t=0;t<u.length;t++){let l=u[t];if((null==l?void 0:l.$ref)&&!(0,o.schemaHasRulesButRef)(l,d.self.RULES)){const e=l.$ref;if(l=r.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e),l instanceof r.SchemaEnv&&(l=l.schema),void 0===l)throw new n.default(d.opts.uriResolver,d.baseId,e)}const f=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[p];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);s=s&&(i||a(l)),c(f,t)}if(!s)throw new Error(`discriminator: "${p}" must be required`);return t;function a({required:e}){return Array.isArray(e)&&e.includes(p)}function c(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();s.if(!1);for(const t in a)s.elseIf(e._`${h} === ${t}`),s.assign(f,m(a[t]));s.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:h,tagName:p}),s.endIf()}(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:h,tagName:p})),i.ok(f)}};return ia.default=i,ia}var la,da,ua={},pa={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},fa={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},ha={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},ma={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},ga={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},ya={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},va={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},ba={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};function $a(){if(la)return ua;la=1,Object.defineProperty(ua,"__esModule",{value:!0});const e=pa,t=fa,r=ha,n=ma,o=ga,i=ya,s=va,a=ba,c=["/properties"];return ua.default=function(l){return[e,t,r,n,o,d(this,i),s,d(this,a)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function d(e,t){return l?e.$dataMetaSchema(t,c):t}},ua}function wa(){return da||(da=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=yo(),n=ra(),o=ca(),i=$a(),s="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(i.default.call(this,e),this.refs["http://json-schema.org/schema"]=s)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var c=qn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=on();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=Yn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var u=Qn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}(Wr,Wr.exports)),Wr.exports}var Ea=Ot(wa());const Sa=te.object({templateEntry:te.string({message:"templateEntry must be a string"}).describe("Main entry point for the portal"),schemaEntry:te.string({message:"schemaEntry must be a string"}).describe("Schema file for portal validation"),assetPath:te.string({message:"assetPath must be a string"}).optional().describe("Asset path for dev/preview builds"),githubRepo:te.string({message:"githubRepo must be a string"}).optional().describe("GitHub repo URL or local git remote"),version:te.string({message:"version must be a string"}).describe("Version from package.json"),timestamp:te.string({message:"timestamp must be a string"}).describe("Current build timestamp (ISO8601)"),commitSha:te.string({message:"commitSha must be a string"}).describe("Current git commit SHA"),annotations:te.record(te.string(),te.string()).optional().describe("Optional build annotations"),projectPage:te.string({message:"projectPage must be a string"}).optional().describe("Optional project homepage"),allowedExtensions:te.array(te.string({message:"Each allowed extension must be a string"}),{message:"allowedExtensions must be an array of strings"}).describe("List of allowed asset extensions (with leading dot)"),schema:te.record(te.string(),te.unknown()).optional().describe("Optional schema for the portal"),config:te.record(te.string(),te.unknown()).optional().describe("Optional configuration for the portal")});te.object({name:te.string({message:"name must be a string"}).describe("Short app key (unscoped, derived from package name)"),displayName:te.string({message:"displayName must be a string"}).optional().describe("Full package name, may include scope"),description:te.string({message:"description must be a string"}).optional().describe("Description of the portal"),build:Sa});const Pa=e("schema").description("Generate or validate a Fusion portal schema file.").addHelpText("after",["","Examples:"," $ ffc portal schema"," $ ffc portal schema --output portal.schema.json"," $ ffc portal schema --validate my-config.json"].join("\n")).addOption(Fe({allowDev:!0})).option("-o, --output <string>","Output file name (default: stdout)","stdout").option("-d, --debug","Enable debug mode for verbose logging",!1).option("-v, --validate <file>","Validate the generated schema against a JSON file").argument("[schema]","Schema build file to use (e.g., portal.schema[.env]?.[ts,js,json])").action(async(e,t)=>{const r=new f("portal:schema",{debug:t.debug});r.debug("Manifest file:",e),r.debug("Current working directory:",process.cwd()),r.start("Generating schema for the application...");const n=await(async(e,t)=>{const r=[`portal.schema.${e.environment}`,"portal.schema"],n=await se(r,{baseDir:e.root,extensions:t?.extensions,script:{resolve:async t=>{const r="function"==typeof t.default?await Promise.resolve(t.default(e)):t.default;if(!r)throw new Error("Schema function did not return a valid schema");return r}}});return{schema:n.config,path:n.path,extension:n.extension}})({command:"build",environment:t.environment,mode:"build",root:process.cwd()});if(r.debug("Schema:",JSON.stringify(n,null,2)),r.succeed("Schema generated successfully!"),t.output&&("stdout"===t.output?r.info("Schema:",JSON.stringify(n.schema,null,2)):(r.start(`Writing schema to ${t.output}`),((e,t,r)=>{const n=l(String(e));U(n)||V(n,{recursive:!0}),M(e,t,r)})(t.output,JSON.stringify(n.schema,null,2)),r.succeed(`Schema written to ${t.output}`)),process.exit(0)),t.validate){r.start("Validating schema against JSON file...");const e=new Ea({strict:!0}).compile(n.schema),o=await ae(t.validate);r.debug("JSON value:",JSON.stringify(o,null,2));e(o)?r.succeed("Schema validation passed!"):(r.fail("Schema validation failed:",JSON.stringify(e.errors??"Unknown error")),process.exit(1))}}),ka=e("build").description("Build the Fusion portal from a manifest file with environment-specific settings.").addHelpText("after",["","If no manifest is provided, the command will search for a default portal.manifest.[ts|js|json] in the current directory.","example: `ffc portal build --env prod` will search for `portal.manifest.prod.ts` then fallback to `portal.manifest.ts`","","NOTE: portal manifest is not required, a default manifest will be generated if not provided","","Examples:"," $ ffc portal build"," $ ffc portal build portal.manifest.prod.ts --debug",""].join("\n")).option("-d, --debug","Enable debug mode for verbose logging",!1).argument("[manifest]","Manifest build file to use for building (e.g., portal.manifest[.env]?.[ts|js|json])").action(async(e,t)=>{const r=new f("portal:build",{debug:t.debug});await C({log:r,manifest:e})}),_a=e("pack").description("Bundle the Fusion portal into a deployable archive.").addHelpText("after",["","If no manifest is provided, a default portal.manifest(.$ENV)?.[ts|js|json] is used from the current directory.","example: `ffc portal pack --env prod` will search for `portal.manifest.prod.ts` then fallback to `portal.manifest.ts`","","NOTE: portal manifest is not required, a default manifest will be generated if not provided","","Examples:"," $ ffc portal pack"," $ ffc portal pack portal.manifest.dev.ts --archive my-portal.zip --output ./dist"].join("\n")).option("-a, --archive [string]","Name of the output archive file (default: out/bundle.zip)","out/bundle.zip").option("-d, --debug [boolean]","Enable debug mode for verbose logging",!1).option("--schema [string]","Schema file to use for validation").argument("[manifest]","Manifest file to use for bundling (e.g., my-portal.manifest.ts)").action(async(e,t)=>{const r=new f("portal:pack",{debug:t.debug});await N({log:r,manifest:e,archive:t.archive,schema:t.schema}).catch(e=>{r.error("Failed to create package:",e),process.exit(1)})}),La=He(e("upload").description("Upload a Fusion portal bundle to the portal registry.").addHelpText("after",["","Uploads a distributable portal bundle (e.g., portal-bundle.zip) to the Fusion portal registry.","","Examples:"," $ ffc portal upload"," $ ffc portal upload my-portal-bundle.zip --name my-portal"," $ ffc portal upload --debug"].join("\n")).option("-d, --debug [boolean]","Enable debug mode for verbose logging",!1).addOption(Fe({allowDev:!1})).argument("<bundle>","Portal bundle to upload (e.g., out/bundle.zip)").action(async(e,t)=>{const r=new f("portal:upload",{debug:t.debug});r?.start("Initializing Fusion Framework...");const n=await b({env:t.env,auth:{token:t.token,tenantId:t.tenantId,clientId:t.clientId}});r?.succeed("Initialized Fusion Framework"),await I({log:r,framework:n,fileOrBundle:e}).catch(e=>{r.error("Failed to upload bundle:",e),process.exit(1)})}));const Ca=He(e("tag").description("Tag your uploaded Fusion Portal build version with a specific tag.").addHelpText("after",["","Note: using --package is preferred over --manifest, since no infered compilation is required.","","Examples:"," $ ffc portal tag latest"," $ ffc portal tag latest --package my-portal@1.2.3 --env prod"," $ ffc portal tag preview --manifest ./portal.manifest.ts"," $ ffc portal tag next --package my-portal@2.0.0-alpha"," $ ffc portal tag stable --package my-portal@1.5.0"," $ ffc portal tag pr-1234 --package my-portal@2.0.0"].join("\n")).addOption(Fe({allowDev:!1})).option("-m, --manifest <string>","Manifest file to use. Note: ignoring if --package is provided").option("-p, --package [package@version]","Package to tag in format name@version (e.g., my-portal@1.0.0). If not provided, loaded from manifest").option("-d, --debug","Enable debug mode for verbose logging").option("--silent","Silent mode, suppresses output except errors").argument("<tag>","Tag to apply (e.g. latest | preview | next | pr-1234). Alphanumeric, dots and dashes allowed.").action(async(e,t)=>{const r=t.silent?null:new f("app:tag",{debug:t.debug}),n={command:"build",environment:t.env,mode:process.env.NODE_ENV??"production",root:process.cwd()},o=await async function(e,t){if(e.package){const[t,r]=e.package.split("@");if(!t||!r)throw new Error("Package must be in format name@version (e.g., my-portal@1.0.0). Please verify the package name and version with --package");return{name:t,version:r}}const{manifest:r}=await L({manifest:e.manifest,env:t}),n=r.build?.version;if(!n)throw new Error(`Could not determine version from manifest. Please verify manifest ${e.manifest} or provide a package name and version with --package`);return{name:r.name,version:n}}(t,n).catch(e=>{r?.error(`😢 ${e instanceof Error?e.message:"Unknown error occurred"}`),r?.debug(e),process.exit(1)});r?.info("Tagging portal:",xe.greenBright(`${o.name}@${o.version} - ${e}`)),r?.start("Initializing Fusion Framework...");const i=await b({env:t.env,auth:{token:t.token,tenantId:t.tenantId,clientId:t.clientId}});r?.succeed("Initialized Fusion Framework"),O({tag:e,name:o.name,version:o.version,framework:i,log:r}).catch(e=>{r?.error("😢 Failed to tag application:",e),process.exit(1)})})),Na=He(e("publish").description("Build, upload, and tag your Fusion portal bundle for deployment.").addHelpText("after",["","If no manifest is provided, a default portal.manifest(.$ENV)?.[ts|js|json] is used from the current directory.","example: `ffc portal publish --env prod` will search for `portal.manifest.prod.ts` then fallback to `portal.manifest.ts`","","NOTE: portal manifest is not required, a default manifest will be generated if not provided","","Examples:"," $ ffc portal publish"," $ ffc portal publish --env prod --manifest portal.manifest.prod.ts"," $ ffc portal publish --tag preview"," $ ffc portal publish --tag next"," $ ffc portal publish --tag pr-1234"].join("\n")).option("-d, --debug","Enable debug mode for verbose logging",!1).addOption(Fe({allowDev:!1})).option("-m, --manifest [string]","Manifest file to use for bundling (e.g., my-portal.manifest.ts)").option("--schema [string]","Schema file to use for validation").option("-t, --tag [string]","Tag to apply to the published portal (e.g. latest | preview | next | pr-1234). Alphanumeric, dots and dashes allowed.","latest").action(async e=>{const t=new f("portal:publish",{debug:e.debug});t?.info("Using environment:",xe.redBright(e.env)),t.start("📦 Bundling Portal Template...");const r=await N({log:t,manifest:e.manifest,schema:e.schema}).catch(e=>{t.error("😢 Failed to create bundle:",e),process.exit(1)});t.succeed("📦 Bundling completed"),t?.start("💾 Initializing Fusion Framework...");const n=await b({env:e.env,auth:{token:e.token,tenantId:e.tenantId,clientId:e.clientId}});t?.succeed("💾 Initialized Fusion Framework"),t.start("🚀 Uploading Portal Template..."),await I({log:t,framework:n,fileOrBundle:r.archive}).catch(e=>{t.error("😢 Failed to upload bundle:",e),process.exit(1)}),t.succeed("🚀 Upload completed"),t.start("🏷️ Tagging Portal Template..."),await O({tag:e.tag,name:r.manifest.name,version:r.manifest.build.version,framework:n,log:t}).catch(e=>{t.error("😢 Failed to tag Portal Template:",e),process.exit(1)}),t.succeed("🏷️ Tagging completed")})),Ia=He(e("config").description("Generate or publish the Fusion portal configuration file.").addHelpText("after",["","By default, outputs the generated config object to stdout or a file. Use --publish to upload the config to the Fusion portal registry.","- Options [--token, --tenantId, --clientId, --manifest] are only relevant when --publish is used.",'- Option [-e, --env] cannot be set to "dev" when --publish is used.',"","Note:","- If not `portal.config(.$ENV)?.[ts|js|json]` is found it will fallback to generate a default config (empty object)","- If not `portal.manifest(.$ENV)?.[ts|js|json]` is found it will fallback to generate a default manifest","","Examples:"," $ ffc portal config app.config.ts"," $ ffc portal config portal.config.prod.ts --output ./dist/portal.config.json"," $ ffc portal config portal.manifest.prod.ts --silent > ./dist/portal.config.json"," $ ffc portal config --publish --manifest portal.manifest.ts --env prod"," $ ffc portal config --env prod my-custom.config.ts"].join("\n")).option("--debug","Enable debug mode for verbose logging").option("--silent","Silent mode, suppresses output except errors").option("--publish <name@version>","Publish config to Fusion portal registry, Identifier of the portal, example my-portal@1.2.3").addOption(Fe({allowDev:!0})).option("-o, --output <stdout|path>","Output the result to stdout or a file (ignored with --publish, default: stdout)","stdout").argument("[config]","Path to the portal config file (e.g., portal.config[.env]?.[ts,js,json])").action(async(e,t)=>{const r=t.silent?null:new f("portal:config",{debug:!!t.debug});if(t.publish){const[e,n]=t.publish.split("@")||[];return e&&n||(r?.fail("🤪","Portal identifier is required when using",xe.blue("--publish")),r?.info("Example: fusion-framework-cli portal config --publish my-portal@1.2.3"),process.exit(1)),"dev"===t.env&&(r?.fail("🤪",xe.blue("--env"),'cannot be "dev" when',xe.blue("--publish")," is used"),process.exit(1)),A({config:t.config,portal:{name:e,version:n},environment:t.env,auth:"token"in t?{token:t.token}:t,debug:t.debug})}const{config:n}=await T({log:r,config:e,env:{environment:t.env},output:"stdout"===t.output?void 0:t.output});"stdout"===t.output&&console.log(JSON.stringify(n,null,2))})),Oa=e("portal").description("Develop and deploy portal templates").addCommand(It).addCommand(Hr).addCommand(Pa).addCommand(ka).addCommand(_a).addCommand(La).addCommand(Ca).addCommand(Na).addCommand(Ia);o({quiet:!0});const[Aa]=process.versions.node.split(".").map(Number);Aa<Number(20)&&(console.error(xe.red("[ERROR]"),"Fusion Framework CLI requires Node.js 20 or higher."),process.exit(1));Aa!==Number(24)&&console.warn(xe.yellow("[WARNING]"),"Node.js 24.x (LTS) is recommended for best compatibility. You are using Node.js",process.versions.node);const Ta=p({cwd:s(import.meta.url)});if(!Ta)throw Error("failed to find program root");process.env.CLI_BIN=c(l(Ta.path),String(Ta.packageJson.bin?.["fusion-framework-cli"]));const xa=new n;xa.name(Ta.packageJson.name),xa.description([`${Ta.packageJson.name}@${Ta.packageJson.version}`,"","Fusion Framework CLI","","A toolkit for building, packaging, deploying, and managing Fusion applications and portals.","","• Run fusion <command> --help for details on any command.","• For documentation, issues, and source code, visit:"," https://equinor.github.io/fusion-framework/cli/"].join("\n")),xa.version(Ta.packageJson.version,"-V, --version","CLI version"),await(async e=>{e.addCommand(wt),e.addCommand(_t),e.addCommand(Lt),e.addCommand(Nt),e.addCommand(Oa),await async function(e){const t=[],r=async e=>{try{const t=l(e);return(await se(["fusion-cli.config"],{baseDir:t,script:{resolve:async e=>{const r=e.default;return"function"==typeof r?await r({root:t})??{plugins:[]}:r??{plugins:[]}}}})).config.plugins||[]}catch(t){return t instanceof ce||console.warn(`Warning: Failed to load plugin configuration from ${e}:`,t),[]}},n=[process.cwd(),s(import.meta.url)],o=await Promise.all(n.map(async e=>await le(["fusion-cli.config.ts","fusion-cli.config.js","fusion-cli.config.json"],{cwd:l(e)}))),i=Array.from(new Set(o.filter(e=>null!=e)));for(const e of i){const n=await r(e);t.push(...n)}if(0===t.length)return;const c=await u({cwd:process.cwd()}),p=c?l(c.path):process.cwd(),f=s(import.meta.url),h=await u({cwd:l(f)}),m=l(h?h.path:f);for(const r of t)try{if("function"==typeof r){r(e);continue}const t=r;let n=null,o=!1;if("function"==typeof import.meta.resolve)try{const e=import.meta.resolve(t);n=await import(e),o=!0}catch{}if(!o)try{n=await import(t),o=!0}catch{}if(!o)try{const e=d(m,"node_modules",t),r=d(e,"package.json"),i=JSON.parse(F(r,"utf-8")),s=i.exports?.["."]?.import||i.main,c=d(e,s),l=a(c).href;n=await import(l),o=!0}catch{}if(!o)try{const e=d(p,"node_modules",t),r=d(e,"package.json"),i=JSON.parse(F(r,"utf-8")),s=i.exports?.["."]?.import||i.main,c=d(e,s),l=a(c).href;n=await import(l),o=!0}catch{}if(!o||!n)throw new Error(`Could not resolve plugin "${t}" using any resolution strategy`);n.registerAiPlugin?n.registerAiPlugin(e):n.default?"function"==typeof n.default&&n.default(e):console.warn(`Warning: Plugin "${t}" does not export a registration function.`)}catch(e){if(e instanceof Error&&(e.message.includes("Cannot find module")||e.message.includes("MODULE_NOT_FOUND"))){const e="string"==typeof r?r:"function";console.warn(`Warning: Plugin "${e}" is not installed. Install it to use its commands.`)}else{const t="string"==typeof r?r:"function";console.warn(`Warning: Failed to load plugin "${t}":`,e)}}}(e)})(xa),xa.parse();
7
+ deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);i(e,t),s(e,r)}};function i(e,r=e.schema){const{gen:o,data:i,it:s}=e;if(0===Object.keys(r).length)return;const a=o.let("missing");for(const c in r){const l=r[c];if(0===l.length)continue;const d=(0,n.propertyInData)(o,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?o.if(d,()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)}):(o.if(t._`${d} && (${(0,n.checkMissingProp)(e,l,a)})`),(0,n.reportMissingProp)(e,a),o.else())}}function s(e,t=e.schema){const{gen:o,data:i,keyword:s,it:a}=e,c=o.name("valid");for(const l in t)(0,r.alwaysValidSchema)(a,t[l])||(o.if((0,n.propertyInData)(o,i,l,a.opts.ownProperties),()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>o.var(c,!0)),e.ok(c))}e.validatePropertyDeps=i,e.validateSchemaDeps=s,e.default=o}(Ii)),Ii}var Ai,Ti={};function xi(){if(Ai)return Ti;Ai=1,Object.defineProperty(Ti,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>e._`{propertyName: ${t.propertyName}}`},code(r){const{gen:n,schema:o,data:i,it:s}=r;if((0,t.alwaysValidSchema)(s,o))return;const a=n.name("valid");n.forIn("key",i,t=>{r.setParams({propertyName:t}),r.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},a),n.if((0,e.not)(a),()=>{r.error(!0),s.allErrors||n.break()})}),r.ok(a)}};return Ti.default=r,Ti}var Di,ji={};function Ri(){if(Di)return ji;Di=1,Object.defineProperty(ji,"__esModule",{value:!0});const e=An(),t=on(),r=fn(),n=cn(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>t._`{additionalProperty: ${e.additionalProperty}}`},code(o){const{gen:i,schema:s,parentSchema:a,data:c,errsCount:l,it:d}=o;if(!l)throw new Error("ajv implementation error");const{allErrors:u,opts:p}=d;if(d.props=!0,"all"!==p.removeAdditional&&(0,n.alwaysValidSchema)(d,s))return;const f=(0,e.allSchemaProperties)(a.properties),h=(0,e.allSchemaProperties)(a.patternProperties);function m(e){i.code(t._`delete ${c}[${e}]`)}function g(e){if("all"===p.removeAdditional||p.removeAdditional&&!1===s)m(e);else{if(!1===s)return o.setParams({additionalProperty:e}),o.error(),void(u||i.break());if("object"==typeof s&&!(0,n.alwaysValidSchema)(d,s)){const r=i.name("valid");"failing"===p.removeAdditional?(y(e,r,!1),i.if((0,t.not)(r),()=>{o.reset(),m(e)})):(y(e,r),u||i.if((0,t.not)(r),()=>i.break()))}}}function y(e,t,r){const i={keyword:"additionalProperties",dataProp:e,dataPropType:n.Type.Str};!1===r&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(i,t)}i.forIn("key",c,r=>{f.length||h.length?i.if(function(r){let s;if(f.length>8){const t=(0,n.schemaRefOrVal)(d,a.properties,"properties");s=(0,e.isOwnProperty)(i,t,r)}else s=f.length?(0,t.or)(...f.map(e=>t._`${r} === ${e}`)):t.nil;return h.length&&(s=(0,t.or)(s,...h.map(n=>t._`${(0,e.usePattern)(o,n)}.test(${r})`))),(0,t.not)(s)}(r),()=>g(r)):g(r)}),o.ok(t._`${l} === ${r.default.errors}`)}};return ji.default=o,ji}var Fi,Mi={};function Gi(){if(Fi)return Mi;Fi=1,Object.defineProperty(Mi,"__esModule",{value:!0});const e=qn(),t=An(),r=cn(),n=Ri(),o={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:i,schema:s,parentSchema:a,data:c,it:l}=o;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&n.default.code(new e.KeywordCxt(l,n.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(s);for(const e of d)l.definedProperties.add(e);l.opts.unevaluated&&d.length&&!0!==l.props&&(l.props=r.mergeEvaluated.props(i,(0,r.toHash)(d),l.props));const u=d.filter(e=>!(0,r.alwaysValidSchema)(l,s[e]));if(0===u.length)return;const p=i.name("valid");for(const e of u)f(e)?h(e):(i.if((0,t.propertyInData)(i,c,e,l.opts.ownProperties)),h(e),l.allErrors||i.else().var(p,!0),i.endIf()),o.it.definedProperties.add(e),o.ok(p);function f(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==s[e].default}function h(e){o.subschema({keyword:"properties",schemaProp:e,dataProp:e},p)}}};return Mi.default=o,Mi}var Ui,Bi={};function zi(){if(Ui)return Bi;Ui=1,Object.defineProperty(Bi,"__esModule",{value:!0});const e=An(),t=on(),r=cn(),n=cn(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:i,schema:s,data:a,parentSchema:c,it:l}=o,{opts:d}=l,u=(0,e.allSchemaProperties)(s),p=u.filter(e=>(0,r.alwaysValidSchema)(l,s[e]));if(0===u.length||p.length===u.length&&(!l.opts.unevaluated||!0===l.props))return;const f=d.strictSchema&&!d.allowMatchingProperties&&c.properties,h=i.name("valid");!0===l.props||l.props instanceof t.Name||(l.props=(0,n.evaluatedPropsToName)(i,l.props));const{props:m}=l;function g(e){for(const t in f)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){i.forIn("key",a,s=>{i.if(t._`${(0,e.usePattern)(o,r)}.test(${s})`,()=>{const e=p.includes(r);e||o.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:n.Type.Str},h),l.opts.unevaluated&&!0!==m?i.assign(t._`${m}[${s}]`,!0):e||l.allErrors||i.if((0,t.not)(h),()=>i.break())})})}!function(){for(const e of u)f&&g(e),l.allErrors?y(e):(i.var(h,!0),y(e),i.if(h))}()}};return Bi.default=o,Bi}var Hi,Vi={};function Wi(){if(Hi)return Vi;Hi=1,Object.defineProperty(Vi,"__esModule",{value:!0});const e=cn(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:r,schema:n,it:o}=t;if((0,e.alwaysValidSchema)(o,n))return void t.fail();const i=r.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return Vi.default=t,Vi}var qi,Ki={};function Ji(){if(qi)return Ki;qi=1,Object.defineProperty(Ki,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:An().validateUnion,error:{message:"must match a schema in anyOf"}};return Ki.default=e,Ki}var Yi,Xi={};function Zi(){if(Yi)return Xi;Yi=1,Object.defineProperty(Xi,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>e._`{passingSchemas: ${t.passing}}`},code(r){const{gen:n,schema:o,parentSchema:i,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.discriminator)return;const a=o,c=n.let("valid",!1),l=n.let("passing",null),d=n.name("_valid");r.setParams({passing:l}),n.block(function(){a.forEach((o,i)=>{let a;(0,t.alwaysValidSchema)(s,o)?n.var(d,!0):a=r.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},d),i>0&&n.if(e._`${d} && ${c}`).assign(c,!1).assign(l,e._`[${l}, ${i}]`).else(),n.if(d,()=>{n.assign(c,!0),n.assign(l,i),a&&r.mergeEvaluated(a,e.Name)})})}),r.result(c,()=>r.reset(),()=>r.error(!0))}};return Xi.default=r,Xi}var Qi,es={};function ts(){if(Qi)return es;Qi=1,Object.defineProperty(es,"__esModule",{value:!0});const e=cn(),t={keyword:"allOf",schemaType:"array",code(t){const{gen:r,schema:n,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");const i=r.name("valid");n.forEach((r,n)=>{if((0,e.alwaysValidSchema)(o,r))return;const s=t.subschema({keyword:"allOf",schemaProp:n},i);t.ok(i),t.mergeEvaluated(s)})}};return es.default=t,es}var rs,ns={};function os(){if(rs)return ns;rs=1,Object.defineProperty(ns,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>e.str`must match "${t.ifClause}" schema`,params:({params:t})=>e._`{failingKeyword: ${t.ifClause}}`},code(r){const{gen:o,parentSchema:i,it:s}=r;void 0===i.then&&void 0===i.else&&(0,t.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=n(s,"then"),c=n(s,"else");if(!a&&!c)return;const l=o.let("valid",!0),d=o.name("_valid");if(function(){const e=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);r.mergeEvaluated(e)}(),r.reset(),a&&c){const e=o.let("ifClause");r.setParams({ifClause:e}),o.if(d,u("then",e),u("else",e))}else a?o.if(d,u("then")):o.if((0,e.not)(d),u("else"));function u(t,n){return()=>{const i=r.subschema({keyword:t},d);o.assign(l,d),r.mergeValidEvaluated(i,l),n?o.assign(n,e._`${t}`):r.setParams({ifClause:t})}}r.pass(l,()=>r.error(!0))}};function n(e,r){const n=e.schema[r];return void 0!==n&&!(0,t.alwaysValidSchema)(e,n)}return ns.default=r,ns}var is,ss,as={};function cs(){if(is)return as;is=1,Object.defineProperty(as,"__esModule",{value:!0});const e=cn(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:r,it:n}){void 0===r.if&&(0,e.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};return as.default=t,as}function ls(){if(ss)return hi;ss=1,Object.defineProperty(hi,"__esModule",{value:!0});const e=gi(),t=Ei(),r=wi(),n=ki(),o=Ci(),i=Oi(),s=xi(),a=Ri(),c=Gi(),l=zi(),d=Wi(),u=Ji(),p=Zi(),f=ts(),h=os(),m=cs();return hi.default=function(g=!1){const y=[d.default,u.default,p.default,f.default,h.default,m.default,s.default,a.default,i.default,c.default,l.default];return g?y.push(t.default,n.default):y.push(e.default,r.default),y.push(o.default),y},hi}var ds,us={},ps={};function fs(){if(ds)return ps;ds=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.dynamicAnchor=void 0;const e=on(),t=fn(),r=ro(),n=_o(),o={keyword:"$dynamicAnchor",schemaType:"string",code:e=>i(e,e.schema)};function i(o,i){const{gen:s,it:a}=o;a.schemaEnv.root.dynamicAnchors[i]=!0;const c=e._`${t.default.dynamicAnchors}${(0,e.getProperty)(i)}`,l="#"===a.errSchemaPath?a.validateName:function(e){const{schemaEnv:t,schema:o,self:i}=e.it,{root:s,baseId:a,localRefs:c,meta:l}=t.root,{schemaId:d}=i.opts,u=new r.SchemaEnv({schema:o,schemaId:d,root:s,baseId:a,localRefs:c,meta:l});return r.compileSchema.call(i,u),(0,n.getValidate)(e,u)}(o);s.if(e._`!${c}`,()=>s.assign(c,l))}return ps.dynamicAnchor=i,ps.default=o,ps}var hs,ms={};function gs(){if(hs)return ms;hs=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.dynamicRef=void 0;const e=on(),t=fn(),r=_o(),n={keyword:"$dynamicRef",schemaType:"string",code:e=>o(e,e.schema)};function o(n,o){const{gen:i,keyword:s,it:a}=n;if("#"!==o[0])throw new Error(`"${s}" only supports hash fragment reference`);const c=o.slice(1);if(a.allErrors)l();else{const e=i.let("valid",!1);l(e),n.ok(e)}function l(r){if(a.schemaEnv.root.dynamicAnchors[c]){const n=i.let("_v",e._`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`);i.if(n,d(n,r),d(a.validateName,r))}else d(a.validateName,r)()}function d(e,t){return t?()=>i.block(()=>{(0,r.callRef)(n,e),i.let(t,!0)}):()=>(0,r.callRef)(n,e)}}return ms.dynamicRef=o,ms.default=n,ms}var ys,vs={};function bs(){if(ys)return vs;ys=1,Object.defineProperty(vs,"__esModule",{value:!0});const e=fs(),t=cn(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return vs.default=r,vs}var $s,ws,Es={};function Ss(){if($s)return Es;$s=1,Object.defineProperty(Es,"__esModule",{value:!0});const e=gs(),t={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,e.dynamicRef)(t,t.schema)};return Es.default=t,Es}function Ps(){if(ws)return us;ws=1,Object.defineProperty(us,"__esModule",{value:!0});const e=fs(),t=gs(),r=bs(),n=Ss(),o=[e.default,t.default,r.default,n.default];return us.default=o,us}var ks,_s={},Ls={};function Cs(){if(ks)return Ls;ks=1,Object.defineProperty(Ls,"__esModule",{value:!0});const e=Oi(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:t=>(0,e.validatePropertyDeps)(t)};return Ls.default=t,Ls}var Ns,Is={};function Os(){if(Ns)return Is;Ns=1,Object.defineProperty(Is,"__esModule",{value:!0});const e=Oi(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,e.validateSchemaDeps)(t)};return Is.default=t,Is}var As,Ts,xs={};function Ds(){if(As)return xs;As=1,Object.defineProperty(xs,"__esModule",{value:!0});const e=cn(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:r,it:n}){void 0===r.contains&&(0,e.checkStrictMode)(n,`"${t}" without "contains" is ignored`)}};return xs.default=t,xs}function js(){if(Ts)return _s;Ts=1,Object.defineProperty(_s,"__esModule",{value:!0});const e=Cs(),t=Os(),r=Ds(),n=[e.default,t.default,r.default];return _s.default=n,_s}var Rs,Fs={},Ms={};function Gs(){if(Rs)return Ms;Rs=1,Object.defineProperty(Ms,"__esModule",{value:!0});const e=on(),t=cn(),r=fn(),n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:t})=>e._`{unevaluatedProperty: ${t.unevaluatedProperty}}`},code(n){const{gen:o,schema:i,data:s,errsCount:a,it:c}=n;if(!a)throw new Error("ajv implementation error");const{allErrors:l,props:d}=c;function u(r){if(!1===i)return n.setParams({unevaluatedProperty:r}),n.error(),void(l||o.break());if(!(0,t.alwaysValidSchema)(c,i)){const i=o.name("valid");n.subschema({keyword:"unevaluatedProperties",dataProp:r,dataPropType:t.Type.Str},i),l||o.if((0,e.not)(i),()=>o.break())}}d instanceof e.Name?o.if(e._`${d} !== true`,()=>o.forIn("key",s,t=>o.if(function(t,r){return e._`!${t} || !${t}[${r}]`}(d,t),()=>u(t)))):!0!==d&&o.forIn("key",s,t=>void 0===d?u(t):o.if(function(t,r){const n=[];for(const o in t)!0===t[o]&&n.push(e._`${r} !== ${o}`);return(0,e.and)(...n)}(d,t),()=>u(t))),c.props=!0,n.ok(e._`${a} === ${r.default.errors}`)}};return Ms.default=n,Ms}var Us,Bs,zs={};function Hs(){if(Us)return zs;Us=1,Object.defineProperty(zs,"__esModule",{value:!0});const e=on(),t=cn(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:t}})=>e.str`must NOT have more than ${t} items`,params:({params:{len:t}})=>e._`{limit: ${t}}`},code(r){const{gen:n,schema:o,data:i,it:s}=r,a=s.items||0;if(!0===a)return;const c=n.const("len",e._`${i}.length`);if(!1===o)r.setParams({len:a}),r.fail(e._`${c} > ${a}`);else if("object"==typeof o&&!(0,t.alwaysValidSchema)(s,o)){const o=n.var("valid",e._`${c} <= ${a}`);n.if((0,e.not)(o),()=>function(o,i){n.forRange("i",i,c,i=>{r.subschema({keyword:"unevaluatedItems",dataProp:i,dataPropType:t.Type.Num},o),s.allErrors||n.if((0,e.not)(o),()=>n.break())})}(o,a)),r.ok(o)}s.items=!0}};return zs.default=r,zs}function Vs(){if(Bs)return Fs;Bs=1,Object.defineProperty(Fs,"__esModule",{value:!0});const e=Gs(),t=Hs(),r=[e.default,t.default];return Fs.default=r,Fs}var Ws,qs,Ks={},Js={};function Ys(){if(Ws)return Js;Ws=1,Object.defineProperty(Js,"__esModule",{value:!0});const e=on(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>e.str`must match format "${t}"`,params:({schemaCode:t})=>e._`{format: ${t}}`},code(t,r){const{gen:n,data:o,$data:i,schema:s,schemaCode:a,it:c}=t,{opts:l,errSchemaPath:d,schemaEnv:u,self:p}=c;l.validateFormats&&(i?function(){const i=n.scopeValue("formats",{ref:p.formats,code:l.code.formats}),s=n.const("fDef",e._`${i}[${a}]`),c=n.let("fType"),d=n.let("format");n.if(e._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,()=>n.assign(c,e._`${s}.type || "string"`).assign(d,e._`${s}.validate`),()=>n.assign(c,e._`"string"`).assign(d,s)),t.fail$data((0,e.or)(!1===l.strictSchema?e.nil:e._`${a} && !${d}`,function(){const t=u.$async?e._`(${s}.async ? await ${d}(${o}) : ${d}(${o}))`:e._`${d}(${o})`,n=e._`(typeof ${d} == "function" ? ${t} : ${d}.test(${o}))`;return e._`${d} && ${d} !== true && ${c} === ${r} && !${n}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1===l.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${d}"`}}();if(!0===i)return;const[a,c,f]=function(t){const r=t instanceof RegExp?(0,e.regexpCode)(t):l.code.formats?e._`${l.code.formats}${(0,e.getProperty)(s)}`:void 0,o=n.scopeValue("formats",{key:s,ref:t,code:r});if("object"==typeof t&&!(t instanceof RegExp))return[t.type||"string",t.validate,e._`${o}.validate`];return["string",t,o]}(i);a===r&&t.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!u.$async)throw new Error("async format in sync schema");return e._`await ${f}(${o})`}return"function"==typeof c?e._`${f}(${o})`:e._`${f}.test(${o})`}())}())}};return Js.default=t,Js}function Xs(){if(qs)return Ks;qs=1,Object.defineProperty(Ks,"__esModule",{value:!0});const e=[Ys().default];return Ks.default=e,Ks}var Zs,Qs,ea={};function ta(){return Zs||(Zs=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.contentVocabulary=ea.metadataVocabulary=void 0,ea.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ea.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ea}function ra(){if(Qs)return bo;Qs=1,Object.defineProperty(bo,"__esModule",{value:!0});const e=Lo(),t=pi(),r=ls(),n=Ps(),o=js(),i=Vs(),s=Xs(),a=ta(),c=[n.default,e.default,t.default,(0,r.default)(!0),s.default,a.metadataVocabulary,a.contentVocabulary,o.default,i.default];return bo.default=c,bo}var na,oa,ia={},sa={};function aa(){return na||(na=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(e||(sa.DiscrError=e={}))),sa;var e}function ca(){if(oa)return ia;oa=1,Object.defineProperty(ia,"__esModule",{value:!0});const e=on(),t=aa(),r=ro(),n=Qn(),o=cn(),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:r}})=>e===t.DiscrError.Tag?`tag "${r}" must be string`:`value of tag "${r}" must be in oneOf`,params:({params:{discrError:t,tag:r,tagName:n}})=>e._`{error: ${t}, tag: ${n}, tagValue: ${r}}`},code(i){const{gen:s,data:a,schema:c,parentSchema:l,it:d}=i,{oneOf:u}=l;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=c.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const f=s.let("valid",!1),h=s.const("tag",e._`${a}${(0,e.getProperty)(p)}`);function m(t){const r=s.name("valid"),n=i.subschema({keyword:"oneOf",schemaProp:t},r);return i.mergeEvaluated(n,e.Name),r}s.if(e._`typeof ${h} == "string"`,()=>function(){const a=function(){var e;const t={},i=a(l);let s=!0;for(let t=0;t<u.length;t++){let l=u[t];if((null==l?void 0:l.$ref)&&!(0,o.schemaHasRulesButRef)(l,d.self.RULES)){const e=l.$ref;if(l=r.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e),l instanceof r.SchemaEnv&&(l=l.schema),void 0===l)throw new n.default(d.opts.uriResolver,d.baseId,e)}const f=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[p];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);s=s&&(i||a(l)),c(f,t)}if(!s)throw new Error(`discriminator: "${p}" must be required`);return t;function a({required:e}){return Array.isArray(e)&&e.includes(p)}function c(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();s.if(!1);for(const t in a)s.elseIf(e._`${h} === ${t}`),s.assign(f,m(a[t]));s.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:h,tagName:p}),s.endIf()}(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:h,tagName:p})),i.ok(f)}};return ia.default=i,ia}var la,da,ua={},pa={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}},fa={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}},ha={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}},ma={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}},ga={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}},ya={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}},va={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}},ba={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}};function $a(){if(la)return ua;la=1,Object.defineProperty(ua,"__esModule",{value:!0});const e=pa,t=fa,r=ha,n=ma,o=ga,i=ya,s=va,a=ba,c=["/properties"];return ua.default=function(l){return[e,t,r,n,o,d(this,i),s,d(this,a)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function d(e,t){return l?e.$dataMetaSchema(t,c):t}},ua}function wa(){return da||(da=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=yo(),n=ra(),o=ca(),i=$a(),s="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(i.default.call(this,e),this.refs["http://json-schema.org/schema"]=s)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var c=qn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=on();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=Yn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var u=Qn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return u.default}})}(Wr,Wr.exports)),Wr.exports}var Ea=Ot(wa());const Sa=te.object({templateEntry:te.string({message:"templateEntry must be a string"}).describe("Main entry point for the portal"),schemaEntry:te.string({message:"schemaEntry must be a string"}).describe("Schema file for portal validation"),assetPath:te.string({message:"assetPath must be a string"}).optional().describe("Asset path for dev/preview builds"),githubRepo:te.string({message:"githubRepo must be a string"}).optional().describe("GitHub repo URL or local git remote"),version:te.string({message:"version must be a string"}).describe("Version from package.json"),timestamp:te.string({message:"timestamp must be a string"}).describe("Current build timestamp (ISO8601)"),commitSha:te.string({message:"commitSha must be a string"}).describe("Current git commit SHA"),annotations:te.record(te.string(),te.string().optional()).optional().transform(e=>{if(e)return Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}).describe("Optional build annotations"),projectPage:te.string({message:"projectPage must be a string"}).optional().describe("Optional project homepage"),allowedExtensions:te.array(te.string({message:"Each allowed extension must be a string"}),{message:"allowedExtensions must be an array of strings"}).describe("List of allowed asset extensions (with leading dot)"),schema:te.record(te.string(),te.unknown()).optional().describe("Optional schema for the portal"),config:te.record(te.string(),te.unknown()).optional().describe("Optional configuration for the portal")});te.object({name:te.string({message:"name must be a string"}).describe("Short app key (unscoped, derived from package name)"),displayName:te.string({message:"displayName must be a string"}).optional().describe("Full package name, may include scope"),description:te.string({message:"description must be a string"}).optional().describe("Description of the portal"),build:Sa});const Pa=e("schema").description("Generate or validate a Fusion portal schema file.").addHelpText("after",["","Examples:"," $ ffc portal schema"," $ ffc portal schema --output portal.schema.json"," $ ffc portal schema --validate my-config.json"].join("\n")).addOption(Fe({allowDev:!0})).option("-o, --output <string>","Output file name (default: stdout)","stdout").option("-d, --debug","Enable debug mode for verbose logging",!1).option("-v, --validate <file>","Validate the generated schema against a JSON file").argument("[schema]","Schema build file to use (e.g., portal.schema[.env]?.[ts,js,json])").action(async(e,t)=>{const r=new f("portal:schema",{debug:t.debug});r.debug("Manifest file:",e),r.debug("Current working directory:",process.cwd()),r.start("Generating schema for the application...");const n=await(async(e,t)=>{const r=[`portal.schema.${e.environment}`,"portal.schema"],n=await se(r,{baseDir:e.root,extensions:t?.extensions,script:{resolve:async t=>{const r="function"==typeof t.default?await Promise.resolve(t.default(e)):t.default;if(!r)throw new Error("Schema function did not return a valid schema");return r}}});return{schema:n.config,path:n.path,extension:n.extension}})({command:"build",environment:t.environment,mode:"build",root:process.cwd()});if(r.debug("Schema:",JSON.stringify(n,null,2)),r.succeed("Schema generated successfully!"),t.output&&("stdout"===t.output?r.info("Schema:",JSON.stringify(n.schema,null,2)):(r.start(`Writing schema to ${t.output}`),((e,t,r)=>{const n=l(String(e));U(n)||V(n,{recursive:!0}),M(e,t,r)})(t.output,JSON.stringify(n.schema,null,2)),r.succeed(`Schema written to ${t.output}`)),process.exit(0)),t.validate){r.start("Validating schema against JSON file...");const e=new Ea({strict:!0}).compile(n.schema),o=await ae(t.validate);r.debug("JSON value:",JSON.stringify(o,null,2));e(o)?r.succeed("Schema validation passed!"):(r.fail("Schema validation failed:",JSON.stringify(e.errors??"Unknown error")),process.exit(1))}}),ka=e("build").description("Build the Fusion portal from a manifest file with environment-specific settings.").addHelpText("after",["","If no manifest is provided, the command will search for a default portal.manifest.[ts|js|json] in the current directory.","example: `ffc portal build --env prod` will search for `portal.manifest.prod.ts` then fallback to `portal.manifest.ts`","","NOTE: portal manifest is not required, a default manifest will be generated if not provided","","Examples:"," $ ffc portal build"," $ ffc portal build portal.manifest.prod.ts --debug",""].join("\n")).option("-d, --debug","Enable debug mode for verbose logging",!1).argument("[manifest]","Manifest build file to use for building (e.g., portal.manifest[.env]?.[ts|js|json])").action(async(e,t)=>{const r=new f("portal:build",{debug:t.debug});await C({log:r,manifest:e})}),_a=e("pack").description("Bundle the Fusion portal into a deployable archive.").addHelpText("after",["","If no manifest is provided, a default portal.manifest(.$ENV)?.[ts|js|json] is used from the current directory.","example: `ffc portal pack --env prod` will search for `portal.manifest.prod.ts` then fallback to `portal.manifest.ts`","","NOTE: portal manifest is not required, a default manifest will be generated if not provided","","Examples:"," $ ffc portal pack"," $ ffc portal pack portal.manifest.dev.ts --archive my-portal.zip --output ./dist"].join("\n")).option("-a, --archive [string]","Name of the output archive file (default: out/bundle.zip)","out/bundle.zip").option("-d, --debug [boolean]","Enable debug mode for verbose logging",!1).option("--schema [string]","Schema file to use for validation").argument("[manifest]","Manifest file to use for bundling (e.g., my-portal.manifest.ts)").action(async(e,t)=>{const r=new f("portal:pack",{debug:t.debug});await N({log:r,manifest:e,archive:t.archive,schema:t.schema}).catch(e=>{r.error("Failed to create package:",e),process.exit(1)})}),La=He(e("upload").description("Upload a Fusion portal bundle to the portal registry.").addHelpText("after",["","Uploads a distributable portal bundle (e.g., portal-bundle.zip) to the Fusion portal registry.","","Examples:"," $ ffc portal upload"," $ ffc portal upload my-portal-bundle.zip --name my-portal"," $ ffc portal upload --debug"].join("\n")).option("-d, --debug [boolean]","Enable debug mode for verbose logging",!1).addOption(Fe({allowDev:!1})).argument("<bundle>","Portal bundle to upload (e.g., out/bundle.zip)").action(async(e,t)=>{const r=new f("portal:upload",{debug:t.debug});r?.start("Initializing Fusion Framework...");const n=await b({env:t.env,auth:{token:t.token,tenantId:t.tenantId,clientId:t.clientId}});r?.succeed("Initialized Fusion Framework"),await I({log:r,framework:n,fileOrBundle:e}).catch(e=>{r.error("Failed to upload bundle:",e),process.exit(1)})}));const Ca=He(e("tag").description("Tag your uploaded Fusion Portal build version with a specific tag.").addHelpText("after",["","Note: using --package is preferred over --manifest, since no infered compilation is required.","","Examples:"," $ ffc portal tag latest"," $ ffc portal tag latest --package my-portal@1.2.3 --env prod"," $ ffc portal tag preview --manifest ./portal.manifest.ts"," $ ffc portal tag next --package my-portal@2.0.0-alpha"," $ ffc portal tag stable --package my-portal@1.5.0"," $ ffc portal tag pr-1234 --package my-portal@2.0.0"].join("\n")).addOption(Fe({allowDev:!1})).option("-m, --manifest <string>","Manifest file to use. Note: ignoring if --package is provided").option("-p, --package [package@version]","Package to tag in format name@version (e.g., my-portal@1.0.0). If not provided, loaded from manifest").option("-d, --debug","Enable debug mode for verbose logging").option("--silent","Silent mode, suppresses output except errors").argument("<tag>","Tag to apply (e.g. latest | preview | next | pr-1234). Alphanumeric, dots and dashes allowed.").action(async(e,t)=>{const r=t.silent?null:new f("app:tag",{debug:t.debug}),n={command:"build",environment:t.env,mode:process.env.NODE_ENV??"production",root:process.cwd()},o=await async function(e,t){if(e.package){const[t,r]=e.package.split("@");if(!t||!r)throw new Error("Package must be in format name@version (e.g., my-portal@1.0.0). Please verify the package name and version with --package");return{name:t,version:r}}const{manifest:r}=await L({manifest:e.manifest,env:t}),n=r.build?.version;if(!n)throw new Error(`Could not determine version from manifest. Please verify manifest ${e.manifest} or provide a package name and version with --package`);return{name:r.name,version:n}}(t,n).catch(e=>{r?.error(`😢 ${e instanceof Error?e.message:"Unknown error occurred"}`),r?.debug(e),process.exit(1)});r?.info("Tagging portal:",xe.greenBright(`${o.name}@${o.version} - ${e}`)),r?.start("Initializing Fusion Framework...");const i=await b({env:t.env,auth:{token:t.token,tenantId:t.tenantId,clientId:t.clientId}});r?.succeed("Initialized Fusion Framework"),O({tag:e,name:o.name,version:o.version,framework:i,log:r}).catch(e=>{r?.error("😢 Failed to tag application:",e),process.exit(1)})})),Na=He(e("publish").description("Build, upload, and tag your Fusion portal bundle for deployment.").addHelpText("after",["","If no manifest is provided, a default portal.manifest(.$ENV)?.[ts|js|json] is used from the current directory.","example: `ffc portal publish --env prod` will search for `portal.manifest.prod.ts` then fallback to `portal.manifest.ts`","","NOTE: portal manifest is not required, a default manifest will be generated if not provided","","Examples:"," $ ffc portal publish"," $ ffc portal publish --env prod --manifest portal.manifest.prod.ts"," $ ffc portal publish --tag preview"," $ ffc portal publish --tag next"," $ ffc portal publish --tag pr-1234"].join("\n")).option("-d, --debug","Enable debug mode for verbose logging",!1).addOption(Fe({allowDev:!1})).option("-m, --manifest [string]","Manifest file to use for bundling (e.g., my-portal.manifest.ts)").option("--schema [string]","Schema file to use for validation").option("-t, --tag [string]","Tag to apply to the published portal (e.g. latest | preview | next | pr-1234). Alphanumeric, dots and dashes allowed.","latest").action(async e=>{const t=new f("portal:publish",{debug:e.debug});t?.info("Using environment:",xe.redBright(e.env)),t.start("📦 Bundling Portal Template...");const r=await N({log:t,manifest:e.manifest,schema:e.schema}).catch(e=>{t.error("😢 Failed to create bundle:",e),process.exit(1)});t.succeed("📦 Bundling completed"),t?.start("💾 Initializing Fusion Framework...");const n=await b({env:e.env,auth:{token:e.token,tenantId:e.tenantId,clientId:e.clientId}});t?.succeed("💾 Initialized Fusion Framework"),t.start("🚀 Uploading Portal Template..."),await I({log:t,framework:n,fileOrBundle:r.archive}).catch(e=>{t.error("😢 Failed to upload bundle:",e),process.exit(1)}),t.succeed("🚀 Upload completed"),t.start("🏷️ Tagging Portal Template..."),await O({tag:e.tag,name:r.manifest.name,version:r.manifest.build.version,framework:n,log:t}).catch(e=>{t.error("😢 Failed to tag Portal Template:",e),process.exit(1)}),t.succeed("🏷️ Tagging completed")})),Ia=He(e("config").description("Generate or publish the Fusion portal configuration file.").addHelpText("after",["","By default, outputs the generated config object to stdout or a file. Use --publish to upload the config to the Fusion portal registry.","- Options [--token, --tenantId, --clientId, --manifest] are only relevant when --publish is used.",'- Option [-e, --env] cannot be set to "dev" when --publish is used.',"","Note:","- If not `portal.config(.$ENV)?.[ts|js|json]` is found it will fallback to generate a default config (empty object)","- If not `portal.manifest(.$ENV)?.[ts|js|json]` is found it will fallback to generate a default manifest","","Examples:"," $ ffc portal config app.config.ts"," $ ffc portal config portal.config.prod.ts --output ./dist/portal.config.json"," $ ffc portal config portal.manifest.prod.ts --silent > ./dist/portal.config.json"," $ ffc portal config --publish --manifest portal.manifest.ts --env prod"," $ ffc portal config --env prod my-custom.config.ts"].join("\n")).option("--debug","Enable debug mode for verbose logging").option("--silent","Silent mode, suppresses output except errors").option("--publish <name@version>","Publish config to Fusion portal registry, Identifier of the portal, example my-portal@1.2.3").addOption(Fe({allowDev:!0})).option("-o, --output <stdout|path>","Output the result to stdout or a file (ignored with --publish, default: stdout)","stdout").argument("[config]","Path to the portal config file (e.g., portal.config[.env]?.[ts,js,json])").action(async(e,t)=>{const r=t.silent?null:new f("portal:config",{debug:!!t.debug});if(t.publish){const[e,n]=t.publish.split("@")||[];return e&&n||(r?.fail("🤪","Portal identifier is required when using",xe.blue("--publish")),r?.info("Example: fusion-framework-cli portal config --publish my-portal@1.2.3"),process.exit(1)),"dev"===t.env&&(r?.fail("🤪",xe.blue("--env"),'cannot be "dev" when',xe.blue("--publish")," is used"),process.exit(1)),A({config:t.config,portal:{name:e,version:n},environment:t.env,auth:"token"in t?{token:t.token}:t,debug:t.debug})}const{config:n}=await T({log:r,config:e,env:{environment:t.env},output:"stdout"===t.output?void 0:t.output});"stdout"===t.output&&console.log(JSON.stringify(n,null,2))})),Oa=e("portal").description("Develop and deploy portal templates").addCommand(It).addCommand(Hr).addCommand(Pa).addCommand(ka).addCommand(_a).addCommand(La).addCommand(Ca).addCommand(Na).addCommand(Ia);o({quiet:!0});const[Aa]=process.versions.node.split(".").map(Number);Aa<Number(20)&&(console.error(xe.red("[ERROR]"),"Fusion Framework CLI requires Node.js 20 or higher."),process.exit(1));Aa!==Number(24)&&console.warn(xe.yellow("[WARNING]"),"Node.js 24.x (LTS) is recommended for best compatibility. You are using Node.js",process.versions.node);const Ta=p({cwd:s(import.meta.url)});if(!Ta)throw Error("failed to find program root");process.env.CLI_BIN=c(l(Ta.path),String(Ta.packageJson.bin?.["fusion-framework-cli"]));const xa=new n;xa.name(Ta.packageJson.name),xa.description([`${Ta.packageJson.name}@${Ta.packageJson.version}`,"","Fusion Framework CLI","","A toolkit for building, packaging, deploying, and managing Fusion applications and portals.","","• Run fusion <command> --help for details on any command.","• For documentation, issues, and source code, visit:"," https://equinor.github.io/fusion-framework/cli/"].join("\n")),xa.version(Ta.packageJson.version,"-V, --version","CLI version"),await(async e=>{e.addCommand(wt),e.addCommand(_t),e.addCommand(Lt),e.addCommand(Nt),e.addCommand(Oa),await async function(e){const t=[],r=async e=>{try{const t=l(e);return(await se(["fusion-cli.config"],{baseDir:t,script:{resolve:async e=>{const r=e.default;return"function"==typeof r?await r({root:t})??{plugins:[]}:r??{plugins:[]}}}})).config.plugins||[]}catch(t){return t instanceof ce||console.warn(`Warning: Failed to load plugin configuration from ${e}:`,t),[]}},n=[process.cwd(),s(import.meta.url)],o=await Promise.all(n.map(async e=>await le(["fusion-cli.config.ts","fusion-cli.config.js","fusion-cli.config.json"],{cwd:l(e)}))),i=Array.from(new Set(o.filter(e=>null!=e)));for(const e of i){const n=await r(e);t.push(...n)}if(0===t.length)return;const c=await u({cwd:process.cwd()}),p=c?l(c.path):process.cwd(),f=s(import.meta.url),h=await u({cwd:l(f)}),m=l(h?h.path:f);for(const r of t)try{if("function"==typeof r){r(e);continue}const t=r;let n=null,o=!1;if("function"==typeof import.meta.resolve)try{const e=import.meta.resolve(t);n=await import(e),o=!0}catch{}if(!o)try{n=await import(t),o=!0}catch{}if(!o)try{const e=d(m,"node_modules",t),r=d(e,"package.json"),i=JSON.parse(F(r,"utf-8")),s=i.exports?.["."]?.import||i.main,c=d(e,s),l=a(c).href;n=await import(l),o=!0}catch{}if(!o)try{const e=d(p,"node_modules",t),r=d(e,"package.json"),i=JSON.parse(F(r,"utf-8")),s=i.exports?.["."]?.import||i.main,c=d(e,s),l=a(c).href;n=await import(l),o=!0}catch{}if(!o||!n)throw new Error(`Could not resolve plugin "${t}" using any resolution strategy`);n.registerAiPlugin?n.registerAiPlugin(e):n.default?"function"==typeof n.default&&n.default(e):console.warn(`Warning: Plugin "${t}" does not export a registration function.`)}catch(e){if(e instanceof Error&&(e.message.includes("Cannot find module")||e.message.includes("MODULE_NOT_FOUND"))){const e="string"==typeof r?r:"function";console.warn(`Warning: Plugin "${e}" is not installed. Install it to use its commands.`)}else{const t="string"==typeof r?r:"function";console.warn(`Warning: Failed to load plugin "${t}":`,e)}}}(e)})(xa),xa.parse();
@@ -36,7 +36,18 @@ export const PortalManifestBuildSchema = z.object({
36
36
  // Current git commit SHA (required)
37
37
  commitSha: z.string({ message: 'commitSha must be a string' }).describe('Current git commit SHA'),
38
38
  // Optional build annotations (key-value pairs)
39
- annotations: z.record(z.string(), z.string()).optional().describe('Optional build annotations'),
39
+ // Accepts Record<string, string | undefined> but transforms to Record<string, string>
40
+ // by filtering out undefined values to preserve the manifest contract
41
+ annotations: z
42
+ .record(z.string(), z.string().optional())
43
+ .optional()
44
+ .transform((rec) => {
45
+ if (!rec) {
46
+ return undefined;
47
+ }
48
+ return Object.fromEntries(Object.entries(rec).filter(([, value]) => value !== undefined));
49
+ })
50
+ .describe('Optional build annotations'),
40
51
  // Optional project homepage
41
52
  projectPage: z
42
53
  .string({ message: 'projectPage must be a string' })
@@ -1 +1 @@
1
- {"version":3,"file":"portal-manifest.schema.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,6CAA6C;IAC7C,aAAa,EAAE,CAAC;SACb,MAAM,CAAC,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC;SACrD,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,+CAA+C;IAC/C,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,CAAC,mCAAmC,CAAC;IAChD,+CAA+C;IAC/C,SAAS,EAAE,CAAC;SACT,MAAM,CAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;SACjD,QAAQ,EAAE;SACV,QAAQ,CAAC,mCAAmC,CAAC;IAChD,iDAAiD;IACjD,UAAU,EAAE,CAAC;SACV,MAAM,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;SAClD,QAAQ,EAAE;SACV,QAAQ,CAAC,qCAAqC,CAAC;IAClD,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAChG,8CAA8C;IAC9C,SAAS,EAAE,CAAC;SACT,MAAM,CAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;SACjD,QAAQ,CAAC,mCAAmC,CAAC;IAChD,oCAAoC;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IACjG,+CAA+C;IAC/C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAC/F,4BAA4B;IAC5B,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,2BAA2B,CAAC;IACxC,gEAAgE;IAChE,iBAAiB,EAAE,CAAC;SACjB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,yCAAyC,EAAE,CAAC,EAAE;QACvE,OAAO,EAAE,+CAA+C;KACzD,CAAC;SACD,QAAQ,CAAC,qDAAqD,CAAC;IAClE,4DAA4D;IAC5D,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC/F,mEAAmE;IACnE,MAAM,EAAE,CAAC;SACN,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;SAC/B,QAAQ,EAAE;SACV,QAAQ,CAAC,uCAAuC,CAAC;CACrD,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,gEAAgE;IAChE,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;SAC5C,QAAQ,CAAC,qDAAqD,CAAC;IAClE,kDAAkD;IAClD,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,uCAAuC;IACvC,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,2BAA2B,CAAC;IACxC,mEAAmE;IACnE,KAAK,EAAE,yBAAyB;CACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"portal-manifest.schema.js","sourceRoot":"","sources":["../../../../src/lib/portal/portal-manifest.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,6CAA6C;IAC7C,aAAa,EAAE,CAAC;SACb,MAAM,CAAC,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC;SACrD,QAAQ,CAAC,iCAAiC,CAAC;IAC9C,+CAA+C;IAC/C,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,CAAC,mCAAmC,CAAC;IAChD,+CAA+C;IAC/C,SAAS,EAAE,CAAC;SACT,MAAM,CAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;SACjD,QAAQ,EAAE;SACV,QAAQ,CAAC,mCAAmC,CAAC;IAChD,iDAAiD;IACjD,UAAU,EAAE,CAAC;SACV,MAAM,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;SAClD,QAAQ,EAAE;SACV,QAAQ,CAAC,qCAAqC,CAAC;IAClD,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAChG,8CAA8C;IAC9C,SAAS,EAAE,CAAC;SACT,MAAM,CAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;SACjD,QAAQ,CAAC,mCAAmC,CAAC;IAChD,oCAAoC;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IACjG,+CAA+C;IAC/C,sFAAsF;IACtF,sEAAsE;IACtE,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;SACzC,QAAQ,EAAE;SACV,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;QACjB,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;IAC5F,CAAC,CAAC;SACD,QAAQ,CAAC,4BAA4B,CAAC;IACzC,4BAA4B;IAC5B,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,2BAA2B,CAAC;IACxC,gEAAgE;IAChE,iBAAiB,EAAE,CAAC;SACjB,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,yCAAyC,EAAE,CAAC,EAAE;QACvE,OAAO,EAAE,+CAA+C;KACzD,CAAC;SACD,QAAQ,CAAC,qDAAqD,CAAC;IAClE,4DAA4D;IAC5D,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC/F,mEAAmE;IACnE,MAAM,EAAE,CAAC;SACN,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;SAC/B,QAAQ,EAAE;SACV,QAAQ,CAAC,uCAAuC,CAAC;CACrD,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,gEAAgE;IAChE,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;SAC5C,QAAQ,CAAC,qDAAqD,CAAC;IAClE,kDAAkD;IAClD,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,uCAAuC;IACvC,WAAW,EAAE,CAAC;SACX,MAAM,CAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,QAAQ,CAAC,2BAA2B,CAAC;IACxC,mEAAmE;IACnE,KAAK,EAAE,yBAAyB;CACjC,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '13.3.16';
2
+ export const version = '13.3.17';
3
3
  //# sourceMappingURL=version.js.map
@@ -38,10 +38,12 @@ export declare const buildPortal: (opt?: BuildApplicationOptions) => Promise<{
38
38
  version: string;
39
39
  timestamp: string;
40
40
  commitSha: string;
41
+ annotations: {
42
+ [k: string]: string | undefined;
43
+ } | undefined;
41
44
  allowedExtensions: string[];
42
45
  assetPath?: string | undefined;
43
46
  githubRepo?: string | undefined;
44
- annotations?: Record<string, string> | undefined;
45
47
  projectPage?: string | undefined;
46
48
  schema?: Record<string, unknown> | undefined;
47
49
  config?: Record<string, unknown> | undefined;
@@ -43,10 +43,12 @@ export declare const loadPortalManifest: (options: ResolvePortalManifestOptions)
43
43
  version: string;
44
44
  timestamp: string;
45
45
  commitSha: string;
46
+ annotations: {
47
+ [k: string]: string | undefined;
48
+ } | undefined;
46
49
  allowedExtensions: string[];
47
50
  assetPath?: string | undefined;
48
51
  githubRepo?: string | undefined;
49
- annotations?: Record<string, string> | undefined;
50
52
  projectPage?: string | undefined;
51
53
  schema?: Record<string, unknown> | undefined;
52
54
  config?: Record<string, unknown> | undefined;
@@ -39,10 +39,12 @@ export declare const bundlePortal: (options: BundlePortalOptions) => Promise<{
39
39
  version: string;
40
40
  timestamp: string;
41
41
  commitSha: string;
42
+ annotations: {
43
+ [k: string]: string | undefined;
44
+ } | undefined;
42
45
  allowedExtensions: string[];
43
46
  assetPath?: string | undefined;
44
47
  githubRepo?: string | undefined;
45
- annotations?: Record<string, string> | undefined;
46
48
  projectPage?: string | undefined;
47
49
  schema?: Record<string, unknown> | undefined;
48
50
  config?: Record<string, unknown> | undefined;
@@ -16,7 +16,9 @@ export declare const PortalManifestBuildSchema: z.ZodObject<{
16
16
  version: z.ZodString;
17
17
  timestamp: z.ZodString;
18
18
  commitSha: z.ZodString;
19
- annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
19
+ annotations: z.ZodPipe<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>, z.ZodTransform<{
20
+ [k: string]: string | undefined;
21
+ } | undefined, Record<string, string | undefined> | undefined>>;
20
22
  projectPage: z.ZodOptional<z.ZodString>;
21
23
  allowedExtensions: z.ZodArray<z.ZodString>;
22
24
  schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -44,7 +46,9 @@ export declare const PortalManifestSchema: z.ZodObject<{
44
46
  version: z.ZodString;
45
47
  timestamp: z.ZodString;
46
48
  commitSha: z.ZodString;
47
- annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
49
+ annotations: z.ZodPipe<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>, z.ZodTransform<{
50
+ [k: string]: string | undefined;
51
+ } | undefined, Record<string, string | undefined> | undefined>>;
48
52
  projectPage: z.ZodOptional<z.ZodString>;
49
53
  allowedExtensions: z.ZodArray<z.ZodString>;
50
54
  schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1 +1 @@
1
- export declare const version = "13.3.16";
1
+ export declare const version = "13.3.17";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli",
3
- "version": "13.3.16",
3
+ "version": "13.3.17",
4
4
  "keywords": [
5
5
  "Fusion",
6
6
  "Fusion Framework",
@@ -112,8 +112,8 @@
112
112
  "zod": "^4.1.8",
113
113
  "@equinor/fusion-framework-dev-portal": "4.0.4",
114
114
  "@equinor/fusion-framework-module-msal-node": "3.0.1",
115
- "@equinor/fusion-imports": "1.1.11",
116
- "@equinor/fusion-framework-dev-server": "1.1.31"
115
+ "@equinor/fusion-framework-dev-server": "1.1.31",
116
+ "@equinor/fusion-imports": "1.1.11"
117
117
  },
118
118
  "devDependencies": {
119
119
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -123,7 +123,7 @@
123
123
  "@types/adm-zip": "^0.5.0",
124
124
  "@types/normalize-package-data": "^2.4.4",
125
125
  "@types/semver": "^7.5.8",
126
- "@vitest/coverage-v8": "^3.2.4",
126
+ "@vitest/coverage-v8": "^4.0.18",
127
127
  "adm-zip": "^0.5.10",
128
128
  "ajv": "^8.17.1",
129
129
  "chalk": "^5.6.0",
@@ -136,14 +136,14 @@
136
136
  "rxjs": "^7.8.1",
137
137
  "type-fest": "^5.0.0",
138
138
  "typescript": "^5.8.2",
139
- "vitest": "^3.2.4",
139
+ "vitest": "^4.0.18",
140
+ "@equinor/fusion-framework-cli-plugin-ai-mcp": "1.0.5",
141
+ "@equinor/fusion-framework-cli-plugin-ai-search": "1.0.5",
140
142
  "@equinor/fusion-framework-cli-plugin-ai-chat": "1.0.5",
143
+ "@equinor/fusion-framework-module": "5.0.6",
141
144
  "@equinor/fusion-framework-cli-plugin-ai-index": "1.0.6",
142
- "@equinor/fusion-framework-cli-plugin-ai-mcp": "1.0.5",
143
145
  "@equinor/fusion-framework-module-app": "7.4.1",
144
- "@equinor/fusion-framework-module": "5.0.6",
145
146
  "@equinor/fusion-framework-module-http": "7.0.8",
146
- "@equinor/fusion-framework-cli-plugin-ai-search": "1.0.5",
147
147
  "@equinor/fusion-framework-module-service-discovery": "9.1.1"
148
148
  },
149
149
  "peerDependenciesMeta": {