@fugood/bricks-cli 2.24.0-beta.40 → 2.24.0-beta.41

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/lib/428.js ADDED
@@ -0,0 +1,7 @@
1
+ export const __webpack_esm_id__=428;export const __webpack_esm_ids__=[428];export const __webpack_esm_modules__={1645:e=>{var t=e.exports=function(e,t,s){"function"==typeof t&&(s=t,t={}),r(t,"function"==typeof(s=t.cb||s)?s:s.pre||function(){},s.post||function(){},e,"",e)};function r(e,o,n,a,i,c,d,u,l,f){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var h in o(a,i,c,d,u,l,f),a){var p=a[h];if(Array.isArray(p)){if(h in t.arrayKeywords)for(var m=0;m<p.length;m++)r(e,o,n,p[m],i+"/"+h+"/"+m,c,i,h,a,m)}else if(h in t.propsKeywords){if(p&&"object"==typeof p)for(var y in p)r(e,o,n,p[y],i+"/"+h+"/"+s(y),c,i,h,a,y)}else(h in t.keywords||e.allKeys&&!(h in t.skipKeywords))&&r(e,o,n,p,i+"/"+h,c,i,h,a)}n(a,i,c,d,u,l,f)}}function s(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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}},2431:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(3839),o=r(17851),n=r(18225),a=r(26699),i=r(34882),c=[s.default,o.default,(0,n.default)(),a.default,i.metadataVocabulary,i.contentVocabulary];t.default=c},3839:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(73946),o=r(26138),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,o.default];t.default=n},3936:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n=r(26308),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return s.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>s._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:a,it:i}=e,c="maxLength"===t?s.operators.GT:s.operators.LT,d=!1===i.opts.unicode?s._`${r}.length`:s._`${(0,o.useFunc)(e.gen,n.default)}(${r})`;e.fail$data(s._`${d} ${c} ${a}`)}};t.default=a},4326:(e,t,r)=>{var s=r(28931),o=r(83417),n=r(82237),a=r(95243);e.exports=function(e){return function(t){t=a(t);var r=o(t)?n(t):void 0,i=r?r[0]:t.charAt(0),c=r?s(r,1).join(""):t.slice(1);return i[e]()+c}}},5485:(e,t,r)=>{var s=r(4326)("toUpperCase");e.exports=s},7903:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(84800);s.code='require("ajv/dist/runtime/uri").default',t.default=s},8870:(e,t,r)=>{var s=r(65650),o=Object.prototype,n=o.hasOwnProperty,a=o.toString,i=s?s.toStringTag:void 0;e.exports=function(e){var t=n.call(e,i),r=e[i];try{e[i]=void 0;var s=!0}catch(e){}var o=a.call(e);return s&&(t?e[i]=r:delete e[i]),o}},10482:e=>{var t="\\ud800-\\udfff",r="\\u2700-\\u27bf",s="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+n+"]",i="\\d+",c="["+r+"]",d="["+s+"]",u="[^"+t+n+i+r+s+o+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+o+"]",p="(?:"+d+"|"+u+")",m="(?:"+h+"|"+u+")",y="(?:['’](?:d|ll|m|re|s|t|ve))?",v="(?:['’](?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",$="[\\ufe0e\\ufe0f]?",_=$+g+("(?:\\u200d(?:"+["[^"+t+"]",l,f].join("|")+")"+$+g+")*"),w="(?:"+[c,l,f].join("|")+")"+_,b=RegExp([h+"?"+d+"+"+y+"(?="+[a,h,"$"].join("|")+")",m+"+"+v+"(?="+[a,h+p,"$"].join("|")+")",h+"?"+p+"+"+y,h+"+"+v,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,w].join("|"),"g");e.exports=function(e){return e.match(b)||[]}},11601:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const s=r(65319),o=r(2431),n=r(11672),a=r(33928),i=["/properties"],c="http://json-schema.org/draft-07/schema";class d extends s.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var u=r(96223);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=r(17898);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 f=r(95031);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var h=r(85748);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})},11672:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(88925),n=r(49392),a=r(85748),i=r(50458),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>s._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:d,it:u}=e,{oneOf:l}=d;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=c.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const h=t.let("valid",!1),p=t.const("tag",s._`${r}${(0,s.getProperty)(f)}`);function m(r){const o=t.name("valid"),n=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(n,s.Name),o}t.if(s._`typeof ${p} == "string"`,()=>function(){const r=function(){var e;const t={},r=o(d);let s=!0;for(let t=0;t<l.length;t++){let d=l[t];if((null==d?void 0:d.$ref)&&!(0,i.schemaHasRulesButRef)(d,u.self.RULES)){const e=d.$ref;if(d=n.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),d instanceof n.SchemaEnv&&(d=d.schema),void 0===d)throw new a.default(u.opts.uriResolver,u.baseId,e)}const h=null===(e=null==d?void 0:d.properties)||void 0===e?void 0:e[f];if("object"!=typeof h)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);s=s&&(r||o(d)),c(h,t)}if(!s)throw new Error(`discriminator: "${f}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function c(e,t){if(e.const)h(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)h(r,t)}}function h(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(s._`${p} === ${e}`),t.assign(h,m(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:p,tagName:f}),t.endIf()}(),()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:p,tagName:f})),e.ok(h)}};t.default=c},13956:(e,t,r)=>{const{isUUID:s}=r(75365),o=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function a(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 i(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function c(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 d={scheme:"http",domainHost:!0,parse:i,serialize:c},u={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=a(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(a(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}},l={http:d,https:{scheme:"https",domainHost:d.domainHost,parse:i,serialize:c},ws:u,wss:{scheme:"wss",domainHost:u.domainHost,parse:u.parse,serialize:u.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(o);if(r){const s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const o=f(`${s}:${t.nid||e.nid}`);e.path=void 0,o&&(e=o.parse(e,t))}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",s=e.nid.toLowerCase(),o=f(`${r}:${t.nid||s}`);o&&(e=o.serialize(e,t));const n=e,a=e.nss;return n.path=`${s||t.nid}:${a}`,t.skipEscape=!0,n},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&s(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};function f(e){return e&&(l[e]||l[e.toLowerCase()])||void 0}Object.setPrototypeOf(l,null),e.exports={wsIsSecure:a,SCHEMES:l,isValidSchemeName:function(e){return-1!==n.indexOf(e)},getSchemeHandler:f}},14856:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const s=r(50458),o=r(38792),n=r(1645),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&d(e)<=t)};const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(i.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function d(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!a.has(r)&&("object"==typeof e[r]&&(0,s.eachItem)(e[r],e=>t+=d(e)),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=h(t));const s=e.parse(t);return l(e,s)}function l(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=l;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t,r){return r=h(r),e.resolve(t,r)};const p=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:s}=this.opts,a=h(e[r]||t),i={"":a},c=u(s,a,!1),d={},l=new Set;return n(e,{allKeys:!0},(e,t,s,o)=>{if(void 0===o)return;const n=c+t;let a=i[o];function u(t){const r=this.opts.uriResolver.resolve;if(t=h(a?r(a,t):t),l.has(t))throw m(t);l.add(t);let s=this.refs[t];return"string"==typeof s&&(s=this.refs[s]),"object"==typeof s?f(e,s.schema,t):t!==h(n)&&("#"===t[0]?(f(e,d[t],t),d[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!p.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(a=u.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),i[t]=a}),d;function f(e,t,r){if(void 0!==t&&!o(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},15813:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},15948:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const s=r(49409),o=r(17898),n=r(63036),a={message:"boolean schema is false"};function i(e,t){const{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,s.reportError)(n,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:s}=e;!1===r?i(e,!1):"object"==typeof r&&!0===r.$async?t.return(n.default.data):(t.assign(o._`${s}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:s}=e;!1===s?(r.var(t,!1),i(e)):r.var(t,!0)}},17851:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(72333),o=r(21230),n=r(3936),a=r(81005),i=r(71589),c=r(29594),d=r(38558),u=r(44058),l=r(79520),f=r(36742),h=[s.default,o.default,n.default,a.default,i.default,c.default,d.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,f.default];t.default=h},17898:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const s=r(83277),o=r(76930);var n=r(83277);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=r(76930);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class i{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends i{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?o.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class d extends i{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof s.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return O(this.lhs instanceof s.Name?{}:{...this.lhs.names},this.rhs)}}class u extends d{constructor(e,t,r,s){super(e,r,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class f extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends i{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class p extends i{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=I(this.code,e,t),this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class m extends i{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let s=r.length;for(;s--;){const o=r[s];o.optimizeNames(e,t)||(C(e,o.names),r.splice(s,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>x(e,t.names),{})}}class y extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class v extends m{}class g extends y{}g.kind="else";class $ extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new g(e):e}return t?!1===e?t instanceof $?t:t.nodes:this.nodes.length?this:new $(T(e),t instanceof $?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return O(e,this.condition),this.else&&x(e,this.else.names),e}}$.kind="if";class _ extends y{}_.kind="for";class w extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return x(super.names,this.iteration.names)}}class b extends _{constructor(e,t,r,s){super(),this.varKind=e,this.name=t,this.from=r,this.to=s}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:s,to:n}=this;return`for(${t} ${r}=${s}; ${r}<${n}; ${r}++)`+super.render(e)}get names(){const e=O(super.names,this.from);return O(e,this.to)}}class P extends _{constructor(e,t,r,s){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=I(this.iterable,e,t),this}get names(){return x(super.names,this.iterable.names)}}class E extends y{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}E.kind="func";class S extends m{render(e){return"return "+super.render(e)}}S.kind="return";class k extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,s;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(s=this.finally)||void 0===s||s.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&x(e,this.catch.names),this.finally&&x(e,this.finally.names),e}}class j extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}j.kind="catch";class N extends y{render(e){return"finally"+super.render(e)}}N.kind="finally";function x(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function O(e,t){return t instanceof s._CodeOrName?x(e,t.names):e}function I(e,t,r){return e instanceof s.Name?n(e):(o=e)instanceof s._Code&&o._items.some(e=>e instanceof s.Name&&1===t[e.str]&&void 0!==r[e.str])?new s._Code(e._items.reduce((e,t)=>(t instanceof s.Name&&(t=n(t)),t instanceof s._Code?e.push(...t._items):e.push(t),e),[])):e;var o;function n(e){const s=r[e.str];return void 0===s||1!==t[e.str]?e:(delete t[e.str],s)}}function C(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function T(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:s._`!${D(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){const o=this._scope.toName(t);return void 0!==r&&s&&(this._constants[o.str]=r),this._leafNode(new c(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new d(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==s.nil&&this._leafNode(new p(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,s.addCodeArg)(t,o));return t.push("}"),new s._Code(t)}if(e,t,r){if(this._blockNode(new $(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new $(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode($,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,s,n=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const a=this._scope.toName(e);return this._for(new b(n,a,t,r),()=>s(a))}forOf(e,t,r,n=o.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof s.Name?t:this.var("_arr",t);return this.forRange("_i",0,s._`${e}.length`,t=>{this.var(a,s._`${e}[${t}]`),r(a)})}return this._for(new P("of",n,a,t),()=>r(a))}forIn(e,t,r,n=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,s._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new P("in",n,a,t),()=>r(a))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new f(e))}return(e){const t=new S;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new k;if(this._blockNode(s),this.code(e),t){const e=this.name("e");this._currNode=s.catch=new j(e),t(e)}return r&&(this._currNode=s.finally=new N,this.code(r)),this._endBlockNode(j,N)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=s.nil,r,o){return this._blockNode(new E(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=T;const R=M(t.operators.AND);t.and=function(...e){return e.reduce(R)};const A=M(t.operators.OR);function M(e){return(t,r)=>t===s.nil?r:r===s.nil?t:s._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof s.Name?e:s._`(${e})`}t.or=function(...e){return e.reduce(A)}},18225:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(93426),o=r(61349),n=r(44153),a=r(19753),i=r(35724),c=r(99868),d=r(67486),u=r(92697),l=r(19660),f=r(98422),h=r(65532),p=r(19430),m=r(98768),y=r(79355),v=r(70510),g=r(45255);t.default=function(e=!1){const t=[h.default,p.default,m.default,y.default,v.default,g.default,d.default,u.default,c.default,l.default,f.default];return e?t.push(o.default,a.default):t.push(s.default,n.default),t.push(i.default),t}},19430:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(94450).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=s},19660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(96223),o=r(94450),n=r(50458),a=r(92697),i={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:i,data:c,it:d}=e;"all"===d.opts.removeAdditional&&void 0===i.additionalProperties&&a.default.code(new s.KeywordCxt(d,a.default,"additionalProperties"));const u=(0,o.allSchemaProperties)(r);for(const e of u)d.definedProperties.add(e);d.opts.unevaluated&&u.length&&!0!==d.props&&(d.props=n.mergeEvaluated.props(t,(0,n.toHash)(u),d.props));const l=u.filter(e=>!(0,n.alwaysValidSchema)(d,r[e]));if(0===l.length)return;const f=t.name("valid");for(const r of l)h(r)?p(r):(t.if((0,o.propertyInData)(t,c,r,d.opts.ownProperties)),p(r),d.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function h(e){return d.opts.useDefaults&&!d.compositeRule&&void 0!==r[e].default}function p(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=i},19753:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n=r(94450),a=r(93426),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>s.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>s._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:s}=e,{prefixItems:i}=r;s.items=!0,(0,o.alwaysValidSchema)(s,t)||(i?(0,a.validateAdditionalItems)(e,i):e.ok((0,n.validateArray)(e)))}};t.default=i},21230:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>s.str`must be multiple of ${e}`,params:({schemaCode:e})=>s._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:n}=e,a=n.opts.multipleOfPrecision,i=t.let("res"),c=a?s._`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:s._`${i} !== parseInt(${i})`;e.fail$data(s._`(${o} === 0 || (${i} = ${r}/${o}, ${c}))`)}};t.default=o},26138:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const s=r(85748),o=r(94450),n=r(17898),a=r(63036),i=r(49392),c=r(50458),d={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:a,schemaEnv:c,validateName:d,opts:f,self:h}=o,{root:p}=c;if(("#"===r||"#/"===r)&&a===p.baseId)return function(){if(c===p)return l(e,d,c,c.$async);const r=t.scopeValue("root",{ref:p});return l(e,n._`${r}.validate`,p,p.$async)}();const m=i.resolveRef.call(h,p,a,r);if(void 0===m)throw new s.default(o.opts.uriResolver,a,r);return m instanceof i.SchemaEnv?function(t){const r=u(e,t);l(e,r,t,t.$async)}(m):function(s){const o=t.scopeValue("schema",!0===f.code.source?{ref:s,code:(0,n.stringify)(s)}:{ref:s}),a=t.name("valid"),i=e.subschema({schema:s,dataTypes:[],schemaPath:n.nil,topSchemaRef:o,errSchemaPath:r},a);e.mergeEvaluated(i),e.ok(a)}(m)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):n._`${r.scopeValue("wrapper",{ref:t})}.validate`}function l(e,t,r,s){const{gen:i,it:d}=e,{allErrors:u,schemaEnv:l,opts:f}=d,h=f.passContext?a.default.this:n.nil;function p(e){const t=n._`${e}.errors`;i.assign(a.default.vErrors,n._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),i.assign(a.default.errors,n._`${a.default.vErrors}.length`)}function m(e){var t;if(!d.opts.unevaluated)return;const s=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==d.props)if(s&&!s.dynamicProps)void 0!==s.props&&(d.props=c.mergeEvaluated.props(i,s.props,d.props));else{const t=i.var("props",n._`${e}.evaluated.props`);d.props=c.mergeEvaluated.props(i,t,d.props,n.Name)}if(!0!==d.items)if(s&&!s.dynamicItems)void 0!==s.items&&(d.items=c.mergeEvaluated.items(i,s.items,d.items));else{const t=i.var("items",n._`${e}.evaluated.items`);d.items=c.mergeEvaluated.items(i,t,d.items,n.Name)}}s?function(){if(!l.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try(()=>{i.code(n._`await ${(0,o.callValidateCode)(e,t,h)}`),m(t),u||i.assign(r,!0)},e=>{i.if(n._`!(${e} instanceof ${d.ValidationError})`,()=>i.throw(e)),p(e),u||i.assign(r,!1)}),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,h),()=>m(t),()=>p(t))}t.getValidate=u,t.callRef=l,t.default=d},26308:(e,t)=>{function r(e){const t=e.length;let r,s=0,o=0;for(;o<t;)s++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return s}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},26699:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=[r(37072).default];t.default=s},28931:(e,t,r)=>{var s=r(73501);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:s(e,t,r)}},29005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},29594:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(94450),o=r(17898),n=r(50458),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:i,$data:c,it:d}=e,{opts:u}=d;if(!c&&0===r.length)return;const l=r.length>=u.loopRequired;if(d.allErrors?function(){if(l||c)e.block$data(o.nil,f);else for(const t of r)(0,s.checkReportMissingProp)(e,t)}():function(){const n=t.let("missing");if(l||c){const r=t.let("valid",!0);e.block$data(r,()=>function(r,n){e.setParams({missingProperty:r}),t.forOf(r,a,()=>{t.assign(n,(0,s.propertyInData)(t,i,r,u.ownProperties)),t.if((0,o.not)(n),()=>{e.error(),t.break()})},o.nil)}(n,r)),e.ok(r)}else t.if((0,s.checkMissingProp)(e,r,n)),(0,s.reportMissingProp)(e,n),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:s}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!s.has(e)){const t=`required property "${e}" is not defined at "${d.schemaEnv.baseId+d.errSchemaPath}" (strictRequired)`;(0,n.checkStrictMode)(d,t,d.opts.strictRequired)}}function f(){t.forOf("prop",a,r=>{e.setParams({missingProperty:r}),t.if((0,s.noPropertyInData)(t,i,r,u.ownProperties),()=>e.error())})}}};t.default=a},33928:e=>{e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},34882:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},35724:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?s.str`must contain at least ${e} valid item(s)`:s.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?s._`{minContains: ${e}}`:s._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:a,it:i}=e;let c,d;const{minContains:u,maxContains:l}=n;i.opts.next?(c=void 0===u?1:u,d=l):c=1;const f=t.const("len",s._`${a}.length`);if(e.setParams({min:c,max:d}),void 0===d&&0===c)return void(0,o.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==d&&c>d)return(0,o.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(i,r)){let t=s._`${f} >= ${c}`;return void 0!==d&&(t=s._`${t} && ${f} <= ${d}`),void e.pass(t)}i.items=!0;const h=t.name("valid");function p(){const e=t.name("_valid"),r=t.let("count",0);m(e,()=>t.if(e,()=>function(e){t.code(s._`${e}++`),void 0===d?t.if(s._`${e} >= ${c}`,()=>t.assign(h,!0).break()):(t.if(s._`${e} > ${d}`,()=>t.assign(h,!1).break()),1===c?t.assign(h,!0):t.if(s._`${e} >= ${c}`,()=>t.assign(h,!0)))}(r)))}function m(r,s){t.forRange("i",0,f,t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),s()})}void 0===d&&1===c?m(h,()=>t.if(h,()=>t.break())):0===c?(t.let(h,!0),void 0!==d&&t.if(s._`${a}.length > 0`,p)):(t.let(h,!1),p()),e.result(h,()=>e.reset())}};t.default=n},36742:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n=r(72725),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>s._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:a,schema:i,schemaCode:c,it:d}=e;if(!a&&0===i.length)throw new Error("enum must have non-empty array");const u=i.length>=d.opts.loopEnum;let l;const f=()=>null!=l?l:l=(0,o.useFunc)(t,n.default);let h;if(u||a)h=t.let("valid"),e.block$data(h,function(){t.assign(h,!1),t.forOf("v",c,e=>t.if(s._`${f()}(${r}, ${e})`,()=>t.assign(h,!0).break()))});else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",c);h=(0,s.or)(...i.map((t,o)=>function(e,t){const o=i[t];return"object"==typeof o&&null!==o?s._`${f()}(${r}, ${e}[${t}])`:s._`${r} === ${o}`}(e,o)))}e.pass(h)}};t.default=a},37072:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match format "${e}"`,params:({schemaCode:e})=>s._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:n,schema:a,schemaCode:i,it:c}=e,{opts:d,errSchemaPath:u,schemaEnv:l,self:f}=c;d.validateFormats&&(n?function(){const n=r.scopeValue("formats",{ref:f.formats,code:d.code.formats}),a=r.const("fDef",s._`${n}[${i}]`),c=r.let("fType"),u=r.let("format");r.if(s._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,()=>r.assign(c,s._`${a}.type || "string"`).assign(u,s._`${a}.validate`),()=>r.assign(c,s._`"string"`).assign(u,a)),e.fail$data((0,s.or)(!1===d.strictSchema?s.nil:s._`${i} && !${u}`,function(){const e=l.$async?s._`(${a}.async ? await ${u}(${o}) : ${u}(${o}))`:s._`${u}(${o})`,r=s._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return s._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const n=f.formats[a];if(!n)return void function(){if(!1===d.strictSchema)return void f.logger.warn(e());throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${u}"`}}();if(!0===n)return;const[i,c,h]=function(e){const t=e instanceof RegExp?(0,s.regexpCode)(e):d.code.formats?s._`${d.code.formats}${(0,s.getProperty)(a)}`:void 0,o=r.scopeValue("formats",{key:a,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,s._`${o}.validate`];return["string",e,o]}(n);i===t&&e.pass(function(){if("object"==typeof n&&!(n instanceof RegExp)&&n.async){if(!l.$async)throw new Error("async format in sync schema");return s._`await ${h}(${o})`}return"function"==typeof c?s._`${h}(${o})`:s._`${h}.test(${o})`}())}())}};t.default=o},38558:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return s.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>s._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,n="maxItems"===t?s.operators.GT:s.operators.LT;e.fail$data(s._`${r}.length ${n} ${o}`)}};t.default=o},38792:e=>{e.exports=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 s,o,n;if(Array.isArray(t)){if((s=t.length)!=r.length)return!1;for(o=s;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((s=(n=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=s;0!==o--;)if(!Object.prototype.hasOwnProperty.call(r,n[o]))return!1;for(o=s;0!==o--;){var a=n[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},39546:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},39850:(e,t,r)=>{var s=r(39546),o=r(15813),n=r(95243),a=r(10482);e.exports=function(e,t,r){return e=n(e),void 0===(t=r?void 0:t)?o(e)?a(e):s(e):e.match(t)||[]}},44058:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(69003),o=r(17898),n=r(50458),a=r(72725),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:i,schema:c,parentSchema:d,schemaCode:u,it:l}=e;if(!i&&!c)return;const f=t.let("valid"),h=d.items?(0,s.getSchemaTypes)(d.items):[];function p(n,a){const i=t.name("item"),c=(0,s.checkDataTypes)(h,i,l.opts.strictNumbers,s.DataType.Wrong),d=t.const("indices",o._`{}`);t.for(o._`;${n}--;`,()=>{t.let(i,o._`${r}[${n}]`),t.if(c,o._`continue`),h.length>1&&t.if(o._`typeof ${i} == "string"`,o._`${i} += "_"`),t.if(o._`typeof ${d}[${i}] == "number"`,()=>{t.assign(a,o._`${d}[${i}]`),e.error(),t.assign(f,!1).break()}).code(o._`${d}[${i}] = ${n}`)})}function m(s,i){const c=(0,n.useFunc)(t,a.default),d=t.name("outer");t.label(d).for(o._`;${s}--;`,()=>t.for(o._`${i} = ${s}; ${i}--;`,()=>t.if(o._`${c}(${r}[${s}], ${r}[${i}])`,()=>{e.error(),t.assign(f,!1).break(d)})))}e.block$data(f,function(){const s=t.let("i",o._`${r}.length`),n=t.let("j");e.setParams({i:s,j:n}),t.assign(f,!0),t.if(o._`${s} > 1`,()=>(h.length>0&&!h.some(e=>"object"===e||"array"===e)?p:m)(s,n))},o._`${u} === false`),e.ok(f)}};t.default=i},44153:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const s=r(17898),o=r(50458),n=r(94450),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return i(e,"additionalItems",t);r.items=!0,(0,o.alwaysValidSchema)(r,t)||e.ok((0,n.validateArray)(e))}};function i(e,t,r=e.schema){const{gen:n,parentSchema:a,data:i,keyword:c,it:d}=e;!function(e){const{opts:s,errSchemaPath:n}=d,a=r.length,i=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(s.strictTuples&&!i){const e=`"${c}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${n}"`;(0,o.checkStrictMode)(d,e,s.strictTuples)}}(a),d.opts.unevaluated&&r.length&&!0!==d.items&&(d.items=o.mergeEvaluated.items(n,r.length,d.items));const u=n.name("valid"),l=n.const("len",s._`${i}.length`);r.forEach((t,r)=>{(0,o.alwaysValidSchema)(d,t)||(n.if(s._`${l} > ${r}`,()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u)),e.ok(u))})}t.validateTuple=i,t.default=a},44187:e=>{e.exports=function(e,t,r,s){var o=-1,n=null==e?0:e.length;for(s&&n&&(r=e[++o]);++o<n;)r=t(r,e[o],o,e);return r}},45255:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(50458),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,s.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=o},45881:(e,t,r)=>{var s=r(69968),o=r(95243),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(n,s).replace(a,"")}},49348:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const s=r(17898),o=r(63036),n=r(94450),a=r(49409);function i(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,s._`${o.parentData}[${o.parentDataProperty}]`))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,s.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:n,parentSchema:a,it:i}=e,d=t.macro.call(i.self,n,a,i),u=c(r,o,d);!1!==i.opts.validateSchema&&i.self.validateSchema(d,!0);const l=r.name("valid");e.subschema({schema:d,schemaPath:s.nil,errSchemaPath:`${i.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},l),e.pass(l,()=>e.error(!0))},t.funcKeywordCode=function(e,t){var r;const{gen:d,keyword:u,schema:l,parentSchema:f,$data:h,it:p}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(p,t);const m=!h&&t.compile?t.compile.call(p.self,l,f,p):t.validate,y=c(d,u,m),v=d.let("valid");function g(r=(t.async?s._`await `:s.nil)){const a=p.opts.passContext?o.default.this:o.default.self,i=!("compile"in t&&!h||!1===t.schema);d.assign(v,s._`${r}${(0,n.callValidateCode)(e,y,a,i)}`,t.modifying)}function $(e){var r;d.if((0,s.not)(null!==(r=t.valid)&&void 0!==r?r:v),e)}e.block$data(v,function(){if(!1===t.errors)g(),t.modifying&&i(e),$(()=>e.error());else{const r=t.async?function(){const e=d.let("ruleErrs",null);return d.try(()=>g(s._`await `),t=>d.assign(v,!1).if(s._`${t} instanceof ${p.ValidationError}`,()=>d.assign(e,s._`${t}.errors`),()=>d.throw(t))),e}():function(){const e=s._`${y}.errors`;return d.assign(e,null),g(s.nil),e}();t.modifying&&i(e),$(()=>function(e,t){const{gen:r}=e;r.if(s._`Array.isArray(${t})`,()=>{r.assign(o.default.vErrors,s._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,s._`${o.default.vErrors}.length`),(0,a.extendErrors)(e)},()=>e.error())}(e,r))}}),e.ok(null!==(r=t.valid)&&void 0!==r?r:v)},t.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)},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:s},o,n){if(Array.isArray(o.keyword)?!o.keyword.includes(n):o.keyword!==n)throw new Error("ajv implementation error");const a=o.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${n}: ${a.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[n])){const e=`keyword "${n}" value is invalid at path "${s}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},49392:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const s=r(17898),o=r(95031),n=r(63036),a=r(14856),i=r(50458),c=r(96223);class d{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,a.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 u(e){const t=f.call(this,e);if(t)return t;const r=(0,a.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:d}=this.opts.code,{ownProperties:u}=this.opts,l=new s.CodeGen(this.scope,{es5:i,lines:d,ownProperties:u});let h;e.$async&&(h=l.scopeValue("Error",{ref:o.default,code:s._`require("ajv/dist/runtime/validation_error").default`}));const p=l.scopeName("validate");e.validateName=p;const m={gen:l,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,s.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:s.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:s._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(m),l.optimize(this.opts.code.optimize);const t=l.toString();y=`${l.scopeRefs(n.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${n.default.self}`,`${n.default.scope}`,y)(this,this.scope.get());if(this.scope.value(p,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:p,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof s.Name?void 0:e,items:t instanceof s.Name?void 0:t,dynamicProps:e instanceof s.Name,dynamicItems:t instanceof s.Name},r.source&&(r.source.evaluated=(0,s.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function l(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function f(e){for(const t of this._compilations)if(h(t,e))return t}function h(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=this.opts.uriResolver.parse(t),s=(0,a._getFullPath)(this.opts.uriResolver,r);let o=(0,a.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===o)return v.call(this,r,e);const n=(0,a.normalizeId)(s),i=this.refs[n]||this.schemas[n];if("string"==typeof i){const t=m.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return v.call(this,r,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||u.call(this,i),n===(0,a.normalizeId)(t)){const{schema:t}=i,{schemaId:r}=this.opts,s=t[r];return s&&(o=(0,a.resolveUrl)(this.opts.uriResolver,o,s)),new d({schema:t,schemaId:r,root:e,baseId:o})}return v.call(this,r,i)}}t.SchemaEnv=d,t.compileSchema=u,t.resolveRef=function(e,t,r){var s;r=(0,a.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let n=p.call(this,e,r);if(void 0===n){const o=null===(s=e.localRefs)||void 0===s?void 0:s[r],{schemaId:a}=this.opts;o&&(n=new d({schema:o,schemaId:a,root:e,baseId:t}))}return void 0!==n?e.refs[r]=l.call(this,n):void 0},t.getCompilingSchema=f,t.resolveSchema=m;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(e,{baseId:t,schema:r,root:s}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const s of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,i.unescapeFragment)(s)];if(void 0===e)return;const o="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(s)&&o&&(t=(0,a.resolveUrl)(this.opts.uriResolver,t,o))}let n;if("boolean"!=typeof r&&r.$ref&&!(0,i.schemaHasRulesButRef)(r,this.RULES)){const e=(0,a.resolveUrl)(this.opts.uriResolver,t,r.$ref);n=m.call(this,s,e)}const{schemaId:c}=this.opts;return n=n||new d({schema:r,schemaId:c,root:s,baseId:t}),n.schema!==n.root.schema?n:void 0}},49409:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const s=r(17898),o=r(50458),n=r(63036);function a(e,t){const r=e.const("err",t);e.if(s._`${n.default.vErrors} === null`,()=>e.assign(n.default.vErrors,s._`[${r}]`),s._`${n.default.vErrors}.push(${r})`),e.code(s._`${n.default.errors}++`)}function i(e,t){const{gen:r,validateName:o,schemaEnv:n}=e;n.$async?r.throw(s._`new ${e.ValidationError}(${t})`):(r.assign(s._`${o}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>s.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?s.str`"${e}" keyword must be ${t} ($data)`:s.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,o,n){const{it:c}=e,{gen:u,compositeRule:l,allErrors:f}=c,h=d(e,r,o);(null!=n?n:l||f)?a(u,h):i(c,s._`[${h}]`)},t.reportExtraError=function(e,r=t.keywordError,s){const{it:o}=e,{gen:c,compositeRule:u,allErrors:l}=o;a(c,d(e,r,s)),u||l||i(o,n.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(n.default.errors,t),e.if(s._`${n.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(s._`${n.default.vErrors}.length`,t),()=>e.assign(n.default.vErrors,null)))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:a,it:i}){if(void 0===a)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",a,n.default.errors,a=>{e.const(c,s._`${n.default.vErrors}[${a}]`),e.if(s._`${c}.instancePath === undefined`,()=>e.assign(s._`${c}.instancePath`,(0,s.strConcat)(n.default.instancePath,i.errorPath))),e.assign(s._`${c}.schemaPath`,s.str`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign(s._`${c}.schema`,r),e.assign(s._`${c}.data`,o))})};const c={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function d(e,t,r){const{createErrors:o}=e.it;return!1===o?s._`{}`:function(e,t,r={}){const{gen:o,it:a}=e,i=[u(a,r),l(e,r)];return function(e,{params:t,message:r},o){const{keyword:a,data:i,schemaValue:d,it:u}=e,{opts:l,propertyName:f,topSchemaRef:h,schemaPath:p}=u;o.push([c.keyword,a],[c.params,"function"==typeof t?t(e):t||s._`{}`]),l.messages&&o.push([c.message,"function"==typeof r?r(e):r]);l.verbose&&o.push([c.schema,d],[c.parentSchema,s._`${h}${p}`],[n.default.data,i]);f&&o.push([c.propertyName,f])}(e,t,i),o.object(...i)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?s.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[n.default.instancePath,(0,s.strConcat)(n.default.instancePath,r)]}function l({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let a=n?t:s.str`${t}/${e}`;return r&&(a=s.str`${a}${(0,o.getErrorPath)(r,o.Type.Str)}`),[c.schemaPath,a]}},50458:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const s=r(17898),o=r(83277);function n(e,t=e.schema){const{opts:r,self:s}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=s.RULES.keywords;for(const r in t)o[r]||p(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function i(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function d({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,a,i,c)=>{const d=void 0===i?a:i instanceof s.Name?(a instanceof s.Name?e(n,a,i):t(n,a,i),i):a instanceof s.Name?(t(n,i,a),a):r(a,i);return c!==s.Name||d instanceof s.Name?d:o(n,d)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",s._`{}`);return void 0!==t&&l(e,r,t),r}function l(e,t,r){Object.keys(r).forEach(r=>e.assign(s._`${t}${(0,s.getProperty)(r)}`,!0))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=n,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return s._`${r}`}return s._`${e}${t}${(0,s.getProperty)(o)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(i(e))},t.escapeJsonPointer=i,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:d({mergeNames:(e,t,r)=>e.if(s._`${r} !== true && ${t} !== undefined`,()=>{e.if(s._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,s._`${r} || {}`).code(s._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(s._`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,s._`${r} || {}`),l(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:d({mergeNames:(e,t,r)=>e.if(s._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,s._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(s._`${r} !== true`,()=>e.assign(r,!0===t||s._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=l;const f={};var h;function p(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h||(t.Type=h={})),t.getErrorPath=function(e,t,r){if(e instanceof s.Name){const o=t===h.Num;return r?o?s._`"[" + ${e} + "]"`:s._`"['" + ${e} + "']"`:o?s._`"/" + ${e}`:s._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,s.getProperty)(e).toString():"/"+i(e)},t.checkStrictMode=p},51035:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},51187:(e,t,r)=>{var s=r(87379),o=r(80547);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==s(e)}},52291:(e,t,r)=>{var s=r(65650),o=r(65111),n=r(53142),a=r(51187),i=s?s.prototype:void 0,c=i?i.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(n(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},52837:e=>{e.exports=function(e){return e.split("")}},53142:e=>{var t=Array.isArray;e.exports=t},53322:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const s=r(17898),o=r(50458);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:n,schemaPath:a,errSchemaPath:i,topSchemaRef:c}){if(void 0!==t&&void 0!==n)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const n=e.schema[t];return void 0===r?{schema:n,schemaPath:s._`${e.schemaPath}${(0,s.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:n[r],schemaPath:s._`${e.schemaPath}${(0,s.getProperty)(t)}${(0,s.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==n){if(void 0===a||void 0===i||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:n,data:a,dataTypes:i,propertyName:c}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=t;if(void 0!==r){const{errorPath:a,dataPathArr:i,opts:c}=t;u(d.let("data",s._`${t.data}${(0,s.getProperty)(r)}`,!0)),e.errorPath=s.str`${a}${(0,o.getErrorPath)(r,n,c.jsPropertySyntax)}`,e.parentDataProperty=s._`${r}`,e.dataPathArr=[...i,e.parentDataProperty]}if(void 0!==a){u(a instanceof s.Name?a:d.let("data",a,!0)),void 0!==c&&(e.propertyName=c)}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}i&&(e.dataTypes=i)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:o,allErrors:n}){void 0!==s&&(e.compositeRule=s),void 0!==o&&(e.createErrors=o),void 0!==n&&(e.allErrors=n),e.jtdDiscriminator=t,e.jtdMetadata=r}},61349:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(44153),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,s.validateTuple)(e,"items")};t.default=o},63036:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};t.default=o},65111:e=>{e.exports=function(e,t){for(var r=-1,s=null==e?0:e.length,o=Array(s);++r<s;)o[r]=t(e[r],r,e);return o}},65319:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var s=r(96223);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return s.KeywordCxt}});var o=r(17898);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const n=r(95031),a=r(85748),i=r(90383),c=r(49392),d=r(17898),u=r(14856),l=r(69003),f=r(50458),h=r(93770),p=r(7903),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],v=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."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,s,o,n,a,i,c,d,u,l,f,h,y,v,g,$,_,w,b,P,E,S,k,j;const N=e.strict,x=null===(t=e.code)||void 0===t?void 0:t.optimize,O=!0===x||void 0===x?1:x||0,I=null!==(s=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==s?s:m,C=null!==(o=e.uriResolver)&&void 0!==o?o:p.default;return{strictSchema:null===(a=null!==(n=e.strictSchema)&&void 0!==n?n:N)||void 0===a||a,strictNumbers:null===(c=null!==(i=e.strictNumbers)&&void 0!==i?i:N)||void 0===c||c,strictTypes:null!==(u=null!==(d=e.strictTypes)&&void 0!==d?d:N)&&void 0!==u?u:"log",strictTuples:null!==(f=null!==(l=e.strictTuples)&&void 0!==l?l:N)&&void 0!==f?f:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:N)&&void 0!==y&&y,code:e.code?{...e.code,optimize:O,regExp:I}:{optimize:O,regExp:I},loopRequired:null!==(v=e.loopRequired)&&void 0!==v?v:200,loopEnum:null!==(g=e.loopEnum)&&void 0!==g?g:200,meta:null===($=e.meta)||void 0===$||$,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(b=e.schemaId)&&void 0!==b?b:"$id",addUsedSchema:null===(P=e.addUsedSchema)||void 0===P||P,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(S=e.validateFormats)||void 0===S||S,unicodeRegExp:null===(k=e.unicodeRegExp)||void 0===k||k,int32range:null===(j=e.int32range)||void 0===j||j,uriResolver:C}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:v,es5:t,lines:r}),this.logger=function(e){if(!1===e)return N;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 s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),b.call(this,g,e,"NOT SUPPORTED"),b.call(this,$,e,"DEPRECATED","warn"),this._metaOpts=j.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let s=h;"id"===r&&(s={...h},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[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 s=r(t);return"$async"in r||(this.errors=r.errors),s}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 s.call(this,e,t);async function s(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||n.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await s.call(this,{$ref:e},!0)}async function n(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return i.call(this,t),await c.call(this,t.missingSchema),n.call(this,e)}}function i({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 d.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function d(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,s=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,s);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,u.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,s,!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 s=this.validate(r,e);if(!s&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return s}getSchema(e){let t;for(;"string"==typeof(t=P.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,s=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,s,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=P.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,u.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(O.call(this,r,t),!t)return(0,f.eachItem)(r,e=>I.call(this,e)),this;T.call(this,t);const s={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(r,0===s.type.length?e=>I.call(this,e,s):e=>s.type.forEach(t=>I.call(this,e,s,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 s of t){const t=s.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:s}=t.definition,n=o[e];s&&n&&(o[e]=A(n))}}return e}_removeAllSchemas(e,t){for(const r in e){const s=e[r];t&&!t.test(r)||("string"==typeof s?delete e[r]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[r]))}}_addSchema(e,t,r,s=this.opts.validateSchema,o=this.opts.addUsedSchema){let n;const{schemaId:a}=this.opts;if("object"==typeof e)n=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 i=this._cache.get(e);if(void 0!==i)return i;r=(0,u.normalizeId)(n||r);const d=u.getSchemaRefs.call(this,e,r);return i=new c.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:d}),this._cache.set(i.schema,i),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=i),s&&this.validateSchema(e,!0),i}_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):c.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{c.compileSchema.call(this,e)}finally{this.opts=t}}}function b(e,t,r,s="error"){for(const o in e){const n=o;n in t&&this.logger[s](`${r}: option ${o}. ${e[n]}`)}}function P(e){return e=(0,u.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 k(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 j(){const e={...this.opts};for(const t of y)delete e[t];return e}w.ValidationError=n.default,w.MissingRefError=a.default,t.default=w;const N={log(){},warn(){},error(){}};const x=/^[a-z_$][a-z0-9_$:-]*$/i;function O(e,t){const{RULES:r}=this;if((0,f.eachItem)(e,e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.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 I(e,t,r){var s;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:n}=this;let a=o?n.post:n.rules.find(({type:e})=>e===r);if(a||(a={type:r,rules:[]},n.rules.push(a)),n.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?C.call(this,a,i,t.before):a.rules.push(i),n.all[e]=i,null===(s=t.implements)||void 0===s||s.forEach(e=>this.addKeyword(e))}function C(e,t,r){const s=e.rules.findIndex(e=>e.keyword===r);s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function T(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=A(t)),e.validateSchema=this.compile(t,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function A(e){return{anyOf:[e,R]}}},65532:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(50458),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,s.alwaysValidSchema)(o,r))return void e.fail();const n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};t.default=o},65650:(e,t,r)=>{var s=r(78942).Symbol;e.exports=s},67486:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>s._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:n,it:a}=e;if((0,o.alwaysValidSchema)(a,r))return;const i=t.name("valid");t.forIn("key",n,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},i),t.if((0,s.not)(i),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(i)}};t.default=n},69003:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const s=r(90383),o=r(74758),n=r(49409),a=r(17898),i=r(50458);var c;function d(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c||(t.DataType=c={})),t.getSchemaTypes=function(e){const t=d(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=d,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:s,opts:n}=e,i=function(e,t){return t?e.filter(e=>u.has(e)||"array"===t&&"array"===e):[]}(t,n.coerceTypes),d=t.length>0&&!(0===i.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(d){const o=f(t,s,n.strictNumbers,c.Wrong);r.if(o,()=>{i.length?function(e,t,r){const{gen:s,data:o,opts:n}=e,i=s.let("dataType",a._`typeof ${o}`),c=s.let("coerced",a._`undefined`);"array"===n.coerceTypes&&s.if(a._`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,a._`${o}[0]`).assign(i,a._`typeof ${o}`).if(f(t,o,n.strictNumbers),()=>s.assign(c,o)));s.if(a._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===n.coerceTypes)&&d(e);function d(e){switch(e){case"string":return void s.elseIf(a._`${i} == "number" || ${i} == "boolean"`).assign(c,a._`"" + ${o}`).elseIf(a._`${o} === null`).assign(c,a._`""`);case"number":return void s.elseIf(a._`${i} == "boolean" || ${o} === null
2
+ || (${i} == "string" && ${o} && ${o} == +${o})`).assign(c,a._`+${o}`);case"integer":return void s.elseIf(a._`${i} === "boolean" || ${o} === null
3
+ || (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,a._`+${o}`);case"boolean":return void s.elseIf(a._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf(a._`${o} === "true" || ${o} === 1`).assign(c,!0);case"null":return s.elseIf(a._`${o} === "" || ${o} === 0 || ${o} === false`),void s.assign(c,null);case"array":s.elseIf(a._`${i} === "string" || ${i} === "number"
4
+ || ${i} === "boolean" || ${o} === null`).assign(c,a._`[${o}]`)}}s.else(),p(e),s.endIf(),s.if(a._`${c} !== undefined`,()=>{s.assign(o,c),function({gen:e,parentData:t,parentDataProperty:r},s){e.if(a._`${t} !== undefined`,()=>e.assign(a._`${t}[${r}]`,s))}(e,c)})}(e,t,i):p(e)})}return d};const u=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,s=c.Correct){const o=s===c.Correct?a.operators.EQ:a.operators.NEQ;let n;switch(e){case"null":return a._`${t} ${o} null`;case"array":n=a._`Array.isArray(${t})`;break;case"object":n=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":n=i(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":n=i();break;default:return a._`typeof ${t} ${o} ${e}`}return s===c.Correct?n:(0,a.not)(n);function i(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function f(e,t,r,s){if(1===e.length)return l(e[0],t,r,s);let o;const n=(0,i.toHash)(e);if(n.array&&n.object){const e=a._`typeof ${t} != "object"`;o=n.null?e:a._`!${t} || ${e}`,delete n.null,delete n.array,delete n.object}else o=a.nil;n.number&&delete n.integer;for(const e in n)o=(0,a.and)(o,l(e,t,r,s));return o}t.checkDataType=l,t.checkDataTypes=f;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function p(e){const t=function(e){const{gen:t,data:r,schema:s}=e,o=(0,i.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:o,schemaValue:o,parentSchema:s,params:{},it:e}}(e);(0,n.reportError)(t,h)}t.reportTypeError=p},69968:(e,t,r)=>{var s=r(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=s},70510:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>s.str`must match "${e.ifClause}" schema`,params:({params:e})=>s._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=a(n,"then"),c=a(n,"else");if(!i&&!c)return;const d=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),i&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,l("then",r),l("else",r))}else i?t.if(u,l("then")):t.if((0,s.not)(u),l("else"));function l(r,o){return()=>{const n=e.subschema({keyword:r},u);t.assign(d,u),e.mergeValidEvaluated(n,d),o?t.assign(o,s._`${r}`):e.setParams({ifClause:r})}}e.pass(d,()=>e.error(!0))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=n},71589:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return s.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>s._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,n="maxProperties"===t?s.operators.GT:s.operators.LT;e.fail$data(s._`Object.keys(${r}).length ${n} ${o}`)}};t.default=o},72333:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=s.operators,n={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>s.str`must be ${n[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>s._`{comparison: ${n[e].okStr}, limit: ${t}}`},i={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(s._`${r} ${n[t].fail} ${o} || isNaN(${r})`)}};t.default=i},72725:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(38792);s.code='require("ajv/dist/runtime/equal").default',t.default=s},73501:e=>{e.exports=function(e,t,r){var s=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(o);++s<o;)n[s]=e[s+t];return n}},73946:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},74758:(e,t)=>{function r(e,t){return t.rules.some(t=>s(e,t))}function s(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},s){const o=t.RULES.types[s];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=s},74967:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},75365:e=>{const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,r=/^(?:(?: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,s=/[^!"$&'()*+,\-.;=_`a-z{}~]/u,o=e=>r.test(e);function n(e){let t="",r=0,s=0;for(s=0;s<e.length;s++)if(r=e[s].charCodeAt(0),48!==r){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s];break}for(s+=1;s<e.length;s++){if(r=e[s].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s]}return t}function a(e){return e.length=0,!0}function i(e,t,r){if(e.length){const s=n(e);if(""===s)return r.error=!0,!1;t.push(s),e.length=0}return!0}function c(e){if(function(e,t){let r=0;for(let s=0;s<e.length;s++)e[s]===t&&r++;return r}(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const r={error:!1,address:"",zone:""},s=[],o=[];let c=!1,d=!1,u=i;for(let n=0;n<e.length;n++){const i=e[n];if("["!==i&&"]"!==i)if(":"!==i)if("%"===i){if(!u(o,s,r))break;u=a}else o.push(i);else{if(!0===c&&(d=!0),!u(o,s,r))break;if(++t>7){r.error=!0;break}n>0&&":"===e[n-1]&&(c=!0),s.push(":")}}return o.length&&(u===a?r.zone=o.join(""):d?s.push(o.join("")):s.push(n(o))),r.address=s.join(""),r}(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}}}e.exports={nonSimpleDomain:e=>s.test(e),recomposeAuthority:function(e){const t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host);if(!o(r)){const t=c(r);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.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 s=-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===(s=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,s)),t=t.slice(s)}return r.join("")},isIPv4:o,isUUID:e=>t.test(e),normalizeIPv6:c,stringArrayToHexStripped:n}},76930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const s=r(83277);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n||(t.UsedValueState=n={})),t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class i extends s.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=s._`.${new s.Name(t)}[${r}]`}}t.ValueScopeName=i;const c=s._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:s.nil}}get(){return this._scope}name(e){return new i(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e),{prefix:o}=s,n=null!==(r=t.key)&&void 0!==r?r:t.ref;let a=this._values[o];if(a){const e=a.get(n);if(e)return e}else a=this._values[o]=new Map;a.set(n,s);const i=this._scope[o]||(this._scope[o]=[]),c=i.length;return i[c]=t.ref,s.setValue(t,{property:o,itemIndex:c}),s}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return s._`${e}${t.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(e,r,a={},i){let c=s.nil;for(const d in e){const u=e[d];if(!u)continue;const l=a[d]=a[d]||new Map;u.forEach(e=>{if(l.has(e))return;l.set(e,n.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=s._`${c}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==i?void 0:i(e)))throw new o(e);c=s._`${c}${a}${this.opts._n}`}l.set(e,n.Completed)})}return c}}},78942:(e,t,r)=>{var s=r(74967),o="object"==typeof self&&self&&self.Object===Object&&self,n=s||o||Function("return this")();e.exports=n},79194:(e,t,r)=>{r.d(t,{NIL:()=>b,parse:()=>v,stringify:()=>l,v1:()=>y,v3:()=>$,v4:()=>_,v5:()=>w,validate:()=>d,version:()=>P}),r.r(t);var s=r(76982),o=r.n(s);const n=new Uint8Array(256);let a=n.length;function i(){return a>n.length-16&&(o().randomFillSync(n),a=0),n.slice(a,a+=16)}const c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const d=function(e){return"string"==typeof e&&c.test(e)},u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).substr(1));const l=function(e,t=0){const r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!d(r))throw TypeError("Stringified UUID is invalid");return r};let f,h,p=0,m=0;const y=function(e,t,r){let s=t&&r||0;const o=t||new Array(16);let n=(e=e||{}).node||f,a=void 0!==e.clockseq?e.clockseq:h;if(null==n||null==a){const t=e.random||(e.rng||i)();null==n&&(n=f=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==a&&(a=h=16383&(t[6]<<8|t[7]))}let c=void 0!==e.msecs?e.msecs:Date.now(),d=void 0!==e.nsecs?e.nsecs:m+1;const u=c-p+(d-m)/1e4;if(u<0&&void 0===e.clockseq&&(a=a+1&16383),(u<0||c>p)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=c,m=d,h=a,c+=122192928e5;const y=(1e4*(268435455&c)+d)%4294967296;o[s++]=y>>>24&255,o[s++]=y>>>16&255,o[s++]=y>>>8&255,o[s++]=255&y;const v=c/4294967296*1e4&268435455;o[s++]=v>>>8&255,o[s++]=255&v,o[s++]=v>>>24&15|16,o[s++]=v>>>16&255,o[s++]=a>>>8|128,o[s++]=255&a;for(let e=0;e<6;++e)o[s+e]=n[e];return t||l(o)};const v=function(e){if(!d(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function g(e,t,r){function s(e,s,o,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof s&&(s=v(s)),16!==s.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(s),a.set(e,s.length),a=r(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,o){n=n||0;for(let e=0;e<16;++e)o[n+e]=a[e];return o}return l(a)}try{s.name=e}catch(e){}return s.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",s.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",s}const $=g("v3",48,function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("md5").update(e).digest()});const _=function(e,t,r){const s=(e=e||{}).random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return l(s)};const w=g("v5",80,function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("sha1").update(e).digest()}),b="00000000-0000-0000-0000-000000000000";const P=function(e){if(!d(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},79355:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(50458),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=t.name("valid");r.forEach((t,r)=>{if((0,s.alwaysValidSchema)(o,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},n);e.ok(n),e.mergeEvaluated(a)})}};t.default=o},79520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n=r(72725),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>s._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:a,schemaCode:i,schema:c}=e;a||c&&"object"==typeof c?e.fail$data(s._`!${(0,o.useFunc)(t,n.default)}(${r}, ${i})`):e.fail(s._`${c} !== ${r}`)}};t.default=a},80547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},81005:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(94450),o=r(17898),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:a,it:i}=e,c=i.opts.unicodeRegExp?"u":"",d=r?o._`(new RegExp(${a}, ${c}))`:(0,s.usePattern)(e,n);e.fail$data(o._`!${d}.test(${t})`)}};t.default=n},82237:(e,t,r)=>{var s=r(52837),o=r(83417),n=r(92013);e.exports=function(e){return o(e)?n(e):s(e)}},83277:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class s extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=s;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof s&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function n(e,...t){const r=[e[0]];let s=0;for(;s<t.length;)c(r,t[s]),r.push(e[++s]);return new o(r)}t._Code=o,t.nil=new o(""),t._=n;const a=new o("+");function i(e,...t){const r=[u(e[0])];let s=0;for(;s<t.length;)r.push(a),c(r,t[s]),r.push(a,u(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const r=d(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new o(r)}function c(e,t){var r;t instanceof o?e.push(...t._items):t instanceof s?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:u(Array.isArray(r)?r.join(","):r))}function d(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof s||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof s?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=i,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},t.stringify=function(e){return new o(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):n`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new o(e.toString())}},83417:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},84800:(e,t,r)=>{const{normalizeIPv6:s,removeDotSegments:o,recomposeAuthority:n,normalizeComponentEncoding:a,isIPv4:i,nonSimpleDomain:c}=r(75365),{SCHEMES:d,getSchemeHandler:u}=r(13956);function l(e,t,r,s){const n={};return s||(e=p(f(e,r),r),t=p(f(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=o(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=o(t.path||""),n.query=t.query):(t.path?("/"===t.path[0]?n.path=o(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=o(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function f(e,t){const r={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:""},s=Object.assign({},t),a=[],i=u(s.scheme||r.scheme);i&&i.serialize&&i.serialize(r,s),void 0!==r.path&&(s.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==s.reference&&r.scheme&&a.push(r.scheme,":");const c=n(r);if(void 0!==c&&("suffix"!==s.reference&&a.push("//"),a.push(c),r.path&&"/"!==r.path[0]&&a.push("/")),void 0!==r.path){let e=r.path;s.absolutePath||i&&i.absolutePath||(e=o(e)),void 0===c&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}return void 0!==r.query&&a.push("?",r.query),void 0!==r.fragment&&a.push("#",r.fragment),a.join("")}const h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(e,t){const r=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let n=!1;"suffix"===r.reference&&(e=r.scheme?r.scheme+":"+e:"//"+e);const a=e.match(h);if(a){if(o.scheme=a[1],o.userinfo=a[3],o.host=a[4],o.port=parseInt(a[5],10),o.path=a[6]||"",o.query=a[7],o.fragment=a[8],isNaN(o.port)&&(o.port=a[5]),o.host){if(!1===i(o.host)){const e=s(o.host);o.host=e.host.toLowerCase(),n=e.isIPV6}else n=!0}void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");const t=u(r.scheme||o.scheme);if(!(r.unicodeSupport||t&&t.unicodeSupport)&&o.host&&(r.domainHost||t&&t.domainHost)&&!1===n&&c(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),void 0!==o.host&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),t&&t.parse&&t.parse(o,r)}else o.error=o.error||"URI can not be parsed.";return o}const m={SCHEMES:d,normalize:function(e,t){return"string"==typeof e?e=f(p(e,t),t):"object"==typeof e&&(e=p(f(e,t),t)),e},resolve:function(e,t,r){const s=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=l(p(e,s),p(t,s),s,!0);return s.skipEscape=!0,f(o,s)},resolveComponent:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=f(a(p(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=f(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=f(a(p(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=f(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:f,parse:p};e.exports=m,e.exports.default=m,e.exports.fastUri=m},85748:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(14856);class o extends Error{constructor(e,t,r,o){super(o||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,s.resolveUrl)(e,t,r),this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(e,this.missingRef))}}t.default=o},87379:(e,t,r)=>{var s=r(65650),o=r(8870),n=r(29005),a=s?s.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):n(e)}},88925:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},90383:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},92013:e=>{var t="\\ud800-\\udfff",r="["+t+"]",s="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",n="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+s+"|"+o+")"+"?",d="[\\ufe0e\\ufe0f]?",u=d+c+("(?:\\u200d(?:"+[n,a,i].join("|")+")"+d+c+")*"),l="(?:"+[n+s+"?",s,a,i,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+u,"g");e.exports=function(e){return e.match(f)||[]}},92697:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(94450),o=r(17898),n=r(63036),a=r(50458),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:c,errsCount:d,it:u}=e;if(!d)throw new Error("ajv implementation error");const{allErrors:l,opts:f}=u;if(u.props=!0,"all"!==f.removeAdditional&&(0,a.alwaysValidSchema)(u,r))return;const h=(0,s.allSchemaProperties)(i.properties),p=(0,s.allSchemaProperties)(i.patternProperties);function m(e){t.code(o._`delete ${c}[${e}]`)}function y(s){if("all"===f.removeAdditional||f.removeAdditional&&!1===r)m(s);else{if(!1===r)return e.setParams({additionalProperty:s}),e.error(),void(l||t.break());if("object"==typeof r&&!(0,a.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===f.removeAdditional?(v(s,r,!1),t.if((0,o.not)(r),()=>{e.reset(),m(s)})):(v(s,r),l||t.if((0,o.not)(r),()=>t.break()))}}}function v(t,r,s){const o={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===s&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",c,r=>{h.length||p.length?t.if(function(r){let n;if(h.length>8){const e=(0,a.schemaRefOrVal)(u,i.properties,"properties");n=(0,s.isOwnProperty)(t,e,r)}else n=h.length?(0,o.or)(...h.map(e=>o._`${r} === ${e}`)):o.nil;return p.length&&(n=(0,o.or)(n,...p.map(t=>o._`${(0,s.usePattern)(e,t)}.test(${r})`))),(0,o.not)(n)}(r),()=>y(r)):y(r)}),e.ok(o._`${d} === ${n.default.errors}`)}};t.default=i},93426:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const s=r(17898),o=r(50458),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>s.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>s._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:s}=t;Array.isArray(s)?a(e,s):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:n,data:a,keyword:i,it:c}=e;c.items=!0;const d=r.const("len",s._`${a}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(s._`${d} <= ${t.length}`);else if("object"==typeof n&&!(0,o.alwaysValidSchema)(c,n)){const n=r.var("valid",s._`${d} <= ${t.length}`);r.if((0,s.not)(n),()=>function(n){r.forRange("i",t.length,d,t=>{e.subschema({keyword:i,dataProp:t,dataPropType:o.Type.Num},n),c.allErrors||r.if((0,s.not)(n),()=>r.break())})}(n)),e.ok(n)}}t.validateAdditionalItems=a,t.default=n},93640:(e,t,r)=>{var s=r(44187),o=r(45881),n=r(39850),a=RegExp("['’]","g");e.exports=function(e){return function(t){return s(n(o(t).replace(a,"")),e,"")}}},93770:e=>{e.exports=JSON.parse('{"$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":false}')},94450:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const s=r(17898),o=r(50458),n=r(63036),a=r(50458);function i(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:s._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return s._`${i(e)}.call(${t}, ${r})`}function d(e,t,r,o){const n=s._`${t}${(0,s.getProperty)(r)} === undefined`;return o?(0,s.or)(n,(0,s.not)(c(e,t,r))):n}function u(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:n}=e;r.if(d(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:s._`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,n){return(0,s.or)(...o.map(o=>(0,s.and)(d(e,t,o,r.ownProperties),s._`${n} = ${o}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=i,t.isOwnProperty=c,t.propertyInData=function(e,t,r,o){const n=s._`${t}${(0,s.getProperty)(r)} !== undefined`;return o?s._`${n} && ${c(e,t,r)}`:n},t.noPropertyInData=d,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter(r=>!(0,o.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:a,errorPath:i},it:c},d,u,l){const f=l?s._`${e}, ${t}, ${o}${a}`:t,h=[[n.default.instancePath,(0,s.strConcat)(n.default.instancePath,i)],[n.default.parentData,c.parentData],[n.default.parentDataProperty,c.parentDataProperty],[n.default.rootData,n.default.rootData]];c.opts.dynamicRef&&h.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const p=s._`${f}, ${r.object(...h)}`;return u!==s.nil?s._`${d}.call(${u}, ${p})`:s._`${d}(${p})`};const l=s._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:s._`${"new RegExp"===n.code?l:(0,a.useFunc)(e,n)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:n,it:a}=e,i=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return c(()=>t.assign(e,!1)),e}return t.var(i,!0),c(()=>t.break()),i;function c(a){const c=t.const("len",s._`${r}.length`);t.forRange("i",0,c,r=>{e.subschema({keyword:n,dataProp:r,dataPropType:o.Type.Num},i),t.if((0,s.not)(i),a)})}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:n,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(e=>(0,o.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;const i=t.let("valid",!1),c=t.name("_valid");t.block(()=>r.forEach((r,o)=>{const a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},c);t.assign(i,s._`${i} || ${c}`);e.mergeValidEvaluated(a,c)||t.if((0,s.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}},95031:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},95243:(e,t,r)=>{var s=r(52291);e.exports=function(e){return null==e?"":s(e)}},95479:(e,t,r)=>{var s=r(93640),o=r(5485),n=s(function(e,t,r){return e+(r?" ":"")+o(t)});e.exports=n},96223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const s=r(15948),o=r(69003),n=r(74758),a=r(69003),i=r(96841),c=r(49348),d=r(53322),u=r(17898),l=r(63036),f=r(14856),h=r(50458),p=r(49409);function m({gen:e,validateName:t,schema:r,schemaEnv:s,opts:o},n){o.code.es5?e.func(t,u._`${l.default.data}, ${l.default.valCxt}`,s.$async,()=>{e.code(u._`"use strict"; ${y(r,o)}`),function(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,u._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,u._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,u._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,u._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,u._`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,u._`""`),e.var(l.default.parentData,u._`undefined`),e.var(l.default.parentDataProperty,u._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,u._`{}`)})}(e,o),e.code(n)}):e.func(t,u._`${l.default.data}, ${function(e){return u._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?u._`, ${l.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,s.$async,()=>e.code(y(r,o)).code(n))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function v(e,t){$(e)&&(_(e),g(e))?function(e,t){const{schema:r,gen:s,opts:o}=e;o.$comment&&r.$comment&&b(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,f.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 n=s.const("_errs",l.default.errors);w(e,n),s.var(t,u._`${n} === ${l.default.errors}`)}(e,t):(0,s.boolOrEmptySchema)(e,t)}function g({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 $(e){return"boolean"!=typeof e.schema}function _(e){(0,h.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:s,self:o}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return P(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);P(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function b({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:o}){const n=r.$comment;if(!0===o.$comment)e.code(u._`${l.default.self}.logger.log(${n})`);else if("function"==typeof o.$comment){const r=u.str`${s}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${l.default.self}.opts.$comment(${n}, ${r}, ${o}.schema)`)}}function P(e,t,r,s){const{gen:o,schema:i,data:c,allErrors:d,opts:f,self:p}=e,{RULES:m}=p;function y(h){(0,n.shouldUseGroup)(i,h)&&(h.type?(o.if((0,a.checkDataType)(h.type,c,f.strictNumbers)),E(e,h),1===t.length&&t[0]===h.type&&r&&(o.else(),(0,a.reportTypeError)(e)),o.endIf()):E(e,h),d||o.if(u._`${l.default.errors} === ${s||0}`))}!i.$ref||!f.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(i,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=>{k(e.dataTypes,t)||j(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){const r=[];for(const s of e.dataTypes)k(t,s)?r.push(s):t.includes("integer")&&"number"===s&&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"))&&j(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const s in r){const o=r[s];if("object"==typeof o&&(0,n.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some(e=>S(t,e))&&j(e,`missing type "${r.join(",")}" for keyword "${s}"`)}}}(e,e.dataTypes)}(e,t),o.block(()=>{for(const e of m.rules)y(e);y(m.post)})):o.block(()=>x(e,"$ref",m.all.$ref.definition))}function E(e,t){const{gen:r,schema:s,opts:{useDefaults:o}}=e;o&&(0,i.assignDefaults)(e,t.type),r.block(()=>{for(const r of t.rules)(0,n.shouldUseRule)(s,r)&&x(e,r.keyword,r.definition,t.type)})}function S(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function k(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function j(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,h.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){$(e)&&(_(e),g(e))?function(e){const{schema:t,opts:r,gen:s}=e;m(e,()=>{r.$comment&&t.$comment&&b(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,h.checkStrictMode)(e,"default is ignored in the schema root")}(e),s.let(l.default.vErrors,null),s.let(l.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`)),t.if(u._`${e.evaluated}.dynamicItems`,()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:s,ValidationError:o,opts:n}=e;r.$async?t.if(u._`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw(u._`new ${o}(${l.default.vErrors})`)):(t.assign(u._`${s}.errors`,l.default.vErrors),n.unevaluated&&function({gen:e,evaluated:t,props:r,items:s}){r instanceof u.Name&&e.assign(u._`${t}.props`,r);s instanceof u.Name&&e.assign(u._`${t}.items`,s)}(e),t.return(u._`${l.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,s.topBoolOrEmptySchema)(e))};class N{constructor(e,t,r){if((0,c.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,h.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",C(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.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",l.default.errors))}result(e,t,r){this.failResult((0,u.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,u.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(u._`${t} !== undefined && (${(0,u.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?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,p.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=u.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:s,schemaType:o,def:n}=this;r.if((0,u.or)(u._`${s} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||n.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:s,it:o}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,a.checkDataTypes)(e,t,o.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function(){if(s.validateSchema){const r=e.scopeValue("validate$data",{ref:s.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,d.getSubschema)(this.it,e);(0,d.extendSubschemaData)(r,this.it,e),(0,d.extendSubschemaMode)(r,e);const s={...this.it,...r,items:void 0,props:void 0};return v(s,t),s}mergeEvaluated(e,t){const{it:r,gen:s}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=h.mergeEvaluated.props(s,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=h.mergeEvaluated.items(s,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:s}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return s.if(t,()=>this.mergeEvaluated(e,u.Name)),!0}}function x(e,t,r,s){const o=new N(e,r,t);"code"in r?r.code(o,s):o.$data&&r.validate?(0,c.funcKeywordCode)(o,r):"macro"in r?(0,c.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(o,r)}t.KeywordCxt=N;const O=/^\/(?:[^~]|~0|~1)*$/,I=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let o,n;if(""===e)return l.default.rootData;if("/"===e[0]){if(!O.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,n=l.default.rootData}else{const a=I.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+a[1];if(o=a[2],"#"===o){if(i>=t)throw new Error(c("property/index",i));return s[t-i]}if(i>t)throw new Error(c("data",i));if(n=r[t-i],!o)return n}let a=n;const i=o.split("/");for(const e of i)e&&(n=u._`${n}${(0,u.getProperty)((0,h.unescapeJsonPointer)(e))}`,a=u._`${a} && ${n}`);return a;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=C},96841:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const s=r(17898),o=r(50458);function n(e,t,r){const{gen:n,compositeRule:a,data:i,opts:c}=e;if(void 0===r)return;const d=s._`${i}${(0,s.getProperty)(t)}`;if(a)return void(0,o.checkStrictMode)(e,`default is ignored for: ${d}`);let u=s._`${d} === undefined`;"empty"===c.useDefaults&&(u=s._`${u} || ${d} === null || ${d} === ""`),n.if(u,s._`${d} = ${(0,s.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:s}=e.schema;if("object"===t&&r)for(const t in r)n(e,t,r[t].default);else"array"===t&&Array.isArray(s)&&s.forEach((t,r)=>n(e,r,t.default))}},98422:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(94450),o=r(17898),n=r(50458),a=r(50458),i={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:i,parentSchema:c,it:d}=e,{opts:u}=d,l=(0,s.allSchemaProperties)(r),f=l.filter(e=>(0,n.alwaysValidSchema)(d,r[e]));if(0===l.length||f.length===l.length&&(!d.opts.unevaluated||!0===d.props))return;const h=u.strictSchema&&!u.allowMatchingProperties&&c.properties,p=t.name("valid");!0===d.props||d.props instanceof o.Name||(d.props=(0,a.evaluatedPropsToName)(t,d.props));const{props:m}=d;function y(e){for(const t in h)new RegExp(e).test(t)&&(0,n.checkStrictMode)(d,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){t.forIn("key",i,n=>{t.if(o._`${(0,s.usePattern)(e,r)}.test(${n})`,()=>{const s=f.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:a.Type.Str},p),d.opts.unevaluated&&!0!==m?t.assign(o._`${m}[${n}]`,!0):s||d.allErrors||t.if((0,o.not)(p),()=>t.break())})})}!function(){for(const e of l)h&&y(e),d.allErrors?v(e):(t.var(p,!0),v(e),t.if(p))}()}};t.default=i},98768:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const s=r(17898),o=r(50458),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>s._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:n,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;const i=r,c=t.let("valid",!1),d=t.let("passing",null),u=t.name("_valid");e.setParams({passing:d}),t.block(function(){i.forEach((r,n)=>{let i;(0,o.alwaysValidSchema)(a,r)?t.var(u,!0):i=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if(s._`${u} && ${c}`).assign(c,!1).assign(d,s._`[${d}, ${n}]`).else(),t.if(u,()=>{t.assign(c,!0),t.assign(d,n),i&&e.mergeEvaluated(i,s.Name)})})}),e.result(c,()=>e.reset(),()=>e.error(!0))}};t.default=n},99868:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const s=r(17898),o=r(50458),n=r(94450);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return s.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>s._`{property: ${e},
5
+ missingProperty: ${o},
6
+ depsCount: ${t},
7
+ deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const s in e){if("__proto__"===s)continue;(Array.isArray(e[s])?t:r)[s]=e[s]}return[t,r]}(e);i(e,t),c(e,r)}};function i(e,t=e.schema){const{gen:r,data:o,it:a}=e;if(0===Object.keys(t).length)return;const i=r.let("missing");for(const c in t){const d=t[c];if(0===d.length)continue;const u=(0,n.propertyInData)(r,o,c,a.opts.ownProperties);e.setParams({property:c,depsCount:d.length,deps:d.join(", ")}),a.allErrors?r.if(u,()=>{for(const t of d)(0,n.checkReportMissingProp)(e,t)}):(r.if(s._`${u} && (${(0,n.checkMissingProp)(e,d,i)})`),(0,n.reportMissingProp)(e,i),r.else())}}function c(e,t=e.schema){const{gen:r,data:s,keyword:a,it:i}=e,c=r.name("valid");for(const d in t)(0,o.alwaysValidSchema)(i,t[d])||(r.if((0,n.propertyInData)(r,s,d,i.opts.ownProperties),()=>{const t=e.subschema({keyword:a,schemaProp:d},c);e.mergeValidEvaluated(t,c)},()=>r.var(c,!0)),e.ok(c))}t.validatePropertyDeps=i,t.validateSchemaDeps=c,t.default=a}};
package/lib/63.js ADDED
@@ -0,0 +1 @@
1
+ export const __webpack_esm_id__=63;export const __webpack_esm_ids__=[63];export const __webpack_esm_modules__={8870:(e,t,l)=>{var n=l(65650),o=Object.prototype,i=o.hasOwnProperty,r=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),l=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=r.call(e);return n&&(t?e[u]=l:delete e[u]),o}},10482:e=>{var t="\\ud800-\\udfff",l="\\u2700-\\u27bf",n="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+i+"]",u="\\d+",a="["+l+"]",c="["+n+"]",f="[^"+t+i+u+l+n+o+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="["+o+"]",g="(?:"+c+"|"+f+")",p="(?:"+h+"|"+f+")",D="(?:['’](?:d|ll|m|re|s|t|ve))?",b="(?:['’](?:D|LL|M|RE|S|T|VE))?",B="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",w="[\\ufe0e\\ufe0f]?",x=w+B+("(?:\\u200d(?:"+["[^"+t+"]",s,d].join("|")+")"+w+B+")*"),U="(?:"+[a,s,d].join("|")+")"+x,R=RegExp([h+"?"+c+"+"+D+"(?="+[r,h,"$"].join("|")+")",p+"+"+b+"(?="+[r,h+g,"$"].join("|")+")",h+"?"+g+"+"+D,h+"+"+b,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",u,U].join("|"),"g");e.exports=function(e){return e.match(R)||[]}},10750:(e,t,l)=>{var n=l(93640)(function(e,t,l){return e+(l?"-":"")+t.toLowerCase()});e.exports=n},15813:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},25291:(e,t,l)=>{l.d(t,{Ay:()=>D});var n=l(51649),o=l(8498),i=l(29122);const r={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},u={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},a={...r,...u},c={...r,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},f=(0,i.A)(),s=f?a:c;Object.entries(u);const d=function({isSelected:e=!1}){return n.default.createElement(o.Box,{marginRight:1},e?n.default.createElement(o.Text,{color:"blue"},s.pointer):n.default.createElement(o.Text,null," "))};const h=function({isSelected:e=!1,label:t}){return n.createElement(o.Text,{color:e?"blue":void 0},t)};var g=l(57975);function p(e,t){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);if(!Number.isSafeInteger(t))throw new TypeError(`The \`steps\` parameter must be an integer, got ${t}.`);const{length:l}=e;if(0===l)return[...e];const n=(t%l+l)%l;return 0===n?[...e]:[...e.slice(-n),...e.slice(0,-n)]}const D=function({items:e=[],isFocused:t=!0,initialIndex:l=0,indicatorComponent:i=d,itemComponent:r=h,limit:u,onSelect:a,onHighlight:c}){const f="number"==typeof u&&e.length>u,s=f?Math.min(u,e.length):e.length,D=s-1,[b,B]=(0,n.useState)(l>D?D-l:0),[w,x]=(0,n.useState)(l?l>D?D:l:0),U=(0,n.useRef)(e);(0,n.useEffect)(()=>{(0,g.isDeepStrictEqual)(U.current.map(e=>e.value),e.map(e=>e.value))||(B(0),x(0)),U.current=e},[e]),(0,o.useInput)((0,n.useCallback)((t,l)=>{if("k"===t||l.upArrow){const t=(f?s:e.length)-1,l=0===w,n=l?b+1:b,o=l?f?w:t:w-1;B(n),x(o);const i=f?p(e,n).slice(0,s):e;"function"==typeof c&&c(i[o])}if("j"===t||l.downArrow){const t=w===(f?s:e.length)-1,l=t?b-1:b,n=t?f?w:0:w+1;B(l),x(n);const o=f?p(e,l).slice(0,s):e;"function"==typeof c&&c(o[n])}if(/^[1-9]$/.test(t)){const l=Number.parseInt(t,10)-1,n=f?p(e,b).slice(0,s):e;if(l>=0&&l<n.length){const e=n[l];e&&a?.(e)}}if(l.return){const t=f?p(e,b).slice(0,s):e;"function"==typeof a&&a(t[w])}},[f,s,b,w,e,a,c]),{isActive:t});const R=f?p(e,b).slice(0,s):e;return n.default.createElement(o.Box,{flexDirection:"column"},R.map((e,t)=>{const l=t===w;return n.default.createElement(o.Box,{key:e.key??e.value},n.default.createElement(i,{isSelected:l}),n.default.createElement(r,{...e,isSelected:l}))}))}},29005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},29253:(e,t,l)=>{l.d(t,{A:()=>u});var n=l(51649),o=l(8498),i=l(88568);function r({value:e,placeholder:t="",focus:l=!0,mask:r,highlightPastedText:u=!1,showCursor:a=!0,onChange:c,onSubmit:f}){const[s,d]=(0,n.useState)({cursorOffset:(e||"").length,cursorWidth:0}),{cursorOffset:h,cursorWidth:g}=s;(0,n.useEffect)(()=>{d(t=>{if(!l||!a)return t;const n=e||"";return t.cursorOffset>n.length-1?{cursorOffset:n.length,cursorWidth:0}:t})},[e,l,a]);const p=u?g:0,D=r?r.repeat(e.length):e;let b=D,B=t?i.Ay.grey(t):void 0;if(a&&l){B=t.length>0?i.Ay.inverse(t[0])+i.Ay.grey(t.slice(1)):i.Ay.inverse(" "),b=D.length>0?"":i.Ay.inverse(" ");let e=0;for(const t of D)b+=e>=h-p&&e<=h?i.Ay.inverse(t):t,e++;D.length>0&&h===D.length&&(b+=i.Ay.inverse(" "))}return(0,o.useInput)((t,l)=>{if(l.upArrow||l.downArrow||l.ctrl&&"c"===t||l.tab||l.shift&&l.tab)return;if(l.return)return void(f&&f(e));let n=h,o=e,i=0;l.leftArrow?a&&n--:l.rightArrow?a&&n++:l.backspace||l.delete?h>0&&(o=e.slice(0,h-1)+e.slice(h,e.length),n--):(o=e.slice(0,h)+t+e.slice(h,e.length),n+=t.length,t.length>1&&(i=t.length)),h<0&&(n=0),h>e.length&&(n=e.length),d({cursorOffset:n,cursorWidth:i}),o!==e&&c(o)},{isActive:l}),n.default.createElement(o.Text,null,t?D.length>0?b:B:b)}const u=r},39546:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},39850:(e,t,l)=>{var n=l(39546),o=l(15813),i=l(95243),r=l(10482);e.exports=function(e,t,l){return e=i(e),void 0===(t=l?void 0:t)?o(e)?r(e):n(e):e.match(t)||[]}},44187:e=>{e.exports=function(e,t,l,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(l=e[++o]);++o<i;)l=t(l,e[o],o,e);return l}},45881:(e,t,l)=>{var n=l(69968),o=l(95243),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,n).replace(r,"")}},47882:(e,t,l)=>{l.d(t,{A:()=>r});var n=l(51649),o=l(8498),i=l(47661);const r=function({type:e="dots"}){const[t,l]=(0,n.useState)(0),r=i[e];return(0,n.useEffect)(()=>{const e=setInterval(()=>{l(e=>e===r.frames.length-1?0:e+1)},r.interval);return()=>{clearInterval(e)}},[r]),n.default.createElement(o.Text,null,r.frames[t])}},51035:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},51187:(e,t,l)=>{var n=l(87379),o=l(80547);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},52291:(e,t,l)=>{var n=l(65650),o=l(65111),i=l(53142),r=l(51187),u=n?n.prototype:void 0,a=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(r(t))return a?a.call(t):"";var l=t+"";return"0"==l&&1/t==-1/0?"-0":l}},53142:e=>{var t=Array.isArray;e.exports=t},65111:e=>{e.exports=function(e,t){for(var l=-1,n=null==e?0:e.length,o=Array(n);++l<n;)o[l]=t(e[l],l,e);return o}},65650:(e,t,l)=>{var n=l(78942).Symbol;e.exports=n},69968:(e,t,l)=>{var n=l(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=n},74967:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},78942:(e,t,l)=>{var n=l(74967),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},80547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},87379:(e,t,l)=>{var n=l(65650),o=l(8870),i=l(29005),r=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?o(e):i(e)}},93640:(e,t,l)=>{var n=l(44187),o=l(45881),i=l(39850),r=RegExp("['’]","g");e.exports=function(e){return function(t){return n(i(o(t).replace(r,"")),e,"")}}},95243:(e,t,l)=>{var n=l(52291);e.exports=function(e){return null==e?"":n(e)}}};
package/lib/775.js ADDED
@@ -0,0 +1 @@
1
+ export const __webpack_esm_id__=775;export const __webpack_esm_ids__=[775];export const __webpack_esm_modules__={76775:(e,l,r)=>{r.d(l,{App:()=>te,AppDetail:()=>C,AppList:()=>B,CONTROL_ACTIONS:()=>h,DeviceControl:()=>I,DeviceDetail:()=>S,DeviceList:()=>E,DeviceScreenshot:()=>A,DeviceStatus:()=>y,Footer:()=>v,GroupDetail:()=>M,GroupList:()=>L,Header:()=>p,Loading:()=>_,MainMenu:()=>D,MediaBoxDetail:()=>R,MediaBoxList:()=>O,MediaFileDetail:()=>U,MediaFileList:()=>N,ModuleDetail:()=>w,ModuleList:()=>k,ONLINE_THRESHOLD_MS:()=>g,ProjectInitView:()=>ne,ShortEditEditor:()=>H,VIEWS:()=>u,runInteractiveMode:()=>ie}),r.r(l);var n,t=r(51649),i=r(8498),o=r(29557),a=r(99436),s=r(68832),c=r(50700),d=r(74752),x=r(47336),u={MAIN:"main",DEVICES:"devices",DEVICE_DETAIL:"device_detail",DEVICE_CONTROL:"device_control",DEVICE_SCREENSHOT:"device_screenshot",APPS:"apps",APP_DETAIL:"app_detail",APP_SHORT_EDIT:"app_short_edit",APP_PROJECT_INIT:"app_project_init",MODULES:"modules",MODULE_DETAIL:"module_detail",MODULE_SHORT_EDIT:"module_short_edit",MODULE_PROJECT_INIT:"module_project_init",GROUPS:"groups",GROUP_DETAIL:"group_detail",MEDIA_BOXES:"media_boxes",MEDIA_BOX_DETAIL:"media_box_detail",MEDIA_FILES:"media_files",MEDIA_FILE_DETAIL:"media_file_detail"},h=[{label:"Refresh Application",value:"refresh"},{label:"Clear Cache",value:"clear-cache"},{label:"Take Screenshot",value:"take-screenshot"},{label:"Open System Menu",value:"system-menu-open"},{label:"Close System Menu",value:"system-menu-close"},{label:"Open Debug Panel",value:"debug-panel-open"},{label:"Close Debug Panel",value:"debug-panel-close"},{label:"Enable Logging",value:"logging-on"},{label:"Disable Logging",value:"logging-off"},{label:"← Back",value:"back"}],g=3e5,m=r(47882),j=r(71178),T=(e,l=!0)=>{var r=Math.floor(60),n=(0,t.useState)(r),i=s(n,2),o=i[0],a=i[1],c=(0,t.useState)(null),d=s(c,2),x=d[0],u=d[1],h=(0,t.useRef)(e);(0,t.useEffect)(()=>{h.current=e},[e]);var g=(0,t.useCallback)(()=>{a(r),u(Date.now())},[r]);return(0,t.useEffect)(()=>{if(l){var e=setInterval(()=>{a(e=>e<=1?(h.current?.(),u(Date.now()),r):e-1)},1e3);return()=>clearInterval(e)}},[l,r]),(0,t.useEffect)(()=>{l&&(a(r),u(Date.now()))},[l,r]),{countdown:o,lastRefreshTime:x,resetCountdown:g}},f=({countdown:e,lastRefreshTime:l})=>(0,j.jsx)(i.Box,{children:(0,j.jsxs)(i.Text,{color:"gray",children:["Next refresh in ",(0,j.jsxs)(i.Text,{color:"cyan",children:[e,"s"]}),l&&(0,j.jsxs)(i.Text,{color:"gray",children:[" (last: ",l?new Date(l).toLocaleTimeString():null,")"]})]})}),p=({workspace:e,view:l})=>(0,j.jsxs)(i.Box,{flexDirection:"column",marginBottom:1,children:[(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:"BRICKS CLI"}),(0,j.jsx)(i.Text,{color:"gray",children:" - Interactive Mode"})]}),(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{color:"gray",children:"Workspace: "}),(0,j.jsx)(i.Text,{color:"green",children:e?.name||"Not connected"}),(0,j.jsx)(i.Text,{color:"gray",children:" | View: "}),(0,j.jsx)(i.Text,{color:"yellow",children:l})]}),(0,j.jsx)(i.Text,{color:"gray",children:"─".repeat(60)})]}),v=()=>(0,j.jsxs)(i.Box,{marginTop:1,flexDirection:"column",children:[(0,j.jsx)(i.Text,{color:"gray",children:"─".repeat(60)}),(0,j.jsxs)(i.Text,{color:"gray",children:["Press ",(0,j.jsx)(i.Text,{color:"cyan",children:"q"})," to quit, ",(0,j.jsx)(i.Text,{color:"cyan",children:"Esc"})," to go back"]})]}),_=({text:e})=>(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{color:"green",children:(0,j.jsx)(m.A,{type:"dots"})}),(0,j.jsxs)(i.Text,{children:[" ",e||"Loading..."]})]}),y=({lastAliveTime:e})=>{if(!e)return(0,j.jsx)(i.Text,{color:"gray",children:"○ Unknown"});var l=Date.now()-new Date(e).getTime();if(l<=g)return(0,j.jsx)(i.Text,{color:"green",children:"● Online"});var r=Math.floor(l/6e4);if(r<60)return(0,j.jsxs)(i.Text,{color:"yellow",children:["○ Offline (",r,"m ago)"]});var n=Math.floor(r/60);if(n<24)return(0,j.jsxs)(i.Text,{color:"red",children:["○ Offline (",n,"h ago)"]});var t=Math.floor(n/24);return(0,j.jsxs)(i.Text,{color:"red",children:["○ Offline (",t,"d ago)"]})},b=r(25291),D=({onSelect:e,mediaEnabled:l})=>{var r=[{label:"Devices",value:u.DEVICES},{label:"Applications",value:u.APPS},{label:"Modules",value:u.MODULES},{label:"Device Groups",value:u.GROUPS},...l?[{label:"Media Flow",value:u.MEDIA_BOXES}]:[],{label:"Exit",value:"exit"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,marginBottom:1,children:"Main Menu"}),(0,j.jsx)(b.Ay,{items:r,onSelect:e})]})},E=({devices:e,loading:l,onSelect:r,countdown:n,lastRefreshTime:t})=>{if(l)return(0,j.jsx)(_,{text:"Loading devices..."});if(!e?.length)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{color:"yellow",children:"No devices found"}),(0,j.jsx)(f,{countdown:n,lastRefreshTime:t})]});var o=[...e.map(e=>({label:`${(e=>{if(!e)return"○ Unknown";var l=Date.now()-new Date(e).getTime();if(l<=g)return"● Online";var r=Math.floor(l/6e4);if(r<60)return`○ ${r}m ago`;var n=Math.floor(r/60);return n<24?`○ ${n}h ago`:`○ ${Math.floor(n/24)}d ago`})(e.entry_detail?.watch_dog_timer?.last_alive_time)} - ${e.name||e.device_name}`,value:e._id,device:e})),{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Box,{marginBottom:1,children:[(0,j.jsxs)(i.Text,{bold:!0,children:["Devices (",e.length,")"]}),(0,j.jsx)(i.Text,{color:"gray",children:" - "}),(0,j.jsx)(f,{countdown:n,lastRefreshTime:t})]}),(0,j.jsx)(b.Ay,{items:o,onSelect:r})]})},S=({device:e,loading:l,error:r,onSelect:n,mediaEnabled:t,countdown:o,lastRefreshTime:a})=>{if(l)return(0,j.jsx)(_,{text:"Loading device..."});if(r)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",r]}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:n})]});if(!e)return(0,j.jsx)(i.Text,{color:"red",children:"Device not found"});var s=[{label:"Control Device",value:"control"},...t?[{label:"View Screenshot",value:"screenshot"}]:[],{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],c=e.entry_detail,d=c?.screen,x=c?.update,u=c?.local_sync;return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:e.name||e.device_name}),(0,j.jsx)(i.Text,{color:"gray",children:" - "}),(0,j.jsx)(f,{countdown:o,lastRefreshTime:a})]}),e.description&&(0,j.jsx)(i.Text,{color:"gray",children:e.description}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{color:"gray",children:"Status: "}),(0,j.jsx)(y,{lastAliveTime:c?.watch_dog_timer?.last_alive_time})]}),(0,j.jsxs)(i.Text,{color:"gray",children:["ID: ",e._id]}),e.tags?.length>0&&(0,j.jsxs)(i.Text,{color:"gray",children:["Tags: ",e.tags.join(", ")]}),c?.application&&(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Application"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" Name: ",c.application.name]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" Mode: ",c.operation_mode||"N/A"]})]}),d&&(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Screen"}),d.resolution&&(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Resolution: ",d.resolution.width,"x",d.resolution.height,d.resolution.scale&&` @${d.resolution.scale}x`]}),d.orientation&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Orientation: ",d.orientation]}),d.touch&&(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Touch:"," ",d.touch.available?`Yes (${d.touch.touch_point} points)`:"No"]})]}),(c?.memory_usage||c?.disk_usage)&&(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"System"}),c.memory_usage&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Memory: ",Math.round(100*c.memory_usage),"%"]}),c.disk_usage&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Disk: ",Math.round(100*c.disk_usage),"%"]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Capabilities"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Sound: ",c?.sound?.available?"✓":"✗"," | ","Camera: ",c?.camera?.available?"✓":"✗"," | ","Audio In: ",c?.audio_in?.available?"✓":"✗"]})]}),u&&(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Local Sync"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Role: ",u.is_main?"Main":"Peer",u.peer_count>0&&` | Peers: ${u.peer_count}`,u.mean_latency&&` | Latency: ${u.mean_latency}ms`]})]}),x&&(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Update"}),(0,j.jsxs)(i.Text,{color:x.need_update?"yellow":"gray",children:[" ","Status: ",x.need_update?"⚠ Update available":"✓ Up to date"]}),x.current_version&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Version: ",x.current_version]})]})]}),(0,j.jsx)(b.Ay,{items:s,onSelect:n})]})},I=({device:e,onSelect:l,controlling:r,controlResult:n})=>(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{bold:!0,color:"cyan",children:["Control: ",e?.name||e?.device_name]}),r&&(0,j.jsx)(_,{text:"Sending command..."}),n&&(0,j.jsx)(i.Text,{color:n.success?"green":"red",children:n.message}),(0,j.jsx)(i.Box,{marginTop:1,children:(0,j.jsx)(b.Ay,{items:h,onSelect:l})})]}),A=({device:e,screenshot:l,loading:r,error:n,onSelect:t})=>{var a=l?.file?.meta,s=null!=a?.originalWidth&&null!=a?.originalHeight,c=null!=a?.originalFileSize;return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{bold:!0,color:"cyan",children:["Screenshot: ",e?.name||e?.device_name||"Unknown"]}),r&&(0,j.jsx)(_,{text:"Loading screenshot..."}),n&&(0,j.jsx)(i.Box,{marginY:1,children:(0,j.jsx)(i.Text,{color:"red",children:String(n)})}),!r&&!n&&l&&(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Box,{height:30,children:(0,j.jsx)(o.default,{src:l.path,width:80,alt:"Device screenshot"})}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Screenshot Details"}),(0,j.jsxs)(i.Box,{marginY:1,children:[(0,j.jsx)(i.Text,{color:"green",children:"Screenshot saved to: "}),(0,j.jsx)(i.Text,{color:"cyan",children:String(l.path||"")})]}),s&&(0,j.jsxs)(i.Text,{color:"gray",children:["Size: ",String(a.originalWidth),"x",String(a.originalHeight)]}),c&&(0,j.jsxs)(i.Text,{color:"gray",children:["File: ",(Number(a.originalFileSize)/1024).toFixed(1)," KB"]}),l.file?.updatedAt&&(0,j.jsxs)(i.Text,{color:"gray",children:["Updated: ",new Date(l.file.updatedAt).toLocaleString()]})]})]}),!r&&!n&&!l&&(0,j.jsx)(i.Box,{marginY:1,children:(0,j.jsx)(i.Text,{color:"yellow",children:"No screenshot available. Try taking a new one."})}),(0,j.jsx)(i.Box,{marginTop:1,children:(0,j.jsx)(b.Ay,{items:[{label:"Take New Screenshot",value:"take"},{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:t})})]})},B=({apps:e,loading:l,onSelect:r})=>{if(l)return(0,j.jsx)(_,{text:"Loading applications..."});if(!e?.length)return(0,j.jsx)(i.Text,{color:"yellow",children:"No applications found"});var n=[...e.map(e=>({label:`${e.has_unreleased_changes?"●":"○"} ${e.name}`,value:e._id,app:e})),{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{bold:!0,marginBottom:1,children:["Applications (",e.length,")"]}),(0,j.jsx)(b.Ay,{items:n,onSelect:r})]})},C=({app:e,loading:l,error:r,onSelect:n})=>{if(l)return(0,j.jsx)(_,{text:"Loading application..."});if(r)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",r]}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:n})]});if(!e)return(0,j.jsx)(i.Text,{color:"red",children:"Application not found"});var t=[{label:"⚡ Initialize Project",value:"project_init"},...e.short_edit?.enabled&&e.short_edit.ref_map?[{label:"Short Edit",value:"short_edit"}]:[],{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],o=e.devices?.length||0,a=e.devices?.filter(e=>"online"===e.status)?.length||0;return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:e.name}),e.description&&(0,j.jsx)(i.Text,{color:"gray",children:e.description}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"gray",children:["ID: ",e._id]}),e.tags?.length>0&&(0,j.jsxs)(i.Text,{color:"gray",children:["Tags: ",e.tags.join(", ")]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Version"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Current: ",e.current_version?`v${e.current_version}`:"N/A"]}),(0,j.jsxs)(i.Text,{color:e.has_unreleased_changes?"yellow":"gray",children:[" ","Changes:"," ",e.has_unreleased_changes?"● Unreleased changes":"○ No pending changes"]}),e.current_version_details&&(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Released: v",e.current_version_details.version||"N/A"]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Devices"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Total: ",o,o>0&&` (${a} online)`]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Features"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Short Edit: ",e.short_edit?.enabled?"✓ Enabled":"✗ Disabled"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Canvas Control: ",e.canvas_control?.enabled?"✓ Enabled":"✗ Disabled"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Device Control: ",e.device_control?.enabled?"✓ Enabled":"✗ Disabled"]}),(0,j.jsxs)(i.Text,{color:e.lock?.enabled?"yellow":"gray",children:[" ","Lock: ",e.lock?.enabled?"🔒 Locked":"🔓 Unlocked"]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Timestamps"}),e.create_datetime&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Created: ",new Date(e.create_datetime).toLocaleString()]}),e.last_modify_datetime&&(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Modified: ",new Date(e.last_modify_datetime).toLocaleString()]})]})]}),(0,j.jsx)(b.Ay,{items:t,onSelect:n})]})},k=({modules:e,loading:l,onSelect:r})=>{if(l)return(0,j.jsx)(_,{text:"Loading modules..."});var n=[...(e||[]).map(e=>({label:`${e.current_version?"●":"○"} ${e.name}`,value:e._id,module:e})),{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{bold:!0,marginBottom:1,children:["Modules (",e?.length||0,")"]}),!e?.length&&(0,j.jsx)(i.Text,{color:"yellow",children:"No modules found"}),(0,j.jsx)(b.Ay,{items:n,onSelect:r})]})},w=({module:e,loading:l,error:r,onSelect:n})=>{if(l)return(0,j.jsx)(_,{text:"Loading module..."});if(r)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",r]}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:n})]});if(!e)return(0,j.jsx)(i.Text,{color:"red",children:"Module not found"});var t=[{label:"⚡ Initialize Project",value:"project_init"},...e.short_edit?.enabled&&e.short_edit.ref_map?[{label:"Short Edit",value:"short_edit"}]:[],{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:e.name}),e.description&&(0,j.jsx)(i.Text,{color:"gray",children:e.description}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"gray",children:["ID: ",e._id]}),e.tags?.length>0&&(0,j.jsxs)(i.Text,{color:"gray",children:["Tags: ",e.tags.join(", ")]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Version"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Current: ",e.current_version?`v${e.current_version}`:"N/A"]}),(0,j.jsxs)(i.Text,{color:e.has_unreleased_changes?"yellow":"gray",children:[" ","Changes:"," ",e.has_unreleased_changes?"● Unreleased changes":"○ No pending changes"]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Usage"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Used in: ",e.use_count?.total_count||0," application(s)"]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Settings"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Public: ",e.is_public?"✓ Yes":"✗ No"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Modifiable: ",e.is_allow_modify?"✓ Yes":"✗ No"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Short Edit: ",e.short_edit?.enabled?"✓ Enabled":"✗ Disabled"]})]}),e.expose_properties?.length>0&&(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Exposed Properties"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ",e.expose_properties.length," properties exposed"]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Timestamps"}),e.create_datetime&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Created: ",new Date(e.create_datetime).toLocaleString()]}),e.last_modify_datetime&&(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Modified: ",new Date(e.last_modify_datetime).toLocaleString()]})]})]}),(0,j.jsx)(b.Ay,{items:t,onSelect:n})]})},L=({groups:e,loading:l,onSelect:r,countdown:n,lastRefreshTime:t})=>{if(l)return(0,j.jsx)(_,{text:"Loading device groups..."});var o=[...(e||[]).map(e=>({label:`📁 ${e.name} (${e.devices?.length||0} devices)`,value:e._id,group:e})),{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Box,{marginBottom:1,children:[(0,j.jsxs)(i.Text,{bold:!0,children:["Device Groups (",e?.length||0,")"]}),(0,j.jsx)(i.Text,{color:"gray",children:" - "}),(0,j.jsx)(f,{countdown:n,lastRefreshTime:t})]}),!e?.length&&(0,j.jsx)(i.Text,{color:"yellow",children:"No device groups found"}),(0,j.jsx)(b.Ay,{items:o,onSelect:r})]})},P=({loading:e,groupDevices:l})=>e?(0,j.jsx)(_,{text:"Loading devices..."}):l?.length?(0,j.jsxs)(j.Fragment,{children:[l.slice(0,10).map(e=>(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{color:"gray",children:" "}),(0,j.jsx)(y,{lastAliveTime:e.entry_detail?.watch_dog_timer?.last_alive_time}),(0,j.jsxs)(i.Text,{color:"gray",children:[" ",e.name||e.device_name]}),e.device_target_name&&(0,j.jsxs)(i.Text,{color:"gray",dimColor:!0,children:[" ","(",e.device_target_name,")"]})]},e._id)),l.length>10&&(0,j.jsxs)(i.Text,{color:"gray",dimColor:!0,children:[" ","... and ",l.length-10," more"]})]}):(0,j.jsx)(i.Text,{color:"gray",children:" No devices in this group"}),M=({group:e,groupDevices:l,loading:r,error:n,onSelect:t,countdown:o,lastRefreshTime:a})=>{if(r&&!e)return(0,j.jsx)(_,{text:"Loading device group..."});if(n)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",n]}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:t})]});if(!e)return(0,j.jsx)(i.Text,{color:"red",children:"Device group not found"});return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:e.name}),(0,j.jsx)(i.Text,{color:"gray",children:" - "}),(0,j.jsx)(f,{countdown:o,lastRefreshTime:a})]}),e.description&&(0,j.jsx)(i.Text,{color:"gray",children:e.description}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"gray",children:["ID: ",e._id]}),e.tags?.length>0&&(0,j.jsxs)(i.Text,{color:"gray",children:["Tags: ",e.tags.join(", ")]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsxs)(i.Text,{bold:!0,color:"white",children:["Devices (",e.devices?.length||0,")"]}),(0,j.jsx)(P,{loading:r,groupDevices:l})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Timestamps"}),e.create_datetime&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Created: ",new Date(e.create_datetime).toLocaleString()]}),e.last_modify_datetime&&(0,j.jsxs)(i.Text,{color:"gray",children:[" ","Modified: ",new Date(e.last_modify_datetime).toLocaleString()]})]})]}),(0,j.jsx)(b.Ay,{items:[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:t})]})},O=({boxes:e,loading:l,onSelect:r})=>{if(l)return(0,j.jsx)(_,{text:"Loading media boxes..."});if(!e?.length)return(0,j.jsx)(i.Text,{color:"yellow",children:"No media boxes found"});var n=[...e.map(e=>({label:`📦 ${e.name||"Unnamed"}`,value:e.id,box:e})),{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{bold:!0,marginBottom:1,children:["Media Boxes (",e.length,")"]}),(0,j.jsx)(b.Ay,{items:n,onSelect:r})]})},R=({box:e,loading:l,error:r,onSelect:n})=>{if(l&&!e)return(0,j.jsx)(_,{text:"Loading media box..."});if(r)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",r]}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:n})]});if(!e)return(0,j.jsx)(i.Text,{color:"red",children:"Media box not found"});return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:e.name||"Unnamed"}),e.description&&(0,j.jsx)(i.Text,{color:"gray",children:e.description}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"gray",children:["ID: ",e.id]}),e.tags?.length>0&&(0,j.jsxs)(i.Text,{color:"gray",children:["Tags: ",e.tags.join(", ")]}),null!=e.size&&(0,j.jsxs)(i.Text,{color:"gray",children:["Size: ",e.size]}),e.passcodes?.length>0&&(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsxs)(i.Text,{bold:!0,color:"white",children:["Passcodes (",e.passcodes.length,")"]}),e.passcodes.slice(0,5).map(e=>(0,j.jsxs)(i.Text,{color:"gray",children:[" ",e.name||"Passcode",": ",e.code]},e.id)),e.passcodes.length>5&&(0,j.jsxs)(i.Text,{color:"gray",dimColor:!0,children:[" ","... and ",e.passcodes.length-5," more"]})]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Timestamps"}),e.createdAt&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Created: ",new Date(e.createdAt).toLocaleString()]}),e.updatedAt&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Modified: ",new Date(e.updatedAt).toLocaleString()]})]})]}),(0,j.jsx)(b.Ay,{items:[{label:"List Files",value:"files"},{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:n})]})},N=({files:e,loading:l,onSelect:r,box:n})=>{if(l)return(0,j.jsx)(_,{text:"Loading media files..."});if(!e?.length)return(0,j.jsx)(i.Text,{color:"yellow",children:"No media files found"});var t=[...e.map(e=>{return{label:`${l=e.fileType,"Image"===l?"🖼":"Video"===l?"🎞":"Audio"===l?"🎵":"📄"} ${e.name||"Unnamed"}`,value:e.id,file:e};var l}),{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{bold:!0,marginBottom:1,children:["Media Files (",e.length,")",n?.name?` - ${n.name}`:""]}),(0,j.jsx)(b.Ay,{items:t,onSelect:r})]})},U=({file:e,loading:l,error:r,onSelect:n})=>{if(l&&!e)return(0,j.jsx)(_,{text:"Loading media file..."});if(r)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",r]}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:n})]});if(!e)return(0,j.jsx)(i.Text,{color:"red",children:"Media file not found"});var t=e.meta,o=(0,x.Gu)(e),a=(0,x.Gu)(e,{preferThumbnail:!0}),s=Boolean(a&&a!==o);return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:e.name||"Unnamed"}),e.description&&(0,j.jsx)(i.Text,{color:"gray",children:e.description}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"gray",children:["ID: ",e.id]}),(0,j.jsxs)(i.Text,{color:"gray",children:["Box ID: ",e.boxId]}),(0,j.jsxs)(i.Text,{color:"gray",children:["Type: ",e.fileType]}),e.userTags?.length>0&&(0,j.jsxs)(i.Text,{color:"gray",children:["Tags: ",e.userTags.join(", ")]}),null!=t?.originalWidth&&null!=t?.originalHeight&&(0,j.jsxs)(i.Text,{color:"gray",children:["Size: ",t.originalWidth,"x",t.originalHeight]}),null!=t?.originalFileSize&&(0,j.jsxs)(i.Text,{color:"gray",children:["File: ",(Number(t.originalFileSize)/1024).toFixed(1)," KB"]}),o&&(0,j.jsxs)(i.Text,{color:"gray",children:["Original URL: ",o]}),s&&(0,j.jsxs)(i.Text,{color:"gray",children:["Thumbnail URL: ",a]}),(0,j.jsxs)(i.Box,{flexDirection:"column",marginTop:1,children:[(0,j.jsx)(i.Text,{bold:!0,color:"white",children:"Timestamps"}),e.createdAt&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Created: ",new Date(e.createdAt).toLocaleString()]}),e.updatedAt&&(0,j.jsxs)(i.Text,{color:"gray",children:[" Modified: ",new Date(e.updatedAt).toLocaleString()]})]})]}),(0,j.jsx)(b.Ay,{items:[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:n})]})},G=r(29253),F=r(35704),V=["B","C","G","D"],H=({instanceType:e,instance:l,client:r,onDone:n,onCancel:o})=>{var c=(0,i.useApp)().exit,d=(0,t.useState)("select_ref"),x=s(d,2),u=x[0],h=x[1],g=(0,t.useState)(""),m=s(g,2),T=m[0],f=m[1],p=(0,t.useState)("search"),v=s(p,2),y=v[0],D=v[1],E=(0,t.useState)(null),S=s(E,2),I=S[0],A=S[1],B=(0,t.useState)(null),C=s(B,2),k=C[0],w=C[1],L=(0,t.useState)(""),P=s(L,2),M=P[0],O=P[1],R=(0,t.useState)(""),N=s(R,2),U=N[0],H=N[1],$=(0,t.useState)(null),z=s($,2),Y=z[0],X=z[1],J=l?.short_edit?.ref_map||{},W=Object.entries(J).filter(([,e])=>e&&!e.hide),q=(0,F.V)(J,{keyword:T,types:V}),K=q.flatMap(e=>[{label:e.label,value:`__header_${e.prefix}__`,isHeader:!0},...e.refs.map(({shortId:e,ref:l})=>({label:`${l.title||e} (${e})`,value:e,ref:l}))]),Q=[...T?[{label:"↻ Clear Search",value:"__clear_search__"}]:[],{label:"← Back",value:"__back__"}],Z=K.length>0?[...K,...Q]:Q,ee=Z.findIndex(e=>!e.isHeader&&!e.value?.startsWith("__"));(0,i.useInput)((e,l)=>{l.tab&&"select_ref"===u?D(e=>"search"===e?"list":"search"):(l.escape&&("select_ref"===u&&o(),"input_path"===u&&h("select_ref"),"input_content"===u&&h("input_path"),"confirm"===u&&h("input_content"),"done"===u&&o()),"q"!==e||("input_path"===u||"input_content"===u)||"select_ref"===u&&"search"===y||c())},{isActive:!0});var le,re=e=>{var l=e.trim();if(""===l)return null;try{return JSON.parse(l)}catch{return l}},ne=(le=a(function*(){if(r&&l?._id&&I){h("submitting"),X(null);try{var t={shortId:I,path:M.trim(),content:re(U),forwardDataLink:!0};k?.inner_ref?.pid&&(t.innerRefParentShortId=k.inner_ref.pid),"application"===e?yield r.shortEditApplication({id:l._id,list:[t]}):yield r.shortEditModule({id:l._id,list:[t]}),yield n(),h("done")}catch(e){X(e.message),h("confirm")}}}),function(){return le.apply(this,arguments)});return l?.short_edit?.enabled?0===W.length?(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{color:"yellow",children:"No Short Edit references found."}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:o})]}):"select_ref"===u?(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,children:"Short Edit References"}),(0,j.jsx)(i.Text,{color:"gray",dimColor:!0,children:"Showing: Brick, Canvas, Generator, Data"}),(0,j.jsxs)(i.Box,{marginTop:1,flexDirection:"column",children:[(0,j.jsx)(i.Text,{color:"gray",children:"Search (title or shortId)"}),(0,j.jsx)(G.A,{value:T,placeholder:"type to filter, Enter to focus list",onChange:e=>f(e),onSubmit:()=>D("list"),focus:"search"===y}),(0,j.jsx)(i.Text,{color:"gray",dimColor:!0,children:"Press Tab to switch focus"})]}),(0,j.jsxs)(i.Box,{marginTop:1,children:[0===q.length&&(0,j.jsx)(i.Text,{color:"yellow",children:"No references match your search."}),(0,j.jsx)(b.Ay,{items:Z,isFocused:"list"===y,initialIndex:ee>-1?ee:0,indicatorComponent:()=>null,itemComponent:({label:e,isSelected:l,isHeader:r})=>r?(0,j.jsx)(i.Box,{marginTop:1,children:(0,j.jsx)(i.Text,{bold:!0,color:"white",children:e})}):(0,j.jsxs)(i.Text,{color:l?"blue":void 0,children:[l?"❯":" "," ",e]}),onSelect:e=>{if("__back__"!==e.value)return"__clear_search__"===e.value?(f(""),void D("search")):void(e.isHeader||(A(e.value),w(e.ref),h("input_path")));o()}})]})]}):"input_path"===u?(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{children:["Reference:"," ",(0,j.jsxs)(i.Text,{color:"cyan",children:[k?.title||I," (",I,")"]})]}),(0,j.jsx)(i.Text,{marginTop:1,children:"Enter property path (e.g. title, property.backgroundColor)"}),Y&&(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",Y]}),(0,j.jsx)(G.A,{value:M,placeholder:"path",onChange:e=>{O(e),Y&&X(null)},onSubmit:e=>{var l=e.trim();l?(O(l),h("input_content")):X("Path is required")},focus:!0})]}):"input_content"===u?(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{children:["Path: ",(0,j.jsx)(i.Text,{color:"cyan",children:M})]}),(0,j.jsx)(i.Text,{marginTop:1,children:"Enter new content (JSON or plain text). Empty to clear."}),Y&&(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",Y]}),(0,j.jsx)(G.A,{value:U,placeholder:"content",onChange:e=>{H(e),Y&&X(null)},onSubmit:()=>h("confirm"),focus:!0})]}):"submitting"===u?(0,j.jsx)(_,{text:"Applying short edit..."}):"done"===u?(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{color:"green",children:"Short edit applied successfully."}),(0,j.jsx)(b.Ay,{items:[{label:"Edit another property",value:"again"},{label:"← Back",value:"back"}],onSelect:e=>{"again"===e.value?(h("select_ref"),A(null),w(null),O(""),H(""),X(null)):o()}})]}):(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,marginBottom:1,children:"Confirm Short Edit"}),(0,j.jsxs)(i.Text,{children:["Reference:"," ",(0,j.jsxs)(i.Text,{color:"cyan",children:[k?.title||I," (",I,")"]})]}),(0,j.jsxs)(i.Text,{children:["Path: ",(0,j.jsx)(i.Text,{color:"cyan",children:M})]}),(0,j.jsxs)(i.Text,{children:["Content: ",(0,j.jsx)(i.Text,{color:"cyan",children:U||"<empty>"})]}),Y&&(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",Y]}),(0,j.jsx)(b.Ay,{items:[{label:"Apply",value:"apply"},{label:"Edit Path",value:"edit_path"},{label:"Edit Content",value:"edit_content"},{label:"← Back",value:"back"}],onSelect:e=>{"apply"===e.value&&ne(),"edit_path"===e.value&&h("input_path"),"edit_content"===e.value&&h("input_content"),"back"===e.value&&o()}})]}):(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{color:"yellow",children:["Short Edit is not enabled for this ",e,"."]}),(0,j.jsx)(b.Ay,{items:[{label:"← Back",value:"back"}],onSelect:o})]})},$=r(16928),z=r(79896),Y=r(35317),X=r(10750),J="options",W="output_dir",q="confirm",K="generating",Q="post_install",Z="done",ee=e=>{try{return(0,Y.execSync)(`which ${e}`,{stdio:"ignore"}),!0}catch{return!1}},le=(e,l,r)=>new Promise((n,t)=>{var i=[e,...l].join(" "),o=(0,Y.spawn)(i,[],{cwd:r,stdio:"pipe",shell:!0});o.on("close",e=>{0===e?n():t(new Error(`Command failed with code ${e}`))}),o.on("error",t)}),re=(n=a(function*(e,l){try{var n=(yield Promise.resolve().then(r.bind(r,79491))).format;return(yield n(l,e,{trailingComma:"all",tabWidth:2,semi:!1,singleQuote:!0,printWidth:100})).code}catch{}return e}),function(e,l){return n.apply(this,arguments)}),ne=({type:e,instance:l,client:r,onDone:n,onCancel:o})=>{var c,d=(0,i.useApp)().exit,x=(0,t.useState)(J),u=s(x,2),h=u[0],g=u[1],T=(0,t.useState)({setupGitHubActions:!0,setupAgents:!0,setupClaudeCode:!0,setupGeminiCLI:!1,runBunInstall:!0,initGit:!0}),f=s(T,2),p=f[0],v=f[1],_=(0,t.useState)(process.cwd()),y=s(_,2),D=y[0],E=y[1],S=(0,t.useState)(""),I=s(S,2),A=I[0],B=I[1],C=(0,t.useState)(null),k=s(C,2),w=k[0],L=k[1],P=(0,t.useState)(null),M=s(P,2),O=M[0],R=M[1],N=X(l?.name||"bricks-ctor"),U=$.resolve(D,N),F=(0,t.useCallback)(e=>{"back"!==e.value?"continue"!==e.value?v(l=>({...l,[e.value]:!l[e.value]})):g(W):o()},[o]),V=(0,t.useCallback)(()=>{z.existsSync(U)?L(`Directory already exists: ${U}`):(L(null),g(q))},[U]),H=(0,t.useCallback)((c=a(function*(n){var t;if("back"!==n.value)if("cancel"!==n.value){if("confirm"===n.value){g(K);try{B("Fetching project from BRICKS...");var i="application"===e,s=i?"UNSTABLE_applicationProject":"UNSTABLE_moduleProject",c=i?r.queries.applicationProject:r.queries.moduleProject,d=(yield r.query(c,{id:l._id,buildApplicationOnly:!1,setupGitHubActions:p.setupGitHubActions,setupAgents:p.setupAgents,setupClaudeCode:p.setupClaudeCode,setupGeminiCLI:p.setupGeminiCLI}))[s];if(!d?.files)throw new Error("Failed to fetch project files");B("Creating project directory..."),z.mkdirSync(U,{recursive:!0}),B(`Writing ${d.files.length} files...`);var x=yield Promise.all(d.files.map((t=a(function*(e){var l=$.join(U,e.name),r=e.input;return e.formatable&&(r=yield re(r,l)),{...e,filePath:l,content:r}}),function(e){return t.apply(this,arguments)})));x.forEach(e=>{var l=$.dirname(e.filePath);z.existsSync(l)||z.mkdirSync(l,{recursive:!0}),z.writeFileSync(e.filePath,e.content)}),g(Q);var u={path:U,files:d.files.length,bunInstalled:!1,gitInitialized:!1};if(p.runBunInstall&&ee("bun")){B("Installing dependencies (bun install)...");try{yield le("bun",["install"],U),u.bunInstalled=!0}catch{}}if(p.initGit&&ee("git")){B("Initializing git repository...");try{yield le("git",["init"],U),yield le("git",["add","."],U),yield le("git",["-c 'user.name=BRICKS CLI'","-c 'user.email=cli@bricks.tools'","commit","-m 'chore: initialize commit'"],U),u.gitInitialized=!0}catch{}}R(u),g(Z)}catch(e){L(e.message),g(J)}}}else o();else g(W)}),function(e){return c.apply(this,arguments)}),[r,l,e,p,U,o]),Y=(0,t.useCallback)(e=>{"exit"===e.value?d():n()},[d,n]);if(h===J){var ne=[{label:(p.setupGitHubActions?"[x]":"[ ]")+" GitHub Actions workflow",value:"setupGitHubActions"},{label:(p.setupAgents?"[x]":"[ ]")+" AGENTS.md",value:"setupAgents"},{label:(p.setupClaudeCode?"[x]":"[ ]")+" CLAUDE.md",value:"setupClaudeCode"},{label:(p.setupGeminiCLI?"[x]":"[ ]")+" GEMINI.md",value:"setupGeminiCLI"},{label:(p.runBunInstall?"[x]":"[ ]")+" Run bun install after generation",value:"runBunInstall"},{label:(p.initGit?"[x]":"[ ]")+" Initialize git repository",value:"initGit"},{label:"→ Continue",value:"continue"},{label:"← Back",value:"back"}];return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsxs)(i.Text,{bold:!0,color:"cyan",children:["Initialize BRICKS Project: ",l?.name||"Untitled"]}),(0,j.jsx)(i.Text,{color:"gray",marginBottom:1,children:"Select options for project generation (press Enter to toggle)"}),w&&(0,j.jsxs)(i.Text,{color:"red",marginBottom:1,children:["Error: ",w]}),(0,j.jsx)(b.Ay,{items:ne,onSelect:F})]})}if(h===W)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:"Output Directory"}),(0,j.jsx)(i.Text,{color:"gray",marginBottom:1,children:"Enter the parent directory for the project:"}),w&&(0,j.jsx)(i.Text,{color:"red",marginBottom:1,children:w}),(0,j.jsxs)(i.Box,{children:[(0,j.jsx)(i.Text,{children:"Directory: "}),(0,j.jsx)(G.A,{value:D,onChange:E,onSubmit:V})]}),(0,j.jsxs)(i.Text,{color:"gray",marginTop:1,children:["Project will be created at: ",U]})]});if(h===q){return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:"Confirm Project Generation"}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Text,{children:["Name: ",(0,j.jsx)(i.Text,{color:"green",children:l?.name||"Untitled"})]}),(0,j.jsxs)(i.Text,{children:["Type: ",(0,j.jsx)(i.Text,{color:"yellow",children:e})]}),(0,j.jsxs)(i.Text,{children:["Path: ",(0,j.jsx)(i.Text,{color:"cyan",children:U})]}),(0,j.jsx)(i.Text,{color:"gray",marginTop:1,children:"Options:"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" - GitHub Actions: ",p.setupGitHubActions?"Yes":"No"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" - AGENTS.md: ",p.setupAgents?"Yes":"No"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" - CLAUDE.md: ",p.setupClaudeCode?"Yes":"No"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" - GEMINI.md: ",p.setupGeminiCLI?"Yes":"No"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" - Run bun install: ",p.runBunInstall?"Yes":"No"]}),(0,j.jsxs)(i.Text,{color:"gray",children:[" - Initialize git: ",p.initGit?"Yes":"No"]})]}),(0,j.jsx)(b.Ay,{items:[{label:"Confirm & Generate",value:"confirm"},{label:"← Change Directory",value:"back"},{label:"Cancel",value:"cancel"}],onSelect:H})]})}if(h===K||h===Q)return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"cyan",children:"Generating Project..."}),(0,j.jsxs)(i.Box,{marginY:1,children:[(0,j.jsx)(i.Text,{color:"green",children:(0,j.jsx)(m.A,{type:"dots"})}),(0,j.jsxs)(i.Text,{children:[" ",A]})]})]});if(h===Z&&O){return(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(i.Text,{bold:!0,color:"green",children:"Project initialized successfully!"}),(0,j.jsxs)(i.Box,{marginY:1,flexDirection:"column",children:[(0,j.jsxs)(i.Text,{children:["Path: ",(0,j.jsx)(i.Text,{color:"cyan",children:O.path})]}),(0,j.jsxs)(i.Text,{children:["Files: ",(0,j.jsx)(i.Text,{color:"green",children:O.files})]}),(0,j.jsxs)(i.Text,{children:["Dependencies:"," ",(0,j.jsx)(i.Text,{color:O.bunInstalled?"green":"yellow",children:O.bunInstalled?"Installed":"Not installed (run bun install manually)"})]}),(0,j.jsxs)(i.Text,{children:["Git:"," ",(0,j.jsx)(i.Text,{color:O.gitInitialized?"green":"yellow",children:O.gitInitialized?"Initialized":"Not initialized"})]})]}),(0,j.jsx)(i.Text,{bold:!0,marginY:1,children:"Next steps:"}),(0,j.jsxs)(i.Text,{color:"gray",children:[" cd ",N]}),!O.bunInstalled&&(0,j.jsx)(i.Text,{color:"gray",children:" bun install"}),(0,j.jsx)(i.Text,{color:"gray",children:" bun preview"}),(0,j.jsxs)(i.Text,{color:"gray",marginTop:1,children:["For more information, see ",N,"/README.md"]}),(0,j.jsx)(i.Box,{marginTop:1,children:(0,j.jsx)(b.Ay,{items:[{label:"← Back to Detail",value:"back"},{label:"Exit CLI",value:"exit"}],onSelect:Y})})]})}return null};const te=()=>{var e=(0,i.useApp)().exit,l=(0,t.useState)(u.MAIN),r=s(l,2),n=r[0],o=r[1],h=(0,t.useState)(null),g=s(h,2),m=g[0],f=g[1],y=(0,t.useState)(null),b=s(y,2),P=b[0],G=b[1],F=(0,t.useState)(!0),V=s(F,2),$=V[0],z=V[1],Y=(0,t.useState)(null),X=s(Y,2),J=X[0],W=X[1],q=(0,t.useState)([]),K=s(q,2),Q=K[0],Z=K[1],ee=(0,t.useState)(null),le=s(ee,2),re=le[0],te=le[1],ie=(0,t.useState)([]),oe=s(ie,2),ae=oe[0],se=oe[1],ce=(0,t.useState)(null),de=s(ce,2),xe=de[0],ue=de[1],he=(0,t.useState)([]),ge=s(he,2),me=ge[0],je=ge[1],Te=(0,t.useState)(null),fe=s(Te,2),pe=fe[0],ve=fe[1],_e=(0,t.useState)([]),ye=s(_e,2),be=ye[0],De=ye[1],Ee=(0,t.useState)(null),Se=s(Ee,2),Ie=Se[0],Ae=Se[1],Be=(0,t.useState)([]),Ce=s(Be,2),ke=Ce[0],we=Ce[1],Le=(0,t.useState)(!1),Pe=s(Le,2),Me=Pe[0],Oe=Pe[1],Re=(0,t.useState)(null),Ne=s(Re,2),Ue=Ne[0],Ge=Ne[1],Fe=(0,t.useState)(null),Ve=s(Fe,2),He=Ve[0],$e=Ve[1],ze=(0,t.useState)(null),Ye=s(ze,2),Xe=Ye[0],Je=Ye[1],We=(0,t.useState)(null),qe=s(We,2),Ke=qe[0],Qe=qe[1],Ze=(0,t.useState)([]),el=s(Ze,2),ll=el[0],rl=el[1],nl=(0,t.useState)(null),tl=s(nl,2),il=tl[0],ol=tl[1],al=(0,t.useState)([]),sl=s(al,2),cl=sl[0],dl=sl[1],xl=(0,t.useState)(null),ul=s(xl,2),hl=ul[0],gl=ul[1],ml=n===u.DEVICES,jl=n===u.DEVICE_DETAIL,Tl=n===u.GROUPS,fl=n===u.GROUP_DETAIL;(0,t.useEffect)(()=>{var e=(0,d.getCurrentProfile)(),l=(0,d.getToken)(e);if(!l)return W("Not logged in. Run `bricks auth login` first."),void z(!1);var r=(0,c.createClient)((0,d.getBaseUrl)(),l);f(r),r.workspace().then(e=>{G(e),z(!1)}).catch(e=>{W(e.message),z(!1)})},[]),(0,i.useInput)((l,r)=>{"q"===l&&e(),r.escape&&(n===u.DEVICE_CONTROL?(o(u.DEVICE_DETAIL),Ge(null)):n===u.DEVICE_SCREENSHOT?(o(u.DEVICE_DETAIL),Je(null),Qe(null)):n===u.DEVICE_DETAIL?(o(u.DEVICES),te(null)):n===u.APP_DETAIL?(o(u.APPS),ue(null)):n===u.MODULE_DETAIL?(o(u.MODULES),ve(null)):n===u.GROUP_DETAIL?(o(u.GROUPS),Ae(null),we([])):n===u.MEDIA_FILE_DETAIL?(o(u.MEDIA_FILES),gl(null)):n===u.MEDIA_FILES?(o(u.MEDIA_BOX_DETAIL),gl(null)):n===u.MEDIA_BOX_DETAIL?(o(u.MEDIA_BOXES),ol(null),dl([])):(n===u.MEDIA_BOXES||n!==u.MAIN)&&o(u.MAIN))},{isActive:n!==u.APP_SHORT_EDIT&&n!==u.MODULE_SHORT_EDIT&&n!==u.APP_PROJECT_INIT&&n!==u.MODULE_PROJECT_INIT});var pl,vl,_l,yl,bl,Dl,El,Sl,Il=(0,t.useCallback)(a(function*(){if(m){z(!0);try{var e=yield m.devices({});Z(e||[])}catch(e){W(e.message)}z(!1)}}),[m]),Al=(0,t.useCallback)((pl=a(function*(e){if(m){z(!0),$e(null);try{var l=yield m.device({id:e});te(l)}catch(e){$e(e.message)}z(!1)}}),function(e){return pl.apply(this,arguments)}),[m]),Bl=(0,t.useCallback)(a(function*(){if(m){z(!0);try{var e=yield m.applications({});se(e||[])}catch(e){W(e.message)}z(!1)}}),[m]),Cl=(0,t.useCallback)((vl=a(function*(e){if(m){z(!0),$e(null);try{var l=yield m.application({id:e});ue(l)}catch(e){$e(e.message)}z(!1)}}),function(e){return vl.apply(this,arguments)}),[m]),kl=(0,t.useCallback)(a(function*(){if(m){z(!0);try{var e=yield m.modules({});je(e||[])}catch(e){W(e.message)}z(!1)}}),[m]),wl=(0,t.useCallback)((_l=a(function*(e){if(m){z(!0),$e(null);try{var l=yield m.module({id:e});ve(l)}catch(e){$e(e.message)}z(!1)}}),function(e){return _l.apply(this,arguments)}),[m]),Ll=(0,t.useCallback)(a(function*(){if(m){z(!0);try{var e=yield m.deviceGroups({});De(e||[])}catch(e){W(e.message)}z(!1)}}),[m]),Pl=(0,t.useCallback)((yl=a(function*(e){if(m){z(!0),$e(null);try{var l=yield Promise.all([m.deviceGroup({id:e}),m.devicesByGroup({id:e})]),r=s(l,2),n=r[0],t=r[1];Ae(n),we(t||[])}catch(e){$e(e.message)}z(!1)}}),function(e){return yl.apply(this,arguments)}),[m]),Ml=(0,t.useCallback)(a(function*(){if(m){z(!0);try{var e=yield m.mediaBoxes();rl(e||[])}catch(e){W(e.message)}z(!1)}}),[m]),Ol=(0,t.useCallback)((bl=a(function*(e){if(m){z(!0),$e(null);try{var l=yield m.mediaBox({id:e});ol(l)}catch(e){$e(e.message)}z(!1)}}),function(e){return bl.apply(this,arguments)}),[m]),Rl=(0,t.useCallback)((Dl=a(function*(e){if(m){z(!0);try{var l=yield m.mediaFiles({boxId:e});dl(l||[])}catch(e){W(e.message)}z(!1)}}),function(e){return Dl.apply(this,arguments)}),[m]),Nl=(0,t.useCallback)((El=a(function*(e){if(m){z(!0),$e(null);try{var l=yield m.mediaFile({id:e});gl(l)}catch(e){$e(e.message)}z(!1)}}),function(e){return El.apply(this,arguments)}),[m]),Ul=(0,t.useCallback)((Sl=a(function*(e){if(m&&re){Oe(!0),Ge(null);try{yield m.controlDevice({id:re._id,type:e}),Ge({success:!0,message:`Command sent: ${e}`})}catch(e){Ge({success:!1,message:e.message})}Oe(!1)}}),function(e){return Sl.apply(this,arguments)}),[m,re]),Gl=(0,t.useCallback)(a(function*(e=!1){if(m&&re&&P){z(!0),Qe(null),Je(null);try{e&&(yield m.controlDevice({id:re._id,type:"take-screenshot"}),yield new Promise(e=>setTimeout(e,3e3)));var l=yield(0,x.he)(m,P,re._id,null,{preferThumbnail:!0});l.error?Qe(l.error):Je(l)}catch(e){Qe(e.message)}z(!1)}}),[m,re,P]),Fl=T((0,t.useCallback)(()=>{m&&Il()},[m,Il]),ml),Vl=T((0,t.useCallback)(()=>{m&&re&&Al(re._id)},[m,re,Al]),jl),Hl=T((0,t.useCallback)(()=>{m&&Ll()},[m,Ll]),Tl),$l=T((0,t.useCallback)(()=>{m&&Ie&&Pl(Ie._id)},[m,Ie,Pl]),fl);return $&&!P?(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(p,{workspace:P,view:n}),(0,j.jsx)(_,{text:"Connecting to workspace..."})]}):J&&!P?(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(p,{workspace:P,view:n}),(0,j.jsxs)(i.Text,{color:"red",children:["Error: ",J]}),(0,j.jsx)(v,{})]}):(0,j.jsxs)(i.Box,{flexDirection:"column",children:[(0,j.jsx)(p,{workspace:P,view:n}),n===u.MAIN&&(0,j.jsx)(D,{onSelect:l=>{"exit"!==l.value?(o(l.value),l.value===u.DEVICES?Il():l.value===u.APPS?Bl():l.value===u.MODULES?kl():l.value===u.GROUPS?Ll():l.value===u.MEDIA_BOXES&&Ml()):e()},mediaEnabled:(0,x.wR)(P)}),n===u.DEVICES&&(0,j.jsx)(E,{devices:Q,loading:$,onSelect:e=>{if("back"!==e.value){if("refresh"===e.value)return Il(),void Fl.resetCountdown();te(null),z(!0),o(u.DEVICE_DETAIL),Al(e.value)}else o(u.MAIN)},countdown:Fl.countdown,lastRefreshTime:Fl.lastRefreshTime}),n===u.DEVICE_DETAIL&&(0,j.jsx)(S,{device:re,loading:$,error:He,onSelect:e=>"back"===e.value?(o(u.DEVICES),void te(null)):"refresh"===e.value?(Al(re._id),void Vl.resetCountdown()):("control"===e.value&&(o(u.DEVICE_CONTROL),Ge(null)),void("screenshot"===e.value&&(o(u.DEVICE_SCREENSHOT),Je(null),Qe(null),Gl(!1)))),mediaEnabled:(0,x.wR)(P),countdown:Vl.countdown,lastRefreshTime:Vl.lastRefreshTime}),n===u.DEVICE_CONTROL&&(0,j.jsx)(I,{device:re,onSelect:e=>{if("back"===e.value)return o(u.DEVICE_DETAIL),void Ge(null);Ul(e.value)},controlling:Me,controlResult:Ue}),n===u.DEVICE_SCREENSHOT&&(0,j.jsx)(A,{device:re,screenshot:Xe,loading:$,error:Ke,onSelect:e=>{if("back"===e.value)return o(u.DEVICE_DETAIL),Je(null),void Qe(null);"refresh"!==e.value?"take"===e.value&&Gl(!0):Gl(!1)}}),n===u.APPS&&(0,j.jsx)(B,{apps:ae,loading:$,onSelect:e=>{"back"!==e.value?"refresh"!==e.value?(ue(null),z(!0),o(u.APP_DETAIL),Cl(e.value)):Bl():o(u.MAIN)}}),n===u.APP_DETAIL&&(0,j.jsx)(C,{app:xe,loading:$,error:He,onSelect:e=>{if("back"===e.value)return o(u.APPS),void ue(null);"refresh"!==e.value?("short_edit"===e.value&&(o(u.APP_SHORT_EDIT),$e(null)),"project_init"===e.value&&(o(u.APP_PROJECT_INIT),$e(null))):Cl(xe._id)}}),n===u.APP_SHORT_EDIT&&(0,j.jsx)(H,{instanceType:"application",instance:xe,client:m,onDone:a(function*(){return Cl(xe._id)}),onCancel:()=>o(u.APP_DETAIL)}),n===u.APP_PROJECT_INIT&&(0,j.jsx)(ne,{type:"application",instance:xe,client:m,onDone:()=>o(u.APP_DETAIL),onCancel:()=>o(u.APP_DETAIL)}),n===u.MODULES&&(0,j.jsx)(k,{modules:me,loading:$,onSelect:e=>{"back"!==e.value?"refresh"!==e.value?(ve(null),z(!0),o(u.MODULE_DETAIL),wl(e.value)):kl():o(u.MAIN)}}),n===u.MODULE_DETAIL&&(0,j.jsx)(w,{module:pe,loading:$,error:He,onSelect:e=>{if("back"===e.value)return o(u.MODULES),void ve(null);"refresh"!==e.value?("short_edit"===e.value&&(o(u.MODULE_SHORT_EDIT),$e(null)),"project_init"===e.value&&(o(u.MODULE_PROJECT_INIT),$e(null))):wl(pe._id)}}),n===u.MODULE_SHORT_EDIT&&(0,j.jsx)(H,{instanceType:"module",instance:pe,client:m,onDone:a(function*(){return wl(pe._id)}),onCancel:()=>o(u.MODULE_DETAIL)}),n===u.MODULE_PROJECT_INIT&&(0,j.jsx)(ne,{type:"module",instance:pe,client:m,onDone:()=>o(u.MODULE_DETAIL),onCancel:()=>o(u.MODULE_DETAIL)}),n===u.GROUPS&&(0,j.jsx)(L,{groups:be,loading:$,onSelect:e=>{if("back"!==e.value){if("refresh"===e.value)return Ll(),void Hl.resetCountdown();Ae(null),we([]),z(!0),o(u.GROUP_DETAIL),Pl(e.value)}else o(u.MAIN)},countdown:Hl.countdown,lastRefreshTime:Hl.lastRefreshTime}),n===u.GROUP_DETAIL&&(0,j.jsx)(M,{group:Ie,groupDevices:ke,loading:$,error:He,onSelect:e=>{if("back"===e.value)return o(u.GROUPS),Ae(null),void we([]);"refresh"===e.value&&(Pl(Ie._id),$l.resetCountdown())},countdown:$l.countdown,lastRefreshTime:$l.lastRefreshTime}),n===u.MEDIA_BOXES&&(0,j.jsx)(O,{boxes:ll,loading:$,onSelect:e=>{"back"!==e.value?"refresh"!==e.value?(ol(null),dl([]),z(!0),o(u.MEDIA_BOX_DETAIL),Ol(e.value)):Ml():o(u.MAIN)}}),n===u.MEDIA_BOX_DETAIL&&(0,j.jsx)(R,{box:il,loading:$,error:He,onSelect:e=>{if("back"===e.value)return o(u.MEDIA_BOXES),ol(null),void dl([]);"refresh"!==e.value?"files"===e.value&&(dl([]),gl(null),o(u.MEDIA_FILES),Rl(il.id)):Ol(il.id)}}),n===u.MEDIA_FILES&&(0,j.jsx)(N,{files:cl,box:il,loading:$,onSelect:e=>{if("back"===e.value)return o(u.MEDIA_BOX_DETAIL),void gl(null);"refresh"!==e.value?(gl(null),z(!0),o(u.MEDIA_FILE_DETAIL),Nl(e.value)):Rl(il.id)}}),n===u.MEDIA_FILE_DETAIL&&(0,j.jsx)(U,{file:hl,loading:$,error:He,onSelect:e=>{if("back"===e.value)return o(u.MEDIA_FILES),void gl(null);"refresh"===e.value&&Nl(hl.id)}}),(0,j.jsx)(v,{})]})};var ie=()=>{(0,i.render)((0,j.jsx)(o.TerminalInfoProvider,{children:(0,j.jsx)(te,{})}))}}};
package/lib/890.js CHANGED
@@ -1 +1 @@
1
- export const __webpack_esm_id__=890;export const __webpack_esm_ids__=[890];export const __webpack_esm_modules__={38890:(e,r,a)=>{const{getDocByTemplateKey:t}=a(63981),i=a(80211),n=a(45907),{getBrickName:o}=a(86343);r.checkConfigDeprecatedFeatures=e=>{const r=[];return Object.entries(e.subspace_map||{}).forEach(([e,a])=>{Object.entries(a.brick_map||{}).forEach(([i,n])=>{void 0===n.property?.borderLeftWidth&&void 0===n.property?.borderRightWidth&&void 0===n.property?.borderTopWidth&&void 0===n.property?.borderBottomWidth||r.push({id:i,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${o("brick",n,i)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});const s=t(n.template_key);s?.brickMeta?.deprecated&&r.push({id:i,name:"Used Deprecated Feature",data:`The \`${o("brick",n,i)}\` brick in \`${o("subspace",a,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})}),Object.entries(a.generator_map||{}).forEach(([i,n])=>{const s=t(n.template_key);s?.brickMeta?.deprecated&&r.push({id:i,name:"Used Deprecated Feature",data:`The \`${o("brick",n,i)}\` brick in \`${o("subspace",a,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})})}),r},r.checkConfig=e=>{const r={schema:i(e),ref:n(e)};return r.valid=0===r.schema.length&&0===r.ref.length,r.message=r.schema.concat(r.ref).map(({dataPath:e,field:r,message:a})=>`${e||r}: ${a}`).join("\n"),r}},86343:(e,r,a)=>{const{v4:t}=a(23502),i=a(95479),{nameMap:n,brickMapping:o,generatorMapping:s}=a(63981);r.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,r.getAnimationType=e=>e.type||e.compose_type||e.composeType,r.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[r,a])=>((a.type||a.compose_type)&&(e[r]=a),e),{}),r.matchItemByItem=(e,r)=>{if(!e)return!1;let a;switch("string"==typeof r&&(a=r),e.type){case"brick":return e.brick_id===(a||r.brick_id);case"subspace":return e.subspace_id===(a||r.subspace_id);case"canvas":return e.canvas_id===(a||r.canvas_id);case"generator":return e.generator_id===(a||r.generator_id);case"property_bank":return e.property_bank_id===(a||r.property_bank_id);default:return!1}},r.makePasscode=()=>t(),r.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","binary-asset"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},r.getKindOneOfTypes=(e,a)=>"array"===e?"object"===a?r.kindOneOfTypes[`${e}-${a}`]:void 0:r.kindOneOfTypes[e],r.unitOneOfTypes=["grid","px","ms"],r.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],r.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},r.getBrickName=(e,a,t)=>{if(!a)return e.toUpperCase();if(a.title)return a.title;let o;switch(e){case"bank":o="BANK";break;case"subspace":o="SUBSPACE";break;case"canvas":o="CANVAS";break;case"animation":o=`<${i(r.getAnimationType(a))}>`;break;case"property_bank":o="<Data>";break;case"property_bank_calc":o="<Map>";break;case"state_group":o="<Switch Case>";break;default:o=`<${n[a.template_key||a.templateKey]||"Unknown"}>`}return t&&t.length>10?o+=` (${t.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:t&&(o+=` (${t})`),o},r.getCallInternalActions=e=>{const r=o[e]||s[e];if(r)return r.callInternalActions},r.mapToList=(e,a)=>Object.entries(a).reduce((a,[t,i])=>(a.push({id:t,...i,title:r.getBrickName(e,i,t)}),a),[]);const p={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},c={};r.mapToListForDerivedState=(e,a,t,i)=>{const n=t[e]||c;return n!==i[e]?{[e]:n,[a]:r.mapToList(p[e],n)}:{}},r.arrayTypePrefix="array of ",r.propertyBankTypes=["string","number","bool","object","any",`${r.arrayTypePrefix}string`,`${r.arrayTypePrefix}number`,`${r.arrayTypePrefix}bool`,`${r.arrayTypePrefix}object`],r.animationRunTypes=["once","loop"],r.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},r.nestedTypes=["object","array","any"],r.isPropertyBankTypeNested=e=>r.nestedTypes.includes(e),r.propertyTypeToSchema=e=>{const a=e.indexOf(r.arrayTypePrefix)>-1,t=e.replace(r.arrayTypePrefix,"");return{type:t,properties:"object"===t?{}:void 0,allowNewItem:a,allowCustomProperty:"object"===t}}}};
1
+ export const __webpack_esm_id__=890;export const __webpack_esm_ids__=[890];export const __webpack_esm_modules__={38890:(e,r,a)=>{const{getDocByTemplateKey:t}=a(63981),i=a(80211),n=a(45907),{getBrickName:o}=a(86343);r.checkConfigDeprecatedFeatures=e=>{const r=[];return Object.entries(e.subspace_map||{}).forEach(([e,a])=>{Object.entries(a.brick_map||{}).forEach(([i,n])=>{void 0===n.property?.borderLeftWidth&&void 0===n.property?.borderRightWidth&&void 0===n.property?.borderTopWidth&&void 0===n.property?.borderBottomWidth||r.push({id:i,name:"Used Deprecated Feature",data:`In v2.16, we have been changed \`Border Width\` to \`Border Size\` (Unit \`px\` to \`grid\`). The \`${o("brick",n,i)}\` brick still used the border width. Please re-edit it to transfer to the new unit.`});const s=t(n.template_key);s?.brickMeta?.deprecated&&r.push({id:i,name:"Used Deprecated Feature",data:`The \`${o("brick",n,i)}\` brick in \`${o("subspace",a,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})}),Object.entries(a.generator_map||{}).forEach(([i,n])=>{const s=t(n.template_key);s?.brickMeta?.deprecated&&r.push({id:i,name:"Used Deprecated Feature",data:`The \`${o("brick",n,i)}\` brick in \`${o("subspace",a,e)}\` have been deprecated, it may not work in the future, please consider to remove it. If you can't see the item, please enable \`Show Deprecated Features\` in setting.`})})}),r},r.checkConfig=e=>{const r={schema:i(e),ref:n(e)};return r.valid=0===r.schema.length&&0===r.ref.length,r.message=r.schema.concat(r.ref).map(({dataPath:e,field:r,message:a})=>`${e||r}: ${a}`).join("\n"),r}},86343:(e,r,a)=>{const{v4:t}=a(79194),i=a(95479),{nameMap:n,brickMapping:o,generatorMapping:s}=a(63981);r.idByItem=(e={})=>e.canvas_id||e.subspace_id||e.brick_id||e.generator_id||e.property_bank_id||e.property_bank_calc_id||e.bank_id||e.scene_id,r.getAnimationType=e=>e.type||e.compose_type||e.composeType,r.cleanUpAnimationMap=e=>Object.entries(e).reduce((e,[r,a])=>((a.type||a.compose_type)&&(e[r]=a),e),{}),r.matchItemByItem=(e,r)=>{if(!e)return!1;let a;switch("string"==typeof r&&(a=r),e.type){case"brick":return e.brick_id===(a||r.brick_id);case"subspace":return e.subspace_id===(a||r.subspace_id);case"canvas":return e.canvas_id===(a||r.canvas_id);case"generator":return e.generator_id===(a||r.generator_id);case"property_bank":return e.property_bank_id===(a||r.property_bank_id);default:return!1}},r.makePasscode=()=>t(),r.kindOneOfTypes={string:["color","datetime","id","graphql","rich-text-content","sandbox-script","llm-prompt","media-resource-image","media-resource-video","media-resource-audio","media-resource-file","lottie-file-uri","rive-file-uri","ggml-model-asset","gguf-model-asset","binary-asset"],number:["unit"],object:["tts-speaker-config"],"array-object":["llm-tools","llm-messages","mcp-server-resources","mcp-server-tools","mcp-server-prompts"]},r.getKindOneOfTypes=(e,a)=>"array"===e?"object"===a?r.kindOneOfTypes[`${e}-${a}`]:void 0:r.kindOneOfTypes[e],r.unitOneOfTypes=["grid","px","ms"],r.idOneOfTypes=["canvas","brick","generator","animation","property_bank"],r.typeToName={brick:"Brick",generator:"Generator",subspace:"Subspace",canvas:"Canvas",animation:"Animation",property_bank:"Data",property_bank_calc:"Calculation"},r.getBrickName=(e,a,t)=>{if(!a)return e.toUpperCase();if(a.title)return a.title;let o;switch(e){case"bank":o="BANK";break;case"subspace":o="SUBSPACE";break;case"canvas":o="CANVAS";break;case"animation":o=`<${i(r.getAnimationType(a))}>`;break;case"property_bank":o="<Data>";break;case"property_bank_calc":o="<Map>";break;case"state_group":o="<Switch Case>";break;default:o=`<${n[a.template_key||a.templateKey]||"Unknown"}>`}return t&&t.length>10?o+=` (${t.replace(/[A-Z_]+/g,"").substr(0,6)}...)`:t&&(o+=` (${t})`),o},r.getCallInternalActions=e=>{const r=o[e]||s[e];if(r)return r.callInternalActions},r.mapToList=(e,a)=>Object.entries(a).reduce((a,[t,i])=>(a.push({id:t,...i,title:r.getBrickName(e,i,t)}),a),[]);const p={subspaceMap:"subspace",brickMap:"brick",generatorMap:"generator",propertyBankMap:"property_bank",propertyAvailableToAdd:"property_bank",canvasMap:"canvas",animationMap:"animation"},c={};r.mapToListForDerivedState=(e,a,t,i)=>{const n=t[e]||c;return n!==i[e]?{[e]:n,[a]:r.mapToList(p[e],n)}:{}},r.arrayTypePrefix="array of ",r.propertyBankTypes=["string","number","bool","object","any",`${r.arrayTypePrefix}string`,`${r.arrayTypePrefix}number`,`${r.arrayTypePrefix}bool`,`${r.arrayTypePrefix}object`],r.animationRunTypes=["once","loop"],r.stopPropagationOnKeyBackspace=e=>{8===e.keyCode&&e.stopPropagation()},r.nestedTypes=["object","array","any"],r.isPropertyBankTypeNested=e=>r.nestedTypes.includes(e),r.propertyTypeToSchema=e=>{const a=e.indexOf(r.arrayTypePrefix)>-1,t=e.replace(r.arrayTypePrefix,"");return{type:t,properties:"object"===t?{}:void 0,allowNewItem:a,allowCustomProperty:"object"===t}}}};