@communecter/cocolight-api-client 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CocolightApiClient=t():e.CocolightApiClient=t()}(this,(()=>(()=>{var e={117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2586),s=r(5765),i=r(4227),o=r(8660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:d}=e;"all"===d.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new n.KeywordCxt(d,o.default,"additionalProperties"));const l=(0,s.allSchemaProperties)(r);for(const e of l)d.definedProperties.add(e);d.opts.unevaluated&&l.length&&!0!==d.props&&(d.props=i.mergeEvaluated.props(t,(0,i.toHash)(l),d.props));const u=l.filter((e=>!(0,i.alwaysValidSchema)(d,r[e])));if(0===u.length)return;const p=t.name("valid");for(const r of u)f(r)?m(r):(t.if((0,s.propertyInData)(t,c,r,d.opts.ownProperties)),m(r),d.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function f(e){return d.opts.useDefaults&&!d.compositeRule&&void 0!==r[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(396),s=r(7887),i=r(8708),o=r(9029),a=r(4227);var c;function d(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.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:n,opts:i}=e,a=function(e,t){return t?e.filter((e=>l.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),d=t.length>0&&!(0===a.length&&1===t.length&&(0,s.schemaHasRulesForType)(e,t[0]));if(d){const s=p(t,n,i.strictNumbers,c.Wrong);r.if(s,(()=>{a.length?function(e,t,r){const{gen:n,data:s,opts:i}=e,a=n.let("dataType",o._`typeof ${s}`),c=n.let("coerced",o._`undefined`);"array"===i.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,o._`${s}[0]`).assign(a,o._`typeof ${s}`).if(p(t,s,i.strictNumbers),(()=>n.assign(c,s))))),n.if(o._`${c} !== undefined`);for(const e of r)(l.has(e)||"array"===e&&"array"===i.coerceTypes)&&d(e);function d(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${s}`).elseIf(o._`${s} === null`).assign(c,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${s} === null
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CocolightApiClient=t():e.CocolightApiClient=t()}(this,(()=>(()=>{var e={117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2586),s=r(5765),i=r(4227),o=r(8660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:d}=e;"all"===d.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new n.KeywordCxt(d,o.default,"additionalProperties"));const p=(0,s.allSchemaProperties)(r);for(const e of p)d.definedProperties.add(e);d.opts.unevaluated&&p.length&&!0!==d.props&&(d.props=i.mergeEvaluated.props(t,(0,i.toHash)(p),d.props));const l=p.filter((e=>!(0,i.alwaysValidSchema)(d,r[e])));if(0===l.length)return;const u=t.name("valid");for(const r of l)f(r)?m(r):(t.if((0,s.propertyInData)(t,c,r,d.opts.ownProperties)),m(r),d.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(u);function f(e){return d.opts.useDefaults&&!d.compositeRule&&void 0!==r[e].default}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}};t.default=a},208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(396),s=r(7887),i=r(8708),o=r(9029),a=r(4227);var c;function d(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.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:n,opts:i}=e,a=function(e,t){return t?e.filter((e=>p.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),d=t.length>0&&!(0===a.length&&1===t.length&&(0,s.schemaHasRulesForType)(e,t[0]));if(d){const s=u(t,n,i.strictNumbers,c.Wrong);r.if(s,(()=>{a.length?function(e,t,r){const{gen:n,data:s,opts:i}=e,a=n.let("dataType",o._`typeof ${s}`),c=n.let("coerced",o._`undefined`);"array"===i.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,o._`${s}[0]`).assign(a,o._`typeof ${s}`).if(u(t,s,i.strictNumbers),(()=>n.assign(c,s))))),n.if(o._`${c} !== undefined`);for(const e of r)(p.has(e)||"array"===e&&"array"===i.coerceTypes)&&d(e);function d(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${s}`).elseIf(o._`${s} === null`).assign(c,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${s} === null
2
2
  || (${a} == "string" && ${s} && ${s} == +${s})`).assign(c,o._`+${s}`);case"integer":return void n.elseIf(o._`${a} === "boolean" || ${s} === null
3
3
  || (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(c,o._`+${s}`);case"boolean":return void n.elseIf(o._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(c,!1).elseIf(o._`${s} === "true" || ${s} === 1`).assign(c,!0);case"null":return n.elseIf(o._`${s} === "" || ${s} === 0 || ${s} === false`),void n.assign(c,null);case"array":n.elseIf(o._`${a} === "string" || ${a} === "number"
4
- || ${a} === "boolean" || ${s} === null`).assign(c,o._`[${s}]`)}}n.else(),m(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(s,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):m(e)}))}return d};const l=new Set(["string","number","integer","boolean","null"]);function u(e,t,r,n=c.Correct){const s=n===c.Correct?o.operators.EQ:o.operators.NEQ;let i;switch(e){case"null":return o._`${t} ${s} null`;case"array":i=o._`Array.isArray(${t})`;break;case"object":i=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return o._`typeof ${t} ${s} ${e}`}return n===c.Correct?i:(0,o.not)(i);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function p(e,t,r,n){if(1===e.length)return u(e[0],t,r,n);let s;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=o._`typeof ${t} != "object"`;s=i.null?e:o._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else s=o.nil;i.number&&delete i.integer;for(const e in i)s=(0,o.and)(s,u(e,t,r,n));return s}t.checkDataType=u,t.checkDataTypes=p;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,f)}t.reportTypeError=m},343:e=>{"use strict";const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function n(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function s(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const o={scheme:"http",domainHost:!0,parse:s,serialize:i},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:o,https:{scheme:"https",domainHost:o.domainHost,parse:s,serialize:i},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(r);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const s=`${r}:${t.nid||e.nid}`,i=c[s];e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),s=`${r}:${t.nid||n}`,i=c[s];i&&(e=i.serialize(e,t));const o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,r){const n=e;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&t.test(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=c},396:(e,t)=>{"use strict";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:{}}}},422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match pattern "${e}"`,params:({schemaCode:e})=>s._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",d=r?s._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,i);e.fail$data(s._`!${d}.test(${t})`)}};t.default=i},494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(9029),s=r(4227),i=r(5765),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,s.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:o,data:a,keyword:c,it:d}=e;!function(e){const{opts:n,errSchemaPath:i}=d,o=r.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,s.checkStrictMode)(d,e,n.strictTuples)}}(o),d.opts.unevaluated&&r.length&&!0!==d.items&&(d.items=s.mergeEvaluated.items(i,r.length,d.items));const l=i.name("valid"),u=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,s.alwaysValidSchema)(d,t)||(i.if(n._`${u} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=o},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(208),s=r(9029),i=r(4227),o=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>s.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>s._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:d,schemaCode:l,it:u}=e;if(!a&&!c)return;const p=t.let("valid"),f=d.items?(0,n.getSchemaTypes)(d.items):[];function m(i,o){const a=t.name("item"),c=(0,n.checkDataTypes)(f,a,u.opts.strictNumbers,n.DataType.Wrong),d=t.const("indices",s._`{}`);t.for(s._`;${i}--;`,(()=>{t.let(a,s._`${r}[${i}]`),t.if(c,s._`continue`),f.length>1&&t.if(s._`typeof ${a} == "string"`,s._`${a} += "_"`),t.if(s._`typeof ${d}[${a}] == "number"`,(()=>{t.assign(o,s._`${d}[${a}]`),e.error(),t.assign(p,!1).break()})).code(s._`${d}[${a}] = ${i}`)}))}function h(n,a){const c=(0,i.useFunc)(t,o.default),d=t.name("outer");t.label(d).for(s._`;${n}--;`,(()=>t.for(s._`${a} = ${n}; ${a}--;`,(()=>t.if(s._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(d)}))))))}e.block$data(p,(function(){const n=t.let("i",s._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(p,!0),t.if(s._`${n} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?m:h)(n,i)))}),s._`${l} === false`),e.ok(p)}};t.default=a},793:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var s=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=r.length+1;if(1===i)return e;var o=new Array(i);o[0]=s(e);for(var a=1;a<i;a++)o[a]=s(r[a]);return o.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var d="",l=0,u=-1,p=e&&e.length||0,f=0;f<p;){if(37===e.charCodeAt(f)&&f+1<p){switch(u=u>-1?u:0,e.charCodeAt(f+1)){case 100:case 102:if(l>=c)break;if(null==r[l])break;u<f&&(d+=e.slice(u,f)),d+=Number(r[l]),u=f+2,f++;break;case 105:if(l>=c)break;if(null==r[l])break;u<f&&(d+=e.slice(u,f)),d+=Math.floor(Number(r[l])),u=f+2,f++;break;case 79:case 111:case 106:if(l>=c)break;if(void 0===r[l])break;u<f&&(d+=e.slice(u,f));var m=typeof r[l];if("string"===m){d+="'"+r[l]+"'",u=f+2,f++;break}if("function"===m){d+=r[l].name||"<anonymous>",u=f+2,f++;break}d+=s(r[l]),u=f+2,f++;break;case 115:if(l>=c)break;u<f&&(d+=e.slice(u,f)),d+=String(r[l]),u=f+2,f++;break;case 37:u<f&&(d+=e.slice(u,f)),d+="%",u=f+2,f++,l--}++l}++f}return-1===u?e:(u<p&&(d+=e.slice(u)),d)}},1111:e=>{"use strict";const t=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);e.exports=e=>!t.has(e&&e.code)},1163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${s}`)}};t.default=s},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&(0,s.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=o(i,"then"),c=o(i,"else");if(!a&&!c)return;const d=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,u("then",r),u("else",r))}else a?t.if(l,u("then")):t.if((0,n.not)(l),u("else"));function u(r,s){return()=>{const i=e.subschema({keyword:r},l);t.assign(d,l),e.mergeValidEvaluated(i,d),s?t.assign(s,n._`${r}`):e.setParams({ifClause:r})}}e.pass(d,(()=>e.error(!0)))}};function o(e,t){const r=e.schema[t];return void 0!==r&&!(0,s.alwaysValidSchema)(e,r)}t.default=i},1520:(e,t)=>{"use strict";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 n 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=n;class s 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 n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)c(r,t[n]),r.push(e[++n]);return new s(r)}t._Code=s,t.nil=new s(""),t._=i;const o=new s("+");function a(e,...t){const r=[l(e[0])];let n=0;for(;n<t.length;)r.push(o),c(r,t[n]),r.push(o,l(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===o){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 s(r)}function c(e,t){var r;t instanceof s?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:l(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 n||'"'!==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 n?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new s(l(e))},t.safeStringify=l,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new s(`.${e}`):i`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new s(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new s(e.toString())}},2017:e=>{"use strict";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 n,s,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;0!=s--;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},2023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=s},2079:e=>{"use strict";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}')},2128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3463),s=r(3693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,s.default];t.default=i},2586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(8727),s=r(208),i=r(7887),o=r(208),a=r(7870),c=r(3673),d=r(4495),l=r(9029),u=r(2023),p=r(6939),f=r(4227),m=r(8708);function h({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},i){s.code.es5?e.func(t,l._`${u.default.data}, ${u.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${y(r,s)}`),function(e,t){e.if(u.default.valCxt,(()=>{e.var(u.default.instancePath,l._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,l._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,l._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,l._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,l._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{e.var(u.default.instancePath,l._`""`),e.var(u.default.parentData,l._`undefined`),e.var(u.default.parentDataProperty,l._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,l._`{}`)}))}(e,s),e.code(i)})):e.func(t,l._`${u.default.data}, ${function(e){return l._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?l._`, ${u.default.dynamicAnchors}={}`:l.nil}}={}`}(s)}`,n.$async,(()=>e.code(y(r,s)).code(i)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}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 b(e){return"boolean"!=typeof e.schema}function v(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return _(e,[],!1,t);const r=(0,s.getSchemaTypes)(e.schema);_(e,r,!(0,s.coerceAndCheckDataType)(e,r),t)}function $({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(!0===s.$comment)e.code(l._`${u.default.self}.logger.log(${i})`);else if("function"==typeof s.$comment){const r=l.str`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(l._`${u.default.self}.opts.$comment(${i}, ${r}, ${s}.schema)`)}}function _(e,t,r,n){const{gen:s,schema:a,data:c,allErrors:d,opts:p,self:m}=e,{RULES:h}=m;function y(f){(0,i.shouldUseGroup)(a,f)&&(f.type?(s.if((0,o.checkDataType)(f.type,c,p.strictNumbers)),j(e,f),1===t.length&&t[0]===f.type&&r&&(s.else(),(0,o.reportTypeError)(e)),s.endIf()):j(e,f),d||s.if(l._`${u.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,h)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{E(e.dataTypes,t)||O(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)E(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&O(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if("object"==typeof s&&(0,i.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&O(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),s.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):s.block((()=>S(e,"$ref",h.all.$ref.definition)))}function j(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&S(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function O(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(u.default.vErrors,null),n.let(u.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=e;r.$async?t.if(l._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(l._`new ${s}(${u.default.vErrors})`))):(t.assign(l._`${n}.errors`,u.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof l.Name&&e.assign(l._`${t}.props`,r),n instanceof l.Name&&e.assign(l._`${t}.items`,n)}(e),t.return(l._`${u.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class P{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,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,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",u.default.errors))}result(e,t,r){this.failResult((0,l.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,l.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(l._`${t} !== undefined && (${(0,l.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?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.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=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:s,def:i}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(s.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:s}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,o.checkDataTypes)(e,t,s.opts.strictNumbers,o.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.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 function(e,t){b(e)&&(v(e),g(e))?function(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&$(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",u.default.errors);w(e,i),n.var(t,l._`${i} === ${u.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(s,t),s}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function S(e,t,r,n){const s=new P(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,c.funcKeywordCode)(s,r):"macro"in r?(0,c.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(s,r)}t.KeywordCxt=P;const T=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,i;if(""===e)return u.default.rootData;if("/"===e[0]){if(!T.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=u.default.rootData}else{const o=k.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(s=o[2],"#"===s){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!s)return i}let o=i;const a=s.split("/");for(const e of a)e&&(i=l._`${i}${(0,l.getProperty)((0,f.unescapeJsonPointer)(e))}`,o=l._`${o} && ${i}`);return o;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=N},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:o,it:a}=e;let c,d;const{minContains:l,maxContains:u}=i;a.opts.next?(c=void 0===l?1:l,d=u):c=1;const p=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:d}),void 0===d&&0===c)return void(0,s.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==d&&c>d)return(0,s.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,s.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${c}`;return void 0!==d&&(t=n._`${t} && ${p} <= ${d}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function m(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===d?t.if(n._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(n._`${e} > ${d}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(r)))))}function h(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:s.Type.Num,compositeRule:!0},r),n()}))}void 0===d&&1===c?h(f,(()=>t.if(f,(()=>t.break())))):0===c?(t.let(f,!0),void 0!==d&&t.if(n._`${o}.length > 0`,m)):(t.let(f,!1),m()),e.result(f,(()=>e.reset()))}};t.default=i},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9029),s=r(4227),i=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const s=1===t?"property":"properties";return n.str`must have ${s} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>n._`{property: ${e},
4
+ || ${a} === "boolean" || ${s} === null`).assign(c,o._`[${s}]`)}}n.else(),m(e),n.endIf(),n.if(o._`${c} !== undefined`,(()=>{n.assign(s,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):m(e)}))}return d};const p=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,n=c.Correct){const s=n===c.Correct?o.operators.EQ:o.operators.NEQ;let i;switch(e){case"null":return o._`${t} ${s} null`;case"array":i=o._`Array.isArray(${t})`;break;case"object":i=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return o._`typeof ${t} ${s} ${e}`}return n===c.Correct?i:(0,o.not)(i);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function u(e,t,r,n){if(1===e.length)return l(e[0],t,r,n);let s;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=o._`typeof ${t} != "object"`;s=i.null?e:o._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else s=o.nil;i.number&&delete i.integer;for(const e in i)s=(0,o.and)(s,l(e,t,r,n));return s}t.checkDataType=l,t.checkDataTypes=u;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,f)}t.reportTypeError=m},343:e=>{"use strict";const t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function n(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function s(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const o={scheme:"http",domainHost:!0,parse:s,serialize:i},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:o,https:{scheme:"https",domainHost:o.domainHost,parse:s,serialize:i},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(r);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const s=`${r}:${t.nid||e.nid}`,i=c[s];e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),s=`${r}:${t.nid||n}`,i=c[s];i&&(e=i.serialize(e,t));const o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,r){const n=e;return n.uuid=n.nss,n.nss=void 0,r.tolerant||n.uuid&&t.test(n.uuid)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=c},396:(e,t)=>{"use strict";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:{}}}},422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match pattern "${e}"`,params:({schemaCode:e})=>s._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:o,it:a}=e,c=a.opts.unicodeRegExp?"u":"",d=r?s._`(new RegExp(${o}, ${c}))`:(0,n.usePattern)(e,i);e.fail$data(s._`!${d}.test(${t})`)}};t.default=i},494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(9029),s=r(4227),i=r(5765),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,s.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:o,data:a,keyword:c,it:d}=e;!function(e){const{opts:n,errSchemaPath:i}=d,o=r.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,s.checkStrictMode)(d,e,n.strictTuples)}}(o),d.opts.unevaluated&&r.length&&!0!==d.items&&(d.items=s.mergeEvaluated.items(i,r.length,d.items));const p=i.name("valid"),l=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,s.alwaysValidSchema)(d,t)||(i.if(n._`${l} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},p))),e.ok(p))}))}t.validateTuple=a,t.default=o},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(208),s=r(9029),i=r(4227),o=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>s.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>s._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:d,schemaCode:p,it:l}=e;if(!a&&!c)return;const u=t.let("valid"),f=d.items?(0,n.getSchemaTypes)(d.items):[];function m(i,o){const a=t.name("item"),c=(0,n.checkDataTypes)(f,a,l.opts.strictNumbers,n.DataType.Wrong),d=t.const("indices",s._`{}`);t.for(s._`;${i}--;`,(()=>{t.let(a,s._`${r}[${i}]`),t.if(c,s._`continue`),f.length>1&&t.if(s._`typeof ${a} == "string"`,s._`${a} += "_"`),t.if(s._`typeof ${d}[${a}] == "number"`,(()=>{t.assign(o,s._`${d}[${a}]`),e.error(),t.assign(u,!1).break()})).code(s._`${d}[${a}] = ${i}`)}))}function h(n,a){const c=(0,i.useFunc)(t,o.default),d=t.name("outer");t.label(d).for(s._`;${n}--;`,(()=>t.for(s._`${a} = ${n}; ${a}--;`,(()=>t.if(s._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(u,!1).break(d)}))))))}e.block$data(u,(function(){const n=t.let("i",s._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(u,!0),t.if(s._`${n} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?m:h)(n,i)))}),s._`${p} === false`),e.ok(u)}};t.default=a},793:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var s=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=r.length+1;if(1===i)return e;var o=new Array(i);o[0]=s(e);for(var a=1;a<i;a++)o[a]=s(r[a]);return o.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var d="",p=0,l=-1,u=e&&e.length||0,f=0;f<u;){if(37===e.charCodeAt(f)&&f+1<u){switch(l=l>-1?l:0,e.charCodeAt(f+1)){case 100:case 102:if(p>=c)break;if(null==r[p])break;l<f&&(d+=e.slice(l,f)),d+=Number(r[p]),l=f+2,f++;break;case 105:if(p>=c)break;if(null==r[p])break;l<f&&(d+=e.slice(l,f)),d+=Math.floor(Number(r[p])),l=f+2,f++;break;case 79:case 111:case 106:if(p>=c)break;if(void 0===r[p])break;l<f&&(d+=e.slice(l,f));var m=typeof r[p];if("string"===m){d+="'"+r[p]+"'",l=f+2,f++;break}if("function"===m){d+=r[p].name||"<anonymous>",l=f+2,f++;break}d+=s(r[p]),l=f+2,f++;break;case 115:if(p>=c)break;l<f&&(d+=e.slice(l,f)),d+=String(r[p]),l=f+2,f++;break;case 37:l<f&&(d+=e.slice(l,f)),d+="%",l=f+2,f++,p--}++p}++f}return-1===l?e:(l<u&&(d+=e.slice(l)),d)}},1111:e=>{"use strict";const t=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);e.exports=e=>!t.has(e&&e.code)},1163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${s}`)}};t.default=s},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&(0,s.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=o(i,"then"),c=o(i,"else");if(!a&&!c)return;const d=t.let("valid",!0),p=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(p,l("then",r),l("else",r))}else a?t.if(p,l("then")):t.if((0,n.not)(p),l("else"));function l(r,s){return()=>{const i=e.subschema({keyword:r},p);t.assign(d,p),e.mergeValidEvaluated(i,d),s?t.assign(s,n._`${r}`):e.setParams({ifClause:r})}}e.pass(d,(()=>e.error(!0)))}};function o(e,t){const r=e.schema[t];return void 0!==r&&!(0,s.alwaysValidSchema)(e,r)}t.default=i},1520:(e,t)=>{"use strict";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 n 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=n;class s 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 n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)c(r,t[n]),r.push(e[++n]);return new s(r)}t._Code=s,t.nil=new s(""),t._=i;const o=new s("+");function a(e,...t){const r=[p(e[0])];let n=0;for(;n<t.length;)r.push(o),c(r,t[n]),r.push(o,p(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===o){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 s(r)}function c(e,t){var r;t instanceof s?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:p(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 n||'"'!==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 n?void 0:`"${e}${t.slice(1)}`}function p(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new s(p(e))},t.safeStringify=p,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new s(`.${e}`):i`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new s(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new s(e.toString())}},2017:e=>{"use strict";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 n,s,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;0!=s--;){var o=i[s];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},2023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=s},2079:e=>{"use strict";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}')},2128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3463),s=r(3693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,s.default];t.default=i},2586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(8727),s=r(208),i=r(7887),o=r(208),a=r(7870),c=r(3673),d=r(4495),p=r(9029),l=r(2023),u=r(6939),f=r(4227),m=r(8708);function h({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},i){s.code.es5?e.func(t,p._`${l.default.data}, ${l.default.valCxt}`,n.$async,(()=>{e.code(p._`"use strict"; ${y(r,s)}`),function(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,p._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,p._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,p._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,p._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,p._`""`),e.var(l.default.parentData,p._`undefined`),e.var(l.default.parentDataProperty,p._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`{}`)}))}(e,s),e.code(i)})):e.func(t,p._`${l.default.data}, ${function(e){return p._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?p._`, ${l.default.dynamicAnchors}={}`:p.nil}}={}`}(s)}`,n.$async,(()=>e.code(y(r,s)).code(i)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?p._`/*# sourceURL=${r} */`:p.nil}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 b(e){return"boolean"!=typeof e.schema}function v(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return _(e,[],!1,t);const r=(0,s.getSchemaTypes)(e.schema);_(e,r,!(0,s.coerceAndCheckDataType)(e,r),t)}function $({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const i=r.$comment;if(!0===s.$comment)e.code(p._`${l.default.self}.logger.log(${i})`);else if("function"==typeof s.$comment){const r=p.str`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(p._`${l.default.self}.opts.$comment(${i}, ${r}, ${s}.schema)`)}}function _(e,t,r,n){const{gen:s,schema:a,data:c,allErrors:d,opts:u,self:m}=e,{RULES:h}=m;function y(f){(0,i.shouldUseGroup)(a,f)&&(f.type?(s.if((0,o.checkDataType)(f.type,c,u.strictNumbers)),j(e,f),1===t.length&&t[0]===f.type&&r&&(s.else(),(0,o.reportTypeError)(e)),s.endIf()):j(e,f),d||s.if(p._`${l.default.errors} === ${n||0}`))}!a.$ref||!u.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,h)?(u.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{E(e.dataTypes,t)||O(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)E(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&O(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if("object"==typeof s&&(0,i.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&O(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),s.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):s.block((()=>S(e,"$ref",h.all.$ref.definition)))}function j(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&S(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function O(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(l.default.vErrors,null),n.let(l.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",p._`${r}.evaluated`),t.if(p._`${e.evaluated}.dynamicProps`,(()=>t.assign(p._`${e.evaluated}.props`,p._`undefined`))),t.if(p._`${e.evaluated}.dynamicItems`,(()=>t.assign(p._`${e.evaluated}.items`,p._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:i}=e;r.$async?t.if(p._`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw(p._`new ${s}(${l.default.vErrors})`))):(t.assign(p._`${n}.errors`,l.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof p.Name&&e.assign(p._`${t}.props`,r),n instanceof p.Name&&e.assign(p._`${t}.items`,n)}(e),t.return(p._`${l.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class P{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,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,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,p.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,p.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(p._`${t} !== undefined && (${(0,p.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?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.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=p.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=p.nil,t=p.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:s,def:i}=this;r.if((0,p.or)(p._`${n} === undefined`,t)),e!==p.nil&&r.assign(e,!0),(s.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==p.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:s}=this;return(0,p.or)(function(){if(r.length){if(!(t instanceof p.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return p._`${(0,o.checkDataTypes)(e,t,s.opts.strictNumbers,o.DataType.Wrong)}`}return p.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return p._`!${r}(${t})`}return p.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 function(e,t){b(e)&&(v(e),g(e))?function(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&$(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",l.default.errors);w(e,i),n.var(t,p._`${i} === ${l.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(s,t),s}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,p.Name))),!0}}function S(e,t,r,n){const s=new P(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,c.funcKeywordCode)(s,r):"macro"in r?(0,c.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(s,r)}t.KeywordCxt=P;const T=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,i;if(""===e)return l.default.rootData;if("/"===e[0]){if(!T.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=l.default.rootData}else{const o=k.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(s=o[2],"#"===s){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!s)return i}let o=i;const a=s.split("/");for(const e of a)e&&(i=p._`${i}${(0,p.getProperty)((0,f.unescapeJsonPointer)(e))}`,o=p._`${o} && ${i}`);return o;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=N},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:o,it:a}=e;let c,d;const{minContains:p,maxContains:l}=i;a.opts.next?(c=void 0===p?1:p,d=l):c=1;const u=t.const("len",n._`${o}.length`);if(e.setParams({min:c,max:d}),void 0===d&&0===c)return void(0,s.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==d&&c>d)return(0,s.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,s.alwaysValidSchema)(a,r)){let t=n._`${u} >= ${c}`;return void 0!==d&&(t=n._`${t} && ${u} <= ${d}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function m(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===d?t.if(n._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(n._`${e} > ${d}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(r)))))}function h(r,n){t.forRange("i",0,u,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:s.Type.Num,compositeRule:!0},r),n()}))}void 0===d&&1===c?h(f,(()=>t.if(f,(()=>t.break())))):0===c?(t.let(f,!0),void 0!==d&&t.if(n._`${o}.length > 0`,m)):(t.let(f,!1),m()),e.result(f,(()=>e.reset()))}};t.default=i},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9029),s=r(4227),i=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const s=1===t?"property":"properties";return n.str`must have ${s} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>n._`{property: ${e},
5
5
  missingProperty: ${s},
6
6
  depsCount: ${t},
7
- deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:s,it:o}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const d=t[c];if(0===d.length)continue;const l=(0,i.propertyInData)(r,s,c,o.opts.ownProperties);e.setParams({property:c,depsCount:d.length,deps:d.join(", ")}),o.allErrors?r.if(l,(()=>{for(const t of d)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,i.checkMissingProp)(e,d,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:o,it:a}=e,c=r.name("valid");for(const d in t)(0,s.alwaysValidSchema)(a,t[d])||(r.if((0,i.propertyInData)(r,n,d,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:d},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=o},3282:(e,t,r)=>{"use strict";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 n=r(4042),s=r(6144),i=r(6653),o=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),s.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;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 l=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var p=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var f=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:s,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),c=o?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${s} === 0 || (${a} = ${r}/${s}, ${c}))`)}};t.default=s},3463:(e,t)=>{"use strict";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},3558:(e,t)=>{"use strict";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},3673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(9029),s=r(2023),i=r(5765),o=r(8708);function a(e){const{gen:t,data:r,it:s}=e;t.if(s.parentData,(()=>t.assign(r,n._`${s.parentData}[${s.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,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:s,schema:i,parentSchema:o,it:a}=e,d=t.macro.call(a.self,i,o,a),l=c(r,s,d);!1!==a.opts.validateSchema&&a.self.validateSchema(d,!0);const u=r.name("valid");e.subschema({schema:d,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${s}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:d,keyword:l,schema:u,parentSchema:p,$data:f,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const h=!f&&t.compile?t.compile.call(m.self,u,p,m):t.validate,y=c(d,l,h),g=d.let("valid");function b(r=(t.async?n._`await `:n.nil)){const o=m.opts.passContext?s.default.this:s.default.self,a=!("compile"in t&&!f||!1===t.schema);d.assign(g,n._`${r}${(0,i.callValidateCode)(e,y,o,a)}`,t.modifying)}function v(e){var r;d.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const r=t.async?function(){const e=d.let("ruleErrs",null);return d.try((()=>b(n._`await `)),(t=>d.assign(g,!1).if(n._`${t} instanceof ${m.ValidationError}`,(()=>d.assign(e,n._`${t}.errors`)),(()=>d.throw(t))))),e}():function(){const e=n._`${y}.errors`;return d.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(s.default.vErrors,n._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`).assign(s.default.errors,n._`${s.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},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:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},3693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(4551),s=r(5765),i=r(9029),o=r(2023),a=r(3835),c=r(4227),d={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:s}=e,{baseId:o,schemaEnv:c,validateName:d,opts:p,self:f}=s,{root:m}=c;if(("#"===r||"#/"===r)&&o===m.baseId)return function(){if(c===m)return u(e,d,c,c.$async);const r=t.scopeValue("root",{ref:m});return u(e,i._`${r}.validate`,m,m.$async)}();const h=a.resolveRef.call(f,m,o,r);if(void 0===h)throw new n.default(s.opts.uriResolver,o,r);return h instanceof a.SchemaEnv?function(t){const r=l(e,t);u(e,r,t,t.$async)}(h):function(n){const s=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),o=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:s,errSchemaPath:r},o);e.mergeEvaluated(a),e.ok(o)}(h)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function u(e,t,r,n){const{gen:a,it:d}=e,{allErrors:l,schemaEnv:u,opts:p}=d,f=p.passContext?o.default.this:i.nil;function m(e){const t=i._`${e}.errors`;a.assign(o.default.vErrors,i._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,i._`${o.default.vErrors}.length`)}function h(e){var t;if(!d.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==d.props)if(n&&!n.dynamicProps)void 0!==n.props&&(d.props=c.mergeEvaluated.props(a,n.props,d.props));else{const t=a.var("props",i._`${e}.evaluated.props`);d.props=c.mergeEvaluated.props(a,t,d.props,i.Name)}if(!0!==d.items)if(n&&!n.dynamicItems)void 0!==n.items&&(d.items=c.mergeEvaluated.items(a,n.items,d.items));else{const t=a.var("items",i._`${e}.evaluated.items`);d.items=c.mergeEvaluated.items(a,t,d.items,i.Name)}}n?function(){if(!u.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(i._`await ${(0,s.callValidateCode)(e,t,f)}`),h(t),l||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${d.ValidationError})`,(()=>a.throw(e))),m(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,s.callValidateCode)(e,t,f),(()=>h(t)),(()=>m(t)))}t.getValidate=l,t.callRef=u,t.default=d},3835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(9029),s=r(3558),i=r(2023),o=r(6939),a=r(4227),c=r(2586);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,o.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 l(e){const t=p.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:d}=this.opts.code,{ownProperties:l}=this.opts,u=new n.CodeGen(this.scope,{es5:a,lines:d,ownProperties:l});let f;e.$async&&(f=u.scopeValue("Error",{ref:s.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const m=u.scopeName("validate");e.validateName=m;const h={gen:u,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),u.optimize(this.opts.code.optimize);const t=u.toString();y=`${u.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${i.default.self}`,`${i.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{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:m,validateCode:t,scopeValues:u._values}),this.opts.unevaluated){const{props:e,items:t}=h;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.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 u(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l.call(this,e)}function p(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function f(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),n=(0,o._getFullPath)(this.opts.uriResolver,r);let s=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return y.call(this,r,e);const i=(0,o.normalizeId)(n),a=this.refs[i]||this.schemas[i];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||l.call(this,a),i===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(s=(0,o.resolveUrl)(this.opts.uriResolver,s,n)),new d({schema:t,schemaId:r,root:e,baseId:s})}return y.call(this,r,a)}}t.SchemaEnv=d,t.compileSchema=l,t.resolveRef=function(e,t,r){var n;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let i=f.call(this,e,r);if(void 0===i){const s=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:o}=this.opts;s&&(i=new d({schema:s,schemaId:o,root:e,baseId:t}))}return void 0!==i?e.refs[r]=u.call(this,i):void 0},t.getCompilingSchema=p,t.resolveSchema=m;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var s;if("/"!==(null===(s=e.fragment)||void 0===s?void 0:s[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(n)&&s&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,s))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=m.call(this,n,e)}const{schemaId:c}=this.opts;return i=i||new d({schema:r,schemaId:c,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}},3837:e=>{"use strict";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}')},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,s=0;for(;s<t;)n++,r=e.charCodeAt(s++),r>=55296&&r<=56319&&s<t&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},3966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(5765),o=r(5457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,s.alwaysValidSchema)(n,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,i.validateArray)(e)))}};t.default=a},4003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i=r(4227),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>s.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>s._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:o,data:a,$data:c,it:d}=e,{opts:l}=d;if(!c&&0===r.length)return;const u=r.length>=l.loopRequired;if(d.allErrors?function(){if(u||c)e.block$data(s.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(u||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,o,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,s.not)(i),(()=>{e.error(),t.break()}))}),s.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${d.schemaEnv.baseId+d.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(d,t,d.opts.strictRequired)}}function p(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=o},4018:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(i,o),time:r(c(!0),d),"date-time":r(p(!0),f),"iso-time":r(c(),l),"iso-date-time":r(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return h.test(e)&&y.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if($.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return g.lastIndex=0,g.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=v&&e>=b}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:w},double:{type:"number",validate:w},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"iso-time":r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],i=+t[2],o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:s[i])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){const r=a.exec(t);if(!r)return!1;const n=+r[1],s=+r[2],i=+r[3],o=r[4],c="-"===r[5]?-1:1,d=+(r[6]||0),l=+(r[7]||0);if(d>23||l>59||e&&!o)return!1;if(n<=23&&s<=59&&i<60)return!0;const u=s-l*c,p=n-d*c-(u<0?1:0);return(23===p||-1===p)&&(59===u||-1===u)&&i<61}}function d(e,t){if(!e||!t)return;const r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();return r&&n?r-n:void 0}function l(e,t){if(!e||!t)return;const r=a.exec(e),n=a.exec(t);return r&&n?(e=r[1]+r[2]+r[3])>(t=n[1]+n[2]+n[3])?1:e<t?-1:0:void 0}const u=/t|\s/i;function p(e){const t=c(e);return function(e){const r=e.split(u);return 2===r.length&&i(r[0])&&t(r[1])}}function f(e,t){if(!e||!t)return;const r=new Date(e).valueOf(),n=new Date(t).valueOf();return r&&n?r-n:void 0}function m(e,t){if(!e||!t)return;const[r,n]=e.split(u),[s,i]=t.split(u),a=o(r,s);return void 0!==a?a||d(n,i):void 0}const h=/\/|:/,y=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,b=-(2**31),v=2**31-1;function w(){return!0}const $=/[^\\]\\Z/},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var s=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return s.CodeGen}});const i=r(3558),o=r(4551),a=r(396),c=r(3835),d=r(9029),l=r(6939),u=r(208),p=r(4227),f=r(3837),m=r(5944),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,n,s,i,o,a,c,d,l,u,p,f,y,g,b,v,w,$,_,j,E,O,P,S;const T=e.strict,k=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===k||void 0===k?1:k||0,R=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,I=null!==(s=e.uriResolver)&&void 0!==s?s:m.default;return{strictSchema:null===(o=null!==(i=e.strictSchema)&&void 0!==i?i:T)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:T)||void 0===c||c,strictTypes:null!==(l=null!==(d=e.strictTypes)&&void 0!==d?d:T)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(u=e.strictTuples)&&void 0!==u?u:T)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(f=e.strictRequired)&&void 0!==f?f:T)&&void 0!==y&&y,code:e.code?{...e.code,optimize:N,regExp:R}:{optimize:N,regExp:R},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===($=e.inlineRefs)||void 0===$||$,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(j=e.addUsedSchema)||void 0===j||j,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(O=e.validateFormats)||void 0===O||O,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(S=e.int32range)||void 0===S||S,uriResolver:I}}class ${constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return T;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,e,"NOT SUPPORTED"),_.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=f;"id"===r&&(n={...f},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await d.call(this,e);this.refs[e]||await s.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,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=j.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=j.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,l.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(N.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>R.call(this,e))),this;C.call(this,t);const n={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>R.call(this,e,n):e=>n.type.forEach((t=>R.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=s[e];n&&i&&(s[e]=x(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let i;const{schemaId:o}=this.opts;if("object"==typeof e)i=e[o];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 a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(i||r);const d=l.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:d}),this._cache.set(a.schema,a),s&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_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 _(e,t,r,n="error"){for(const s in e){const i=s;i in t&&this.logger[n](`${r}: option ${s}. ${e[i]}`)}}function j(e){return e=(0,l.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 O(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function P(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function S(){const e={...this.opts};for(const t of y)delete e[t];return e}$.ValidationError=i.default,$.MissingRefError=o.default,t.default=$;const T={log(){},warn(){},error(){}},k=/^[a-z_$][a-z0-9_$:-]*$/i;function N(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!k.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 R(e,t,r){var n;const s=null==t?void 0:t.post;if(r&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let o=s?i.post:i.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},i.rules.push(o)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?I.call(this,o,a,t.before):o.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function I(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function C(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=x(t)),e.validateSchema=this.compile(t,!0))}const A={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function x(e){return{anyOf:[e,A]}}},4227:(e,t,r)=>{"use strict";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 n=r(9029),s=r(1520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const s=n.RULES.keywords;for(const r in t)s[r]||m(e,`unknown keyword: "${r}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(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:s}){return(i,o,a,c)=>{const d=void 0===a?o:a instanceof n.Name?(o instanceof n.Name?e(i,o,a):t(i,o,a),a):o instanceof n.Name?(t(i,a,o),o):r(o,a);return c!==n.Name||d instanceof n.Name?d:s(i,d)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&u(e,r,t),r}function u(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.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||(i(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=o,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,s,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(s)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,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(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),u(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:d({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=u;const p={};var f;function m(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:p[t.code]||(p[t.code]=new s._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f||(t.Type=f={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const s=t===f.Num;return r?s?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:s?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=m},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),s={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=s},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${s}`)}};t.default=s},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9029),s=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,s.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=t;if(void 0!==r){const{errorPath:o,dataPathArr:a,opts:c}=t;l(d.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${o}${(0,s.getErrorPath)(r,i,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==o&&(l(o instanceof n.Name?o:d.let("data",o,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==s&&(e.createErrors=s),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6939);class s extends Error{constructor(e,t,r,s){super(s||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=s},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:s,$data:i,schema:o,schemaCode:a,it:c}=e,{opts:d,errSchemaPath:l,schemaEnv:u,self:p}=c;d.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:d.code.formats}),o=r.const("fDef",n._`${i}[${a}]`),c=r.let("fType"),l=r.let("format");r.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,n._`${o}.type || "string"`).assign(l,n._`${o}.validate`)),(()=>r.assign(c,n._`"string"`).assign(l,o))),e.fail$data((0,n.or)(!1===d.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=u.$async?n._`(${o}.async ? await ${l}(${s}) : ${l}(${s}))`:n._`${l}(${s})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${s}))`;return n._`${l} && ${l} !== true && ${c} === ${t} && !${r}`}()))}():function(){const i=p.formats[o];if(!i)return void function(){if(!1!==d.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${l}"`}p.logger.warn(e())}();if(!0===i)return;const[a,c,f]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):d.code.formats?n._`${d.code.formats}${(0,n.getProperty)(o)}`:void 0,s=r.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,s]:[e.type||"string",e.validate,n._`${s}.validate`]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!u.$async)throw new Error("async format in sync schema");return n._`await ${f}(${s})`}return"function"==typeof c?n._`${f}(${s})`:n._`${f}.test(${s})`}())}())}};t.default=s},4834:(e,t,r)=>{"use strict";const{HEX:n}=r(4914),s=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function i(e){if(d(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(s)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function o(e,t=!1){let r="",s=!0;for(const t of e){if(void 0===n[t])return;"0"!==t&&!0===s&&(s=!1),s||(r+=t)}return t&&0===r.length&&(r="0"),r}function a(e){if(d(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],s=[];let i=!1,a=!1,c=!1;function d(){if(s.length){if(!1===i){const e=o(s);if(void 0===e)return r.error=!0,!1;n.push(e)}s.length=0}return!0}for(let o=0;o<e.length;o++){const l=e[o];if("["!==l&&"]"!==l)if(":"!==l)if("%"===l){if(!d())break;i=!0}else s.push(l);else{if(!0===a&&(c=!0),!d())break;if(t++,n.push(":"),t>7){r.error=!0;break}o-1>=0&&":"===e[o-1]&&(a=!0)}}return s.length&&(i?r.zone=s.join(""):c?n.push(s.join("")):n.push(o(s))),r.address=n.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,escapedHost:r,isIPV6:!0}}}function c(e,t){let r="",n=!0;const s=e.length;for(let i=0;i<s;i++){const o=e[i];"0"===o&&n?(i+1<=s&&e[i+1]===t||i+1===s)&&(r+=o,n=!1):(n=o===t,r+=o)}return r}function d(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const l=/^\.\.?\//u,u=/^\/\.(?:\/|$)/u,p=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;e.exports={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);const n=i(r);if(n.isIPV4)r=n.host;else{const t=a(n.host);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){const t=[];for(;e.length;)if(e.match(l))e=e.replace(l,"");else if(e.match(u))e=e.replace(u,"/");else if(e.match(p))e=e.replace(p,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(f);if(!r)throw new Error("Unexpected dot segment condition");{const n=r[0];e=e.slice(n.length),t.push(n)}}return t.join("")},normalizeIPv4:i,normalizeIPv6:a,stringArrayToHexStripped:o}},4874:(e,t,r)=>{"use strict";const n=r(793);e.exports=u;const s=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},i={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:g,res:g,err:h,errWithCause:h};function o(e,t){return"silent"===e?1/0:t.levels.values[e]}const a=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),d={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(e,t){const r={logger:t,parent:e[c]};t[c]=r}function u(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||s;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n);let c=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(c=!1);const h=Object.keys(e.customLevels||{}),g=["error","fatal","warn","info","debug","trace"].concat(h);"function"==typeof r&&g.forEach((function(e){r[e]=r})),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const b=e.level||"info",w=Object.create(r);w.log||(w.log=v),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:s[e]||s[d[e]||"log"]||v})),e[a]=n}(w,g,r),l({},w),Object.defineProperty(w,"levelVal",{get:function(){return o(this.level,this)}}),Object.defineProperty(w,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,p(this,$,w,"error"),p(this,$,w,"fatal"),p(this,$,w,"warn"),p(this,$,w,"info"),p(this,$,w,"debug"),p(this,$,w,"trace"),h.forEach((e=>{p(this,$,w,e)}))}});const $={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||v};function _(r,s,o){if(!s)throw new Error("missing bindings for child Pino");o=o||{},i&&s.serializers&&(o.serializers=s.serializers);const a=o.serializers;if(i&&a){var c=Object.assign({},n,a),d=!0===e.browser.serialize?Object.keys(c):i;delete s.serializers,f([s],d,c,this._stdErrSerialize)}function u(e){this._childLevel=1+(0|e._childLevel),this.bindings=s,c&&(this.serializers=c,this._serialize=d),t&&(this._logEvent=m([].concat(e._logEvent.bindings,s)))}u.prototype=this;const p=new u(this);return l(this,p),p.child=function(...e){return _.call(this,r,...e)},p.level=o.level||this.level,r.onChild(p),p}return w.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},u.levels.values,t),labels:Object.assign({},u.levels.labels,function(e){const t={};return Object.keys(e).forEach((function(r){t[e[r]]=r})),t}(t))}}(e),w.level=b,w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=v,w.serializers=n,w._serialize=i,w._stdErrSerialize=c,w.child=function(...e){return _.call(this,$,...e)},t&&(w._logEvent=m()),w}function p(e,t,r,i){if(Object.defineProperty(e,i,{value:o(e.level,r)>o(i,r)?v:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===v){if(!t.transmit)return;const n=o(t.transmit.level||e.level,r);if(o(i,r)<n)return}e[i]=function(e,t,r,i){return c=e[a][i],function(){const a=t.timestamp(),d=new Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===s?s:this;for(var u=0;u<d.length;u++)d[u]=arguments[u];var p=!1;if(t.serialize&&(f(d,this._serialize,this.serializers,this._stdErrSerialize),p=!0),t.asObject||t.formatters?c.call(l,function(e,t,r,s,i){const{level:o,log:a=e=>e}=i.formatters||{},c=r.slice();let d=c[0];const l={};if(s&&(l.time=s),o){const r=o(t,e.levels.values[t]);Object.assign(l,r)}else l.level=e.levels.values[t];let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==d&&"object"==typeof d){for(;u--&&"object"==typeof c[0];)Object.assign(l,c.shift());d=c.length?n(c.shift(),c):void 0}else"string"==typeof d&&(d=n(c.shift(),c));return void 0!==d&&(l[i.messageKey]=d),a(l)}(this,i,d,a,t)):c.apply(l,d),t.transmit){const n=t.transmit.level||e._level,s=o(n,r),c=o(i,r);if(c<s)return;!function(e,t,r,n=!1){const s=t.send,i=t.ts,o=t.methodLevel,a=t.methodValue,c=t.val,d=e._logEvent.bindings;n||f(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter((function(e){return-1===d.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=a,s(o,e._logEvent,c),e._logEvent=m(d)}(this,{ts:a,methodLevel:i,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:o(e._level,r)},d,p)}};var c}(e,t,r,i);const d=function(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[c];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==d.length&&(e[i]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(d,e[i]))}function f(e,t,r,n){for(const s in e)if(n&&e[s]instanceof Error)e[s]=u.stdSerializers.err(e[s]);else if("object"==typeof e[s]&&!Array.isArray(e[s])&&t)for(const n in e[s])t.indexOf(n)>-1&&n in r&&(e[s][n]=r[n](e[s][n]))}function m(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function h(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}function y(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?w:$}function g(){return{}}function b(e){return e}function v(){}function w(){return!1}function $(){return Date.now()}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=i,u.stdTimeFunctions=Object.assign({},{nullTime:w,epochTime:$,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=u,e.exports.pino=u},4914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i=r(4227),o=r(4227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:d}=e,{opts:l}=d,u=(0,n.allSchemaProperties)(r),p=u.filter((e=>(0,i.alwaysValidSchema)(d,r[e])));if(0===u.length||p.length===u.length&&(!d.opts.unevaluated||!0===d.props))return;const f=l.strictSchema&&!l.allowMatchingProperties&&c.properties,m=t.name("valid");!0===d.props||d.props instanceof s.Name||(d.props=(0,o.evaluatedPropsToName)(t,d.props));const{props:h}=d;function y(e){for(const t in f)new RegExp(e).test(t)&&(0,i.checkStrictMode)(d,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(i=>{t.if(s._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:o.Type.Str},m),d.opts.unevaluated&&!0!==h?t.assign(s._`${h}[${i}]`,!0):n||d.allErrors||t.if((0,s.not)(m),(()=>t.break()))}))}))}!function(){for(const e of u)f&&y(e),d.allErrors?g(e):(t.var(m,!0),g(e),t.if(m))}()}};t.default=a},5354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(494),s={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=s},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9029),s=r(4227),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?o(e,n):(0,s.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:r,schema:i,data:o,keyword:a,it:c}=e;c.items=!0;const d=r.const("len",n._`${o}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${d} <= ${t.length}`);else if("object"==typeof i&&!(0,s.alwaysValidSchema)(c,i)){const i=r.var("valid",n._`${d} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,d,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:s.Type.Num},i),c.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=o,t.default=i},5765:(e,t,r)=>{"use strict";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 n=r(9029),s=r(4227),i=r(2023),o=r(4227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function d(e,t,r,s){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return s?(0,n.or)(i,(0,n.not)(c(e,t,r))):i}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:s,it:i}=e;r.if(d(r,s,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},s,i){return(0,n.or)(...s.map((s=>(0,n.and)(d(e,t,s,r.ownProperties),n._`${i} = ${s}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,s){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return s?n._`${i} && ${c(e,t,r)}`:i},t.noPropertyInData=d,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,s.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:o,errorPath:a},it:c},d,l,u){const p=u?n._`${e}, ${t}, ${s}${o}`:t,f=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,a)],[i.default.parentData,c.parentData],[i.default.parentDataProperty,c.parentDataProperty],[i.default.rootData,i.default.rootData]];c.opts.dynamicRef&&f.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const m=n._`${p}, ${r.object(...f)}`;return l!==n.nil?n._`${d}.call(${l}, ${m})`:n._`${d}(${m})`};const u=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const s=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?u:(0,o.useFunc)(e,i)}(${r}, ${s})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(o){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:s.Type.Num},a),t.if((0,n.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,s.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const o=e.subschema({keyword:i,schemaProp:s,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(o,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},5844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),s={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(s,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(o)}))}};t.default=s},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=n.operators,i={maximum:{okStr:"<=",ok:s.LTE,fail:s.GT},minimum:{okStr:">=",ok:s.GTE,fail:s.LT},exclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},exclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(n._`${r} ${i[t].fail} ${s} || isNaN(${r})`)}};t.default=a},5944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8343);n.code='require("ajv/dist/runtime/uri").default',t.default=n},6022:e=>{!function(){"use strict";var t=[,function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.lengthOf=t.keysOf=t.isObject=t.isInfOrNaN=t.isFunction=t.isArguments=t.hasOwn=t.handleError=t.convertMapToObject=t.checkError=void 0,t.isFunction=function(e){return"function"==typeof e},t.isObject=function(e){return"object"===n(e)},t.keysOf=function(e){return Object.keys(e)},t.lengthOf=function(e){return Object.keys(e).length};var s=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=s,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var n,s,i=(s=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i=[],o=!0,a=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){a=!0,s=e}finally{try{o||null==r.return||r.return()}finally{if(a)throw s}}return i}}(n,s)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(n,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],a=i[1];return e[o]=a,e}),{})},t.isArguments=function(e){return null!=e&&s(e,"callee")},t.isInfOrNaN=function(e){return Number.isNaN(e)||e===1/0||e===-1/0};var i={maxStack:function(e){return new RegExp("Maximum call stack size exceeded","g").test(e)}};t.checkError=i,t.handleError=function(e){return function(){try{return e.apply(this,arguments)}catch(e){if(i.maxStack(e.message))throw new Error("Converting circular structure to JSON");throw e}}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Base64=void 0;for(var r=Object.create(null),n=function(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)},s=0;s<64;s++)r[n(s)]=s;var i=function(e){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var t=[],r=0;r<e;r++)t.push(0);return t.$Uint8ArrayPolyfill=!0,t}return new Uint8Array(new ArrayBuffer(e))},o={encode:function(e){if("string"==typeof e){var t=e;e=i(t.length);for(var r=0;r<t.length;r++){var s=t.charCodeAt(r);if(s>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=s}}for(var o=[],a=null,c=null,d=null,l=null,u=0;u<e.length;u++)switch(u%3){case 0:a=e[u]>>2&63,c=(3&e[u])<<4;break;case 1:c|=e[u]>>4&15,d=(15&e[u])<<2;break;case 2:d|=e[u]>>6&3,l=63&e[u],o.push(n(a)),o.push(n(c)),o.push(n(d)),o.push(n(l)),a=null,c=null,d=null,l=null}return null!=a&&(o.push(n(a)),o.push(n(c)),null==d?o.push("="):o.push(n(d)),null==l&&o.push("=")),o.join("")},decode:function(e){var t=Math.floor(3*e.length/4);"="==e.charAt(e.length-1)&&(t--,"="==e.charAt(e.length-2)&&t--);for(var n,s=i(t),o=null,a=null,c=null,d=0,l=0;l<e.length;l++){var u="="===(n=e.charAt(l))?-1:r[n];switch(l%4){case 0:if(u<0)throw new Error("invalid base64 string");o=u<<2;break;case 1:if(u<0)throw new Error("invalid base64 string");o|=u>>4,s[d++]=o,a=(15&u)<<4;break;case 2:u>=0&&(a|=u>>2,s[d++]=a,c=(3&u)<<6);break;case 3:u>=0&&(s[d++]=c|u)}}return s},newBinary:i};t.Base64=o},function(e){e.exports={_noYieldsAllowed:function(e){return e()}}},function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function e(t,s,i,o,a){var c=s[t];switch(r(c)){case"string":return n(c);case"number":return isFinite(c)?String(c):"null";case"boolean":return String(c);case"object":if(!c)return"null";var d,l=o+i,u=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var p=c.length,f=0;f<p;f+=1)u[f]=e(f,c,i,l,a)||"null";return d=0===u.length?"[]":l?"[\n"+l+u.join(",\n"+l)+"\n"+o+"]":"["+u.join(",")+"]"}var m=Object.keys(c);return a&&(m=m.sort()),m.forEach((function(t){(d=e(t,c,i,l,a))&&u.push(n(t)+(l?": ":":")+d)})),d=0===u.length?"{}":l?"{\n"+l+u.join(",\n"+l)+"\n"+o+"}":"{"+u.join(",")+"}"}};t.default=function(e,t){var r=Object.assign({indent:"",canonical:!1},t);if(!0===r.indent)r.indent=" ";else if("number"==typeof r.indent){for(var n="",i=0;i<r.indent;i++)n+=" ";r.indent=n}return s("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function n(e){var s=r[e];if(void 0!==s)return s.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}var s={};!function(){var e=s,t=n(2).Base64,r=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var i=n(1),o={};e.EJSON=o;var a=new Map;o.addType=function(e,t){if(a.has(e))throw new Error("Type ".concat(e," already present"));a.set(e,t)};var c=[{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$date")&&1===(0,i.lengthOf)(e)},matchObject:function(e){return e instanceof Date},toJSONValue:function(e){return{$date:e.getTime()}},fromJSONValue:function(e){return new Date(e.$date)}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$regexp")&&(0,i.hasOwn)(e,"$flags")&&2===(0,i.lengthOf)(e)},matchObject:function(e){return e instanceof RegExp},toJSONValue:function(e){return{$regexp:e.source,$flags:e.flags}},fromJSONValue:function(e){return new RegExp(e.$regexp,e.$flags.slice(0,50).replace(/[^gimuy]/g,"").replace(/(.)(?=.*\1)/g,""))}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$InfNaN")&&1===(0,i.lengthOf)(e)},matchObject:i.isInfOrNaN,toJSONValue:function(e){return{$InfNaN:Number.isNaN(e)?0:e===1/0?1:-1}},fromJSONValue:function(e){return e.$InfNaN/0}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$binary")&&1===(0,i.lengthOf)(e)},matchObject:function(e){return"undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&(0,i.hasOwn)(e,"$Uint8ArrayPolyfill")},toJSONValue:function(e){return{$binary:t.encode(e)}},fromJSONValue:function(e){return t.decode(e.$binary)}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$escape")&&1===(0,i.lengthOf)(e)},matchObject:function(e){var t=!1;if(e){var r=(0,i.lengthOf)(e);1!==r&&2!==r||(t=c.some((function(t){return t.matchJSONValue(e)})))}return t},toJSONValue:function(e){var t={};return(0,i.keysOf)(e).forEach((function(r){t[r]=o.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,i.keysOf)(e.$escape).forEach((function(r){t[r]=o.fromJSONValue(e.$escape[r])})),t}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$type")&&(0,i.hasOwn)(e,"$value")&&2===(0,i.lengthOf)(e)},matchObject:function(e){return o._isCustomType(e)},toJSONValue:function(e){var t=r._noYieldsAllowed((function(){return e.toJSONValue()}));return{$type:e.typeName(),$value:t}},fromJSONValue:function(e){var t=e.$type;if(!a.has(t))throw new Error("Custom EJSON type ".concat(t," is not defined"));var n=a.get(t);return r._noYieldsAllowed((function(){return n(e.$value)}))}}];o._isCustomType=function(e){return e&&(0,i.isFunction)(e.toJSONValue)&&(0,i.isFunction)(e.typeName)&&a.has(e.typeName())},o._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,i.convertMapToObject)(a)},o._getConverters=function(){return c};var d=function(e){for(var t=0;t<c.length;t++){var r=c[t];if(r.matchObject(e))return r.toJSONValue(e)}},l=function e(t){if(null===t)return null;var r=d(t);return void 0!==r?r:(0,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)||void 0===n||(0,i.isInfOrNaN)(n)){var s=d(n);s?t[r]=s:e(n)}})),t):t};o._adjustTypesToJSONValue=l,o.toJSONValue=function(e){var t=d(e);if(void 0!==t)return t;var r=e;return(0,i.isObject)(e)&&(r=o.clone(e),l(r)),r};var u=function(e){if((0,i.isObject)(e)&&null!==e){var t=(0,i.keysOf)(e);if(t.length<=2&&t.every((function(e){return"string"==typeof e&&"$"===e.substr(0,1)})))for(var r=0;r<c.length;r++){var n=c[r];if(n.matchJSONValue(e))return n.fromJSONValue(e)}}return e},p=function e(t){if(null===t)return null;var r=u(t);return r!==t?r:(0,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)){var s=u(n);if(n!==s)return void(t[r]=s);e(n)}})),t):t};o._adjustTypesFromJSONValue=p,o.fromJSONValue=function(e){var t=u(e);return t===e&&(0,i.isObject)(e)&&(t=o.clone(e),p(t)),t},o.stringify=(0,i.handleError)((function(e,t){var r=o.toJSONValue(e);return t&&(t.canonical||t.indent)?n(4)(r,t):JSON.stringify(r)})),o.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return o.fromJSONValue(JSON.parse(e))},o.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},o.equals=function(e,t,r){var n,s=!(!r||!r.keyOrderSensitive);if(e===t)return!0;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(!e||!t)return!1;if(!(0,i.isObject)(e)||!(0,i.isObject)(t))return!1;if(e instanceof Date&&t instanceof Date)return e.valueOf()===t.valueOf();if(o.isBinary(e)&&o.isBinary(t)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if((0,i.isFunction)(e.equals))return e.equals(t,r);if((0,i.isFunction)(t.equals))return t.equals(e,r);var a,c=Array.isArray(e),d=Array.isArray(t);if(c!==d)return!1;if(c&&d){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!o.equals(e[n],t[n],r))return!1;return!0}switch(o._isCustomType(e)+o._isCustomType(t)){case 1:return!1;case 2:return o.equals(o.toJSONValue(e),o.toJSONValue(t))}var l=(0,i.keysOf)(e),u=(0,i.keysOf)(t);return s?(n=0,a=l.every((function(s){return!(n>=u.length||s!==u[n]||!o.equals(e[s],t[u[n]],r)||(n++,0))}))):(n=0,a=l.every((function(s){return!!(0,i.hasOwn)(t,s)&&!!o.equals(e[s],t[s],r)&&(n++,!0)}))),a&&n===u.length},o.clone=function(e){var t;if(!(0,i.isObject)(e))return e;if(null===e)return null;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return e;if(o.isBinary(e)){t=o.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(o.clone):(0,i.isArguments)(e)?Array.from(e).map(o.clone):(0,i.isFunction)(e.clone)?e.clone():o._isCustomType(e)?o.fromJSONValue(o.clone(o.toJSONValue(e)),!0):(t={},(0,i.keysOf)(e).forEach((function(r){t[r]=o.clone(e[r])})),t)},o.newBinary=t.newBinary}(),e.exports=s.EJSON}()},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2128),s=r(7060),i=r(6378),o=r(7532),a=r(9857),c=[n.default,s.default,(0,i.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&i.discriminator)return;const a=r,c=t.let("valid",!1),d=t.let("passing",null),l=t.name("_valid");e.setParams({passing:d}),t.block((function(){a.forEach(((r,i)=>{let a;(0,s.alwaysValidSchema)(o,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},l),i>0&&t.if(n._`${l} && ${c}`).assign(c,!1).assign(d,n._`[${d}, ${i}]`).else(),t.if(l,(()=>{t.assign(c,!0),t.assign(d,i),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},6250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},6378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5457),s=r(5354),i=r(494),o=r(3966),a=r(2661),c=r(3025),d=r(9713),l=r(8660),u=r(117),p=r(5333),f=r(7923),m=r(6505),h=r(6163),y=r(5844),g=r(1239),b=r(4426);t.default=function(e=!1){const t=[f.default,m.default,h.default,y.default,g.default,b.default,d.default,l.default,c.default,u.default,p.default];return e?t.push(s.default,o.default):t.push(n.default,i.default),t.push(a.default),t}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(3282),s=r(9029),i=s.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},a={message:({keyword:e,schemaCode:t})=>s.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>s._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:i,keyword:a,it:c}=e,{opts:d,self:l}=c;if(!d.validateFormats)return;const u=new n.KeywordCxt(c,l.RULES.all.format.definition,"format");function p(e){return s._`${e}.compare(${r}, ${i}) ${o[a].fail} 0`}u.$data?function(){const r=t.scopeValue("formats",{ref:l.formats,code:d.code.formats}),n=t.const("fmt",s._`${r}[${u.schemaCode}]`);e.fail$data((0,s.or)(s._`typeof ${n} != "object"`,s._`${n} instanceof RegExp`,s._`typeof ${n}.compare != "function"`,p(n)))}():function(){const r=u.schema,n=l.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const i=t.scopeValue("formats",{key:r,ref:n,code:d.code.formats?s._`${d.code.formats}${(0,s.getProperty)(r)}`:void 0});e.fail$data(p(i))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(5765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},6653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(7652),i=r(3835),o=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===s.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:d,it:l}=e,{oneOf:u}=d;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=c.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),m=t.const("tag",n._`${r}${(0,n.getProperty)(p)}`);function h(r){const s=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},s);return e.mergeEvaluated(i,n.Name),s}t.if(n._`typeof ${m} == "string"`,(()=>function(){const r=function(){var e;const t={},r=s(d);let n=!0;for(let t=0;t<u.length;t++){let d=u[t];if((null==d?void 0:d.$ref)&&!(0,a.schemaHasRulesButRef)(d,l.self.RULES)){const e=d.$ref;if(d=i.resolveRef.call(l.self,l.schemaEnv.root,l.baseId,e),d instanceof i.SchemaEnv&&(d=d.schema),void 0===d)throw new o.default(l.opts.uriResolver,l.baseId,e)}const f=null===(e=null==d?void 0:d.properties)||void 0===e?void 0:e[p];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);n=n&&(r||s(d)),c(f,t)}if(!n)throw new Error(`discriminator: "${p}" must be required`);return t;function s({required:e}){return Array.isArray(e)&&e.includes(p)}function c(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${m} === ${e}`),t.assign(f,h(r[e]));t.else(),e.error(!1,{discrError:s.DiscrError.Mapping,tag:m,tagName:p}),t.endIf()}()),(()=>e.error(!1,{discrError:s.DiscrError.Tag,tag:m,tagName:p}))),e.ok(f)}};t.default=c},6939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(4227),s=r(2017),i=r(7106),o=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 a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.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++,!o.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=d(e))),t===1/0))return 1/0}return t}function l(e,t="",r){!1!==r&&(t=f(t));const n=e.parse(t);return u(e,n)}function u(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=l,t._getFullPath=u;const p=/#\/?$/;function f(e){return e?e.replace(p,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,r){return r=f(r),e.resolve(t,r)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,o=f(e[r]||t),a={"":o},c=l(n,o,!1),d={},u=new Set;return i(e,{allKeys:!0},((e,t,n,s)=>{if(void 0===s)return;const i=c+t;let o=a[s];function l(t){const r=this.opts.uriResolver.resolve;if(t=f(o?r(o,t):t),u.has(t))throw h(t);u.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==f(i)&&("#"===t[0]?(p(e,d[t],t),d[t]=e):this.refs[t]=i),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}"string"==typeof e[r]&&(o=l.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=o})),d;function p(e,t,r){if(void 0!==t&&!s(e,t))throw h(r)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function s(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,s)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var s,i,o,d;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(s=c(e))>0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,d=l,console&&console.warn&&console.warn(d)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=l.bind(n);return s.listener=r,n.wrapFn=s,s}function p(e,t,r){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):m(s,s.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function h(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function s(i){n.once&&e.removeEventListener(t,s),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,i=this._events;if(void 0!==i)s=s&&void 0===i.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var d=c.length,l=m(c,d);for(r=0;r<d;++r)n(l[r],this,t)}return!0},i.prototype.addListener=function(e,t){return d(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return d(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,s,i,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,s=i;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(s=i[n])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5882),s=r(3439),i=r(7307),o=r(422),a=r(4486),c=r(4003),d=r(1163),l=r(617),u=r(7935),p=r(8643),f=[n.default,s.default,i.default,o.default,a.default,c.default,d.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,p.default];t.default=f},7106:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,s,i,o,a,c,d,l,u){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in n(i,o,a,c,d,l,u),i){var f=i[p];if(Array.isArray(f)){if(p in t.arrayKeywords)for(var m=0;m<f.length;m++)r(e,n,s,f[m],o+"/"+p+"/"+m,a,o,p,i,m)}else if(p in t.propsKeywords){if(f&&"object"==typeof f)for(var h in f)r(e,n,s,f[h],o+"/"+p+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,p,i,h)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,s,f,o+"/"+p,a,o,p,i)}s(i,o,a,c,d,l,u)}}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}},7307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(3853),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,d=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,s.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${d} ${c} ${o}`)}};t.default=o},7532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(4737).default];t.default=n},7652:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},7845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(1520);class s extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i||(t.UsedValueState=i={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.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=o;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(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 n=this.toName(e),{prefix:s}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[s];if(o){const e=o.get(i);if(e)return e}else o=this._values[s]=new Map;o.set(i,n);const a=this._scope[s]||(this._scope[s]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:s,itemIndex:c}),n}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 n._`${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,o={},a){let c=n.nil;for(const d in e){const l=e[d];if(!l)continue;const u=o[d]=o[d]||new Map;l.forEach((e=>{if(u.has(e))return;u.set(e,i.Started);let o=r(e);if(o){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new s(e);c=n._`${c}${o}${this.opts._n}`}u.set(e,i.Completed)}))}return c}}},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(9029),s=r(4227);function i(e,t,r){const{gen:i,compositeRule:o,data:a,opts:c}=e;if(void 0===r)return;const d=n._`${a}${(0,n.getProperty)(t)}`;if(o)return void(0,s.checkStrictMode)(e,`default is ignored for: ${d}`);let l=n._`${d} === undefined`;"empty"===c.useDefaults&&(l=n._`${l} || ${d} === null || ${d} === ""`),i.if(l,n._`${d} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},7887:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(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},n){const s=t.RULES.types[n];return s&&!0!==s&&r(e,s)},t.shouldUseGroup=r,t.shouldUseRule=n},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),s={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:s}=e;if((0,n.alwaysValidSchema)(s,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=s},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(6250),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,s.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=o},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4018),s=r(6461),i=r(9029),o=new i.Name("fullFormats"),a=new i.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,n.fullFormats,o),e;const[r,i]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,o];return d(e,t.formats||n.formatNames,r,i),t.keywords&&(0,s.default)(e),e};function d(e,t,r,n){var s,o;null!==(s=(o=e.opts.code).formats)&&void 0!==s||(o.formats=i._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}c.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},8343:(e,t,r)=>{"use strict";const{normalizeIPv6:n,normalizeIPv4:s,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:a}=r(4834),c=r(343);function d(e,t,r,n){const s={};return n||(e=f(l(e,r),r),t=f(l(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=i(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=i(t.path||""),s.query=t.query):(t.path?("/"===t.path.charAt(0)?s.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:s.path=t.path:s.path="/"+t.path,s.path=i(s.path)),s.query=t.query):(s.path=e.path,void 0!==t.query?s.query=t.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function l(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:""},n=Object.assign({},t),s=[],a=c[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&s.push(r.scheme,":");const d=o(r);if(void 0!==d&&("suffix"!==n.reference&&s.push("//"),s.push(d),r.path&&"/"!==r.path.charAt(0)&&s.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===d&&(e=e.replace(/^\/\//u,"/%2F")),s.push(e)}return void 0!==r.query&&s.push("?",r.query),void 0!==r.fragment&&s.push("#",r.fragment),s.join("")}const u=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function f(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const d=e.match(p);if(d){if(i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||"",i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]),i.host){const e=s(i.host);if(!1===e.isIPV4){const t=n(e.host);i.host=t.host.toLowerCase(),a=t.isIPV6}else i.host=e.host,a=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const e=c[(r.scheme||i.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&i.host&&(r.domainHost||e&&e.domainHost)&&!1===a&&function(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||u[t])return!0;return!1}(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(o&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),o&&void 0!==i.host&&(i.host=unescape(i.host)),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),e&&e.parse&&e.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}const m={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=l(f(e,t),t):"object"==typeof e&&(e=f(l(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return l(d(f(e,n),f(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:d,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=l(a(f(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=l(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=l(a(f(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=l(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:l,parse:f};e.exports=m,e.exports.default=m,e.exports.fastUri=m},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(6250),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:o,schema:a,schemaCode:c,it:d}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=d.opts.loopEnum;let u;const p=()=>null!=u?u:u=(0,s.useFunc)(t,i.default);let f;if(l||o)f=t.let("valid"),e.block$data(f,(function(){t.assign(f,!1),t.forOf("v",c,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);f=(0,n.or)(...a.map(((t,s)=>function(e,t){const s=a[t];return"object"==typeof s&&null!==s?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${s}`}(e,s))))}e.pass(f)}};t.default=o},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i=r(2023),o=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>s._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:d,it:l}=e;if(!d)throw new Error("ajv implementation error");const{allErrors:u,opts:p}=l;if(l.props=!0,"all"!==p.removeAdditional&&(0,o.alwaysValidSchema)(l,r))return;const f=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(s._`delete ${c}[${e}]`)}function y(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)h(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(u||t.break());if("object"==typeof r&&!(0,o.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===p.removeAdditional?(g(n,r,!1),t.if((0,s.not)(r),(()=>{e.reset(),h(n)}))):(g(n,r),u||t.if((0,s.not)(r),(()=>t.break())))}}}function g(t,r,n){const s={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,r)}t.forIn("key",c,(r=>{f.length||m.length?t.if(function(r){let i;if(f.length>8){const e=(0,o.schemaRefOrVal)(l,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=f.length?(0,s.or)(...f.map((e=>s._`${r} === ${e}`))):s.nil;return m.length&&(i=(0,s.or)(i,...m.map((t=>s._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,s.not)(i)}(r),(()=>y(r))):y(r)})),e.ok(s._`${d} === ${i.default.errors}`)}};t.default=a},8708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(9029),s=r(4227),i=r(2023);function o(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function a(e,t){const{gen:r,validateName:s,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${s}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,s,i){const{it:c}=e,{gen:l,compositeRule:u,allErrors:p}=c,f=d(e,r,s);(null!=i?i:u||p)?o(l,f):a(c,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:s}=e,{gen:c,compositeRule:l,allErrors:u}=s;o(c,d(e,r,n)),l||u||a(s,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:s,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,i.default.errors,(o=>{e.const(c,n._`${i.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(i.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,s))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function d(e,t,r){const{createErrors:s}=e.it;return!1===s?n._`{}`:function(e,t,r={}){const{gen:s,it:o}=e,a=[l(o,r),u(e,r)];return function(e,{params:t,message:r},s){const{keyword:o,data:a,schemaValue:d,it:l}=e,{opts:u,propertyName:p,topSchemaRef:f,schemaPath:m}=l;s.push([c.keyword,o],[c.params,"function"==typeof t?t(e):t||n._`{}`]),u.messages&&s.push([c.message,"function"==typeof r?r(e):r]),u.verbose&&s.push([c.schema,d],[c.parentSchema,n._`${f}${m}`],[i.default.data,a]),p&&s.push([c.propertyName,p])}(e,t,a),s.object(...a)}(e,t,r)}function l({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,s.getErrorPath)(t,s.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function u({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let o=i?t:n.str`${t}/${e}`;return r&&(o=n.str`${o}${(0,s.getErrorPath)(r,s.Type.Str)}`),[c.schemaPath,o]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(8708),s=r(9029),i=r(2023),o={message:"boolean schema is false"};function a(e,t){const{gen:r,data:s}=e,i={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(i.default.data):(t.assign(s._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},9029:(e,t,r)=>{"use strict";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 n=r(1520),s=r(7845);var i=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var o=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?s.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class d extends a{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 n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return N(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class l extends d{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends a{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=R(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class h extends a{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 n=r.length;for(;n--;){const s=r[n];s.optimizeNames(e,t)||(I(e,s.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>k(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class b extends y{}b.kind="else";class v 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 b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(C(e),t instanceof v?[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=R(this.condition,e,t),this}get names(){const e=super.names;return N(e,this.condition),this.else&&k(e,this.else.names),e}}v.kind="if";class w extends y{}w.kind="for";class $ extends w{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=R(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}}class _ extends w{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?s.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=N(super.names,this.from);return N(e,this.to)}}class j extends w{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}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=R(this.iterable,e,t),this}get names(){return k(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 O extends h{render(e){return"return "+super.render(e)}}O.kind="return";class P 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,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}}class S extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}S.kind="catch";class T extends y{render(e){return"finally"+super.render(e)}}function k(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function N(e,t){return t instanceof n._CodeOrName?k(e,t.names):e}function R(e,t,r){return e instanceof n.Name?i(e):(s=e)instanceof n._Code&&s._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var s;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function I(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function C(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${D(e)}`}T.kind="finally",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 s.Scope({parent:e}),this._nodes=[new g]}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,n){const s=this._scope.toName(t);return void 0!==r&&n&&(this._constants[s.str]=r),this._leafNode(new c(e,s,r)),s}const(e,t,r){return this._def(s.varKinds.const,e,t,r)}let(e,t,r){return this._def(s.varKinds.let,e,t,r)}var(e,t,r){return this._def(s.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new d(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[r,s]of e)t.length>1&&t.push(","),t.push(r),(r!==s||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,s));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new v(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 v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new $(e),t)}forRange(e,t,r,n,i=(this.opts.es5?s.varKinds.var:s.varKinds.let)){const o=this._scope.toName(e);return this._for(new _(i,o,t,r),(()=>n(o)))}forOf(e,t,r,i=s.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),r(o)}))}return this._for(new j("of",i,o,t),(()=>r(o)))}forIn(e,t,r,i=(this.opts.es5?s.varKinds.var:s.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new j("in",i,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new O;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new P;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new S(e),t(e)}return r&&(this._currNode=n.finally=new T,this.code(r)),this._endBlockNode(S,T)}throw(e){return this._leafNode(new f(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=n.nil,r,s){return this._blockNode(new E(e,t,r)),s&&this.code(s).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 v))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=C;const A=q(t.operators.AND);t.and=function(...e){return e.reduce(A)};const x=q(t.operators.OR);function q(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(x)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:o}=e;if((0,s.alwaysValidSchema)(o,r))return;const a=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=i},9857:(e,t)=>{"use strict";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"]}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.d(n,{default:()=>Ut});var e={};r.r(e),r.d(e,{hasBrowserEnv:()=>pe,hasStandardBrowserEnv:()=>me,hasStandardBrowserWebWorkerEnv:()=>he,navigator:()=>fe,origin:()=>ye});var t=r(7007),s=r(3282),i=r(8182);function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:c}=Object,d=(l=Object.create(null),e=>{const t=a.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const u=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:f}=Array,m=p("undefined"),h=u("ArrayBuffer"),y=p("string"),g=p("function"),b=p("number"),v=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==d(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},$=u("Date"),_=u("File"),j=u("Blob"),E=u("FileList"),O=u("URLSearchParams"),[P,S,T,k]=["ReadableStream","Request","Response","Headers"].map(u);function N(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,s;if("object"!=typeof e&&(e=[e]),f(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let o;for(n=0;n<i;n++)o=s[n],t.call(null,e[o],o,e)}}function R(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,s=r.length;for(;s-- >0;)if(n=r[s],t===n.toLowerCase())return n;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,C=e=>!m(e)&&e!==I,A=(x="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>x&&e instanceof x);var x;const q=u("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),L=u("RegExp"),U=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};N(r,((r,s)=>{let i;!1!==(i=t(r,s,e))&&(n[s]=i||r)})),Object.defineProperties(e,n)},z=u("AsyncFunction"),M=(F="function"==typeof setImmediate,V=g(I.postMessage),F?setImmediate:V?(B=`axios@${Math.random()}`,J=[],I.addEventListener("message",(({source:e,data:t})=>{e===I&&t===B&&J.length&&J.shift()()}),!1),e=>{J.push(e),I.postMessage(B,"*")}):e=>setTimeout(e));var F,V,B,J;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||M,G={isArray:f,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!m(e)&&null!==e.constructor&&!m(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=d(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:y,isNumber:b,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:w,isReadableStream:P,isRequest:S,isResponse:T,isHeaders:k,isUndefined:m,isDate:$,isFile:_,isBlob:j,isRegExp:L,isFunction:g,isStream:e=>v(e)&&g(e.pipe),isURLSearchParams:O,isTypedArray:A,isFileList:E,forEach:N,merge:function e(){const{caseless:t}=C(this)&&this||{},r={},n=(n,s)=>{const i=t&&R(r,s)||s;w(r[i])&&w(n)?r[i]=e(r[i],n):w(n)?r[i]=e({},n):f(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(N(t,((t,n)=>{r&&g(t)?e[n]=o(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let s,i,o;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],n&&!n(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==r&&c(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:u,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!b(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:q,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:U,freezeMethods:e=>{U(e,((t,r)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];g(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return f(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:I,isContextDefined:C,isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const s=f(e)?[]:{};return N(e,((e,t)=>{const i=r(e,n+1);!m(i)&&(s[t]=i)})),t[n]=void 0,s}}return e};return r(e,0)},isAsyncFn:z,isThenable:e=>e&&(v(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:M,asap:K};function H(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}G.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const W=H.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(H,X),Object.defineProperty(W,"isAxiosError",{value:!0}),H.from=(e,t,r,n,s,i)=>{const o=Object.create(W);return G.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(o,e.message,t,r,n,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Y=H;function Z(e){return G.isPlainObject(e)||G.isArray(e)}function Q(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,r){return e?e.concat(t).map((function(e,t){return e=Q(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const te=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)})),re=function(e,t,r){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,s=r.visitor||d,i=r.dots,o=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,r,s){let a=e;if(e&&!s&&"object"==typeof e)if(G.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(r,"[]"))&&(a=G.toArray(e)))return r=Q(r),a.forEach((function(e,n){!G.isUndefined(e)&&null!==e&&t.append(!0===o?ee([r],n,i):null===o?r:r+"[]",c(e))})),!1;return!!Z(e)||(t.append(ee(s,r,i),c(e)),!1)}const l=[],u=Object.assign(te,{defaultVisitor:d,convertValue:c,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!G.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),G.forEach(r,(function(r,i){!0===(!(G.isUndefined(r)||null===r)&&s.call(t,r,G.isString(i)?i.trim():i,n,u))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function se(e,t){this._pairs=[],e&&re(e,this,t)}const ie=se.prototype;ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const oe=se;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,r){if(!t)return e;const n=r&&r.encode||ae;G.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(i=s?s(t,r):G.isURLSearchParams(t)?t.toString():new oe(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const de=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pe="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,me=pe&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ye=pe&&window.location.href||"http://localhost",ge={...e,...ue},be=function(e){function t(e,r,n,s){let i=e[s++];if("__proto__"===i)return!0;const o=Number.isFinite(+i),a=s>=e.length;return i=!i&&G.isArray(n)?n.length:i,a?(G.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!o):(n[i]&&G.isObject(n[i])||(n[i]=[]),t(e,r,n[i],s)&&G.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],t[i]=e[i];return t}(n[i])),!o)}if(G.isFormData(e)&&G.isFunction(e.entries)){const r={};return G.forEachEntry(e,((e,n)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},ve={transitional:le,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,s=G.isObject(e);if(s&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return n?JSON.stringify(be(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return re(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ge.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return re(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),function(e){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ve.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{ve.headers[e]={}}));const we=ve,$e=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_e=Symbol("internals");function je(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return!1===e||null==e?e:G.isArray(e)?e.map(Ee):String(e)}function Oe(e,t,r,n,s){return G.isFunction(n)?n.call(this,t,r):(s&&(t=r),G.isString(t)?G.isString(n)?-1!==t.indexOf(n):G.isRegExp(n)?n.test(t):void 0:void 0)}class Pe{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(e,t,r){const s=je(t);if(!s)throw new Error("header name must be a non-empty string");const i=G.findKey(n,s);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Ee(e))}const i=(e,t)=>G.forEach(e,((e,r)=>s(e,r,t)));if(G.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),r=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!r||t[r]&&$e[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(G.isHeaders(e))for(const[t,n]of e.entries())s(n,t,r);else null!=e&&s(t,e,r);return this}get(e,t){if(e=je(e)){const r=G.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(G.isFunction(t))return t.call(this,e,r);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=je(e)){const r=G.findKey(this,e);return!(!r||void 0===this[r]||t&&!Oe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function s(e){if(e=je(e)){const s=G.findKey(r,e);!s||t&&!Oe(0,r[s],s,t)||(delete r[s],n=!0)}}return G.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const s=t[r];e&&!Oe(0,this[s],s,e,!0)||(delete this[s],n=!0)}return n}normalize(e){const t=this,r={};return G.forEach(this,((n,s)=>{const i=G.findKey(r,s);if(i)return t[i]=Ee(n),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(s):String(s).trim();o!==s&&delete t[s],t[o]=Ee(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&G.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[_e]=this[_e]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=je(e);t[n]||(function(e,t){const r=G.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,s){return this[n].call(this,t,e,r,s)},configurable:!0})}))}(r,e),t[n]=!0)}return G.isArray(e)?e.forEach(n):n(e),this}}Pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Pe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),G.freezeMethods(Pe);const Se=Pe;function Te(e,t){const r=this||we,n=t||r,s=Se.from(n.headers);let i=n.data;return G.forEach(e,(function(e){i=e.call(r,i,s.normalize(),t?t.status:void 0)})),s.normalize(),i}function ke(e){return!(!e||!e.__CANCEL__)}function Ne(e,t,r){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,r),this.name="CanceledError"}G.inherits(Ne,Y,{__CANCEL__:!0});const Re=Ne;function Ie(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Y("Request failed with status code "+r.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Ce=(e,t,r=3)=>{let n=0;const s=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s,i=0,o=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),d=n[o];s||(s=c),r[i]=a,n[i]=c;let l=o,u=0;for(;l!==i;)u+=r[l++],l%=e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const p=d&&c-d;return p?Math.round(1e3*u/p):void 0}}(50,250);return function(e,t){let r,n,s=0,i=1e3/t;const o=(t,i=Date.now())=>{s=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=i?o(e,t):(r=e,n||(n=setTimeout((()=>{n=null,o(r)}),i-a)))},()=>r&&o(r)]}((r=>{const i=r.loaded,o=r.lengthComputable?r.total:void 0,a=i-n,c=s(a);n=i,e({loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&i<=o?(o-i)/c:void 0,event:r,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),r)},Ae=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},xe=e=>(...t)=>G.asap((()=>e(...t))),qe=ge.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ge.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,De=ge.hasStandardBrowserEnv?{write(e,t,r,n,s,i){const o=[e+"="+encodeURIComponent(t)];G.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),G.isString(n)&&o.push("path="+n),G.isString(s)&&o.push("domain="+s),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof Se?{...e}:e;function ze(e,t){t=t||{};const r={};function n(e,t,r,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function s(e,t,r,s){return G.isUndefined(t)?G.isUndefined(e)?void 0:n(void 0,e,0,s):n(e,t,0,s)}function i(e,t){if(!G.isUndefined(t))return n(void 0,t)}function o(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,s,i){return i in t?n(r,s):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,r)=>s(Ue(e),Ue(t),0,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||s,o=i(e[n],t[n],n);G.isUndefined(o)&&i!==a||(r[n]=o)})),r}const Me=e=>{const t=ze({},e);let r,{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:c}=t;if(t.headers=a=Se.from(a),t.url=ce(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),G.isFormData(n))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(s&&G.isFunction(s)&&(s=s(t)),s||!1!==s&&qe(t.url))){const e=i&&o&&De.read(o);e&&a.set(i,e)}return t},Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Me(e);let s=n.data;const i=Se.from(n.headers).normalize();let o,a,c,d,l,{responseType:u,onUploadProgress:p,onDownloadProgress:f}=n;function m(){d&&d(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=Se.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ie((function(e){t(e),m()}),(function(e){r(e),m()}),{data:u&&"text"!==u&&"json"!==u?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(new Y("Request aborted",Y.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Y("Network Error",Y.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const s=n.transitional||le;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Y(t,s.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,h)),h=null},void 0===s&&i.setContentType(null),"setRequestHeader"in h&&G.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),G.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),u&&"json"!==u&&(h.responseType=n.responseType),f&&([c,l]=Ce(f,!0),h.addEventListener("progress",c)),p&&h.upload&&([a,d]=Ce(p),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",d)),(n.cancelToken||n.signal)&&(o=t=>{h&&(r(!t||t.type?new Re(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ge.protocols.indexOf(g)?r(new Y("Unsupported protocol "+g+":",Y.ERR_BAD_REQUEST,e)):h.send(s||null)}))},Ve=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const s=function(e){if(!r){r=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new Re(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,s(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))}),t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)})),e=null)};e.forEach((e=>e.addEventListener("abort",s)));const{signal:a}=n;return a.unsubscribe=()=>G.asap(o),a}},Be=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,s=0;for(;s<r;)n=s+t,yield e.slice(s,n),s=n},Je=(e,t,r,n)=>{const s=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*Be(r,t)}(e,t);let i,o=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await s.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=o+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},Ke="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ge=Ke&&"function"==typeof ReadableStream,He=Ke&&("function"==typeof TextEncoder?(We=new TextEncoder,e=>We.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var We;const Xe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ye=Ge&&Xe((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ze=Ge&&Xe((()=>G.isReadableStream(new Response("").body))),Qe={stream:Ze&&(e=>e.body)};var et;Ke&&(et=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=G.isFunction(et[e])?t=>t[e]():(t,r)=>{throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,r)})})));const tt={http:null,xhr:Fe,fetch:Ke&&(async e=>{let{url:t,method:r,data:n,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:d,headers:l,withCredentials:u="same-origin",fetchOptions:p}=Me(e);d=d?(d+"").toLowerCase():"text";let f,m=Ve([s,i&&i.toAbortSignal()],o);const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(c&&Ye&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=G.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await He(e)).byteLength:void 0)})(t):r})(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(G.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=Ae(y,Ce(xe(c)));n=Je(r.body,65536,e,t)}}G.isString(u)||(u=u?"include":"omit");const s="credentials"in Request.prototype;f=new Request(t,{...p,signal:m,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:s?u:void 0});let i=await fetch(f);const o=Ze&&("stream"===d||"response"===d);if(Ze&&(a||o&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=G.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&Ae(t,Ce(xe(a),!0))||[];i=new Response(Je(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}d=d||"text";let g=await Qe[G.findKey(Qe,d)||"text"](i,e);return!o&&h&&h(),await new Promise(((t,r)=>{Ie(t,r,{data:g,headers:Se.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,f),{cause:t.cause||t});throw Y.from(t,t&&t.code,e,f)}})};G.forEach(tt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const rt=e=>`- ${e}`,nt=e=>G.isFunction(e)||null===e||!1===e,st=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!nt(r)&&(n=tt[(t=String(r)).toLowerCase()],void 0===n))throw new Y(`Unknown adapter '${t}'`);if(n)break;s[t||"#"+i]=n}if(!n){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(rt).join("\n"):" "+rt(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function ot(e){return it(e),e.headers=Se.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),st(e.adapter||we.adapter)(e).then((function(t){return it(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t}),(function(t){return ke(t)||(it(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)}))}const at={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{at[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ct={};at.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,s,i)=>{if(!1===e)throw new Y(n(s," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!ct[s]&&(ct[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,s,i)}},at.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const dt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const i=n[s],o=t[i];if(o){const t=e[i],r=void 0===t||o(t,i,e);if(!0!==r)throw new Y("option "+i+" must be "+r,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:at},lt=dt.validators;class ut{constructor(e){this.defaults=e,this.interceptors={request:new de,response:new de}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ze(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;void 0!==r&&dt.assertOptions(r,{silentJSONParsing:lt.transitional(lt.boolean),forcedJSONParsing:lt.transitional(lt.boolean),clarifyTimeoutError:lt.transitional(lt.boolean)},!1),null!=n&&(G.isFunction(n)?t.paramsSerializer={serialize:n}:dt.assertOptions(n,{encode:lt.function,serialize:lt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),dt.assertOptions(t,{baseUrl:lt.spelling("baseURL"),withXsrfToken:lt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=s&&G.merge(s.common,s[t.method]);s&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=Se.concat(i,s);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let d;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,u=0;if(!a){const e=[ot.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),l=e.length,d=Promise.resolve(t);u<l;)d=d.then(e[u++],e[u++]);return d}l=o.length;let p=t;for(u=0;u<l;){const e=o[u++],t=o[u++];try{p=e(p)}catch(e){t.call(this,e);break}}try{d=ot.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,l=c.length;u<l;)d=d.then(c[u++],c[u++]);return d}getUri(e){return ce(Le((e=ze(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(e){ut.prototype[e]=function(t,r){return this.request(ze(r||{},{method:e,url:t,data:(r||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,s){return this.request(ze(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ut.prototype[e]=t(),ut.prototype[e+"Form"]=t(!0)}));const pt=ut;class ft{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,s){r.reason||(r.reason=new Re(e,n,s),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ft((function(t){e=t})),cancel:e}}}const mt=ft,ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ht).forEach((([e,t])=>{ht[t]=e}));const yt=ht,gt=function e(t){const r=new pt(t),n=o(pt.prototype.request,r);return G.extend(n,pt.prototype,r,{allOwnKeys:!0}),G.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ze(t,r))},n}(we);gt.Axios=pt,gt.CanceledError=Re,gt.CancelToken=mt,gt.isCancel=ke,gt.VERSION="1.8.4",gt.toFormData=re,gt.AxiosError=Y,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=ze,gt.AxiosHeaders=Se,gt.formToJSON=e=>be(G.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=st,gt.HttpStatusCode=yt,gt.default=gt;const bt=gt;var vt=r(1111);const wt="axios-retry";function $t(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&vt(e)}const _t=["get","head","options"],jt=_t.concat(["put","delete"]);function Et(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Ot(e){return!!e.config?.method&&Et(e)&&-1!==jt.indexOf(e.config.method)}function Pt(e){return $t(e)||Ot(e)}function St(e=void 0){const t=e?.response?.headers["retry-after"];if(!t)return 0;let r=1e3*(Number(t)||0);return 0===r&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}const Tt={retries:3,retryCondition:Pt,retryDelay:function(e=0,t=void 0){return Math.max(0,St(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function kt(e,t,r=!1){const n=function(e,t){return{...Tt,...t,...e[wt]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[wt]=n,n}const Nt=(e,t)=>{const r=e.interceptors.request.use((e=>(kt(e,t,!0),e[wt]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const s=kt(n,t);return r.response&&s.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,s=(e.retryCount||0)<r&&n(t);if("object"==typeof s)try{return!1!==await s}catch(e){return!1}return s}(s,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:s,shouldResetTimeout:i,onRetry:o}=t,a=s(t.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!i&&n.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,s=n.timeout-e-a;if(s<=0)return Promise.reject(r);n.timeout=s}return n.transformRequest=[e=>e],await o(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(s),t(e(n))},s=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,s,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(s,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};Nt.isNetworkError=$t,Nt.isSafeRequestError=function(e){return!!e.config?.method&&Et(e)&&-1!==_t.indexOf(e.config.method)},Nt.isIdempotentRequestError=Ot,Nt.isNetworkOrIdempotentRequestError=Pt,Nt.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,s=Math.max(n,St(t));return s+.2*s*Math.random()},Nt.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,St(r))}},Nt.isRetryableError=Et;const Rt=Nt;var It=r(6022),Ct=r(4874);const At={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!At._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof At.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new At.ObjectID(this._str)}typeName(){return"oid"}getTimestamp(){return Number.parseInt(this._str.substr(0,8),16)}valueOf(){return this._str}toJSONValue(){return this.valueOf()}toHexString(){return this.valueOf()}}},xt=At,qt=[{name:"Enregistrement d'un utilisateur",path:"/co2/person/register",constant:"PERSON_REGISTER",method:"POST",auth:"none",description:"Permet d’enregistrer un nouvel utilisateur avec ses informations personnelles.",contentType:"application/x-www-form-urlencoded",request:{type:"object",description:"Permet d’enregistrer un nouvel utilisateur avec ses informations personnelles.",properties:{name:{type:"string",description:"Nom complet de l'utilisateur"},username:{type:"string",description:"Pseudo ou identifiant unique"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},pwd:{type:"string",description:"Mot de passe"},app:{type:"string",description:"Nom de l'application"},pendingUserId:{type:"string",description:"ID d’un utilisateur en attente (facultatif)"},mode:{type:"string",description:"Mode d’enregistrement"},isInvitation:{type:"boolean",description:"Indique s’il s’agit d’une invitation (facultatif)"}},required:["name","username","email","pwd"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Réponse en cas de succès lors de la création d'un utilisateur",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{type:"string"},person:{type:"object",properties:{name:{type:"string"},username:{type:"string"},pwd:{type:"string"},email:{type:"string",format:"email"},_id:{type:"string"}},required:["name","username","pwd","email","_id"]}},required:["result","msg","id","person"],additionalProperties:!1},{description:"Réponse en cas d'erreur lors de la création d'un utilisateur",type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},{name:"Authentification",path:"/api/cocolight/authenticate",constant:"AUTHENTICATE_URL",method:"POST",auth:"none",description:"Permet de se connecter en utilisant une adresse email et un mot de passe.",contentType:"application/json",postActions:[{type:"setToken",path:"accessToken"},{type:"setRefreshToken",path:"refreshToken"},{type:"setUserId",path:"user.id"},{type:"emitEvent",event:"userLoggedIn",payloadPath:"user"}],request:{type:"object",description:"Permet de se connecter en utilisant une adresse email et un mot de passe.",properties:{email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},password:{type:"string",description:"Mot de passe de l'utilisateur"}},required:["email","password"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après une authentification réussie.",properties:{user:{type:"object",properties:{id:{type:"string",description:"Identifiant unique de l'utilisateur"},username:{type:"string",description:"Pseudo ou nom d'utilisateur"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},timezone:{type:"string",description:"Fuseau horaire de l'utilisateur"},lastLoginDate:{type:"integer",description:"Timestamp Unix du dernier login"},profilImageUrl:{anyOf:[{type:"string",format:"uri"},{type:"string",enum:[""]}],description:"URL de l'image de profil utilisateur, ou chaîne vide"}},required:["id","username","email","roles"],additionalProperties:!1},accessToken:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"},status:{type:"integer",description:"Code de statut personnalisé renvoyé par l'API"}},required:["user","accessToken","refreshToken","status"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (identifiants incorrects)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Rafraîchir un token",path:"/api/cocolight/refreshtoken",constant:"REFRESH_TOKEN_URL",method:"POST",auth:"none",description:"Permet de rafraîchir un token d'accès expiré en utilisant un token de rafraîchissement.",contentType:"application/json",request:{type:"object",description:"Permet de rafraîchir un token d'accès expiré en utilisant un token de rafraîchissement.",properties:{refreshToken:{type:"string",description:"Token de rafraîchissement"}},required:["refreshToken"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après un rafraîchissement réussi.",properties:{token:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"}},required:["token","refreshToken"],additionalProperties:!1},401:{type:"object",description:"Erreur de rafraîchissement (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les informations utilisateur",path:"/api/cocolight/me",constant:"ME_INFO_URL",method:"POST",auth:"bearer",description:"Récupère les informations du profil utilisateur pour un token donné.",contentType:"application/json",responses:{200:{type:"object",description:"Schéma JSON pour les informations détaillées d'un utilisateur.",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},username:{type:"string"},email:{type:"string",format:"email"},name:{type:"string"},slug:{type:"string"},collection:{type:"string"},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},preferences:{type:"object",properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{oneOf:[{type:"object",properties:{source:{type:"array",items:{}}},required:["source"],additionalProperties:!1},{type:"boolean",const:!1}]},activitypub:{type:"boolean"},activitypubStarterClosed:{type:"boolean"},notifications:{type:"array",items:{}}},required:["isOpenData","sendMail"]},language:{type:"string"},profilImageUrl:{type:"string"},profilMarkerImageUrl:{type:"string",format:"uri-reference"},profilMediumImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilBannerUrl:{type:"string",format:"uri-reference"},profilRealBannerUrl:{type:"string",format:"uri-reference"},shortDescription:{type:"string"},description:{type:"string"},tags:{type:"array",items:{type:"string"}},birthDate:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1}},required:["_id","name","email","username","roles","collection","preferences","slug"]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupération de mot de passe",path:"/co2/person/sendemail",constant:"PASSWORD_RECOVERY",method:"POST",auth:"none",description:"Envoie un email pour récupérer le mot de passe.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},type:{type:"string",description:"Type d'email envoyé",const:"password",default:"password"}},required:["email","type"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Erreur: email non trouvé dans la base",type:"object",properties:{result:{type:"boolean",const:!1},errId:{type:"string",const:"UNKNOWN_ACCOUNT_ID"},msg:{type:"string"}},required:["result","errId","msg"],additionalProperties:!1},{description:"Succès: email de récupération envoyé",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},{name:"Échange de token avec un autre serveur",path:"/api/cocolight/exchangetoken",constant:"SERVER_EXCHANGE_TOKEN",method:"POST",auth:"bearer",description:"Permet de se connecter à un autre serveur Communecter en échangeant un token.",contentType:"application/json",request:{type:"object",properties:{serverUrl:{type:"string",description:"URL du serveur distant"}},required:["serverUrl"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après une authentification réussie.",properties:{user:{type:"object",properties:{id:{type:"string",description:"Identifiant unique de l'utilisateur"},username:{type:"string",description:"Pseudo ou nom d'utilisateur"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},timezone:{type:"string",description:"Fuseau horaire de l'utilisateur"},lastLoginDate:{type:"integer",description:"Timestamp Unix du dernier login"},profilImageUrl:{type:"string",format:"uri",description:"URL de l'image de profil utilisateur"}},required:["id","username","email","roles"],additionalProperties:!1},accessToken:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"},status:{type:"integer",description:"Code de statut personnalisé renvoyé par l'API"}},required:["user","accessToken","refreshToken","status"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Changer le mot de passe",path:"/co2/person/changepassword",constant:"CHANGE_PASSWORD",method:"POST",auth:"bearer",description:"Permet de changer le mot de passe d'un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{mode:{type:"string",description:"Mode ou contexte du changement",const:"changePassword",default:"changePassword"},userId:{type:"string",description:"Identifiant de l'utilisateur",default:"@userId"},oldPassword:{type:"string",description:"Ancien mot de passe"},newPassword:{type:"string",description:"Nouveau mot de passe"},newPassword2:{type:"string",description:"Confirmation du nouveau mot de passe"},scope:{type:["string"],description:"Périmètre concerné",default:""}},required:["mode","userId","oldPassword","newPassword","newPassword2"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Réponse en cas de succès lors du changement de mot de passe",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},{description:"Réponse en cas d'erreur lors du changement de mot de passe",type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer un compte",path:"/co2/element/delete/id/{id}/type/citoyens",constant:"DELETE_ACCOUNT",method:"POST",auth:"bearer",description:"Permet de supprimer un compte utilisateur.",contentType:"application/x-www-form-urlencoded",postActions:[{type:"resetSession"},{type:"emitEvent",event:"accountDeleted",path:null}],pathParams:{type:"object",properties:{id:{type:"string",description:"Identifiant de l'utilisateur à supprimer",default:"@userId"}},required:["id"],additionalProperties:!1},request:{type:"object",properties:{reason:{type:"string",description:"Raison de la suppression",default:""}},required:["reason"],additionalProperties:!1},responses:{200:{type:"object",description:"Réponse après la suppression du compte",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les paramètres utilisateur",path:"/co2/element/updatesettings",constant:"UPDATE_SETTINGS",method:"POST",auth:"bearer",description:"Mise à jour des paramètres spécifiques d'un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{type:{type:"string"},value:{},typeEntity:{type:"string",default:"citoyens"},idEntity:{type:"string"}},required:["type","value","typeEntity","idEntity"],additionalProperties:!1,allOf:[{if:{properties:{typeEntity:{const:"citoyens"}}},then:{properties:{idEntity:{type:"string",default:"@userId"}}}},{if:{properties:{typeEntity:{const:"citoyens"},type:{enum:["birthDate","email","locality","phone","directory"]}}},then:{properties:{value:{type:"string",enum:["private","public","mask"]}}}},{if:{properties:{typeEntity:{const:"citoyens"},type:{enum:["activitypub","isOpenData"]}}},then:{properties:{value:{type:"boolean"}}}},{if:{properties:{typeEntity:{not:{const:"citoyens"}},type:{enum:["isOpenData","isOpenEdition","private","feedback"]}}},then:{properties:{value:{type:"boolean"}}}}]},responses:{200:{type:"object",description:"Réponse après la mise à jour des paramètres",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour la description d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_DESCRIPTION",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour la description courte et complète d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"descriptions",default:"descriptions",description:"Nom du bloc à mettre à jour (doit être 'descriptions')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:["string","null"],default:"",description:"Périmètre de mise à jour",$comment:"Non utilisé dans l'application Cocolight"},descMentions:{type:"string",description:"Mentions dans la description",default:"",$comment:"Non utilisé dans l'application Cocolight"},shortDescription:{type:"string",description:"Courte description"},description:{type:"string",description:"Description complète"}},required:["block","typeElement","id"],additionalProperties:!1,allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}},{anyOf:[{required:["description"],properties:{description:{not:{type:"null"}}}},{required:["shortDescription"],properties:{shortDescription:{not:{type:"null"}}}}]}]},responses:{200:{type:"object",description:"Réponse après la mise à jour de la description",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",properties:{shortDescription:{type:["string","null"]},description:{type:["string","null"]}},additionalProperties:!0}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les informations d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_INFO",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour les informations générales d'un élément (nom, contacts, etc.).",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"}},required:["block","typeElement","id"],$defs:{sharedFields:{name:{type:"string",description:"Nom de l'entité"},url:{type:"string",format:"uri",description:"Lien vers le site ou la page publique"},email:{type:"string",format:"email",description:"Adresse email"},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'}}},allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},id:{type:"string",description:"ID de l'élément concerné",default:"@userId"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},birthDate:{type:"string",format:"date",description:"Date de naissance"},fixe:{type:"string",description:"Téléphone fixe"},mobile:{type:"string",description:"Téléphone mobile"}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["birthDate"],properties:{birthDate:{not:{type:"null"}}}},{required:["fixe"],properties:{fixe:{not:{type:"null"}}}},{required:["mobile"],properties:{mobile:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}}],additionalProperties:!1}},{if:{properties:{typeElement:{const:"projects"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},avancement:{type:"string",enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],description:"État d'avancement du projet"},parent:{type:"object",patternProperties:{"^[a-fA-F0-9]{24}$":{type:"object",properties:{type:{type:"string",description:"Type d'entité parent"},name:{type:"string",description:"Nom de l'entité parent"}},required:["type","name"],additionalProperties:!1}},additionalProperties:!1,description:"Objet contenant les entités parentes (clé = ID). null signifie que les parents ne sont pas modifiés."}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}},{required:["avancement"],properties:{avancement:{not:{type:"null"}}}},{required:["parent"],properties:{parent:{not:{type:"null"}}}}],additionalProperties:!1}},{if:{properties:{typeElement:{const:"organizations"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},type:{type:"string",enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],description:"Type d'organisation (ex. association, entreprise)"}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}},{required:["type"],properties:{type:{not:{type:"null"}}}}],additionalProperties:!1}}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les réseaux sociaux d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_SOCIAL",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour les liens vers les réseaux sociaux d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"network",default:"network",description:"Nom du bloc à mettre à jour (doit être 'network')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},gitlab:{$ref:"#/$defs/socialField",description:"Compte Gitlab"},github:{$ref:"#/$defs/socialField",description:"Compte Github"},twitter:{$ref:"#/$defs/socialField",description:"Compte Twitter"},facebook:{$ref:"#/$defs/socialField",description:"Compte Facebook"},instagram:{$ref:"#/$defs/socialField",description:"Compte Instagram"},diaspora:{$ref:"#/$defs/socialField",description:"Compte Diaspora"},mastodon:{$ref:"#/$defs/socialField",description:"Compte Mastodon"},telegram:{$ref:"#/$defs/socialField",description:"Compte Telegram"},signal:{$ref:"#/$defs/socialField",description:"Compte Signal"}},required:["block","typeElement","id"],$defs:{socialField:{anyOf:[{type:"string",enum:[""],description:"Vide pour effacer le champ"},{type:"string",format:"uri",description:"URL du profil sur le réseau social"}]}},allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}},{anyOf:[{required:["gitlab"],properties:{gitlab:{not:{type:"null"}}}},{required:["github"],properties:{github:{not:{type:"null"}}}},{required:["twitter"],properties:{twitter:{not:{type:"null"}}}},{required:["facebook"],properties:{facebook:{not:{type:"null"}}}},{required:["instagram"],properties:{instagram:{not:{type:"null"}}}},{required:["diaspora"],properties:{diaspora:{not:{type:"null"}}}},{required:["mastodon"],properties:{mastodon:{not:{type:"null"}}}},{required:["telegram"],properties:{telegram:{not:{type:"null"}}}},{required:["signal"],properties:{signal:{not:{type:"null"}}}}]}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les localités d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_LOCALITY",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour l'adresse et les informations géographiques d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"localities",default:"localities",description:"Nom du bloc à mettre à jour (doit être 'localities')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},geo:{type:"object",description:"Coordonnées géographiques",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},required:["latitude","longitude"],additionalProperties:!1},geoPosition:{type:"object",description:"Position géographique GeoJSON",properties:{type:{type:"string",const:"Point",description:"Type GeoJSON (doit être 'Point')"},coordinates:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"Tableau contenant [longitude, latitude]"},float:{type:"boolean",const:!0,default:!0,description:"Indicateur pour forcer la conversion en float côté serveur"}},required:["type","coordinates","float"],additionalProperties:!0},address:{type:"object",properties:{"@type":{type:"string",const:"PostalAddress"},addressCountry:{type:"string"},codeInsee:{type:"string"},addressLocality:{type:"string"},localityId:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{type:"string",description:"ID du département. Peut être vide pour les pays étrangers.",minLength:0},level3Name:{type:"string",description:"Nom du département. Peut être vide pour les pays étrangers.",minLength:0},level4:{type:"string",description:"ID de la commune. Peut être vide pour les pays étrangers.",minLength:0},level4Name:{type:"string",description:"Nom de la commune. Peut être vide pour les pays étrangers.",minLength:0},postalCode:{type:"string"},streetAddress:{type:"string"}},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],additionalProperties:!1,$comment:"Certains champs comme level3/level4 peuvent être vides selon le pays (ex : Maurice)"}},required:["block","typeElement","id","address"],allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour le slug d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_SLUG",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour le slug pour une URL simplifiée.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",$comment:"Non utilisé dans l'application Cocolight"},slug:{type:"string",description:"Slug simplifié pour URL",pattern:"^[a-zA-Z0-9]+$",minLength:3,maxLength:100}},required:["block","typeElement","id","slug"],allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}]},responses:{200:{description:"Réponse après la mise à jour de l'élément",oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,properties:{slug:{type:"string"}}}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Vérifier l'état d'une URL",path:"/co2/slug/check",constant:"CHECK",method:"POST",auth:"bearer",description:"Vérifie si une URL (slug) est valide ou disponible.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc"},id:{type:"string",description:"ID de l'élément"},type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'élément"},slug:{type:"string",description:"Slug à vérifier",pattern:"^[a-zA-Z0-9]+$",minLength:3,maxLength:100}},required:["block","type","id","slug"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{oneOf:[{description:"Slug valide ou disponible",type:"object",properties:{result:{type:"boolean",const:!0},domaineName:{type:"string"}},required:["result","domaineName"],additionalProperties:!1},{description:"Slug non valide ou non disponible",type:"object",properties:{result:{type:"boolean",const:!1},domaineName:{type:"string"}},required:["result","domaineName"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour l'image de profil",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/profil_avatar/contentKey/profil/docType/image",method:"POST",constant:"PROFIL_IMAGE",constantCocolight:["PROFIL_IMAGE","UPDATE_PDP"],auth:"bearer",description:"Permet de mettre à jour l'image de profil d'un utilisateur ou d'une entité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'entité"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{profil_avatar:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image de profil au format binaire"}},required:["profil_avatar"],additionalProperties:!1},responses:{200:{description:"Réponse après l'enregistrement de l'image de profil",oneOf:[{type:"object",properties:{resultUpload:{type:"boolean",const:!0},success:{type:"boolean",const:!0},name:{type:"string",description:"Nom du fichier enregistré"},docPath:{type:"string",description:"Chemin du fichier sur le serveur"},size:{type:"integer",description:"Taille du fichier en octets"},result:{type:"boolean",const:!0},msg:{type:"string",description:"Message de confirmation"},id:{type:"object",properties:{$id:{type:"string",description:"ID du document enregistré"}},required:["$id"],additionalProperties:!1},src:{type:"object",description:"Informations sur les images générées",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},changes:{type:"object",properties:{profilImageUrl:{type:"string",format:"uri-reference"},profilMediumImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilMarkerImageUrl:{type:"string",format:"uri-reference"}},required:["profilImageUrl","profilMediumImageUrl","profilThumbImageUrl","profilMarkerImageUrl"],additionalProperties:!1}},required:["result","msg","changes"],additionalProperties:!1},survey:{type:["boolean","null"],description:"Peut être à false ou null selon les cas"}},required:["resultUpload","success","name","docPath","size","result","msg","id","src"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Obtenir les éléments liés",path:"/co2/element/about/type/{type}/id/{id}/json/true",constant:"GET_ELEMENTS_ABOUT",method:"POST",auth:"none",description:"Récupère les informations détaillées d'un élément et de ses éléments liés.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'entité"},id:{type:"string",description:"ID de l'utilisateur ou de l'entité"}},required:["type","id"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{tpl:{type:"string",default:"ficheInfoElement",const:"ficheInfoElement",description:"Template utilisé (ex: ficheInfoElement)"}},required:["tpl"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Schéma JSON pour les informations détaillées d'un utilisateur.",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},username:{type:"string"},email:{type:"string",format:"email"},name:{type:"string"},slug:{type:"string"},collection:{type:"string",enum:["citoyens"]},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},preferences:{type:"object",properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{oneOf:[{type:"object",properties:{source:{type:"array",items:{}}},required:["source"],additionalProperties:!1},{type:"boolean",const:!1}]},activitypub:{type:"boolean"},activitypubStarterClosed:{type:"boolean"},notifications:{type:"array",items:{}}},required:["isOpenData","sendMail"]},language:{type:"string"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilBannerUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilRealBannerUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},shortDescription:{type:"string"},description:{type:"string"},tags:{type:"array",items:{type:"string"}},birthDate:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1}},required:["_id","name","username","roles","collection","preferences","slug"]},{description:"Schéma JSON pour les informations détaillées d'un projet",type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},collection:{type:"string",enum:["projects"]},created:{type:"integer"},creator:{type:"string"},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},name:{type:"string"},parent:{type:"object",patternProperties:{"^[0-9a-fA-F]{24}$":{type:"object",properties:{type:{type:"string"},name:{type:"string"},_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},slug:{type:"string"},profilThumbImageUrl:{type:"string"}},required:["type","name"],additionalProperties:!0}},additionalProperties:!1},preferences:{type:"object",properties:{isOpenData:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},isOpenEdition:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},crowdfunding:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},private:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]}},required:["isOpenData","isOpenEdition"]},slug:{type:"string"},updated:{type:"integer"},links:{type:"object",$comment:"Ce schéma n'est pas encore complet"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},typeSig:{type:"string"},type:{type:"string"}},required:["_id","collection","created","creator","modified","name","parent","preferences","slug","typeSig","type","updated"]},{description:"Schéma JSON pour les informations détaillées d'une organisation",type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},collection:{type:"string",enum:["organizations"]},created:{type:"integer"},creator:{type:"string"},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},name:{type:"string"},preferences:{type:"object",properties:{isOpenData:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},isOpenEdition:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]}},required:["isOpenData","isOpenEdition"]},slug:{type:"string"},type:{type:"string"},updated:{type:"integer"},links:{type:"object",$comment:"Ce schéma n'est pas encore complet"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image de profil (vide ou URI)."},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image miniature (vide ou URI)."},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image pour le marqueur (vide ou URI)."},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image de taille moyenne (vide ou URI)."}},required:["_id","collection","modified","name","preferences","slug","type","updated"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Gérer des connexions multiples",path:"/co2/link/multiconnect",constant:"MULTICONNECT",method:"POST",auth:"bearer",description:"Permet d’inviter ou de connecter plusieurs utilisateurs en même temps à une entité.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},listInvite:{type:"object",description:"Liste des citoyens invités",patternProperties:{"^(citoyens|projects|organizations)$":{type:"object",patternProperties:{"^[0-9a-fA-F]{24}$":{type:"object",properties:{name:{type:"string",description:"Nom de l'invité"}},required:["name"],additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1}},required:["parentId","parentType","listInvite"],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",properties:{citoyens:{type:"array",items:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},newElement:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},name:{type:"string"},profilThumbImageUrl:{type:"string"},id:{type:"string"},isInviting:{type:"boolean"}},required:["_id","name","profilThumbImageUrl","id","isInviting"],additionalProperties:!0},newElementType:{type:"string",const:"citoyens"}},required:["result","msg","newElement","newElementType"]},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},required:["citoyens"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les actualités",path:"/news/co/get/type/{type}/id/{id}/isLive/{isLive}/json/{json}",constant:"GET_NEWS",constantCocolight:"GET_NEWS",method:"POST",auth:"none",description:"Récupère la liste d’actualités selon plusieurs critères.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{isLive:{type:"boolean",default:!0,description:"Indique si l'actualité est en direct"},type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'actualité (ex: 'citoyens', 'projects', 'organizations')"},id:{type:"string",description:"ID de l'élément (ex: ID d'un utilisateur, d'un projet ou d'une organisation)"},json:{type:"boolean",default:!0,description:"Indique si la réponse doit être au format JSON"}},required:["isLive","type","id","json"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{dateLimit:{type:"integer",default:0,description:"Limite de date timestamp ou 0"},search:{type:"object",properties:{name:{type:"string",default:"",description:"Nom ou terme recherché"}},required:["name"],additionalProperties:!1},indexStep:{type:"integer",default:12,description:"Nombre de résultats par page"}},required:["dateLimit","indexStep"],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name","type"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",description:"Réponse renvoyée lorsqu'aucune actualité n'est disponible",properties:{type:{type:"string",enum:["citoyens","projects","organizations"]},endStream:{type:"boolean",const:!0},news:{type:"array",minItems:0,maxItems:0},limitDate:{type:"boolean",const:!1}},required:["type","endStream","news","limitDate"]},{type:"object",description:"Réponse renvoyée lorsqu'une ou plusieurs actualités sont disponibles",properties:{type:{type:"string",enum:["citoyens","projects","organizations"]},endStream:{type:"boolean"},news:{type:"object",description:"Contient plusieurs objets news. Chaque clé est un identifiant dynamique (par exemple, un ObjectID Mongo) et chaque valeur doit respecter la structure définie par NewsCommonSchema.",patternProperties:{"^[a-f0-9]{24}$":{$ref:"#/$defs/NewsSchema"}},additionalProperties:!1},limitDate:{type:"object"}},required:["type","endStream","news","limitDate"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer des actualités par IDs",path:"/news/co/getbyids",constant:"GET_NEWS_BY_ID",method:"POST",auth:"none",description:"Récupère des actualités à partir d’une liste d’identifiants.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Liste des IDs d’actualités à récupérer"}},required:["ids"],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name","type"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},type:"array",items:{$ref:"#/$defs/NewsSchema"},description:"Liste d'actualités correspondant aux IDs fournis"}}},{name:"Ajouter une actualité",path:"/news/co/save",constant:"ADD_NEWS",method:"POST",auth:"bearer",description:"Ajoute une nouvelle actualité.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{text:{type:"string",description:"Contenu de l’actualité"},scope:{type:"string",description:"Portée de l'actualité (ex: public, privé...)",enum:["public","private","restricted"],default:"public"},markdownActive:{type:"boolean",default:!0,description:"Markdown activé (true/false)"},parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},type:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},json:{type:"boolean",const:!0,default:!0,description:"Indique que la réponse est au format JSON."},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'},mediaImg:{type:"object",description:"Optionnel. Informations sur les images associées à la news.",properties:{countImages:{type:"number",description:"Nombre d'images."},images:{type:"array",description:"Liste des identifiants ou chemins d'images.",items:{type:"string"}}},required:["countImages","images"],additionalProperties:!1},mediaFile:{type:"object",description:"Optionnel. Informations sur les fichiers associés à la news.",properties:{countFiles:{type:"number",description:"Nombre de fichiers."},files:{type:"array",description:"Liste des identifiants ou chemins de fichiers.",items:{type:"string"}}},required:["countFiles","files"],additionalProperties:!1},mentions:{type:"object",description:"Liste des mentions sous forme d'objet avec des clés dynamiques représentant l'indice de la mention.",patternProperties:{"^[0-9]+$":{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"number"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}},additionalProperties:!1}},required:["scope","markdownActive","parentId","parentType","type","json"],anyOf:[{required:["text"]},{required:["mediaImg"]},{required:["mediaFile"]}],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},object:{$comment:"dans object.author il y a pas type il y a que typeSig",$ref:"#/$defs/NewsSchema"}},required:["result","msg","id","object"],additionalProperties:!1},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Ajouter une image à une actualité",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/newsImage/docType/image/contentKey/slider",constant:"ADD_IMAGE_NEWS",constantCocolight:"ADD_IMAGE_NEWS",method:"POST",auth:"bearer",description:"Ajoute une images à une actualité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente (ex: 'citoyens', 'projects', 'organizations')"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité parente"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{newsImage:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image à télécharger"}},required:["newsImage"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de l'upload",properties:{resultUpload:{type:"boolean",const:!0,description:"Indique si le téléchargement a abouti."},success:{type:"boolean",const:!0,description:"Indique le succès de l'opération."},name:{type:"string",description:"Nom du document."},docPath:{type:"string",description:"Chemin d'accès au document."},size:{type:"number",description:"Taille du document en octets."},result:{type:"boolean",const:!0,description:"Résultat de l'opération."},msg:{type:"string",description:"Message de confirmation."},id:{type:"object",description:"Identifiant du document sous forme d'objet.",properties:{$id:{type:"string",description:"ID du document (généralement un ObjectID MongoDB)."}},required:["$id"],additionalProperties:!1}},required:["resultUpload","success","name","docPath","size","result","msg","id"]},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Ajouter un fichier à une actualité",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}}/input/newsFile/docType/file",constant:"ADD_FILE_NEWS",constantCocolight:"ADD_FILE_NEWS",method:"POST",auth:"bearer",description:"Ajoute un fichier à une actualité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente (ex: 'citoyens', 'projects', 'organizations')"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité parente"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{newsFile:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image à télécharger"}},required:["newsFile"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de l'upload",properties:{resultUpload:{type:"boolean",const:!0,description:"Indique si le téléchargement a abouti."},success:{type:"boolean",const:!0,description:"Indique le succès de l'opération."},name:{type:"string",description:"Nom du document."},docPath:{type:"string",description:"Chemin d'accès au document."},size:{type:"number",description:"Taille du document en octets."},result:{type:"boolean",const:!0,description:"Résultat de l'opération."},msg:{type:"string",description:"Message de confirmation"},id:{type:"object",description:"Identifiant du document sous forme d'objet.",properties:{$id:{type:"string",description:"ID du document (généralement un ObjectID MongoDB)."}},required:["$id"],additionalProperties:!1}},required:["resultUpload","success","name","docPath","size","result","msg","id"]},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer une actualité",path:"/news/co/delete/id/{id}",constant:"DELETE_NEWS",constantCocolight:"DELETE_NEWS",method:"POST",auth:"bearer",description:"Supprime une actualité existante.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{id:{type:"string",description:"ID de l'actualité à supprimer"}},required:["id"],additionalProperties:!1},request:{type:"object",properties:{isLive:{type:"boolean",default:!1}},required:["isLive"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de la suppression",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},type:{type:"string",const:"news"},commentsDeleted:{type:"number",description:"Nombre de commentaires supprimés",$comment:"bizarre même si il y a des commentaires ce champs reste à 0"}},required:["result","msg","type","commentsDeleted"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de la suppression",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour une actualité",path:"/news/co/update",constant:"UPDATE_NEWS",method:"POST",auth:"bearer",description:"Met à jour le contenu d’une actualité existante.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{idNews:{type:"string",description:"ID de l'actualité à mettre à jour"},text:{type:"string",description:"Contenu de l’actualité"},scope:{type:"string",description:"Portée de l'actualité (ex: public, privé...)",enum:["public","private","restricted"],default:"public"},markdownActive:{type:"boolean",default:!0,description:"Markdown activé (true/false)"},parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},type:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'},mediaImg:{type:"object",description:"Optionnel. Informations sur les images associées à la news.",properties:{countImages:{type:"number",description:"Nombre d'images."},images:{type:"array",description:"Liste des identifiants ou chemins d'images.",items:{type:"string"}}},required:["countImages","images"],additionalProperties:!1},mediaFile:{type:"object",description:"Optionnel. Informations sur les fichiers associés à la news.",properties:{countFiles:{type:"number",description:"Nombre de fichiers."},files:{type:"array",description:"Liste des identifiants ou chemins de fichiers.",items:{type:"string"}}},required:["countFiles","files"],additionalProperties:!1},mentions:{type:"object",description:"Liste des mentions sous forme d'objet avec des clés dynamiques représentant l'indice de la mention.",patternProperties:{"^[0-9]+$":{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"number"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}},additionalProperties:!1}},required:["idNews","scope","markdownActive","parentId","parentType","type"],anyOf:[{required:["text"]},{required:["mediaImg"]},{required:["mediaFile"]}],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},object:{$comment:"dans object.author il y a pas type il y a que typeSig",$ref:"#/$defs/NewsSchema"}},required:["result","msg","object"],additionalProperties:!1},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Partager une actualité",path:"/news/co/share",constant:"SHARE_NEWS",constantCocolight:"SHARE_NEWS",method:"POST",auth:"bearer",description:"Partage une actualité avec une entité ou un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentId:{type:"string",description:"ID de l'actualité à partager"},parentType:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},childId:{type:"string",description:"ID de l'entité partageante"},childType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité partageante"},connectType:{type:"string",const:"share",default:"share",description:"Type de connexion, toujours 'share'."},comment:{type:"string",description:"Commentaire de partage"}},required:["parentId","parentType","childId","childType","connectType"],additionalProperties:!1}}];class Dt extends Error{constructor(e,t,r){super(e),this.name="ApiClientError",this.status=t,this.details=r}}class Lt extends Error{constructor(e){super(e),this.name="CircuitBreakerError"}}It.addType("oid",(e=>new xt.ObjectID(e)));class Ut extends t.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:n="/api/cocolight/refreshtoken",endpoints:o=qt,timeout:a=3e4,debug:c=!1,maxRetries:d=0,circuitBreakerThreshold:l=5,circuitBreakerResetTime:u=6e4,fromJSONValue:p=!0}={}){if(super(),!e)throw new Dt('Le paramètre "baseURL" est obligatoire.',500);this._baseURL=e,this._refreshToken=r,this._refreshUrl=n,this._endpoints=o,this._debug=c;let f=null;this._fromJSONValue=p,Object.defineProperty(this,"userId",{get:()=>f,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{f=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new s({strict:!1,useDefaults:!0}),i(this._ajv),this._logger=Ct({transport:{target:"pino-pretty",options:{colorize:!0}},level:c?"debug":"info"}),this._client=bt.create({baseURL:e,timeout:a}),d>0&&(Rt(this._client,{retries:d,retryDelay:Rt.exponentialDelay,retryCondition:e=>Rt.isNetworkError(e)||Rt.isRetryableError(e)}),this._logger.info(`[ApiClient] Retry activé : ${d} max`)),this._breakerThreshold=l,this._breakerResetTime=u,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,t&&this.setToken(t),this._client.interceptors.response.use((e=>e),(async e=>{if(e.response&&401===e.response.status&&this._refreshToken)try{if(await this._refreshAccessToken())return this._client.request(e.config)}catch(e){throw new Dt(e.message,401,e)}throw e}))}setToken(e){this._accessToken=e,this._client.defaults.headers.common.Authorization="Bearer "+e,this._logger.debug(`[ApiClient] setToken: ${e}`)}getToken(){return this._accessToken}setRefreshToken(e){this._refreshToken=e,this._logger.debug(`[ApiClient] setRefreshToken: ${e}`)}getRefreshToken(){return this._refreshToken}async _refreshAccessToken(){if(!this._refreshToken)return!1;try{const e=await this._client.post(this._refreshUrl,{refreshToken:this._refreshToken},{headers:{"Content-Type":"application/json"}});return!(!e.data||!e.data.accessToken||(this.setToken(e.data.accessToken),e.data.refreshToken&&this.setRefreshToken(e.data.refreshToken),this.emit("refreshSuccess",e.data),0))}catch(e){return this._logger.error(`[ApiClient] Refresh Error : ${e.message}`),!1}}_checkCircuitBreaker(){return!this._breakerOpen||Date.now()-this._lastBreakerOpenTime>this._breakerResetTime&&(this._breakerOpen=!1,this._breakerErrorCount=0,this._logger.warn("[ApiClient] Circuit breaker réinitialisé"),!0)}_updateCircuitBreakerError(){this._breakerErrorCount+=1,this._logger.warn(`[ApiClient] Erreur #${this._breakerErrorCount} sur ${this._breakerThreshold}`),this._breakerErrorCount>=this._breakerThreshold&&(this._breakerOpen=!0,this._lastBreakerOpenTime=Date.now(),this._logger.error("[ApiClient] Circuit breaker ACTIVÉ - L'API est considérée indisponible"))}_resetCircuitBreakerSuccess(){this._breakerErrorCount=0,this._breakerOpen&&(this._breakerOpen=!1,this._logger.warn("[ApiClient] Circuit breaker refermé suite à un succès"))}static stripNullsInPlace(e){if(e&&"object"==typeof e&&e.value&&"function"==typeof e.value.pipe)return e;if(Array.isArray(e))for(let t=e.length-1;t>=0;t--)null===e[t]||void 0===e[t]?e.splice(t,1):"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]);else if(e&&"object"==typeof e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||void 0===e[t]?delete e[t]:"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]));return e}_resolveSpecialValuesInPlace(e){if(e&&"object"==typeof e&&e.value&&"function"==typeof e.value.pipe)return e;const t={userId:()=>this.userId,accessToken:()=>this._accessToken,refreshToken:()=>this._refreshToken,baseURL:()=>this._baseURL};if("string"==typeof e&&e.startsWith("@")){const r=e.slice(1);return"function"==typeof t[r]?t[r]():e}if(Array.isArray(e))for(let t=0;t<e.length;t++)e[t]=this._resolveSpecialValuesInPlace(e[t]);else if(e&&"object"==typeof e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=this._resolveSpecialValuesInPlace(e[t]));return e}async callEndpoint(e,t={},r=!0,n=!0){if(!this._checkCircuitBreaker())throw new Lt("Le circuit breaker est activé, impossible d'appeler l'API");const s=this._endpoints.find((t=>t.constant===e));if(!s)throw new Dt(`Endpoint introuvable : ${e}`,404);const{path:i,method:o,contentType:a,auth:c,pathParams:d,request:l,responses:u}=s,p=(o||"GET").toLowerCase(),f=a||"application/json",m={"Content-Type":f};if(this._accessToken)"bearer"===c?m.Authorization=`Bearer ${this._accessToken}`:c&&"none"!==c||m.Authorization||(m.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===c)throw new Dt(`Token requis pour l'endpoint sécurisé : ${e}`,401);let h,y=i;if(d){const e=t.pathParams||{},r=this._ajv.compile(d);if(!r(e))throw this.emit("validationError",{stage:"pathParams",errors:r.errors}),new Dt("Path parameter validation failed.",400,r.errors);const n=this._resolveSpecialValuesInPlace(e);y=y.replace(/\{(\w+)\}/g,((e,t)=>{const r=n[t];if(void 0!==r)return encodeURIComponent(r);throw new Dt(`Path param manquant ou non résolu : {${t}}`,400)}))}if(l){const e={...t};delete e.pathParams;const r=Ut.stripNullsInPlace(e),n=this._ajv.compile(l);if(!n(r))throw this.emit("validationError",{stage:"request",errors:n.errors}),new Dt("Request validation failed.",400,n.errors);t=this._resolveSpecialValuesInPlace(r)}"application/json"===f||"multipart/form-data"===f?h=t:"application/x-www-form-urlencoded"===f&&(h=Ut.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${y}, method=${p}`);try{const e=await this._client.request({url:y,method:p,headers:m,["get"===p?"params":"data"]:h});if(n){const t=e.status.toString(),r=u?.[t];if(r){const n=this._ajv.compile(r);if(!n(e.data))throw this.emit("validationError",{stage:"response",errors:n.errors}),new Dt("Response validation failed.",t,n.errors)}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(s.postActions)&&s.postActions.forEach((t=>{const r=t.path?this._getValueByPath(e.data,t.path):null;switch(t.type){case"setToken":this.setToken(r);break;case"setRefreshToken":this.setRefreshToken(r);break;case"setUserId":this._setUserId(r);break;case"resetSession":this.resetSession();break;case"emitEvent":t.event&&(this.emit(t.event,r),this._logger.debug(`[ApiClient] Event émis : ${t.event}`,r));break;case"callMethod":"function"==typeof this[t.method]?(this[t.method](),this._logger.debug(`[ApiClient] Méthode appelée : ${t.method}`)):this._logger.warn(`[ApiClient] Méthode inconnue : ${t.method}`);break;default:this._logger.warn(`[ApiClient] Action inconnue : ${t.type}`)}})),e}catch(e){throw this._updateCircuitBreakerError(),e}}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),delete this._client.defaults.headers.common.Authorization,this._logger.info("[ApiClient] Session utilisateur réinitialisée."),this.emit("sessionReset")}_getValueByPath(e,t){if(t)return t.split(".").reduce(((e,t)=>e&&e[t]),e)}static toURLSearchParams(e,t={}){return this._buildParams(e,new URLSearchParams,t)}static _buildParams(e,t,r={}){if("object"!=typeof e||null===e)throw new TypeError("La donnée doit être un objet non nul.");const{dots:n=!1,indexes:s=!1,metaTokens:i=!0}=r,o=[];function a(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function c(e){return e.endsWith("[]")?e.slice(0,-2):e}function d(e,t,r=!1){return e?e.concat(t).map(((e,t)=>(e=c(e),!r&&t?`[${e}]`:e))).join(r?".":""):t}function l(e){return null==e?"":e instanceof Date?e.toISOString():(e instanceof Blob||e instanceof File||e instanceof ArrayBuffer||ArrayBuffer.isView(e),e)}return function e(r,u=[]){null==r||o.includes(r)||(o.push(r),Object.entries(r).forEach((([r,o])=>{void 0!==o&&function(e,r,o){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=i?r:r.slice(0,-2),t.append(d(o,r,n),JSON.stringify(e)),!1;if(Array.isArray(e)&&!e.some(a)||r.endsWith("[]"))return r=c(r),e.forEach(((e,i)=>{if(null!=e){const a=s?d(o.concat(r),i,n):`${d(o,r,n)}[]`;t.append(a,l(e))}})),!1}return!!a(e)||(t.append(d(o,r,n),l(e)),!1)}(o,r.trim(),u)&&e(o,u.concat(c(r)))})),o.pop())}(e),t}_transformData(e){if(e&&"object"==typeof e)if(e.resultGoods?.msg)e=this._normalizeJsonData({msg:e.resultGoods.msg,...e});else if(e.resultErrors?.msg)e=this._normalizeJsonData({msg:e.resultErrors.msg,...e});else if(e.results&&"object"==typeof e.results&&!Array.isArray(e.results))e.results=Object.keys(e.results).map((t=>this._normalizeJsonData({id:t,...e.results[t]})));else if(Array.isArray(e.results))e.results=e.results.map((e=>this._normalizeJsonData(e)));else if(e.news&&Array.isArray(e.news)&&0===e.news.length)e=e.news;else if(e.news&&"object"==typeof e.news&&!Array.isArray(e.news))e=Object.keys(e.news).map((t=>this._normalizeJsonData({id:t,...e.news[t]})));else if(e.notif&&"object"==typeof e.notif&&!Array.isArray(e.notif))e.notif=Object.keys(e.notif).map((t=>this._normalizeJsonData({id:t,...e.notif[t]})));else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens)&&e.organizations&&"object"==typeof e.organizations&&!Array.isArray(e.organizations))e=[...Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]}))),...Object.keys(e.organizations).map((t=>this._normalizeJsonData({id:t,...e.organizations[t]})))];else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens))e=Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]})));else if(e.cities&&"object"==typeof e.cities&&!Array.isArray(e.cities))e=Object.keys(e.cities).map((t=>this._normalizeJsonData({id:t,...e.cities[t]})));else if(e.cities&&Array.isArray(e.cities)&&0===e.cities.length)e=e.cities;else if(e.newComment&&"object"==typeof e.newComment)e.newComment=this._normalizeJsonData({...e.newComment});else if(Array.isArray(e))e=e.map((e=>this._normalizeJsonData(e)));else if(e.map&&"object"==typeof e.map)e.map=this._normalizeJsonData(e.map);else if(e.object&&"object"==typeof e.object)e.object=this._normalizeJsonData(e.object);else if("object"==typeof e&&Object.keys(e).length>0){const t=Object.keys(e).every((e=>/^[0-9a-fA-F]{24}$/.test(e)));e=t?Object.keys(e).map((t=>({id:t,...this._normalizeJsonData(e[t])}))):this._normalizeJsonData(e)}return e}_normalizeJsonData(e){if(!e||"object"!=typeof e)return e;if(e=this._normalizeRecursively(e),e?.mediaImg?.images&&Array.isArray(e.mediaImg.images)&&e.mediaImg.images.length>0&&(e.mediaImg.countImages=e.mediaImg.images.length),e?.mediaFile?.files&&Array.isArray(e.mediaFile.files)&&e.mediaFile.files.length>0&&(e.mediaFile.countFiles=e.mediaFile.files.length),e?.src?.changes&&"object"==typeof e.src.changes&&Object.keys(e.src.changes).length>0&&Object.keys(e.src.changes).forEach((t=>{e.src.changes[t]&&(e.src.changes[t]=this._ensureFullURL(e.src.changes[t]))})),e?.openingHours&&Array.isArray(e.openingHours)&&e.openingHours.length>0&&(e.openingHours=e.openingHours.filter((e=>e.dayOfWeek&&e.hours&&e.hours[0]&&e.hours[0].opens))),e.replies&&"object"==typeof e.replies&&Object.keys(e.replies).length>0&&(e.replies=Object.keys(e.replies).map((t=>this._normalizeJsonData({id:t,...e.replies[t]})))),e?.author&&"object"==typeof e.author&&Object.keys(e.author).length>0&&!("profilThumbImageUrl"in e.author)){const t=Object.keys(e.author)[0];e.author={...e.author[t]}}return e?.timeAgo&&delete e.timeAgo,this._fromJSONValue?It.fromJSONValue(e):e}_ensureFullURL(e){if(!e)return e;if(!(e=e.trim())||/^https?:\/\//i.test(e))return e;let t="/";return t=this._baseURL.endsWith("/")&&e.startsWith("/")||this._baseURL.endsWith("/")||e.startsWith("/")?"":"/",`${this._baseURL}${t}${e}`}_normalizeDatesRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeDatesRecursively(e))):(Object.keys(e).forEach((t=>{this._dateFields.includes(t)&&(e[t]&&"object"==typeof e[t]&&e[t].sec&&"number"==typeof e[t].sec?e[t]={$date:1e3*e[t].sec}:"number"==typeof e[t]&&(e[t]={$date:1e3*e[t]})),e[t]&&"object"==typeof e[t]&&this._normalizeDatesRecursively(e[t])})),e)}_normalizeImagesRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeImagesRecursively(e))):(Object.keys(e).forEach((t=>{this._imageFields.includes(t)&&"string"==typeof e[t]&&""!==e[t].trim()&&(e[t]=this._ensureFullURL(e[t])),"content"===t&&e[t]?.image&&(e[t].image=this._ensureFullURL(e[t].image)),e[t]&&"object"==typeof e[t]&&this._normalizeImagesRecursively(e[t])})),e)}_normalizeIdRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeIdRecursively(e))):(e._id&&e._id.$id&&/^[0-9a-fA-F]{24}$/.test(e._id.$id)&&(e.id=e._id.$id,e._id={$type:"oid",$value:e._id.$id}),e.id&&e.id.$id&&/^[0-9a-fA-F]{24}$/.test(e.id.$id)&&(e._id={$type:"oid",$value:e.id.$id},e.id=e.id.$id),Object.keys(e).forEach((t=>{e[t]&&"object"==typeof e[t]&&(e[t]=this._normalizeIdRecursively(e[t]))})),e)}_normalizeBooleansRecursively(e){return"string"==typeof e?"true"===e||"false"!==e&&e:Array.isArray(e)?e.map((e=>this._normalizeBooleansRecursively(e))):(null!==e&&"object"==typeof e&&Object.keys(e).forEach((t=>{e[t]=this._normalizeBooleansRecursively(e[t])})),e)}_normalizeString(e){return"true"===e||"false"!==e&&e}_normalizeId(e){return e._id&&e._id.$id&&/^[0-9a-fA-F]{24}$/.test(e._id.$id)&&(e.id=e._id.$id,e._id={$type:"oid",$value:e._id.$id}),e.id&&e.id.$id&&/^[0-9a-fA-F]{24}$/.test(e.id.$id)&&(e._id={$type:"oid",$value:e.id.$id},e.id=e.id.$id),e}_normalizeDate(e){return e&&"object"==typeof e&&"number"==typeof e.sec?{$date:1e3*e.sec}:"number"==typeof e?{$date:1e3*e}:e}_normalizeImage(e){return"string"==typeof e&&""!==e.trim()?this._ensureFullURL(e):e}_imageFields=["profilImageUrl","profilThumbImageUrl","profilMediumImageUrl","profilMarkerImageUrl","profilBannerUrl","profilRealBannerUrl","imagePath","imageThumbPath","docPath"];_dateFields=["modified","created","updated","birthDate","lastLoginDate","startDate","endDate","date"];_normalizeRecursively(e){if("string"==typeof e)return this._normalizeString(e);if(Array.isArray(e))return e.map((e=>this._normalizeRecursively(e)));if(null!==e&&"object"==typeof e){const t={};return Object.keys(e).forEach((r=>{let n=this._normalizeRecursively(e[r]);this._dateFields.includes(r)&&(n=this._normalizeDate(n)),this._imageFields.includes(r)&&(n=this._normalizeImage(n)),"content"===r&&n&&"object"==typeof n&&n.image&&(n.image=this._normalizeImage(n.image)),t[r]=n})),this._normalizeId(t)}return e}}})(),n.default})()));
7
+ deps: ${r}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:s,it:o}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const d=t[c];if(0===d.length)continue;const p=(0,i.propertyInData)(r,s,c,o.opts.ownProperties);e.setParams({property:c,depsCount:d.length,deps:d.join(", ")}),o.allErrors?r.if(p,(()=>{for(const t of d)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${p} && (${(0,i.checkMissingProp)(e,d,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:o,it:a}=e,c=r.name("valid");for(const d in t)(0,s.alwaysValidSchema)(a,t[d])||(r.if((0,i.propertyInData)(r,n,d,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:d},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=o},3282:(e,t,r)=>{"use strict";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 n=r(4042),s=r(6144),i=r(6653),o=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),s.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;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 p=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var l=r(9029);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 u=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var f=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:s,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),c=o?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${s} === 0 || (${a} = ${r}/${s}, ${c}))`)}};t.default=s},3463:(e,t)=>{"use strict";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},3558:(e,t)=>{"use strict";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},3673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(9029),s=r(2023),i=r(5765),o=r(8708);function a(e){const{gen:t,data:r,it:s}=e;t.if(s.parentData,(()=>t.assign(r,n._`${s.parentData}[${s.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,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:s,schema:i,parentSchema:o,it:a}=e,d=t.macro.call(a.self,i,o,a),p=c(r,s,d);!1!==a.opts.validateSchema&&a.self.validateSchema(d,!0);const l=r.name("valid");e.subschema({schema:d,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${s}`,topSchemaRef:p,compositeRule:!0},l),e.pass(l,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:d,keyword:p,schema:l,parentSchema:u,$data:f,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const h=!f&&t.compile?t.compile.call(m.self,l,u,m):t.validate,y=c(d,p,h),g=d.let("valid");function b(r=(t.async?n._`await `:n.nil)){const o=m.opts.passContext?s.default.this:s.default.self,a=!("compile"in t&&!f||!1===t.schema);d.assign(g,n._`${r}${(0,i.callValidateCode)(e,y,o,a)}`,t.modifying)}function v(e){var r;d.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const r=t.async?function(){const e=d.let("ruleErrs",null);return d.try((()=>b(n._`await `)),(t=>d.assign(g,!1).if(n._`${t} instanceof ${m.ValidationError}`,(()=>d.assign(e,n._`${t}.errors`)),(()=>d.throw(t))))),e}():function(){const e=n._`${y}.errors`;return d.assign(e,null),b(n.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(s.default.vErrors,n._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`).assign(s.default.errors,n._`${s.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},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:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},3693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(4551),s=r(5765),i=r(9029),o=r(2023),a=r(3835),c=r(4227),d={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:s}=e,{baseId:o,schemaEnv:c,validateName:d,opts:u,self:f}=s,{root:m}=c;if(("#"===r||"#/"===r)&&o===m.baseId)return function(){if(c===m)return l(e,d,c,c.$async);const r=t.scopeValue("root",{ref:m});return l(e,i._`${r}.validate`,m,m.$async)}();const h=a.resolveRef.call(f,m,o,r);if(void 0===h)throw new n.default(s.opts.uriResolver,o,r);return h instanceof a.SchemaEnv?function(t){const r=p(e,t);l(e,r,t,t.$async)}(h):function(n){const s=t.scopeValue("schema",!0===u.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),o=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:s,errSchemaPath:r},o);e.mergeEvaluated(a),e.ok(o)}(h)}};function p(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function l(e,t,r,n){const{gen:a,it:d}=e,{allErrors:p,schemaEnv:l,opts:u}=d,f=u.passContext?o.default.this:i.nil;function m(e){const t=i._`${e}.errors`;a.assign(o.default.vErrors,i._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,i._`${o.default.vErrors}.length`)}function h(e){var t;if(!d.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==d.props)if(n&&!n.dynamicProps)void 0!==n.props&&(d.props=c.mergeEvaluated.props(a,n.props,d.props));else{const t=a.var("props",i._`${e}.evaluated.props`);d.props=c.mergeEvaluated.props(a,t,d.props,i.Name)}if(!0!==d.items)if(n&&!n.dynamicItems)void 0!==n.items&&(d.items=c.mergeEvaluated.items(a,n.items,d.items));else{const t=a.var("items",i._`${e}.evaluated.items`);d.items=c.mergeEvaluated.items(a,t,d.items,i.Name)}}n?function(){if(!l.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(i._`await ${(0,s.callValidateCode)(e,t,f)}`),h(t),p||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${d.ValidationError})`,(()=>a.throw(e))),m(e),p||a.assign(r,!1)})),e.ok(r)}():e.result((0,s.callValidateCode)(e,t,f),(()=>h(t)),(()=>m(t)))}t.getValidate=p,t.callRef=l,t.default=d},3835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(9029),s=r(3558),i=r(2023),o=r(6939),a=r(4227),c=r(2586);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,o.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 p(e){const t=u.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:d}=this.opts.code,{ownProperties:p}=this.opts,l=new n.CodeGen(this.scope,{es5:a,lines:d,ownProperties:p});let f;e.$async&&(f=l.scopeValue("Error",{ref:s.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const m=l.scopeName("validate");e.validateName=m;const h={gen:l,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(h),l.optimize(this.opts.code.optimize);const t=l.toString();y=`${l.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${i.default.self}`,`${i.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{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:m,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=h;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.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,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:p.call(this,e)}function u(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function f(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),n=(0,o._getFullPath)(this.opts.uriResolver,r);let s=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return y.call(this,r,e);const i=(0,o.normalizeId)(n),a=this.refs[i]||this.schemas[i];if("string"==typeof a){const t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||p.call(this,a),i===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(s=(0,o.resolveUrl)(this.opts.uriResolver,s,n)),new d({schema:t,schemaId:r,root:e,baseId:s})}return y.call(this,r,a)}}t.SchemaEnv=d,t.compileSchema=p,t.resolveRef=function(e,t,r){var n;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let i=f.call(this,e,r);if(void 0===i){const s=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:o}=this.opts;s&&(i=new d({schema:s,schemaId:o,root:e,baseId:t}))}return void 0!==i?e.refs[r]=l.call(this,i):void 0},t.getCompilingSchema=u,t.resolveSchema=m;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var s;if("/"!==(null===(s=e.fragment)||void 0===s?void 0:s[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(n)&&s&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,s))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=m.call(this,n,e)}const{schemaId:c}=this.opts;return i=i||new d({schema:r,schemaId:c,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}},3837:e=>{"use strict";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}')},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,s=0;for(;s<t;)n++,r=e.charCodeAt(s++),r>=55296&&r<=56319&&s<t&&(r=e.charCodeAt(s),56320==(64512&r)&&s++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},3966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(5765),o=r(5457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,s.alwaysValidSchema)(n,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,i.validateArray)(e)))}};t.default=a},4003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i=r(4227),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>s.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>s._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:o,data:a,$data:c,it:d}=e,{opts:p}=d;if(!c&&0===r.length)return;const l=r.length>=p.loopRequired;if(d.allErrors?function(){if(l||c)e.block$data(s.nil,u);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(l||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,o,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,p.ownProperties)),t.if((0,s.not)(i),(()=>{e.error(),t.break()}))}),s.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),p.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${d.schemaEnv.baseId+d.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(d,t,d.opts.strictRequired)}}function u(){t.forOf("prop",o,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,p.ownProperties),(()=>e.error()))}))}}};t.default=o},4018:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(i,o),time:r(c(!0),d),"date-time":r(u(!0),f),"iso-time":r(c(),p),"iso-date-time":r(u(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return h.test(e)&&y.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if($.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return g.lastIndex=0,g.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=v&&e>=b}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:w},double:{type:"number",validate:w},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"iso-time":r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,p),"iso-date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],i=+t[2],o=+t[3];return i>=1&&i<=12&&o>=1&&o<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:s[i])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}const a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(e){return function(t){const r=a.exec(t);if(!r)return!1;const n=+r[1],s=+r[2],i=+r[3],o=r[4],c="-"===r[5]?-1:1,d=+(r[6]||0),p=+(r[7]||0);if(d>23||p>59||e&&!o)return!1;if(n<=23&&s<=59&&i<60)return!0;const l=s-p*c,u=n-d*c-(l<0?1:0);return(23===u||-1===u)&&(59===l||-1===l)&&i<61}}function d(e,t){if(!e||!t)return;const r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();return r&&n?r-n:void 0}function p(e,t){if(!e||!t)return;const r=a.exec(e),n=a.exec(t);return r&&n?(e=r[1]+r[2]+r[3])>(t=n[1]+n[2]+n[3])?1:e<t?-1:0:void 0}const l=/t|\s/i;function u(e){const t=c(e);return function(e){const r=e.split(l);return 2===r.length&&i(r[0])&&t(r[1])}}function f(e,t){if(!e||!t)return;const r=new Date(e).valueOf(),n=new Date(t).valueOf();return r&&n?r-n:void 0}function m(e,t){if(!e||!t)return;const[r,n]=e.split(l),[s,i]=t.split(l),a=o(r,s);return void 0!==a?a||d(n,i):void 0}const h=/\/|:/,y=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm,b=-(2**31),v=2**31-1;function w(){return!0}const $=/[^\\]\\Z/},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var s=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return s.CodeGen}});const i=r(3558),o=r(4551),a=r(396),c=r(3835),d=r(9029),p=r(6939),l=r(208),u=r(4227),f=r(3837),m=r(5944),h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,n,s,i,o,a,c,d,p,l,u,f,y,g,b,v,w,$,_,j,E,O,P,S;const T=e.strict,k=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===k||void 0===k?1:k||0,R=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,I=null!==(s=e.uriResolver)&&void 0!==s?s:m.default;return{strictSchema:null===(o=null!==(i=e.strictSchema)&&void 0!==i?i:T)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:T)||void 0===c||c,strictTypes:null!==(p=null!==(d=e.strictTypes)&&void 0!==d?d:T)&&void 0!==p?p:"log",strictTuples:null!==(u=null!==(l=e.strictTuples)&&void 0!==l?l:T)&&void 0!==u?u:"log",strictRequired:null!==(y=null!==(f=e.strictRequired)&&void 0!==f?f:T)&&void 0!==y&&y,code:e.code?{...e.code,optimize:N,regExp:R}:{optimize:N,regExp:R},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===($=e.inlineRefs)||void 0===$||$,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(j=e.addUsedSchema)||void 0===j||j,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(O=e.validateFormats)||void 0===O||O,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(S=e.int32range)||void 0===S||S,uriResolver:I}}class ${constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return T;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,e,"NOT SUPPORTED"),_.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=f;"id"===r&&(n={...f},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await d.call(this,e);this.refs[e]||await s.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,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw new Error(`schema ${t} must be string`)}return t=(0,p.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=j.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=j.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,p.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(N.call(this,r,t),!t)return(0,u.eachItem)(r,(e=>R.call(this,e))),this;C.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(r,0===n.type.length?e=>R.call(this,e,n):e=>n.type.forEach((t=>R.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=s[e];n&&i&&(s[e]=x(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let i;const{schemaId:o}=this.opts;if("object"==typeof e)i=e[o];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 a=this._cache.get(e);if(void 0!==a)return a;r=(0,p.normalizeId)(i||r);const d=p.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:d}),this._cache.set(a.schema,a),s&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_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 _(e,t,r,n="error"){for(const s in e){const i=s;i in t&&this.logger[n](`${r}: option ${s}. ${e[i]}`)}}function j(e){return e=(0,p.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 O(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function P(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function S(){const e={...this.opts};for(const t of y)delete e[t];return e}$.ValidationError=i.default,$.MissingRefError=o.default,t.default=$;const T={log(){},warn(){},error(){}},k=/^[a-z_$][a-z0-9_$:-]*$/i;function N(e,t){const{RULES:r}=this;if((0,u.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!k.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 R(e,t,r){var n;const s=null==t?void 0:t.post;if(r&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let o=s?i.post:i.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},i.rules.push(o)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?I.call(this,o,a,t.before):o.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function I(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function C(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=x(t)),e.validateSchema=this.compile(t,!0))}const A={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function x(e){return{anyOf:[e,A]}}},4227:(e,t,r)=>{"use strict";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 n=r(9029),s=r(1520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const s=n.RULES.keywords;for(const r in t)s[r]||m(e,`unknown keyword: "${r}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(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:s}){return(i,o,a,c)=>{const d=void 0===a?o:a instanceof n.Name?(o instanceof n.Name?e(i,o,a):t(i,o,a),a):o instanceof n.Name?(t(i,a,o),o):r(o,a);return c!==n.Name||d instanceof n.Name?d:s(i,d)}}function p(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&l(e,r,t),r}function l(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.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||(i(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=o,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,s,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(s)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,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(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),l(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:p}),items:d({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=p,t.setEvaluated=l;const u={};var f;function m(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:u[t.code]||(u[t.code]=new s._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f||(t.Type=f={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const s=t===f.Num;return r?s?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:s?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=m},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),s={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=s},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${s}`)}};t.default=s},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9029),s=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,s.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=t;if(void 0!==r){const{errorPath:o,dataPathArr:a,opts:c}=t;p(d.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${o}${(0,s.getErrorPath)(r,i,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function p(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==o&&(p(o instanceof n.Name?o:d.let("data",o,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==s&&(e.createErrors=s),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6939);class s extends Error{constructor(e,t,r,s){super(s||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=s},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:s,$data:i,schema:o,schemaCode:a,it:c}=e,{opts:d,errSchemaPath:p,schemaEnv:l,self:u}=c;d.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:u.formats,code:d.code.formats}),o=r.const("fDef",n._`${i}[${a}]`),c=r.let("fType"),p=r.let("format");r.if(n._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>r.assign(c,n._`${o}.type || "string"`).assign(p,n._`${o}.validate`)),(()=>r.assign(c,n._`"string"`).assign(p,o))),e.fail$data((0,n.or)(!1===d.strictSchema?n.nil:n._`${a} && !${p}`,function(){const e=l.$async?n._`(${o}.async ? await ${p}(${s}) : ${p}(${s}))`:n._`${p}(${s})`,r=n._`(typeof ${p} == "function" ? ${e} : ${p}.test(${s}))`;return n._`${p} && ${p} !== true && ${c} === ${t} && !${r}`}()))}():function(){const i=u.formats[o];if(!i)return void function(){if(!1!==d.strictSchema)throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${p}"`}u.logger.warn(e())}();if(!0===i)return;const[a,c,f]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):d.code.formats?n._`${d.code.formats}${(0,n.getProperty)(o)}`:void 0,s=r.scopeValue("formats",{key:o,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,s]:[e.type||"string",e.validate,n._`${s}.validate`]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!l.$async)throw new Error("async format in sync schema");return n._`await ${f}(${s})`}return"function"==typeof c?n._`${f}(${s})`:n._`${f}.test(${s})`}())}())}};t.default=s},4834:(e,t,r)=>{"use strict";const{HEX:n}=r(4914),s=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function i(e){if(d(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(s)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function o(e,t=!1){let r="",s=!0;for(const t of e){if(void 0===n[t])return;"0"!==t&&!0===s&&(s=!1),s||(r+=t)}return t&&0===r.length&&(r="0"),r}function a(e){if(d(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],s=[];let i=!1,a=!1,c=!1;function d(){if(s.length){if(!1===i){const e=o(s);if(void 0===e)return r.error=!0,!1;n.push(e)}s.length=0}return!0}for(let o=0;o<e.length;o++){const p=e[o];if("["!==p&&"]"!==p)if(":"!==p)if("%"===p){if(!d())break;i=!0}else s.push(p);else{if(!0===a&&(c=!0),!d())break;if(t++,n.push(":"),t>7){r.error=!0;break}o-1>=0&&":"===e[o-1]&&(a=!0)}}return s.length&&(i?r.zone=s.join(""):c?n.push(s.join("")):n.push(o(s))),r.address=n.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,escapedHost:r,isIPV6:!0}}}function c(e,t){let r="",n=!0;const s=e.length;for(let i=0;i<s;i++){const o=e[i];"0"===o&&n?(i+1<=s&&e[i+1]===t||i+1===s)&&(r+=o,n=!1):(n=o===t,r+=o)}return r}function d(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const p=/^\.\.?\//u,l=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;e.exports={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);const n=i(r);if(n.isIPV4)r=n.host;else{const t=a(n.host);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){const t=[];for(;e.length;)if(e.match(p))e=e.replace(p,"");else if(e.match(l))e=e.replace(l,"/");else if(e.match(u))e=e.replace(u,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(f);if(!r)throw new Error("Unexpected dot segment condition");{const n=r[0];e=e.slice(n.length),t.push(n)}}return t.join("")},normalizeIPv4:i,normalizeIPv6:a,stringArrayToHexStripped:o}},4874:(e,t,r)=>{"use strict";const n=r(793);e.exports=l;const s=function(){function e(e){return void 0!==e&&e}try{return"undefined"!=typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{},i={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:b,wrapResponseSerializer:b,wrapErrorSerializer:b,req:g,res:g,err:h,errWithCause:h};function o(e,t){return"silent"===e?1/0:t.levels.values[e]}const a=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),d={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function p(e,t){const r={logger:t,parent:e[c]};t[c]=r}function l(e){(e=e||{}).browser=e.browser||{};const t=e.browser.transmit;if(t&&"function"!=typeof t.send)throw Error("pino: transmit option must have a send function");const r=e.browser.write||s;e.browser.write&&(e.browser.asObject=!0);const n=e.serializers||{},i=function(e,t){return Array.isArray(e)?e.filter((function(e){return"!stdSerializers.err"!==e})):!0===e&&Object.keys(t)}(e.browser.serialize,n);let c=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(c=!1);const h=Object.keys(e.customLevels||{}),g=["error","fatal","warn","info","debug","trace"].concat(h);"function"==typeof r&&g.forEach((function(e){r[e]=r})),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");const b=e.level||"info",w=Object.create(r);w.log||(w.log=v),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:s[e]||s[d[e]||"log"]||v})),e[a]=n}(w,g,r),p({},w),Object.defineProperty(w,"levelVal",{get:function(){return o(this.level,this)}}),Object.defineProperty(w,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,u(this,$,w,"error"),u(this,$,w,"fatal"),u(this,$,w,"warn"),u(this,$,w,"info"),u(this,$,w,"debug"),u(this,$,w,"trace"),h.forEach((e=>{u(this,$,w,e)}))}});const $={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||v};function _(r,s,o){if(!s)throw new Error("missing bindings for child Pino");o=o||{},i&&s.serializers&&(o.serializers=s.serializers);const a=o.serializers;if(i&&a){var c=Object.assign({},n,a),d=!0===e.browser.serialize?Object.keys(c):i;delete s.serializers,f([s],d,c,this._stdErrSerialize)}function l(e){this._childLevel=1+(0|e._childLevel),this.bindings=s,c&&(this.serializers=c,this._serialize=d),t&&(this._logEvent=m([].concat(e._logEvent.bindings,s)))}l.prototype=this;const u=new l(this);return p(this,u),u.child=function(...e){return _.call(this,r,...e)},u.level=o.level||this.level,r.onChild(u),u}return w.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},l.levels.values,t),labels:Object.assign({},l.levels.labels,function(e){const t={};return Object.keys(e).forEach((function(r){t[e[r]]=r})),t}(t))}}(e),w.level=b,w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=v,w.serializers=n,w._serialize=i,w._stdErrSerialize=c,w.child=function(...e){return _.call(this,$,...e)},t&&(w._logEvent=m()),w}function u(e,t,r,i){if(Object.defineProperty(e,i,{value:o(e.level,r)>o(i,r)?v:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===v){if(!t.transmit)return;const n=o(t.transmit.level||e.level,r);if(o(i,r)<n)return}e[i]=function(e,t,r,i){return c=e[a][i],function(){const a=t.timestamp(),d=new Array(arguments.length),p=Object.getPrototypeOf&&Object.getPrototypeOf(this)===s?s:this;for(var l=0;l<d.length;l++)d[l]=arguments[l];var u=!1;if(t.serialize&&(f(d,this._serialize,this.serializers,this._stdErrSerialize),u=!0),t.asObject||t.formatters?c.call(p,function(e,t,r,s,i){const{level:o,log:a=e=>e}=i.formatters||{},c=r.slice();let d=c[0];const p={};if(s&&(p.time=s),o){const r=o(t,e.levels.values[t]);Object.assign(p,r)}else p.level=e.levels.values[t];let l=1+(0|e._childLevel);if(l<1&&(l=1),null!==d&&"object"==typeof d){for(;l--&&"object"==typeof c[0];)Object.assign(p,c.shift());d=c.length?n(c.shift(),c):void 0}else"string"==typeof d&&(d=n(c.shift(),c));return void 0!==d&&(p[i.messageKey]=d),a(p)}(this,i,d,a,t)):c.apply(p,d),t.transmit){const n=t.transmit.level||e._level,s=o(n,r),c=o(i,r);if(c<s)return;!function(e,t,r,n=!1){const s=t.send,i=t.ts,o=t.methodLevel,a=t.methodValue,c=t.val,d=e._logEvent.bindings;n||f(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter((function(e){return-1===d.indexOf(e)})),e._logEvent.level.label=o,e._logEvent.level.value=a,s(o,e._logEvent,c),e._logEvent=m(d)}(this,{ts:a,methodLevel:i,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:o(e._level,r)},d,u)}};var c}(e,t,r,i);const d=function(e){const t=[];e.bindings&&t.push(e.bindings);let r=e[c];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==d.length&&(e[i]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(d,e[i]))}function f(e,t,r,n){for(const s in e)if(n&&e[s]instanceof Error)e[s]=l.stdSerializers.err(e[s]);else if("object"==typeof e[s]&&!Array.isArray(e[s])&&t)for(const n in e[s])t.indexOf(n)>-1&&n in r&&(e[s][n]=r[n](e[s][n]))}function m(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function h(e){const t={type:e.constructor.name,msg:e.message,stack:e.stack};for(const r in e)void 0===t[r]&&(t[r]=e[r]);return t}function y(e){return"function"==typeof e.timestamp?e.timestamp:!1===e.timestamp?w:$}function g(){return{}}function b(e){return e}function v(){}function w(){return!1}function $(){return Date.now()}l.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},l.stdSerializers=i,l.stdTimeFunctions=Object.assign({},{nullTime:w,epochTime:$,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=l,e.exports.pino=l},4914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i=r(4227),o=r(4227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:d}=e,{opts:p}=d,l=(0,n.allSchemaProperties)(r),u=l.filter((e=>(0,i.alwaysValidSchema)(d,r[e])));if(0===l.length||u.length===l.length&&(!d.opts.unevaluated||!0===d.props))return;const f=p.strictSchema&&!p.allowMatchingProperties&&c.properties,m=t.name("valid");!0===d.props||d.props instanceof s.Name||(d.props=(0,o.evaluatedPropsToName)(t,d.props));const{props:h}=d;function y(e){for(const t in f)new RegExp(e).test(t)&&(0,i.checkStrictMode)(d,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(i=>{t.if(s._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=u.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:o.Type.Str},m),d.opts.unevaluated&&!0!==h?t.assign(s._`${h}[${i}]`,!0):n||d.allErrors||t.if((0,s.not)(m),(()=>t.break()))}))}))}!function(){for(const e of l)f&&y(e),d.allErrors?g(e):(t.var(m,!0),g(e),t.if(m))}()}};t.default=a},5354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(494),s={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=s},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9029),s=r(4227),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?o(e,n):(0,s.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:r,schema:i,data:o,keyword:a,it:c}=e;c.items=!0;const d=r.const("len",n._`${o}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${d} <= ${t.length}`);else if("object"==typeof i&&!(0,s.alwaysValidSchema)(c,i)){const i=r.var("valid",n._`${d} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,d,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:s.Type.Num},i),c.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=o,t.default=i},5765:(e,t,r)=>{"use strict";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 n=r(9029),s=r(4227),i=r(2023),o=r(4227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function d(e,t,r,s){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return s?(0,n.or)(i,(0,n.not)(c(e,t,r))):i}function p(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:s,it:i}=e;r.if(d(r,s,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},s,i){return(0,n.or)(...s.map((s=>(0,n.and)(d(e,t,s,r.ownProperties),n._`${i} = ${s}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,s){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return s?n._`${i} && ${c(e,t,r)}`:i},t.noPropertyInData=d,t.allSchemaProperties=p,t.schemaProperties=function(e,t){return p(t).filter((r=>!(0,s.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:o,errorPath:a},it:c},d,p,l){const u=l?n._`${e}, ${t}, ${s}${o}`:t,f=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,a)],[i.default.parentData,c.parentData],[i.default.parentDataProperty,c.parentDataProperty],[i.default.rootData,i.default.rootData]];c.opts.dynamicRef&&f.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const m=n._`${u}, ${r.object(...f)}`;return p!==n.nil?n._`${d}.call(${p}, ${m})`:n._`${d}(${m})`};const l=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const s=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?l:(0,o.useFunc)(e,i)}(${r}, ${s})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(o){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:s.Type.Num},a),t.if((0,n.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,s.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const o=e.subschema({keyword:i,schemaProp:s,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(o,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},5844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),s={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(s,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(o)}))}};t.default=s},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=n.operators,i={maximum:{okStr:"<=",ok:s.LTE,fail:s.GT},minimum:{okStr:">=",ok:s.GTE,fail:s.LT},exclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},exclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},o={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(n._`${r} ${i[t].fail} ${s} || isNaN(${r})`)}};t.default=a},5944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8343);n.code='require("ajv/dist/runtime/uri").default',t.default=n},6022:e=>{!function(){"use strict";var t=[,function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.lengthOf=t.keysOf=t.isObject=t.isInfOrNaN=t.isFunction=t.isArguments=t.hasOwn=t.handleError=t.convertMapToObject=t.checkError=void 0,t.isFunction=function(e){return"function"==typeof e},t.isObject=function(e){return"object"===n(e)},t.keysOf=function(e){return Object.keys(e)},t.lengthOf=function(e){return Object.keys(e).length};var s=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=s,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var n,s,i=(s=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i=[],o=!0,a=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){a=!0,s=e}finally{try{o||null==r.return||r.return()}finally{if(a)throw s}}return i}}(n,s)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(n,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],a=i[1];return e[o]=a,e}),{})},t.isArguments=function(e){return null!=e&&s(e,"callee")},t.isInfOrNaN=function(e){return Number.isNaN(e)||e===1/0||e===-1/0};var i={maxStack:function(e){return new RegExp("Maximum call stack size exceeded","g").test(e)}};t.checkError=i,t.handleError=function(e){return function(){try{return e.apply(this,arguments)}catch(e){if(i.maxStack(e.message))throw new Error("Converting circular structure to JSON");throw e}}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Base64=void 0;for(var r=Object.create(null),n=function(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)},s=0;s<64;s++)r[n(s)]=s;var i=function(e){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var t=[],r=0;r<e;r++)t.push(0);return t.$Uint8ArrayPolyfill=!0,t}return new Uint8Array(new ArrayBuffer(e))},o={encode:function(e){if("string"==typeof e){var t=e;e=i(t.length);for(var r=0;r<t.length;r++){var s=t.charCodeAt(r);if(s>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=s}}for(var o=[],a=null,c=null,d=null,p=null,l=0;l<e.length;l++)switch(l%3){case 0:a=e[l]>>2&63,c=(3&e[l])<<4;break;case 1:c|=e[l]>>4&15,d=(15&e[l])<<2;break;case 2:d|=e[l]>>6&3,p=63&e[l],o.push(n(a)),o.push(n(c)),o.push(n(d)),o.push(n(p)),a=null,c=null,d=null,p=null}return null!=a&&(o.push(n(a)),o.push(n(c)),null==d?o.push("="):o.push(n(d)),null==p&&o.push("=")),o.join("")},decode:function(e){var t=Math.floor(3*e.length/4);"="==e.charAt(e.length-1)&&(t--,"="==e.charAt(e.length-2)&&t--);for(var n,s=i(t),o=null,a=null,c=null,d=0,p=0;p<e.length;p++){var l="="===(n=e.charAt(p))?-1:r[n];switch(p%4){case 0:if(l<0)throw new Error("invalid base64 string");o=l<<2;break;case 1:if(l<0)throw new Error("invalid base64 string");o|=l>>4,s[d++]=o,a=(15&l)<<4;break;case 2:l>=0&&(a|=l>>2,s[d++]=a,c=(3&l)<<6);break;case 3:l>=0&&(s[d++]=c|l)}}return s},newBinary:i};t.Base64=o},function(e){e.exports={_noYieldsAllowed:function(e){return e()}}},function(e,t){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function e(t,s,i,o,a){var c=s[t];switch(r(c)){case"string":return n(c);case"number":return isFinite(c)?String(c):"null";case"boolean":return String(c);case"object":if(!c)return"null";var d,p=o+i,l=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var u=c.length,f=0;f<u;f+=1)l[f]=e(f,c,i,p,a)||"null";return d=0===l.length?"[]":p?"[\n"+p+l.join(",\n"+p)+"\n"+o+"]":"["+l.join(",")+"]"}var m=Object.keys(c);return a&&(m=m.sort()),m.forEach((function(t){(d=e(t,c,i,p,a))&&l.push(n(t)+(p?": ":":")+d)})),d=0===l.length?"{}":p?"{\n"+p+l.join(",\n"+p)+"\n"+o+"}":"{"+l.join(",")+"}"}};t.default=function(e,t){var r=Object.assign({indent:"",canonical:!1},t);if(!0===r.indent)r.indent=" ";else if("number"==typeof r.indent){for(var n="",i=0;i<r.indent;i++)n+=" ";r.indent=n}return s("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function n(e){var s=r[e];if(void 0!==s)return s.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}var s={};!function(){var e=s,t=n(2).Base64,r=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var i=n(1),o={};e.EJSON=o;var a=new Map;o.addType=function(e,t){if(a.has(e))throw new Error("Type ".concat(e," already present"));a.set(e,t)};var c=[{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$date")&&1===(0,i.lengthOf)(e)},matchObject:function(e){return e instanceof Date},toJSONValue:function(e){return{$date:e.getTime()}},fromJSONValue:function(e){return new Date(e.$date)}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$regexp")&&(0,i.hasOwn)(e,"$flags")&&2===(0,i.lengthOf)(e)},matchObject:function(e){return e instanceof RegExp},toJSONValue:function(e){return{$regexp:e.source,$flags:e.flags}},fromJSONValue:function(e){return new RegExp(e.$regexp,e.$flags.slice(0,50).replace(/[^gimuy]/g,"").replace(/(.)(?=.*\1)/g,""))}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$InfNaN")&&1===(0,i.lengthOf)(e)},matchObject:i.isInfOrNaN,toJSONValue:function(e){return{$InfNaN:Number.isNaN(e)?0:e===1/0?1:-1}},fromJSONValue:function(e){return e.$InfNaN/0}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$binary")&&1===(0,i.lengthOf)(e)},matchObject:function(e){return"undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&(0,i.hasOwn)(e,"$Uint8ArrayPolyfill")},toJSONValue:function(e){return{$binary:t.encode(e)}},fromJSONValue:function(e){return t.decode(e.$binary)}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$escape")&&1===(0,i.lengthOf)(e)},matchObject:function(e){var t=!1;if(e){var r=(0,i.lengthOf)(e);1!==r&&2!==r||(t=c.some((function(t){return t.matchJSONValue(e)})))}return t},toJSONValue:function(e){var t={};return(0,i.keysOf)(e).forEach((function(r){t[r]=o.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,i.keysOf)(e.$escape).forEach((function(r){t[r]=o.fromJSONValue(e.$escape[r])})),t}},{matchJSONValue:function(e){return(0,i.hasOwn)(e,"$type")&&(0,i.hasOwn)(e,"$value")&&2===(0,i.lengthOf)(e)},matchObject:function(e){return o._isCustomType(e)},toJSONValue:function(e){var t=r._noYieldsAllowed((function(){return e.toJSONValue()}));return{$type:e.typeName(),$value:t}},fromJSONValue:function(e){var t=e.$type;if(!a.has(t))throw new Error("Custom EJSON type ".concat(t," is not defined"));var n=a.get(t);return r._noYieldsAllowed((function(){return n(e.$value)}))}}];o._isCustomType=function(e){return e&&(0,i.isFunction)(e.toJSONValue)&&(0,i.isFunction)(e.typeName)&&a.has(e.typeName())},o._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,i.convertMapToObject)(a)},o._getConverters=function(){return c};var d=function(e){for(var t=0;t<c.length;t++){var r=c[t];if(r.matchObject(e))return r.toJSONValue(e)}},p=function e(t){if(null===t)return null;var r=d(t);return void 0!==r?r:(0,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)||void 0===n||(0,i.isInfOrNaN)(n)){var s=d(n);s?t[r]=s:e(n)}})),t):t};o._adjustTypesToJSONValue=p,o.toJSONValue=function(e){var t=d(e);if(void 0!==t)return t;var r=e;return(0,i.isObject)(e)&&(r=o.clone(e),p(r)),r};var l=function(e){if((0,i.isObject)(e)&&null!==e){var t=(0,i.keysOf)(e);if(t.length<=2&&t.every((function(e){return"string"==typeof e&&"$"===e.substr(0,1)})))for(var r=0;r<c.length;r++){var n=c[r];if(n.matchJSONValue(e))return n.fromJSONValue(e)}}return e},u=function e(t){if(null===t)return null;var r=l(t);return r!==t?r:(0,i.isObject)(t)?((0,i.keysOf)(t).forEach((function(r){var n=t[r];if((0,i.isObject)(n)){var s=l(n);if(n!==s)return void(t[r]=s);e(n)}})),t):t};o._adjustTypesFromJSONValue=u,o.fromJSONValue=function(e){var t=l(e);return t===e&&(0,i.isObject)(e)&&(t=o.clone(e),u(t)),t},o.stringify=(0,i.handleError)((function(e,t){var r=o.toJSONValue(e);return t&&(t.canonical||t.indent)?n(4)(r,t):JSON.stringify(r)})),o.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return o.fromJSONValue(JSON.parse(e))},o.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},o.equals=function(e,t,r){var n,s=!(!r||!r.keyOrderSensitive);if(e===t)return!0;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(!e||!t)return!1;if(!(0,i.isObject)(e)||!(0,i.isObject)(t))return!1;if(e instanceof Date&&t instanceof Date)return e.valueOf()===t.valueOf();if(o.isBinary(e)&&o.isBinary(t)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if((0,i.isFunction)(e.equals))return e.equals(t,r);if((0,i.isFunction)(t.equals))return t.equals(e,r);var a,c=Array.isArray(e),d=Array.isArray(t);if(c!==d)return!1;if(c&&d){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!o.equals(e[n],t[n],r))return!1;return!0}switch(o._isCustomType(e)+o._isCustomType(t)){case 1:return!1;case 2:return o.equals(o.toJSONValue(e),o.toJSONValue(t))}var p=(0,i.keysOf)(e),l=(0,i.keysOf)(t);return s?(n=0,a=p.every((function(s){return!(n>=l.length||s!==l[n]||!o.equals(e[s],t[l[n]],r)||(n++,0))}))):(n=0,a=p.every((function(s){return!!(0,i.hasOwn)(t,s)&&!!o.equals(e[s],t[s],r)&&(n++,!0)}))),a&&n===l.length},o.clone=function(e){var t;if(!(0,i.isObject)(e))return e;if(null===e)return null;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return e;if(o.isBinary(e)){t=o.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(o.clone):(0,i.isArguments)(e)?Array.from(e).map(o.clone):(0,i.isFunction)(e.clone)?e.clone():o._isCustomType(e)?o.fromJSONValue(o.clone(o.toJSONValue(e)),!0):(t={},(0,i.keysOf)(e).forEach((function(r){t[r]=o.clone(e[r])})),t)},o.newBinary=t.newBinary}(),e.exports=s.EJSON}()},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2128),s=r(7060),i=r(6378),o=r(7532),a=r(9857),c=[n.default,s.default,(0,i.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&i.discriminator)return;const a=r,c=t.let("valid",!1),d=t.let("passing",null),p=t.name("_valid");e.setParams({passing:d}),t.block((function(){a.forEach(((r,i)=>{let a;(0,s.alwaysValidSchema)(o,r)?t.var(p,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},p),i>0&&t.if(n._`${p} && ${c}`).assign(c,!1).assign(d,n._`[${d}, ${i}]`).else(),t.if(p,(()=>{t.assign(c,!0),t.assign(d,i),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},6250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},6378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5457),s=r(5354),i=r(494),o=r(3966),a=r(2661),c=r(3025),d=r(9713),p=r(8660),l=r(117),u=r(5333),f=r(7923),m=r(6505),h=r(6163),y=r(5844),g=r(1239),b=r(4426);t.default=function(e=!1){const t=[f.default,m.default,h.default,y.default,g.default,b.default,d.default,p.default,c.default,l.default,u.default];return e?t.push(s.default,o.default):t.push(n.default,i.default),t.push(a.default),t}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(3282),s=r(9029),i=s.operators,o={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},a={message:({keyword:e,schemaCode:t})=>s.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>s._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:i,keyword:a,it:c}=e,{opts:d,self:p}=c;if(!d.validateFormats)return;const l=new n.KeywordCxt(c,p.RULES.all.format.definition,"format");function u(e){return s._`${e}.compare(${r}, ${i}) ${o[a].fail} 0`}l.$data?function(){const r=t.scopeValue("formats",{ref:p.formats,code:d.code.formats}),n=t.const("fmt",s._`${r}[${l.schemaCode}]`);e.fail$data((0,s.or)(s._`typeof ${n} != "object"`,s._`${n} instanceof RegExp`,s._`typeof ${n}.compare != "function"`,u(n)))}():function(){const r=l.schema,n=p.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const i=t.scopeValue("formats",{key:r,ref:n,code:d.code.formats?s._`${d.code.formats}${(0,s.getProperty)(r)}`:void 0});e.fail$data(u(i))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(5765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},6653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(7652),i=r(3835),o=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===s.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:d,it:p}=e,{oneOf:l}=d;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=c.propertyName;if("string"!=typeof u)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 f=t.let("valid",!1),m=t.const("tag",n._`${r}${(0,n.getProperty)(u)}`);function h(r){const s=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},s);return e.mergeEvaluated(i,n.Name),s}t.if(n._`typeof ${m} == "string"`,(()=>function(){const r=function(){var e;const t={},r=s(d);let n=!0;for(let t=0;t<l.length;t++){let d=l[t];if((null==d?void 0:d.$ref)&&!(0,a.schemaHasRulesButRef)(d,p.self.RULES)){const e=d.$ref;if(d=i.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,e),d instanceof i.SchemaEnv&&(d=d.schema),void 0===d)throw new o.default(p.opts.uriResolver,p.baseId,e)}const f=null===(e=null==d?void 0:d.properties)||void 0===e?void 0:e[u];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);n=n&&(r||s(d)),c(f,t)}if(!n)throw new Error(`discriminator: "${u}" must be required`);return t;function s({required:e}){return Array.isArray(e)&&e.includes(u)}function c(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`);for(const r of e.enum)f(r,t)}}function f(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${u}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${m} === ${e}`),t.assign(f,h(r[e]));t.else(),e.error(!1,{discrError:s.DiscrError.Mapping,tag:m,tagName:u}),t.endIf()}()),(()=>e.error(!1,{discrError:s.DiscrError.Tag,tag:m,tagName:u}))),e.ok(f)}};t.default=c},6939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(4227),s=r(2017),i=r(7106),o=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 a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.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++,!o.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=d(e))),t===1/0))return 1/0}return t}function p(e,t="",r){!1!==r&&(t=f(t));const n=e.parse(t);return l(e,n)}function l(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=p,t._getFullPath=l;const u=/#\/?$/;function f(e){return e?e.replace(u,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,r){return r=f(r),e.resolve(t,r)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,o=f(e[r]||t),a={"":o},c=p(n,o,!1),d={},l=new Set;return i(e,{allKeys:!0},((e,t,n,s)=>{if(void 0===s)return;const i=c+t;let o=a[s];function p(t){const r=this.opts.uriResolver.resolve;if(t=f(o?r(o,t):t),l.has(t))throw h(t);l.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?u(e,n.schema,t):t!==f(i)&&("#"===t[0]?(u(e,d[t],t),d[t]=e):this.refs[t]=i),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);p.call(this,`#${e}`)}}"string"==typeof e[r]&&(o=p.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=o})),d;function u(e,t,r){if(void 0!==t&&!s(e,t))throw h(r)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function s(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}h(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,s)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var s,i,o,d;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(s=c(e))>0&&o.length>s&&!o.warned){o.warned=!0;var p=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");p.name="MaxListenersExceededWarning",p.emitter=e,p.type=t,p.count=o.length,d=p,console&&console.warn&&console.warn(d)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=p.bind(n);return s.listener=r,n.wrapFn=s,s}function u(e,t,r){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):m(s,s.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function h(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function s(i){n.once&&e.removeEventListener(t,s),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var s="error"===e,i=this._events;if(void 0!==i)s=s&&void 0===i.error;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var d=c.length,p=m(c,d);for(r=0;r<d;++r)n(p[r],this,t)}return!0},i.prototype.addListener=function(e,t){return d(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return d(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,s,i,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,s=i;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(s=i[n])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return u(this,e,!0)},i.prototype.rawListeners=function(e){return u(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5882),s=r(3439),i=r(7307),o=r(422),a=r(4486),c=r(4003),d=r(1163),p=r(617),l=r(7935),u=r(8643),f=[n.default,s.default,i.default,o.default,a.default,c.default,d.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,u.default];t.default=f},7106:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,s,i,o,a,c,d,p,l){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var u in n(i,o,a,c,d,p,l),i){var f=i[u];if(Array.isArray(f)){if(u in t.arrayKeywords)for(var m=0;m<f.length;m++)r(e,n,s,f[m],o+"/"+u+"/"+m,a,o,u,i,m)}else if(u in t.propsKeywords){if(f&&"object"==typeof f)for(var h in f)r(e,n,s,f[h],o+"/"+u+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,u,i,h)}else(u in t.keywords||e.allKeys&&!(u in t.skipKeywords))&&r(e,n,s,f,o+"/"+u,a,o,u,i)}s(i,o,a,c,d,p,l)}}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}},7307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(3853),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,d=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,s.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${d} ${c} ${o}`)}};t.default=o},7532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(4737).default];t.default=n},7652:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},7845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(1520);class s extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i||(t.UsedValueState=i={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.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=o;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(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 n=this.toName(e),{prefix:s}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[s];if(o){const e=o.get(i);if(e)return e}else o=this._values[s]=new Map;o.set(i,n);const a=this._scope[s]||(this._scope[s]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:s,itemIndex:c}),n}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 n._`${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,o={},a){let c=n.nil;for(const d in e){const p=e[d];if(!p)continue;const l=o[d]=o[d]||new Map;p.forEach((e=>{if(l.has(e))return;l.set(e,i.Started);let o=r(e);if(o){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new s(e);c=n._`${c}${o}${this.opts._n}`}l.set(e,i.Completed)}))}return c}}},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(9029),s=r(4227);function i(e,t,r){const{gen:i,compositeRule:o,data:a,opts:c}=e;if(void 0===r)return;const d=n._`${a}${(0,n.getProperty)(t)}`;if(o)return void(0,s.checkStrictMode)(e,`default is ignored for: ${d}`);let p=n._`${d} === undefined`;"empty"===c.useDefaults&&(p=n._`${p} || ${d} === null || ${d} === ""`),i.if(p,n._`${d} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},7887:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(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},n){const s=t.RULES.types[n];return s&&!0!==s&&r(e,s)},t.shouldUseGroup=r,t.shouldUseRule=n},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),s={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:s}=e;if((0,n.alwaysValidSchema)(s,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=s},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(6250),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:o,schemaCode:a,schema:c}=e;o||c&&"object"==typeof c?e.fail$data(n._`!${(0,s.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=o},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4018),s=r(6461),i=r(9029),o=new i.Name("fullFormats"),a=new i.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return d(e,t,n.fullFormats,o),e;const[r,i]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,o];return d(e,t.formats||n.formatNames,r,i),t.keywords&&(0,s.default)(e),e};function d(e,t,r,n){var s,o;null!==(s=(o=e.opts.code).formats)&&void 0!==s||(o.formats=i._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}c.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},8343:(e,t,r)=>{"use strict";const{normalizeIPv6:n,normalizeIPv4:s,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:a}=r(4834),c=r(343);function d(e,t,r,n){const s={};return n||(e=f(p(e,r),r),t=f(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=i(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=i(t.path||""),s.query=t.query):(t.path?("/"===t.path.charAt(0)?s.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:s.path=t.path:s.path="/"+t.path,s.path=i(s.path)),s.query=t.query):(s.path=e.path,void 0!==t.query?s.query=t.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function p(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:""},n=Object.assign({},t),s=[],a=c[(n.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&s.push(r.scheme,":");const d=o(r);if(void 0!==d&&("suffix"!==n.reference&&s.push("//"),s.push(d),r.path&&"/"!==r.path.charAt(0)&&s.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===d&&(e=e.replace(/^\/\//u,"/%2F")),s.push(e)}return void 0!==r.query&&s.push("?",r.query),void 0!==r.fragment&&s.push("#",r.fragment),s.join("")}const l=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),u=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function f(e,t){const r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const d=e.match(u);if(d){if(i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||"",i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]),i.host){const e=s(i.host);if(!1===e.isIPV4){const t=n(e.host);i.host=t.host.toLowerCase(),a=t.isIPV6}else i.host=e.host,a=!0}void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");const e=c[(r.scheme||i.scheme||"").toLowerCase()];if(!(r.unicodeSupport||e&&e.unicodeSupport)&&i.host&&(r.domainHost||e&&e.domainHost)&&!1===a&&function(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||l[t])return!0;return!1}(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(o&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),o&&void 0!==i.host&&(i.host=unescape(i.host)),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),e&&e.parse&&e.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}const m={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=p(f(e,t),t):"object"==typeof e&&(e=f(p(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return p(d(f(e,n),f(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:d,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=p(a(f(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=p(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=p(a(f(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=p(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:f};e.exports=m,e.exports.default=m,e.exports.fastUri=m},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i=r(6250),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:o,schema:a,schemaCode:c,it:d}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const p=a.length>=d.opts.loopEnum;let l;const u=()=>null!=l?l:l=(0,s.useFunc)(t,i.default);let f;if(p||o)f=t.let("valid"),e.block$data(f,(function(){t.assign(f,!1),t.forOf("v",c,(e=>t.if(n._`${u()}(${r}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);f=(0,n.or)(...a.map(((t,s)=>function(e,t){const s=a[t];return"object"==typeof s&&null!==s?n._`${u()}(${r}, ${e}[${t}])`:n._`${r} === ${s}`}(e,s))))}e.pass(f)}};t.default=o},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),s=r(9029),i=r(2023),o=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>s._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:d,it:p}=e;if(!d)throw new Error("ajv implementation error");const{allErrors:l,opts:u}=p;if(p.props=!0,"all"!==u.removeAdditional&&(0,o.alwaysValidSchema)(p,r))return;const f=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(s._`delete ${c}[${e}]`)}function y(n){if("all"===u.removeAdditional||u.removeAdditional&&!1===r)h(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(l||t.break());if("object"==typeof r&&!(0,o.alwaysValidSchema)(p,r)){const r=t.name("valid");"failing"===u.removeAdditional?(g(n,r,!1),t.if((0,s.not)(r),(()=>{e.reset(),h(n)}))):(g(n,r),l||t.if((0,s.not)(r),(()=>t.break())))}}}function g(t,r,n){const s={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===n&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,r)}t.forIn("key",c,(r=>{f.length||m.length?t.if(function(r){let i;if(f.length>8){const e=(0,o.schemaRefOrVal)(p,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=f.length?(0,s.or)(...f.map((e=>s._`${r} === ${e}`))):s.nil;return m.length&&(i=(0,s.or)(i,...m.map((t=>s._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,s.not)(i)}(r),(()=>y(r))):y(r)})),e.ok(s._`${d} === ${i.default.errors}`)}};t.default=a},8708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(9029),s=r(4227),i=r(2023);function o(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function a(e,t){const{gen:r,validateName:s,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${s}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,s,i){const{it:c}=e,{gen:p,compositeRule:l,allErrors:u}=c,f=d(e,r,s);(null!=i?i:l||u)?o(p,f):a(c,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:s}=e,{gen:c,compositeRule:p,allErrors:l}=s;o(c,d(e,r,n)),p||l||a(s,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:s,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,i.default.errors,(o=>{e.const(c,n._`${i.default.vErrors}[${o}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(i.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,s))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function d(e,t,r){const{createErrors:s}=e.it;return!1===s?n._`{}`:function(e,t,r={}){const{gen:s,it:o}=e,a=[p(o,r),l(e,r)];return function(e,{params:t,message:r},s){const{keyword:o,data:a,schemaValue:d,it:p}=e,{opts:l,propertyName:u,topSchemaRef:f,schemaPath:m}=p;s.push([c.keyword,o],[c.params,"function"==typeof t?t(e):t||n._`{}`]),l.messages&&s.push([c.message,"function"==typeof r?r(e):r]),l.verbose&&s.push([c.schema,d],[c.parentSchema,n._`${f}${m}`],[i.default.data,a]),u&&s.push([c.propertyName,u])}(e,t,a),s.object(...a)}(e,t,r)}function p({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,s.getErrorPath)(t,s.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function l({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let o=i?t:n.str`${t}/${e}`;return r&&(o=n.str`${o}${(0,s.getErrorPath)(r,s.Type.Str)}`),[c.schemaPath,o]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(8708),s=r(9029),i=r(2023),o={message:"boolean schema is false"};function a(e,t){const{gen:r,data:s}=e,i={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(i.default.data):(t.assign(s._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},9029:(e,t,r)=>{"use strict";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 n=r(1520),s=r(7845);var i=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var o=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?s.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class d extends a{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 n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return N(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class p extends d{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends a{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=R(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class h extends a{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 n=r.length;for(;n--;){const s=r[n];s.optimizeNames(e,t)||(I(e,s.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>k(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class b extends y{}b.kind="else";class v 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 b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(C(e),t instanceof v?[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=R(this.condition,e,t),this}get names(){const e=super.names;return N(e,this.condition),this.else&&k(e,this.else.names),e}}v.kind="if";class w extends y{}w.kind="for";class $ extends w{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=R(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}}class _ extends w{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?s.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=N(super.names,this.from);return N(e,this.to)}}class j extends w{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}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=R(this.iterable,e,t),this}get names(){return k(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 O extends h{render(e){return"return "+super.render(e)}}O.kind="return";class P 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,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&k(e,this.catch.names),this.finally&&k(e,this.finally.names),e}}class S extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}S.kind="catch";class T extends y{render(e){return"finally"+super.render(e)}}function k(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function N(e,t){return t instanceof n._CodeOrName?k(e,t.names):e}function R(e,t,r){return e instanceof n.Name?i(e):(s=e)instanceof n._Code&&s._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var s;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function I(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function C(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${D(e)}`}T.kind="finally",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 s.Scope({parent:e}),this._nodes=[new g]}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,n){const s=this._scope.toName(t);return void 0!==r&&n&&(this._constants[s.str]=r),this._leafNode(new c(e,s,r)),s}const(e,t,r){return this._def(s.varKinds.const,e,t,r)}let(e,t,r){return this._def(s.varKinds.let,e,t,r)}var(e,t,r){return this._def(s.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new d(e,t,r))}add(e,r){return this._leafNode(new p(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[r,s]of e)t.length>1&&t.push(","),t.push(r),(r!==s||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,s));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new v(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 v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new $(e),t)}forRange(e,t,r,n,i=(this.opts.es5?s.varKinds.var:s.varKinds.let)){const o=this._scope.toName(e);return this._for(new _(i,o,t,r),(()=>n(o)))}forOf(e,t,r,i=s.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(o,n._`${e}[${t}]`),r(o)}))}return this._for(new j("of",i,o,t),(()=>r(o)))}forIn(e,t,r,i=(this.opts.es5?s.varKinds.var:s.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new j("in",i,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new O;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new P;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new S(e),t(e)}return r&&(this._currNode=n.finally=new T,this.code(r)),this._endBlockNode(S,T)}throw(e){return this._leafNode(new f(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=n.nil,r,s){return this._blockNode(new E(e,t,r)),s&&this.code(s).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 v))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=C;const A=q(t.operators.AND);t.and=function(...e){return e.reduce(A)};const x=q(t.operators.OR);function q(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(x)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),s=r(4227),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:o}=e;if((0,s.alwaysValidSchema)(o,r))return;const a=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=i},9857:(e,t)=>{"use strict";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"]}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.d(n,{default:()=>Ut});var e={};r.r(e),r.d(e,{hasBrowserEnv:()=>ue,hasStandardBrowserEnv:()=>me,hasStandardBrowserWebWorkerEnv:()=>he,navigator:()=>fe,origin:()=>ye});var t=r(7007),s=r(3282),i=r(8182);function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:c}=Object,d=(p=Object.create(null),e=>{const t=a.call(e);return p[t]||(p[t]=t.slice(8,-1).toLowerCase())});var p;const l=e=>(e=e.toLowerCase(),t=>d(t)===e),u=e=>t=>typeof t===e,{isArray:f}=Array,m=u("undefined"),h=l("ArrayBuffer"),y=u("string"),g=u("function"),b=u("number"),v=e=>null!==e&&"object"==typeof e,w=e=>{if("object"!==d(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},$=l("Date"),_=l("File"),j=l("Blob"),E=l("FileList"),O=l("URLSearchParams"),[P,S,T,k]=["ReadableStream","Request","Response","Headers"].map(l);function N(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,s;if("object"!=typeof e&&(e=[e]),f(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let o;for(n=0;n<i;n++)o=s[n],t.call(null,e[o],o,e)}}function R(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,s=r.length;for(;s-- >0;)if(n=r[s],t===n.toLowerCase())return n;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,C=e=>!m(e)&&e!==I,A=(x="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>x&&e instanceof x);var x;const q=l("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),L=l("RegExp"),U=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};N(r,((r,s)=>{let i;!1!==(i=t(r,s,e))&&(n[s]=i||r)})),Object.defineProperties(e,n)},z=l("AsyncFunction"),M=(F="function"==typeof setImmediate,V=g(I.postMessage),F?setImmediate:V?(B=`axios@${Math.random()}`,J=[],I.addEventListener("message",(({source:e,data:t})=>{e===I&&t===B&&J.length&&J.shift()()}),!1),e=>{J.push(e),I.postMessage(B,"*")}):e=>setTimeout(e));var F,V,B,J;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||M,G={isArray:f,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!m(e)&&null!==e.constructor&&!m(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=d(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:y,isNumber:b,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:w,isReadableStream:P,isRequest:S,isResponse:T,isHeaders:k,isUndefined:m,isDate:$,isFile:_,isBlob:j,isRegExp:L,isFunction:g,isStream:e=>v(e)&&g(e.pipe),isURLSearchParams:O,isTypedArray:A,isFileList:E,forEach:N,merge:function e(){const{caseless:t}=C(this)&&this||{},r={},n=(n,s)=>{const i=t&&R(r,s)||s;w(r[i])&&w(n)?r[i]=e(r[i],n):w(n)?r[i]=e({},n):f(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(N(t,((t,n)=>{r&&g(t)?e[n]=o(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let s,i,o;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],n&&!n(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==r&&c(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:l,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!b(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:q,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:U,freezeMethods:e=>{U(e,((t,r)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];g(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return f(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:I,isContextDefined:C,isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const s=f(e)?[]:{};return N(e,((e,t)=>{const i=r(e,n+1);!m(i)&&(s[t]=i)})),t[n]=void 0,s}}return e};return r(e,0)},isAsyncFn:z,isThenable:e=>e&&(v(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:M,asap:K};function H(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}G.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const W=H.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{X[e]={value:e}})),Object.defineProperties(H,X),Object.defineProperty(W,"isAxiosError",{value:!0}),H.from=(e,t,r,n,s,i)=>{const o=Object.create(W);return G.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(o,e.message,t,r,n,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Y=H;function Z(e){return G.isPlainObject(e)||G.isArray(e)}function Q(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,r){return e?e.concat(t).map((function(e,t){return e=Q(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const te=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)})),re=function(e,t,r){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,s=r.visitor||d,i=r.dots,o=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,r,s){let a=e;if(e&&!s&&"object"==typeof e)if(G.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(r,"[]"))&&(a=G.toArray(e)))return r=Q(r),a.forEach((function(e,n){!G.isUndefined(e)&&null!==e&&t.append(!0===o?ee([r],n,i):null===o?r:r+"[]",c(e))})),!1;return!!Z(e)||(t.append(ee(s,r,i),c(e)),!1)}const p=[],l=Object.assign(te,{defaultVisitor:d,convertValue:c,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!G.isUndefined(r)){if(-1!==p.indexOf(r))throw Error("Circular reference detected in "+n.join("."));p.push(r),G.forEach(r,(function(r,i){!0===(!(G.isUndefined(r)||null===r)&&s.call(t,r,G.isString(i)?i.trim():i,n,l))&&e(r,n?n.concat(i):[i])})),p.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function se(e,t){this._pairs=[],e&&re(e,this,t)}const ie=se.prototype;ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const oe=se;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ce(e,t,r){if(!t)return e;const n=r&&r.encode||ae;G.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(i=s?s(t,r):G.isURLSearchParams(t)?t.toString():new oe(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const de=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},pe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ue="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,me=ue&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ye=ue&&window.location.href||"http://localhost",ge={...e,...le},be=function(e){function t(e,r,n,s){let i=e[s++];if("__proto__"===i)return!0;const o=Number.isFinite(+i),a=s>=e.length;return i=!i&&G.isArray(n)?n.length:i,a?(G.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!o):(n[i]&&G.isObject(n[i])||(n[i]=[]),t(e,r,n[i],s)&&G.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],t[i]=e[i];return t}(n[i])),!o)}if(G.isFormData(e)&&G.isFunction(e.entries)){const r={};return G.forEachEntry(e,((e,n)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},ve={transitional:pe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,s=G.isObject(e);if(s&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return n?JSON.stringify(be(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return re(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ge.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return re(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||n?(t.setContentType("application/json",!1),function(e){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ve.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{ve.headers[e]={}}));const we=ve,$e=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_e=Symbol("internals");function je(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return!1===e||null==e?e:G.isArray(e)?e.map(Ee):String(e)}function Oe(e,t,r,n,s){return G.isFunction(n)?n.call(this,t,r):(s&&(t=r),G.isString(t)?G.isString(n)?-1!==t.indexOf(n):G.isRegExp(n)?n.test(t):void 0:void 0)}class Pe{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(e,t,r){const s=je(t);if(!s)throw new Error("header name must be a non-empty string");const i=G.findKey(n,s);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Ee(e))}const i=(e,t)=>G.forEach(e,((e,r)=>s(e,r,t)));if(G.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),r=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!r||t[r]&&$e[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(G.isHeaders(e))for(const[t,n]of e.entries())s(n,t,r);else null!=e&&s(t,e,r);return this}get(e,t){if(e=je(e)){const r=G.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(G.isFunction(t))return t.call(this,e,r);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=je(e)){const r=G.findKey(this,e);return!(!r||void 0===this[r]||t&&!Oe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function s(e){if(e=je(e)){const s=G.findKey(r,e);!s||t&&!Oe(0,r[s],s,t)||(delete r[s],n=!0)}}return G.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const s=t[r];e&&!Oe(0,this[s],s,e,!0)||(delete this[s],n=!0)}return n}normalize(e){const t=this,r={};return G.forEach(this,((n,s)=>{const i=G.findKey(r,s);if(i)return t[i]=Ee(n),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(s):String(s).trim();o!==s&&delete t[s],t[o]=Ee(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&G.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[_e]=this[_e]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=je(e);t[n]||(function(e,t){const r=G.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,s){return this[n].call(this,t,e,r,s)},configurable:!0})}))}(r,e),t[n]=!0)}return G.isArray(e)?e.forEach(n):n(e),this}}Pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Pe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),G.freezeMethods(Pe);const Se=Pe;function Te(e,t){const r=this||we,n=t||r,s=Se.from(n.headers);let i=n.data;return G.forEach(e,(function(e){i=e.call(r,i,s.normalize(),t?t.status:void 0)})),s.normalize(),i}function ke(e){return!(!e||!e.__CANCEL__)}function Ne(e,t,r){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,r),this.name="CanceledError"}G.inherits(Ne,Y,{__CANCEL__:!0});const Re=Ne;function Ie(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Y("Request failed with status code "+r.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Ce=(e,t,r=3)=>{let n=0;const s=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s,i=0,o=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),d=n[o];s||(s=c),r[i]=a,n[i]=c;let p=o,l=0;for(;p!==i;)l+=r[p++],p%=e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const u=d&&c-d;return u?Math.round(1e3*l/u):void 0}}(50,250);return function(e,t){let r,n,s=0,i=1e3/t;const o=(t,i=Date.now())=>{s=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=i?o(e,t):(r=e,n||(n=setTimeout((()=>{n=null,o(r)}),i-a)))},()=>r&&o(r)]}((r=>{const i=r.loaded,o=r.lengthComputable?r.total:void 0,a=i-n,c=s(a);n=i,e({loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&i<=o?(o-i)/c:void 0,event:r,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),r)},Ae=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},xe=e=>(...t)=>G.asap((()=>e(...t))),qe=ge.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ge.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,De=ge.hasStandardBrowserEnv?{write(e,t,r,n,s,i){const o=[e+"="+encodeURIComponent(t)];G.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),G.isString(n)&&o.push("path="+n),G.isString(s)&&o.push("domain="+s),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Le(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof Se?{...e}:e;function ze(e,t){t=t||{};const r={};function n(e,t,r,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function s(e,t,r,s){return G.isUndefined(t)?G.isUndefined(e)?void 0:n(void 0,e,0,s):n(e,t,0,s)}function i(e,t){if(!G.isUndefined(t))return n(void 0,t)}function o(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,s,i){return i in t?n(r,s):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,r)=>s(Ue(e),Ue(t),0,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||s,o=i(e[n],t[n],n);G.isUndefined(o)&&i!==a||(r[n]=o)})),r}const Me=e=>{const t=ze({},e);let r,{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:c}=t;if(t.headers=a=Se.from(a),t.url=ce(Le(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),G.isFormData(n))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(ge.hasStandardBrowserEnv&&(s&&G.isFunction(s)&&(s=s(t)),s||!1!==s&&qe(t.url))){const e=i&&o&&De.read(o);e&&a.set(i,e)}return t},Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Me(e);let s=n.data;const i=Se.from(n.headers).normalize();let o,a,c,d,p,{responseType:l,onUploadProgress:u,onDownloadProgress:f}=n;function m(){d&&d(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(o),n.signal&&n.signal.removeEventListener("abort",o)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=Se.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Ie((function(e){t(e),m()}),(function(e){r(e),m()}),{data:l&&"text"!==l&&"json"!==l?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h}),h=null}h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(new Y("Request aborted",Y.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Y("Network Error",Y.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const s=n.transitional||pe;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Y(t,s.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,h)),h=null},void 0===s&&i.setContentType(null),"setRequestHeader"in h&&G.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),G.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),l&&"json"!==l&&(h.responseType=n.responseType),f&&([c,p]=Ce(f,!0),h.addEventListener("progress",c)),u&&h.upload&&([a,d]=Ce(u),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",d)),(n.cancelToken||n.signal)&&(o=t=>{h&&(r(!t||t.type?new Re(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(o),n.signal&&(n.signal.aborted?o():n.signal.addEventListener("abort",o)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===ge.protocols.indexOf(g)?r(new Y("Unsupported protocol "+g+":",Y.ERR_BAD_REQUEST,e)):h.send(s||null)}))},Ve=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const s=function(e){if(!r){r=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new Re(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,s(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))}),t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)})),e=null)};e.forEach((e=>e.addEventListener("abort",s)));const{signal:a}=n;return a.unsubscribe=()=>G.asap(o),a}},Be=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,s=0;for(;s<r;)n=s+t,yield e.slice(s,n),s=n},Je=(e,t,r,n)=>{const s=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*Be(r,t)}(e,t);let i,o=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await s.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=o+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},Ke="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ge=Ke&&"function"==typeof ReadableStream,He=Ke&&("function"==typeof TextEncoder?(We=new TextEncoder,e=>We.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var We;const Xe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ye=Ge&&Xe((()=>{let e=!1;const t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ze=Ge&&Xe((()=>G.isReadableStream(new Response("").body))),Qe={stream:Ze&&(e=>e.body)};var et;Ke&&(et=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=G.isFunction(et[e])?t=>t[e]():(t,r)=>{throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,r)})})));const tt={http:null,xhr:Fe,fetch:Ke&&(async e=>{let{url:t,method:r,data:n,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:d,headers:p,withCredentials:l="same-origin",fetchOptions:u}=Me(e);d=d?(d+"").toLowerCase():"text";let f,m=Ve([s,i&&i.toAbortSignal()],o);const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(c&&Ye&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=G.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new Request(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await He(e)).byteLength:void 0)})(t):r})(p,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(G.isFormData(n)&&(e=r.headers.get("content-type"))&&p.setContentType(e),r.body){const[e,t]=Ae(y,Ce(xe(c)));n=Je(r.body,65536,e,t)}}G.isString(l)||(l=l?"include":"omit");const s="credentials"in Request.prototype;f=new Request(t,{...u,signal:m,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:n,duplex:"half",credentials:s?l:void 0});let i=await fetch(f);const o=Ze&&("stream"===d||"response"===d);if(Ze&&(a||o&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=G.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&Ae(t,Ce(xe(a),!0))||[];i=new Response(Je(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}d=d||"text";let g=await Qe[G.findKey(Qe,d)||"text"](i,e);return!o&&h&&h(),await new Promise(((t,r)=>{Ie(t,r,{data:g,headers:Se.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,f),{cause:t.cause||t});throw Y.from(t,t&&t.code,e,f)}})};G.forEach(tt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const rt=e=>`- ${e}`,nt=e=>G.isFunction(e)||null===e||!1===e,st=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!nt(r)&&(n=tt[(t=String(r)).toLowerCase()],void 0===n))throw new Y(`Unknown adapter '${t}'`);if(n)break;s[t||"#"+i]=n}if(!n){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(rt).join("\n"):" "+rt(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function ot(e){return it(e),e.headers=Se.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),st(e.adapter||we.adapter)(e).then((function(t){return it(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t}),(function(t){return ke(t)||(it(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)}))}const at={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{at[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const ct={};at.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,s,i)=>{if(!1===e)throw new Y(n(s," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!ct[s]&&(ct[s]=!0,console.warn(n(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,s,i)}},at.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const dt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const i=n[s],o=t[i];if(o){const t=e[i],r=void 0===t||o(t,i,e);if(!0!==r)throw new Y("option "+i+" must be "+r,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:at},pt=dt.validators;class lt{constructor(e){this.defaults=e,this.interceptors={request:new de,response:new de}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ze(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;void 0!==r&&dt.assertOptions(r,{silentJSONParsing:pt.transitional(pt.boolean),forcedJSONParsing:pt.transitional(pt.boolean),clarifyTimeoutError:pt.transitional(pt.boolean)},!1),null!=n&&(G.isFunction(n)?t.paramsSerializer={serialize:n}:dt.assertOptions(n,{encode:pt.function,serialize:pt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),dt.assertOptions(t,{baseUrl:pt.spelling("baseURL"),withXsrfToken:pt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=s&&G.merge(s.common,s[t.method]);s&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=Se.concat(i,s);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let d;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let p,l=0;if(!a){const e=[ot.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),p=e.length,d=Promise.resolve(t);l<p;)d=d.then(e[l++],e[l++]);return d}p=o.length;let u=t;for(l=0;l<p;){const e=o[l++],t=o[l++];try{u=e(u)}catch(e){t.call(this,e);break}}try{d=ot.call(this,u)}catch(e){return Promise.reject(e)}for(l=0,p=c.length;l<p;)d=d.then(c[l++],c[l++]);return d}getUri(e){return ce(Le((e=ze(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(e){lt.prototype[e]=function(t,r){return this.request(ze(r||{},{method:e,url:t,data:(r||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,s){return this.request(ze(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}lt.prototype[e]=t(),lt.prototype[e+"Form"]=t(!0)}));const ut=lt;class ft{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,s){r.reason||(r.reason=new Re(e,n,s),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ft((function(t){e=t})),cancel:e}}}const mt=ft,ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ht).forEach((([e,t])=>{ht[t]=e}));const yt=ht,gt=function e(t){const r=new ut(t),n=o(ut.prototype.request,r);return G.extend(n,ut.prototype,r,{allOwnKeys:!0}),G.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ze(t,r))},n}(we);gt.Axios=ut,gt.CanceledError=Re,gt.CancelToken=mt,gt.isCancel=ke,gt.VERSION="1.8.4",gt.toFormData=re,gt.AxiosError=Y,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=ze,gt.AxiosHeaders=Se,gt.formToJSON=e=>be(G.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=st,gt.HttpStatusCode=yt,gt.default=gt;const bt=gt;var vt=r(1111);const wt="axios-retry";function $t(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&vt(e)}const _t=["get","head","options"],jt=_t.concat(["put","delete"]);function Et(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Ot(e){return!!e.config?.method&&Et(e)&&-1!==jt.indexOf(e.config.method)}function Pt(e){return $t(e)||Ot(e)}function St(e=void 0){const t=e?.response?.headers["retry-after"];if(!t)return 0;let r=1e3*(Number(t)||0);return 0===r&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}const Tt={retries:3,retryCondition:Pt,retryDelay:function(e=0,t=void 0){return Math.max(0,St(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function kt(e,t,r=!1){const n=function(e,t){return{...Tt,...t,...e[wt]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[wt]=n,n}const Nt=(e,t)=>{const r=e.interceptors.request.use((e=>(kt(e,t,!0),e[wt]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const s=kt(n,t);return r.response&&s.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,s=(e.retryCount||0)<r&&n(t);if("object"==typeof s)try{return!1!==await s}catch(e){return!1}return s}(s,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:s,shouldResetTimeout:i,onRetry:o}=t,a=s(t.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!i&&n.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,s=n.timeout-e-a;if(s<=0)return Promise.reject(r);n.timeout=s}return n.transformRequest=[e=>e],await o(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(s),t(e(n))},s=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,s,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(s,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};Nt.isNetworkError=$t,Nt.isSafeRequestError=function(e){return!!e.config?.method&&Et(e)&&-1!==_t.indexOf(e.config.method)},Nt.isIdempotentRequestError=Ot,Nt.isNetworkOrIdempotentRequestError=Pt,Nt.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,s=Math.max(n,St(t));return s+.2*s*Math.random()},Nt.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,St(r))}},Nt.isRetryableError=Et;const Rt=Nt;var It=r(6022),Ct=r(4874);const At={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!At._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof At.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new At.ObjectID(this._str)}typeName(){return"oid"}getTimestamp(){return Number.parseInt(this._str.substr(0,8),16)}valueOf(){return this._str}toJSONValue(){return this.valueOf()}toHexString(){return this.valueOf()}}},xt=At,qt=[{name:"Enregistrement d'un utilisateur",path:"/co2/person/register",constant:"PERSON_REGISTER",method:"POST",auth:"none",description:"Permet d’enregistrer un nouvel utilisateur avec ses informations personnelles.",contentType:"application/x-www-form-urlencoded",request:{type:"object",description:"Permet d’enregistrer un nouvel utilisateur avec ses informations personnelles.",properties:{name:{type:"string",description:"Nom complet de l'utilisateur"},username:{type:"string",description:"Pseudo ou identifiant unique"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},pwd:{type:"string",description:"Mot de passe"},app:{type:"string",description:"Nom de l'application"},pendingUserId:{type:"string",description:"ID d’un utilisateur en attente (facultatif)"},mode:{type:"string",description:"Mode d’enregistrement"},isInvitation:{type:"boolean",description:"Indique s’il s’agit d’une invitation (facultatif)"}},required:["name","username","email","pwd"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Réponse en cas de succès lors de la création d'un utilisateur",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{type:"string"},person:{type:"object",properties:{name:{type:"string"},username:{type:"string"},pwd:{type:"string"},email:{type:"string",format:"email"},_id:{type:"string"}},required:["name","username","pwd","email","_id"]}},required:["result","msg","id","person"],additionalProperties:!1},{description:"Réponse en cas d'erreur lors de la création d'un utilisateur",type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},{name:"Authentification",path:"/api/cocolight/authenticate",constant:"AUTHENTICATE_URL",method:"POST",auth:"none",description:"Permet de se connecter en utilisant une adresse email et un mot de passe.",contentType:"application/json",postActions:[{type:"setToken",path:"accessToken"},{type:"setRefreshToken",path:"refreshToken"},{type:"setUserId",path:"user.id"},{type:"emitEvent",event:"userLoggedIn",payloadPath:"user"}],request:{type:"object",description:"Permet de se connecter en utilisant une adresse email et un mot de passe.",properties:{email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},password:{type:"string",description:"Mot de passe de l'utilisateur"}},required:["email","password"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après une authentification réussie.",properties:{user:{type:"object",properties:{id:{type:"string",description:"Identifiant unique de l'utilisateur"},username:{type:"string",description:"Pseudo ou nom d'utilisateur"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},timezone:{type:"string",description:"Fuseau horaire de l'utilisateur"},lastLoginDate:{type:"integer",description:"Timestamp Unix du dernier login"},profilImageUrl:{anyOf:[{type:"string",format:"uri"},{type:"string",enum:[""]}],description:"URL de l'image de profil utilisateur, ou chaîne vide"}},required:["id","username","email","roles"],additionalProperties:!1},accessToken:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"},status:{type:"integer",description:"Code de statut personnalisé renvoyé par l'API"}},required:["user","accessToken","refreshToken","status"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (identifiants incorrects)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Rafraîchir un token",path:"/api/cocolight/refreshtoken",constant:"REFRESH_TOKEN_URL",method:"POST",auth:"none",description:"Permet de rafraîchir un token d'accès expiré en utilisant un token de rafraîchissement.",contentType:"application/json",request:{type:"object",description:"Permet de rafraîchir un token d'accès expiré en utilisant un token de rafraîchissement.",properties:{refreshToken:{type:"string",description:"Token de rafraîchissement"}},required:["refreshToken"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après un rafraîchissement réussi.",properties:{token:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"}},required:["token","refreshToken"],additionalProperties:!1},401:{type:"object",description:"Erreur de rafraîchissement (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les informations utilisateur",path:"/api/cocolight/me",constant:"ME_INFO_URL",method:"POST",auth:"bearer",description:"Récupère les informations du profil utilisateur pour un token donné.",contentType:"application/json",responses:{200:{type:"object",description:"Schéma JSON pour les informations détaillées d'un utilisateur.",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},username:{type:"string"},email:{type:"string",format:"email"},name:{type:"string"},slug:{type:"string"},collection:{type:"string"},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},preferences:{type:"object",properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{oneOf:[{type:"object",properties:{source:{type:"array",items:{}}},required:["source"],additionalProperties:!1},{type:"boolean",const:!1}]},activitypub:{type:"boolean"},activitypubStarterClosed:{type:"boolean"},notifications:{type:"array",items:{}}},required:["isOpenData","sendMail"]},language:{type:"string"},profilImageUrl:{type:"string"},profilMarkerImageUrl:{type:"string",format:"uri-reference"},profilMediumImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilBannerUrl:{type:"string",format:"uri-reference"},profilRealBannerUrl:{type:"string",format:"uri-reference"},shortDescription:{type:"string"},description:{type:"string"},tags:{type:"array",items:{type:"string"}},birthDate:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1}},required:["_id","name","email","username","roles","collection","preferences","slug"]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupération de mot de passe",path:"/co2/person/sendemail",constant:"PASSWORD_RECOVERY",method:"POST",auth:"none",description:"Envoie un email pour récupérer le mot de passe.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},type:{type:"string",description:"Type d'email envoyé",const:"password",default:"password"}},required:["email","type"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Erreur: email non trouvé dans la base",type:"object",properties:{result:{type:"boolean",const:!1},errId:{type:"string",const:"UNKNOWN_ACCOUNT_ID"},msg:{type:"string"}},required:["result","errId","msg"],additionalProperties:!1},{description:"Succès: email de récupération envoyé",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},{name:"Échange de token avec un autre serveur",path:"/api/cocolight/exchangetoken",constant:"SERVER_EXCHANGE_TOKEN",method:"POST",auth:"bearer",description:"Permet de se connecter à un autre serveur Communecter en échangeant un token.",contentType:"application/json",request:{type:"object",properties:{serverUrl:{type:"string",description:"URL du serveur distant"}},required:["serverUrl"],additionalProperties:!1},responses:{200:{type:"object",description:"Objet data renvoyé après une authentification réussie.",properties:{user:{type:"object",properties:{id:{type:"string",description:"Identifiant unique de l'utilisateur"},username:{type:"string",description:"Pseudo ou nom d'utilisateur"},email:{type:"string",format:"email",description:"Adresse email de l'utilisateur"},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},timezone:{type:"string",description:"Fuseau horaire de l'utilisateur"},lastLoginDate:{type:"integer",description:"Timestamp Unix du dernier login"},profilImageUrl:{type:"string",format:"uri",description:"URL de l'image de profil utilisateur"}},required:["id","username","email","roles"],additionalProperties:!1},accessToken:{type:"string",description:"Token JWT d'accès"},refreshToken:{type:"string",description:"Token JWT pour rafraîchir l'access token"},status:{type:"integer",description:"Code de statut personnalisé renvoyé par l'API"}},required:["user","accessToken","refreshToken","status"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Changer le mot de passe",path:"/co2/person/changepassword",constant:"CHANGE_PASSWORD",method:"POST",auth:"bearer",description:"Permet de changer le mot de passe d'un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{mode:{type:"string",description:"Mode ou contexte du changement",const:"changePassword",default:"changePassword"},userId:{type:"string",description:"Identifiant de l'utilisateur",default:"@userId"},oldPassword:{type:"string",description:"Ancien mot de passe"},newPassword:{type:"string",description:"Nouveau mot de passe"},newPassword2:{type:"string",description:"Confirmation du nouveau mot de passe"},scope:{type:["string"],description:"Périmètre concerné",default:""}},required:["mode","userId","oldPassword","newPassword","newPassword2"],additionalProperties:!1},responses:{200:{oneOf:[{description:"Réponse en cas de succès lors du changement de mot de passe",type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},{description:"Réponse en cas d'erreur lors du changement de mot de passe",type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer un compte",path:"/co2/element/delete/id/{id}/type/citoyens",constant:"DELETE_ACCOUNT",method:"POST",auth:"bearer",description:"Permet de supprimer un compte utilisateur.",contentType:"application/x-www-form-urlencoded",postActions:[{type:"resetSession"},{type:"emitEvent",event:"accountDeleted",path:null}],pathParams:{type:"object",properties:{id:{type:"string",description:"Identifiant de l'utilisateur à supprimer",default:"@userId"}},required:["id"],additionalProperties:!1},request:{type:"object",properties:{reason:{type:"string",description:"Raison de la suppression",default:""}},required:["reason"],additionalProperties:!1},responses:{200:{type:"object",description:"Réponse après la suppression du compte",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les paramètres utilisateur",path:"/co2/element/updatesettings",constant:"UPDATE_SETTINGS",method:"POST",auth:"bearer",description:"Mise à jour des paramètres spécifiques d'un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{type:{type:"string"},value:{},typeEntity:{type:"string",default:"citoyens"},idEntity:{type:"string"}},required:["type","value","typeEntity","idEntity"],additionalProperties:!1,allOf:[{if:{properties:{typeEntity:{const:"citoyens"}}},then:{properties:{idEntity:{type:"string",default:"@userId"}}}},{if:{properties:{typeEntity:{const:"citoyens"},type:{enum:["birthDate","email","locality","phone","directory"]}}},then:{properties:{value:{type:"string",enum:["private","public","mask"]}}}},{if:{properties:{typeEntity:{const:"citoyens"},type:{enum:["activitypub","isOpenData"]}}},then:{properties:{value:{type:"boolean"}}}},{if:{properties:{typeEntity:{not:{const:"citoyens"}},type:{enum:["isOpenData","isOpenEdition","private","feedback"]}}},then:{properties:{value:{type:"boolean"}}}}]},responses:{200:{type:"object",description:"Réponse après la mise à jour des paramètres",properties:{result:{type:"boolean",const:!0},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour la description d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_DESCRIPTION",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour la description courte et complète d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"descriptions",default:"descriptions",description:"Nom du bloc à mettre à jour (doit être 'descriptions')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:["string","null"],default:"",description:"Périmètre de mise à jour",$comment:"Non utilisé dans l'application Cocolight"},descMentions:{type:"string",description:"Mentions dans la description",default:"",$comment:"Non utilisé dans l'application Cocolight"},shortDescription:{type:"string",description:"Courte description"},description:{type:"string",description:"Description complète"}},required:["block","typeElement","id"],additionalProperties:!1,allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}},{anyOf:[{required:["description"],properties:{description:{not:{type:"null"}}}},{required:["shortDescription"],properties:{shortDescription:{not:{type:"null"}}}}]}]},responses:{200:{type:"object",description:"Réponse après la mise à jour de la description",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",properties:{shortDescription:{type:["string","null"]},description:{type:["string","null"]}},additionalProperties:!0}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les informations d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_INFO",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour les informations générales d'un élément (nom, contacts, etc.).",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"}},required:["block","typeElement","id"],$defs:{sharedFields:{name:{type:"string",description:"Nom de l'entité"},url:{type:"string",format:"uri",description:"Lien vers le site ou la page publique"},email:{type:"string",format:"email",description:"Adresse email"},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'}}},allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},id:{type:"string",description:"ID de l'élément concerné",default:"@userId"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},birthDate:{type:"string",format:"date",description:"Date de naissance"},fixe:{type:"string",description:"Téléphone fixe"},mobile:{type:"string",description:"Téléphone mobile"}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["birthDate"],properties:{birthDate:{not:{type:"null"}}}},{required:["fixe"],properties:{fixe:{not:{type:"null"}}}},{required:["mobile"],properties:{mobile:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}}],additionalProperties:!1}},{if:{properties:{typeElement:{const:"projects"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},avancement:{type:"string",enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],description:"État d'avancement du projet"},parent:{type:"object",patternProperties:{"^[a-fA-F0-9]{24}$":{type:"object",properties:{type:{type:"string",description:"Type d'entité parent"},name:{type:"string",description:"Nom de l'entité parent"}},required:["type","name"],additionalProperties:!1}},additionalProperties:!1,description:"Objet contenant les entités parentes (clé = ID). null signifie que les parents ne sont pas modifiés."}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}},{required:["avancement"],properties:{avancement:{not:{type:"null"}}}},{required:["parent"],properties:{parent:{not:{type:"null"}}}}],additionalProperties:!1}},{if:{properties:{typeElement:{const:"organizations"}}},then:{properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},name:{$ref:"#/$defs/sharedFields/name"},email:{$ref:"#/$defs/sharedFields/email"},url:{$ref:"#/$defs/sharedFields/url"},tags:{$ref:"#/$defs/sharedFields/tags"},type:{type:"string",enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],description:"Type d'organisation (ex. association, entreprise)"}},anyOf:[{required:["name"],properties:{name:{not:{type:"null"}}}},{required:["url"],properties:{url:{not:{type:"null"}}}},{required:["tags"],properties:{tags:{not:{type:"null"}}}},{required:["email"],properties:{email:{not:{type:"null"}}}},{required:["type"],properties:{type:{not:{type:"null"}}}}],additionalProperties:!1}}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les réseaux sociaux d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_SOCIAL",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour les liens vers les réseaux sociaux d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"network",default:"network",description:"Nom du bloc à mettre à jour (doit être 'network')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},gitlab:{$ref:"#/$defs/socialField",description:"Compte Gitlab"},github:{$ref:"#/$defs/socialField",description:"Compte Github"},twitter:{$ref:"#/$defs/socialField",description:"Compte Twitter"},facebook:{$ref:"#/$defs/socialField",description:"Compte Facebook"},instagram:{$ref:"#/$defs/socialField",description:"Compte Instagram"},diaspora:{$ref:"#/$defs/socialField",description:"Compte Diaspora"},mastodon:{$ref:"#/$defs/socialField",description:"Compte Mastodon"},telegram:{$ref:"#/$defs/socialField",description:"Compte Telegram"},signal:{$ref:"#/$defs/socialField",description:"Compte Signal"}},required:["block","typeElement","id"],$defs:{socialField:{anyOf:[{type:"string",enum:[""],description:"Vide pour effacer le champ"},{type:"string",format:"uri",description:"URL du profil sur le réseau social"}]}},allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}},{anyOf:[{required:["gitlab"],properties:{gitlab:{not:{type:"null"}}}},{required:["github"],properties:{github:{not:{type:"null"}}}},{required:["twitter"],properties:{twitter:{not:{type:"null"}}}},{required:["facebook"],properties:{facebook:{not:{type:"null"}}}},{required:["instagram"],properties:{instagram:{not:{type:"null"}}}},{required:["diaspora"],properties:{diaspora:{not:{type:"null"}}}},{required:["mastodon"],properties:{mastodon:{not:{type:"null"}}}},{required:["telegram"],properties:{telegram:{not:{type:"null"}}}},{required:["signal"],properties:{signal:{not:{type:"null"}}}}]}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour les localités d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_LOCALITY",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour l'adresse et les informations géographiques d'un élément.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"localities",default:"localities",description:"Nom du bloc à mettre à jour (doit être 'localities')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",description:"Périmètre de mise à jour"},geo:{type:"object",description:"Coordonnées géographiques",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},required:["latitude","longitude"],additionalProperties:!1},geoPosition:{type:"object",description:"Position géographique GeoJSON",properties:{type:{type:"string",const:"Point",description:"Type GeoJSON (doit être 'Point')"},coordinates:{type:"array",items:{type:"number"},minItems:2,maxItems:2,description:"Tableau contenant [longitude, latitude]"},float:{type:"boolean",const:!0,default:!0,description:"Indicateur pour forcer la conversion en float côté serveur"}},required:["type","coordinates","float"],additionalProperties:!0},address:{type:"object",properties:{"@type":{type:"string",const:"PostalAddress"},addressCountry:{type:"string"},codeInsee:{type:"string"},addressLocality:{type:"string"},localityId:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{type:"string",description:"ID du département. Peut être vide pour les pays étrangers.",minLength:0},level3Name:{type:"string",description:"Nom du département. Peut être vide pour les pays étrangers.",minLength:0},level4:{type:"string",description:"ID de la commune. Peut être vide pour les pays étrangers.",minLength:0},level4Name:{type:"string",description:"Nom de la commune. Peut être vide pour les pays étrangers.",minLength:0},postalCode:{type:"string"},streetAddress:{type:"string"}},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],additionalProperties:!1,$comment:"Certains champs comme level3/level4 peuvent être vides selon le pays (ex : Maurice)"}},required:["block","typeElement","id","address"],allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}]},responses:{200:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,$comment:"Ce schéma n'est pas encore complet"}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour le slug d'un élément",path:"/co2/element/updateblock/",constant:"UPDATE_BLOCK_SLUG",constantCocolight:"UPDATE_BLOCK",method:"POST",auth:"bearer",description:"Permet de mettre à jour le slug pour une URL simplifiée.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc à mettre à jour (doit être 'info')"},typeElement:{type:"string",default:"citoyens",enum:["citoyens","projects","organizations"],description:"Type d'élément (citoyens, projects, organizations)"},id:{type:"string",description:"ID de l'élément concerné"},scope:{type:"string",default:"",$comment:"Non utilisé dans l'application Cocolight"},slug:{type:"string",description:"Slug simplifié pour URL",pattern:"^[a-zA-Z0-9]+$",minLength:3,maxLength:100}},required:["block","typeElement","id","slug"],allOf:[{if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}]},responses:{200:{description:"Réponse après la mise à jour de l'élément",oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},resultGoods:{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},values:{type:"object",description:"Contient les champs mis à jour",additionalProperties:!0,properties:{slug:{type:"string"}}}},required:["result","msg"],additionalProperties:!0}},required:["result","resultGoods"],additionalProperties:!1},{type:"object",properties:{resultErrors:{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string",description:"Message d'erreur"}},required:["result","msg"],additionalProperties:!0}},required:["resultErrors"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Vérifier l'état d'une URL",path:"/co2/slug/check",constant:"CHECK",method:"POST",auth:"bearer",description:"Vérifie si une URL (slug) est valide ou disponible.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{block:{type:"string",const:"info",default:"info",description:"Nom du bloc"},id:{type:"string",description:"ID de l'élément"},type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'élément"},slug:{type:"string",description:"Slug à vérifier",pattern:"^[a-zA-Z0-9]+$",minLength:3,maxLength:100}},required:["block","type","id","slug"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{oneOf:[{description:"Slug valide ou disponible",type:"object",properties:{result:{type:"boolean",const:!0},domaineName:{type:"string"}},required:["result","domaineName"],additionalProperties:!1},{description:"Slug non valide ou non disponible",type:"object",properties:{result:{type:"boolean",const:!1},domaineName:{type:"string"}},required:["result","domaineName"],additionalProperties:!1}]},401:{type:"object",description:"Erreur d'authentification (token invalide ou expiré)",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour l'image de profil",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/profil_avatar/contentKey/profil/docType/image",method:"POST",constant:"PROFIL_IMAGE",constantCocolight:["PROFIL_IMAGE","UPDATE_PDP"],auth:"bearer",description:"Permet de mettre à jour l'image de profil d'un utilisateur ou d'une entité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'entité"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{profil_avatar:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image de profil au format binaire"}},required:["profil_avatar"],additionalProperties:!1},responses:{200:{description:"Réponse après l'enregistrement de l'image de profil",oneOf:[{type:"object",properties:{resultUpload:{type:"boolean",const:!0},success:{type:"boolean",const:!0},name:{type:"string",description:"Nom du fichier enregistré"},docPath:{type:"string",description:"Chemin du fichier sur le serveur"},size:{type:"integer",description:"Taille du fichier en octets"},result:{type:"boolean",const:!0},msg:{type:"string",description:"Message de confirmation"},id:{type:"object",properties:{$id:{type:"string",description:"ID du document enregistré"}},required:["$id"],additionalProperties:!1},src:{type:"object",description:"Informations sur les images générées",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},changes:{type:"object",properties:{profilImageUrl:{type:"string",format:"uri-reference"},profilMediumImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilMarkerImageUrl:{type:"string",format:"uri-reference"}},required:["profilImageUrl","profilMediumImageUrl","profilThumbImageUrl","profilMarkerImageUrl"],additionalProperties:!1}},required:["result","msg","changes"],additionalProperties:!1},survey:{type:["boolean","null"],description:"Peut être à false ou null selon les cas"}},required:["resultUpload","success","name","docPath","size","result","msg","id","src"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Obtenir les éléments liés",path:"/co2/element/about/type/{type}/id/{id}/json/true",constant:"GET_ELEMENTS_ABOUT",method:"POST",auth:"none",description:"Récupère les informations détaillées d'un élément et de ses éléments liés.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'entité"},id:{type:"string",description:"ID de l'utilisateur ou de l'entité"}},required:["type","id"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{tpl:{type:"string",default:"ficheInfoElement",const:"ficheInfoElement",description:"Template utilisé (ex: ficheInfoElement)"}},required:["tpl"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Schéma JSON pour les informations détaillées d'un utilisateur.",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},username:{type:"string"},email:{type:"string",format:"email"},name:{type:"string"},slug:{type:"string"},collection:{type:"string",enum:["citoyens"]},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},roles:{type:"object",properties:{betaTester:{type:"boolean"},standalonePageAccess:{type:"boolean"},superAdmin:{type:"boolean"}}},preferences:{type:"object",properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{oneOf:[{type:"object",properties:{source:{type:"array",items:{}}},required:["source"],additionalProperties:!1},{type:"boolean",const:!1}]},activitypub:{type:"boolean"},activitypubStarterClosed:{type:"boolean"},notifications:{type:"array",items:{}}},required:["isOpenData","sendMail"]},language:{type:"string"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilBannerUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilRealBannerUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},shortDescription:{type:"string"},description:{type:"string"},tags:{type:"array",items:{type:"string"}},birthDate:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1}},required:["_id","name","username","roles","collection","preferences","slug"]},{description:"Schéma JSON pour les informations détaillées d'un projet",type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},collection:{type:"string",enum:["projects"]},created:{type:"integer"},creator:{type:"string"},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},name:{type:"string"},parent:{type:"object",patternProperties:{"^[0-9a-fA-F]{24}$":{type:"object",properties:{type:{type:"string"},name:{type:"string"},_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},slug:{type:"string"},profilThumbImageUrl:{type:"string"}},required:["type","name"],additionalProperties:!0}},additionalProperties:!1},preferences:{type:"object",properties:{isOpenData:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},isOpenEdition:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},crowdfunding:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},private:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]}},required:["isOpenData","isOpenEdition"]},slug:{type:"string"},updated:{type:"integer"},links:{type:"object",$comment:"Ce schéma n'est pas encore complet"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}]},typeSig:{type:"string"},type:{type:"string"}},required:["_id","collection","created","creator","modified","name","parent","preferences","slug","typeSig","type","updated"]},{description:"Schéma JSON pour les informations détaillées d'une organisation",type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},collection:{type:"string",enum:["organizations"]},created:{type:"integer"},creator:{type:"string"},modified:{type:"object",properties:{sec:{type:"integer"},usec:{type:"integer"}},required:["sec","usec"],additionalProperties:!1},name:{type:"string"},preferences:{type:"object",properties:{isOpenData:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]},isOpenEdition:{anyOf:[{type:"boolean"},{type:"string",enum:["true","false"]}]}},required:["isOpenData","isOpenEdition"]},slug:{type:"string"},type:{type:"string"},updated:{type:"integer"},links:{type:"object",$comment:"Ce schéma n'est pas encore complet"},profilImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image de profil (vide ou URI)."},profilThumbImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image miniature (vide ou URI)."},profilMarkerImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image pour le marqueur (vide ou URI)."},profilMediumImageUrl:{anyOf:[{type:"string",enum:[""]},{type:"string",format:"uri-reference"}],description:"URL de l'image de taille moyenne (vide ou URI)."}},required:["_id","collection","modified","name","preferences","slug","type","updated"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Gérer des connexions multiples",path:"/co2/link/multiconnect",constant:"MULTICONNECT",method:"POST",auth:"bearer",description:"Permet d’inviter ou de connecter plusieurs utilisateurs en même temps à une entité.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},listInvite:{type:"object",description:"Liste des citoyens invités",patternProperties:{"^(citoyens|projects|organizations)$":{type:"object",patternProperties:{"^[0-9a-fA-F]{24}$":{type:"object",properties:{name:{type:"string",description:"Nom de l'invité"}},required:["name"],additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1}},required:["parentId","parentType","listInvite"],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",properties:{citoyens:{type:"array",items:{oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},newElement:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},name:{type:"string"},profilThumbImageUrl:{type:"string"},id:{type:"string"},isInviting:{type:"boolean"}},required:["_id","name","profilThumbImageUrl","id","isInviting"],additionalProperties:!0},newElementType:{type:"string",const:"citoyens"}},required:["result","msg","newElement","newElementType"]},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]}}},required:["citoyens"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les actualités",path:"/news/co/get/type/{type}/id/{id}/isLive/{isLive}/json/{json}",constant:"GET_NEWS",constantCocolight:"GET_NEWS",method:"POST",auth:"none",description:"Récupère la liste d’actualités selon plusieurs critères.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{isLive:{type:"boolean",default:!0,description:"Indique si l'actualité est en direct"},type:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type d'actualité (ex: 'citoyens', 'projects', 'organizations')"},id:{type:"string",description:"ID de l'élément (ex: ID d'un utilisateur, d'un projet ou d'une organisation)"},json:{type:"boolean",default:!0,description:"Indique si la réponse doit être au format JSON"}},required:["isLive","type","id","json"],allOf:[{if:{properties:{type:{const:"citoyens"}}},then:{properties:{id:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{dateLimit:{type:"integer",default:0,description:"Limite de date timestamp ou 0"},search:{type:"object",properties:{name:{type:"string",default:"",description:"Nom ou terme recherché"}},required:["name"],additionalProperties:!1},indexStep:{type:"integer",default:12,description:"Nombre de résultats par page"}},required:["dateLimit","indexStep"],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name","type"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",description:"Réponse renvoyée lorsqu'aucune actualité n'est disponible",properties:{type:{type:"string",enum:["citoyens","projects","organizations"]},endStream:{type:"boolean",const:!0},news:{type:"array",minItems:0,maxItems:0},limitDate:{type:"boolean",const:!1}},required:["type","endStream","news","limitDate"]},{type:"object",description:"Réponse renvoyée lorsqu'une ou plusieurs actualités sont disponibles",properties:{type:{type:"string",enum:["citoyens","projects","organizations"]},endStream:{type:"boolean"},news:{type:"object",description:"Contient plusieurs objets news. Chaque clé est un identifiant dynamique (par exemple, un ObjectID Mongo) et chaque valeur doit respecter la structure définie par NewsCommonSchema.",patternProperties:{"^[a-f0-9]{24}$":{$ref:"#/$defs/NewsSchema"}},additionalProperties:!1},limitDate:{type:"object"}},required:["type","endStream","news","limitDate"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer des actualités par IDs",path:"/news/co/getbyids",constant:"GET_NEWS_BY_ID",method:"POST",auth:"none",description:"Récupère des actualités à partir d’une liste d’identifiants.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Liste des IDs d’actualités à récupérer"}},required:["ids"],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name","type"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},type:"array",items:{$ref:"#/$defs/NewsSchema"},description:"Liste d'actualités correspondant aux IDs fournis"}}},{name:"Ajouter une actualité",path:"/news/co/save",constant:"ADD_NEWS",method:"POST",auth:"bearer",description:"Ajoute une nouvelle actualité.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{text:{type:"string",description:"Contenu de l’actualité"},scope:{type:"string",description:"Portée de l'actualité (ex: public, privé...)",enum:["public","private","restricted"],default:"public"},markdownActive:{type:"boolean",default:!0,description:"Markdown activé (true/false)"},parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},type:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},json:{type:"boolean",const:!0,default:!0,description:"Indique que la réponse est au format JSON."},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'},mediaImg:{type:"object",description:"Optionnel. Informations sur les images associées à la news.",properties:{countImages:{type:"number",description:"Nombre d'images."},images:{type:"array",description:"Liste des identifiants ou chemins d'images.",items:{type:"string"}}},required:["countImages","images"],additionalProperties:!1},mediaFile:{type:"object",description:"Optionnel. Informations sur les fichiers associés à la news.",properties:{countFiles:{type:"number",description:"Nombre de fichiers."},files:{type:"array",description:"Liste des identifiants ou chemins de fichiers.",items:{type:"string"}}},required:["countFiles","files"],additionalProperties:!1},mentions:{type:"object",description:"Liste des mentions sous forme d'objet avec des clés dynamiques représentant l'indice de la mention.",patternProperties:{"^[0-9]+$":{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"number"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}},additionalProperties:!1}},required:["scope","markdownActive","parentId","parentType","type","json"],anyOf:[{required:["text"]},{required:["mediaImg"]},{required:["mediaFile"]}],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},object:{$comment:"dans object.author il y a pas type il y a que typeSig",$ref:"#/$defs/NewsSchema"}},required:["result","msg","id","object"],additionalProperties:!1},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Ajouter une image à une actualité",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/newsImage/docType/image/contentKey/slider",constant:"ADD_IMAGE_NEWS",constantCocolight:"ADD_IMAGE_NEWS",method:"POST",auth:"bearer",description:"Ajoute une images à une actualité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente (ex: 'citoyens', 'projects', 'organizations')"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité parente"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{newsImage:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image à télécharger"}},required:["newsImage"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de l'upload",properties:{resultUpload:{type:"boolean",const:!0,description:"Indique si le téléchargement a abouti."},success:{type:"boolean",const:!0,description:"Indique le succès de l'opération."},name:{type:"string",description:"Nom du document."},docPath:{type:"string",description:"Chemin d'accès au document."},size:{type:"number",description:"Taille du document en octets."},result:{type:"boolean",const:!0,description:"Résultat de l'opération."},msg:{type:"string",description:"Message de confirmation."},id:{type:"object",description:"Identifiant du document sous forme d'objet.",properties:{$id:{type:"string",description:"ID du document (généralement un ObjectID MongoDB)."}},required:["$id"],additionalProperties:!1}},required:["resultUpload","success","name","docPath","size","result","msg","id"]},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Ajouter un fichier à une actualité",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}}/input/newsFile/docType/file",constant:"ADD_FILE_NEWS",constantCocolight:"ADD_FILE_NEWS",method:"POST",auth:"bearer",description:"Ajoute un fichier à une actualité.",contentType:"multipart/form-data",pathParams:{type:"object",properties:{folder:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente (ex: 'citoyens', 'projects', 'organizations')"},ownerId:{type:"string",description:"ID de l'utilisateur ou de l'entité parente"}},required:["folder","ownerId"],allOf:[{if:{properties:{folder:{const:"citoyens"}}},then:{properties:{ownerId:{default:"@userId"}}}}],additionalProperties:!1},request:{type:"object",properties:{newsFile:{$comment:"Ce champ est un fichier binaire non validé par AJV",description:"Fichier image à télécharger"}},required:["newsFile"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de l'upload",properties:{resultUpload:{type:"boolean",const:!0,description:"Indique si le téléchargement a abouti."},success:{type:"boolean",const:!0,description:"Indique le succès de l'opération."},name:{type:"string",description:"Nom du document."},docPath:{type:"string",description:"Chemin d'accès au document."},size:{type:"number",description:"Taille du document en octets."},result:{type:"boolean",const:!0,description:"Résultat de l'opération."},msg:{type:"string",description:"Message de confirmation"},id:{type:"object",description:"Identifiant du document sous forme d'objet.",properties:{$id:{type:"string",description:"ID du document (généralement un ObjectID MongoDB)."}},required:["$id"],additionalProperties:!1}},required:["resultUpload","success","name","docPath","size","result","msg","id"]},{type:"object",description:"Réponse en cas d'échec de l'upload",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer une actualité",path:"/news/co/delete/id/{id}",constant:"DELETE_NEWS",constantCocolight:"DELETE_NEWS",method:"POST",auth:"bearer",description:"Supprime une actualité existante.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{id:{type:"string",description:"ID de l'actualité à supprimer"}},required:["id"],additionalProperties:!1},request:{type:"object",properties:{isLive:{type:"boolean",default:!1}},required:["isLive"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de la suppression",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},type:{type:"string",const:"news"},commentsDeleted:{type:"number",description:"Nombre de commentaires supprimés",$comment:"bizarre même si il y a des commentaires ce champs reste à 0"}},required:["result","msg","type","commentsDeleted"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de la suppression",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Mettre à jour une actualité",path:"/news/co/update",constant:"UPDATE_NEWS",method:"POST",auth:"bearer",description:"Met à jour le contenu d’une actualité existante.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{idNews:{type:"string",description:"ID de l'actualité à mettre à jour"},text:{type:"string",description:"Contenu de l’actualité"},scope:{type:"string",description:"Portée de l'actualité (ex: public, privé...)",enum:["public","private","restricted"],default:"public"},markdownActive:{type:"boolean",default:!0,description:"Markdown activé (true/false)"},parentId:{type:"string",description:"ID de l'entité parente"},parentType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité parente"},type:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},tags:{anyOf:[{type:"array",items:{type:"string"}},{type:"string",enum:[""]}],description:'Tags : "" pour effacer tous les tags, ou tableau de mots-clés.'},mediaImg:{type:"object",description:"Optionnel. Informations sur les images associées à la news.",properties:{countImages:{type:"number",description:"Nombre d'images."},images:{type:"array",description:"Liste des identifiants ou chemins d'images.",items:{type:"string"}}},required:["countImages","images"],additionalProperties:!1},mediaFile:{type:"object",description:"Optionnel. Informations sur les fichiers associés à la news.",properties:{countFiles:{type:"number",description:"Nombre de fichiers."},files:{type:"array",description:"Liste des identifiants ou chemins de fichiers.",items:{type:"string"}}},required:["countFiles","files"],additionalProperties:!1},mentions:{type:"object",description:"Liste des mentions sous forme d'objet avec des clés dynamiques représentant l'indice de la mention.",patternProperties:{"^[0-9]+$":{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"number"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}},additionalProperties:!1}},required:["idNews","scope","markdownActive","parentId","parentType","type"],anyOf:[{required:["text"]},{required:["mediaImg"]},{required:["mediaFile"]}],allOf:[{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{parentId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{NewsSchema:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},type:{type:"string",const:"news"},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string",const:"news"},lastAuthorShare:{$ref:"#/$defs/sharedUser"},media:{type:"object",description:"Optionnel. Contient les informations de média associées à la news.",additionalProperties:!0},mediaImg:{type:"object",description:"Optionnel. Contient les images associées à la news.",additionalProperties:!0},mentions:{type:"array",description:"Optionnel. Liste des personnes mentionnées.",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},slug:{type:"string"},avatar:{type:"string"},type:{type:"string"},value:{type:"string"},count:{type:"string"}},required:["id","name","slug","avatar","type","value","count"],additionalProperties:!0}},tags:{type:"array",description:"Optionnel. Liste de tags associés à la news.",items:{type:"string"}},vote:{type:"object",description:"Optionnel. Votes associés à la news.",additionalProperties:{type:"object",properties:{status:{type:"string"},date:{$ref:"#/$defs/dateObject"}},required:["status","date"],additionalProperties:!1}},voteCount:{type:"object",description:"Optionnel. Compteurs de votes.",additionalProperties:{type:"number"}}},required:["_id","type","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","comment","typeSig","lastAuthorShare"],additionalProperties:!0},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]}},oneOf:[{type:"object",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},object:{$comment:"dans object.author il y a pas type il y a que typeSig",$ref:"#/$defs/NewsSchema"}},required:["result","msg","object"],additionalProperties:!1},{type:"object",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"],additionalProperties:!1}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Partager une actualité",path:"/news/co/share",constant:"SHARE_NEWS",constantCocolight:"SHARE_NEWS",method:"POST",auth:"bearer",description:"Partage une actualité avec une entité ou un utilisateur.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentId:{type:"string",description:"ID de l'actualité à partager"},parentType:{type:"string",const:"news",default:"news",description:"Type de l'objet, toujours 'news'."},childId:{type:"string",description:"ID de l'entité partageante"},childType:{type:"string",enum:["citoyens","projects","organizations"],default:"citoyens",description:"Type de l'entité partageante"},connectType:{type:"string",const:"share",default:"share",description:"Type de connexion, toujours 'share'."},comment:{type:"string",description:"Commentaire de partage"}},required:["parentId","parentType","childId","childType","connectType"],allOf:[{if:{properties:{childType:{const:"citoyens"}}},then:{properties:{childId:{type:"string",default:"@userId"}}}}],additionalProperties:!1},responses:{200:{$defs:{user:{type:"object",properties:{id:{type:"string"},name:{type:"string"},type:{type:"string"},profilThumbImageUrl:{type:"string",format:"uri-reference"},geo:{type:"object",properties:{"@type":{type:"string",const:"GeoCoordinates"},latitude:{type:"string"},longitude:{type:"string"}},required:["@type","latitude","longitude"],additionalProperties:!1}},required:["id","name"],additionalProperties:!0},sharedUser:{allOf:[{$ref:"#/$defs/user"},{type:"object",properties:{updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]}},required:["updated","comment"]}]},dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1}},oneOf:[{type:"object",description:"Réponse en cas de succès du partage",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},data:{type:"object",required:["_id","type","verb","target","author","object","scope","created","sharedBy","collection","icon","updated","typeSig","lastAuthorShare"],properties:{_id:{type:"object",required:["$id"],properties:{$id:{type:"string"}}},type:{type:"string",const:"activityStream"},verb:{type:"string",const:"share"},target:{$ref:"#/$defs/user"},author:{$ref:"#/$defs/user"},object:{type:"object",required:["id","type","authorName","authorId","_id","text","author","date","collection","sharedBy","target","created","markdownActive","scope","updated","typeSig","lastAuthorShare"],properties:{id:{type:"string"},type:{type:"string",const:"news"},authorName:{type:"string"},authorId:{type:"string"},_id:{type:"object",required:["$id"],properties:{$id:{type:"string"}}},text:{type:"string"},author:{$ref:"#/$defs/user"},date:{$ref:"#/$defs/dateObject"},collection:{type:"string",const:"news"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},target:{$ref:"#/$defs/user"},created:{$ref:"#/$defs/dateObject"},markdownActive:{type:"boolean"},scope:{type:"object",properties:{type:{type:"string"}}},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string"},lastAuthorShare:{$ref:"#/$defs/sharedUser"}}},scope:{type:"object",properties:{type:{type:"string"}}},created:{$ref:"#/$defs/dateObject"},sharedBy:{type:"array",items:{$ref:"#/$defs/sharedUser"}},collection:{type:"string",const:"news"},icon:{type:"string"},imageBackground:{type:["string","null"]},name:{type:["string","null"]},updated:{$ref:"#/$defs/dateObject"},comment:{type:["string","null"]},typeSig:{type:"string"},lastAuthorShare:{$ref:"#/$defs/sharedUser"}}},idNews:{type:"string"}},required:["result","msg","data","idNews"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec du partage",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Récupérer les commentaires",path:"/co2/comment/index/type/{type}/id/{id}/json/true",constant:"GET_COMMENTS",method:"POST",auth:"none",description:"Récupère les commentaires d’un élément.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{type:{type:"string",enum:["news"],default:"news",description:"Type de l'élément"},id:{type:"string",description:"ID de l'élément dont on veut récupérer les commentaires"}},required:["type","id"],additionalProperties:!1},responses:{200:{$defs:{dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},author:{type:"object",required:["id","name","typeSig"],properties:{id:{type:"string"},name:{type:"string"},username:{type:"string"},email:{type:"string",format:"email"},tags:{type:["array","null"]},profilImageUrl:{type:"string",format:"uri-reference"},profilThumbImageUrl:{type:"string",format:"uri-reference"},profilMarkerImageUrl:{type:"string",format:"uri-reference"},address:{type:"object"},preferences:{type:"object",required:["isOpenData","sendMail"],properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{type:"boolean"},activitypub:{type:"boolean"}}},typeSig:{type:"string"}}},views:{type:"object",patternProperties:{"^[a-f0-9]{24}$":{type:"object",required:["date"],properties:{date:{$ref:"#/$defs/dateObject"}}}},additionalProperties:!1},comment:{type:"object",required:["_id","contextId","contextType","parentId","text","created","author","collection","status","views","postedDate","argval","replies"],properties:{_id:{type:"object",required:["$id"],properties:{$id:{type:"string"}}},contextId:{type:"string"},contextType:{type:"string"},parentId:{type:"string"},text:{type:"string"},created:{type:"integer"},author:{$ref:"#/$defs/author"},collection:{type:"string",enum:["comments"]},tags:{type:["array","null"]},status:{type:"string"},views:{$ref:"#/$defs/views"},postedDate:{type:"integer"},argval:{type:"string"},replies:{anyOf:[{type:"object",patternProperties:{"^[a-f0-9]{24}$":{$ref:"#/$defs/comment"}},additionalProperties:!1},{type:"array",maxItems:0}]}}}},oneOf:[{description:"Réponse sans commentaires",type:"array",minItems:0,maxItems:0},{description:"Réponse avec commentaires",type:"object",patternProperties:{"^[a-f0-9]{24}$":{$ref:"#/$defs/comment"}},additionalProperties:!1}]}}},{name:"Ajouter un commentaire",path:"/co2/comment/save",constant:"ADD_COMMENTS",method:"POST",auth:"bearer",description:"Ajoute un commentaire à une actualité ou autre contexte.",contentType:"application/x-www-form-urlencoded",request:{type:"object",properties:{parentCommentId:{type:"string",description:"ID du commentaire parent (null si pas de parent)",default:""},text:{type:"string",description:"Contenu du commentaire"},contextId:{type:"string",description:"ID de l'élément auquel le commentaire est associé"},contextType:{type:"string",enum:["news"],default:"news",description:"Type de l'élément auquel le commentaire est associé"},argval:{type:"string",description:"Valeur de l'argument (optionnel)",default:""},path:{type:"string",description:"Chemin de l'élément (optionnel)",default:""},mentions:{type:"array",items:{type:"object",properties:{id:{type:"string",description:"ID de l'utilisateur mentionné"},name:{type:"string",description:"Nom de l'utilisateur mentionné"},slug:{type:"string",description:"Slug de l'utilisateur mentionné"},type:{type:"string",description:"Type de l'utilisateur mentionné"},value:{type:"string",description:"Valeur de la mention"},count:{type:"number",description:"Nombre de fois que l'utilisateur est mentionné"}},required:["id","name","slug","type","value","count"],additionalProperties:!1}}},required:["text","contextId","contextType"],additionalProperties:!1},responses:{200:{$defs:{dateObject:{type:"object",properties:{sec:{type:"number"},usec:{type:"number"}},required:["sec","usec"],additionalProperties:!1},author:{type:"object",required:["id","name"],properties:{id:{type:"string"},name:{type:"string"},username:{type:"string"},email:{type:"string",format:"email"},tags:{type:["array","null"]},profilImageUrl:{type:"string"},profilThumbImageUrl:{type:"string"},profilMarkerImageUrl:{type:"string"},address:{type:"object"},preferences:{type:"object",required:["isOpenData","sendMail"],properties:{privateFields:{type:"array",items:{type:"string"}},publicFields:{type:"array",items:{type:"string"}},isOpenData:{type:"boolean"},badge:{type:"boolean"},sendMail:{type:"boolean"},activitypub:{type:"boolean"}}},typeSig:{type:"string"}}},views:{type:"object",patternProperties:{"^[a-f0-9]{24}$":{type:"object",required:["date"],properties:{date:{$ref:"#/$defs/dateObject"}}}},additionalProperties:!1},comment:{type:"object",required:["_id","contextId","contextType","parentId","text","created","author","collection","status","views","postedDate","argval"],properties:{_id:{type:"object",required:["$id"],properties:{$id:{type:"string"}}},contextId:{type:"string"},contextType:{type:"string"},parentId:{type:["string","null"]},text:{type:"string"},created:{type:"integer"},author:{$ref:"#/$defs/author"},collection:{type:"string",enum:["comments"]},tags:{type:["array","null"]},status:{type:"string"},views:{$ref:"#/$defs/views"},postedDate:{type:"integer"},argval:{type:"string"}}}},oneOf:[{type:"object",description:"Réponse en cas de succès de l'ajout du commentaire",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},newComment:{$ref:"#/$defs/comment"},time:{type:"integer"}},required:["result","msg","id","newComment","time"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de l'ajout du commentaire",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}},{name:"Supprimer un commentaire",path:"/co2/comment/delete/id/{id}",constant:"DELETE_COMMENTS",method:"POST",auth:"bearer",description:"Supprime un commentaire existant.",contentType:"application/x-www-form-urlencoded",pathParams:{type:"object",properties:{id:{type:"string",description:"ID du commentaire à supprimer"}},required:["id"],additionalProperties:!1},responses:{200:{oneOf:[{type:"object",description:"Réponse en cas de succès de la suppression du commentaire",properties:{result:{type:"boolean",const:!0},msg:{type:"string"},elt:{type:"object",properties:{_id:{type:"object",properties:{$id:{type:"string"}},required:["$id"],additionalProperties:!1},contextId:{type:"string"},contextType:{type:"string"},parentId:{type:["string","null"]}}}},required:["result","msg","elt"],additionalProperties:!1},{type:"object",description:"Réponse en cas d'échec de la suppression du commentaire",properties:{result:{type:"boolean",const:!1},msg:{type:"string"}},required:["result","msg"]}]},401:{description:"Erreur d'authentification (token invalide ou expiré)",type:"object",properties:{error:{type:"string",description:"Description de l'erreur"}},required:["error"],additionalProperties:!1}}}];class Dt extends Error{constructor(e,t,r){super(e),this.name="ApiClientError",this.status=t,this.details=r}}class Lt extends Error{constructor(e){super(e),this.name="CircuitBreakerError"}}It.addType("oid",(e=>new xt.ObjectID(e)));class Ut extends t.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:n="/api/cocolight/refreshtoken",endpoints:o=qt,timeout:a=3e4,debug:c=!1,maxRetries:d=0,circuitBreakerThreshold:p=5,circuitBreakerResetTime:l=6e4,fromJSONValue:u=!0}={}){if(super(),!e)throw new Dt('Le paramètre "baseURL" est obligatoire.',500);this._baseURL=e,this._refreshToken=r,this._refreshUrl=n,this._endpoints=o,this._debug=c;let f=null;this._fromJSONValue=u,Object.defineProperty(this,"userId",{get:()=>f,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{f=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new s({strict:!1,useDefaults:!0}),i(this._ajv),this._logger=Ct({transport:{target:"pino-pretty",options:{colorize:!0}},level:c?"debug":"info"}),this._client=bt.create({baseURL:e,timeout:a}),d>0&&(Rt(this._client,{retries:d,retryDelay:Rt.exponentialDelay,retryCondition:e=>Rt.isNetworkError(e)||Rt.isRetryableError(e)}),this._logger.info(`[ApiClient] Retry activé : ${d} max`)),this._breakerThreshold=p,this._breakerResetTime=l,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,t&&this.setToken(t),this._client.interceptors.response.use((e=>e),(async e=>{if(e.response&&401===e.response.status&&this._refreshToken)try{if(await this._refreshAccessToken())return this._client.request(e.config)}catch(e){throw new Dt(e.message,401,e)}throw e}))}setToken(e){this._accessToken=e,this._client.defaults.headers.common.Authorization="Bearer "+e,this._logger.debug(`[ApiClient] setToken: ${e}`)}getToken(){return this._accessToken}setRefreshToken(e){this._refreshToken=e,this._logger.debug(`[ApiClient] setRefreshToken: ${e}`)}getRefreshToken(){return this._refreshToken}async _refreshAccessToken(){if(!this._refreshToken)return!1;try{const e=await this._client.post(this._refreshUrl,{refreshToken:this._refreshToken},{headers:{"Content-Type":"application/json"}});return!(!e.data||!e.data.accessToken||(this.setToken(e.data.accessToken),e.data.refreshToken&&this.setRefreshToken(e.data.refreshToken),this.emit("refreshSuccess",e.data),0))}catch(e){return this._logger.error(`[ApiClient] Refresh Error : ${e.message}`),!1}}_checkCircuitBreaker(){return!this._breakerOpen||Date.now()-this._lastBreakerOpenTime>this._breakerResetTime&&(this._breakerOpen=!1,this._breakerErrorCount=0,this._logger.warn("[ApiClient] Circuit breaker réinitialisé"),!0)}_updateCircuitBreakerError(){this._breakerErrorCount+=1,this._logger.warn(`[ApiClient] Erreur #${this._breakerErrorCount} sur ${this._breakerThreshold}`),this._breakerErrorCount>=this._breakerThreshold&&(this._breakerOpen=!0,this._lastBreakerOpenTime=Date.now(),this._logger.error("[ApiClient] Circuit breaker ACTIVÉ - L'API est considérée indisponible"))}_resetCircuitBreakerSuccess(){this._breakerErrorCount=0,this._breakerOpen&&(this._breakerOpen=!1,this._logger.warn("[ApiClient] Circuit breaker refermé suite à un succès"))}static stripNullsInPlace(e){if(e&&"object"==typeof e&&e.value&&"function"==typeof e.value.pipe)return e;if(Array.isArray(e))for(let t=e.length-1;t>=0;t--)null===e[t]||void 0===e[t]?e.splice(t,1):"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]);else if(e&&"object"==typeof e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||void 0===e[t]?delete e[t]:"object"==typeof e[t]&&Ut.stripNullsInPlace(e[t]));return e}_resolveSpecialValuesInPlace(e){if(e&&"object"==typeof e&&e.value&&"function"==typeof e.value.pipe)return e;const t={userId:()=>this.userId,accessToken:()=>this._accessToken,refreshToken:()=>this._refreshToken,baseURL:()=>this._baseURL};if("string"==typeof e&&e.startsWith("@")){const r=e.slice(1);return"function"==typeof t[r]?t[r]():e}if(Array.isArray(e))for(let t=0;t<e.length;t++)e[t]=this._resolveSpecialValuesInPlace(e[t]);else if(e&&"object"==typeof e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=this._resolveSpecialValuesInPlace(e[t]));return e}async callEndpoint(e,t={},r=!0,n=!0){if(!this._checkCircuitBreaker())throw new Lt("Le circuit breaker est activé, impossible d'appeler l'API");const s=this._endpoints.find((t=>t.constant===e));if(!s)throw new Dt(`Endpoint introuvable : ${e}`,404);const{path:i,method:o,contentType:a,auth:c,pathParams:d,request:p,responses:l}=s,u=(o||"GET").toLowerCase(),f=a||"application/json",m={"Content-Type":f};if(this._accessToken)"bearer"===c?m.Authorization=`Bearer ${this._accessToken}`:c&&"none"!==c||m.Authorization||(m.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===c)throw new Dt(`Token requis pour l'endpoint sécurisé : ${e}`,401);let h,y=i;if(d){const e=t.pathParams||{},r=this._ajv.compile(d);if(!r(e))throw this.emit("validationError",{stage:"pathParams",errors:r.errors}),new Dt("Path parameter validation failed.",400,r.errors);const n=this._resolveSpecialValuesInPlace(e);y=y.replace(/\{(\w+)\}/g,((e,t)=>{const r=n[t];if(void 0!==r)return encodeURIComponent(r);throw new Dt(`Path param manquant ou non résolu : {${t}}`,400)}))}if(p){const e={...t};delete e.pathParams;const r=Ut.stripNullsInPlace(e),n=this._ajv.compile(p);if(!n(r))throw this.emit("validationError",{stage:"request",errors:n.errors}),new Dt("Request validation failed.",400,n.errors);t=this._resolveSpecialValuesInPlace(r)}"application/json"===f||"multipart/form-data"===f?h=t:"application/x-www-form-urlencoded"===f&&(h=Ut.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${y}, method=${u}`);try{const e=await this._client.request({url:y,method:u,headers:m,["get"===u?"params":"data"]:h});if(n){const t=e.status.toString(),r=l?.[t];if(r){const n=this._ajv.compile(r);if(!n(e.data))throw this.emit("validationError",{stage:"response",errors:n.errors}),new Dt("Response validation failed.",t,n.errors)}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(s.postActions)&&s.postActions.forEach((t=>{const r=t.path?this._getValueByPath(e.data,t.path):null;switch(t.type){case"setToken":this.setToken(r);break;case"setRefreshToken":this.setRefreshToken(r);break;case"setUserId":this._setUserId(r);break;case"resetSession":this.resetSession();break;case"emitEvent":t.event&&(this.emit(t.event,r),this._logger.debug(`[ApiClient] Event émis : ${t.event}`,r));break;case"callMethod":"function"==typeof this[t.method]?(this[t.method](),this._logger.debug(`[ApiClient] Méthode appelée : ${t.method}`)):this._logger.warn(`[ApiClient] Méthode inconnue : ${t.method}`);break;default:this._logger.warn(`[ApiClient] Action inconnue : ${t.type}`)}})),e}catch(e){throw this._updateCircuitBreakerError(),e}}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),delete this._client.defaults.headers.common.Authorization,this._logger.info("[ApiClient] Session utilisateur réinitialisée."),this.emit("sessionReset")}_getValueByPath(e,t){if(t)return t.split(".").reduce(((e,t)=>e&&e[t]),e)}static toURLSearchParams(e,t={}){return this._buildParams(e,new URLSearchParams,t)}static _buildParams(e,t,r={}){if("object"!=typeof e||null===e)throw new TypeError("La donnée doit être un objet non nul.");const{dots:n=!1,indexes:s=!1,metaTokens:i=!0}=r,o=[];function a(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function c(e){return e.endsWith("[]")?e.slice(0,-2):e}function d(e,t,r=!1){return e?e.concat(t).map(((e,t)=>(e=c(e),!r&&t?`[${e}]`:e))).join(r?".":""):t}function p(e){return null==e?"":e instanceof Date?e.toISOString():(e instanceof Blob||e instanceof File||e instanceof ArrayBuffer||ArrayBuffer.isView(e),e)}return function e(r,l=[]){null==r||o.includes(r)||(o.push(r),Object.entries(r).forEach((([r,o])=>{void 0!==o&&function(e,r,o){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=i?r:r.slice(0,-2),t.append(d(o,r,n),JSON.stringify(e)),!1;if(Array.isArray(e)&&!e.some(a)||r.endsWith("[]"))return r=c(r),e.forEach(((e,i)=>{if(null!=e){const a=s?d(o.concat(r),i,n):`${d(o,r,n)}[]`;t.append(a,p(e))}})),!1}return!!a(e)||(t.append(d(o,r,n),p(e)),!1)}(o,r.trim(),l)&&e(o,l.concat(c(r)))})),o.pop())}(e),t}_transformData(e){if(e&&"object"==typeof e)if(e.resultGoods?.msg)e=this._normalizeJsonData({msg:e.resultGoods.msg,...e});else if(e.resultErrors?.msg)e=this._normalizeJsonData({msg:e.resultErrors.msg,...e});else if(e.results&&"object"==typeof e.results&&!Array.isArray(e.results))e.results=Object.keys(e.results).map((t=>this._normalizeJsonData({id:t,...e.results[t]})));else if(Array.isArray(e.results))e.results=e.results.map((e=>this._normalizeJsonData(e)));else if(e.news&&Array.isArray(e.news)&&0===e.news.length)e=e.news;else if(e.news&&"object"==typeof e.news&&!Array.isArray(e.news))e=Object.keys(e.news).map((t=>this._normalizeJsonData({id:t,...e.news[t]})));else if(e.notif&&"object"==typeof e.notif&&!Array.isArray(e.notif))e.notif=Object.keys(e.notif).map((t=>this._normalizeJsonData({id:t,...e.notif[t]})));else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens)&&e.organizations&&"object"==typeof e.organizations&&!Array.isArray(e.organizations))e=[...Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]}))),...Object.keys(e.organizations).map((t=>this._normalizeJsonData({id:t,...e.organizations[t]})))];else if(e.citoyens&&"object"==typeof e.citoyens&&!Array.isArray(e.citoyens))e=Object.keys(e.citoyens).map((t=>this._normalizeJsonData({id:t,...e.citoyens[t]})));else if(e.cities&&"object"==typeof e.cities&&!Array.isArray(e.cities))e=Object.keys(e.cities).map((t=>this._normalizeJsonData({id:t,...e.cities[t]})));else if(e.cities&&Array.isArray(e.cities)&&0===e.cities.length)e=e.cities;else if(e.newComment&&"object"==typeof e.newComment)e.newComment=this._normalizeJsonData({...e.newComment});else if(Array.isArray(e))e=e.map((e=>this._normalizeJsonData(e)));else if(e.map&&"object"==typeof e.map)e.map=this._normalizeJsonData(e.map);else if(e.object&&"object"==typeof e.object)e.object=this._normalizeJsonData(e.object);else if("object"==typeof e&&Object.keys(e).length>0){const t=Object.keys(e).every((e=>/^[0-9a-fA-F]{24}$/.test(e)));e=t?Object.keys(e).map((t=>({id:t,...this._normalizeJsonData(e[t])}))):this._normalizeJsonData(e)}return e}_normalizeJsonData(e){if(!e||"object"!=typeof e)return e;if(e=this._normalizeRecursively(e),e?.mediaImg?.images&&Array.isArray(e.mediaImg.images)&&e.mediaImg.images.length>0&&(e.mediaImg.countImages=e.mediaImg.images.length),e?.mediaFile?.files&&Array.isArray(e.mediaFile.files)&&e.mediaFile.files.length>0&&(e.mediaFile.countFiles=e.mediaFile.files.length),e?.src?.changes&&"object"==typeof e.src.changes&&Object.keys(e.src.changes).length>0&&Object.keys(e.src.changes).forEach((t=>{e.src.changes[t]&&(e.src.changes[t]=this._ensureFullURL(e.src.changes[t]))})),e?.openingHours&&Array.isArray(e.openingHours)&&e.openingHours.length>0&&(e.openingHours=e.openingHours.filter((e=>e.dayOfWeek&&e.hours&&e.hours[0]&&e.hours[0].opens))),e.replies&&"object"==typeof e.replies&&Object.keys(e.replies).length>0&&(e.replies=Object.keys(e.replies).map((t=>this._normalizeJsonData({id:t,...e.replies[t]})))),e?.author&&"object"==typeof e.author&&Object.keys(e.author).length>0&&!("profilThumbImageUrl"in e.author)){const t=Object.keys(e.author)[0];e.author={...e.author[t]}}return e?.timeAgo&&delete e.timeAgo,this._fromJSONValue?It.fromJSONValue(e):e}_ensureFullURL(e){if(!e)return e;if(!(e=e.trim())||/^https?:\/\//i.test(e))return e;let t="/";return t=this._baseURL.endsWith("/")&&e.startsWith("/")||this._baseURL.endsWith("/")||e.startsWith("/")?"":"/",`${this._baseURL}${t}${e}`}_normalizeDatesRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeDatesRecursively(e))):(Object.keys(e).forEach((t=>{this._dateFields.includes(t)&&(e[t]&&"object"==typeof e[t]&&e[t].sec&&"number"==typeof e[t].sec?e[t]={$date:1e3*e[t].sec}:"number"==typeof e[t]&&(e[t]={$date:1e3*e[t]})),e[t]&&"object"==typeof e[t]&&this._normalizeDatesRecursively(e[t])})),e)}_normalizeImagesRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeImagesRecursively(e))):(Object.keys(e).forEach((t=>{this._imageFields.includes(t)&&"string"==typeof e[t]&&""!==e[t].trim()&&(e[t]=this._ensureFullURL(e[t])),"content"===t&&e[t]?.image&&(e[t].image=this._ensureFullURL(e[t].image)),e[t]&&"object"==typeof e[t]&&this._normalizeImagesRecursively(e[t])})),e)}_normalizeIdRecursively(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map((e=>this._normalizeIdRecursively(e))):(e._id&&e._id.$id&&/^[0-9a-fA-F]{24}$/.test(e._id.$id)&&(e.id=e._id.$id,e._id={$type:"oid",$value:e._id.$id}),e.id&&e.id.$id&&/^[0-9a-fA-F]{24}$/.test(e.id.$id)&&(e._id={$type:"oid",$value:e.id.$id},e.id=e.id.$id),Object.keys(e).forEach((t=>{e[t]&&"object"==typeof e[t]&&(e[t]=this._normalizeIdRecursively(e[t]))})),e)}_normalizeBooleansRecursively(e){return"string"==typeof e?"true"===e||"false"!==e&&e:Array.isArray(e)?e.map((e=>this._normalizeBooleansRecursively(e))):(null!==e&&"object"==typeof e&&Object.keys(e).forEach((t=>{e[t]=this._normalizeBooleansRecursively(e[t])})),e)}_normalizeString(e){return"true"===e||"false"!==e&&e}_normalizeId(e){return e._id&&e._id.$id&&/^[0-9a-fA-F]{24}$/.test(e._id.$id)&&(e.id=e._id.$id,e._id={$type:"oid",$value:e._id.$id}),e.id&&e.id.$id&&/^[0-9a-fA-F]{24}$/.test(e.id.$id)&&(e._id={$type:"oid",$value:e.id.$id},e.id=e.id.$id),e}_normalizeDate(e){return e&&"object"==typeof e&&"number"==typeof e.sec?{$date:1e3*e.sec}:"number"==typeof e?{$date:1e3*e}:e}_normalizeImage(e){return"string"==typeof e&&""!==e.trim()?this._ensureFullURL(e):e}_imageFields=["profilImageUrl","profilThumbImageUrl","profilMediumImageUrl","profilMarkerImageUrl","profilBannerUrl","profilRealBannerUrl","imagePath","imageThumbPath","docPath"];_dateFields=["modified","created","updated","birthDate","lastLoginDate","startDate","endDate","date"];_normalizeRecursively(e){if("string"==typeof e)return this._normalizeString(e);if(Array.isArray(e))return e.map((e=>this._normalizeRecursively(e)));if(null!==e&&"object"==typeof e){const t={};return Object.keys(e).forEach((r=>{let n=this._normalizeRecursively(e[r]);this._dateFields.includes(r)&&(n=this._normalizeDate(n)),this._imageFields.includes(r)&&(n=this._normalizeImage(n)),"content"===r&&n&&"object"==typeof n&&n.image&&(n.image=this._normalizeImage(n.image)),t[r]=n})),this._normalizeId(t)}return e}}})(),n.default})()));