@communecter/cocolight-api-client 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cocolight-api-client.browser.js +3 -3
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/package.json +2 -4
- package/src/api/EndpointApi.js +638 -343
- package/src/api/News.js +5 -5
- package/src/api/Organization.js +5 -5
- package/src/api/Project.js +5 -5
- package/src/api/User.js +4 -4
- package/src/endpoints.module.js +2 -2
- package/src/mixin/DraftStateMixin.js +4 -4
- package/src/mixin/EntityMixin.js +1 -1
- package/src/mixin/UtilMixin.js +5 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! For license information please see cocolight-api-client.browser.js.LICENSE.txt */
|
|
2
|
-
!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 __webpack_modules__={117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2586),o=r(5765),i=r(4227),s=r(8660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:l}=e;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(l,s.default,"additionalProperties"));const d=(0,o.allSchemaProperties)(r);for(const e of d)l.definedProperties.add(e);l.opts.unevaluated&&d.length&&!0!==l.props&&(l.props=i.mergeEvaluated.props(t,(0,i.toHash)(d),l.props));const
|
|
2
|
+
!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 __webpack_modules__={117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2586),o=r(5765),i=r(4227),s=r(8660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:l}=e;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(l,s.default,"additionalProperties"));const d=(0,o.allSchemaProperties)(r);for(const e of d)l.definedProperties.add(e);l.opts.unevaluated&&d.length&&!0!==l.props&&(l.props=i.mergeEvaluated.props(t,(0,i.toHash)(d),l.props));const p=d.filter((e=>!(0,i.alwaysValidSchema)(l,r[e])));if(0===p.length)return;const u=t.name("valid");for(const r of p)m(r)?f(r):(t.if((0,o.propertyInData)(t,c,r,l.opts.ownProperties)),f(r),l.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(u);function m(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==r[e].default}function f(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),o=r(7887),i=r(8708),s=r(9029),a=r(4227);var c;function l(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=l(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=l,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:i}=e,a=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),l=t.length>0&&!(0===a.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(l){const o=u(t,n,i.strictNumbers,c.Wrong);r.if(o,(()=>{a.length?function(e,t,r){const{gen:n,data:o,opts:i}=e,a=n.let("dataType",s._`typeof ${o}`),c=n.let("coerced",s._`undefined`);"array"===i.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,s._`${o}[0]`).assign(a,s._`typeof ${o}`).if(u(t,o,i.strictNumbers),(()=>n.assign(c,o))))),n.if(s._`${c} !== undefined`);for(const e of r)(d.has(e)||"array"===e&&"array"===i.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(c,s._`"" + ${o}`).elseIf(s._`${o} === null`).assign(c,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${o} === null
|
|
3
3
|
|| (${a} == "string" && ${o} && ${o} == +${o})`).assign(c,s._`+${o}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${o} === null
|
|
4
4
|
|| (${a} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,s._`+${o}`);case"boolean":return void n.elseIf(s._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf(s._`${o} === "true" || ${o} === 1`).assign(c,!0);case"null":return n.elseIf(s._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(c,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number"
|
|
5
|
-
|| ${a} === "boolean" || ${o} === null`).assign(c,s._`[${o}]`)}}n.else(),f(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(o,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):f(e)}))}return l};const d=new Set(["string","number","integer","boolean","null"]);function u(e,t,r,n=c.Correct){const o=n===c.Correct?s.operators.EQ:s.operators.NEQ;let i;switch(e){case"null":return s._`${t} ${o} null`;case"array":i=s._`Array.isArray(${t})`;break;case"object":i=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return s._`typeof ${t} ${o} ${e}`}return n===c.Correct?i:(0,s.not)(i);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return u(e[0],t,r,n);let o;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=s._`typeof ${t} != "object"`;o=i.null?e:s._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=s.nil;i.number&&delete i.integer;for(const e in i)o=(0,s.and)(o,u(e,t,r,n));return o}t.checkDataType=u,t.checkDataTypes=p;const m={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,m)}t.reportTypeError=f},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<<a)-1,l=c>>1,d=-7,u=r?o-1:0,p=r?-1:1,m=e[t+u];for(u+=p,i=m&(1<<-d)-1,m>>=-d,d+=a;d>0;i=256*i+e[t+u],u+=p,d-=8);for(s=i&(1<<-d)-1,i>>=-d,d+=n;d>0;s=256*s+e[t+u],u+=p,d-=8);if(0===i)i=1-l;else{if(i===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,n),i-=l}return(m?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,l=8*i-o-1,d=(1<<l)-1,u=d>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:i-1,f=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+u>=1?p/c:p*Math.pow(2,1-u))*c>=2&&(s++,c/=2),s+u>=d?(a=0,s=d):s+u>=1?(a=(t*c-1)*Math.pow(2,o),s+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,o),s=0));o>=8;e[r+m]=255&a,m+=f,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[r+m]=255&s,m+=f,s/=256,l-=8);e[r+m-f]|=128*h}},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 o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const s={scheme:"http",domainHost:!0,parse:o,serialize:i},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:s,https:{scheme:"https",domainHost:s.domainHost,parse:o,serialize:i},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,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 o=`${r}:${t.nid||e.nid}`,i=c[o];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(),o=`${r}:${t.nid||n}`,i=c[o];i&&(e=i.serialize(e,t));const s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s},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},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromStream=t.fromBuffer=t.EndOfStreamError=t.fromFile=void 0;const n=r(1343),o=r(6452);var i=r(1456);Object.defineProperty(t,"fromFile",{enumerable:!0,get:function(){return i.fromFile}});var s=r(6452);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return s.EndOfStreamError}}),Object.defineProperty(t,"fromBuffer",{enumerable:!0,get:function(){return s.fromBuffer}}),t.fromStream=async function(e,t){if(t=t||{},e.path){const r=await n.stat(e.path);t.path=e.path,t.size=r.size}return o.fromStream(e,t)}},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),o=r(9029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?o._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${l}.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),o=r(4227),i=r(5765),s={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,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:s,data:a,keyword:c,it:l}=e;!function(e){const{opts:n,errSchemaPath:i}=l,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(l,e,n.strictTuples)}}(s),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=o.mergeEvaluated.items(i,r.length,l.items));const d=i.name("valid"),u=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(l,t)||(i.if(n._`${u} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},d))),e.ok(d))}))}t.validateTuple=a,t.default=s},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(208),o=r(9029),i=r(4227),s=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:l,schemaCode:d,it:u}=e;if(!a&&!c)return;const p=t.let("valid"),m=l.items?(0,n.getSchemaTypes)(l.items):[];function f(i,s){const a=t.name("item"),c=(0,n.checkDataTypes)(m,a,u.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(a,o._`${r}[${i}]`),t.if(c,o._`continue`),m.length>1&&t.if(o._`typeof ${a} == "string"`,o._`${a} += "_"`),t.if(o._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(s,o._`${l}[${a}]`),e.error(),t.assign(p,!1).break()})).code(o._`${l}[${a}] = ${i}`)}))}function h(n,a){const c=(0,i.useFunc)(t,s.default),l=t.name("outer");t.label(l).for(o._`;${n}--;`,(()=>t.for(o._`${a} = ${n}; ${a}--;`,(()=>t.if(o._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(l)}))))))}e.block$data(p,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(p,!0),t.if(o._`${n} > 1`,(()=>(m.length>0&&!m.some((e=>"object"===e||"array"===e))?f:h)(n,i)))}),o._`${d} === 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 o=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=r.length+1;if(1===i)return e;var s=new Array(i);s[0]=o(e);for(var a=1;a<i;a++)s[a]=o(r[a]);return s.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var l="",d=0,u=-1,p=e&&e.length||0,m=0;m<p;){if(37===e.charCodeAt(m)&&m+1<p){switch(u=u>-1?u:0,e.charCodeAt(m+1)){case 100:case 102:if(d>=c)break;if(null==r[d])break;u<m&&(l+=e.slice(u,m)),l+=Number(r[d]),u=m+2,m++;break;case 105:if(d>=c)break;if(null==r[d])break;u<m&&(l+=e.slice(u,m)),l+=Math.floor(Number(r[d])),u=m+2,m++;break;case 79:case 111:case 106:if(d>=c)break;if(void 0===r[d])break;u<m&&(l+=e.slice(u,m));var f=typeof r[d];if("string"===f){l+="'"+r[d]+"'",u=m+2,m++;break}if("function"===f){l+=r[d].name||"<anonymous>",u=m+2,m++;break}l+=o(r[d]),u=m+2,m++;break;case 115:if(d>=c)break;u<m&&(l+=e.slice(u,m)),l+=String(r[d]),u=m+2,m++;break;case 37:u<m&&(l+=e.slice(u,m)),l+="%",u=m+2,m++,d--}++d}++m}return-1===u?e:(u<p&&(l+=e.slice(u)),l)}},1027:(e,t,r)=>{"use strict";r.d(t,{GN:()=>o,Ge:()=>i,u3:()=>n});class n{getAccessToken(){throw new Error("getAccessToken() doit être implémenté")}setAccessToken(e){throw new Error("setAccessToken() doit être implémenté")}getRefreshToken(){throw new Error("getRefreshToken() doit être implémenté")}setRefreshToken(e){throw new Error("setRefreshToken() doit être implémenté")}clear(){throw new Error("clear() doit être implémenté")}}class o extends n{constructor(){super(),this._accessToken=null,this._refreshToken=null}getAccessToken(){return this._accessToken}setAccessToken(e){this._accessToken=e}getRefreshToken(){return this._refreshToken}setRefreshToken(e){this._refreshToken=e}clear(){this._accessToken=null,this._refreshToken=null}}class i extends n{constructor(e="cocolight"){super(),this.prefix=e}getAccessToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_accessToken`):null}setAccessToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_accessToken`,e)}getRefreshToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_refreshToken`):null}setRefreshToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_refreshToken`,e)}clear(){"undefined"!=typeof localStorage&&(localStorage.removeItem(`${this.prefix}_accessToken`),localStorage.removeItem(`${this.prefix}_refreshToken`))}}},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),o={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:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=s(i,"then"),c=s(i,"else");if(!a&&!c)return;const l=t.let("valid",!0),d=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(d,u("then",r),u("else",r))}else a?t.if(d,u("then")):t.if((0,n.not)(d),u("else"));function u(r,o){return()=>{const i=e.subschema({keyword:r},d);t.assign(l,d),e.mergeValidEvaluated(i,l),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},1343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readFile=t.writeFileSync=t.writeFile=t.read=t.open=t.close=t.stat=t.createReadStream=t.pathExists=void 0;const n=r(4428);t.pathExists=n.existsSync,t.createReadStream=n.createReadStream,t.stat=async function(e){return new Promise(((t,r)=>{n.stat(e,((e,n)=>{e?r(e):t(n)}))}))},t.close=async function(e){return new Promise(((t,r)=>{n.close(e,(e=>{e?r(e):t()}))}))},t.open=async function(e,t){return new Promise(((r,o)=>{n.open(e,t,((e,t)=>{e?o(e):r(t)}))}))},t.read=async function(e,t,r,o,i){return new Promise(((s,a)=>{n.read(e,t,r,o,i,((e,t,r)=>{e?a(e):s({bytesRead:t,buffer:r})}))}))},t.writeFile=async function(e,t){return new Promise(((r,o)=>{n.writeFile(e,t,(e=>{e?o(e):r()}))}))},t.writeFileSync=function(e,t){n.writeFileSync(e,t)},t.readFile=async function(e){return new Promise(((t,r)=>{n.readFile(e,((e,n)=>{e?r(e):t(n)}))}))}},1456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromFile=t.FileTokenizer=void 0;const n=r(8632),o=r(8705),i=r(1343);class s extends n.AbstractTokenizer{constructor(e,t){super(t),this.fd=e}async readBuffer(e,t){const r=this.normalizeOptions(e,t);this.position=r.position;const n=await i.read(this.fd,e,r.offset,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead<r.length&&(!t||!t.mayBeLess))throw new o.EndOfStreamError;return n.bytesRead}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),n=await i.read(this.fd,e,r.offset,r.length,r.position);if(!r.mayBeLess&&n.bytesRead<r.length)throw new o.EndOfStreamError;return n.bytesRead}async close(){return i.close(this.fd)}}t.FileTokenizer=s,t.fromFile=async function(e){const t=await i.stat(e);if(!t.isFile)throw new Error(`File not a file: ${e}`);const r=await i.open(e,"r");return new s(r,{path:e,size:t.size})}},1510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;const n=r(5523),o=r(8122);var i=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.StreamReader=class{constructor(e){if(this.s=e,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",(()=>this.reject(new n.EndOfStreamError))),this.s.once("error",(e=>this.reject(e))),this.s.once("close",(()=>this.reject(new Error("Stream closed"))))}async peek(e,t,r){const n=await this.read(e,t,r);return this.peekQueue.push(e.subarray(t,t+n)),n}async read(e,t,r){if(0===r)return 0;if(0===this.peekQueue.length&&this.endOfStream)throw new n.EndOfStreamError;let o=r,i=0;for(;this.peekQueue.length>0&&o>0;){const r=this.peekQueue.pop();if(!r)throw new Error("peekData should be defined");const n=Math.min(r.length,o);e.set(r.subarray(0,n),t+i),i+=n,o-=n,n<r.length&&this.peekQueue.push(r.subarray(n))}for(;o>0&&!this.endOfStream;){const r=Math.min(o,1048576),n=await this.readFromStream(e,t+i,r);if(i+=n,n<r)break;o-=n}return i}async readFromStream(e,t,r){const n=this.s.read(r);if(n)return e.set(n,t),n.length;{const n={buffer:e,offset:t,length:r,deferred:new o.Deferred};return this.deferred=n.deferred,this.s.once("readable",(()=>{this.readDeferred(n)})),n.deferred.promise}}readDeferred(e){const t=this.s.read(e.length);t?(e.buffer.set(t,e.offset),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",(()=>{this.readDeferred(e)}))}reject(e){this.endOfStream=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}}},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 o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof 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 o(r)}t._Code=o,t.nil=new o(""),t._=i;const s=new o("+");function a(e,...t){const r=[d(e[0])];let n=0;for(;n<t.length;)r.push(s),c(r,t[n]),r.push(s,d(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new o(r)}function c(e,t){var r;t instanceof o?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:d(Array.isArray(r)?r.join(","):r))}function l(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 d(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 o(d(e))},t.safeStringify=d,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):i`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new o(e.toString())}},1664:e=>{"use strict";e.exports={extensions:["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd"]}},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,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},2023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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=o},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),o=r(3693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.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),o=r(208),i=r(7887),s=r(208),a=r(7870),c=r(3673),l=r(4495),d=r(9029),u=r(2023),p=r(6939),m=r(4227),f=r(8708);function h({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,d._`${u.default.data}, ${u.default.valCxt}`,n.$async,(()=>{e.code(d._`"use strict"; ${y(r,o)}`),function(e,t){e.if(u.default.valCxt,(()=>{e.var(u.default.instancePath,d._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,d._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,d._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,d._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,d._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{e.var(u.default.instancePath,d._`""`),e.var(u.default.parentData,d._`undefined`),e.var(u.default.parentDataProperty,d._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,d._`{}`)}))}(e,o),e.code(i)})):e.func(t,d._`${u.default.data}, ${function(e){return d._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?d._`, ${u.default.dynamicAnchors}={}`:d.nil}}={}`}(o)}`,n.$async,(()=>e.code(y(r,o)).code(i)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?d._`/*# sourceURL=${r} */`:d.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 w(e){return"boolean"!=typeof e.schema}function _(e){(0,m.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return E(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);E(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(d._`${u.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=d.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(d._`${u.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function E(e,t,r,n){const{gen:o,schema:a,data:c,allErrors:l,opts:p,self:f}=e,{RULES:h}=f;function y(m){(0,i.shouldUseGroup)(a,m)&&(m.type?(o.if((0,s.checkDataType)(m.type,c,p.strictNumbers)),T(e,m),1===t.length&&t[0]===m.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):T(e,m),l||o.if(d._`${u.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,m.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=>{S(e.dataTypes,t)||$(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)S(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&$(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 o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&$(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):o.block((()=>P(e,"$ref",h.all.$ref.definition)))}function T(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function $(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){w(e)&&(_(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&v(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,m.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",d._`${r}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),b(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(d._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(d._`new ${o}(${u.default.vErrors})`))):(t.assign(d._`${n}.errors`,u.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof d.Name&&e.assign(d._`${t}.props`,r),n instanceof d.Name&&e.assign(d._`${t}.items`,n)}(e),t.return(d._`${u.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class O{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,m.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",A(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,d.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,d.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(d._`${t} !== undefined && (${(0,d.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?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.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=d.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if((0,d.or)(d._`${n} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return d._`${(0,s.checkDataTypes)(e,t,o.opts.strictNumbers,s.DataType.Wrong)}`}return d.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return d._`!${r}(${t})`}return d.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const o={...this.it,...r,items:void 0,props:void 0};return function(e,t){w(e)&&(_(e),g(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&v(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);b(e,i),n.var(t,d._`${i} === ${u.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=m.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=m.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,d.Name))),!0}}function P(e,t,r,n){const o=new O(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,c.funcKeywordCode)(o,r):"macro"in r?(0,c.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(o,r)}t.KeywordCxt=O;const x=/^\/(?:[^~]|~0|~1)*$/,k=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return u.default.rootData;if("/"===e[0]){if(!x.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=u.default.rootData}else{const s=k.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!o)return i}let s=i;const a=o.split("/");for(const e of a)e&&(i=d._`${i}${(0,d.getProperty)((0,m.unescapeJsonPointer)(e))}`,s=d._`${s} && ${i}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=A},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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:s,it:a}=e;let c,l;const{minContains:d,maxContains:u}=i;a.opts.next?(c=void 0===d?1:d,l=u):c=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${p} <= ${l}`),void e.pass(t)}a.items=!0;const m=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(m,!1).break())),1===c?t.assign(m,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0))))}(r)))))}function h(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?h(m,(()=>t.if(m,(()=>t.break())))):0===c?(t.let(m,!0),void 0!==l&&t.if(n._`${s}.length > 0`,f)):(t.let(m,!1),f()),e.result(m,(()=>e.reset()))}};t.default=i},2808:e=>{for(var t=Math.floor(16777215*Math.random()),r=d.index=parseInt(16777215*Math.random(),10),n=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,o=(()=>{try{return _Buffer}catch(e){try{return Buffer}catch(e){return null}}})(),i=function(e){return!(null==e||!e.constructor||"function"!=typeof e.constructor.isBuffer||!e.constructor.isBuffer(e))},s=[],a=0;a<256;a++)s[a]=(a<=15?"0":"")+a.toString(16);var c=new RegExp("^[0-9a-fA-F]{24}$"),l=[];for(a=0;a<10;)l[48+a]=a++;for(;a<16;)l[55+a]=l[87+a]=a++;function d(e){if(!(this instanceof d))return new d(e);if(e&&(e instanceof d||"ObjectID"===e._bsontype))return e;if(this._bsontype="ObjectID",null!=e&&"number"!=typeof e){var t=d.isValid(e);if(!t&&null!=e)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(t&&"string"==typeof e&&24===e.length)return d.createFromHexString(e);if(null==e||12!==e.length){if(null!=e&&"function"==typeof e.toHexString)return e;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=e}else this.id=this.generate(e)}e.exports=d,d.default=d,d.createFromTime=function(e){return new d((8===(t=(t=e=parseInt(e,10)%4294967295).toString(16)).length?t:"00000000".substring(t.length,8)+t)+"0000000000000000");var t},d.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var t="",r=0;r<24;)t+=String.fromCharCode(l[e.charCodeAt(r++)]<<4|l[e.charCodeAt(r++)]);return new d(t)},d.isValid=function(e){return null!=e&&("number"==typeof e||("string"==typeof e?12===e.length||24===e.length&&c.test(e):e instanceof d||(i(e)?d.isValid(e.toString("hex")):!("function"!=typeof e.toHexString||!o||!(e.id instanceof o||"string"==typeof e.id))&&(12===e.id.length||24===e.id.length&&c.test(e.id)))))},d.prototype={constructor:d,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var e="",t=0;t<this.id.length;t++)e+=s[this.id.charCodeAt(t)];return e},equals:function(e){return e instanceof d?this.toString()===e.toString():"string"==typeof e&&d.isValid(e)&&12===e.length&&i(this.id)?e===this.id.toString("binary"):"string"==typeof e&&d.isValid(e)&&24===e.length?e.toLowerCase()===this.toHexString():"string"==typeof e&&d.isValid(e)&&12===e.length?e===this.id:!(null==e||!(e instanceof d||e.toHexString))&&e.toHexString()===this.toHexString()},getTimestamp:function(){var e,t=new Date;return e=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(1e3*Math.floor(e)),t},generate:function(e){"number"!=typeof e&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%4294967295;var o=r=(r+1)%16777215;return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e,t>>16&255,t>>8&255,255&t,n>>8&255,255&n,o>>16&255,o>>8&255,255&o)}};var u=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";d.prototype[u]=function(){return"ObjectID("+this+")"},d.prototype.toJSON=d.prototype.toHexString,d.prototype.toString=d.prototype.toHexString},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9029),o=r(4227),i=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e},
|
|
5
|
+
|| ${a} === "boolean" || ${o} === null`).assign(c,s._`[${o}]`)}}n.else(),f(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(o,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):f(e)}))}return l};const d=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,n=c.Correct){const o=n===c.Correct?s.operators.EQ:s.operators.NEQ;let i;switch(e){case"null":return s._`${t} ${o} null`;case"array":i=s._`Array.isArray(${t})`;break;case"object":i=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return s._`typeof ${t} ${o} ${e}`}return n===c.Correct?i:(0,s.not)(i);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function u(e,t,r,n){if(1===e.length)return p(e[0],t,r,n);let o;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=s._`typeof ${t} != "object"`;o=i.null?e:s._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=s.nil;i.number&&delete i.integer;for(const e in i)o=(0,s.and)(o,p(e,t,r,n));return o}t.checkDataType=p,t.checkDataTypes=u;const m={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,m)}t.reportTypeError=f},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<<a)-1,l=c>>1,d=-7,p=r?o-1:0,u=r?-1:1,m=e[t+p];for(p+=u,i=m&(1<<-d)-1,m>>=-d,d+=a;d>0;i=256*i+e[t+p],p+=u,d-=8);for(s=i&(1<<-d)-1,i>>=-d,d+=n;d>0;s=256*s+e[t+p],p+=u,d-=8);if(0===i)i=1-l;else{if(i===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,n),i-=l}return(m?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,l=8*i-o-1,d=(1<<l)-1,p=d>>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:i-1,f=n?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+p>=1?u/c:u*Math.pow(2,1-p))*c>=2&&(s++,c/=2),s+p>=d?(a=0,s=d):s+p>=1?(a=(t*c-1)*Math.pow(2,o),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,o),s=0));o>=8;e[r+m]=255&a,m+=f,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[r+m]=255&s,m+=f,s/=256,l-=8);e[r+m-f]|=128*h}},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 o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function i(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const s={scheme:"http",domainHost:!0,parse:o,serialize:i},a={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(n(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={http:s,https:{scheme:"https",domainHost:s.domainHost,parse:o,serialize:i},ws:a,wss:{scheme:"wss",domainHost:a.domainHost,parse:a.parse,serialize:a.serialize},urn:{scheme:"urn",parse:function(e,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 o=`${r}:${t.nid||e.nid}`,i=c[o];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(),o=`${r}:${t.nid||n}`,i=c[o];i&&(e=i.serialize(e,t));const s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s},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},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromStream=t.fromBuffer=t.EndOfStreamError=t.fromFile=void 0;const n=r(1343),o=r(6452);var i=r(1456);Object.defineProperty(t,"fromFile",{enumerable:!0,get:function(){return i.fromFile}});var s=r(6452);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return s.EndOfStreamError}}),Object.defineProperty(t,"fromBuffer",{enumerable:!0,get:function(){return s.fromBuffer}}),t.fromStream=async function(e,t){if(t=t||{},e.path){const r=await n.stat(e.path);t.path=e.path,t.size=r.size}return o.fromStream(e,t)}},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),o=r(9029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?o._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${l}.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),o=r(4227),i=r(5765),s={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,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:i,parentSchema:s,data:a,keyword:c,it:l}=e;!function(e){const{opts:n,errSchemaPath:i}=l,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(l,e,n.strictTuples)}}(s),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=o.mergeEvaluated.items(i,r.length,l.items));const d=i.name("valid"),p=i.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(l,t)||(i.if(n._`${p} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},d))),e.ok(d))}))}t.validateTuple=a,t.default=s},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(208),o=r(9029),i=r(4227),s=r(6250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:l,schemaCode:d,it:p}=e;if(!a&&!c)return;const u=t.let("valid"),m=l.items?(0,n.getSchemaTypes)(l.items):[];function f(i,s){const a=t.name("item"),c=(0,n.checkDataTypes)(m,a,p.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(a,o._`${r}[${i}]`),t.if(c,o._`continue`),m.length>1&&t.if(o._`typeof ${a} == "string"`,o._`${a} += "_"`),t.if(o._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(s,o._`${l}[${a}]`),e.error(),t.assign(u,!1).break()})).code(o._`${l}[${a}] = ${i}`)}))}function h(n,a){const c=(0,i.useFunc)(t,s.default),l=t.name("outer");t.label(l).for(o._`;${n}--;`,(()=>t.for(o._`${a} = ${n}; ${a}--;`,(()=>t.if(o._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(u,!1).break(l)}))))))}e.block$data(u,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(u,!0),t.if(o._`${n} > 1`,(()=>(m.length>0&&!m.some((e=>"object"===e||"array"===e))?f:h)(n,i)))}),o._`${d} === 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 o=n&&n.stringify||t;if("object"==typeof e&&null!==e){var i=r.length+1;if(1===i)return e;var s=new Array(i);s[0]=o(e);for(var a=1;a<i;a++)s[a]=o(r[a]);return s.join(" ")}if("string"!=typeof e)return e;var c=r.length;if(0===c)return e;for(var l="",d=0,p=-1,u=e&&e.length||0,m=0;m<u;){if(37===e.charCodeAt(m)&&m+1<u){switch(p=p>-1?p:0,e.charCodeAt(m+1)){case 100:case 102:if(d>=c)break;if(null==r[d])break;p<m&&(l+=e.slice(p,m)),l+=Number(r[d]),p=m+2,m++;break;case 105:if(d>=c)break;if(null==r[d])break;p<m&&(l+=e.slice(p,m)),l+=Math.floor(Number(r[d])),p=m+2,m++;break;case 79:case 111:case 106:if(d>=c)break;if(void 0===r[d])break;p<m&&(l+=e.slice(p,m));var f=typeof r[d];if("string"===f){l+="'"+r[d]+"'",p=m+2,m++;break}if("function"===f){l+=r[d].name||"<anonymous>",p=m+2,m++;break}l+=o(r[d]),p=m+2,m++;break;case 115:if(d>=c)break;p<m&&(l+=e.slice(p,m)),l+=String(r[d]),p=m+2,m++;break;case 37:p<m&&(l+=e.slice(p,m)),l+="%",p=m+2,m++,d--}++d}++m}return-1===p?e:(p<u&&(l+=e.slice(p)),l)}},1027:(e,t,r)=>{"use strict";r.d(t,{GN:()=>o,Ge:()=>i,u3:()=>n});class n{getAccessToken(){throw new Error("getAccessToken() doit être implémenté")}setAccessToken(e){throw new Error("setAccessToken() doit être implémenté")}getRefreshToken(){throw new Error("getRefreshToken() doit être implémenté")}setRefreshToken(e){throw new Error("setRefreshToken() doit être implémenté")}clear(){throw new Error("clear() doit être implémenté")}}class o extends n{constructor(){super(),this._accessToken=null,this._refreshToken=null}getAccessToken(){return this._accessToken}setAccessToken(e){this._accessToken=e}getRefreshToken(){return this._refreshToken}setRefreshToken(e){this._refreshToken=e}clear(){this._accessToken=null,this._refreshToken=null}}class i extends n{constructor(e="cocolight"){super(),this.prefix=e}getAccessToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_accessToken`):null}setAccessToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_accessToken`,e)}getRefreshToken(){return"undefined"!=typeof localStorage?localStorage.getItem(`${this.prefix}_refreshToken`):null}setRefreshToken(e){"undefined"!=typeof localStorage&&localStorage.setItem(`${this.prefix}_refreshToken`,e)}clear(){"undefined"!=typeof localStorage&&(localStorage.removeItem(`${this.prefix}_accessToken`),localStorage.removeItem(`${this.prefix}_refreshToken`))}}},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),o={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:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=s(i,"then"),c=s(i,"else");if(!a&&!c)return;const l=t.let("valid",!0),d=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(d,p("then",r),p("else",r))}else a?t.if(d,p("then")):t.if((0,n.not)(d),p("else"));function p(r,o){return()=>{const i=e.subschema({keyword:r},d);t.assign(l,d),e.mergeValidEvaluated(i,l),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},1343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readFile=t.writeFileSync=t.writeFile=t.read=t.open=t.close=t.stat=t.createReadStream=t.pathExists=void 0;const n=r(4428);t.pathExists=n.existsSync,t.createReadStream=n.createReadStream,t.stat=async function(e){return new Promise(((t,r)=>{n.stat(e,((e,n)=>{e?r(e):t(n)}))}))},t.close=async function(e){return new Promise(((t,r)=>{n.close(e,(e=>{e?r(e):t()}))}))},t.open=async function(e,t){return new Promise(((r,o)=>{n.open(e,t,((e,t)=>{e?o(e):r(t)}))}))},t.read=async function(e,t,r,o,i){return new Promise(((s,a)=>{n.read(e,t,r,o,i,((e,t,r)=>{e?a(e):s({bytesRead:t,buffer:r})}))}))},t.writeFile=async function(e,t){return new Promise(((r,o)=>{n.writeFile(e,t,(e=>{e?o(e):r()}))}))},t.writeFileSync=function(e,t){n.writeFileSync(e,t)},t.readFile=async function(e){return new Promise(((t,r)=>{n.readFile(e,((e,n)=>{e?r(e):t(n)}))}))}},1456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromFile=t.FileTokenizer=void 0;const n=r(8632),o=r(8705),i=r(1343);class s extends n.AbstractTokenizer{constructor(e,t){super(t),this.fd=e}async readBuffer(e,t){const r=this.normalizeOptions(e,t);this.position=r.position;const n=await i.read(this.fd,e,r.offset,r.length,r.position);if(this.position+=n.bytesRead,n.bytesRead<r.length&&(!t||!t.mayBeLess))throw new o.EndOfStreamError;return n.bytesRead}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),n=await i.read(this.fd,e,r.offset,r.length,r.position);if(!r.mayBeLess&&n.bytesRead<r.length)throw new o.EndOfStreamError;return n.bytesRead}async close(){return i.close(this.fd)}}t.FileTokenizer=s,t.fromFile=async function(e){const t=await i.stat(e);if(!t.isFile)throw new Error(`File not a file: ${e}`);const r=await i.open(e,"r");return new s(r,{path:e,size:t.size})}},1510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;const n=r(5523),o=r(8122);var i=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.StreamReader=class{constructor(e){if(this.s=e,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",(()=>this.reject(new n.EndOfStreamError))),this.s.once("error",(e=>this.reject(e))),this.s.once("close",(()=>this.reject(new Error("Stream closed"))))}async peek(e,t,r){const n=await this.read(e,t,r);return this.peekQueue.push(e.subarray(t,t+n)),n}async read(e,t,r){if(0===r)return 0;if(0===this.peekQueue.length&&this.endOfStream)throw new n.EndOfStreamError;let o=r,i=0;for(;this.peekQueue.length>0&&o>0;){const r=this.peekQueue.pop();if(!r)throw new Error("peekData should be defined");const n=Math.min(r.length,o);e.set(r.subarray(0,n),t+i),i+=n,o-=n,n<r.length&&this.peekQueue.push(r.subarray(n))}for(;o>0&&!this.endOfStream;){const r=Math.min(o,1048576),n=await this.readFromStream(e,t+i,r);if(i+=n,n<r)break;o-=n}return i}async readFromStream(e,t,r){const n=this.s.read(r);if(n)return e.set(n,t),n.length;{const n={buffer:e,offset:t,length:r,deferred:new o.Deferred};return this.deferred=n.deferred,this.s.once("readable",(()=>{this.readDeferred(n)})),n.deferred.promise}}readDeferred(e){const t=this.s.read(e.length);t?(e.buffer.set(t,e.offset),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",(()=>{this.readDeferred(e)}))}reject(e){this.endOfStream=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}}},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 o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof 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 o(r)}t._Code=o,t.nil=new o(""),t._=i;const s=new o("+");function a(e,...t){const r=[d(e[0])];let n=0;for(;n<t.length;)r.push(s),c(r,t[n]),r.push(s,d(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new o(r)}function c(e,t){var r;t instanceof o?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:d(Array.isArray(r)?r.join(","):r))}function l(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 d(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 o(d(e))},t.safeStringify=d,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):i`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new o(e.toString())}},1664:e=>{"use strict";e.exports={extensions:["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd"]}},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,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},2023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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=o},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),o=r(3693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.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),o=r(208),i=r(7887),s=r(208),a=r(7870),c=r(3673),l=r(4495),d=r(9029),p=r(2023),u=r(6939),m=r(4227),f=r(8708);function h({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,d._`${p.default.data}, ${p.default.valCxt}`,n.$async,(()=>{e.code(d._`"use strict"; ${y(r,o)}`),function(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,d._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,d._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,d._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,d._`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,d._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,d._`""`),e.var(p.default.parentData,d._`undefined`),e.var(p.default.parentDataProperty,d._`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,d._`{}`)}))}(e,o),e.code(i)})):e.func(t,d._`${p.default.data}, ${function(e){return d._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?d._`, ${p.default.dynamicAnchors}={}`:d.nil}}={}`}(o)}`,n.$async,(()=>e.code(y(r,o)).code(i)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?d._`/*# sourceURL=${r} */`:d.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 w(e){return"boolean"!=typeof e.schema}function _(e){(0,m.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return E(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);E(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(d._`${p.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=d.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(d._`${p.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function E(e,t,r,n){const{gen:o,schema:a,data:c,allErrors:l,opts:u,self:f}=e,{RULES:h}=f;function y(m){(0,i.shouldUseGroup)(a,m)&&(m.type?(o.if((0,s.checkDataType)(m.type,c,u.strictNumbers)),T(e,m),1===t.length&&t[0]===m.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):T(e,m),l||o.if(d._`${p.default.errors} === ${n||0}`))}!a.$ref||!u.ignoreKeywordsWithRef&&(0,m.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=>{S(e.dataTypes,t)||$(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)S(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&$(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 o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&$(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of h.rules)y(e);y(h.post)}))):o.block((()=>P(e,"$ref",h.all.$ref.definition)))}function T(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function $(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){w(e)&&(_(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&v(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,m.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(p.default.vErrors,null),n.let(p.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",d._`${r}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),b(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(d._`${p.default.errors} === 0`,(()=>t.return(p.default.data)),(()=>t.throw(d._`new ${o}(${p.default.vErrors})`))):(t.assign(d._`${n}.errors`,p.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof d.Name&&e.assign(d._`${t}.props`,r),n instanceof d.Name&&e.assign(d._`${t}.items`,n)}(e),t.return(d._`${p.default.errors} === 0`))}(e)}))}(e):h(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class O{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,m.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",k(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",p.default.errors))}result(e,t,r){this.failResult((0,d.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,d.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(d._`${t} !== undefined && (${(0,d.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?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.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=d.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if((0,d.or)(d._`${n} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return d._`${(0,s.checkDataTypes)(e,t,o.opts.strictNumbers,s.DataType.Wrong)}`}return d.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return d._`!${r}(${t})`}return d.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const o={...this.it,...r,items:void 0,props:void 0};return function(e,t){w(e)&&(_(e),g(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&v(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",p.default.errors);b(e,i),n.var(t,d._`${i} === ${p.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=m.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=m.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,d.Name))),!0}}function P(e,t,r,n){const o=new O(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,c.funcKeywordCode)(o,r):"macro"in r?(0,c.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(o,r)}t.KeywordCxt=O;const x=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function k(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return p.default.rootData;if("/"===e[0]){if(!x.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=p.default.rootData}else{const s=A.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(o=s[2],"#"===o){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(i=r[t-a],!o)return i}let s=i;const a=o.split("/");for(const e of a)e&&(i=d._`${i}${(0,d.getProperty)((0,m.unescapeJsonPointer)(e))}`,s=d._`${s} && ${i}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=k},2661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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:s,it:a}=e;let c,l;const{minContains:d,maxContains:p}=i;a.opts.next?(c=void 0===d?1:d,l=p):c=1;const u=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,o.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,o.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(a,r)){let t=n._`${u} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${u} <= ${l}`),void e.pass(t)}a.items=!0;const m=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(m,!1).break())),1===c?t.assign(m,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(m,!0))))}(r)))))}function h(r,n){t.forRange("i",0,u,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?h(m,(()=>t.if(m,(()=>t.break())))):0===c?(t.let(m,!0),void 0!==l&&t.if(n._`${s}.length > 0`,f)):(t.let(m,!1),f()),e.result(m,(()=>e.reset()))}};t.default=i},2808:e=>{for(var t=Math.floor(16777215*Math.random()),r=d.index=parseInt(16777215*Math.random(),10),n=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,o=(()=>{try{return _Buffer}catch(e){try{return Buffer}catch(e){return null}}})(),i=function(e){return!(null==e||!e.constructor||"function"!=typeof e.constructor.isBuffer||!e.constructor.isBuffer(e))},s=[],a=0;a<256;a++)s[a]=(a<=15?"0":"")+a.toString(16);var c=new RegExp("^[0-9a-fA-F]{24}$"),l=[];for(a=0;a<10;)l[48+a]=a++;for(;a<16;)l[55+a]=l[87+a]=a++;function d(e){if(!(this instanceof d))return new d(e);if(e&&(e instanceof d||"ObjectID"===e._bsontype))return e;if(this._bsontype="ObjectID",null!=e&&"number"!=typeof e){var t=d.isValid(e);if(!t&&null!=e)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(t&&"string"==typeof e&&24===e.length)return d.createFromHexString(e);if(null==e||12!==e.length){if(null!=e&&"function"==typeof e.toHexString)return e;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=e}else this.id=this.generate(e)}e.exports=d,d.default=d,d.createFromTime=function(e){return new d((8===(t=(t=e=parseInt(e,10)%4294967295).toString(16)).length?t:"00000000".substring(t.length,8)+t)+"0000000000000000");var t},d.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var t="",r=0;r<24;)t+=String.fromCharCode(l[e.charCodeAt(r++)]<<4|l[e.charCodeAt(r++)]);return new d(t)},d.isValid=function(e){return null!=e&&("number"==typeof e||("string"==typeof e?12===e.length||24===e.length&&c.test(e):e instanceof d||(i(e)?d.isValid(e.toString("hex")):!("function"!=typeof e.toHexString||!o||!(e.id instanceof o||"string"==typeof e.id))&&(12===e.id.length||24===e.id.length&&c.test(e.id)))))},d.prototype={constructor:d,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var e="",t=0;t<this.id.length;t++)e+=s[this.id.charCodeAt(t)];return e},equals:function(e){return e instanceof d?this.toString()===e.toString():"string"==typeof e&&d.isValid(e)&&12===e.length&&i(this.id)?e===this.id.toString("binary"):"string"==typeof e&&d.isValid(e)&&24===e.length?e.toLowerCase()===this.toHexString():"string"==typeof e&&d.isValid(e)&&12===e.length?e===this.id:!(null==e||!(e instanceof d||e.toHexString))&&e.toHexString()===this.toHexString()},getTimestamp:function(){var e,t=new Date;return e=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(1e3*Math.floor(e)),t},generate:function(e){"number"!=typeof e&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%4294967295;var o=r=(r+1)%16777215;return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e,t>>16&255,t>>8&255,255&t,n>>8&255,255&n,o>>16&255,o>>8&255,255&o)}};var p=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";d.prototype[p]=function(){return"ObjectID("+this+")"},d.prototype.toJSON=d.prototype.toHexString,d.prototype.toString=d.prototype.toHexString},3025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(9029),o=r(4227),i=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e},
|
|
6
6
|
missingProperty: ${o},
|
|
7
7
|
depsCount: ${t},
|
|
8
|
-
deps: ${r}}`};const s={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:o,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const l=t[c];if(0===l.length)continue;const d=(0,i.propertyInData)(r,o,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?r.if(d,(()=>{for(const t of l)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${d} && (${(0,i.checkMissingProp)(e,l,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const l in t)(0,o.alwaysValidSchema)(a,t[l])||(r.if((0,i.propertyInData)(r,n,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},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),o=r(6144),i=r(6653),s=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),o.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(s,a):s;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=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var d=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.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 m=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${o} === 0 || (${a} = ${r}/${o}, ${c}))`)}};t.default=o},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},3492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferTokenizer=void 0;const n=r(8705),o=r(8632);class i extends o.AbstractTokenizer{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e.length}async readBuffer(e,t){if(t&&t.position){if(t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=t.position}const r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),o=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&o<r.length)throw new n.EndOfStreamError;return e.set(this.uint8Array.subarray(r.position,r.position+o),r.offset),o}async close(){}}t.BufferTokenizer=i},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),o=r(2023),i=r(5765),s=r(8708);function a(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:s,it:a}=e,l=t.macro.call(a.self,i,s,a),d=c(r,o,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const u=r.name("valid");e.subschema({schema:l,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:d,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:l,keyword:d,schema:u,parentSchema:p,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const h=!m&&t.compile?t.compile.call(f.self,u,p,f):t.validate,y=c(l,d,h),g=l.let("valid");function w(r=(t.async?n._`await `:n.nil)){const s=f.opts.passContext?o.default.this:o.default.self,a=!("compile"in t&&!m||!1===t.schema);l.assign(g,n._`${r}${(0,i.callValidateCode)(e,y,s,a)}`,t.modifying)}function _(e){var r;l.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)w(),t.modifying&&a(e),_((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>w(n._`await `)),(t=>l.assign(g,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>l.assign(e,n._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=n._`${y}.errors`;return l.assign(e,null),w(n.nil),e}();t.modifying&&a(e),_((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,s.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},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},3693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(4551),o=r(5765),i=r(9029),s=r(2023),a=r(3835),c=r(4227),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:s,schemaEnv:c,validateName:l,opts:p,self:m}=o,{root:f}=c;if(("#"===r||"#/"===r)&&s===f.baseId)return function(){if(c===f)return u(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return u(e,i._`${r}.validate`,f,f.$async)}();const h=a.resolveRef.call(m,f,s,r);if(void 0===h)throw new n.default(o.opts.uriResolver,s,r);return h instanceof a.SchemaEnv?function(t){const r=d(e,t);u(e,r,t,t.$async)}(h):function(n){const o=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(h)}};function d(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:l}=e,{allErrors:d,schemaEnv:u,opts:p}=l,m=p.passContext?s.default.this:i.nil;function f(e){const t=i._`${e}.errors`;a.assign(s.default.vErrors,i._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,i._`${s.default.vErrors}.length`)}function h(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(a,n.props,l.props));else{const t=a.var("props",i._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,i.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(a,n.items,l.items));else{const t=a.var("items",i._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.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,o.callValidateCode)(e,t,m)}`),h(t),d||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),f(e),d||a.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,m),(()=>h(t)),(()=>f(t)))}t.getValidate=d,t.callRef=u,t.default=l},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),o=r(3558),i=r(2023),s=r(6939),a=r(4227),c=r(2586);class l{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,s.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 d(e){const t=p.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:d}=this.opts,u=new n.CodeGen(this.scope,{es5:a,lines:l,ownProperties:d});let m;e.$async&&(m=u.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const f=u.scopeName("validate");e.validateName=f;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:f,ValidationError:m,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(f,{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:f,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,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.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 m(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||f.call(this,e,t)}function f(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let o=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return y.call(this,r,e);const i=(0,s.normalizeId)(n),a=this.refs[i]||this.schemas[i];if("string"==typeof a){const t=f.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||d.call(this,a),i===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,n)),new l({schema:t,schemaId:r,root:e,baseId:o})}return y.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=d,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let i=m.call(this,e,r);if(void 0===i){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;o&&(i=new l({schema:o,schemaId:s,root:e,baseId:t}))}return void 0!==i?e.refs[r]=u.call(this,i):void 0},t.getCompilingSchema=p,t.resolveSchema=f;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[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 o="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(n)&&o&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,o))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=f.call(this,n,e)}const{schemaId:c}=this.opts;return i=i||new l({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}')},3846:(e,t,r)=>{"use strict";const n=r(363),o=r(5707),i={fromFile:async function(e){const t=await n.fromFile(e);try{return await o.fromTokenizer(t)}finally{await t.close()}}};Object.assign(i,o),Object.defineProperty(i,"extensions",{get:()=>o.extensions}),Object.defineProperty(i,"mimeTypes",{get:()=>o.mimeTypes}),e.exports=i},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}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),o=r(4227),i=r(5765),s=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,o.alwaysValidSchema)(n,t)||(a?(0,s.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),o=r(9029),i=r(4227),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:c,it:l}=e,{opts:d}=l;if(!c&&0===r.length)return;const u=r.length>=d.loopRequired;if(l.allErrors?function(){if(u||c)e.block$data(o.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,s,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,d.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),d.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 "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(l,t,l.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,d.ownProperties),(()=>e.error()))}))}}};t.default=s},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,s),time:r(c(!0),l),"date-time":r(p(!0),m),"iso-time":r(c(),d),"iso-date-time":r(p(),f),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(v.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<=_&&e>=w}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:b},double:{type:"number",validate:b},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"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,m),"iso-time":r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"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,f),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)$/,o=[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],s=+t[3];return i>=1&&i<=12&&s>=1&&s<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:o[i])}function s(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],o=+r[2],i=+r[3],s=r[4],c="-"===r[5]?-1:1,l=+(r[6]||0),d=+(r[7]||0);if(l>23||d>59||e&&!s)return!1;if(n<=23&&o<=59&&i<60)return!0;const u=o-d*c,p=n-l*c-(u<0?1:0);return(23===p||-1===p)&&(59===u||-1===u)&&i<61}}function l(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 d(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 m(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 f(e,t){if(!e||!t)return;const[r,n]=e.split(u),[o,i]=t.split(u),a=s(r,o);return void 0!==a?a||l(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,w=-(2**31),_=2**31-1;function b(){return!0}const v=/[^\\]\\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 o=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(3558),s=r(4551),a=r(396),c=r(3835),l=r(9029),d=r(6939),u=r(208),p=r(4227),m=r(3837),f=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"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,r,n,o,i,s,a,c,l,d,u,p,m,y,g,w,_,b,v,E,T,S,$,O,P;const x=e.strict,k=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===k||void 0===k?1:k||0,I=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,N=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:x)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:x)||void 0===c||c,strictTypes:null!==(d=null!==(l=e.strictTypes)&&void 0!==l?l:x)&&void 0!==d?d:"log",strictTuples:null!==(p=null!==(u=e.strictTuples)&&void 0!==u?u:x)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(m=e.strictRequired)&&void 0!==m?m:x)&&void 0!==y&&y,code:e.code?{...e.code,optimize:A,regExp:I}:{optimize:A,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(w=e.loopEnum)&&void 0!==w?w:200,meta:null===(_=e.meta)||void 0===_||_,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(v=e.inlineRefs)||void 0===v||v,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===(T=e.addUsedSchema)||void 0===T||T,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===($=e.validateFormats)||void 0===$||$,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:N}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return x;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)(),E.call(this,w,e,"NOT SUPPORTED"),E.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=P.call(this),e.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=m;"id"===r&&(n={...m},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 o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(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 s.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 l.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=T.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=T.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,d.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(A.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>I.call(this,e))),this;j.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=>I.call(this,e,n):e=>n.type.forEach((t=>I.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=D(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:s}=this.opts;if("object"==typeof e)i=e[s];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,d.normalizeId)(i||r);const l=d.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),o&&!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(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function T(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){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 $(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(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 P(){const e={...this.opts};for(const t of y)delete e[t];return e}v.ValidationError=i.default,v.MissingRefError=s.default,t.default=v;const x={log(){},warn(){},error(){}},k=/^[a-z_$][a-z0-9_$:-]*$/i;function A(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 I(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let s=o?i.post:i.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?N.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function N(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 j(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,C]}}},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),o=r(1520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||f(e,`unknown keyword: "${r}"`)}function s(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 l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(i,s,a,c)=>{const l=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(i,s,a):t(i,s,a),a):s instanceof n.Name?(t(i,a,s),s):r(s,a);return c!==n.Name||l instanceof n.Name?l:o(i,l)}}function d(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),!s(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,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)(o)}`},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:l({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:d}),items:l({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=d,t.setEvaluated=u;const p={};var m;function f(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 o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(m||(t.Type=m={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===m.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},4266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnsiStringType=t.StringType=t.BufferType=t.Uint8ArrayType=t.IgnoreType=t.Float80_LE=t.Float80_BE=t.Float64_LE=t.Float64_BE=t.Float32_LE=t.Float32_BE=t.Float16_LE=t.Float16_BE=t.INT64_BE=t.UINT64_BE=t.INT64_LE=t.UINT64_LE=t.INT32_LE=t.INT32_BE=t.INT24_BE=t.INT24_LE=t.INT16_LE=t.INT16_BE=t.INT8=t.UINT32_BE=t.UINT32_LE=t.UINT24_BE=t.UINT24_LE=t.UINT16_BE=t.UINT16_LE=t.UINT8=void 0;const n=r(251);function o(e){return new DataView(e.buffer,e.byteOffset)}t.UINT8={len:1,get:(e,t)=>o(e).getUint8(t),put:(e,t,r)=>(o(e).setUint8(t,r),t+1)},t.UINT16_LE={len:2,get:(e,t)=>o(e).getUint16(t,!0),put:(e,t,r)=>(o(e).setUint16(t,r,!0),t+2)},t.UINT16_BE={len:2,get:(e,t)=>o(e).getUint16(t),put:(e,t,r)=>(o(e).setUint16(t,r),t+2)},t.UINT24_LE={len:3,get(e,t){const r=o(e);return r.getUint8(t)+(r.getUint16(t+1,!0)<<8)},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.UINT24_BE={len:3,get(e,t){const r=o(e);return(r.getUint16(t)<<8)+r.getUint8(t+2)},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.UINT32_LE={len:4,get:(e,t)=>o(e).getUint32(t,!0),put:(e,t,r)=>(o(e).setUint32(t,r,!0),t+4)},t.UINT32_BE={len:4,get:(e,t)=>o(e).getUint32(t),put:(e,t,r)=>(o(e).setUint32(t,r),t+4)},t.INT8={len:1,get:(e,t)=>o(e).getInt8(t),put:(e,t,r)=>(o(e).setInt8(t,r),t+1)},t.INT16_BE={len:2,get:(e,t)=>o(e).getInt16(t),put:(e,t,r)=>(o(e).setInt16(t,r),t+2)},t.INT16_LE={len:2,get:(e,t)=>o(e).getInt16(t,!0),put:(e,t,r)=>(o(e).setInt16(t,r,!0),t+2)},t.INT24_LE={len:3,get(e,r){const n=t.UINT24_LE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.INT24_BE={len:3,get(e,r){const n=t.UINT24_BE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.INT32_BE={len:4,get:(e,t)=>o(e).getInt32(t),put:(e,t,r)=>(o(e).setInt32(t,r),t+4)},t.INT32_LE={len:4,get:(e,t)=>o(e).getInt32(t,!0),put:(e,t,r)=>(o(e).setInt32(t,r,!0),t+4)},t.UINT64_LE={len:8,get:(e,t)=>o(e).getBigUint64(t,!0),put:(e,t,r)=>(o(e).setBigUint64(t,r,!0),t+8)},t.INT64_LE={len:8,get:(e,t)=>o(e).getBigInt64(t,!0),put:(e,t,r)=>(o(e).setBigInt64(t,r,!0),t+8)},t.UINT64_BE={len:8,get:(e,t)=>o(e).getBigUint64(t),put:(e,t,r)=>(o(e).setBigUint64(t,r),t+8)},t.INT64_BE={len:8,get:(e,t)=>o(e).getBigInt64(t),put:(e,t,r)=>(o(e).setBigInt64(t,r),t+8)},t.Float16_BE={len:2,get(e,t){return n.read(e,t,!1,10,this.len)},put(e,t,r){return n.write(e,r,t,!1,10,this.len),t+this.len}},t.Float16_LE={len:2,get(e,t){return n.read(e,t,!0,10,this.len)},put(e,t,r){return n.write(e,r,t,!0,10,this.len),t+this.len}},t.Float32_BE={len:4,get:(e,t)=>o(e).getFloat32(t),put:(e,t,r)=>(o(e).setFloat32(t,r),t+4)},t.Float32_LE={len:4,get:(e,t)=>o(e).getFloat32(t,!0),put:(e,t,r)=>(o(e).setFloat32(t,r,!0),t+4)},t.Float64_BE={len:8,get:(e,t)=>o(e).getFloat64(t),put:(e,t,r)=>(o(e).setFloat64(t,r),t+8)},t.Float64_LE={len:8,get:(e,t)=>o(e).getFloat64(t,!0),put:(e,t,r)=>(o(e).setFloat64(t,r,!0),t+8)},t.Float80_BE={len:10,get(e,t){return n.read(e,t,!1,63,this.len)},put(e,t,r){return n.write(e,r,t,!1,63,this.len),t+this.len}},t.Float80_LE={len:10,get(e,t){return n.read(e,t,!0,63,this.len)},put(e,t,r){return n.write(e,r,t,!0,63,this.len),t+this.len}},t.IgnoreType=class{constructor(e){this.len=e}get(e,t){}},t.Uint8ArrayType=class{constructor(e){this.len=e}get(e,t){return e.subarray(t,t+this.len)}},t.BufferType=class{constructor(e){this.len=e}get(e,t){return Buffer.from(e.subarray(t,t+this.len))}},t.StringType=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t){return Buffer.from(e).toString(this.encoding,t,t+this.len)}};class i{constructor(e){this.len=e}static decode(e,t,r){let n="";for(let o=t;o<r;++o)n+=i.codePointToString(i.singleByteDecoder(e[o]));return n}static inRange(e,t,r){return t<=e&&e<=r}static codePointToString(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(e){if(i.inRange(e,0,127))return e;const t=i.windows1252[e-128];if(null===t)throw Error("invaliding encoding");return t}get(e,t=0){return i.decode(e,t,t+this.len)}}t.AnsiStringType=i,i.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={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=o},4428:()=>{},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9029),o=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:s,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,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;d(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,o.getErrorPath)(r,i,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(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!==s&&(d(s instanceof n.Name?s:l.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6939);class o extends Error{constructor(e,t,r,o){super(o||`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=o},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,$data:i,schema:s,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:d,schemaEnv:u,self:p}=c;l.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),s=r.const("fDef",n._`${i}[${a}]`),c=r.let("fType"),d=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(d,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(d,s))),e.fail$data((0,n.or)(!1===l.strictSchema?n.nil:n._`${a} && !${d}`,function(){const e=u.$async?n._`(${s}.async ? await ${d}(${o}) : ${d}(${o}))`:n._`${d}(${o})`,r=n._`(typeof ${d} == "function" ? ${e} : ${d}.test(${o}))`;return n._`${d} && ${d} !== true && ${c} === ${t} && !${r}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${d}"`}p.logger.warn(e())}();if(!0===i)return;const[a,c,m]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(s)}`:void 0,o=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.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 ${m}(${o})`}return"function"==typeof c?n._`${m}(${o})`:n._`${m}.test(${o})`}())}())}};t.default=o},4834:(e,t,r)=>{"use strict";const{HEX:n}=r(4914),o=/^(?:(?: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(l(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(o)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function s(e,t=!1){let r="",o=!0;for(const t of e){if(void 0===n[t])return;"0"!==t&&!0===o&&(o=!1),o||(r+=t)}return t&&0===r.length&&(r="0"),r}function a(e){if(l(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],o=[];let i=!1,a=!1,c=!1;function l(){if(o.length){if(!1===i){const e=s(o);if(void 0===e)return r.error=!0,!1;n.push(e)}o.length=0}return!0}for(let s=0;s<e.length;s++){const d=e[s];if("["!==d&&"]"!==d)if(":"!==d)if("%"===d){if(!l())break;i=!0}else o.push(d);else{if(!0===a&&(c=!0),!l())break;if(t++,n.push(":"),t>7){r.error=!0;break}s-1>=0&&":"===e[s-1]&&(a=!0)}}return o.length&&(i?r.zone=o.join(""):c?n.push(o.join("")):n.push(s(o))),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 o=e.length;for(let i=0;i<o;i++){const s=e[i];"0"===s&&n?(i+1<=o&&e[i+1]===t||i+1===o)&&(r+=s,n=!1):(n=s===t,r+=s)}return r}function l(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const d=/^\.\.?\//u,u=/^\/\.(?:\/|$)/u,p=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\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(d))e=e.replace(d,"");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(m);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:s}},4874:(e,t,r)=>{"use strict";const n=r(793);e.exports=u;const o=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:w,wrapResponseSerializer:w,wrapErrorSerializer:w,req:g,res:g,err:h,errWithCause:h};function s(e,t){return"silent"===e?1/0:t.levels.values[e]}const a=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),l={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function d(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||o;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 w=e.level||"info",b=Object.create(r);b.log||(b.log=_),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:o[e]||o[l[e]||"log"]||_})),e[a]=n}(b,g,r),d({},b),Object.defineProperty(b,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(b,"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,v,b,"error"),p(this,v,b,"fatal"),p(this,v,b,"warn"),p(this,v,b,"info"),p(this,v,b,"debug"),p(this,v,b,"trace"),h.forEach((e=>{p(this,v,b,e)}))}});const v={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||_};function E(r,o,s){if(!o)throw new Error("missing bindings for child Pino");s=s||{},i&&o.serializers&&(s.serializers=o.serializers);const a=s.serializers;if(i&&a){var c=Object.assign({},n,a),l=!0===e.browser.serialize?Object.keys(c):i;delete o.serializers,m([o],l,c,this._stdErrSerialize)}function u(e){this._childLevel=1+(0|e._childLevel),this.bindings=o,c&&(this.serializers=c,this._serialize=l),t&&(this._logEvent=f([].concat(e._logEvent.bindings,o)))}u.prototype=this;const p=new u(this);return d(this,p),p.child=function(...e){return E.call(this,r,...e)},p.level=s.level||this.level,r.onChild(p),p}return b.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),b.level=w,b.setMaxListeners=b.getMaxListeners=b.emit=b.addListener=b.on=b.prependListener=b.once=b.prependOnceListener=b.removeListener=b.removeAllListeners=b.listeners=b.listenerCount=b.eventNames=b.write=b.flush=_,b.serializers=n,b._serialize=i,b._stdErrSerialize=c,b.child=function(...e){return E.call(this,v,...e)},t&&(b._logEvent=f()),b}function p(e,t,r,i){if(Object.defineProperty(e,i,{value:s(e.level,r)>s(i,r)?_:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===_){if(!t.transmit)return;const n=s(t.transmit.level||e.level,r);if(s(i,r)<n)return}e[i]=function(e,t,r,i){return c=e[a][i],function(){const a=t.timestamp(),l=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===o?o:this;for(var u=0;u<l.length;u++)l[u]=arguments[u];var p=!1;if(t.serialize&&(m(l,this._serialize,this.serializers,this._stdErrSerialize),p=!0),t.asObject||t.formatters?c.call(d,function(e,t,r,o,i){const{level:s,log:a=e=>e}=i.formatters||{},c=r.slice();let l=c[0];const d={};if(o&&(d.time=o),s){const r=s(t,e.levels.values[t]);Object.assign(d,r)}else d.level=e.levels.values[t];let u=1+(0|e._childLevel);if(u<1&&(u=1),null!==l&&"object"==typeof l){for(;u--&&"object"==typeof c[0];)Object.assign(d,c.shift());l=c.length?n(c.shift(),c):void 0}else"string"==typeof l&&(l=n(c.shift(),c));return void 0!==l&&(d[i.messageKey]=l),a(d)}(this,i,l,a,t)):c.apply(d,l),t.transmit){const n=t.transmit.level||e._level,o=s(n,r),c=s(i,r);if(c<o)return;!function(e,t,r,n=!1){const o=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,c=t.val,l=e._logEvent.bindings;n||m(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===l.indexOf(e)})),e._logEvent.level.label=s,e._logEvent.level.value=a,o(s,e._logEvent,c),e._logEvent=f(l)}(this,{ts:a,methodLevel:i,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,r)},l,p)}};var c}(e,t,r,i);const l=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!==l.length&&(e[i]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(l,e[i]))}function m(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=u.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o])&&t)for(const n in e[o])t.indexOf(n)>-1&&n in r&&(e[o][n]=r[n](e[o][n]))}function f(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?b:v}function g(){return{}}function w(e){return e}function _(){}function b(){return!1}function v(){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:b,epochTime:v,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),o=r(9029),i=r(4227),s=r(4227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:l}=e,{opts:d}=l,u=(0,n.allSchemaProperties)(r),p=u.filter((e=>(0,i.alwaysValidSchema)(l,r[e])));if(0===u.length||p.length===u.length&&(!l.opts.unevaluated||!0===l.props))return;const m=d.strictSchema&&!d.allowMatchingProperties&&c.properties,f=t.name("valid");!0===l.props||l.props instanceof o.Name||(l.props=(0,s.evaluatedPropsToName)(t,l.props));const{props:h}=l;function y(e){for(const t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:s.Type.Str},f),l.opts.unevaluated&&!0!==h?t.assign(o._`${h}[${i}]`,!0):n||l.allErrors||t.if((0,o.not)(f),(()=>t.break()))}))}))}!function(){for(const e of u)m&&y(e),l.allErrors?g(e):(t.var(f,!0),g(e),t.if(f))}()}};t.default=a},5354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(494),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9029),o=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)?s(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:i,data:s,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",n._`${s}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(c,i)){const i=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:o.Type.Num},i),c.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=s,t.default=i},5523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EndOfStreamError=t.defaultMessages=void 0,t.defaultMessages="End-Of-Stream";class r extends Error{constructor(){super(t.defaultMessages)}}t.EndOfStreamError=r},5707:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const Token=__webpack_require__(4266),strtok3=__webpack_require__(6452),{stringToBytes,tarHeaderChecksumMatches,uint32SyncSafeToken}=__webpack_require__(6760),supported=__webpack_require__(1664),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,r){r={offset:0,...r};for(const[n,o]of t.entries())if(r.mask){if(o!==(r.mask[n]&e[n+r.offset]))return!1}else if(o!==e[n+r.offset])return!1;return!0}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const r=(e,r)=>_check(t,e,r),n=(e,t)=>r(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(r([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),n("PS-Adobe-",{offset:2})&&n(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(n("ID3")){await e.ignore(6);const o=await e.readToken(uint32SyncSafeToken);return e.position+o>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(o),fromTokenizer(e))}if(n("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(n("FLIF"))return{ext:"flif",mime:"image/flif"};if(n("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(n("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(n("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(n("FORM"))return{ext:"aif",mime:"audio/aiff"};if(n("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(r([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(t,{length:30});const i={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(i.filename=await e.readToken(new Token.StringType(i.filenameLength,"utf-8")),await e.ignore(i.extraFieldLength),"META-INF/mozilla.rsa"===i.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(i.filename.endsWith(".rels")||i.filename.endsWith(".xml"))switch(i.filename.split("/")[0]){case"_rels":default:break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}if(i.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(i.filename.startsWith("3D/")&&i.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if("mimetype"===i.filename&&i.compressedSize===i.uncompressedSize)switch(await e.readToken(new Token.StringType(i.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}if(0===i.compressedSize){let s=-1;for(;s<0&&e.position<e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),s=t.indexOf("504B0304",0,"hex"),await e.ignore(s>=0?s:t.length)}else await e.ignore(i.compressedSize)}}catch(a){if(!(a instanceof strtok3.EndOfStreamError))throw a}return{ext:"zip",mime:"application/zip"}}if(n("OggS")){await e.ignore(28);const c=Buffer.alloc(8);return await e.readBuffer(c),_check(c,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/opus"}:_check(c,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(c,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(c,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(c,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(c,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(n("ftyp",{offset:4})&&96&t[8]){const l=t.toString("binary",8,12).replace("\0"," ").trim();switch(l){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return l.startsWith("3g")?l.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(n("MThd"))return{ext:"mid",mime:"audio/midi"};if(n("wOFF")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(n("wOF2")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(n("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(n("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(n("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(n("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(n("%PDF")){await e.ignore(1350);const d=10485760,u=Buffer.alloc(Math.min(d,e.fileInfo.size));return await e.readBuffer(u,{mayBeLess:!0}),u.includes(Buffer.from("AIPrivateData"))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"}}if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([73,73,42,0]))return n("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:r([28,0,254,0],{offset:8})||r([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:r([8,0,0,0],{offset:4})&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(r([16,251,134,1],{offset:4})||r([8,0,0,0],{offset:4}))&&r([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(n("MAC "))return{ext:"ape",mime:"audio/ape"};if(r([26,69,223,163])){async function p(){const t=await e.peekNumber(Token.UINT8);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const o=Buffer.alloc(n+1);return await e.readBuffer(o),o}async function m(){const e=await p(),t=await p();t[0]^=128>>t.length-1;const r=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-r,r)}}async function f(t,r){for(;r>0;){const t=await m();if(17026===t.id)return e.readToken(new Token.StringType(t.len,"utf-8"));await e.ignore(t.len),--r}}const h=await m();switch(await f(0,h.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(n("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(n("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(n("MSCF")||n("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(r([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(n("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(n("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(n("IMPM"))return{ext:"it",mime:"audio/x-it"};if(n("-lh0-",{offset:2})||n("-lh1-",{offset:2})||n("-lh2-",{offset:2})||n("-lh3-",{offset:2})||n("-lh4-",{offset:2})||n("-lh5-",{offset:2})||n("-lh6-",{offset:2})||n("-lh7-",{offset:2})||n("-lzs-",{offset:2})||n("-lz4-",{offset:2})||n("-lz5-",{offset:2})||n("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(r([0,0,1,186])){if(r([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(r([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(n("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(n("solid "))return{ext:"stl",mime:"model/stl"};if(n("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(n("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new Token.StringType(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(r([137,80,78,71,13,10,26,10])){async function y(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,"binary"))}}await e.ignore(8);do{const g=await y();if(g.length<0)return;switch(g.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(g.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(r([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(r([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(n("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(r([48,38,178,117,142,102,207,17,166,217])){async function w(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Token.UINT64_LE))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const _=await w();let b=_.size-24;if(_check(_.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const v=Buffer.alloc(16);if(b-=await e.readBuffer(v),_check(v,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(_check(v,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(b)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((r([126,16,4])||r([126,24,4]))&&r([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(r([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(r([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(r([255,10])||r([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),n("BEGIN:")){if(n("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(n("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(n("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(n("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(n("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(r([4,0,0,0])&&t.length>=16){const E=t.readUInt32LE(12);if(E>12&&t.length>=E+16)try{const T=t.slice(16,E+16).toString();if(JSON.parse(T).files)return{ext:"asar",mime:"application/x-asar"}}catch(S){}}if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(n("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(r([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(n("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(t.length>=2&&r([255,224],{offset:0,mask:[255,224]})){if(r([16],{offset:1,mask:[22]}))return r([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(r([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const r=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(r);e.fileType=t}catch(e){reject(e)}resolve(t)}))})),fileType={fromStream,fromTokenizer,fromBuffer,stream};Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType},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),o=r(4227),i=r(2023),s=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 l(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(c(e,t,r))):i}function d(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(l(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(l(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${c(e,t,r)}`:i},t.noPropertyInData=l,t.allSchemaProperties=d,t.schemaProperties=function(e,t){return d(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:s,errorPath:a},it:c},l,d,u){const p=u?n._`${e}, ${t}, ${o}${s}`:t,m=[[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&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const f=n._`${p}, ${r.object(...m)}`;return d!==n.nil?n._`${l}.call(${d}, ${f})`:n._`${l}(${f})`};const u=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,o);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?u:(0,s.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:s}=e,a=t.name("valid");if(s.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(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const s=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,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),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};t.default=o},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={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:s,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || 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 o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=o,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var n,o,i=(o=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,o,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}}(n,o)||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,o)||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.")}()),s=i[0],a=i[1];return e[s]=a,e}),{})},t.isArguments=function(e){return null!=e&&o(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)},o=0;o<64;o++)r[n(o)]=o;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))},s={encode:function(e){if("string"==typeof e){var t=e;e=i(t.length);for(var r=0;r<t.length;r++){var o=t.charCodeAt(r);if(o>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=o}}for(var s=[],a=null,c=null,l=null,d=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,l=(15&e[u])<<2;break;case 2:l|=e[u]>>6&3,d=63&e[u],s.push(n(a)),s.push(n(c)),s.push(n(l)),s.push(n(d)),a=null,c=null,l=null,d=null}return null!=a&&(s.push(n(a)),s.push(n(c)),null==l?s.push("="):s.push(n(l)),null==d&&s.push("=")),s.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,o=i(t),s=null,a=null,c=null,l=0,d=0;d<e.length;d++){var u="="===(n=e.charAt(d))?-1:r[n];switch(d%4){case 0:if(u<0)throw new Error("invalid base64 string");s=u<<2;break;case 1:if(u<0)throw new Error("invalid base64 string");s|=u>>4,o[l++]=s,a=(15&u)<<4;break;case 2:u>=0&&(a|=u>>2,o[l++]=a,c=(3&u)<<6);break;case 3:u>=0&&(o[l++]=c|u)}}return o},newBinary:i};t.Base64=s},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 o=function e(t,o,i,s,a){var c=o[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 l,d=s+i,u=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var p=c.length,m=0;m<p;m+=1)u[m]=e(m,c,i,d,a)||"null";return l=0===u.length?"[]":d?"[\n"+d+u.join(",\n"+d)+"\n"+s+"]":"["+u.join(",")+"]"}var f=Object.keys(c);return a&&(f=f.sort()),f.forEach((function(t){(l=e(t,c,i,d,a))&&u.push(n(t)+(d?": ":":")+l)})),l=0===u.length?"{}":d?"{\n"+d+u.join(",\n"+d)+"\n"+s+"}":"{"+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 o("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}var o={};!function(){var e=o,t=n(2).Base64,r=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var i=n(1),s={};e.EJSON=s;var a=new Map;s.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]=s.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,i.keysOf)(e.$escape).forEach((function(r){t[r]=s.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 s._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)}))}}];s._isCustomType=function(e){return e&&(0,i.isFunction)(e.toJSONValue)&&(0,i.isFunction)(e.typeName)&&a.has(e.typeName())},s._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,i.convertMapToObject)(a)},s._getConverters=function(){return c};var l=function(e){for(var t=0;t<c.length;t++){var r=c[t];if(r.matchObject(e))return r.toJSONValue(e)}},d=function e(t){if(null===t)return null;var r=l(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 o=l(n);o?t[r]=o:e(n)}})),t):t};s._adjustTypesToJSONValue=d,s.toJSONValue=function(e){var t=l(e);if(void 0!==t)return t;var r=e;return(0,i.isObject)(e)&&(r=s.clone(e),d(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 o=u(n);if(n!==o)return void(t[r]=o);e(n)}})),t):t};s._adjustTypesFromJSONValue=p,s.fromJSONValue=function(e){var t=u(e);return t===e&&(0,i.isObject)(e)&&(t=s.clone(e),p(t)),t},s.stringify=(0,i.handleError)((function(e,t){var r=s.toJSONValue(e);return t&&(t.canonical||t.indent)?n(4)(r,t):JSON.stringify(r)})),s.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return s.fromJSONValue(JSON.parse(e))},s.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},s.equals=function(e,t,r){var n,o=!(!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(s.isBinary(e)&&s.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),l=Array.isArray(t);if(c!==l)return!1;if(c&&l){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!s.equals(e[n],t[n],r))return!1;return!0}switch(s._isCustomType(e)+s._isCustomType(t)){case 1:return!1;case 2:return s.equals(s.toJSONValue(e),s.toJSONValue(t))}var d=(0,i.keysOf)(e),u=(0,i.keysOf)(t);return o?(n=0,a=d.every((function(o){return!(n>=u.length||o!==u[n]||!s.equals(e[o],t[u[n]],r)||(n++,0))}))):(n=0,a=d.every((function(o){return!!(0,i.hasOwn)(t,o)&&!!s.equals(e[o],t[o],r)&&(n++,!0)}))),a&&n===u.length},s.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(s.isBinary(e)){t=s.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(s.clone):(0,i.isArguments)(e)?Array.from(e).map(s.clone):(0,i.isFunction)(e.clone)?e.clone():s._isCustomType(e)?s.fromJSONValue(s.clone(s.toJSONValue(e)),!0):(t={},(0,i.keysOf)(e).forEach((function(r){t[r]=s.clone(e[r])})),t)},s.newBinary=t.newBinary}(),e.exports=o.EJSON}()},6066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadStreamTokenizer=void 0;const n=r(8632),o=r(8705);class i extends n.AbstractTokenizer{constructor(e,t){super(t),this.streamReader=new o.StreamReader(e)}async getFileInfo(){return this.fileInfo}async readBuffer(e,t){const r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===r.length)return 0;const i=await this.streamReader.read(e,r.offset,r.length);if(this.position+=i,(!t||!t.mayBeLess)&&i<r.length)throw new o.EndOfStreamError;return i}async peekBuffer(e,t){const r=this.normalizeOptions(e,t);let n=0;if(r.position){const t=r.position-this.position;if(t>0){const o=new Uint8Array(r.length+t);return n=await this.peekBuffer(o,{mayBeLess:r.mayBeLess}),e.set(o.subarray(t),r.offset),n-t}if(t<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e,r.offset,r.length)}catch(e){if(t&&t.mayBeLess&&e instanceof o.EndOfStreamError)return 0;throw e}if(!r.mayBeLess&&n<r.length)throw new o.EndOfStreamError}return n}async ignore(e){const t=Math.min(256e3,e),r=new Uint8Array(t);let n=0;for(;n<e;){const o=e-n,i=await this.readBuffer(r,{length:Math.min(t,o)});if(i<0)return i;n+=i}return n}}t.ReadStreamTokenizer=i},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2128),o=r(7060),i=r(6378),s=r(7532),a=r(9857),c=[n.default,o.default,(0,i.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.discriminator)return;const a=r,c=t.let("valid",!1),l=t.let("passing",null),d=t.name("_valid");e.setParams({passing:l}),t.block((function(){a.forEach(((r,i)=>{let a;(0,o.alwaysValidSchema)(s,r)?t.var(d,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},d),i>0&&t.if(n._`${d} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${i}]`).else(),t.if(d,(()=>{t.assign(c,!0),t.assign(l,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),o=r(5354),i=r(494),s=r(3966),a=r(2661),c=r(3025),l=r(9713),d=r(8660),u=r(117),p=r(5333),m=r(7923),f=r(6505),h=r(6163),y=r(5844),g=r(1239),w=r(4426);t.default=function(e=!1){const t=[m.default,f.default,h.default,y.default,g.default,w.default,l.default,d.default,c.default,u.default,p.default];return e?t.push(o.default,s.default):t.push(n.default,i.default),t.push(a.default),t}},6452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBuffer=t.fromStream=t.EndOfStreamError=void 0;const n=r(6066),o=r(3492);var i=r(8705);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.fromStream=function(e,t){return t=t||{},new n.ReadStreamTokenizer(e,t)},t.fromBuffer=function(e,t){return new o.BufferTokenizer(e,t)}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(3282),o=r(9029),i=o.operators,s={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})=>o.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${s[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:i,keyword:a,it:c}=e,{opts:l,self:d}=c;if(!l.validateFormats)return;const u=new n.KeywordCxt(c,d.RULES.all.format.definition,"format");function p(e){return o._`${e}.compare(${r}, ${i}) ${s[a].fail} 0`}u.$data?function(){const r=t.scopeValue("formats",{ref:d.formats,code:l.code.formats}),n=t.const("fmt",o._`${r}[${u.schemaCode}]`);e.fail$data((0,o.or)(o._`typeof ${n} != "object"`,o._`${n} instanceof RegExp`,o._`typeof ${n}.compare != "function"`,p(n)))}():function(){const r=u.schema,n=d.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:l.code.formats?o._`${l.code.formats}${(0,o.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),o=r(7652),i=r(3835),s=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:l,it:d}=e,{oneOf:u}=l;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=c.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const m=t.let("valid",!1),f=t.const("tag",n._`${r}${(0,n.getProperty)(p)}`);function h(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${f} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!0;for(let t=0;t<u.length;t++){let l=u[t];if((null==l?void 0:l.$ref)&&!(0,a.schemaHasRulesButRef)(l,d.self.RULES)){const e=l.$ref;if(l=i.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e),l instanceof i.SchemaEnv&&(l=l.schema),void 0===l)throw new s.default(d.opts.uriResolver,d.baseId,e)}const m=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[p];if("object"!=typeof m)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);n=n&&(r||o(l)),c(m,t)}if(!n)throw new Error(`discriminator: "${p}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(p)}function c(e,t){if(e.const)m(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const r of e.enum)m(r,t)}}function m(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._`${f} === ${e}`),t.assign(m,h(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:f,tagName:p}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:f,tagName:p}))),e.ok(m)}};t.default=c},6760:(e,t)=>{"use strict";t.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),t.tarHeaderChecksumMatches=(e,t=0)=>{const r=parseInt(e.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(r))return!1;let n=256;for(let r=t;r<t+148;r++)n+=e[r];for(let r=t+156;r<t+512;r++)n+=e[r];return r===n},t.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}},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),o=r(2017),i=r(7106),s=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&&l(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 l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function d(e,t="",r){!1!==r&&(t=m(t));const n=e.parse(t);return u(e,n)}function u(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=u;const p=/#\/?$/;function m(e){return e?e.replace(p,""):""}t.normalizeId=m,t.resolveUrl=function(e,t,r){return r=m(r),e.resolve(t,r)};const f=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=m(e[r]||t),a={"":s},c=d(n,s,!1),l={},u=new Set;return i(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const i=c+t;let s=a[o];function d(t){const r=this.opts.uriResolver.resolve;if(t=m(s?r(s,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!==m(i)&&("#"===t[0]?(p(e,l[t],t),l[t]=e):this.refs[t]=i),t}function y(e){if("string"==typeof e){if(!f.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=d.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=s})),l;function p(e,t,r){if(void 0!==t&&!o(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 o=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 o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),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,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=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 l(e,t,r,n){var o,i,s,l;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),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,l=d,console&&console.warn&&console.warn(l)}return e}function d(){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},o=d.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]: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}(o):f(o,o.length)}function m(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 f(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 o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=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||o(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 o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,d=f(c,l);for(r=0;r<l;++r)n(d[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(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,o,i,s;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(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||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 o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);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):m.call(e,t)},i.prototype.listenerCount=m,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),o=r(3439),i=r(7307),s=r(422),a=r(4486),c=r(4003),l=r(1163),d=r(617),u=r(7935),p=r(8643),m=[n.default,o.default,i.default,s.default,a.default,c.default,l.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,p.default];t.default=m},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,o,i,s,a,c,l,d,u){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in n(i,s,a,c,l,d,u),i){var m=i[p];if(Array.isArray(m)){if(p in t.arrayKeywords)for(var f=0;f<m.length;f++)r(e,n,o,m[f],s+"/"+p+"/"+f,a,s,p,i,f)}else if(p in t.propsKeywords){if(m&&"object"==typeof m)for(var h in m)r(e,n,o,m[h],s+"/"+p+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,i,h)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,o,m,s+"/"+p,a,s,p,i)}o(i,s,a,c,l,d,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),o=r(4227),i=r(3853),s={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:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${l} ${c} ${s}`)}};t.default=s},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 o 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 s{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=s;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 s{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:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(i);if(e)return e}else s=this._values[o]=new Map;s.set(i,n);const a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,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,s={},a){let c=n.nil;for(const l in e){const d=e[l];if(!d)continue;const u=s[l]=s[l]||new Map;d.forEach((e=>{if(u.has(e))return;u.set(e,i.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new o(e);c=n._`${c}${s}${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),o=r(4227);function i(e,t,r){const{gen:i,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const l=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,o.checkStrictMode)(e,`default is ignored for: ${l}`);let d=n._`${l} === undefined`;"empty"===c.useDefaults&&(d=n._`${d} || ${l} === null || ${l} === ""`),i.if(d,n._`${l} = ${(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 o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,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=o},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},8122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}}},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4018),o=r(6461),i=r(9029),s=new i.Name("fullFormats"),a=new i.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return l(e,t,n.fullFormats,s),e;const[r,i]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,s];return l(e,t.formats||n.formatNames,r,i),t.keywords&&(0,o.default)(e),e};function l(e,t,r,n){var o,s;null!==(o=(s=e.opts.code).formats)&&void 0!==o||(s.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:o,removeDotSegments:i,recomposeAuthority:s,normalizeComponentEncoding:a}=r(4834),c=r(343);function l(e,t,r,n){const o={};return n||(e=m(d(e,r),r),t=m(d(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=i(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function d(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),o=[],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&&o.push(r.scheme,":");const l=s(r);if(void 0!==l&&("suffix"!==n.reference&&o.push("//"),o.push(l),r.path&&"/"!==r.path.charAt(0)&&o.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===l&&(e=e.replace(/^\/\//u,"/%2F")),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}const u=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(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},s=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const l=e.match(p);if(l){if(i.scheme=l[1],i.userinfo=l[3],i.host=l[4],i.port=parseInt(l[5],10),i.path=l[6]||"",i.query=l[7],i.fragment=l[8],isNaN(i.port)&&(i.port=l[5]),i.host){const e=o(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)&&(s&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),s&&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 f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=d(m(e,t),t):"object"==typeof e&&(e=m(d(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return d(l(m(e,n),m(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=d(a(m(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=d(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=d(a(m(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=d(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:d,parse:m};e.exports=f,e.exports.default=f,e.exports.fastUri=f},8632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTokenizer=void 0;const n=r(8705);t.AbstractTokenizer=class{constructor(e){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e||{}}async readToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async peekToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}}},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schema:a,schemaCode:c,it:l}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=l.opts.loopEnum;let u;const p=()=>null!=u?u:u=(0,o.useFunc)(t,i.default);let m;if(d||s)m=t.let("valid"),e.block$data(m,(function(){t.assign(m,!1),t.forOf("v",c,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(m,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);m=(0,n.or)(...a.map(((t,o)=>function(e,t){const o=a[t];return"object"==typeof o&&null!==o?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(m)}};t.default=s},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),o=r(9029),i=r(2023),s=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:l,it:d}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:u,opts:p}=d;if(d.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(d,r))return;const m=(0,n.allSchemaProperties)(a.properties),f=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(o._`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,s.alwaysValidSchema)(d,r)){const r=t.name("valid");"failing"===p.removeAdditional?(g(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),h(n)}))):(g(n,r),u||t.if((0,o.not)(r),(()=>t.break())))}}}function g(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",c,(r=>{m.length||f.length?t.if(function(r){let i;if(m.length>8){const e=(0,s.schemaRefOrVal)(d,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=m.length?(0,o.or)(...m.map((e=>o._`${r} === ${e}`))):o.nil;return f.length&&(i=(0,o.or)(i,...f.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>y(r))):y(r)})),e.ok(o._`${l} === ${i.default.errors}`)}};t.default=a},8705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;var n=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return n.EndOfStreamError}});var o=r(1510);Object.defineProperty(t,"StreamReader",{enumerable:!0,get:function(){return o.StreamReader}})},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),o=r(4227),i=r(2023);function s(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:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.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,o,i){const{it:c}=e,{gen:d,compositeRule:u,allErrors:p}=c,m=l(e,r,o);(null!=i?i:u||p)?s(d,m):a(c,n._`[${m}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:c,compositeRule:d,allErrors:u}=o;s(c,l(e,r,n)),d||u||a(o,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:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,i.default.errors,(s=>{e.const(c,n._`${i.default.vErrors}[${s}]`),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`,o))}))};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 l(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:s}=e,a=[d(s,r),u(e,r)];return function(e,{params:t,message:r},o){const{keyword:s,data:a,schemaValue:l,it:d}=e,{opts:u,propertyName:p,topSchemaRef:m,schemaPath:f}=d;o.push([c.keyword,s],[c.params,"function"==typeof t?t(e):t||n._`{}`]),u.messages&&o.push([c.message,"function"==typeof r?r(e):r]),u.verbose&&o.push([c.schema,l],[c.parentSchema,n._`${m}${f}`],[i.default.data,a]),p&&o.push([c.propertyName,p])}(e,t,a),o.object(...a)}(e,t,r)}function d({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.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 s=i?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,o.getErrorPath)(r,o.Type.Str)}`),[c.schemaPath,s]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(8708),o=r(9029),i=r(2023),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,s,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(o._`${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),o=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 s=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.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?o.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=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class l 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=I(this.rhs,e,t),this}get names(){return A(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class d extends l{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 m extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f 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=I(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 o=r[n];o.optimizeNames(e,t)||(N(e,o.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 w extends y{}w.kind="else";class _ extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new w(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(j(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return A(e,this.condition),this.else&&k(e,this.else.names),e}}_.kind="if";class b extends y{}b.kind="for";class v extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return k(super.names,this.iteration.names)}}class E extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.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=A(super.names,this.from);return A(e,this.to)}}class T extends b{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=I(this.iterable,e,t),this}get names(){return k(super.names,this.iterable.names)}}class S 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)}}S.kind="func";class $ extends h{render(e){return"return "+super.render(e)}}$.kind="return";class O 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 P extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class x 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 A(e,t){return t instanceof n._CodeOrName?k(e,t.names):e}function I(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._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 o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function N(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}x.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 o.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 o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new c(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new d(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(_,w)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(e);return this._for(new E(i,s,t,r),(()=>n(s)))}forOf(e,t,r,i=o.varKinds.const){const s=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(s,n._`${e}[${t}]`),r(s)}))}return this._for(new T("of",i,s,t),(()=>r(s)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new T("in",i,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new $;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new O;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new x,this.code(r)),this._endBlockNode(P,x)}throw(e){return this._leafNode(new m(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,o){return this._blockNode(new S(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=j;const C=R(t.operators.AND);t.and=function(...e){return e.reduce(C)};const D=R(t.operators.OR);function R(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(D)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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:s}=e;if((0,o.alwaysValidSchema)(s,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),s.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"]}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);__webpack_require__.r(r);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var o=2&t&&e;"object"==typeof o&&!~leafPrototypes.indexOf(o);o=getProto(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,__webpack_require__.d(r,n),r},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>e+".cocolight-api-client.browser.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),inProgress={},dataWebpackPrefix="CocolightApiClient:",__webpack_require__.l=(e,t,r,n)=>{if(inProgress[e])inProgress[e].push(t);else{var o,i;if(void 0!==r)for(var s=document.getElementsByTagName("script"),a=0;a<s.length;a++){var c=s[a];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==dataWebpackPrefix+r){o=c;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,__webpack_require__.nc&&o.setAttribute("nonce",__webpack_require__.nc),o.setAttribute("data-webpack",dataWebpackPrefix+r),o.src=e),inProgress[e]=[t];var l=(t,r)=>{o.onerror=o.onload=null,clearTimeout(d);var n=inProgress[e];if(delete inProgress[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((e=>e(r))),t)return t(r)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={792:0};__webpack_require__.f.j=(t,r)=>{var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var i=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(i,(r=>{if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[i,s,a]=r,c=0;if(i.some((t=>0!==e[t]))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);a&&a(__webpack_require__)}for(t&&t(r);c<i.length;c++)o=i[c],__webpack_require__.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=this.webpackChunkCocolightApiClient=this.webpackChunkCocolightApiClient||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>fr});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{ApiAuthenticationError:()=>a,ApiClientError:()=>n,ApiError:()=>r,ApiResponseError:()=>s,ApiValidationError:()=>o,CircuitBreakerError:()=>i});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{hasBrowserEnv:()=>Le,hasStandardBrowserEnv:()=>Me,hasStandardBrowserWebWorkerEnv:()=>qe,navigator:()=>ze,origin:()=>Ue});class r extends Error{constructor(e,t,r){super(e),this.name="ApiError",this.status=t,this.details=r}}class n extends r{constructor(e,t,r){super(e,t,r),this.name="ApiClientError"}}class o extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiValidationError",this.status=t,this.messages=r,this.details=n}}class i extends r{constructor(e){super(e,503),this.name="CircuitBreakerError"}}class s extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiResponseError",this.status=t,this.responseData=r,this.details=n}}class a extends r{constructor(e,t,r){super(e,t,r),this.name="ApiAuthenticationError"}}const c=class{constructor(e){this.apiClient=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))}async callNoConnected(e,t={}){if(this.isConnected)throw new a("Vous ne devez pas être connecté pour faire cette action.");return this.call(e,t)}async callIsConnected(e,t={}){if(!this.isConnected)throw new a("Vous devez être connecté pour effectuer cette action.");return this.call(e,t)}async personRegister(e={}){return this.callNoConnected("PERSON_REGISTER",e)}async authenticateUrl(e={}){return this.callNoConnected("AUTHENTICATE_URL",e)}async refreshTokenUrl(e={}){return this.call("REFRESH_TOKEN_URL",e)}async meInfoUrl(e={}){return this.callIsConnected("ME_INFO_URL",e)}async passwordRecovery(e={}){return this.callNoConnected("PASSWORD_RECOVERY",e)}async serverExchangeToken(e={}){return this.callIsConnected("SERVER_EXCHANGE_TOKEN",e)}async changePassword(e={}){return this.callIsConnected("CHANGE_PASSWORD",e)}async deleteAccount(e={}){return this.callIsConnected("DELETE_ACCOUNT",e)}async updateSettings(e={}){return this.callIsConnected("UPDATE_SETTINGS",e)}async updateBlockDescription(e={}){return this.callIsConnected("UPDATE_BLOCK_DESCRIPTION",e)}async updateBlockInfo(e={}){return this.callIsConnected("UPDATE_BLOCK_INFO",e)}async updateBlockSocial(e={}){return this.callIsConnected("UPDATE_BLOCK_SOCIAL",e)}async updateBlockLocality(e={}){return this.callIsConnected("UPDATE_BLOCK_LOCALITY",e)}async updateBlockSlug(e={}){return this.callIsConnected("UPDATE_BLOCK_SLUG",e)}async check(e={}){return this.callIsConnected("CHECK",e)}async profilImage(e={}){return this.callIsConnected("PROFIL_IMAGE",e)}async getElementsAbout(e={}){return this.call("GET_ELEMENTS_ABOUT",e)}async multiconnect(e={}){return this.callIsConnected("MULTICONNECT",e)}async getNews(e={}){return this.call("GET_NEWS",e)}async getNewsById(e={}){return this.call("GET_NEWS_BY_ID",e)}async addNews(e={}){return this.callIsConnected("ADD_NEWS",e)}async addImageNews(e={}){return this.callIsConnected("ADD_IMAGE_NEWS",e)}async addFileNews(e={}){return this.callIsConnected("ADD_FILE_NEWS",e)}async deleteNews(e={}){return this.callIsConnected("DELETE_NEWS",e)}async updateNews(e={}){return this.callIsConnected("UPDATE_NEWS",e)}async shareNews(e={}){return this.callIsConnected("SHARE_NEWS",e)}async getComments(e={}){return this.call("GET_COMMENTS",e)}async addComments(e={}){return this.callIsConnected("ADD_COMMENTS",e)}async deleteComments(e={}){return this.callIsConnected("DELETE_COMMENTS",e)}async updateComments(e={}){return this.callIsConnected("UPDATE_COMMENTS",e)}async searchTags(e={}){return this.call("SEARCH_TAGS",e)}async showVote(e={}){return this.call("SHOW_VOTE",e)}async globalAutocomplete(e={}){return this.call("GLOBAL_AUTOCOMPLETE",e)}async cityAutocomplete(e={}){return this.call("CITY_AUTOCOMPLETE",e)}async suggestionInput(e={}){return this.call("SUGGESTION_INPUT",e)}async getProjectsNoAdmin(e={}){return this.call("GET_PROJECTS_NO_ADMIN",e)}async getProjectsAdmin(e={}){return this.callIsConnected("GET_PROJECTS_ADMIN",e)}async getPoisNoAdmin(e={}){return this.call("GET_POIS_NO_ADMIN",e)}async getPoisAdmin(e={}){return this.callIsConnected("GET_POIS_ADMIN",e)}async getOrganizationsNoAdmin(e={}){return this.call("GET_ORGANIZATIONS_NO_ADMIN",e)}async getOrganizationsAdmin(e={}){return this.callIsConnected("GET_ORGANIZATIONS_ADMIN",e)}async getMembersNoAdmin(e={}){return this.call("GET_MEMBERS_NO_ADMIN",e)}async getMembersAdmin(e={}){return this.callIsConnected("GET_MEMBERS_ADMIN",e)}async getFriendsAdmin(e={}){return this.callIsConnected("GET_FRIENDS_ADMIN",e)}async getSubscriptions(e={}){return this.call("GET_SUBSCRIPTIONS",e)}async getSubscriptionsAdmin(e={}){return this.callIsConnected("GET_SUBSCRIPTIONS_ADMIN",e)}async getSubscribers(e={}){return this.call("GET_SUBSCRIBERS",e)}async getSubscribersAdmin(e={}){return this.callIsConnected("GET_SUBSCRIBERS_ADMIN",e)}async getContributors(e={}){return this.call("GET_CONTRIBUTORS",e)}async getContributorsAdmin(e={}){return this.callIsConnected("GET_CONTRIBUTORS_ADMIN",e)}async getBadges(e={}){return this.call("GET_BADGES",e)}async getBadgesFilters(e={}){return this.call("GET_BADGES_FILTERS",e)}async connect(e={}){return this.callIsConnected("CONNECT",e)}async disconnect(e={}){return this.callIsConnected("DISCONNECT",e)}async getElementsKey(e={}){return this.call("GET_ELEMENTS_KEY",e)}async getFavoris(e={}){return this.callIsConnected("GET_FAVORIS",e)}async deleteFavoris(e={}){return this.callIsConnected("DELETE_FAVORIS",e)}async addFavoris(e={}){return this.callIsConnected("ADD_FAVORIS",e)}async addOrganization(e={}){return this.callIsConnected("ADD_ORGANIZATION",e)}async addProject(e={}){return this.callIsConnected("ADD_PROJECT",e)}async addPoi(e={}){return this.callIsConnected("ADD_POI",e)}async addEvent(e={}){return this.callIsConnected("ADD_EVENT",e)}async deletePoi(e={}){return this.callIsConnected("DELETE_POI",e)}async deleteEvent(e={}){return this.callIsConnected("DELETE_EVENT",e)}async deleteElement(e={}){return this.callIsConnected("DELETE_ELEMENT",e)}async addImageElement(e={}){return this.callIsConnected("ADD_IMAGE_ELEMENT",e)}},l={createDraftProxy:(e,t={},r={},n=[],i={},s={})=>new Proxy({},{get:(e,n)=>{const o=n in r?r[n]:t[n],s=i[n];return"function"==typeof s?s(o):o},set:(t,i,a)=>{if(!n.includes(i)){const t=`[DraftProxy] Le champ "${i}" n'est pas autorisé.`;if(s.throwOnError)throw new o(t,400,null,{field:i,value:a,allowedFields:n});return e._logger.warn(t),!1}return r[i]=a,!0},deleteProperty:(e,t)=>!!n.includes(t)&&(delete r[t],!0),has:(e,n)=>n in r||n in t,ownKeys:()=>[...new Set([...Object.keys(t),...Object.keys(r)])],getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0})}),_extractWritableFields(e={},t={},r={defs:{},visited:new Set}){if(!e||"object"!=typeof e)return[];if(e.$id&&r.visited.has(e.$id))return[];e.$id&&r.visited.add(e.$id),r.defs=e.$defs||e.definitions||r.defs;const n=[];if(e.$ref){const o=e.$ref.replace(/^#\/?(\$defs|definitions)\//,""),i=r.defs?.[o];i&&n.push(...this._extractWritableFields(i,t,r))}if(e.allOf&&e.allOf.forEach((e=>n.push(...this._extractWritableFields(e,t,r)))),e.if&&e.then){const o=e.if?.properties;let i=!0;if(o)for(const e in o){const r=o[e]?.const;if(t[e]!==r){i=!1;break}}i&&e.then?n.push(...this._extractWritableFields(e.then,t,r)):!i&&e.else&&n.push(...this._extractWritableFields(e.else,t,r))}return e.properties&&n.push(...Object.entries(e.properties).filter((([e,t])=>!0!==t.readOnly&&void 0===t.const)).map((([e])=>e))),[...new Set(n)]},buildDraftAndProxy({data:e={},serverData:t=null,constant:n,apiClient:o,transforms:i={},throwOnError:s=!0,removeFields:a=[]}){const c=Array.isArray(n)?n:[n],l={allOf:[],$defs:{}};for(const e of c){const t=o.getRequestSchema(e);if(!t)throw new r(`Unable to find schema for ${e}.`);if(t.$defs)for(const[r,n]of Object.entries(t.$defs))l.$defs[r]?o._logger.warn(`Duplicate $defs key '${r}' from schema '${e}'`):l.$defs[r]=n;l.allOf.push(t)}const d={};let u=this._extractWritableFields(l,e);e.id&&-1===u.indexOf("id")&&u.push("id"),e.slug&&-1===u.indexOf("slug")&&u.push("slug"),u=u.filter((e=>!a.includes(e)));for(const t of u){const r=e[t],n="function"==typeof i[t]?i[t](r,e):r;void 0!==n&&(d[t]=n)}return{draft:d,proxy:this.createDraftProxy(o,t,d,u,i,{throwOnError:s})}},extractChangedFieldsFromSchema(e,t,r={},n,o=[]){const i=e.getRequestSchema(t);let s=this._extractWritableFields(i,r);const a={},c=n?.()||{};s=s.filter((e=>!o.includes(e)));for(const e of s){if(void 0===r[e])continue;const t=r[e],n=c[e];JSON.stringify(t)!==JSON.stringify(n)&&(a[e]=t)}return Object.keys(a).length>0?a:null}};var d=__webpack_require__(2808),u=__webpack_require__(3846);const p={async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))},async callNoConnected(e,t={}){if(this.isConnected)throw new a("Vous devez ne devez pas être connecté pour faire cette action.");return this.call(e,t)},async callIsConnected(e,t={}){if(!this.isConnected)throw new a("Vous devez être connecté pour faire cette action.");return"function"==typeof e?await e():this.call(e,t)},async callIsMe(e,t={}){if(!this.isMe)throw new a("Vous devez être vous-même pour faire cette action.");return"function"==typeof e?await e():await this.callIsConnected(e,t)},async validateImage(e){return await this._validateUploadInput(e,{allowedMimeTypes:["image/jpeg","image/png","image/jpg"],expectedType:"image"})},async validateFile(e){return await this._validateUploadInput(e,{allowedMimeTypes:["application/pdf","text/plain","text/csv"],expectedType:"file"})},async _validateUploadInput(e,{allowedMimeTypes:t=[],expectedType:r="any"}){if(!e)throw new o("Le fichier est requis.");const n="undefined"==typeof window&&"undefined"!=typeof process;let i="",s=e;if("undefined"!=typeof File&&e instanceof File){if(i=e.type,!t.includes(i))throw new o("Le type du fichier est invalide.")}else if("undefined"!=typeof Blob&&e instanceof Blob){if(i=e.type,!t.includes(i))throw new o("Le type du fichier est invalide.");const r=i.split("/")[1]||"bin",n=`${Date.now()}.${r}`;s=new File([e],n,{type:i})}else if(n&&Buffer.isBuffer(e)){const n=await(0,u.fileTypeFromBuffer)(e);if(i=n?.mime,!n||!t.includes(i))throw new o("Le type du fichier est invalide.");if("image"===r){const t=n.ext,r=`${Date.now()}.${t}`;s=await this._createReadStreamFromBuffer(e,r,i)}}else{if(!n||!e?.readable||"function"!=typeof e._read)throw new o("Type de fichier non reconnu.");{const r=[],n=await this._passThrough(),a=await this._passThrough(),c=4100;let l=0;e.on("data",(e=>{l<c&&(r.push(e),l+=e.length)})),e.pipe(n).pipe(a),await new Promise((e=>setTimeout(e,10)));const d=Buffer.concat(r),p=await(0,u.fileTypeFromBuffer)(d);if(i=p?.mime,!p||!t.includes(i))throw new o("Le type du fichier est invalide.");a.path=`${Date.now()}.${p.ext}`,a.mimeType=i,s=a}}return s},async _createReadStreamFromBuffer(e,t="file.bin",r="application/octet-stream"){const n=await this._bufferToReadable(e);return n.path=t,n.mimeType=r,n},async _bufferToReadable(e){if("undefined"==typeof window){const{bufferToReadable:t}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return t(e)}throw new Error("bufferToReadable ne doit pas être appelé dans le navigateur")},async _passThrough(){if("undefined"==typeof window){const{createPassThrough:e}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return e()}throw new Error("passThrough ne doit pas être appelé dans le navigateur")},_omitProps(e,t){if(!e||"object"!=typeof e)return{};const r={...e};for(const e of t)delete r[e];return r},_pickProps(e,t,r={}){if(!e||"object"!=typeof e)return{};const n={};for(const o of t)if(o in e){const t=e[o];"function"==typeof r[o]?n[o]=r[o](t,e):n[o]=t}return n},_createFilteredProxy:e=>new Proxy(e,{get:(e,t,r)=>"string"!=typeof t||isNaN(t)?"length"===t?e.filter((e=>!e._isDeleted)).length:"function"==typeof e[t]?(...r)=>e.filter((e=>!e._isDeleted))[t](...r):Reflect.get(e,t,r):e.filter((e=>!e._isDeleted))[t]}),_newId:()=>(new d).toString()};class m{#e={};#t={};#r=null;static entityType="news";static SCHEMA_CONSTANTS=["ADD_NEWS"];constructor(e,t={},n={}){if(this.__entityTag="News",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!n.User)throw new r("User class must be injected.");if(!e)throw new r("Parent is required.");if(this.deps=n,this.EndpointApiClass=n.EndpointApi,"User"!==e?.__entityTag&&"Organization"!==e?.__entityTag&&"Project"!==e?.__entityTag)throw new r("Invalid parent for News.");this.apiClient=e.apiClient,this.parent=e,this.endpointApi="function"==typeof n.EndpointApi?new n.EndpointApi(this.apiClient):"object"==typeof n.EndpointApi?n.EndpointApi:(()=>{throw new r("deps.EndpointApi must be a class or instance.")})(),this.#r=null;const{draft:o,proxy:i}=this.buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:m.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}get isConnected(){return this.apiClient.isConnected}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}get userId(){return this.apiClient.userId}get isMe(){return this.isConnected&&this.userId===this.parent.id}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this.buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:m.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}getEntityType(){return m.entityType}static fromServerData(e,t,r){const n=new m(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:m.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n.#e=o,n.data=i,n}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async get(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");const e=await this.callIsConnected((()=>this.endpointApi.getNewsById({ids:[this.id]})));if(e&&Array.isArray(e)&&1===e.length){const t=e[0];return this.#r={...t},this._setData(t),this.#r}throw new r(`Aucune actualité trouvée pour l'ID ${this.id}`)}async save(){if(!this.isConnected)throw new r("Impossible de sauvegarder sans être connecté.");""===this.#e?.text&&(this.#e.text=" ");const e={...this.#e};if(e.parentId=this.parent.id,e.parentType=this.parent.getEntityType(),this.id){e.id&&delete e.id;const t=await this.callIsConnected((()=>this.endpointApi.updateNews({...e,idNews:this.id})));return t?.object&&(this.#r={...t.object}),t}{const t=await this.callIsConnected((()=>this.endpointApi.addNews(e)));return this.#e.id=t.object.id,t?.object&&(this.#r={...t.object}),t}}async addMention({slug:e,id:t}){try{if(!e&&!t)throw new r("Vous devez fournir un slug ou un id pour ajouter une mention.");const n=new this.deps.User(this.apiClient,{id:t,slug:e},{EndpointApi:this.endpointApi}),o=n.serverData;if(this.#e.mentions||(this.#e.mentions=[]),this.#e.mentions.find((e=>e.id===o.id)))return this.#e.mentions=this.#e.mentions.map((e=>(e.id===o.id&&(e.count+=1),e))),this.#e.mentions;const i={id:o.id,slug:o.slug,type:n.getEntityType(),name:o.name,value:o.name,count:1};return this.#e.mentions.push(i),this.#e.mentions}catch(e){throw this.apiClient._logger.error("Erreur lors de l'ajout de la mention :",e),e}}async addImage(e){e=await this.validateImage(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsImage:e},r=await this.callIsConnected((()=>this.endpointApi.addImageNews(t)));return this.#e.mediaImg?(this.#e.mediaImg.countImages=this.#e.mediaImg.countImages+1,this.#e.mediaImg.images.push(r.id)):this.#e.mediaImg={countImages:1,images:[r.id]},r}async addFile(e){e=await this.validateFile(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsFile:e},r=await this.callIsConnected((()=>this.endpointApi.addFileNews(t)));return this.#e.mediaFile?(this.#e.mediaFile.countFiles=this.#e.mediaFile.countFiles+1,this.#e.mediaFile.files.push(r)):this.#e.mediaFile={countFiles:1,files:[r]},r}async delete(){if(!this.id)throw new r("Vous devez fournir un id pour supprimer une news.");const e={pathParams:{id:this.id}};await this.callIsConnected((()=>this.endpointApi.deleteNews(e))),this.#e={},this.#r=null,this.#e.id=null,this._isDeleted=!0}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}defaultFields={};removeFields=[];transforms={scope:e=>e?.type,mentions:e=>Array.isArray(e)?e.map((e=>({...e,count:parseInt(e.count)}))):[],mediaImg:e=>{const t=e?.images?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countImages:t.length,images:t}:void 0},mediaFile:e=>{const t=e?.files?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countFiles:t.length,files:t}:void 0}}}Object.assign(m.prototype,p,l);const f={async get(){return this.apiClient.safeCall((async()=>{const e=await this.getPublicProfile();return this._setData(e),e}))},async updateSettings(e={}){return e.idEntity=this.id,e.typeEntity=this.getEntityType(),this.callIsConnected((()=>this.endpointApi.updateSettings(e)))},async updateDescription(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockDescription(e)))},async updateInfo(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockInfo(e)))},async updateSocial(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockSocial(e)))},async updateLocality(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockLocality(e)))},async updateSlug({slug:e}){try{await this.endpointApi.check({type:this.getEntityType(),id:this.id,slug:e})}catch(e){if(e instanceof s)throw new s("Erreur lors de la vérification du slug.",e.status,e.data);throw e}return this.callIsConnected((()=>this.endpointApi.updateBlockSlug({typeElement:this.getEntityType(),id:this.id,slug:e})))},async updateImageProfil({profil_avatar:e}){e=await this.validateImage(e);const t={pathParams:{folder:this.getEntityType(),ownerId:this.id},profil_avatar:e};return this.callIsConnected((()=>this.endpointApi.profilImage(t)))}},h={async resolveId(e){if(!this.id&&this.slug)try{const t=await this.endpointApi.getElementsKey({pathParams:{slug:this.slug}});if(!t?.contextId||t?.contextType!==e)throw new s(`Le slug ${this.slug} ne correspond pas à un ${e}`,200,t);this._id(t.contextId)}catch(t){throw t instanceof s?t?.responseData?.contextType!==e?t:new s(`Impossible de récupérer l'identifiant pour le slug ${this.slug}`,t.status,t.responseData):t}return this.id},async getPublicProfile(){return await this.resolveId(this.getEntityType()),this.endpointApi.getElementsAbout({pathParams:{id:this.id,type:this.getEntityType()}})}},y={async getNews(e={}){e.pathParams={type:this.getEntityType(),id:this.id};const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new s("Erreur lors de la récupération des actualités.",500,t);const r=t.map((e=>this.deps.News.fromServerData(e,this,{User:this.deps.User,EndpointApi:this.deps.EndpointApi})));return this._createFilteredProxy(r)},async news(e){try{const t=new this.deps.News(this,e,{User:this.deps.User,EndpointApi:this.deps.EndpointApi});return e.id&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.getEntityType()}.news] Erreur lors de la création d'une instance news :`,e.message),e}}};class g{#e={};#t={};#r=null;static entityType="organizations";static SCHEMA_CONSTANTS=["ADD_ORGANIZATION","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_ORGANIZATION","addOrganization"],["PROFIL_IMAGE",""]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);constructor(e,t={},n={}){if(this.__entityTag="Organization",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!n.User)throw new r("User class must be injected.");if(!n.Project)throw new r("Project class must be injected.");if(!n.News)throw new r("News class must be injected.");if(!e)throw new r("Parent is required.");if(this.deps=n,this.EndpointApiClass=n.EndpointApi,"ApiClient"===e?.__entityTag)this.apiClient=e,this.parent=null;else{if("User"!==e?.__entityTag)throw new r("Invalid parent for Organization.");this.apiClient=e.apiClient,this.parent=e}this.endpointApi="function"==typeof n.EndpointApi?new n.EndpointApi(this.apiClient):"object"==typeof n.EndpointApi?n.EndpointApi:(()=>{throw new r("deps.EndpointApi must be a class or instance.")})(),this.#r=null;const{draft:o,proxy:i}=this.buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:g.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}_id(e){this.#e.id=e}get slug(){return this.#e.slug||null}get isConnected(){return this.apiClient.isConnected}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this.buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:g.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}get userId(){return this.apiClient.userId}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}get isMe(){return this.isConnected&&this.userId===this.parent?.id}getEntityType(){return g.entityType}static fromServerData(e,t,r){const n=new g(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:g.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n.#e=o,n.data=i,n}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async save(){if(!this.isConnected)throw new r("Impossible de sauvegarder sans être connecté.");const e={...this.#e};return this.id?(await this._update(e)&&await this.refresh(),this.#r):(await this._add(e),await this.refresh(),this.#r)}async _add(e){e.id=this._newId(),e.slug&&delete e.slug;for(const[t,r]of g.ADD_BLOCKS){const n=this.extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this.#e.id=e.map.id,this.#e.slug=e.map.slug)}}}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of g.UPDATE_BLOCKS){const o=this.extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}addOrganization(e={}){return this.callIsConnected((()=>this.endpointApi.addOrganization(e)))}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal};async project(e={}){try{const t=new this.deps.Project(this,e,{User:this.deps.User,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.project] Erreur lors de la création d'une instance project :`,e.message),e}}}Object.assign(g.prototype,p,h,f,y,l);class w{#e={};#t={};#r=null;static entityType="projects";static SCHEMA_CONSTANTS=["ADD_PROJECT","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_PROJECT","addProject"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);constructor(e,t={},n={}){if(this.__entityTag="Project",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!n.User)throw new r("User class must be injected.");if(!n.News)throw new r("News class must be injected.");if(!e)throw new r("Parent is required.");if(this.deps=n,this.EndpointApiClass=n.EndpointApi,"ApiClient"===e?.__entityTag)this.apiClient=e,this.parent=null;else{if("User"!==e?.__entityTag&&"Organization"!==e?.__entityTag&&"Project"!==e?.__entityTag)throw new r("Invalid parent for Project.");this.apiClient=e.apiClient,this.parent=e}this.endpointApi="function"==typeof n.EndpointApi?new n.EndpointApi(this.apiClient):"object"==typeof n.EndpointApi?n.EndpointApi:(()=>{throw new r("deps.EndpointApi must be a class or instance.")})();const{draft:o,proxy:i}=this.buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:w.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}_id(e){this.#e.id=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}get isMe(){return this.isConnected&&this.userId===this.parent?.id}getEntityType(){return w.entityType}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this.buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:w.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async save(){if(!this.isConnected)throw new r("Impossible de sauvegarder sans être connecté.");const e={...this.#e};return this.id?(await this._update(e)&&await this.refresh(),this.#r):(await this._add(e),await this.refresh(),this.#r)}async _add(e){e.id=this._newId(),e.slug&&delete e.slug;for(const[t,r]of w.ADD_BLOCKS){const n=this.extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this.#e.id=e.map.id,this.#e.slug=e.map.slug)}}}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of w.UPDATE_BLOCKS){const o=this.extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}addProject(e={}){return this.isMe||(e.parent={},e.parent[`${this.parent.id}`]={type:this.parent.getEntityType(),name:this.parent.name}),this.callIsConnected((()=>this.endpointApi.addProject(e)))}static fromServerData(e,t,r){const n=new w(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:w.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n.#e=o,n.data=i,n}defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal,parent:e=>e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,{type:t?.type??null,name:t?.name??null}]))):null};async project(e={}){try{const t=new w(this,e,{User:this.deps.User,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.project] Erreur lors de la création d'une instance project :`,e.message),e}}}Object.assign(w.prototype,p,h,f,y,l);class _{#e={};#t={};#r=null;static entityType="citoyens";static SCHEMA_CONSTANTS=["UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);constructor(e,t={},n={}){if(this.__entityTag="User",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!t?.id&&!t?.slug)throw new r("Vous devez fournir un id ou un slug pour créer un User.");if(!n.Organization)throw new r("Organization class must be injected.");if(!n.Project)throw new r("Project class must be injected.");if(!n.News)throw new r("News class must be injected.");if(this.apiClient=e,this.deps=n,"function"==typeof n.EndpointApi)this.endpointApi=new n.EndpointApi(this.apiClient);else{if("object"!=typeof n.EndpointApi)throw new r("deps.EndpointApi doit être une classe ou une instance valide.");this.endpointApi=n.EndpointApi}this.#r=null;const{draft:o,proxy:i}=this.buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:_.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}_id(e){this.#e.id=e}get slug(){return this.#e.slug||null}get isConnected(){return this.apiClient.isConnected}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this.buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:_.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}getEntityType(){return _.entityType}get userId(){return this.apiClient.userId}get isMe(){return this.isConnected&&this.userId===this.id}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async get(){return this.apiClient.safeCall((async()=>{if(this.isMe){const e=await this.endpointApi.meInfoUrl();return this._setData(e),e}{const e=await this.getPublicProfile();return this._setData(e),e}}))}async changePassword(e={}){return this.callIsMe((()=>this.endpointApi.changePassword(e)))}async delete(e={}){return this.callIsMe((()=>this.endpointApi.deleteAccount(e)))}async save(){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour sauvegarder.");const e={...this.#e};if(this.id)return await this._update(e)&&await this.refresh(),this.#r}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of _.UPDATE_BLOCKS){const o=this.extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async updateSettings(e={}){await this.callIsMe((()=>this.endpointApi.updateSettings(e))),await this.refresh()}async updateDescription(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockDescription(e)))}async updateInfo(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockInfo(e)))}async updateSocial(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockSocial(e)))}async updateLocality(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockLocality(e)))}async updateSlug({slug:e}){try{await this.endpointApi.check({slug:e})}catch(e){if(e instanceof s)throw new s("Erreur lors de la vérification du slug.",e.status,e.data);throw e}return this.callIsMe((()=>this.endpointApi.updateBlockSlug({slug:e})))}async updateImageProfil({profil_avatar:e}){return e=await this.validateImage(e),this.callIsMe((()=>this.endpointApi.profilImage({profil_avatar:e})))}async getOrganizations(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getOrganizationsAdmin(e))):()=>this.endpointApi.getOrganizationsNoAdmin(e);this.isMe||e.filters||(e.filters={[`links.members.${this.id}`]:{$exists:!0},[`links.members.${this.id}.toBeValidated`]:{$exists:!1},[`links.members.${this.id}.isInviting`]:{$exists:!1}});const r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des organisations.",500,r.results);delete r?.count?.spam;const n=Object.values(r.count||{}).reduce(((e,t)=>e+t),0);r.count.total=n;const o=r.results.map((e=>this.deps.Organization.fromServerData(e,this,{User:_,Project:this.deps.Project,News:this.deps.News,EndpointApi:this.deps.EndpointApi})));return{count:r.count,results:o}}async organization(e={}){try{const t=new this.deps.Organization(this,e,{User:_,Project:this.deps.Project,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.organization] Erreur lors de la création d'une instance organization :`,e.message),e}}async getProjects(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getProjectsAdmin(e))):()=>this.endpointApi.getProjectsNoAdmin(e);this.isMe||e.filters||(e.filters={$or:{[`links.contributors.${this.id}`]:{$exists:!0},[`parent.${this.id}`]:{$exists:!0}},[`links.contributors.${this.id}`]:{$exists:!0}});const r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des projets.",500,r.results);const n=r.results.map((e=>this.deps.Project.fromServerData(e,this,{User:_,News:this.deps.News,EndpointApi:this.deps.EndpointApi})));return{count:r?.count?.projects??0,results:n}}async project(e={}){try{const t=new this.deps.Project(this,e,{User:_,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.project] Erreur lors de la création d'une instance project :`,e.message),e}}async getNews(e={}){e.pathParams&&delete e.pathParams,this.isMe||(e.pathParams={id:this.id});const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new s("Erreur lors de la récupération des actualités.",500,t);const r=t.map((e=>this.deps.News.fromServerData(e,this,{User:_,EndpointApi:this.deps.EndpointApi})));return this._createFilteredProxy(r)}async news(e={}){try{const t=new this.deps.News(this,e,{User:_,EndpointApi:this.deps.EndpointApi});return e.id&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.news] Erreur lors de la création d'une instance news :`,e.message),e}}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal}}Object.assign(_.prototype,h,p,{},l);var b=__webpack_require__(7007);const v=(e,t)=>1===t?e:`${e}s`,E=e=>{if(""===e)return"$";const t=e.substring(1).split(/\//).map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~").replace(/\./g,"\\."))).map((e=>/^\d+$/.exec(e)?`[${e}]`:`.${e}`)).join("");return"$"+t},T=e=>{switch(e[0]){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}},S=(e,t="and")=>0===e.length?"nothing":1===e.length?e[0]:2===e.length?`${e[0]} ${t} ${e[1]}`:`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`,$={"date-time":"date and time",time:"time",date:"date",email:"email address",hostname:"hostname",ipv4:"IPv4 address",ipv6:"IPv6 address",uri:"URI","uri-reference":"URI Reference","uri-template":"URI-template","json-pointer":"JSON Pointer","relative-json-pointer":"relative JSON Pointer",regex:"regular expression"},O={fieldLabels:"title",includeOriginalError:!1,includeData:!1};class P extends Error{constructor(e,t={}){super(),this.options={},this.redundant=!1,this.options={...O,...t},this.pointer=e.instancePath,this.path=E(e.instancePath);const r=(({data:e,keyword:t,message:r,params:n,parentSchema:o,schemaPath:i,instancePath:s},{fieldLabels:a})=>{const c=(({instancePath:e,parentSchema:t},{fieldLabels:r})=>{switch(r){case"js":return""===e?"the root value":`the value at ${E(e).replace(/^\$/,"")}`;case"jsonPath":return`the value at ${E(e)}`;case"jsonPointer":case"instancePath":return""===e?"the root value":`the value at ${e}`;case"title":return(null==t?void 0:t.title)?t.title:""===e?"the root value":`the value at ${e}`;default:throw new Error(`invalid fieldLabels value: ${r}`)}})({instancePath:s,parentSchema:o},{fieldLabels:a});if(null==o?void 0:o.errorMessage)return`${c} ${o.errorMessage}`;switch(t){case"enum":{const e=n.allowedValues.map(JSON.stringify);return`${c} must be one of: ${S(e,"or")}`}case"type":{const t=Array.isArray(n.type)?n.type:n.type.split(","),r=S(t,"or"),o=(e=>{const t=typeof e;switch(t){case"object":return null===e?"null":Array.isArray(e)?"an array":"an object";case"undefined":return"undefined";default:return`${T(t)} ${t}`}})(e);return`${c} must be ${T(r)} ${r} but it was ${o}`}case"minLength":{const t=n.limit,r=v("character",t),o=e.length;return`${c} must be ${t} ${r} or more but it was ${o} ${v("character",o)}`}case"maxLength":{const t=n.limit,r=v("character",t),o=e.length;return`${c} must be ${t} ${r} or fewer but it was ${o} ${v("character",o)}`}case"pattern":{if(i.endsWith("propertyNames/pattern"))return null;const e=null==o?void 0:o.patternLabel;return e?`${c} must be ${e} but it was not`:`${c} is an invalid string`}case"format":return`${c} must be a valid ${$[n.format]||n.format} string but it was not`;case"multipleOf":return`${c} must be a multiple of ${n.multipleOf}`;case"minimum":return`${c} must be equal to or greater than ${n.limit}`;case"exclusiveMinimum":return`${c} must be greater than ${n.limit}`;case"maximum":return`${c} must be equal to or less than ${n.limit}`;case"exclusiveMaximum":return`${c} must be less than ${n.limit}`;case"additionalProperties":{const e=Object.keys(null==o?void 0:o.properties).join(", ");return`${c} has an unexpected property, ${n.additionalProperty}, which is not in the list of allowed properties (${e})`}case"required":return`${c} is missing the required field '${n.missingProperty}'`;case"propertyNames":return`${c} has an invalid property name ${JSON.stringify(n.propertyName)}`;case"minProperties":return`${c} must have ${n.limit} or more properties but it has ${Object.keys(e).length}`;case"maxProperties":return`${c} must have ${n.limit} or fewer properties but it has ${Object.keys(e).length}`;case"dependencies":{const e=n.property;return`${c} must have property ${n.missingProperty} when ${e} is present`}case"minItems":return`${c} must have ${n.limit} or more items but it has ${e.length}`;case"maxItems":return`${c} must have ${n.limit} or fewer items but it has ${e.length}`;case"uniqueItems":{const{i:e,j:t}=n;return`${c} must be unique but elements ${t} and ${e} are the same`}default:return`${c} ${r}`}})(e,this.options);var n;null!==r?(this.message=`${n=r,"string"!=typeof n||0===n.length?n:n.charAt(0).toUpperCase()+n.slice(1)}.`,this.options.includeOriginalError&&(this.original=e),this.options.includeData&&(this.data=e.data)):this.redundant=!0}toJSON(){const e={path:this.path,pointer:this.pointer,message:this.message};return this.options.includeOriginalError&&(e.original=this.original),this.options.includeData&&(e.data=this.data),e}}class x extends Error{constructor(e,t={}){super(),this.name="AggregateAjvError",this.errors=(null!=e?e:[]).map((e=>new P(e,t))).filter((e=>!e.redundant)),this.message=this.errors.map((e=>e.message)).join(" ")}toJSON(){return this.errors.map((e=>e.toJSON()))}*[Symbol.iterator](){for(const e of this.errors)yield e}}var k=__webpack_require__(3282),A=__webpack_require__(8182);function I(e,t){return function(){return e.apply(t,arguments)}}const{toString:N}=Object.prototype,{getPrototypeOf:j}=Object,C=(D=Object.create(null),e=>{const t=N.call(e);return D[t]||(D[t]=t.slice(8,-1).toLowerCase())});var D;const R=e=>(e=e.toLowerCase(),t=>C(t)===e),L=e=>t=>typeof t===e,{isArray:z}=Array,M=L("undefined"),q=R("ArrayBuffer"),U=L("string"),B=L("function"),F=L("number"),V=e=>null!==e&&"object"==typeof e,G=e=>{if("object"!==C(e))return!1;const t=j(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},K=R("Date"),J=R("File"),H=R("Blob"),Z=R("FileList"),W=R("URLSearchParams"),[Y,X,Q,ee]=["ReadableStream","Request","Response","Headers"].map(R);function te(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),z(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function re(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const ne="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,oe=e=>!M(e)&&e!==ne,ie=(se="undefined"!=typeof Uint8Array&&j(Uint8Array),e=>se&&e instanceof se);var se;const ae=R("HTMLFormElement"),ce=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),le=R("RegExp"),de=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};te(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},ue=R("AsyncFunction"),pe=(me="function"==typeof setImmediate,fe=B(ne.postMessage),me?setImmediate:fe?(he=`axios@${Math.random()}`,ye=[],ne.addEventListener("message",(({source:e,data:t})=>{e===ne&&t===he&&ye.length&&ye.shift()()}),!1),e=>{ye.push(e),ne.postMessage(he,"*")}):e=>setTimeout(e));var me,fe,he,ye;const ge="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ne):"undefined"!=typeof process&&process.nextTick||pe,we={isArray:z,isArrayBuffer:q,isBuffer:function(e){return null!==e&&!M(e)&&null!==e.constructor&&!M(e.constructor)&&B(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||B(e.append)&&("formdata"===(t=C(e))||"object"===t&&B(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&q(e.buffer),t},isString:U,isNumber:F,isBoolean:e=>!0===e||!1===e,isObject:V,isPlainObject:G,isReadableStream:Y,isRequest:X,isResponse:Q,isHeaders:ee,isUndefined:M,isDate:K,isFile:J,isBlob:H,isRegExp:le,isFunction:B,isStream:e=>V(e)&&B(e.pipe),isURLSearchParams:W,isTypedArray:ie,isFileList:Z,forEach:te,merge:function e(){const{caseless:t}=oe(this)&&this||{},r={},n=(n,o)=>{const i=t&&re(r,o)||o;G(r[i])&&G(n)?r[i]=e(r[i],n):G(n)?r[i]=e({},n):z(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&te(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(te(t,((t,n)=>{r&&B(t)?e[n]=I(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 o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:C,kindOfTest:R,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(z(e))return e;let t=e.length;if(!F(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:ae,hasOwnProperty:ce,hasOwnProp:ce,reduceDescriptors:de,freezeMethods:e=>{de(e,((t,r)=>{if(B(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];B(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 z(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:re,global:ne,isContextDefined:oe,isSpecCompliantForm:function(e){return!!(e&&B(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 o=z(e)?[]:{};return te(e,((e,t)=>{const i=r(e,n+1);!M(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:ue,isThenable:e=>e&&(V(e)||B(e))&&B(e.then)&&B(e.catch),setImmediate:pe,asap:ge};function _e(e,t,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}we.inherits(_e,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:we.toJSONObject(this.config),code:this.code,status:this.status}}});const be=_e.prototype,ve={};["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=>{ve[e]={value:e}})),Object.defineProperties(_e,ve),Object.defineProperty(be,"isAxiosError",{value:!0}),_e.from=(e,t,r,n,o,i)=>{const s=Object.create(be);return we.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),_e.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Ee=_e;function Te(e){return we.isPlainObject(e)||we.isArray(e)}function Se(e){return we.endsWith(e,"[]")?e.slice(0,-2):e}function $e(e,t,r){return e?e.concat(t).map((function(e,t){return e=Se(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Oe=we.toFlatObject(we,{},null,(function(e){return/^is[A-Z]/.test(e)})),Pe=function(e,t,r){if(!we.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=we.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!we.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&we.isSpecCompliantForm(t);if(!we.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(we.isDate(e))return e.toISOString();if(!a&&we.isBlob(e))throw new Ee("Blob is not supported. Use a Buffer instead.");return we.isArrayBuffer(e)||we.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(we.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(we.isArray(e)&&function(e){return we.isArray(e)&&!e.some(Te)}(e)||(we.isFileList(e)||we.endsWith(r,"[]"))&&(a=we.toArray(e)))return r=Se(r),a.forEach((function(e,n){!we.isUndefined(e)&&null!==e&&t.append(!0===s?$e([r],n,i):null===s?r:r+"[]",c(e))})),!1;return!!Te(e)||(t.append($e(o,r,i),c(e)),!1)}const d=[],u=Object.assign(Oe,{defaultVisitor:l,convertValue:c,isVisitable:Te});if(!we.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!we.isUndefined(r)){if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),we.forEach(r,(function(r,i){!0===(!(we.isUndefined(r)||null===r)&&o.call(t,r,we.isString(i)?i.trim():i,n,u))&&e(r,n?n.concat(i):[i])})),d.pop()}}(e),t};function xe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ke(e,t){this._pairs=[],e&&Pe(e,this,t)}const Ae=ke.prototype;Ae.append=function(e,t){this._pairs.push([e,t])},Ae.toString=function(e){const t=e?function(t){return e.call(this,t,xe)}:xe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ie=ke;function Ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function je(e,t,r){if(!t)return e;const n=r&&r.encode||Ne;we.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):we.isURLSearchParams(t)?t.toString():new Ie(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Ce=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){we.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},De={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Re={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Le="undefined"!=typeof window&&"undefined"!=typeof document,ze="object"==typeof navigator&&navigator||void 0,Me=Le&&(!ze||["ReactNative","NativeScript","NS"].indexOf(ze.product)<0),qe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ue=Le&&window.location.href||"http://localhost",Be={...t,...Re},Fe=function(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&we.isArray(n)?n.length:i,a?(we.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&we.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&we.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s)}if(we.isFormData(e)&&we.isFunction(e.entries)){const r={};return we.forEachEntry(e,((e,n)=>{t(function(e){return we.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},Ve={transitional:De,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=we.isObject(e);if(o&&we.isHTMLForm(e)&&(e=new FormData(e)),we.isFormData(e))return n?JSON.stringify(Fe(e)):e;if(we.isArrayBuffer(e)||we.isBuffer(e)||we.isStream(e)||we.isFile(e)||we.isBlob(e)||we.isReadableStream(e))return e;if(we.isArrayBufferView(e))return e.buffer;if(we.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Pe(e,new Be.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Be.isNode&&we.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=we.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Pe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(we.isString(e))try{return(0,JSON.parse)(e),we.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(we.isResponse(e)||we.isReadableStream(e))return e;if(e&&we.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 Ee.from(e,Ee.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:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};we.forEach(["delete","get","head","post","put","patch"],(e=>{Ve.headers[e]={}}));const Ge=Ve,Ke=we.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"]),Je=Symbol("internals");function He(e){return e&&String(e).trim().toLowerCase()}function Ze(e){return!1===e||null==e?e:we.isArray(e)?e.map(Ze):String(e)}function We(e,t,r,n,o){return we.isFunction(n)?n.call(this,t,r):(o&&(t=r),we.isString(t)?we.isString(n)?-1!==t.indexOf(n):we.isRegExp(n)?n.test(t):void 0:void 0)}class Ye{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=He(t);if(!o)throw new Error("header name must be a non-empty string");const i=we.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Ze(e))}const i=(e,t)=>we.forEach(e,((e,r)=>o(e,r,t)));if(we.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(we.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Ke[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(we.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=He(e)){const r=we.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(we.isFunction(t))return t.call(this,e,r);if(we.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=He(e)){const r=we.findKey(this,e);return!(!r||void 0===this[r]||t&&!We(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=He(e)){const o=we.findKey(r,e);!o||t&&!We(0,r[o],o,t)||(delete r[o],n=!0)}}return we.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!We(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return we.forEach(this,((n,o)=>{const i=we.findKey(r,o);if(i)return t[i]=Ze(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Ze(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return we.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&we.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[Je]=this[Je]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=He(e);t[n]||(function(e,t){const r=we.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return we.isArray(e)?e.forEach(n):n(e),this}}Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),we.reduceDescriptors(Ye.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),we.freezeMethods(Ye);const Xe=Ye;function Qe(e,t){const r=this||Ge,n=t||r,o=Xe.from(n.headers);let i=n.data;return we.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function et(e){return!(!e||!e.__CANCEL__)}function tt(e,t,r){Ee.call(this,null==e?"canceled":e,Ee.ERR_CANCELED,t,r),this.name="CanceledError"}we.inherits(tt,Ee,{__CANCEL__:!0});const rt=tt;function nt(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Ee("Request failed with status code "+r.status,[Ee.ERR_BAD_REQUEST,Ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const ot=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];o||(o=c),r[i]=a,n[i]=c;let d=s,u=0;for(;d!==i;)u+=r[d++],d%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const p=l&&c-l;return p?Math.round(1e3*u/p):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout((()=>{n=null,s(r)}),i-a)))},()=>r&&s(r)]}((r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},it=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},st=e=>(...t)=>we.asap((()=>e(...t))),at=Be.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Be.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0,ct=Be.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];we.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),we.isString(n)&&s.push("path="+n),we.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 lt(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 dt=e=>e instanceof Xe?{...e}:e;function ut(e,t){t=t||{};const r={};function n(e,t,r,n){return we.isPlainObject(e)&&we.isPlainObject(t)?we.merge.call({caseless:n},e,t):we.isPlainObject(t)?we.merge({},t):we.isArray(t)?t.slice():t}function o(e,t,r,o){return we.isUndefined(t)?we.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!we.isUndefined(t))return n(void 0,t)}function s(e,t){return we.isUndefined(t)?we.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(dt(e),dt(t),0,!0)};return we.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,s=i(e[n],t[n],n);we.isUndefined(s)&&i!==a||(r[n]=s)})),r}const pt=e=>{const t=ut({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=Xe.from(a),t.url=je(lt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),we.isFormData(n))if(Be.hasStandardBrowserEnv||Be.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(Be.hasStandardBrowserEnv&&(o&&we.isFunction(o)&&(o=o(t)),o||!1!==o&&at(t.url))){const e=i&&s&&ct.read(s);e&&a.set(i,e)}return t},mt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=pt(e);let o=n.data;const i=Xe.from(n.headers).normalize();let s,a,c,l,d,{responseType:u,onUploadProgress:p,onDownloadProgress:m}=n;function f(){l&&l(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=Xe.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());nt((function(e){t(e),f()}),(function(e){r(e),f()}),{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 Ee("Request aborted",Ee.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Ee("Network Error",Ee.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||De;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Ee(t,o.clarifyTimeoutError?Ee.ETIMEDOUT:Ee.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&we.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),we.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),u&&"json"!==u&&(h.responseType=n.responseType),m&&([c,d]=ot(m,!0),h.addEventListener("progress",c)),p&&h.upload&&([a,l]=ot(p),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new rt(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Be.protocols.indexOf(g)?r(new Ee("Unsupported protocol "+g+":",Ee.ERR_BAD_REQUEST,e)):h.send(o||null)}))},ft=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Ee?t:new rt(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Ee(`timeout ${t} of ms exceeded`,Ee.ETIMEDOUT))}),t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=n;return a.unsubscribe=()=>we.asap(s),a}},ht=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},yt=(e,t,r,n)=>{const o=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*ht(r,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},gt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,wt=gt&&"function"==typeof ReadableStream,_t=gt&&("function"==typeof TextEncoder?(bt=new TextEncoder,e=>bt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var bt;const vt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Et=wt&&vt((()=>{let e=!1;const t=new Request(Be.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Tt=wt&&vt((()=>we.isReadableStream(new Response("").body))),St={stream:Tt&&(e=>e.body)};var $t;gt&&($t=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!St[e]&&(St[e]=we.isFunction($t[e])?t=>t[e]():(t,r)=>{throw new Ee(`Response type '${e}' is not supported`,Ee.ERR_NOT_SUPPORT,r)})})));const Ot={http:null,xhr:mt,fetch:gt&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:u="same-origin",fetchOptions:p}=pt(e);l=l?(l+"").toLowerCase():"text";let m,f=ft([o,i&&i.toAbortSignal()],s);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Et&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=we.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(we.isBlob(e))return e.size;if(we.isSpecCompliantForm(e)){const t=new Request(Be.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return we.isArrayBufferView(e)||we.isArrayBuffer(e)?e.byteLength:(we.isURLSearchParams(e)&&(e+=""),we.isString(e)?(await _t(e)).byteLength:void 0)})(t):r})(d,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(we.isFormData(n)&&(e=r.headers.get("content-type"))&&d.setContentType(e),r.body){const[e,t]=it(y,ot(st(c)));n=yt(r.body,65536,e,t)}}we.isString(u)||(u=u?"include":"omit");const o="credentials"in Request.prototype;m=new Request(t,{...p,signal:f,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:o?u:void 0});let i=await fetch(m);const s=Tt&&("stream"===l||"response"===l);if(Tt&&(a||s&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=we.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&it(t,ot(st(a),!0))||[];i=new Response(yt(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}l=l||"text";let g=await St[we.findKey(St,l)||"text"](i,e);return!s&&h&&h(),await new Promise(((t,r)=>{nt(t,r,{data:g,headers:Xe.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:m})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Ee("Network Error",Ee.ERR_NETWORK,e,m),{cause:t.cause||t});throw Ee.from(t,t&&t.code,e,m)}})};we.forEach(Ot,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Pt=e=>`- ${e}`,xt=e=>we.isFunction(e)||null===e||!1===e,kt=e=>{e=we.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!xt(r)&&(n=Ot[(t=String(r)).toLowerCase()],void 0===n))throw new Ee(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).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(Pt).join("\n"):" "+Pt(e[0]):"as no adapter specified";throw new Ee("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function At(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rt(null,e)}function It(e){return At(e),e.headers=Xe.from(e.headers),e.data=Qe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kt(e.adapter||Ge.adapter)(e).then((function(t){return At(e),t.data=Qe.call(e,e.transformResponse,t),t.headers=Xe.from(t.headers),t}),(function(t){return et(t)||(At(e),t&&t.response&&(t.response.data=Qe.call(e,e.transformResponse,t.response),t.response.headers=Xe.from(t.response.headers))),Promise.reject(t)}))}const Nt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Nt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const jt={};Nt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Ee(n(o," has been removed"+(t?" in "+t:"")),Ee.ERR_DEPRECATED);return t&&!jt[o]&&(jt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Nt.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Ct={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Ee("options must be an object",Ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new Ee("option "+i+" must be "+r,Ee.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Ee("Unknown option "+i,Ee.ERR_BAD_OPTION)}},validators:Nt},Dt=Ct.validators;class Rt{constructor(e){this.defaults=e,this.interceptors={request:new Ce,response:new Ce}}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=ut(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Ct.assertOptions(r,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),null!=n&&(we.isFunction(n)?t.paramsSerializer={serialize:n}:Ct.assertOptions(n,{encode:Dt.function,serialize:Dt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ct.assertOptions(t,{baseUrl:Dt.spelling("baseURL"),withXsrfToken:Dt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&we.merge(o.common,o[t.method]);o&&we.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Xe.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[It.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=s.length;let p=t;for(u=0;u<d;){const e=s[u++],t=s[u++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=It.call(this,p)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return je(lt((e=ut(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}we.forEach(["delete","get","head","options"],(function(e){Rt.prototype[e]=function(t,r){return this.request(ut(r||{},{method:e,url:t,data:(r||{}).data}))}})),we.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(ut(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Rt.prototype[e]=t(),Rt.prototype[e+"Form"]=t(!0)}));const Lt=Rt;class zt{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,o){r.reason||(r.reason=new rt(e,n,o),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 zt((function(t){e=t})),cancel:e}}}const Mt=zt,qt={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(qt).forEach((([e,t])=>{qt[t]=e}));const Ut=qt,Bt=function e(t){const r=new Lt(t),n=I(Lt.prototype.request,r);return we.extend(n,Lt.prototype,r,{allOwnKeys:!0}),we.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ut(t,r))},n}(Ge);Bt.Axios=Lt,Bt.CanceledError=rt,Bt.CancelToken=Mt,Bt.isCancel=et,Bt.VERSION="1.8.4",Bt.toFormData=Pe,Bt.AxiosError=Ee,Bt.Cancel=Bt.CanceledError,Bt.all=function(e){return Promise.all(e)},Bt.spread=function(e){return function(t){return e.apply(null,t)}},Bt.isAxiosError=function(e){return we.isObject(e)&&!0===e.isAxiosError},Bt.mergeConfig=ut,Bt.AxiosHeaders=Xe,Bt.formToJSON=e=>Fe(we.isHTMLForm(e)?new FormData(e):e),Bt.getAdapter=kt,Bt.HttpStatusCode=Ut,Bt.default=Bt;const Ft=Bt;var Vt=__webpack_require__(1111);const Gt="axios-retry";function Kt(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&Vt(e)}const Jt=["get","head","options"],Ht=Jt.concat(["put","delete"]);function Zt(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Wt(e){return!!e.config?.method&&Zt(e)&&-1!==Ht.indexOf(e.config.method)}function Yt(e){return Kt(e)||Wt(e)}function Xt(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 Qt={retries:3,retryCondition:Yt,retryDelay:function(e=0,t=void 0){return Math.max(0,Xt(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function er(e,t,r=!1){const n=function(e,t){return{...Qt,...t,...e[Gt]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[Gt]=n,n}const tr=(e,t)=>{const r=e.interceptors.request.use((e=>(er(e,t,!0),e[Gt]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const o=er(n,t);return r.response&&o.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,o=(e.retryCount||0)<r&&n(t);if("object"==typeof o)try{return!1!==await o}catch(e){return!1}return o}(o,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:s}=t,a=o(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,o=n.timeout-e-a;if(o<=0)return Promise.reject(r);n.timeout=o}return n.transformRequest=[e=>e],await s(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(o),t(e(n))},o=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,o,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(o,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};tr.isNetworkError=Kt,tr.isSafeRequestError=function(e){return!!e.config?.method&&Zt(e)&&-1!==Jt.indexOf(e.config.method)},tr.isIdempotentRequestError=Wt,tr.isNetworkOrIdempotentRequestError=Yt,tr.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,o=Math.max(n,Xt(t));return o+.2*o*Math.random()},tr.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,Xt(r))}},tr.isRetryableError=Zt;const rr=tr;var nr=__webpack_require__(6022);class or extends Error{}or.prototype.name="InvalidTokenError";var ir=__webpack_require__(4874);const sr={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!sr._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof sr.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new sr.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()}}},ar=sr,cr={common1:{type:"string"},common2:{format:"email",type:"string"},common3:{type:"boolean"},common4:{format:"uri",type:"string"},common5:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common6:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},required:["id"],type:"object"},common7:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},common8:{additionalProperties:!1,properties:{reason:{default:"",type:"string"}},required:["reason"],type:"object"},common9:{reason:{default:"",type:"string"}},common10:{default:"",type:"string"},common11:{pattern:"^[a-f0-9]{24}$",type:"string"},common12:{const:"citoyens"},common13:{properties:{value:{type:"boolean"}}},common14:{value:{type:"boolean"}},common15:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},common16:{},common17:{else:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}}},common18:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},common19:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},common20:{properties:{typeElement:{const:"citoyens"}}},common21:{typeElement:{const:"citoyens"}},common22:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}},common23:{not:{type:"null"}},common24:{type:"null"},common25:{anyOf:[{items:{type:"string"},type:"array"},{enum:[""],type:"string"}]},common26:{items:{type:"string"},type:"array"},common27:{enum:[""],type:"string"},common28:{properties:{name:{not:{type:"null"}}},required:["name"]},common29:{name:{not:{type:"null"}}},common30:{properties:{url:{not:{type:"null"}}},required:["url"]},common31:{url:{not:{type:"null"}}},common32:{properties:{tags:{not:{type:"null"}}},required:["tags"]},common33:{tags:{not:{type:"null"}}},common34:{properties:{email:{not:{type:"null"}}},required:["email"]},common35:{email:{not:{type:"null"}}},common36:{const:"info",default:"info",type:"string"},common37:{$ref:"#/$defs/sharedFields/email"},common38:{$ref:"#/$defs/sharedFields/name"},common39:{$ref:"#/$defs/sharedFields/tags"},common40:{$ref:"#/$defs/sharedFields/url"},common41:{const:"projects"},common42:{name:{type:"string"},type:{type:"string"}},common43:{const:"organizations"},common44:{$ref:"#/$defs/socialField"},common45:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},common46:{id:{pattern:"^[a-f0-9]{24}$"}},common47:{pattern:"^[a-f0-9]{24}$"},common48:{additionalProperties:!1,properties:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],type:"object"},common49:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},common50:{const:"PostalAddress",type:"string"},common51:{minLength:0,type:"string"},common52:{additionalProperties:!1,properties:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},required:["latitude","longitude"],type:"object"},common53:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},common54:{const:"GeoCoordinates",type:"string"},common55:{type:["string","number"]},common56:{additionalProperties:!0,properties:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},required:["type","coordinates","float"],type:"object"},common57:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},common58:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},common59:{type:"number"},common60:{const:!0,default:!0,type:"boolean"},common61:{const:"Point",type:"string"},common62:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common63:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common64:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"},common65:{maxLength:100,minLength:3,pattern:"^[a-zA-Z0-9]+$",type:"string"},common66:{properties:{type:{const:"citoyens"}}},common67:{type:{const:"citoyens"}},common68:{additionalProperties:!1,else:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{folder:{const:"citoyens"}}},properties:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},required:["folder","ownerId"],then:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common69:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},common70:{ownerId:{pattern:"^[a-f0-9]{24}$"}},common71:{properties:{folder:{const:"citoyens"}}},common72:{folder:{const:"citoyens"}},common73:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},common74:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common75:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common76:{additionalProperties:!1,else:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{type:{const:"citoyens"}}},properties:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},required:["type","id"],then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common77:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},common78:{properties:{parentId:{pattern:"^[a-f0-9]{24}$"}}},common79:{parentId:{pattern:"^[a-f0-9]{24}$"}},common80:{properties:{parentType:{const:"citoyens"}}},common81:{parentType:{const:"citoyens"}},common82:{properties:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common83:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common84:{default:!0,type:"boolean"},common85:{required:["text"]},common86:{required:["mediaImg"]},common87:{required:["mediaFile"]},common88:{additionalProperties:!1,properties:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},required:["countFiles","files"],type:"object"},common89:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},common90:{additionalProperties:!1,properties:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},required:["countImages","images"],type:"object"},common91:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},common92:{items:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},type:"array"},common93:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common94:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common95:{minimum:1,type:"integer"},common96:{default:"public",enum:["public","private","restricted"],type:"string"},common97:{const:"news",default:"news",type:"string"},common98:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},required:["id"],type:"object"},common99:{default:!1,type:"boolean"},common100:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},required:["type","id"],type:"object"},common101:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},common102:{default:"news",enum:["news"],type:"string"},common103:{items:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},type:"array"},common104:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common105:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common106:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],type:"string"},common107:{const:!1,default:!1,type:"boolean"},common108:{const:"",default:"",type:"string"},common109:{additionalProperties:!1,properties:{indexMax:{type:"number"},indexMin:{type:"number"}},required:["indexMin","indexMax"],type:"object"},common110:{indexMax:{type:"number"},indexMin:{type:"number"}},common111:{default:0,minimum:0,type:"integer"},common112:{const:["projects"],default:["projects"],items:{enum:["projects"],type:"string"},type:"array"},common113:{enum:["projects"],type:"string"},common114:{$exists:!0},common115:{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},common116:{$exists:{const:!0}},common117:{const:!0},common118:{default:30,type:"integer"},common119:{const:["poi"],default:["poi"],items:{enum:["poi"],type:"string"},type:"array"},common120:{enum:["poi"],type:"string"},common121:{const:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],default:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],items:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},type:"array"},common122:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},common123:{$exists:!1},common124:{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},common125:{$exists:{const:!1}},common126:{const:!1},common127:{const:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],default:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],items:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},type:"array"},common128:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common129:{additionalProperties:!1,properties:{$exists:{default:!1,type:"boolean"}},required:["$exists"],type:"object"},common130:{$exists:{default:!1,type:"boolean"}},common131:{additionalProperties:!1,properties:{$in:{items:{type:"string"},minItems:1,type:"array"}},required:["$in"],type:"object"},common132:{$in:{items:{type:"string"},minItems:1,type:"array"}},common133:{items:{type:"string"},minItems:1,type:"array"},common134:{const:["citoyens"],default:["citoyens"],items:{enum:["citoyens"],type:"string"},type:"array"},common135:{enum:["citoyens"],type:"string"},common136:{const:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],default:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],items:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},type:"array"},common137:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},common138:{not:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common139:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common140:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common141:{"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"}},common142:{not:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common143:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common144:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common145:{const:["badges"],default:["badges"],items:{enum:["badges"],type:"string"},type:"array"},common146:{enum:["badges"],type:"string"},common147:{const:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],default:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],items:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},type:"array"},common148:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common149:{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"},common150:{$exists:{const:!0,type:"boolean"}},common151:{const:!0,type:"boolean"},common152:{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},common153:{$exists:{const:!1,type:"boolean"}},common154:{const:!1,type:"boolean"},common155:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"}},common156:{indexMax:30,indexMin:0},common157:{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{connectType:{const:"friend",default:"friend"}}}},common158:{properties:{connectType:{const:"friend",default:"friend"}}},common159:{connectType:{const:"friend",default:"friend"}},common160:{const:"friend",default:"friend"},common161:{if:{properties:{parentType:{const:"organizations"}}},then:{properties:{connectType:{enum:["admin","member"]}}}},common162:{properties:{parentType:{const:"organizations"}}},common163:{parentType:{const:"organizations"}},common164:{properties:{connectType:{enum:["admin","member"]}}},common165:{connectType:{enum:["admin","member"]}},common166:{enum:["admin","member"]},common167:{if:{properties:{parentType:{const:"projects"}}},then:{properties:{connectType:{enum:["admin","contributor"]}}}},common168:{properties:{parentType:{const:"projects"}}},common169:{parentType:{const:"projects"}},common170:{properties:{connectType:{enum:["admin","contributor"]}}},common171:{connectType:{enum:["admin","contributor"]}},common172:{enum:["admin","contributor"]},common173:{properties:{parentType:{const:"events"}}},common174:{parentType:{const:"events"}},common175:{const:"events"},common176:{default:"@userId",pattern:"^([a-f0-9]{24}|@\\w+)$",type:"string"},common177:{const:"citoyens",default:"citoyens",enum:["citoyens"],type:"string"},common178:{enum:["citoyens","organizations","projects","events"],type:"string"},common179:{const:"citoyens",default:"citoyens",type:"string"},common180:{const:"@userId",default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common181:{additionalProperties:!1,default:{"@userId":{type:"citoyens"}},patternProperties:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},type:"object"},common182:{"@userId":{type:"citoyens"}},common183:{type:"citoyens"},common184:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},common185:{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"},common186:{const:"poi",default:"poi",type:"string"},common187:{format:"date-time",type:"string"},common188:{pattern:"^([01]\\d|2[0-3]):[0-5]\\d$",type:"string"}},lr=[{auth:"none",constant:"PERSON_REGISTER",contentType:"application/x-www-form-urlencoded",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/register",request:{additionalProperties:!1,properties:{app:cr.common1,email:cr.common2,isInvitation:cr.common3,mode:cr.common1,name:cr.common1,pendingUserId:cr.common1,pwd:cr.common1,username:cr.common1},required:["name","username","email","pwd"],type:"object"}},{auth:"none",constant:"AUTHENTICATE_URL",contentType:"application/json",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/api/cocolight/authenticate",postActions:[{path:"accessToken",type:"setToken"},{path:"refreshToken",type:"setRefreshToken"},{event:"userLoggedIn",path:"user",type:"emitEvent"}],request:{additionalProperties:!1,properties:{email:cr.common2,password:cr.common1},required:["email","password"],type:"object"}},{auth:"none",constant:"REFRESH_TOKEN_URL",contentType:"application/json",method:"POST",path:"/api/cocolight/refreshtoken",request:{additionalProperties:!1,properties:{refreshToken:cr.common1},required:["refreshToken"],type:"object"}},{auth:"bearer",constant:"ME_INFO_URL",contentType:"application/json",method:"POST",path:"/api/cocolight/me"},{auth:"none",constant:"PASSWORD_RECOVERY",contentType:"application/x-www-form-urlencoded",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/sendemail",request:{additionalProperties:!1,properties:{email:cr.common2,type:{const:"password",default:"password",type:"string"}},required:["email","type"],type:"object"}},{auth:"bearer",constant:"SERVER_EXCHANGE_TOKEN",contentType:"application/json",method:"POST",path:"/api/cocolight/exchangetoken",request:{additionalProperties:!1,properties:{serverUrl:cr.common4},required:["serverUrl"],type:"object"}},{auth:"bearer",constant:"CHANGE_PASSWORD",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/person/changepassword",request:{additionalProperties:!1,properties:{mode:{const:"changePassword",default:"changePassword",type:"string"},newPassword:cr.common1,newPassword2:cr.common1,oldPassword:cr.common1,scope:{default:"",type:["string"]},userId:cr.common5},required:["mode","userId","oldPassword","newPassword","newPassword2"],type:"object"}},{auth:"bearer",constant:"DELETE_ACCOUNT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/id/{id}/type/citoyens",pathParams:cr.common6,postActions:[{type:"resetSession"},{event:"accountDeleted",path:null,type:"emitEvent"}],request:cr.common8},{auth:"bearer",constant:"UPDATE_SETTINGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatesettings",request:{additionalProperties:!1,allOf:[{else:{properties:{idEntity:cr.common11}},if:{properties:{typeEntity:cr.common12}},then:{properties:{idEntity:cr.common5}}},{if:{properties:{type:{enum:["birthDate","email","locality","phone","directory"]},typeEntity:cr.common12}},then:{properties:{value:{enum:["private","public","mask"],type:"string"}}}},{if:{properties:{type:{enum:["activitypub","isOpenData"]},typeEntity:cr.common12}},then:cr.common13},{if:{properties:{type:{enum:["isOpenData","isOpenEdition","private","feedback"]},typeEntity:{not:cr.common12}}},then:cr.common13}],properties:{idEntity:cr.common1,type:cr.common1,typeEntity:cr.common15,value:cr.common16},required:["type","value","typeEntity","idEntity"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_DESCRIPTION",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{additionalProperties:!1,allOf:[cr.common17,{anyOf:[{properties:{description:cr.common23},required:["description"]},{properties:{shortDescription:cr.common23},required:["shortDescription"]}]}],properties:{block:{const:"descriptions",default:"descriptions",type:"string"},descMentions:cr.common10,description:cr.common1,id:cr.common1,scope:{default:"",type:["string","null"]},shortDescription:cr.common1,typeElement:cr.common15},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_INFO",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{$defs:{sharedFields:{email:cr.common2,name:cr.common1,tags:cr.common25,url:cr.common4}},allOf:[{if:cr.common20,then:{additionalProperties:!1,anyOf:[cr.common28,{properties:{birthDate:cr.common23},required:["birthDate"]},{properties:{fixe:cr.common23},required:["fixe"]},{properties:{mobile:cr.common23},required:["mobile"]},cr.common30,cr.common32,cr.common34],properties:{birthDate:{format:"date",type:"string"},block:cr.common36,email:cr.common37,fixe:cr.common1,id:cr.common5,mobile:cr.common1,name:cr.common38,scope:cr.common10,tags:cr.common39,typeElement:cr.common15,url:cr.common40}}},{if:{properties:{typeElement:cr.common41}},then:{additionalProperties:!1,anyOf:[cr.common28,cr.common30,cr.common32,cr.common34,{properties:{avancement:cr.common23},required:["avancement"]},{properties:{parent:cr.common23},required:["parent"]}],properties:{avancement:{enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],type:"string"},block:cr.common36,email:cr.common37,id:cr.common1,name:cr.common38,parent:{additionalProperties:!1,patternProperties:{"^[a-fA-F0-9]{24}$":{additionalProperties:!1,properties:cr.common42,required:["type","name"],type:"object"}},type:"object"},scope:cr.common10,tags:cr.common39,typeElement:cr.common15,url:cr.common40}}},{if:{properties:{typeElement:cr.common43}},then:{additionalProperties:!1,anyOf:[cr.common28,cr.common30,cr.common32,cr.common34,{properties:{type:cr.common23},required:["type"]}],properties:{block:cr.common36,email:cr.common37,id:cr.common1,name:cr.common38,scope:cr.common10,tags:cr.common39,type:{enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],type:"string"},typeElement:cr.common15,url:cr.common40}}}],properties:{block:cr.common36,id:cr.common1,scope:cr.common10,typeElement:cr.common15},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SOCIAL",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{$defs:{socialField:{anyOf:[cr.common27,cr.common4]}},allOf:[cr.common17,{anyOf:[{properties:{gitlab:cr.common23},required:["gitlab"]},{properties:{github:cr.common23},required:["github"]},{properties:{twitter:cr.common23},required:["twitter"]},{properties:{facebook:cr.common23},required:["facebook"]},{properties:{instagram:cr.common23},required:["instagram"]},{properties:{diaspora:cr.common23},required:["diaspora"]},{properties:{mastodon:cr.common23},required:["mastodon"]},{properties:{telegram:cr.common23},required:["telegram"]},{properties:{signal:cr.common23},required:["signal"]}]}],properties:{block:{const:"network",default:"network",type:"string"},diaspora:cr.common44,facebook:cr.common44,github:cr.common44,gitlab:cr.common44,id:cr.common1,instagram:cr.common44,mastodon:cr.common44,scope:cr.common10,signal:cr.common44,telegram:cr.common44,twitter:cr.common44,typeElement:cr.common15},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_LOCALITY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:cr.common45,if:cr.common20,properties:{address:cr.common48,block:{const:"localities",default:"localities",type:"string"},geo:cr.common52,geoPosition:cr.common56,id:cr.common1,scope:cr.common10,typeElement:cr.common15},required:["block","typeElement","id","address"],then:cr.common62,type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SLUG",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:cr.common45,if:cr.common20,properties:{block:cr.common36,id:cr.common1,scope:cr.common10,slug:cr.common65,typeElement:cr.common15},required:["block","typeElement","id","slug"],then:cr.common62,type:"object"}},{auth:"bearer",constant:"CHECK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/check",request:{additionalProperties:!1,else:cr.common45,if:cr.common66,properties:{block:cr.common36,id:cr.common1,slug:cr.common65,type:cr.common15},required:["block","type","id","slug"],then:cr.common62,type:"object"}},{auth:"bearer",constant:"PROFIL_IMAGE",contentType:"multipart/form-data",method:"POST",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/profil_avatar/contentKey/profil/docType/image",pathParams:cr.common68,request:{additionalProperties:!1,properties:{profil_avatar:cr.common16},required:["profil_avatar"],type:"object"}},{auth:"none",constant:"GET_ELEMENTS_ABOUT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/about/type/{type}/id/{id}/json/true",pathParams:cr.common76,request:{additionalProperties:!1,properties:{tpl:{const:"ficheInfoElement",default:"ficheInfoElement",type:"string"}},required:["tpl"],type:"object"}},{auth:"bearer",constant:"MULTICONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/multiconnect",request:{additionalProperties:!1,else:cr.common78,if:cr.common80,properties:{listInvite:{additionalProperties:!1,patternProperties:{"^(citoyens|projects|organizations)$":{additionalProperties:!1,patternProperties:{"^[0-9a-fA-F]{24}$":{additionalProperties:!1,properties:{name:cr.common1},required:["name"],type:"object"}},type:"object"}},type:"object"},parentId:cr.common1,parentType:cr.common15},required:["parentId","parentType","listInvite"],then:cr.common82,type:"object"}},{auth:"none",constant:"GET_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/get/type/{type}/id/{id}/isLive/{isLive}/json/true",pathParams:{additionalProperties:!1,else:cr.common45,if:cr.common66,properties:{id:cr.common1,isLive:cr.common84,type:cr.common15},required:["isLive","type","id"],then:cr.common62,type:"object"},request:{additionalProperties:!1,properties:{dateLimit:{default:0,type:"integer"},indexStep:{default:12,type:"integer"},search:{additionalProperties:!1,properties:{name:cr.common10},required:["name"],type:"object"}},required:["dateLimit","indexStep"],type:"object"}},{auth:"none",constant:"GET_NEWS_BY_ID",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/getbyids",request:{additionalProperties:!1,properties:{ids:{items:cr.common11,type:"array"}},required:["ids"],type:"object"}},{auth:"bearer",constant:"ADD_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/save",request:{additionalProperties:!1,anyOf:[cr.common85,cr.common86,cr.common87],else:cr.common78,if:cr.common80,properties:{json:cr.common60,markdownActive:cr.common84,mediaFile:cr.common88,mediaImg:cr.common90,mentions:cr.common92,parentId:cr.common1,parentType:cr.common15,scope:cr.common96,tags:cr.common25,text:cr.common1,type:cr.common97},required:["scope","markdownActive","parentId","parentType","type","json"],then:cr.common82,type:"object"}},{auth:"bearer",constant:"ADD_IMAGE_NEWS",contentType:"multipart/form-data",method:"POST",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/newsImage/docType/image/contentKey/slider",pathParams:cr.common68,request:{additionalProperties:!1,properties:{newsImage:cr.common16},required:["newsImage"],type:"object"}},{auth:"bearer",constant:"ADD_FILE_NEWS",contentType:"multipart/form-data",method:"POST",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}}/input/newsFile/docType/file",pathParams:cr.common68,request:{additionalProperties:!1,properties:{newsFile:cr.common16},required:["newsFile"],type:"object"}},{auth:"bearer",constant:"DELETE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/delete/id/{id}",pathParams:cr.common98,request:{additionalProperties:!1,properties:{isLive:cr.common99},required:["isLive"],type:"object"}},{auth:"bearer",constant:"UPDATE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/update",request:{additionalProperties:!1,anyOf:[cr.common85,cr.common86,cr.common87],else:cr.common78,if:cr.common80,properties:{idNews:cr.common11,markdownActive:cr.common84,mediaFile:cr.common88,mediaImg:cr.common90,mentions:cr.common92,parentId:cr.common1,parentType:cr.common15,scope:cr.common96,tags:cr.common25,text:cr.common1,type:cr.common97},required:["idNews","scope","markdownActive","parentId","parentType","type"],then:cr.common82,type:"object"}},{auth:"bearer",constant:"SHARE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,else:{properties:{childId:cr.common47}},if:{properties:{childType:cr.common12}},properties:{childId:cr.common11,childType:cr.common15,comment:cr.common1,connectType:{const:"share",default:"share",type:"string"},parentId:cr.common11,parentType:cr.common97},required:["parentId","parentType","childId","childType","connectType"],then:{properties:{childId:cr.common64}},type:"object"}},{auth:"none",constant:"GET_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/index/type/{type}/id/{id}/json/true",pathParams:cr.common100},{auth:"bearer",constant:"ADD_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/save",request:{additionalProperties:!1,properties:{argval:cr.common10,contextId:cr.common11,contextType:cr.common102,mentions:cr.common103,parentCommentId:cr.common11,path:cr.common10,text:cr.common1},required:["text","contextId","contextType"],type:"object"}},{auth:"bearer",constant:"DELETE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/delete/id/{id}",pathParams:cr.common98},{auth:"bearer",constant:"UPDATE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/update",request:{additionalProperties:!1,properties:{id:cr.common11,params:{properties:{mentions:cr.common103,text:cr.common1},required:["text"],type:"object"}},required:["id","params"],type:"object"}},{auth:"none",constant:"SEARCH_TAGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/tags/search?q={q}",pathParams:{additionalProperties:!1,properties:{q:cr.common1},required:["q"],type:"object"}},{auth:"none",constant:"SHOW_VOTE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/action/list/type/{type}/id/{id}/actionType/vote/json/true",pathParams:cr.common100},{auth:"none",constant:"GLOBAL_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:{const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],items:cr.common106,type:"array"},fediverse:cr.common107,filters:cr.common108,indexMin:{const:0,default:0,type:"number"},indexStep:cr.common59,initType:cr.common108,locality:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":{additionalProperties:!1,properties:{id:cr.common1,type:{enum:["cities","level1"],type:"string"}},required:["id","type"],type:"object"}},type:"object"},name:cr.common1,notSourceKey:cr.common60,ranges:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":cr.common109},type:"object"},searchTags:cr.common26,searchType:{items:cr.common106,type:"array"}},required:["name","searchType","countType","indexMin","indexStep","initType","count","notSourceKey","filters","fediverse"],type:"object"}},{auth:"none",constant:"CITY_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{indexMax:{minimum:5,type:"integer"},indexMin:{minimum:0,type:"integer"},locality:cr.common108,name:cr.common1,searchBy:{const:"ALL",default:"ALL",type:"string"},searchType:{const:["cities"],default:["cities"],items:{enum:["cities"],type:"string"},type:"array"}},required:["name","locality","searchType"],type:"object"}},{auth:"none",constant:"SUGGESTION_INPUT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{indexMax:{default:20,minimum:20,type:"integer"},indexMin:cr.common111,name:cr.common1,searchType:{items:{enum:["organizations","projects","poi"],type:"string"},type:"array"}},required:["name","searchType","indexMin","indexMax"],type:"object"}},{auth:"none",constant:"GET_PROJECTS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common112,fediverse:cr.common107,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@userId":cr.common114,"parent.@userId":cr.common114},"links.contributors.@userId":cr.common114},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115,"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115},type:"object"}},required:["$or"],type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common112},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_PROJECTS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:cr.common76,request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common112,fediverse:cr.common107,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@{pathParams.id}":cr.common114,"parent.@{pathParams.id}":cr.common114},"links.contributors.@{pathParams.id}":cr.common114},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115,"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115},type:"object"}},required:["$or"],type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common112},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_POIS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common119,fediverse:cr.common107,filters:{additionalProperties:!1,default:{"parent.@userId":cr.common114},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common119},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_POIS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:cr.common76,request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common119,fediverse:cr.common107,filters:{additionalProperties:!1,default:{"parent.@{pathParams.id}":cr.common114},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common119},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_ORGANIZATIONS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common121,fediverse:cr.common107,filters:{additionalProperties:!1,default:{"links.members.@userId":cr.common114,"links.members.@userId.isInviting":cr.common123,"links.members.@userId.toBeValidated":cr.common123},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":cr.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":cr.common124},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common121},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_ORGANIZATIONS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:{additionalProperties:!1,else:cr.common45,if:cr.common66,properties:{id:cr.common1,type:{default:"citoyens",enum:["citoyens","organizations"],type:"string"}},required:["type","id"],then:cr.common62,type:"object"},request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common121,fediverse:cr.common107,filters:{additionalProperties:!1,default:{"links.members.@{pathParams.id}":cr.common114,"links.members.@{pathParams.id}.isInviting":cr.common123,"links.members.@{pathParams.id}.toBeValidated":cr.common123},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common124},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common121},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_MEMBERS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common127,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)$)"}}},{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$)"}}}],patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":cr.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":cr.common129,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":cr.common131,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":cr.common124},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common127},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_MEMBERS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/organizations/id/{id}/canSee/true",pathParams:cr.common98,request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common127,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.memberOf.@{pathParams.id}":cr.common114,"links.memberOf.@{pathParams.id}.isInviting":cr.common123,"links.memberOf.@{pathParams.id}.toBeValidated":cr.common123},patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":cr.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common129,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":cr.common131,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common129},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common127},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_FRIENDS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/citoyens/id/{id}/canSee/true",pathParams:cr.common6,request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common134,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.friends.@{pathParams.id}":cr.common114,"links.friends.@{pathParams.id}.isInviting":cr.common123,"links.friends.@{pathParams.id}.toBeValidated":cr.common123},patternProperties:{"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common129,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common129},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common134},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_SUBSCRIPTIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common136,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[cr.common138],default:{"links.followers.@userId":cr.common114,"links.followers.@{userId}.isInviting":cr.common123,"links.followers.@{userId}.toBeValidated":cr.common123},patternProperties:cr.common141,type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common136},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_SUBSCRIPTIONS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/citoyens/id/{id}/canSee/true",pathParams:cr.common6,request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common136,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[cr.common138],default:{"links.followers.@{pathParams.id}":cr.common114,"links.followers.@{pathParams.id}.isInviting":cr.common123,"links.followers.@{pathParams.id}.toBeValidated":cr.common123},patternProperties:cr.common141,type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common136},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_SUBSCRIBERS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common134,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[cr.common142],default:{"links.follows.@userId":cr.common114,"links.follows.@{userId}.isInviting":cr.common123,"links.follows.@{userId}.toBeValidated":cr.common123},patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common124,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common124},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common134},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_SUBSCRIBERS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:{additionalProperties:!1,allOf:[{else:cr.common45,if:cr.common66,then:cr.common62}],properties:{id:cr.common1,type:{default:"citoyens",enum:["citoyens","organizations","projects"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common134,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[cr.common142],default:{"links.follows.@{pathParams.id}":cr.common114},maxProperties:1,minProperties:1,patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common134},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_CONTRIBUTORS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common127,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)$)"}}},{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$)"}}}],patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":cr.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":cr.common129,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":cr.common131,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":cr.common124},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common127},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_CONTRIBUTORS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/projects/id/{id}/canSee/true",pathParams:cr.common98,request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common127,fediverse:cr.common107,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.projects.@{pathParams.id}":cr.common114,"links.projects.@{pathParams.id}.isInviting":cr.common123,"links.projects.@{pathParams.id}.toBeValidated":cr.common123},patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":cr.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":cr.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":cr.common129,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":cr.common131,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":cr.common129},type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common127},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common145,fediverse:cr.common107,filters:{properties:{$or:{additionalProperties:!1,minProperties:1,patternProperties:{"^issuer\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common115},type:"object"},isParcours:cr.common3,"preferences.private":cr.common107},required:["preferences.private"],type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,searchType:cr.common145},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_BADGES_FILTERS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:cr.common60,countType:cr.common147,fediverse:cr.common107,fields:cr.common145,filters:{oneOf:[{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common149}},{additionalProperties:!1,maxProperties:3,minProperties:3,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":cr.common149,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":cr.common152,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":cr.common152}},{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:cr.common155},{additionalProperties:!1,maxProperties:1,minProperties:1,properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:cr.common155,type:"object"}},required:["$or"]},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.revoke$":cr.common151}},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":cr.common149}}],type:"object"},indexMin:cr.common111,indexStep:cr.common118,initType:cr.common108,locality:cr.common108,name:cr.common1,notSourceKey:cr.common60,ranges:{additionalProperties:!1,default:{Cooperative:cr.common156,GovernmentOrganization:cr.common156,Group:cr.common156,LocalBusiness:cr.common156,NGO:cr.common156,citoyens:cr.common156,projects:cr.common156},maxProperties:7,minProperties:7,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":cr.common109},type:"object"},searchType:cr.common147},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"CONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/connect",request:{additionalProperties:!1,allOf:[cr.common157,cr.common161,cr.common167,{if:cr.common173,then:{properties:{connectType:{default:"attendee",enum:["attendee","connect"]}}}}],properties:{childId:cr.common176,childType:cr.common177,connectType:{enum:["admin","member","contributor","attendee","friend","connect"],type:"string"},parentId:cr.common11,parentType:cr.common178},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"bearer",constant:"DISCONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/disconnect",request:{additionalProperties:!1,allOf:[cr.common157,cr.common161,cr.common167,{if:cr.common173,then:{properties:{connectType:{const:"attendee",default:"attendee"}}}}],properties:{childId:cr.common176,childType:cr.common177,connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:cr.common11,parentType:cr.common178},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"none",constant:"GET_ELEMENTS_KEY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/getinfo/key/{slug}",pathParams:{additionalProperties:!1,properties:{slug:{pattern:"^([a-zA-Z0-9-_]+)$",type:"string"}},required:["slug"],type:"object"}},{auth:"bearer",constant:"GET_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/config/type/citoyens/id/{id}/json/true",pathParams:cr.common6},{auth:"bearer",constant:"DELETE_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue?index={index}",pathParams:{properties:{index:cr.common59},type:"object"},request:{additionalProperties:!1,properties:{collection:cr.common179,id:cr.common180,path:{const:"preferences.search.@{pathParams.index}",default:"preferences.search.@{pathParams.index}",type:"string"},pull:{const:"preferences.search",type:"string"},value:cr.common108},required:["id","collection","path","pull","value"],type:"object"}},{auth:"bearer",constant:"ADD_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue",request:{additionalProperties:!1,properties:{arrayForm:cr.common151,collection:cr.common179,id:cr.common180,path:{const:"preferences.search",default:"preferences.search",type:"string"},value:{additionalProperties:!1,properties:{description:cr.common1,locality:{patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:cr.common42,required:["name","type"]}},type:"object"},name:cr.common1,tags:cr.common26,url:cr.common1},required:["url","name"],type:"object"}},required:["id","collection","path","arrayForm","value"],type:"object"}},{auth:"bearer",constant:"ADD_ORGANIZATION",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:cr.common48,collection:{const:"organizations",default:"organizations",type:"string"},email:cr.common2,geo:cr.common52,geoPosition:cr.common56,id:cr.common11,key:{const:"organization",default:"organization",type:"string"},name:{minLength:3,type:"string"},preferences:{default:{isOpenData:!0,isOpenEdition:!0},properties:{isOpenData:cr.common84,isOpenEdition:cr.common84},required:["isOpenData","isOpenEdition"],type:"object"},role:{enum:["admin","member"],type:"string"},scope:cr.common108,shortDescription:cr.common1,tags:cr.common26,type:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},url:cr.common4},required:["id","collection","key","name","type","role","scope"],type:"object"}},{auth:"bearer",constant:"ADD_PROJECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:cr.common48,collection:{const:"projects",default:"projects",type:"string"},geo:cr.common52,geoPosition:cr.common56,id:cr.common11,key:{const:"project",default:"project",type:"string"},name:cr.common1,parent:cr.common181,preferences:{default:{crowdfunding:!0,isOpenData:!1,isOpenEdition:!1},properties:{crowdfunding:cr.common84,isOpenData:cr.common99,isOpenEdition:cr.common99},required:["isOpenData","isOpenEdition"],type:"object"},public:cr.common84,scope:cr.common108,shortDescription:cr.common1,tags:cr.common26,url:cr.common4},required:["id","collection","key","parent","name","public","scope"],type:"object"}},{auth:"bearer",constant:"ADD_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:cr.common48,collection:cr.common186,description:cr.common1,geo:cr.common52,geoPosition:cr.common56,id:cr.common11,key:cr.common186,name:cr.common1,parent:cr.common181,scope:cr.common108,tags:cr.common26,type:{enum:["link","tool","machine","software","rh","Resource material","Financial Ressource","ficheBlanche","geoJson","compostPickup","video","sharedLibrary","recoveryCenter","trash","history","something2See","funPlace","place","artPiece","streetArts","openScene","stand","parking","other"],type:"string"},urls:cr.common26},required:["id","collection","key","parent","type","name"],type:"object"}},{auth:"bearer",constant:"ADD_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,else:{required:["openingHours"]},if:{properties:{recurrency:cr.common126}},properties:{address:cr.common48,collection:{const:"events",default:"events",type:"string"},email:cr.common2,endDate:cr.common187,geo:cr.common52,geoPosition:cr.common56,id:cr.common11,key:{const:"event",default:"event",type:"string"},name:cr.common1,openingHours:{default:["","","","","","",""],items:{anyOf:[{const:"",type:"string"},{additionalProperties:!1,properties:{dayOfWeek:{enum:["Mo","Tu","We","Th","Fr","Sa","Su"],type:"string"},hours:{default:[],items:{additionalProperties:!1,properties:{closes:cr.common188,opens:cr.common188},required:["opens","closes"],type:"object"},type:"array"}},required:["dayOfWeek","hours"],type:"object"}]},maxItems:7,minItems:7,type:"array"},organizer:cr.common181,parent:{additionalProperties:!1,patternProperties:cr.common184,type:"object"},preferences:{default:{isOpenData:!1,isOpenEdition:!1},properties:{isOpenData:cr.common99,isOpenEdition:cr.common99},required:["isOpenData","isOpenEdition"],type:"object"},public:cr.common84,recurrency:cr.common99,scope:cr.common108,shortDescription:cr.common1,startDate:cr.common187,tags:cr.common26,timeZone:cr.common1,type:{enum:["workshop","competition","concert","contest","conference","debate","exhibition","festival","crowdfunding","fair","course","protest","market","film","getTogether","meeting","spectacle","internship","stand","others"],type:"string"},url:cr.common4},required:["id","collection","key","organizer","type","name","scope"],startBeforeEnd:!0,then:{required:["startDate","endDate"]},type:"object"}},{auth:"bearer",constant:"DELETE_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/poi/id/{id}",pathParams:cr.common98,request:cr.common8},{auth:"bearer",constant:"DELETE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/events/id/{id}/",pathParams:cr.common98,request:cr.common8},{auth:"bearer",constant:"DELETE_ELEMENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/{type}/id/{id}",pathParams:{additionalProperties:!1,properties:{id:cr.common11,type:cr.common1},required:["type","id"],type:"object"},request:cr.common8},{auth:"bearer",constant:"ADD_IMAGE_ELEMENT",contentType:"multipart/form-data",method:"POST",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/qqfile/docType/image/contentKey/profil",pathParams:{additionalProperties:!1,properties:{folder:{enum:["badges","events"],type:"string"},ownerId:cr.common11},required:["folder","ownerId"],type:"object"},request:{additionalProperties:!1,properties:{qqfile:cr.common16,qqfilename:cr.common1,qqtotalfilesize:{type:"integer"},qquuid:cr.common11},required:["qquuid","qqfilename","qqtotalfilesize","qqfile"],type:"object"}}];var dr=__webpack_require__(1027);nr.addType("oid",(e=>new ar.ObjectID(e)));class ur extends b.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:o="/api/cocolight/refreshtoken",endpoints:i=lr,timeout:s=3e4,debug:a=!1,maxRetries:c=0,circuitBreakerThreshold:l=5,circuitBreakerResetTime:d=6e4,fromJSONValue:u=!0,tokenStorageStrategy:p=null}={}){if(super(),!e)throw new n('Le paramètre "baseURL" est obligatoire.',500);this.__entityTag="ApiClient",this._baseURL=e,this._refreshUrl=o,this._endpoints=i,this._debug=a;let m=null;this._fromJSONValue=u,Object.defineProperty(this,"userId",{get:()=>m,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{m=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new k({strict:!1,useDefaults:!0,allErrors:!0,verbose:!0}),A(this._ajv),this._ajv.addKeyword({keyword:"startBeforeEnd",type:"object",errors:!0,validate:this._startBeforeEndValidate}),this._logger=ir({transport:{target:"pino-pretty",options:{colorize:!0}},level:a?"debug":"info"}),this._client=Ft.create({baseURL:e,timeout:s}),c>0&&(rr(this._client,{retries:c,retryDelay:rr.exponentialDelay,retryCondition:e=>rr.isNetworkError(e)||rr.isRetryableError(e)}),this._logger.info(`[ApiClient] Retry activé : ${c} max`)),this._breakerThreshold=l,this._breakerResetTime=d,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,this._accessToken=null,this._refreshToken=null,r&&this.setRefreshToken(r),t&&this.setToken(t),this._tokenStorage=p||new dr.GN;const f=this._tokenStorage.getAccessToken();f&&this.setToken(f);const h=this._tokenStorage.getRefreshToken();h&&this.setRefreshToken(h),this._client.interceptors.response.use((e=>e),(async e=>{const t=e.config;if(t._retry)throw this._logger.error("[ApiClient] Requête déjà retentée, échec définitif."),e;if(e.response&&401===e.response.status&&this._refreshToken){t._retry=!0;try{if(this._logger.info("[ApiClient] Tentative de refresh du token..."),await this._refreshAccessToken())return this._logger.info("[ApiClient] Token rafraîchi avec succès."),t.headers.Authorization="Bearer "+this.getToken(),this._logger.info("[ApiClient] Retente la requête originale avec le nouveau token."),this._client.request(t);throw this.resetSession(),new n("Impossible de rafraîchir le token.",401)}catch(e){throw this.resetSession(),new n("Erreur lors du rafraîchissement du token.",401,e)}}throw e}))}setToken(e){this._accessToken=e,this._tokenStorage.setAccessToken(e),this._client.defaults.headers.common.Authorization="Bearer "+e;const t=this._getIdFromToken(e);t&&(this._setUserId(t),this._logger.debug(`[ApiClient] userId extrait et défini : ${t}`)),this._logger.debug(`[ApiClient] setToken: ${e}`)}getToken(){return this._accessToken}setRefreshToken(e){if(this._refreshToken=e,this._tokenStorage.setRefreshToken(e),null===this.userId){const t=this._getIdFromToken(e);t&&(this._setUserId(t),this._logger.debug(`[ApiClient] userId extrait depuis refreshToken : ${t}`))}this._logger.debug(`[ApiClient] setRefreshToken: ${e}`)}getRefreshToken(){return this._refreshToken}get isConnected(){return!!this._accessToken}_getIdFromToken(e){if(!e)return null;try{const t=function(e,t){if("string"!=typeof e)throw new or("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new or(`Invalid token specified: missing part #${r+1}`);let o;try{o=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return atob(t)}}(n)}catch(e){throw new or(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new or(`Invalid token specified: invalid json for part #${r+1} (${e.message})`)}}(e);return this._logger.debug("[ApiClient] Payload décodé :",t),t.id||t.userId||null}catch(e){return this._logger.error("[ApiClient] Erreur lors du décodage du token :",e),null}}async _refreshAccessToken(){if(!this._refreshToken)return!1;const e=Ft.create({baseURL:this._baseURL,timeout:1e4,headers:{"Content-Type":"application/json"}});try{const t=await e.post(this._refreshUrl,{refreshToken:this._refreshToken});return!(!t.data||!t.data.token||(this.setToken(t.data.token),t.data.refreshToken&&this.setRefreshToken(t.data.refreshToken),this.emit("refreshSuccess",t.data),0))}catch(e){return this.resetSession(),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]&&ur.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]&&ur.stripNullsInPlace(e[t]));return e}_resolveSpecialValuesInPlace(e,t={}){const r={userId:()=>this.userId,accessToken:()=>this._accessToken,refreshToken:()=>this._refreshToken,baseURL:()=>this._baseURL,pathParams:e=>{const r=this._getValueByPath(t,e);return null!=r?r:void 0}},n=/@(?:\{([^}]+)\}|([\w.]+))/g,o=e=>"string"!=typeof e?e:e.replace(n,((t,n,o)=>{if(n){if(n.startsWith("pathParams.")){const e=n.substring(11),t=r.pathParams(e);return null!=t?t:`@{${n}}`}{const e=r[n];if("function"==typeof e){const t=e();return null!=t?t:`@{${n}}`}return`@{${n}}`}}if(o){if(o.startsWith("pathParams.")){const e=o.match(/^pathParams\.([^.]+)(.*)$/);if(e){const t=e[1],n=e[2],i=r.pathParams(t);return null!=i?i+n:`@${o}`}return`@${o}`}{const e=r[o];if("function"==typeof e){const t=e();return null!=t?t:`@${o}`}return`@${o}`}}return e})),i=e=>{if((e=>e&&"object"==typeof e&&("function"==typeof e.pipe||"undefined"!=typeof Buffer&&e instanceof Buffer))(e))return e;if(Array.isArray(e))return e.map(i);if((e=>"[object Object]"===Object.prototype.toString.call(e))(e)){const t={};for(const[r,n]of Object.entries(e))t[o(r)]=i(n);return t}return"string"==typeof e?o(e):e};return i(e)}_cleanSchemaLeftoverAlias(e){const t=/@\w+/;if(Array.isArray(e))return e.map((e=>this._cleanSchemaLeftoverAlias(e)));if(e&&"object"==typeof e){const r={};for(const n of Object.keys(e)){const o=e[n];if(!t.test(n)){if("default"===n){if("string"==typeof o&&t.test(o))continue;if(o&&"object"==typeof o){const e=this._cleanSchemaLeftoverAlias(o);Object.keys(e).length>0&&(r[n]=e);continue}}"string"==typeof o&&t.test(o)||(r[n]=this._cleanSchemaLeftoverAlias(o))}}return r}return e}async safeCall(e,...t){try{return await e(...t)}catch(e){throw this._logger.error(`[ApiClient.safeCall] Erreur: ${e.message}`),e}}async callEndpoint(e,t={},r=!0,s=!0){if(!this._checkCircuitBreaker())throw new i("Le circuit breaker est activé, impossible d'appeler l'API");const a=this._endpoints.find((t=>t.constant===e));if(!a)throw new n(`Endpoint introuvable : ${e}`,404);const{path:c,method:l,contentType:d,auth:u,pathParams:p,request:m,responses:f}=a,h=(l||"GET").toLowerCase(),y=d||"application/json",g={"Content-Type":y};if(this._accessToken)"bearer"===u?g.Authorization=`Bearer ${this._accessToken}`:u&&"none"!==u||g.Authorization||(g.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===u)throw new n(`Token requis pour l'endpoint sécurisé : ${e}`,401);let w,_=c,b={};if(p){let e=p;"none"===u&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(p));const r=t.pathParams||{},i=this._ajv.compile(e);if(!i(r)){const e=this._ajvErrorHuman(i.errors);throw this.emit("validationError",{stage:"pathParams",errors:i.errors}),new o("Path parameter validation failed.",400,e,i.errors)}b=this._resolveSpecialValuesInPlace(r),_=_.replace(/\{(\w+)\}/g,((e,t)=>{const r=b[t];if(void 0!==r)return encodeURIComponent(r);throw new n(`Path param manquant ou non résolu : {${t}}`,400)}))}if(m){let e=m;"none"===u&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(m));const r={...t};delete r.pathParams;const n=ur.stripNullsInPlace(r),i=this._ajv.compile(e);if(!i(n)){const e=i.errors?this._ajvErrorHuman(i.errors):[];throw this.emit("validationError",{stage:"request",errors:i.errors}),new o("Request validation failed.",400,e,i.errors)}t=this._resolveSpecialValuesInPlace(n,b)}"application/json"===y||"multipart/form-data"===y?w=t:"application/x-www-form-urlencoded"===y&&(w=ur.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${_}, method=${h}`);try{const e=await this._client.request({url:_,method:h,headers:g,["get"===h?"params":"data"]:w});if(s){const t=e.status.toString(),r=f?.[t];if(r){const n=this._ajv.compile(r);if(!n(e.data)){const e=this._ajvErrorHuman(n.errors);throw this.emit("validationError",{stage:"response",errors:n.errors}),new o("Response validation failed.",t,e,n.errors)}}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(a.postActions)&&a.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"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(t){throw this._updateCircuitBreakerError(),this._logger.error(`[ApiClient] Erreur lors de l'appel de ${e}: ${t.message}`),t instanceof o?t:new n(`Erreur lors de l'appel de l'API : ${t.message}`,t.response?t.response.status:500,t.response?t.response.data:null)}}_ajvErrorHuman(e){try{return new x(e).errors.map((({message:e})=>e))}catch(t){return this._logger.error("[ApiClient] _ajvErrorHuman",t),e.map((({message:e})=>e))}}checkAndThrowApiResponseError(e){const t=e.data;if(!t||"object"!=typeof t)return e;if("boolean"==typeof t.result&&!1===t.result)throw new s(t.msg||"Erreur inconnue",e.status,t);if(t.resultErrors&&"object"==typeof t.resultErrors&&"boolean"==typeof t.resultErrors.result&&!1===t.resultErrors.result)throw new s(t.resultErrors.msg||"Erreur inconnue",e.status,t);return e}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),this._tokenStorage.clear(),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:o=!1,metaTokens:i=!0}=r,s=[];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 l(e,t,r=!1){return e?e.concat(t).map(((e,t)=>(e=c(e),!r&&t?`[${e}]`:e))).join(r?".":""):t}function d(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||s.includes(r)||(s.push(r),Object.entries(r).forEach((([r,s])=>{void 0!==s&&function(e,r,s){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=i?r:r.slice(0,-2),t.append(l(s,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=o?l(s.concat(r),i,n):`${l(s,r,n)}[]`;t.append(a,d(e))}})),!1}return!!a(e)||(t.append(l(s,r,n),d(e)),!1)}(s,r.trim(),u)&&e(s,u.concat(c(r)))})),s.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?nr.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}`}_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}_startBeforeEndValidate=(e,t)=>{if(!t.startDate||!t.endDate)return!0;const r=new Date(t.startDate)<new Date(t.endDate);return r||(this._startBeforeEndValidate.errors=[{instancePath:"",schemaPath:"#/startBeforeEnd",keyword:"startBeforeEnd",params:{},message:"startDate must be before endDate"}]),r};getRequestSchema(e){const t=this._endpoints.find((t=>t.constant===e));return t?.request||null}getPathSchema(e){return this._endpoints.find((t=>t.constant===e))?.pathParams||null}}class pr{constructor(e){this.client=new ur(e),this.loggedUser=null}get isConnected(){return this.client.isConnected}get userId(){return this.client.userId}async login(e,t){return this.client.safeCall((async()=>{const r=await this.client.callEndpoint("AUTHENTICATE_URL",{email:e,password:t});return this.loggedUser=new _(this.client,r.data.user,{EndpointApi:c,Organization:g,Project:w,News:m}),this.loggedUser}))}async meIsconnected(){if(!this.client.isConnected||!this.client.userId)throw new r("User not connected",401);return this.client._logger.info("UserApi","meIsconnected",this.client.userId),this.loggedUser=new _(this.client,{id:this.client.userId},{EndpointApi:c,Organization:g,Project:w,News:m}),this.loggedUser}async register({name:e,username:t,email:r,pwd:n}={}){return this.client.safeCall((async()=>{const o=await this.client.callEndpoint("PERSON_REGISTER",{name:e,username:t,email:r,pwd:n});if(!1===o?.data?.result)throw new s(o.data.msg,o.status,o.data);return o.data}))}async recoverPassword(e){return this.client.safeCall((async()=>{const t=await this.client.callEndpoint("PASSWORD_RECOVERY",{email:e});if(!1===t?.data?.result)throw new s(t.data.msg,t.status,t.data);return t.data}))}}class mr{static async userLogin(e,t,r){const n=mr.userApi(r);return await mr.userApiLogin(n,e,t)}static userApi(e){try{return new pr(e)}catch(e){throw console.error("[Api.userApi] Erreur lors de la création d'un objet utilisateur :",e.message),e}}static async userApiLogin(e,t,o){try{if(!e)throw new r("userApi is not defined");if(!e.client)throw new r("userApi.client is not defined");if(e.client.isConnected){const t=await e.meIsconnected();return new mr(t,e.client)}{if(!t||!o)throw new r("email and password are required");const n=await e.login(t,o);return new mr(n,e.client)}}catch(e){if(e instanceof n&&e?.details?.error)throw new a(e.details.error,e.status,e.details);throw e}}constructor(e,t){this._loggedUser=e,this._client=t}async me(){if(!this._loggedUser)throw new a("Accès refusé : utilisateur non authentifié.");return await this._loggedUser.get(),this._loggedUser}async user(e){try{if(e.id||e.slug){const t=new _(this._client,e,{EndpointApi:c,Organization:g,Project:w,News:m});return await t.get(),t}return new _(this._client,e,{EndpointApi:c,Organization:g,Project:w,News:m})}catch(e){throw console.error("[Api.user] Erreur lors de la création d'un objet utilisateur public :",e.message),e}}async organization(e){try{const t=new g(this._client,e,{EndpointApi:c,User:_,Project:w,News:m});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Organization.");return await t.get(),t}catch(e){throw console.error("[Api.organization] Erreur lors de la création d'un objet organisation :",e.message),e}}async project(e){try{const t=new w(this._client,e,{User:_,News:m,EndpointApi:c});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Project.");return await t.get(),t}catch(e){throw console.error("[Api.project] Erreur lors de la création d'un objet projet :",e.message),e}}get client(){return this._client}get endpointApi(){return new c(this._client)}logout(){this.loggedUser=null,this._client.resetSession(),this._client._logger.info("UserApi: User logged out")}}const fr={ApiClient:ur,Api:mr,error:e,tokenStorageStrategy:{createDefaultTokenStorageStrategy:async function(e="auto"){if("memory"===e)return new dr.GN;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new dr.Ge;throw new Error("localStorage is not available in this environment.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("file storage is not available in this environment.");const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}if("auto"===e){if("undefined"!=typeof window&&window.localStorage)return new dr.Ge;{const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}}},TokenStorageStrategy:dr.u3}}})(),__webpack_exports__=__webpack_exports__.default,__webpack_exports__})()));
|
|
8
|
+
deps: ${r}}`};const s={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:o,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const l=t[c];if(0===l.length)continue;const d=(0,i.propertyInData)(r,o,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?r.if(d,(()=>{for(const t of l)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${d} && (${(0,i.checkMissingProp)(e,l,a)})`),(0,i.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const l in t)(0,o.alwaysValidSchema)(a,t[l])||(r.if((0,i.propertyInData)(r,n,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},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),o=r(6144),i=r(6653),s=r(2079),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),o.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(s,a):s;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=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var d=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var p=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var u=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var m=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},3439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${o} === 0 || (${a} = ${r}/${o}, ${c}))`)}};t.default=o},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},3492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferTokenizer=void 0;const n=r(8705),o=r(8632);class i extends o.AbstractTokenizer{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e.length}async readBuffer(e,t){if(t&&t.position){if(t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=t.position}const r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),o=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&o<r.length)throw new n.EndOfStreamError;return e.set(this.uint8Array.subarray(r.position,r.position+o),r.offset),o}async close(){}}t.BufferTokenizer=i},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),o=r(2023),i=r(5765),s=r(8708);function a(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:s,it:a}=e,l=t.macro.call(a.self,i,s,a),d=c(r,o,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const p=r.name("valid");e.subschema({schema:l,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:d,compositeRule:!0},p),e.pass(p,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:l,keyword:d,schema:p,parentSchema:u,$data:m,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const h=!m&&t.compile?t.compile.call(f.self,p,u,f):t.validate,y=c(l,d,h),g=l.let("valid");function w(r=(t.async?n._`await `:n.nil)){const s=f.opts.passContext?o.default.this:o.default.self,a=!("compile"in t&&!m||!1===t.schema);l.assign(g,n._`${r}${(0,i.callValidateCode)(e,y,s,a)}`,t.modifying)}function _(e){var r;l.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)w(),t.modifying&&a(e),_((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>w(n._`await `)),(t=>l.assign(g,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>l.assign(e,n._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=n._`${y}.errors`;return l.assign(e,null),w(n.nil),e}();t.modifying&&a(e),_((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,s.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},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const s=o.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},3693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(4551),o=r(5765),i=r(9029),s=r(2023),a=r(3835),c=r(4227),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:s,schemaEnv:c,validateName:l,opts:u,self:m}=o,{root:f}=c;if(("#"===r||"#/"===r)&&s===f.baseId)return function(){if(c===f)return p(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return p(e,i._`${r}.validate`,f,f.$async)}();const h=a.resolveRef.call(m,f,s,r);if(void 0===h)throw new n.default(o.opts.uriResolver,s,r);return h instanceof a.SchemaEnv?function(t){const r=d(e,t);p(e,r,t,t.$async)}(h):function(n){const o=t.scopeValue("schema",!0===u.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(h)}};function d(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function p(e,t,r,n){const{gen:a,it:l}=e,{allErrors:d,schemaEnv:p,opts:u}=l,m=u.passContext?s.default.this:i.nil;function f(e){const t=i._`${e}.errors`;a.assign(s.default.vErrors,i._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,i._`${s.default.vErrors}.length`)}function h(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(a,n.props,l.props));else{const t=a.var("props",i._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,i.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(a,n.items,l.items));else{const t=a.var("items",i._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,i.Name)}}n?function(){if(!p.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(i._`await ${(0,o.callValidateCode)(e,t,m)}`),h(t),d||a.assign(r,!0)}),(e=>{a.if(i._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),f(e),d||a.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,m),(()=>h(t)),(()=>f(t)))}t.getValidate=d,t.callRef=p,t.default=l},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),o=r(3558),i=r(2023),s=r(6939),a=r(4227),c=r(2586);class l{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,s.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 d(e){const t=u.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:d}=this.opts,p=new n.CodeGen(this.scope,{es5:a,lines:l,ownProperties:d});let m;e.$async&&(m=p.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const f=p.scopeName("validate");e.validateName=f;const h={gen:p,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:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:m,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),p.optimize(this.opts.code.optimize);const t=p.toString();y=`${p.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(f,{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:f,validateCode:t,scopeValues:p._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 p(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.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 m(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||f.call(this,e,t)}function f(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let o=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return y.call(this,r,e);const i=(0,s.normalizeId)(n),a=this.refs[i]||this.schemas[i];if("string"==typeof a){const t=f.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||d.call(this,a),i===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,s.resolveUrl)(this.opts.uriResolver,o,n)),new l({schema:t,schemaId:r,root:e,baseId:o})}return y.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=d,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let i=m.call(this,e,r);if(void 0===i){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;o&&(i=new l({schema:o,schemaId:s,root:e,baseId:t}))}return void 0!==i?e.refs[r]=p.call(this,i):void 0},t.getCompilingSchema=u,t.resolveSchema=f;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[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 o="object"==typeof(r=e)&&r[this.opts.schemaId];!h.has(n)&&o&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,o))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=f.call(this,n,e)}const{schemaId:c}=this.opts;return i=i||new l({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}')},3846:(e,t,r)=>{"use strict";const n=r(363),o=r(5707),i={fromFile:async function(e){const t=await n.fromFile(e);try{return await o.fromTokenizer(t)}finally{await t.close()}}};Object.assign(i,o),Object.defineProperty(i,"extensions",{get:()=>o.extensions}),Object.defineProperty(i,"mimeTypes",{get:()=>o.mimeTypes}),e.exports=i},3853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}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),o=r(4227),i=r(5765),s=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,o.alwaysValidSchema)(n,t)||(a?(0,s.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),o=r(9029),i=r(4227),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:c,it:l}=e,{opts:d}=l;if(!c&&0===r.length)return;const p=r.length>=d.loopRequired;if(l.allErrors?function(){if(p||c)e.block$data(o.nil,u);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(p||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(i,(0,n.propertyInData)(t,a,r,d.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),d.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 "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(l,t,l.opts.strictRequired)}}function u(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,d.ownProperties),(()=>e.error()))}))}}};t.default=s},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,s),time:r(c(!0),l),"date-time":r(u(!0),m),"iso-time":r(c(),d),"iso-date-time":r(u(),f),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(v.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<=_&&e>=w}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:b},double:{type:"number",validate:b},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,l),"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,m),"iso-time":r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"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,f),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)$/,o=[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],s=+t[3];return i>=1&&i<=12&&s>=1&&s<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:o[i])}function s(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],o=+r[2],i=+r[3],s=r[4],c="-"===r[5]?-1:1,l=+(r[6]||0),d=+(r[7]||0);if(l>23||d>59||e&&!s)return!1;if(n<=23&&o<=59&&i<60)return!0;const p=o-d*c,u=n-l*c-(p<0?1:0);return(23===u||-1===u)&&(59===p||-1===p)&&i<61}}function l(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 d(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 p=/t|\s/i;function u(e){const t=c(e);return function(e){const r=e.split(p);return 2===r.length&&i(r[0])&&t(r[1])}}function m(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 f(e,t){if(!e||!t)return;const[r,n]=e.split(p),[o,i]=t.split(p),a=s(r,o);return void 0!==a?a||l(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,w=-(2**31),_=2**31-1;function b(){return!0}const v=/[^\\]\\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 o=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(3558),s=r(4551),a=r(396),c=r(3835),l=r(9029),d=r(6939),p=r(208),u=r(4227),m=r(3837),f=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"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,r,n,o,i,s,a,c,l,d,p,u,m,y,g,w,_,b,v,E,T,S,$,O,P;const x=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,k=!0===A||void 0===A?1:A||0,I=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,N=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:x)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:x)||void 0===c||c,strictTypes:null!==(d=null!==(l=e.strictTypes)&&void 0!==l?l:x)&&void 0!==d?d:"log",strictTuples:null!==(u=null!==(p=e.strictTuples)&&void 0!==p?p:x)&&void 0!==u?u:"log",strictRequired:null!==(y=null!==(m=e.strictRequired)&&void 0!==m?m:x)&&void 0!==y&&y,code:e.code?{...e.code,optimize:k,regExp:I}:{optimize:k,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(w=e.loopEnum)&&void 0!==w?w:200,meta:null===(_=e.meta)||void 0===_||_,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(v=e.inlineRefs)||void 0===v||v,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===(T=e.addUsedSchema)||void 0===T||T,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===($=e.validateFormats)||void 0===$||$,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:N}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return x;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)(),E.call(this,w,e,"NOT SUPPORTED"),E.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=P.call(this),e.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=m;"id"===r&&(n={...m},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 o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(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 s.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 l.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=T.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=T.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,d.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(k.call(this,r,t),!t)return(0,u.eachItem)(r,(e=>I.call(this,e))),this;j.call(this,t);const n={...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(r,0===n.type.length?e=>I.call(this,e,n):e=>n.type.forEach((t=>I.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=D(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:s}=this.opts;if("object"==typeof e)i=e[s];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,d.normalizeId)(i||r);const l=d.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),o&&!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(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function T(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){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 $(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(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 P(){const e={...this.opts};for(const t of y)delete e[t];return e}v.ValidationError=i.default,v.MissingRefError=s.default,t.default=v;const x={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function k(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(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let s=o?i.post:i.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,p.getJSONTypes)(t.type),schemaType:(0,p.getJSONTypes)(t.schemaType)}};t.before?N.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function N(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 j(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,C]}}},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),o=r(1520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||f(e,`unknown keyword: "${r}"`)}function s(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 l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(i,s,a,c)=>{const l=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(i,s,a):t(i,s,a),a):s instanceof n.Name?(t(i,a,s),s):r(s,a);return c!==n.Name||l instanceof n.Name?l:o(i,l)}}function d(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&p(e,r,t),r}function p(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),!s(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,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)(o)}`},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:l({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} || {}`),p(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:l({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=d,t.setEvaluated=p;const u={};var m;function f(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 o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(m||(t.Type=m={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===m.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},4266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnsiStringType=t.StringType=t.BufferType=t.Uint8ArrayType=t.IgnoreType=t.Float80_LE=t.Float80_BE=t.Float64_LE=t.Float64_BE=t.Float32_LE=t.Float32_BE=t.Float16_LE=t.Float16_BE=t.INT64_BE=t.UINT64_BE=t.INT64_LE=t.UINT64_LE=t.INT32_LE=t.INT32_BE=t.INT24_BE=t.INT24_LE=t.INT16_LE=t.INT16_BE=t.INT8=t.UINT32_BE=t.UINT32_LE=t.UINT24_BE=t.UINT24_LE=t.UINT16_BE=t.UINT16_LE=t.UINT8=void 0;const n=r(251);function o(e){return new DataView(e.buffer,e.byteOffset)}t.UINT8={len:1,get:(e,t)=>o(e).getUint8(t),put:(e,t,r)=>(o(e).setUint8(t,r),t+1)},t.UINT16_LE={len:2,get:(e,t)=>o(e).getUint16(t,!0),put:(e,t,r)=>(o(e).setUint16(t,r,!0),t+2)},t.UINT16_BE={len:2,get:(e,t)=>o(e).getUint16(t),put:(e,t,r)=>(o(e).setUint16(t,r),t+2)},t.UINT24_LE={len:3,get(e,t){const r=o(e);return r.getUint8(t)+(r.getUint16(t+1,!0)<<8)},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.UINT24_BE={len:3,get(e,t){const r=o(e);return(r.getUint16(t)<<8)+r.getUint8(t+2)},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.UINT32_LE={len:4,get:(e,t)=>o(e).getUint32(t,!0),put:(e,t,r)=>(o(e).setUint32(t,r,!0),t+4)},t.UINT32_BE={len:4,get:(e,t)=>o(e).getUint32(t),put:(e,t,r)=>(o(e).setUint32(t,r),t+4)},t.INT8={len:1,get:(e,t)=>o(e).getInt8(t),put:(e,t,r)=>(o(e).setInt8(t,r),t+1)},t.INT16_BE={len:2,get:(e,t)=>o(e).getInt16(t),put:(e,t,r)=>(o(e).setInt16(t,r),t+2)},t.INT16_LE={len:2,get:(e,t)=>o(e).getInt16(t,!0),put:(e,t,r)=>(o(e).setInt16(t,r,!0),t+2)},t.INT24_LE={len:3,get(e,r){const n=t.UINT24_LE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},t.INT24_BE={len:3,get(e,r){const n=t.UINT24_BE.get(e,r);return n>8388607?n-16777216:n},put(e,t,r){const n=o(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},t.INT32_BE={len:4,get:(e,t)=>o(e).getInt32(t),put:(e,t,r)=>(o(e).setInt32(t,r),t+4)},t.INT32_LE={len:4,get:(e,t)=>o(e).getInt32(t,!0),put:(e,t,r)=>(o(e).setInt32(t,r,!0),t+4)},t.UINT64_LE={len:8,get:(e,t)=>o(e).getBigUint64(t,!0),put:(e,t,r)=>(o(e).setBigUint64(t,r,!0),t+8)},t.INT64_LE={len:8,get:(e,t)=>o(e).getBigInt64(t,!0),put:(e,t,r)=>(o(e).setBigInt64(t,r,!0),t+8)},t.UINT64_BE={len:8,get:(e,t)=>o(e).getBigUint64(t),put:(e,t,r)=>(o(e).setBigUint64(t,r),t+8)},t.INT64_BE={len:8,get:(e,t)=>o(e).getBigInt64(t),put:(e,t,r)=>(o(e).setBigInt64(t,r),t+8)},t.Float16_BE={len:2,get(e,t){return n.read(e,t,!1,10,this.len)},put(e,t,r){return n.write(e,r,t,!1,10,this.len),t+this.len}},t.Float16_LE={len:2,get(e,t){return n.read(e,t,!0,10,this.len)},put(e,t,r){return n.write(e,r,t,!0,10,this.len),t+this.len}},t.Float32_BE={len:4,get:(e,t)=>o(e).getFloat32(t),put:(e,t,r)=>(o(e).setFloat32(t,r),t+4)},t.Float32_LE={len:4,get:(e,t)=>o(e).getFloat32(t,!0),put:(e,t,r)=>(o(e).setFloat32(t,r,!0),t+4)},t.Float64_BE={len:8,get:(e,t)=>o(e).getFloat64(t),put:(e,t,r)=>(o(e).setFloat64(t,r),t+8)},t.Float64_LE={len:8,get:(e,t)=>o(e).getFloat64(t,!0),put:(e,t,r)=>(o(e).setFloat64(t,r,!0),t+8)},t.Float80_BE={len:10,get(e,t){return n.read(e,t,!1,63,this.len)},put(e,t,r){return n.write(e,r,t,!1,63,this.len),t+this.len}},t.Float80_LE={len:10,get(e,t){return n.read(e,t,!0,63,this.len)},put(e,t,r){return n.write(e,r,t,!0,63,this.len),t+this.len}},t.IgnoreType=class{constructor(e){this.len=e}get(e,t){}},t.Uint8ArrayType=class{constructor(e){this.len=e}get(e,t){return e.subarray(t,t+this.len)}},t.BufferType=class{constructor(e){this.len=e}get(e,t){return Buffer.from(e.subarray(t,t+this.len))}},t.StringType=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t){return Buffer.from(e).toString(this.encoding,t,t+this.len)}};class i{constructor(e){this.len=e}static decode(e,t,r){let n="";for(let o=t;o<r;++o)n+=i.codePointToString(i.singleByteDecoder(e[o]));return n}static inRange(e,t,r){return t<=e&&e<=r}static codePointToString(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(e){if(i.inRange(e,0,127))return e;const t=i.windows1252[e-128];if(null===t)throw Error("invaliding encoding");return t}get(e,t=0){return i.decode(e,t,t+this.len)}}t.AnsiStringType=i,i.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},4426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={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=o},4428:()=>{},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},4495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(9029),o=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:s,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,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;d(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,o.getErrorPath)(r,i,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(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!==s&&(d(s instanceof n.Name?s:l.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6939);class o extends Error{constructor(e,t,r,o){super(o||`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=o},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o={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:o,$data:i,schema:s,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:d,schemaEnv:p,self:u}=c;l.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:u.formats,code:l.code.formats}),s=r.const("fDef",n._`${i}[${a}]`),c=r.let("fType"),d=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(d,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(d,s))),e.fail$data((0,n.or)(!1===l.strictSchema?n.nil:n._`${a} && !${d}`,function(){const e=p.$async?n._`(${s}.async ? await ${d}(${o}) : ${d}(${o}))`:n._`${d}(${o})`,r=n._`(typeof ${d} == "function" ? ${e} : ${d}.test(${o}))`;return n._`${d} && ${d} !== true && ${c} === ${t} && !${r}`}()))}():function(){const i=u.formats[s];if(!i)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${d}"`}u.logger.warn(e())}();if(!0===i)return;const[a,c,m]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(s)}`:void 0,o=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!p.$async)throw new Error("async format in sync schema");return n._`await ${m}(${o})`}return"function"==typeof c?n._`${m}(${o})`:n._`${m}.test(${o})`}())}())}};t.default=o},4834:(e,t,r)=>{"use strict";const{HEX:n}=r(4914),o=/^(?:(?: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(l(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(o)||[],[r]=t;return r?{host:c(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function s(e,t=!1){let r="",o=!0;for(const t of e){if(void 0===n[t])return;"0"!==t&&!0===o&&(o=!1),o||(r+=t)}return t&&0===r.length&&(r="0"),r}function a(e){if(l(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const r={error:!1,address:"",zone:""},n=[],o=[];let i=!1,a=!1,c=!1;function l(){if(o.length){if(!1===i){const e=s(o);if(void 0===e)return r.error=!0,!1;n.push(e)}o.length=0}return!0}for(let s=0;s<e.length;s++){const d=e[s];if("["!==d&&"]"!==d)if(":"!==d)if("%"===d){if(!l())break;i=!0}else o.push(d);else{if(!0===a&&(c=!0),!l())break;if(t++,n.push(":"),t>7){r.error=!0;break}s-1>=0&&":"===e[s-1]&&(a=!0)}}return o.length&&(i?r.zone=o.join(""):c?n.push(o.join("")):n.push(s(o))),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 o=e.length;for(let i=0;i<o;i++){const s=e[i];"0"===s&&n?(i+1<=o&&e[i+1]===t||i+1===o)&&(r+=s,n=!1):(n=s===t,r+=s)}return r}function l(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}const d=/^\.\.?\//u,p=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,m=/^\/?(?:.|\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(d))e=e.replace(d,"");else if(e.match(p))e=e.replace(p,"/");else if(e.match(u))e=e.replace(u,"/"),t.pop();else if("."===e||".."===e)e="";else{const r=e.match(m);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:s}},4874:(e,t,r)=>{"use strict";const n=r(793);e.exports=p;const o=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:w,wrapResponseSerializer:w,wrapErrorSerializer:w,req:g,res:g,err:h,errWithCause:h};function s(e,t){return"silent"===e?1/0:t.levels.values[e]}const a=Symbol("pino.logFuncs"),c=Symbol("pino.hierarchy"),l={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function d(e,t){const r={logger:t,parent:e[c]};t[c]=r}function p(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||o;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 w=e.level||"info",b=Object.create(r);b.log||(b.log=_),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:o[e]||o[l[e]||"log"]||_})),e[a]=n}(b,g,r),d({},b),Object.defineProperty(b,"levelVal",{get:function(){return s(this.level,this)}}),Object.defineProperty(b,"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,v,b,"error"),u(this,v,b,"fatal"),u(this,v,b,"warn"),u(this,v,b,"info"),u(this,v,b,"debug"),u(this,v,b,"trace"),h.forEach((e=>{u(this,v,b,e)}))}});const v={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||_};function E(r,o,s){if(!o)throw new Error("missing bindings for child Pino");s=s||{},i&&o.serializers&&(s.serializers=o.serializers);const a=s.serializers;if(i&&a){var c=Object.assign({},n,a),l=!0===e.browser.serialize?Object.keys(c):i;delete o.serializers,m([o],l,c,this._stdErrSerialize)}function p(e){this._childLevel=1+(0|e._childLevel),this.bindings=o,c&&(this.serializers=c,this._serialize=l),t&&(this._logEvent=f([].concat(e._logEvent.bindings,o)))}p.prototype=this;const u=new p(this);return d(this,u),u.child=function(...e){return E.call(this,r,...e)},u.level=s.level||this.level,r.onChild(u),u}return b.levels=function(e){const t=e.customLevels||{};return{values:Object.assign({},p.levels.values,t),labels:Object.assign({},p.levels.labels,function(e){const t={};return Object.keys(e).forEach((function(r){t[e[r]]=r})),t}(t))}}(e),b.level=w,b.setMaxListeners=b.getMaxListeners=b.emit=b.addListener=b.on=b.prependListener=b.once=b.prependOnceListener=b.removeListener=b.removeAllListeners=b.listeners=b.listenerCount=b.eventNames=b.write=b.flush=_,b.serializers=n,b._serialize=i,b._stdErrSerialize=c,b.child=function(...e){return E.call(this,v,...e)},t&&(b._logEvent=f()),b}function u(e,t,r,i){if(Object.defineProperty(e,i,{value:s(e.level,r)>s(i,r)?_:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===_){if(!t.transmit)return;const n=s(t.transmit.level||e.level,r);if(s(i,r)<n)return}e[i]=function(e,t,r,i){return c=e[a][i],function(){const a=t.timestamp(),l=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===o?o:this;for(var p=0;p<l.length;p++)l[p]=arguments[p];var u=!1;if(t.serialize&&(m(l,this._serialize,this.serializers,this._stdErrSerialize),u=!0),t.asObject||t.formatters?c.call(d,function(e,t,r,o,i){const{level:s,log:a=e=>e}=i.formatters||{},c=r.slice();let l=c[0];const d={};if(o&&(d.time=o),s){const r=s(t,e.levels.values[t]);Object.assign(d,r)}else d.level=e.levels.values[t];let p=1+(0|e._childLevel);if(p<1&&(p=1),null!==l&&"object"==typeof l){for(;p--&&"object"==typeof c[0];)Object.assign(d,c.shift());l=c.length?n(c.shift(),c):void 0}else"string"==typeof l&&(l=n(c.shift(),c));return void 0!==l&&(d[i.messageKey]=l),a(d)}(this,i,l,a,t)):c.apply(d,l),t.transmit){const n=t.transmit.level||e._level,o=s(n,r),c=s(i,r);if(c<o)return;!function(e,t,r,n=!1){const o=t.send,i=t.ts,s=t.methodLevel,a=t.methodValue,c=t.val,l=e._logEvent.bindings;n||m(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===l.indexOf(e)})),e._logEvent.level.label=s,e._logEvent.level.value=a,o(s,e._logEvent,c),e._logEvent=f(l)}(this,{ts:a,methodLevel:i,methodValue:c,transmitLevel:n,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:s(e._level,r)},l,u)}};var c}(e,t,r,i);const l=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!==l.length&&(e[i]=function(e,t){return function(){return t.apply(this,[...e,...arguments])}}(l,e[i]))}function m(e,t,r,n){for(const o in e)if(n&&e[o]instanceof Error)e[o]=p.stdSerializers.err(e[o]);else if("object"==typeof e[o]&&!Array.isArray(e[o])&&t)for(const n in e[o])t.indexOf(n)>-1&&n in r&&(e[o][n]=r[n](e[o][n]))}function f(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?b:v}function g(){return{}}function w(e){return e}function _(){}function b(){return!1}function v(){return Date.now()}p.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"}},p.stdSerializers=i,p.stdTimeFunctions=Object.assign({},{nullTime:b,epochTime:v,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=p,e.exports.pino=p},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),o=r(9029),i=r(4227),s=r(4227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:l}=e,{opts:d}=l,p=(0,n.allSchemaProperties)(r),u=p.filter((e=>(0,i.alwaysValidSchema)(l,r[e])));if(0===p.length||u.length===p.length&&(!l.opts.unevaluated||!0===l.props))return;const m=d.strictSchema&&!d.allowMatchingProperties&&c.properties,f=t.name("valid");!0===l.props||l.props instanceof o.Name||(l.props=(0,s.evaluatedPropsToName)(t,l.props));const{props:h}=l;function y(e){for(const t in m)new RegExp(e).test(t)&&(0,i.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=u.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:s.Type.Str},f),l.opts.unevaluated&&!0!==h?t.assign(o._`${h}[${i}]`,!0):n||l.allErrors||t.if((0,o.not)(f),(()=>t.break()))}))}))}!function(){for(const e of p)m&&y(e),l.allErrors?g(e):(t.var(f,!0),g(e),t.if(f))}()}};t.default=a},5354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(494),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},5457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(9029),o=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)?s(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:i,data:s,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",n._`${s}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(c,i)){const i=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:o.Type.Num},i),c.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=s,t.default=i},5523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EndOfStreamError=t.defaultMessages=void 0,t.defaultMessages="End-Of-Stream";class r extends Error{constructor(){super(t.defaultMessages)}}t.EndOfStreamError=r},5707:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";const Token=__webpack_require__(4266),strtok3=__webpack_require__(6452),{stringToBytes,tarHeaderChecksumMatches,uint32SyncSafeToken}=__webpack_require__(6760),supported=__webpack_require__(1664),minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,r){r={offset:0,...r};for(const[n,o]of t.entries())if(r.mask){if(o!==(r.mask[n]&e[n+r.offset]))return!1}else if(o!==e[n+r.offset])return!1;return!0}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const r=(e,r)=>_check(t,e,r),n=(e,t)=>r(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(r([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),n("PS-Adobe-",{offset:2})&&n(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(n("ID3")){await e.ignore(6);const o=await e.readToken(uint32SyncSafeToken);return e.position+o>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(o),fromTokenizer(e))}if(n("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(n("FLIF"))return{ext:"flif",mime:"image/flif"};if(n("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(n("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(n("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(n("FORM"))return{ext:"aif",mime:"audio/aiff"};if(n("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(r([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(t,{length:30});const i={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(i.filename=await e.readToken(new Token.StringType(i.filenameLength,"utf-8")),await e.ignore(i.extraFieldLength),"META-INF/mozilla.rsa"===i.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(i.filename.endsWith(".rels")||i.filename.endsWith(".xml"))switch(i.filename.split("/")[0]){case"_rels":default:break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}if(i.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(i.filename.startsWith("3D/")&&i.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if("mimetype"===i.filename&&i.compressedSize===i.uncompressedSize)switch(await e.readToken(new Token.StringType(i.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}if(0===i.compressedSize){let s=-1;for(;s<0&&e.position<e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),s=t.indexOf("504B0304",0,"hex"),await e.ignore(s>=0?s:t.length)}else await e.ignore(i.compressedSize)}}catch(a){if(!(a instanceof strtok3.EndOfStreamError))throw a}return{ext:"zip",mime:"application/zip"}}if(n("OggS")){await e.ignore(28);const c=Buffer.alloc(8);return await e.readBuffer(c),_check(c,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/opus"}:_check(c,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(c,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(c,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(c,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(c,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(n("ftyp",{offset:4})&&96&t[8]){const l=t.toString("binary",8,12).replace("\0"," ").trim();switch(l){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return l.startsWith("3g")?l.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(n("MThd"))return{ext:"mid",mime:"audio/midi"};if(n("wOFF")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(n("wOF2")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(n("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(n("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(n("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(n("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(n("%PDF")){await e.ignore(1350);const d=10485760,p=Buffer.alloc(Math.min(d,e.fileInfo.size));return await e.readBuffer(p,{mayBeLess:!0}),p.includes(Buffer.from("AIPrivateData"))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"}}if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([73,73,42,0]))return n("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:r([28,0,254,0],{offset:8})||r([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:r([8,0,0,0],{offset:4})&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(r([16,251,134,1],{offset:4})||r([8,0,0,0],{offset:4}))&&r([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(n("MAC "))return{ext:"ape",mime:"audio/ape"};if(r([26,69,223,163])){async function u(){const t=await e.peekNumber(Token.UINT8);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const o=Buffer.alloc(n+1);return await e.readBuffer(o),o}async function m(){const e=await u(),t=await u();t[0]^=128>>t.length-1;const r=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-r,r)}}async function f(t,r){for(;r>0;){const t=await m();if(17026===t.id)return e.readToken(new Token.StringType(t.len,"utf-8"));await e.ignore(t.len),--r}}const h=await m();switch(await f(0,h.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(n("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(n("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(n("MSCF")||n("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(r([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(n("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(n("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(n("IMPM"))return{ext:"it",mime:"audio/x-it"};if(n("-lh0-",{offset:2})||n("-lh1-",{offset:2})||n("-lh2-",{offset:2})||n("-lh3-",{offset:2})||n("-lh4-",{offset:2})||n("-lh5-",{offset:2})||n("-lh6-",{offset:2})||n("-lh7-",{offset:2})||n("-lzs-",{offset:2})||n("-lz4-",{offset:2})||n("-lz5-",{offset:2})||n("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(r([0,0,1,186])){if(r([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(r([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(n("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(n("solid "))return{ext:"stl",mime:"model/stl"};if(n("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(n("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new Token.StringType(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(r([137,80,78,71,13,10,26,10])){async function y(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,"binary"))}}await e.ignore(8);do{const g=await y();if(g.length<0)return;switch(g.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(g.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(r([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(r([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(n("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(r([48,38,178,117,142,102,207,17,166,217])){async function w(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Token.UINT64_LE))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const _=await w();let b=_.size-24;if(_check(_.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const v=Buffer.alloc(16);if(b-=await e.readBuffer(v),_check(v,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(_check(v,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(b)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((r([126,16,4])||r([126,24,4]))&&r([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(r([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(r([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(r([255,10])||r([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),n("BEGIN:")){if(n("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(n("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(n("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(n("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(n("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(r([4,0,0,0])&&t.length>=16){const E=t.readUInt32LE(12);if(E>12&&t.length>=E+16)try{const T=t.slice(16,E+16).toString();if(JSON.parse(T).files)return{ext:"asar",mime:"application/x-asar"}}catch(S){}}if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(n("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(r([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(n("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(t.length>=2&&r([255,224],{offset:0,mask:[255,224]})){if(r([16],{offset:1,mask:[22]}))return r([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(r([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream=readableStream=>new Promise(((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",(async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,(()=>{})):readableStream.pipe(e);const r=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(r);e.fileType=t}catch(e){reject(e)}resolve(t)}))})),fileType={fromStream,fromTokenizer,fromBuffer,stream};Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)}),module.exports=fileType},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),o=r(4227),i=r(2023),s=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 l(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(c(e,t,r))):i}function d(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(l(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(l(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${c(e,t,r)}`:i},t.noPropertyInData=l,t.allSchemaProperties=d,t.schemaProperties=function(e,t){return d(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:s,errorPath:a},it:c},l,d,p){const u=p?n._`${e}, ${t}, ${o}${s}`:t,m=[[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&&m.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const f=n._`${u}, ${r.object(...m)}`;return d!==n.nil?n._`${l}.call(${d}, ${f})`:n._`${l}(${f})`};const p=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(r,o);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===i.code?p:(0,s.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:s}=e,a=t.name("valid");if(s.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(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const s=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,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),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};t.default=o},5882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={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:s,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || 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 o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};t.hasOwn=o,t.convertMapToObject=function(e){return Array.from(e).reduce((function(e,t){var n,o,i=(o=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,o,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}}(n,o)||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,o)||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.")}()),s=i[0],a=i[1];return e[s]=a,e}),{})},t.isArguments=function(e){return null!=e&&o(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)},o=0;o<64;o++)r[n(o)]=o;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))},s={encode:function(e){if("string"==typeof e){var t=e;e=i(t.length);for(var r=0;r<t.length;r++){var o=t.charCodeAt(r);if(o>255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");e[r]=o}}for(var s=[],a=null,c=null,l=null,d=null,p=0;p<e.length;p++)switch(p%3){case 0:a=e[p]>>2&63,c=(3&e[p])<<4;break;case 1:c|=e[p]>>4&15,l=(15&e[p])<<2;break;case 2:l|=e[p]>>6&3,d=63&e[p],s.push(n(a)),s.push(n(c)),s.push(n(l)),s.push(n(d)),a=null,c=null,l=null,d=null}return null!=a&&(s.push(n(a)),s.push(n(c)),null==l?s.push("="):s.push(n(l)),null==d&&s.push("=")),s.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,o=i(t),s=null,a=null,c=null,l=0,d=0;d<e.length;d++){var p="="===(n=e.charAt(d))?-1:r[n];switch(d%4){case 0:if(p<0)throw new Error("invalid base64 string");s=p<<2;break;case 1:if(p<0)throw new Error("invalid base64 string");s|=p>>4,o[l++]=s,a=(15&p)<<4;break;case 2:p>=0&&(a|=p>>2,o[l++]=a,c=(3&p)<<6);break;case 3:p>=0&&(o[l++]=c|p)}}return o},newBinary:i};t.Base64=s},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 o=function e(t,o,i,s,a){var c=o[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 l,d=s+i,p=[];if(Array.isArray(c)||{}.hasOwnProperty.call(c,"callee")){for(var u=c.length,m=0;m<u;m+=1)p[m]=e(m,c,i,d,a)||"null";return l=0===p.length?"[]":d?"[\n"+d+p.join(",\n"+d)+"\n"+s+"]":"["+p.join(",")+"]"}var f=Object.keys(c);return a&&(f=f.sort()),f.forEach((function(t){(l=e(t,c,i,d,a))&&p.push(n(t)+(d?": ":":")+l)})),l=0===p.length?"{}":d?"{\n"+d+p.join(",\n"+d)+"\n"+s+"}":"{"+p.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 o("",{"":e},r.indent,"",r.canonical)},e.exports=t.default}],r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}var o={};!function(){var e=o,t=n(2).Base64,r=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=void 0;var i=n(1),s={};e.EJSON=s;var a=new Map;s.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]=s.toJSONValue(e[r])})),{$escape:t}},fromJSONValue:function(e){var t={};return(0,i.keysOf)(e.$escape).forEach((function(r){t[r]=s.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 s._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)}))}}];s._isCustomType=function(e){return e&&(0,i.isFunction)(e.toJSONValue)&&(0,i.isFunction)(e.typeName)&&a.has(e.typeName())},s._getTypes=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?a:(0,i.convertMapToObject)(a)},s._getConverters=function(){return c};var l=function(e){for(var t=0;t<c.length;t++){var r=c[t];if(r.matchObject(e))return r.toJSONValue(e)}},d=function e(t){if(null===t)return null;var r=l(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 o=l(n);o?t[r]=o:e(n)}})),t):t};s._adjustTypesToJSONValue=d,s.toJSONValue=function(e){var t=l(e);if(void 0!==t)return t;var r=e;return(0,i.isObject)(e)&&(r=s.clone(e),d(r)),r};var p=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=p(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 o=p(n);if(n!==o)return void(t[r]=o);e(n)}})),t):t};s._adjustTypesFromJSONValue=u,s.fromJSONValue=function(e){var t=p(e);return t===e&&(0,i.isObject)(e)&&(t=s.clone(e),u(t)),t},s.stringify=(0,i.handleError)((function(e,t){var r=s.toJSONValue(e);return t&&(t.canonical||t.indent)?n(4)(r,t):JSON.stringify(r)})),s.parse=function(e){if("string"!=typeof e)throw new Error("EJSON.parse argument should be a string");return s.fromJSONValue(JSON.parse(e))},s.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},s.equals=function(e,t,r){var n,o=!(!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(s.isBinary(e)&&s.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),l=Array.isArray(t);if(c!==l)return!1;if(c&&l){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!s.equals(e[n],t[n],r))return!1;return!0}switch(s._isCustomType(e)+s._isCustomType(t)){case 1:return!1;case 2:return s.equals(s.toJSONValue(e),s.toJSONValue(t))}var d=(0,i.keysOf)(e),p=(0,i.keysOf)(t);return o?(n=0,a=d.every((function(o){return!(n>=p.length||o!==p[n]||!s.equals(e[o],t[p[n]],r)||(n++,0))}))):(n=0,a=d.every((function(o){return!!(0,i.hasOwn)(t,o)&&!!s.equals(e[o],t[o],r)&&(n++,!0)}))),a&&n===p.length},s.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(s.isBinary(e)){t=s.newBinary(e.length);for(var r=0;r<e.length;r++)t[r]=e[r];return t}return Array.isArray(e)?e.map(s.clone):(0,i.isArguments)(e)?Array.from(e).map(s.clone):(0,i.isFunction)(e.clone)?e.clone():s._isCustomType(e)?s.fromJSONValue(s.clone(s.toJSONValue(e)),!0):(t={},(0,i.keysOf)(e).forEach((function(r){t[r]=s.clone(e[r])})),t)},s.newBinary=t.newBinary}(),e.exports=o.EJSON}()},6066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadStreamTokenizer=void 0;const n=r(8632),o=r(8705);class i extends n.AbstractTokenizer{constructor(e,t){super(t),this.streamReader=new o.StreamReader(e)}async getFileInfo(){return this.fileInfo}async readBuffer(e,t){const r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===r.length)return 0;const i=await this.streamReader.read(e,r.offset,r.length);if(this.position+=i,(!t||!t.mayBeLess)&&i<r.length)throw new o.EndOfStreamError;return i}async peekBuffer(e,t){const r=this.normalizeOptions(e,t);let n=0;if(r.position){const t=r.position-this.position;if(t>0){const o=new Uint8Array(r.length+t);return n=await this.peekBuffer(o,{mayBeLess:r.mayBeLess}),e.set(o.subarray(t),r.offset),n-t}if(t<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e,r.offset,r.length)}catch(e){if(t&&t.mayBeLess&&e instanceof o.EndOfStreamError)return 0;throw e}if(!r.mayBeLess&&n<r.length)throw new o.EndOfStreamError}return n}async ignore(e){const t=Math.min(256e3,e),r=new Uint8Array(t);let n=0;for(;n<e;){const o=e-n,i=await this.readBuffer(r,{length:Math.min(t,o)});if(i<0)return i;n+=i}return n}}t.ReadStreamTokenizer=i},6144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2128),o=r(7060),i=r(6378),s=r(7532),a=r(9857),c=[n.default,o.default,(0,i.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&i.discriminator)return;const a=r,c=t.let("valid",!1),l=t.let("passing",null),d=t.name("_valid");e.setParams({passing:l}),t.block((function(){a.forEach(((r,i)=>{let a;(0,o.alwaysValidSchema)(s,r)?t.var(d,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},d),i>0&&t.if(n._`${d} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${i}]`).else(),t.if(d,(()=>{t.assign(c,!0),t.assign(l,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),o=r(5354),i=r(494),s=r(3966),a=r(2661),c=r(3025),l=r(9713),d=r(8660),p=r(117),u=r(5333),m=r(7923),f=r(6505),h=r(6163),y=r(5844),g=r(1239),w=r(4426);t.default=function(e=!1){const t=[m.default,f.default,h.default,y.default,g.default,w.default,l.default,d.default,c.default,p.default,u.default];return e?t.push(o.default,s.default):t.push(n.default,i.default),t.push(a.default),t}},6452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromBuffer=t.fromStream=t.EndOfStreamError=void 0;const n=r(6066),o=r(3492);var i=r(8705);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return i.EndOfStreamError}}),t.fromStream=function(e,t){return t=t||{},new n.ReadStreamTokenizer(e,t)},t.fromBuffer=function(e,t){return new o.BufferTokenizer(e,t)}},6461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(3282),o=r(9029),i=o.operators,s={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})=>o.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${s[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:i,keyword:a,it:c}=e,{opts:l,self:d}=c;if(!l.validateFormats)return;const p=new n.KeywordCxt(c,d.RULES.all.format.definition,"format");function u(e){return o._`${e}.compare(${r}, ${i}) ${s[a].fail} 0`}p.$data?function(){const r=t.scopeValue("formats",{ref:d.formats,code:l.code.formats}),n=t.const("fmt",o._`${r}[${p.schemaCode}]`);e.fail$data((0,o.or)(o._`typeof ${n} != "object"`,o._`${n} instanceof RegExp`,o._`typeof ${n}.compare != "function"`,u(n)))}():function(){const r=p.schema,n=d.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:l.code.formats?o._`${l.code.formats}${(0,o.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),o=r(7652),i=r(3835),s=r(4551),a=r(4227),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:c,parentSchema:l,it:d}=e,{oneOf:p}=l;if(!d.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(!p)throw new Error("discriminator: requires oneOf keyword");const m=t.let("valid",!1),f=t.const("tag",n._`${r}${(0,n.getProperty)(u)}`);function h(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${f} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!0;for(let t=0;t<p.length;t++){let l=p[t];if((null==l?void 0:l.$ref)&&!(0,a.schemaHasRulesButRef)(l,d.self.RULES)){const e=l.$ref;if(l=i.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e),l instanceof i.SchemaEnv&&(l=l.schema),void 0===l)throw new s.default(d.opts.uriResolver,d.baseId,e)}const m=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[u];if("object"!=typeof m)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);n=n&&(r||o(l)),c(m,t)}if(!n)throw new Error(`discriminator: "${u}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(u)}function c(e,t){if(e.const)m(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`);for(const r of e.enum)m(r,t)}}function m(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._`${f} === ${e}`),t.assign(m,h(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:f,tagName:u}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:f,tagName:u}))),e.ok(m)}};t.default=c},6760:(e,t)=>{"use strict";t.stringToBytes=e=>[...e].map((e=>e.charCodeAt(0))),t.tarHeaderChecksumMatches=(e,t=0)=>{const r=parseInt(e.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(r))return!1;let n=256;for(let r=t;r<t+148;r++)n+=e[r];for(let r=t+156;r<t+512;r++)n+=e[r];return r===n},t.uint32SyncSafeToken={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}},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),o=r(2017),i=r(7106),s=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&&l(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 l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function d(e,t="",r){!1!==r&&(t=m(t));const n=e.parse(t);return p(e,n)}function p(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=p;const u=/#\/?$/;function m(e){return e?e.replace(u,""):""}t.normalizeId=m,t.resolveUrl=function(e,t,r){return r=m(r),e.resolve(t,r)};const f=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=m(e[r]||t),a={"":s},c=d(n,s,!1),l={},p=new Set;return i(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const i=c+t;let s=a[o];function d(t){const r=this.opts.uriResolver.resolve;if(t=m(s?r(s,t):t),p.has(t))throw h(t);p.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?u(e,n.schema,t):t!==m(i)&&("#"===t[0]?(u(e,l[t],t),l[t]=e):this.refs[t]=i),t}function y(e){if("string"==typeof e){if(!f.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=d.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=s})),l;function u(e,t,r){if(void 0!==t&&!o(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 o=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 o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),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,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=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 l(e,t,r,n){var o,i,s,l;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),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,l=d,console&&console.warn&&console.warn(l)}return e}function d(){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 p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=d.bind(n);return o.listener=r,n.wrapFn=o,o}function u(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]: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}(o):f(o,o.length)}function m(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 f(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 o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=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||o(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 o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,d=f(c,l);for(r=0;r<l;++r)n(d[r],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,p(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,p(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,s;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(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||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 o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);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):m.call(e,t)},i.prototype.listenerCount=m,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),o=r(3439),i=r(7307),s=r(422),a=r(4486),c=r(4003),l=r(1163),d=r(617),p=r(7935),u=r(8643),m=[n.default,o.default,i.default,s.default,a.default,c.default,l.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,u.default];t.default=m},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,o,i,s,a,c,l,d,p){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var u in n(i,s,a,c,l,d,p),i){var m=i[u];if(Array.isArray(m)){if(u in t.arrayKeywords)for(var f=0;f<m.length;f++)r(e,n,o,m[f],s+"/"+u+"/"+f,a,s,u,i,f)}else if(u in t.propsKeywords){if(m&&"object"==typeof m)for(var h in m)r(e,n,o,m[h],s+"/"+u+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,u,i,h)}else(u in t.keywords||e.allKeys&&!(u in t.skipKeywords))&&r(e,n,o,m,s+"/"+u,a,s,u,i)}o(i,s,a,c,l,d,p)}}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),o=r(4227),i=r(3853),s={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:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${l} ${c} ${s}`)}};t.default=s},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 o 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 s{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=s;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 s{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:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[o];if(s){const e=s.get(i);if(e)return e}else s=this._values[o]=new Map;s.set(i,n);const a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,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,s={},a){let c=n.nil;for(const l in e){const d=e[l];if(!d)continue;const p=s[l]=s[l]||new Map;d.forEach((e=>{if(p.has(e))return;p.set(e,i.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new o(e);c=n._`${c}${s}${this.opts._n}`}p.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),o=r(4227);function i(e,t,r){const{gen:i,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const l=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,o.checkStrictMode)(e,`default is ignored for: ${l}`);let d=n._`${l} === undefined`;"empty"===c.useDefaults&&(d=n._`${d} || ${l} === null || ${l} === ""`),i.if(d,n._`${l} = ${(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 o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},7923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4227),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,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=o},7935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},8122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=class{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}}},8182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4018),o=r(6461),i=r(9029),s=new i.Name("fullFormats"),a=new i.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return l(e,t,n.fullFormats,s),e;const[r,i]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,s];return l(e,t.formats||n.formatNames,r,i),t.keywords&&(0,o.default)(e),e};function l(e,t,r,n){var o,s;null!==(o=(s=e.opts.code).formats)&&void 0!==o||(s.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:o,removeDotSegments:i,recomposeAuthority:s,normalizeComponentEncoding:a}=r(4834),c=r(343);function l(e,t,r,n){const o={};return n||(e=m(d(e,r),r),t=m(d(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=i(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=i(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function d(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),o=[],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&&o.push(r.scheme,":");const l=s(r);if(void 0!==l&&("suffix"!==n.reference&&o.push("//"),o.push(l),r.path&&"/"!==r.path.charAt(0)&&o.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=i(e)),void 0===l&&(e=e.replace(/^\/\//u,"/%2F")),o.push(e)}return void 0!==r.query&&o.push("?",r.query),void 0!==r.fragment&&o.push("#",r.fragment),o.join("")}const p=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)))),u=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(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},s=-1!==e.indexOf("%");let a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const l=e.match(u);if(l){if(i.scheme=l[1],i.userinfo=l[3],i.host=l[4],i.port=parseInt(l[5],10),i.path=l[6]||"",i.query=l[7],i.fragment=l[8],isNaN(i.port)&&(i.port=l[5]),i.host){const e=o(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||p[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)&&(s&&void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),s&&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 f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=d(m(e,t),t):"object"==typeof e&&(e=m(d(e,t),t)),e},resolve:function(e,t,r){const n=Object.assign({scheme:"null"},r);return d(l(m(e,n),m(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:l,equal:function(e,t,r){return"string"==typeof e?(e=unescape(e),e=d(a(m(e,r),!0),{...r,skipEscape:!0})):"object"==typeof e&&(e=d(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=d(a(m(t,r),!0),{...r,skipEscape:!0})):"object"==typeof t&&(t=d(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:d,parse:m};e.exports=f,e.exports.default=f,e.exports.fastUri=f},8632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTokenizer=void 0;const n=r(8705);t.AbstractTokenizer=class{constructor(e){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e||{}}async readToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async peekToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new n.EndOfStreamError;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new n.EndOfStreamError;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}}},8643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=r(4227),i=r(6250),s={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:s,schema:a,schemaCode:c,it:l}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const d=a.length>=l.opts.loopEnum;let p;const u=()=>null!=p?p:p=(0,o.useFunc)(t,i.default);let m;if(d||s)m=t.let("valid"),e.block$data(m,(function(){t.assign(m,!1),t.forOf("v",c,(e=>t.if(n._`${u()}(${r}, ${e})`,(()=>t.assign(m,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);m=(0,n.or)(...a.map(((t,o)=>function(e,t){const o=a[t];return"object"==typeof o&&null!==o?n._`${u()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(m)}};t.default=s},8660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),o=r(9029),i=r(2023),s=r(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:l,it:d}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:p,opts:u}=d;if(d.props=!0,"all"!==u.removeAdditional&&(0,s.alwaysValidSchema)(d,r))return;const m=(0,n.allSchemaProperties)(a.properties),f=(0,n.allSchemaProperties)(a.patternProperties);function h(e){t.code(o._`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(p||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(d,r)){const r=t.name("valid");"failing"===u.removeAdditional?(g(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),h(n)}))):(g(n,r),p||t.if((0,o.not)(r),(()=>t.break())))}}}function g(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",c,(r=>{m.length||f.length?t.if(function(r){let i;if(m.length>8){const e=(0,s.schemaRefOrVal)(d,a.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=m.length?(0,o.or)(...m.map((e=>o._`${r} === ${e}`))):o.nil;return f.length&&(i=(0,o.or)(i,...f.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>y(r))):y(r)})),e.ok(o._`${l} === ${i.default.errors}`)}};t.default=a},8705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamReader=t.EndOfStreamError=void 0;var n=r(5523);Object.defineProperty(t,"EndOfStreamError",{enumerable:!0,get:function(){return n.EndOfStreamError}});var o=r(1510);Object.defineProperty(t,"StreamReader",{enumerable:!0,get:function(){return o.StreamReader}})},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),o=r(4227),i=r(2023);function s(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:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.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,o,i){const{it:c}=e,{gen:d,compositeRule:p,allErrors:u}=c,m=l(e,r,o);(null!=i?i:p||u)?s(d,m):a(c,n._`[${m}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:c,compositeRule:d,allErrors:p}=o;s(c,l(e,r,n)),d||p||a(o,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:o,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,i.default.errors,(s=>{e.const(c,n._`${i.default.vErrors}[${s}]`),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`,o))}))};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 l(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:s}=e,a=[d(s,r),p(e,r)];return function(e,{params:t,message:r},o){const{keyword:s,data:a,schemaValue:l,it:d}=e,{opts:p,propertyName:u,topSchemaRef:m,schemaPath:f}=d;o.push([c.keyword,s],[c.params,"function"==typeof t?t(e):t||n._`{}`]),p.messages&&o.push([c.message,"function"==typeof r?r(e):r]),p.verbose&&o.push([c.schema,l],[c.parentSchema,n._`${m}${f}`],[i.default.data,a]),u&&o.push([c.propertyName,u])}(e,t,a),o.object(...a)}(e,t,r)}function d({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let s=i?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,o.getErrorPath)(r,o.Type.Str)}`),[c.schemaPath,s]}},8727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(8708),o=r(9029),i=r(2023),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,s,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(o._`${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),o=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 s=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.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?o.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=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class l 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=I(this.rhs,e,t),this}get names(){return k(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class d extends l{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p 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 m extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f 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=I(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 o=r[n];o.optimizeNames(e,t)||(N(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class y extends h{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends h{}class w extends y{}w.kind="else";class _ extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new w(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(j(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return k(e,this.condition),this.else&&A(e,this.else.names),e}}_.kind="if";class b extends y{}b.kind="for";class v extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class E extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.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=k(super.names,this.from);return k(e,this.to)}}class T extends b{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=I(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class S 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)}}S.kind="func";class $ extends h{render(e){return"return "+super.render(e)}}$.kind="return";class O 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&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class P extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class x extends y{render(e){return"finally"+super.render(e)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function k(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function I(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._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 o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function N(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}x.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 o.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 o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new c(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new d(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(_,w)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new v(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const s=this._scope.toName(e);return this._for(new E(i,s,t,r),(()=>n(s)))}forOf(e,t,r,i=o.varKinds.const){const s=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(s,n._`${e}[${t}]`),r(s)}))}return this._for(new T("of",i,s,t),(()=>r(s)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new T("in",i,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new $;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new O;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new x,this.code(r)),this._endBlockNode(P,x)}throw(e){return this._leafNode(new m(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,o){return this._blockNode(new S(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=j;const C=R(t.operators.AND);t.and=function(...e){return e.reduce(C)};const D=R(t.operators.OR);function R(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(D)}},9713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9029),o=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:s}=e;if((0,o.alwaysValidSchema)(s,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),s.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"]}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);__webpack_require__.r(r);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var o=2&t&&e;"object"==typeof o&&!~leafPrototypes.indexOf(o);o=getProto(o))Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,__webpack_require__.d(r,n),r},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>e+".cocolight-api-client.browser.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),inProgress={},dataWebpackPrefix="CocolightApiClient:",__webpack_require__.l=(e,t,r,n)=>{if(inProgress[e])inProgress[e].push(t);else{var o,i;if(void 0!==r)for(var s=document.getElementsByTagName("script"),a=0;a<s.length;a++){var c=s[a];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==dataWebpackPrefix+r){o=c;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,__webpack_require__.nc&&o.setAttribute("nonce",__webpack_require__.nc),o.setAttribute("data-webpack",dataWebpackPrefix+r),o.src=e),inProgress[e]=[t];var l=(t,r)=>{o.onerror=o.onload=null,clearTimeout(d);var n=inProgress[e];if(delete inProgress[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((e=>e(r))),t)return t(r)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={792:0};__webpack_require__.f.j=(t,r)=>{var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var i=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(i,(r=>{if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[i,s,a]=r,c=0;if(i.some((t=>0!==e[t]))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);a&&a(__webpack_require__)}for(t&&t(r);c<i.length;c++)o=i[c],__webpack_require__.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=this.webpackChunkCocolightApiClient=this.webpackChunkCocolightApiClient||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>hr});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{ApiAuthenticationError:()=>a,ApiClientError:()=>n,ApiError:()=>r,ApiResponseError:()=>s,ApiValidationError:()=>o,CircuitBreakerError:()=>i});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{hasBrowserEnv:()=>ze,hasStandardBrowserEnv:()=>qe,hasStandardBrowserWebWorkerEnv:()=>Ue,navigator:()=>Me,origin:()=>Be});class r extends Error{constructor(e,t,r){super(e),this.name="ApiError",this.status=t,this.details=r}}class n extends r{constructor(e,t,r){super(e,t,r),this.name="ApiClientError"}}class o extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiValidationError",this.status=t,this.messages=r,this.details=n}}class i extends r{constructor(e){super(e,503),this.name="CircuitBreakerError"}}class s extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiResponseError",this.status=t,this.responseData=r,this.details=n}}class a extends r{constructor(e,t,r){super(e,t,r),this.name="ApiAuthenticationError"}}const c=class{constructor(e){this.apiClient=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))}async callNoConnected(e,t={}){if(this.isConnected)throw new a("Vous ne devez pas être connecté pour faire cette action.");return this.call(e,t)}async callIsConnected(e,t={}){if(!this.isConnected)throw new a("Vous devez être connecté pour effectuer cette action.");return this.call(e,t)}async personRegister(e={}){return this.callNoConnected("PERSON_REGISTER",e)}async authenticateUrl(e={}){return this.callNoConnected("AUTHENTICATE_URL",e)}async refreshTokenUrl(e={}){return this.call("REFRESH_TOKEN_URL",e)}async meInfoUrl(e={}){return this.callIsConnected("ME_INFO_URL",e)}async passwordRecovery(e={}){return this.callNoConnected("PASSWORD_RECOVERY",e)}async serverExchangeToken(e={}){return this.callIsConnected("SERVER_EXCHANGE_TOKEN",e)}async changePassword(e={}){return this.callIsConnected("CHANGE_PASSWORD",e)}async deleteAccount(e={}){return this.callIsConnected("DELETE_ACCOUNT",e)}async updateSettings(e={}){return this.callIsConnected("UPDATE_SETTINGS",e)}async updateBlockDescription(e={}){return this.callIsConnected("UPDATE_BLOCK_DESCRIPTION",e)}async updateBlockInfo(e={}){return this.callIsConnected("UPDATE_BLOCK_INFO",e)}async updateBlockSocial(e={}){return this.callIsConnected("UPDATE_BLOCK_SOCIAL",e)}async updateBlockLocality(e={}){return this.callIsConnected("UPDATE_BLOCK_LOCALITY",e)}async updateBlockSlug(e={}){return this.callIsConnected("UPDATE_BLOCK_SLUG",e)}async check(e={}){return this.callIsConnected("CHECK",e)}async profilImage(e={}){return this.callIsConnected("PROFIL_IMAGE",e)}async getElementsAbout(e={}){return this.call("GET_ELEMENTS_ABOUT",e)}async multiconnect(e={}){return this.callIsConnected("MULTICONNECT",e)}async getNews(e={}){return this.call("GET_NEWS",e)}async getNewsById(e={}){return this.call("GET_NEWS_BY_ID",e)}async addNews(e={}){return this.callIsConnected("ADD_NEWS",e)}async addImageNews(e={}){return this.callIsConnected("ADD_IMAGE_NEWS",e)}async addFileNews(e={}){return this.callIsConnected("ADD_FILE_NEWS",e)}async deleteNews(e={}){return this.callIsConnected("DELETE_NEWS",e)}async updateNews(e={}){return this.callIsConnected("UPDATE_NEWS",e)}async shareNews(e={}){return this.callIsConnected("SHARE_NEWS",e)}async getComments(e={}){return this.call("GET_COMMENTS",e)}async addComments(e={}){return this.callIsConnected("ADD_COMMENTS",e)}async deleteComments(e={}){return this.callIsConnected("DELETE_COMMENTS",e)}async updateComments(e={}){return this.callIsConnected("UPDATE_COMMENTS",e)}async searchTags(e={}){return this.call("SEARCH_TAGS",e)}async showVote(e={}){return this.call("SHOW_VOTE",e)}async globalAutocomplete(e={}){return this.call("GLOBAL_AUTOCOMPLETE",e)}async cityAutocomplete(e={}){return this.call("CITY_AUTOCOMPLETE",e)}async suggestionInput(e={}){return this.call("SUGGESTION_INPUT",e)}async getProjectsNoAdmin(e={}){return this.call("GET_PROJECTS_NO_ADMIN",e)}async getProjectsAdmin(e={}){return this.callIsConnected("GET_PROJECTS_ADMIN",e)}async getPoisNoAdmin(e={}){return this.call("GET_POIS_NO_ADMIN",e)}async getPoisAdmin(e={}){return this.callIsConnected("GET_POIS_ADMIN",e)}async getOrganizationsNoAdmin(e={}){return this.call("GET_ORGANIZATIONS_NO_ADMIN",e)}async getOrganizationsAdmin(e={}){return this.callIsConnected("GET_ORGANIZATIONS_ADMIN",e)}async getMembersNoAdmin(e={}){return this.call("GET_MEMBERS_NO_ADMIN",e)}async getMembersAdmin(e={}){return this.callIsConnected("GET_MEMBERS_ADMIN",e)}async getFriendsAdmin(e={}){return this.callIsConnected("GET_FRIENDS_ADMIN",e)}async getSubscriptions(e={}){return this.call("GET_SUBSCRIPTIONS",e)}async getSubscriptionsAdmin(e={}){return this.callIsConnected("GET_SUBSCRIPTIONS_ADMIN",e)}async getSubscribers(e={}){return this.call("GET_SUBSCRIBERS",e)}async getSubscribersAdmin(e={}){return this.callIsConnected("GET_SUBSCRIBERS_ADMIN",e)}async getContributors(e={}){return this.call("GET_CONTRIBUTORS",e)}async getContributorsAdmin(e={}){return this.callIsConnected("GET_CONTRIBUTORS_ADMIN",e)}async getBadges(e={}){return this.call("GET_BADGES",e)}async getBadgesFilters(e={}){return this.call("GET_BADGES_FILTERS",e)}async connect(e={}){return this.callIsConnected("CONNECT",e)}async disconnect(e={}){return this.callIsConnected("DISCONNECT",e)}async getElementsKey(e={}){return this.call("GET_ELEMENTS_KEY",e)}async getFavoris(e={}){return this.callIsConnected("GET_FAVORIS",e)}async deleteFavoris(e={}){return this.callIsConnected("DELETE_FAVORIS",e)}async addFavoris(e={}){return this.callIsConnected("ADD_FAVORIS",e)}async addOrganization(e={}){return this.callIsConnected("ADD_ORGANIZATION",e)}async addProject(e={}){return this.callIsConnected("ADD_PROJECT",e)}async addPoi(e={}){return this.callIsConnected("ADD_POI",e)}async addEvent(e={}){return this.callIsConnected("ADD_EVENT",e)}async deletePoi(e={}){return this.callIsConnected("DELETE_POI",e)}async deleteEvent(e={}){return this.callIsConnected("DELETE_EVENT",e)}async deleteElement(e={}){return this.callIsConnected("DELETE_ELEMENT",e)}async addImageElement(e={}){return this.callIsConnected("ADD_IMAGE_ELEMENT",e)}async linkValidate(e={}){return this.callIsConnected("LINK_VALIDATE",e)}async searchMemberAutocomplete(e={}){return this.call("SEARCH_MEMBER_AUTOCOMPLETE",e)}async getNotifications(e={}){return this.callIsConnected("GET_NOTIFICATIONS",e)}async getNotificationsCount(e={}){return this.callIsConnected("GET_NOTIFICATIONS_COUNT",e)}async notificationUpdate(e={}){return this.callIsConnected("NOTIFICATION_UPDATE",e)}async removeAllNotifications(e={}){return this.callIsConnected("REMOVE_ALL_NOTIFICATIONS",e)}async markNotificationAsRead(e={}){return this.callIsConnected("MARK_NOTIFICATION_AS_READ",e)}async activitypubSearch(e={}){return this.call("ACTIVITYPUB_SEARCH",e)}async activitypubLink(e={}){return this.callIsConnected("ACTIVITYPUB_LINK",e)}async activitypubGetCommunity(e={}){return this.call("ACTIVITYPUB_GET_COMMUNITY",e)}async getBadge(e={}){return this.call("GET_BADGE",e)}async getEmetteurBadges(e={}){return this.call("GET_EMETTEUR_BADGES",e)}async addBadges(e={}){return this.callIsConnected("ADD_BADGES",e)}async assignBadges(e={}){return this.callIsConnected("ASSIGN_BADGES",e)}async getEvents(e={}){return this.call("GET_EVENTS",e)}async shareEvents(e={}){return this.callIsConnected("SHARE_EVENTS",e)}async inviteEvent(e={}){return this.callIsConnected("INVITE_EVENT",e)}},l={_createDraftProxy:(e,t={},r={},n=[],i={},s={})=>new Proxy({},{get:(e,n)=>{const o=n in r?r[n]:t[n],s=i[n];return"function"==typeof s?s(o):o},set:(t,i,a)=>{if(!n.includes(i)){const t=`[DraftProxy] Le champ "${i}" n'est pas autorisé.`;if(s.throwOnError)throw new o(t,400,null,{field:i,value:a,allowedFields:n});return e._logger.warn(t),!1}return r[i]=a,!0},deleteProperty:(e,t)=>!!n.includes(t)&&(delete r[t],!0),has:(e,n)=>n in r||n in t,ownKeys:()=>[...new Set([...Object.keys(t),...Object.keys(r)])],getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0})}),_extractWritableFields(e={},t={},r={defs:{},visited:new Set}){if(!e||"object"!=typeof e)return[];if(e.$id&&r.visited.has(e.$id))return[];e.$id&&r.visited.add(e.$id),r.defs=e.$defs||e.definitions||r.defs;const n=[];if(e.$ref){const o=e.$ref.replace(/^#\/?(\$defs|definitions)\//,""),i=r.defs?.[o];i&&n.push(...this._extractWritableFields(i,t,r))}if(e.allOf&&e.allOf.forEach((e=>n.push(...this._extractWritableFields(e,t,r)))),e.if&&e.then){const o=e.if?.properties;let i=!0;if(o)for(const e in o){const r=o[e]?.const;if(t[e]!==r){i=!1;break}}i&&e.then?n.push(...this._extractWritableFields(e.then,t,r)):!i&&e.else&&n.push(...this._extractWritableFields(e.else,t,r))}return e.properties&&n.push(...Object.entries(e.properties).filter((([e,t])=>!0!==t.readOnly&&void 0===t.const)).map((([e])=>e))),[...new Set(n)]},_buildDraftAndProxy({data:e={},serverData:t=null,constant:n,apiClient:o,transforms:i={},throwOnError:s=!0,removeFields:a=[]}){const c=Array.isArray(n)?n:[n],l={allOf:[],$defs:{}};for(const e of c){const t=o.getRequestSchema(e);if(!t)throw new r(`Unable to find schema for ${e}.`);if(t.$defs)for(const[r,n]of Object.entries(t.$defs))l.$defs[r]?o._logger.warn(`Duplicate $defs key '${r}' from schema '${e}'`):l.$defs[r]=n;l.allOf.push(t)}const d={};let p=this._extractWritableFields(l,e);e.id&&-1===p.indexOf("id")&&p.push("id"),e.slug&&-1===p.indexOf("slug")&&p.push("slug"),p=p.filter((e=>!a.includes(e)));for(const t of p){const r=e[t],n="function"==typeof i[t]?i[t](r,e):r;void 0!==n&&(d[t]=n)}return{draft:d,proxy:this._createDraftProxy(o,t,d,p,i,{throwOnError:s})}},_extractChangedFieldsFromSchema(e,t,r={},n,o=[]){const i=e.getRequestSchema(t);let s=this._extractWritableFields(i,r);const a={},c=n?.()||{};s=s.filter((e=>!o.includes(e)));for(const e of s){if(void 0===r[e])continue;const t=r[e],n=c[e];JSON.stringify(t)!==JSON.stringify(n)&&(a[e]=t)}return Object.keys(a).length>0?a:null}};var d=__webpack_require__(2808),p=__webpack_require__(3846);const{fileTypeFromBuffer:u}=p,m={async call(e,t={}){return this.apiClient.safeCall((async()=>{const r=await this.apiClient.callEndpoint(e,t);return this.apiClient.checkAndThrowApiResponseError(r),r.data}))},async callNoConnected(e,t={}){if(this.isConnected)throw new a("Vous devez ne devez pas être connecté pour faire cette action.");return this.call(e,t)},async callIsConnected(e,t={}){if(!this.isConnected)throw new a("Vous devez être connecté pour faire cette action.");return"function"==typeof e?await e():this.call(e,t)},async callIsMe(e,t={}){if(!this.isMe)throw new a("Vous devez être vous-même pour faire cette action.");return"function"==typeof e?await e():await this.callIsConnected(e,t)},async _validateImage(e){return await this._validateUploadInput(e,{allowedMimeTypes:["image/jpeg","image/png","image/jpg"],expectedType:"image"})},async _validateFile(e){return await this._validateUploadInput(e,{allowedMimeTypes:["application/pdf","text/plain","text/csv"],expectedType:"file"})},async _validateUploadInput(e,{allowedMimeTypes:t=[],expectedType:r="any"}){if(!e)throw new o("Le fichier est requis.");const n="undefined"==typeof window&&"undefined"!=typeof process;let i="",s=e;if("undefined"!=typeof File&&e instanceof File){if(i=e.type,!t.includes(i))throw new o("Le type du fichier est invalide.")}else if("undefined"!=typeof Blob&&e instanceof Blob){if(i=e.type,!t.includes(i))throw new o("Le type du fichier est invalide.");const r=i.split("/")[1]||"bin",n=`${Date.now()}.${r}`;s=new File([e],n,{type:i})}else if(n&&Buffer.isBuffer(e)){const n=await u(e);if(i=n?.mime,!n||!t.includes(i))throw new o("Le type du fichier est invalide.");if("image"===r){const t=n.ext,r=`${Date.now()}.${t}`;s=await this._createReadStreamFromBuffer(e,r,i)}}else{if(!n||!e?.readable||"function"!=typeof e._read)throw new o("Type de fichier non reconnu.");{const r=[],n=await this._passThrough(),a=await this._passThrough(),c=4100;let l=0;e.on("data",(e=>{l<c&&(r.push(e),l+=e.length)})),e.pipe(n).pipe(a),await new Promise((e=>setTimeout(e,10)));const d=Buffer.concat(r),p=await u(d);if(i=p?.mime,!p||!t.includes(i))throw new o("Le type du fichier est invalide.");a.path=`${Date.now()}.${p.ext}`,a.mimeType=i,s=a}}return s},async _createReadStreamFromBuffer(e,t="file.bin",r="application/octet-stream"){const n=await this._bufferToReadable(e);return n.path=t,n.mimeType=r,n},async _bufferToReadable(e){if("undefined"==typeof window){const{bufferToReadable:t}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return t(e)}throw new Error("bufferToReadable ne doit pas être appelé dans le navigateur")},async _passThrough(){if("undefined"==typeof window){const{createPassThrough:e}=await __webpack_require__.e(931).then(__webpack_require__.bind(__webpack_require__,7931));return e()}throw new Error("passThrough ne doit pas être appelé dans le navigateur")},_omitProps(e,t){if(!e||"object"!=typeof e)return{};const r={...e};for(const e of t)delete r[e];return r},_pickProps(e,t,r={}){if(!e||"object"!=typeof e)return{};const n={};for(const o of t)if(o in e){const t=e[o];"function"==typeof r[o]?n[o]=r[o](t,e):n[o]=t}return n},_createFilteredProxy:e=>new Proxy(e,{get:(e,t,r)=>"string"!=typeof t||isNaN(t)?"length"===t?e.filter((e=>!e._isDeleted)).length:"function"==typeof e[t]?(...r)=>e.filter((e=>!e._isDeleted))[t](...r):Reflect.get(e,t,r):e.filter((e=>!e._isDeleted))[t]}),_newId:()=>(new d).toString()};class f{#e={};#t={};#r=null;static entityType="news";static SCHEMA_CONSTANTS=["ADD_NEWS"];constructor(e,t={},n={}){if(this.__entityTag="News",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!n.User)throw new r("User class must be injected.");if(!e)throw new r("Parent is required.");if(this.deps=n,this.EndpointApiClass=n.EndpointApi,"User"!==e?.__entityTag&&"Organization"!==e?.__entityTag&&"Project"!==e?.__entityTag)throw new r("Invalid parent for News.");this.apiClient=e.apiClient,this.parent=e,this.endpointApi="function"==typeof n.EndpointApi?new n.EndpointApi(this.apiClient):"object"==typeof n.EndpointApi?n.EndpointApi:(()=>{throw new r("deps.EndpointApi must be a class or instance.")})(),this.#r=null;const{draft:o,proxy:i}=this._buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:f.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}get isConnected(){return this.apiClient.isConnected}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}get userId(){return this.apiClient.userId}get isMe(){return this.isConnected&&this.userId===this.parent.id}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this._buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:f.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}getEntityType(){return f.entityType}static fromServerData(e,t,r){const n=new f(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n._buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:f.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n.#e=o,n.data=i,n}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async get(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");const e=await this.callIsConnected((()=>this.endpointApi.getNewsById({ids:[this.id]})));if(e&&Array.isArray(e)&&1===e.length){const t=e[0];return this.#r={...t},this._setData(t),this.#r}throw new r(`Aucune actualité trouvée pour l'ID ${this.id}`)}async save(){if(!this.isConnected)throw new r("Impossible de sauvegarder sans être connecté.");""===this.#e?.text&&(this.#e.text=" ");const e={...this.#e};if(e.parentId=this.parent.id,e.parentType=this.parent.getEntityType(),this.id){e.id&&delete e.id;const t=await this.callIsConnected((()=>this.endpointApi.updateNews({...e,idNews:this.id})));return t?.object&&(this.#r={...t.object}),t}{const t=await this.callIsConnected((()=>this.endpointApi.addNews(e)));return this.#e.id=t.object.id,t?.object&&(this.#r={...t.object}),t}}async addMention({slug:e,id:t}){try{if(!e&&!t)throw new r("Vous devez fournir un slug ou un id pour ajouter une mention.");const n=new this.deps.User(this.apiClient,{id:t,slug:e},{EndpointApi:this.endpointApi}),o=n.serverData;if(this.#e.mentions||(this.#e.mentions=[]),this.#e.mentions.find((e=>e.id===o.id)))return this.#e.mentions=this.#e.mentions.map((e=>(e.id===o.id&&(e.count+=1),e))),this.#e.mentions;const i={id:o.id,slug:o.slug,type:n.getEntityType(),name:o.name,value:o.name,count:1};return this.#e.mentions.push(i),this.#e.mentions}catch(e){throw this.apiClient._logger.error("Erreur lors de l'ajout de la mention :",e),e}}async addImage(e){e=await this._validateImage(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsImage:e},r=await this.callIsConnected((()=>this.endpointApi.addImageNews(t)));return this.#e.mediaImg?(this.#e.mediaImg.countImages=this.#e.mediaImg.countImages+1,this.#e.mediaImg.images.push(r.id)):this.#e.mediaImg={countImages:1,images:[r.id]},r}async addFile(e){e=await this._validateFile(e);const t={pathParams:{folder:this.parent.getEntityType(),ownerId:this.parent.id},newsFile:e},r=await this.callIsConnected((()=>this.endpointApi.addFileNews(t)));return this.#e.mediaFile?(this.#e.mediaFile.countFiles=this.#e.mediaFile.countFiles+1,this.#e.mediaFile.files.push(r)):this.#e.mediaFile={countFiles:1,files:[r]},r}async delete(){if(!this.id)throw new r("Vous devez fournir un id pour supprimer une news.");const e={pathParams:{id:this.id}};await this.callIsConnected((()=>this.endpointApi.deleteNews(e))),this.#e={},this.#r=null,this.#e.id=null,this._isDeleted=!0}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}defaultFields={};removeFields=[];transforms={scope:e=>e?.type,mentions:e=>Array.isArray(e)?e.map((e=>({...e,count:parseInt(e.count)}))):[],mediaImg:e=>{const t=e?.images?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countImages:t.length,images:t}:void 0},mediaFile:e=>{const t=e?.files?.map((e=>e.id)).filter(Boolean)||[];return t.length>0?{countFiles:t.length,files:t}:void 0}}}Object.assign(f.prototype,m,l);const h={async get(){return this.apiClient.safeCall((async()=>{const e=await this.getPublicProfile();return this._setData(e),e}))},async updateSettings(e={}){return e.idEntity=this.id,e.typeEntity=this.getEntityType(),this.callIsConnected((()=>this.endpointApi.updateSettings(e)))},async updateDescription(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockDescription(e)))},async updateInfo(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockInfo(e)))},async updateSocial(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockSocial(e)))},async updateLocality(e={}){return e.typeElement=this.getEntityType(),e.id=this.id,this.callIsConnected((()=>this.endpointApi.updateBlockLocality(e)))},async updateSlug({slug:e}){try{await this.endpointApi.check({type:this.getEntityType(),id:this.id,slug:e})}catch(e){if(e instanceof s)throw new s("Erreur lors de la vérification du slug.",e.status,e.data);throw e}return this.callIsConnected((()=>this.endpointApi.updateBlockSlug({typeElement:this.getEntityType(),id:this.id,slug:e})))},async updateImageProfil({profil_avatar:e}){e=await this._validateImage(e);const t={pathParams:{folder:this.getEntityType(),ownerId:this.id},profil_avatar:e};return this.callIsConnected((()=>this.endpointApi.profilImage(t)))}},y={async resolveId(e){if(!this.id&&this.slug)try{const t=await this.endpointApi.getElementsKey({pathParams:{slug:this.slug}});if(!t?.contextId||t?.contextType!==e)throw new s(`Le slug ${this.slug} ne correspond pas à un ${e}`,200,t);this._id(t.contextId)}catch(t){throw t instanceof s?t?.responseData?.contextType!==e?t:new s(`Impossible de récupérer l'identifiant pour le slug ${this.slug}`,t.status,t.responseData):t}return this.id},async getPublicProfile(){return await this.resolveId(this.getEntityType()),this.endpointApi.getElementsAbout({pathParams:{id:this.id,type:this.getEntityType()}})}},g={async getNews(e={}){e.pathParams={type:this.getEntityType(),id:this.id};const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new s("Erreur lors de la récupération des actualités.",500,t);const r=t.map((e=>this.deps.News.fromServerData(e,this,{User:this.deps.User,EndpointApi:this.deps.EndpointApi})));return this._createFilteredProxy(r)},async news(e){try{const t=new this.deps.News(this,e,{User:this.deps.User,EndpointApi:this.deps.EndpointApi});return e.id&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.getEntityType()}.news] Erreur lors de la création d'une instance news :`,e.message),e}}};class w{#e={};#t={};#r=null;static entityType="organizations";static SCHEMA_CONSTANTS=["ADD_ORGANIZATION","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_ORGANIZATION","addOrganization"],["PROFIL_IMAGE",""]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);constructor(e,t={},n={}){if(this.__entityTag="Organization",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!n.User)throw new r("User class must be injected.");if(!n.Project)throw new r("Project class must be injected.");if(!n.News)throw new r("News class must be injected.");if(!e)throw new r("Parent is required.");if(this.deps=n,this.EndpointApiClass=n.EndpointApi,"ApiClient"===e?.__entityTag)this.apiClient=e,this.parent=null;else{if("User"!==e?.__entityTag)throw new r("Invalid parent for Organization.");this.apiClient=e.apiClient,this.parent=e}this.endpointApi="function"==typeof n.EndpointApi?new n.EndpointApi(this.apiClient):"object"==typeof n.EndpointApi?n.EndpointApi:(()=>{throw new r("deps.EndpointApi must be a class or instance.")})(),this.#r=null;const{draft:o,proxy:i}=this._buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:w.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}_id(e){this.#e.id=e}get slug(){return this.#e.slug||null}get isConnected(){return this.apiClient.isConnected}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this._buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:w.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}get userId(){return this.apiClient.userId}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}get isMe(){return this.isConnected&&this.userId===this.parent?.id}getEntityType(){return w.entityType}static fromServerData(e,t,r){const n=new w(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n._buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:w.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n.#e=o,n.data=i,n}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async save(){if(!this.isConnected)throw new r("Impossible de sauvegarder sans être connecté.");const e={...this.#e};return this.id?(await this._update(e)&&await this.refresh(),this.#r):(await this._add(e),await this.refresh(),this.#r)}async _add(e){e.id=this._newId(),e.slug&&delete e.slug;for(const[t,r]of w.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this.#e.id=e.map.id,this.#e.slug=e.map.slug)}}}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of w.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}addOrganization(e={}){return this.callIsConnected((()=>this.endpointApi.addOrganization(e)))}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal};async project(e={}){try{const t=new this.deps.Project(this,e,{User:this.deps.User,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.project] Erreur lors de la création d'une instance project :`,e.message),e}}}Object.assign(w.prototype,m,y,h,g,l);class _{#e={};#t={};#r=null;static entityType="projects";static SCHEMA_CONSTANTS=["ADD_PROJECT","UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static ADD_BLOCKS=new Map([["ADD_PROJECT","addProject"],["PROFIL_IMAGE","updateImageProfil"]]);static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);constructor(e,t={},n={}){if(this.__entityTag="Project",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!n.User)throw new r("User class must be injected.");if(!n.News)throw new r("News class must be injected.");if(!e)throw new r("Parent is required.");if(this.deps=n,this.EndpointApiClass=n.EndpointApi,"ApiClient"===e?.__entityTag)this.apiClient=e,this.parent=null;else{if("User"!==e?.__entityTag&&"Organization"!==e?.__entityTag&&"Project"!==e?.__entityTag)throw new r("Invalid parent for Project.");this.apiClient=e.apiClient,this.parent=e}this.endpointApi="function"==typeof n.EndpointApi?new n.EndpointApi(this.apiClient):"object"==typeof n.EndpointApi?n.EndpointApi:(()=>{throw new r("deps.EndpointApi must be a class or instance.")})();const{draft:o,proxy:i}=this._buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:_.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}_id(e){this.#e.id=e}get isConnected(){return this.apiClient.isConnected}get userId(){return this.apiClient.userId}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}get isMe(){return this.isConnected&&this.userId===this.parent?.id}getEntityType(){return _.entityType}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this._buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:_.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async save(){if(!this.isConnected)throw new r("Impossible de sauvegarder sans être connecté.");const e={...this.#e};return this.id?(await this._update(e)&&await this.refresh(),this.#r):(await this._add(e),await this.refresh(),this.#r)}async _add(e){e.id=this._newId(),e.slug&&delete e.slug;for(const[t,r]of _.ADD_BLOCKS){const n=this._extractChangedFieldsFromSchema(this.apiClient,t,{...e,...this.defaultFields},(()=>{}));if(n&&Object.keys(n).length>0){const e=await this[r](n);!this.id&&e?.map?.id&&(this.#e.id=e.map.id,this.#e.slug=e.map.slug)}}}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of _.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}addProject(e={}){return this.isMe||(e.parent={},e.parent[`${this.parent.id}`]={type:this.parent.getEntityType(),name:this.parent.name}),this.callIsConnected((()=>this.endpointApi.addProject(e)))}static fromServerData(e,t,r){const n=new _(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n._buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:_.SCHEMA_CONSTANTS,apiClient:n.apiClient,transforms:n.transforms,removeFields:n.removeFields});return n.#e=o,n.data=i,n}defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal,parent:e=>e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,t])=>[e,{type:t?.type??null,name:t?.name??null}]))):null};async project(e={}){try{const t=new _(this,e,{User:this.deps.User,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.project] Erreur lors de la création d'une instance project :`,e.message),e}}}Object.assign(_.prototype,m,y,h,g,l);class b{#e={};#t={};#r=null;static entityType="citoyens";static SCHEMA_CONSTANTS=["UPDATE_BLOCK_DESCRIPTION","UPDATE_BLOCK_INFO","UPDATE_BLOCK_SOCIAL","UPDATE_BLOCK_LOCALITY","UPDATE_BLOCK_SLUG","PROFIL_IMAGE"];static UPDATE_BLOCKS=new Map([["UPDATE_BLOCK_DESCRIPTION","updateDescription"],["UPDATE_BLOCK_SOCIAL","updateSocial"],["UPDATE_BLOCK_LOCALITY","updateLocality"],["UPDATE_BLOCK_INFO","updateInfo"],["UPDATE_BLOCK_SLUG","updateSlug"],["PROFIL_IMAGE","updateImageProfil"]]);constructor(e,t={},n={}){if(this.__entityTag="User",!n.EndpointApi)throw new r("EndpointApi class must be injected to avoid circular dependency.");if(!t?.id&&!t?.slug)throw new r("Vous devez fournir un id ou un slug pour créer un User.");if(!n.Organization)throw new r("Organization class must be injected.");if(!n.Project)throw new r("Project class must be injected.");if(!n.News)throw new r("News class must be injected.");if(this.apiClient=e,this.deps=n,"function"==typeof n.EndpointApi)this.endpointApi=new n.EndpointApi(this.apiClient);else{if("object"!=typeof n.EndpointApi)throw new r("deps.EndpointApi doit être une classe ou une instance valide.");this.endpointApi=n.EndpointApi}this.#r=null;const{draft:o,proxy:i}=this._buildDraftAndProxy({data:{...t,...this.defaultFields},serverData:this.#r,constant:b.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(o)),this.#e=o,this.data=i}get id(){return this.#e.id||null}_id(e){this.#e.id=e}get slug(){return this.#e.slug||null}get isConnected(){return this.apiClient.isConnected}_setData(e){this.#r={...e};const{draft:t,proxy:r}=this._buildDraftAndProxy({data:{...e,...this.defaultFields},serverData:this.#r,constant:b.SCHEMA_CONSTANTS,apiClient:this.apiClient,transforms:this.transforms,removeFields:this.removeFields});this.#t=JSON.parse(JSON.stringify(t)),this.#e=t,this.data=r}getEntityType(){return b.entityType}get userId(){return this.apiClient.userId}get isMe(){return this.isConnected&&this.userId===this.id}get draftData(){return this.#e}get initialDraftData(){return this.#t}get serverData(){return this.#r}async refresh(){if(!this.id)throw new r("Impossible de rafraîchir sans ID.");return this.get()}async get(){return this.apiClient.safeCall((async()=>{if(this.isMe){const e=await this.endpointApi.meInfoUrl();return this._setData(e),e}{const e=await this.getPublicProfile();return this._setData(e),e}}))}async changePassword(e={}){return this.callIsMe((()=>this.endpointApi.changePassword(e)))}async delete(e={}){return this.callIsMe((()=>this.endpointApi.deleteAccount(e)))}async save(){if(!this.isMe)throw new r("Vous devez être connecté et être l'utilisateur pour sauvegarder.");const e={...this.#e};if(this.id)return await this._update(e)&&await this.refresh(),this.#r}async _update(e){e.id&&delete e.id;let t=!1;for(const[r,n]of b.UPDATE_BLOCKS){const o=this._extractChangedFieldsFromSchema(this.apiClient,r,{...e,...this.defaultFields},(()=>this.initialDraftData),this.removeFields);o&&Object.keys(o).length>0&&(await this[n](o),t=!0)}return t}async updateSettings(e={}){await this.callIsMe((()=>this.endpointApi.updateSettings(e))),await this.refresh()}async updateDescription(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockDescription(e)))}async updateInfo(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockInfo(e)))}async updateSocial(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockSocial(e)))}async updateLocality(e={}){return this.callIsMe((()=>this.endpointApi.updateBlockLocality(e)))}async updateSlug({slug:e}){try{await this.endpointApi.check({slug:e})}catch(e){if(e instanceof s)throw new s("Erreur lors de la vérification du slug.",e.status,e.data);throw e}return this.callIsMe((()=>this.endpointApi.updateBlockSlug({slug:e})))}async updateImageProfil({profil_avatar:e}){return e=await this._validateImage(e),this.callIsMe((()=>this.endpointApi.profilImage({profil_avatar:e})))}async getOrganizations(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getOrganizationsAdmin(e))):()=>this.endpointApi.getOrganizationsNoAdmin(e);this.isMe||e.filters||(e.filters={[`links.members.${this.id}`]:{$exists:!0},[`links.members.${this.id}.toBeValidated`]:{$exists:!1},[`links.members.${this.id}.isInviting`]:{$exists:!1}});const r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des organisations.",500,r.results);delete r?.count?.spam;const n=Object.values(r.count||{}).reduce(((e,t)=>e+t),0);r.count.total=n;const o=r.results.map((e=>this.deps.Organization.fromServerData(e,this,{User:b,Project:this.deps.Project,News:this.deps.News,EndpointApi:this.deps.EndpointApi})));return{count:r.count,results:o}}async organization(e={}){try{const t=new this.deps.Organization(this,e,{User:b,Project:this.deps.Project,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.organization] Erreur lors de la création d'une instance organization :`,e.message),e}}async getProjects(e={}){delete e?.pathParams;const t=this.isMe?()=>this.callIsMe((()=>this.endpointApi.getProjectsAdmin(e))):()=>this.endpointApi.getProjectsNoAdmin(e);this.isMe||e.filters||(e.filters={$or:{[`links.contributors.${this.id}`]:{$exists:!0},[`parent.${this.id}`]:{$exists:!0}},[`links.contributors.${this.id}`]:{$exists:!0}});const r=await t();if(!Array.isArray(r.results))throw new s("Erreur lors de la récupération des projets.",500,r.results);const n=r.results.map((e=>this.deps.Project.fromServerData(e,this,{User:b,News:this.deps.News,EndpointApi:this.deps.EndpointApi})));return{count:r?.count?.projects??0,results:n}}async project(e={}){try{const t=new this.deps.Project(this,e,{User:b,News:this.deps.News,EndpointApi:this.deps.EndpointApi});return(e.id||e.slug)&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.project] Erreur lors de la création d'une instance project :`,e.message),e}}async getNews(e={}){e.pathParams&&delete e.pathParams,this.isMe||(e.pathParams={id:this.id});const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new s("Erreur lors de la récupération des actualités.",500,t);const r=t.map((e=>this.deps.News.fromServerData(e,this,{User:b,EndpointApi:this.deps.EndpointApi})));return this._createFilteredProxy(r)}async news(e={}){try{const t=new this.deps.News(this,e,{User:b,EndpointApi:this.deps.EndpointApi});return e.id&&await t.get(),t}catch(e){throw this.apiClient._logger.error(`[Api.${this.__entityTag}.news] Erreur lors de la création d'une instance news :`,e.message),e}}_updateInitialDraftSnapshot(){this.#t=JSON.parse(JSON.stringify(this.#e))}hasChanges(){return JSON.stringify(this.#e)!==JSON.stringify(this.#t)}defaultFields={typeElement:this.getEntityType()};removeFields=["typeElement"];transforms={github:(e,t)=>t?.socialNetwork?.github,gitlab:(e,t)=>t?.socialNetwork?.gitlab,facebook:(e,t)=>t?.socialNetwork?.facebook,twitter:(e,t)=>t?.socialNetwork?.twitter,instagram:(e,t)=>t?.socialNetwork?.instagram,diaspora:(e,t)=>t?.socialNetwork?.diaspora,mastodon:(e,t)=>t?.socialNetwork?.mastodon,telegram:(e,t)=>t?.socialNetwork?.telegram,signal:(e,t)=>t?.socialNetwork?.signal}}Object.assign(b.prototype,y,m,{},l);var v=__webpack_require__(7007);const E=(e,t)=>1===t?e:`${e}s`,T=e=>{if(""===e)return"$";const t=e.substring(1).split(/\//).map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~").replace(/\./g,"\\."))).map((e=>/^\d+$/.exec(e)?`[${e}]`:`.${e}`)).join("");return"$"+t},S=e=>{switch(e[0]){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}},$=(e,t="and")=>0===e.length?"nothing":1===e.length?e[0]:2===e.length?`${e[0]} ${t} ${e[1]}`:`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`,O={"date-time":"date and time",time:"time",date:"date",email:"email address",hostname:"hostname",ipv4:"IPv4 address",ipv6:"IPv6 address",uri:"URI","uri-reference":"URI Reference","uri-template":"URI-template","json-pointer":"JSON Pointer","relative-json-pointer":"relative JSON Pointer",regex:"regular expression"},P={fieldLabels:"title",includeOriginalError:!1,includeData:!1};class x extends Error{constructor(e,t={}){super(),this.options={},this.redundant=!1,this.options={...P,...t},this.pointer=e.instancePath,this.path=T(e.instancePath);const r=(({data:e,keyword:t,message:r,params:n,parentSchema:o,schemaPath:i,instancePath:s},{fieldLabels:a})=>{const c=(({instancePath:e,parentSchema:t},{fieldLabels:r})=>{switch(r){case"js":return""===e?"the root value":`the value at ${T(e).replace(/^\$/,"")}`;case"jsonPath":return`the value at ${T(e)}`;case"jsonPointer":case"instancePath":return""===e?"the root value":`the value at ${e}`;case"title":return(null==t?void 0:t.title)?t.title:""===e?"the root value":`the value at ${e}`;default:throw new Error(`invalid fieldLabels value: ${r}`)}})({instancePath:s,parentSchema:o},{fieldLabels:a});if(null==o?void 0:o.errorMessage)return`${c} ${o.errorMessage}`;switch(t){case"enum":{const e=n.allowedValues.map(JSON.stringify);return`${c} must be one of: ${$(e,"or")}`}case"type":{const t=Array.isArray(n.type)?n.type:n.type.split(","),r=$(t,"or"),o=(e=>{const t=typeof e;switch(t){case"object":return null===e?"null":Array.isArray(e)?"an array":"an object";case"undefined":return"undefined";default:return`${S(t)} ${t}`}})(e);return`${c} must be ${S(r)} ${r} but it was ${o}`}case"minLength":{const t=n.limit,r=E("character",t),o=e.length;return`${c} must be ${t} ${r} or more but it was ${o} ${E("character",o)}`}case"maxLength":{const t=n.limit,r=E("character",t),o=e.length;return`${c} must be ${t} ${r} or fewer but it was ${o} ${E("character",o)}`}case"pattern":{if(i.endsWith("propertyNames/pattern"))return null;const e=null==o?void 0:o.patternLabel;return e?`${c} must be ${e} but it was not`:`${c} is an invalid string`}case"format":return`${c} must be a valid ${O[n.format]||n.format} string but it was not`;case"multipleOf":return`${c} must be a multiple of ${n.multipleOf}`;case"minimum":return`${c} must be equal to or greater than ${n.limit}`;case"exclusiveMinimum":return`${c} must be greater than ${n.limit}`;case"maximum":return`${c} must be equal to or less than ${n.limit}`;case"exclusiveMaximum":return`${c} must be less than ${n.limit}`;case"additionalProperties":{const e=Object.keys(null==o?void 0:o.properties).join(", ");return`${c} has an unexpected property, ${n.additionalProperty}, which is not in the list of allowed properties (${e})`}case"required":return`${c} is missing the required field '${n.missingProperty}'`;case"propertyNames":return`${c} has an invalid property name ${JSON.stringify(n.propertyName)}`;case"minProperties":return`${c} must have ${n.limit} or more properties but it has ${Object.keys(e).length}`;case"maxProperties":return`${c} must have ${n.limit} or fewer properties but it has ${Object.keys(e).length}`;case"dependencies":{const e=n.property;return`${c} must have property ${n.missingProperty} when ${e} is present`}case"minItems":return`${c} must have ${n.limit} or more items but it has ${e.length}`;case"maxItems":return`${c} must have ${n.limit} or fewer items but it has ${e.length}`;case"uniqueItems":{const{i:e,j:t}=n;return`${c} must be unique but elements ${t} and ${e} are the same`}default:return`${c} ${r}`}})(e,this.options);var n;null!==r?(this.message=`${n=r,"string"!=typeof n||0===n.length?n:n.charAt(0).toUpperCase()+n.slice(1)}.`,this.options.includeOriginalError&&(this.original=e),this.options.includeData&&(this.data=e.data)):this.redundant=!0}toJSON(){const e={path:this.path,pointer:this.pointer,message:this.message};return this.options.includeOriginalError&&(e.original=this.original),this.options.includeData&&(e.data=this.data),e}}class A extends Error{constructor(e,t={}){super(),this.name="AggregateAjvError",this.errors=(null!=e?e:[]).map((e=>new x(e,t))).filter((e=>!e.redundant)),this.message=this.errors.map((e=>e.message)).join(" ")}toJSON(){return this.errors.map((e=>e.toJSON()))}*[Symbol.iterator](){for(const e of this.errors)yield e}}var k=__webpack_require__(3282),I=__webpack_require__(8182);function N(e,t){return function(){return e.apply(t,arguments)}}const{toString:j}=Object.prototype,{getPrototypeOf:C}=Object,D=(R=Object.create(null),e=>{const t=j.call(e);return R[t]||(R[t]=t.slice(8,-1).toLowerCase())});var R;const L=e=>(e=e.toLowerCase(),t=>D(t)===e),z=e=>t=>typeof t===e,{isArray:M}=Array,q=z("undefined"),U=L("ArrayBuffer"),B=z("string"),F=z("function"),V=z("number"),G=e=>null!==e&&"object"==typeof e,K=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)},J=L("Date"),H=L("File"),Z=L("Blob"),W=L("FileList"),Y=L("URLSearchParams"),[X,Q,ee,te]=["ReadableStream","Request","Response","Headers"].map(L);function re(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),M(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function ne(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ie=e=>!q(e)&&e!==oe,se=(ae="undefined"!=typeof Uint8Array&&C(Uint8Array),e=>ae&&e instanceof ae);var ae;const ce=L("HTMLFormElement"),le=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),de=L("RegExp"),pe=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};re(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},ue=L("AsyncFunction"),me=(fe="function"==typeof setImmediate,he=F(oe.postMessage),fe?setImmediate:he?(ye=`axios@${Math.random()}`,ge=[],oe.addEventListener("message",(({source:e,data:t})=>{e===oe&&t===ye&&ge.length&&ge.shift()()}),!1),e=>{ge.push(e),oe.postMessage(ye,"*")}):e=>setTimeout(e));var fe,he,ye,ge;const we="undefined"!=typeof queueMicrotask?queueMicrotask.bind(oe):"undefined"!=typeof process&&process.nextTick||me,_e={isArray:M,isArrayBuffer:U,isBuffer:function(e){return null!==e&&!q(e)&&null!==e.constructor&&!q(e.constructor)&&F(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||F(e.append)&&("formdata"===(t=D(e))||"object"===t&&F(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&U(e.buffer),t},isString:B,isNumber:V,isBoolean:e=>!0===e||!1===e,isObject:G,isPlainObject:K,isReadableStream:X,isRequest:Q,isResponse:ee,isHeaders:te,isUndefined:q,isDate:J,isFile:H,isBlob:Z,isRegExp:de,isFunction:F,isStream:e=>G(e)&&F(e.pipe),isURLSearchParams:Y,isTypedArray:se,isFileList:W,forEach:re,merge:function e(){const{caseless:t}=ie(this)&&this||{},r={},n=(n,o)=>{const i=t&&ne(r,o)||o;K(r[i])&&K(n)?r[i]=e(r[i],n):K(n)?r[i]=e({},n):M(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&re(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(re(t,((t,n)=>{r&&F(t)?e[n]=N(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 o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!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(M(e))return e;let t=e.length;if(!V(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:ce,hasOwnProperty:le,hasOwnProp:le,reduceDescriptors:pe,freezeMethods:e=>{pe(e,((t,r)=>{if(F(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];F(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 M(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:ne,global:oe,isContextDefined:ie,isSpecCompliantForm:function(e){return!!(e&&F(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(G(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=M(e)?[]:{};return re(e,((e,t)=>{const i=r(e,n+1);!q(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:ue,isThenable:e=>e&&(G(e)||F(e))&&F(e.then)&&F(e.catch),setImmediate:me,asap:we};function be(e,t,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}_e.inherits(be,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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const ve=be.prototype,Ee={};["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=>{Ee[e]={value:e}})),Object.defineProperties(be,Ee),Object.defineProperty(ve,"isAxiosError",{value:!0}),be.from=(e,t,r,n,o,i)=>{const s=Object.create(ve);return _e.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),be.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Te=be;function Se(e){return _e.isPlainObject(e)||_e.isArray(e)}function $e(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function Oe(e,t,r){return e?e.concat(t).map((function(e,t){return e=$e(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Pe=_e.toFlatObject(_e,{},null,(function(e){return/^is[A-Z]/.test(e)})),xe=function(e,t,r){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=_e.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!_e.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(_e.isDate(e))return e.toISOString();if(!a&&_e.isBlob(e))throw new Te("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(e)||_e.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(_e.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(_e.isArray(e)&&function(e){return _e.isArray(e)&&!e.some(Se)}(e)||(_e.isFileList(e)||_e.endsWith(r,"[]"))&&(a=_e.toArray(e)))return r=$e(r),a.forEach((function(e,n){!_e.isUndefined(e)&&null!==e&&t.append(!0===s?Oe([r],n,i):null===s?r:r+"[]",c(e))})),!1;return!!Se(e)||(t.append(Oe(o,r,i),c(e)),!1)}const d=[],p=Object.assign(Pe,{defaultVisitor:l,convertValue:c,isVisitable:Se});if(!_e.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!_e.isUndefined(r)){if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),_e.forEach(r,(function(r,i){!0===(!(_e.isUndefined(r)||null===r)&&o.call(t,r,_e.isString(i)?i.trim():i,n,p))&&e(r,n?n.concat(i):[i])})),d.pop()}}(e),t};function Ae(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ke(e,t){this._pairs=[],e&&xe(e,this,t)}const Ie=ke.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,Ae)}:Ae;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ne=ke;function je(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||je;_e.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):_e.isURLSearchParams(t)?t.toString():new Ne(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){_e.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ne,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ze="undefined"!=typeof window&&"undefined"!=typeof document,Me="object"==typeof navigator&&navigator||void 0,qe=ze&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),Ue="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Be=ze&&window.location.href||"http://localhost",Fe={...t,...Le},Ve=function(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&_e.isArray(n)?n.length:i,a?(_e.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&_e.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&_e.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const r={};return _e.forEachEntry(e,((e,n)=>{t(function(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},Ge={transitional:Re,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=_e.isObject(e);if(o&&_e.isHTMLForm(e)&&(e=new FormData(e)),_e.isFormData(e))return n?JSON.stringify(Ve(e)):e;if(_e.isArrayBuffer(e)||_e.isBuffer(e)||_e.isStream(e)||_e.isFile(e)||_e.isBlob(e)||_e.isReadableStream(e))return e;if(_e.isArrayBufferView(e))return e.buffer;if(_e.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return xe(e,new Fe.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Fe.isNode&&_e.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=_e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return xe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(_e.isString(e))try{return(0,JSON.parse)(e),_e.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ge.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(_e.isResponse(e)||_e.isReadableStream(e))return e;if(e&&_e.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 Te.from(e,Te.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:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],(e=>{Ge.headers[e]={}}));const Ke=Ge,Je=_e.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"]),He=Symbol("internals");function Ze(e){return e&&String(e).trim().toLowerCase()}function We(e){return!1===e||null==e?e:_e.isArray(e)?e.map(We):String(e)}function Ye(e,t,r,n,o){return _e.isFunction(n)?n.call(this,t,r):(o&&(t=r),_e.isString(t)?_e.isString(n)?-1!==t.indexOf(n):_e.isRegExp(n)?n.test(t):void 0:void 0)}class Xe{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Ze(t);if(!o)throw new Error("header name must be a non-empty string");const i=_e.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=We(e))}const i=(e,t)=>_e.forEach(e,((e,r)=>o(e,r,t)));if(_e.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(_e.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Je[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(_e.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=Ze(e)){const r=_e.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(_e.isFunction(t))return t.call(this,e,r);if(_e.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ze(e)){const r=_e.findKey(this,e);return!(!r||void 0===this[r]||t&&!Ye(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Ze(e)){const o=_e.findKey(r,e);!o||t&&!Ye(0,r[o],o,t)||(delete r[o],n=!0)}}return _e.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Ye(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return _e.forEach(this,((n,o)=>{const i=_e.findKey(r,o);if(i)return t[i]=We(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=We(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return _e.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&_e.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[He]=this[He]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Ze(e);t[n]||(function(e,t){const r=_e.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return _e.isArray(e)?e.forEach(n):n(e),this}}Xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(Xe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),_e.freezeMethods(Xe);const Qe=Xe;function et(e,t){const r=this||Ke,n=t||r,o=Qe.from(n.headers);let i=n.data;return _e.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function tt(e){return!(!e||!e.__CANCEL__)}function rt(e,t,r){Te.call(this,null==e?"canceled":e,Te.ERR_CANCELED,t,r),this.name="CanceledError"}_e.inherits(rt,Te,{__CANCEL__:!0});const nt=rt;function ot(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Te("Request failed with status code "+r.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const it=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=n[s];o||(o=c),r[i]=a,n[i]=c;let d=s,p=0;for(;d!==i;)p+=r[d++],d%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const u=l&&c-l;return u?Math.round(1e3*p/u):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout((()=>{n=null,s(r)}),i-a)))},()=>r&&s(r)]}((r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},st=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},at=e=>(...t)=>_e.asap((()=>e(...t))),ct=Fe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Fe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0,lt=Fe.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];_e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),_e.isString(n)&&s.push("path="+n),_e.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 dt(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 pt=e=>e instanceof Qe?{...e}:e;function ut(e,t){t=t||{};const r={};function n(e,t,r,n){return _e.isPlainObject(e)&&_e.isPlainObject(t)?_e.merge.call({caseless:n},e,t):_e.isPlainObject(t)?_e.merge({},t):_e.isArray(t)?t.slice():t}function o(e,t,r,o){return _e.isUndefined(t)?_e.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!_e.isUndefined(t))return n(void 0,t)}function s(e,t){return _e.isUndefined(t)?_e.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(pt(e),pt(t),0,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,s=i(e[n],t[n],n);_e.isUndefined(s)&&i!==a||(r[n]=s)})),r}const mt=e=>{const t=ut({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=Qe.from(a),t.url=Ce(dt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),_e.isFormData(n))if(Fe.hasStandardBrowserEnv||Fe.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(Fe.hasStandardBrowserEnv&&(o&&_e.isFunction(o)&&(o=o(t)),o||!1!==o&&ct(t.url))){const e=i&&s&<.read(s);e&&a.set(i,e)}return t},ft="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=mt(e);let o=n.data;const i=Qe.from(n.headers).normalize();let s,a,c,l,d,{responseType:p,onUploadProgress:u,onDownloadProgress:m}=n;function f(){l&&l(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function y(){if(!h)return;const n=Qe.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());ot((function(e){t(e),f()}),(function(e){r(e),f()}),{data:p&&"text"!==p&&"json"!==p?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 Te("Request aborted",Te.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Te("Network Error",Te.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Re;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Te(t,o.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&_e.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),_e.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),p&&"json"!==p&&(h.responseType=n.responseType),m&&([c,d]=it(m,!0),h.addEventListener("progress",c)),u&&h.upload&&([a,l]=it(u),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new nt(null,e,h):t),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);g&&-1===Fe.protocols.indexOf(g)?r(new Te("Unsupported protocol "+g+":",Te.ERR_BAD_REQUEST,e)):h.send(o||null)}))},ht=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Te?t:new nt(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Te(`timeout ${t} of ms exceeded`,Te.ETIMEDOUT))}),t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=n;return a.unsubscribe=()=>_e.asap(s),a}},yt=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},gt=(e,t,r,n)=>{const o=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*yt(r,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},wt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,_t=wt&&"function"==typeof ReadableStream,bt=wt&&("function"==typeof TextEncoder?(vt=new TextEncoder,e=>vt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var vt;const Et=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Tt=_t&&Et((()=>{let e=!1;const t=new Request(Fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),St=_t&&Et((()=>_e.isReadableStream(new Response("").body))),$t={stream:St&&(e=>e.body)};var Ot;wt&&(Ot=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!$t[e]&&($t[e]=_e.isFunction(Ot[e])?t=>t[e]():(t,r)=>{throw new Te(`Response type '${e}' is not supported`,Te.ERR_NOT_SUPPORT,r)})})));const Pt={http:null,xhr:ft,fetch:wt&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:d,withCredentials:p="same-origin",fetchOptions:u}=mt(e);l=l?(l+"").toLowerCase():"text";let m,f=ht([o,i&&i.toAbortSignal()],s);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Tt&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=_e.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e)){const t=new Request(Fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return _e.isArrayBufferView(e)||_e.isArrayBuffer(e)?e.byteLength:(_e.isURLSearchParams(e)&&(e+=""),_e.isString(e)?(await bt(e)).byteLength:void 0)})(t):r})(d,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(_e.isFormData(n)&&(e=r.headers.get("content-type"))&&d.setContentType(e),r.body){const[e,t]=st(y,it(at(c)));n=gt(r.body,65536,e,t)}}_e.isString(p)||(p=p?"include":"omit");const o="credentials"in Request.prototype;m=new Request(t,{...u,signal:f,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",credentials:o?p:void 0});let i=await fetch(m);const s=St&&("stream"===l||"response"===l);if(St&&(a||s&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=_e.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&st(t,it(at(a),!0))||[];i=new Response(gt(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}l=l||"text";let g=await $t[_e.findKey($t,l)||"text"](i,e);return!s&&h&&h(),await new Promise(((t,r)=>{ot(t,r,{data:g,headers:Qe.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:m})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Te("Network Error",Te.ERR_NETWORK,e,m),{cause:t.cause||t});throw Te.from(t,t&&t.code,e,m)}})};_e.forEach(Pt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const xt=e=>`- ${e}`,At=e=>_e.isFunction(e)||null===e||!1===e,kt=e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!At(r)&&(n=Pt[(t=String(r)).toLowerCase()],void 0===n))throw new Te(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).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(xt).join("\n"):" "+xt(e[0]):"as no adapter specified";throw new Te("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 nt(null,e)}function Nt(e){return It(e),e.headers=Qe.from(e.headers),e.data=et.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kt(e.adapter||Ke.adapter)(e).then((function(t){return It(e),t.data=et.call(e,e.transformResponse,t),t.headers=Qe.from(t.headers),t}),(function(t){return tt(t)||(It(e),t&&t.response&&(t.response.data=et.call(e,e.transformResponse,t.response),t.response.headers=Qe.from(t.response.headers))),Promise.reject(t)}))}const jt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{jt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Ct={};jt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Te(n(o," has been removed"+(t?" in "+t:"")),Te.ERR_DEPRECATED);return t&&!Ct[o]&&(Ct[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},jt.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 Te("options must be an object",Te.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new Te("option "+i+" must be "+r,Te.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Te("Unknown option "+i,Te.ERR_BAD_OPTION)}},validators:jt},Rt=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=ut(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Dt.assertOptions(r,{silentJSONParsing:Rt.transitional(Rt.boolean),forcedJSONParsing:Rt.transitional(Rt.boolean),clarifyTimeoutError:Rt.transitional(Rt.boolean)},!1),null!=n&&(_e.isFunction(n)?t.paramsSerializer={serialize:n}:Dt.assertOptions(n,{encode:Rt.function,serialize:Rt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Dt.assertOptions(t,{baseUrl:Rt.spelling("baseURL"),withXsrfToken:Rt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&_e.merge(o.common,o[t.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Qe.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,p=0;if(!a){const e=[Nt.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),d=e.length,l=Promise.resolve(t);p<d;)l=l.then(e[p++],e[p++]);return l}d=s.length;let u=t;for(p=0;p<d;){const e=s[p++],t=s[p++];try{u=e(u)}catch(e){t.call(this,e);break}}try{l=Nt.call(this,u)}catch(e){return Promise.reject(e)}for(p=0,d=c.length;p<d;)l=l.then(c[p++],c[p++]);return l}getUri(e){return Ce(dt((e=ut(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}_e.forEach(["delete","get","head","options"],(function(e){Lt.prototype[e]=function(t,r){return this.request(ut(r||{},{method:e,url:t,data:(r||{}).data}))}})),_e.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(ut(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Lt.prototype[e]=t(),Lt.prototype[e+"Form"]=t(!0)}));const zt=Lt;class Mt{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,o){r.reason||(r.reason=new nt(e,n,o),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 Mt((function(t){e=t})),cancel:e}}}const qt=Mt,Ut={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(Ut).forEach((([e,t])=>{Ut[t]=e}));const Bt=Ut,Ft=function e(t){const r=new zt(t),n=N(zt.prototype.request,r);return _e.extend(n,zt.prototype,r,{allOwnKeys:!0}),_e.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ut(t,r))},n}(Ke);Ft.Axios=zt,Ft.CanceledError=nt,Ft.CancelToken=qt,Ft.isCancel=tt,Ft.VERSION="1.8.4",Ft.toFormData=xe,Ft.AxiosError=Te,Ft.Cancel=Ft.CanceledError,Ft.all=function(e){return Promise.all(e)},Ft.spread=function(e){return function(t){return e.apply(null,t)}},Ft.isAxiosError=function(e){return _e.isObject(e)&&!0===e.isAxiosError},Ft.mergeConfig=ut,Ft.AxiosHeaders=Qe,Ft.formToJSON=e=>Ve(_e.isHTMLForm(e)?new FormData(e):e),Ft.getAdapter=kt,Ft.HttpStatusCode=Bt,Ft.default=Ft;const Vt=Ft;var Gt=__webpack_require__(1111);const Kt="axios-retry";function Jt(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&Gt(e)}const Ht=["get","head","options"],Zt=Ht.concat(["put","delete"]);function Wt(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Yt(e){return!!e.config?.method&&Wt(e)&&-1!==Zt.indexOf(e.config.method)}function Xt(e){return Jt(e)||Yt(e)}function Qt(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 er={retries:3,retryCondition:Xt,retryDelay:function(e=0,t=void 0){return Math.max(0,Qt(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function tr(e,t,r=!1){const n=function(e,t){return{...er,...t,...e[Kt]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[Kt]=n,n}const rr=(e,t)=>{const r=e.interceptors.request.use((e=>(tr(e,t,!0),e[Kt]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const o=tr(n,t);return r.response&&o.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,o=(e.retryCount||0)<r&&n(t);if("object"==typeof o)try{return!1!==await o}catch(e){return!1}return o}(o,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:o,shouldResetTimeout:i,onRetry:s}=t,a=o(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,o=n.timeout-e-a;if(o<=0)return Promise.reject(r);n.timeout=o}return n.transformRequest=[e=>e],await s(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(o),t(e(n))},o=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,o,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(o,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};rr.isNetworkError=Jt,rr.isSafeRequestError=function(e){return!!e.config?.method&&Wt(e)&&-1!==Ht.indexOf(e.config.method)},rr.isIdempotentRequestError=Yt,rr.isNetworkOrIdempotentRequestError=Xt,rr.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,o=Math.max(n,Qt(t));return o+.2*o*Math.random()},rr.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,Qt(r))}},rr.isRetryableError=Wt;const nr=rr;var or=__webpack_require__(6022);class ir extends Error{}ir.prototype.name="InvalidTokenError";var sr=__webpack_require__(4874);const ar={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!ar._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof ar.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new ar.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()}}},cr=ar,lr={common1:{type:"string"},common2:{format:"email",type:"string"},common3:{type:"boolean"},common4:{format:"uri",type:"string"},common5:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common6:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},required:["id"],type:"object"},common7:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}},common8:{additionalProperties:!1,properties:{reason:{default:"",type:"string"}},required:["reason"],type:"object"},common9:{reason:{default:"",type:"string"}},common10:{default:"",type:"string"},common11:{pattern:"^[a-f0-9]{24}$",type:"string"},common12:{const:"citoyens"},common13:{properties:{value:{type:"boolean"}}},common14:{value:{type:"boolean"}},common15:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},common16:{},common17:{else:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},if:{properties:{typeElement:{const:"citoyens"}}},then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}}},common18:{properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}}},common19:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},common20:{properties:{typeElement:{const:"citoyens"}}},common21:{typeElement:{const:"citoyens"}},common22:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"}}},common23:{not:{type:"null"}},common24:{type:"null"},common25:{anyOf:[{items:{type:"string"},type:"array"},{enum:[""],type:"string"}]},common26:{items:{type:"string"},type:"array"},common27:{enum:[""],type:"string"},common28:{properties:{name:{not:{type:"null"}}},required:["name"]},common29:{name:{not:{type:"null"}}},common30:{properties:{url:{not:{type:"null"}}},required:["url"]},common31:{url:{not:{type:"null"}}},common32:{properties:{tags:{not:{type:"null"}}},required:["tags"]},common33:{tags:{not:{type:"null"}}},common34:{properties:{email:{not:{type:"null"}}},required:["email"]},common35:{email:{not:{type:"null"}}},common36:{const:"info",default:"info",type:"string"},common37:{$ref:"#/$defs/sharedFields/email"},common38:{$ref:"#/$defs/sharedFields/name"},common39:{$ref:"#/$defs/sharedFields/tags"},common40:{$ref:"#/$defs/sharedFields/url"},common41:{const:"projects"},common42:{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type","name"],type:"object"},common43:{name:{type:"string"},type:{type:"string"}},common44:{const:"organizations"},common45:{$ref:"#/$defs/socialField"},common46:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},common47:{id:{pattern:"^[a-f0-9]{24}$"}},common48:{pattern:"^[a-f0-9]{24}$"},common49:{additionalProperties:!1,properties:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},required:["@type","addressCountry","codeInsee","addressLocality","localityId","level1","level1Name"],type:"object"},common50:{"@type":{const:"PostalAddress",type:"string"},addressCountry:{type:"string"},addressLocality:{type:"string"},codeInsee:{type:"string"},level1:{type:"string"},level1Name:{type:"string"},level3:{minLength:0,type:"string"},level3Name:{minLength:0,type:"string"},level4:{minLength:0,type:"string"},level4Name:{minLength:0,type:"string"},localityId:{type:"string"},postalCode:{type:"string"},streetAddress:{type:"string"}},common51:{const:"PostalAddress",type:"string"},common52:{minLength:0,type:"string"},common53:{additionalProperties:!1,properties:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},required:["latitude","longitude"],type:"object"},common54:{"@type":{const:"GeoCoordinates",type:"string"},latitude:{type:["string","number"]},longitude:{type:["string","number"]}},common55:{const:"GeoCoordinates",type:"string"},common56:{type:["string","number"]},common57:{additionalProperties:!0,properties:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},required:["type","coordinates","float"],type:"object"},common58:{coordinates:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},float:{const:!0,default:!0,type:"boolean"},type:{const:"Point",type:"string"}},common59:{items:{type:"number"},maxItems:2,minItems:2,type:"array"},common60:{type:"number"},common61:{const:!0,default:!0,type:"boolean"},common62:{const:"Point",type:"string"},common63:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common64:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common65:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"},common66:{maxLength:100,minLength:3,pattern:"^[a-zA-Z0-9]+$",type:"string"},common67:{properties:{type:{const:"citoyens"}}},common68:{type:{const:"citoyens"}},common69:{additionalProperties:!1,else:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{folder:{const:"citoyens"}}},properties:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},required:["folder","ownerId"],then:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common70:{properties:{ownerId:{pattern:"^[a-f0-9]{24}$"}}},common71:{ownerId:{pattern:"^[a-f0-9]{24}$"}},common72:{properties:{folder:{const:"citoyens"}}},common73:{folder:{const:"citoyens"}},common74:{folder:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"},ownerId:{type:"string"}},common75:{properties:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common76:{ownerId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common77:{additionalProperties:!1,else:{properties:{id:{pattern:"^[a-f0-9]{24}$"}}},if:{properties:{type:{const:"citoyens"}}},properties:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},required:["type","id"],then:{properties:{id:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},type:"object"},common78:{id:{type:"string"},type:{default:"citoyens",enum:["citoyens","projects","organizations"],type:"string"}},common79:{properties:{parentId:{pattern:"^[a-f0-9]{24}$"}}},common80:{parentId:{pattern:"^[a-f0-9]{24}$"}},common81:{properties:{parentType:{const:"citoyens"}}},common82:{parentType:{const:"citoyens"}},common83:{properties:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common84:{parentId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common85:{default:!0,type:"boolean"},common86:{default:0,type:"integer"},common87:{required:["text"]},common88:{required:["mediaImg"]},common89:{required:["mediaFile"]},common90:{additionalProperties:!1,properties:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},required:["countFiles","files"],type:"object"},common91:{countFiles:{type:"number"},files:{items:{type:"string"},type:"array"}},common92:{additionalProperties:!1,properties:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},required:["countImages","images"],type:"object"},common93:{countImages:{type:"number"},images:{items:{type:"string"},type:"array"}},common94:{items:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},type:"array"},common95:{properties:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common96:{count:{minimum:1,type:"integer"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common97:{minimum:1,type:"integer"},common98:{default:"public",enum:["public","private","restricted"],type:"string"},common99:{const:"news",default:"news",type:"string"},common100:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"}},required:["id"],type:"object"},common101:{default:!1,type:"boolean"},common102:{properties:{childId:{pattern:"^[a-f0-9]{24}$"}}},common103:{childId:{pattern:"^[a-f0-9]{24}$"}},common104:{properties:{childType:{const:"citoyens"}}},common105:{childType:{const:"citoyens"}},common106:{const:"share",default:"share",type:"string"},common107:{properties:{childId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}}},common108:{childId:{default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$"}},common109:{additionalProperties:!1,properties:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},required:["type","id"],type:"object"},common110:{id:{pattern:"^[a-f0-9]{24}$",type:"string"},type:{default:"news",enum:["news"],type:"string"}},common111:{default:"news",enum:["news"],type:"string"},common112:{items:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},type:"array"},common113:{additionalProperties:!1,properties:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},required:["id","name","slug","type","value","count"],type:"object"},common114:{count:{type:"number"},id:{pattern:"^[a-f0-9]{24}$",type:"string"},name:{type:"string"},slug:{type:"string"},type:{type:"string"},value:{type:"string"}},common115:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],type:"string"},common116:{const:!1,default:!1,type:"boolean"},common117:{const:"",default:"",type:"string"},common118:{additionalProperties:!1,properties:{indexMax:{type:"number"},indexMin:{type:"number"}},required:["indexMin","indexMax"],type:"object"},common119:{indexMax:{type:"number"},indexMin:{type:"number"}},common120:{default:0,minimum:0,type:"integer"},common121:{const:["projects"],default:["projects"],items:{enum:["projects"],type:"string"},type:"array"},common122:{enum:["projects"],type:"string"},common123:{$exists:!0},common124:{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},common125:{$exists:{const:!0}},common126:{const:!0},common127:{default:30,type:"integer"},common128:{const:["poi"],default:["poi"],items:{enum:["poi"],type:"string"},type:"array"},common129:{enum:["poi"],type:"string"},common130:{const:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],default:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],items:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},type:"array"},common131:{enum:["NGO","Cooperative","LocalBusiness","Group","GovernmentOrganization"],type:"string"},common132:{$exists:!1},common133:{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},common134:{$exists:{const:!1}},common135:{const:!1},common136:{const:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],default:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],items:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},type:"array"},common137:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common138:{additionalProperties:!1,properties:{$exists:{default:!1,type:"boolean"}},required:["$exists"],type:"object"},common139:{$exists:{default:!1,type:"boolean"}},common140:{additionalProperties:!1,properties:{$in:{items:{type:"string"},minItems:1,type:"array"}},required:["$in"],type:"object"},common141:{$in:{items:{type:"string"},minItems:1,type:"array"}},common142:{items:{type:"string"},minItems:1,type:"array"},common143:{const:["citoyens"],default:["citoyens"],items:{enum:["citoyens"],type:"string"},type:"array"},common144:{enum:["citoyens"],type:"string"},common145:{const:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],default:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],items:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},type:"array"},common146:{enum:["citoyens","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects"],type:"string"},common147:{not:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common148:{propertyNames:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common149:{pattern:"^(?!links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common150:{"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":{additionalProperties:!1,properties:{$exists:{const:!0}},required:["$exists"],type:"object"},"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"},"^links\\.followers\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":{additionalProperties:!1,properties:{$exists:{const:!1}},required:["$exists"],type:"object"}},common151:{not:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}},common152:{propertyNames:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}},common153:{pattern:"^(?!links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"},common154:{const:["badges"],default:["badges"],items:{enum:["badges"],type:"string"},type:"array"},common155:{enum:["badges"],type:"string"},common156:{const:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],default:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],items:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},type:"array"},common157:{enum:["citoyens","projects","NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},common158:{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"},common159:{$exists:{const:!0,type:"boolean"}},common160:{const:!0,type:"boolean"},common161:{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},common162:{$exists:{const:!1,type:"boolean"}},common163:{const:!1,type:"boolean"},common164:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":{additionalProperties:!1,properties:{$exists:{const:!1,type:"boolean"}},required:["$exists"],type:"object"},"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":{additionalProperties:!1,properties:{$exists:{const:!0,type:"boolean"}},required:["$exists"],type:"object"}},common165:{indexMax:30,indexMin:0},common166:{if:{properties:{parentType:{const:"citoyens"}}},then:{properties:{connectType:{const:"friend",default:"friend"}}}},common167:{properties:{connectType:{const:"friend",default:"friend"}}},common168:{connectType:{const:"friend",default:"friend"}},common169:{const:"friend",default:"friend"},common170:{if:{properties:{parentType:{const:"organizations"}}},then:{properties:{connectType:{enum:["admin","member"]}}}},common171:{properties:{parentType:{const:"organizations"}}},common172:{parentType:{const:"organizations"}},common173:{properties:{connectType:{enum:["admin","member"]}}},common174:{connectType:{enum:["admin","member"]}},common175:{enum:["admin","member"]},common176:{if:{properties:{parentType:{const:"projects"}}},then:{properties:{connectType:{enum:["admin","contributor"]}}}},common177:{properties:{parentType:{const:"projects"}}},common178:{parentType:{const:"projects"}},common179:{properties:{connectType:{enum:["admin","contributor"]}}},common180:{connectType:{enum:["admin","contributor"]}},common181:{enum:["admin","contributor"]},common182:{properties:{parentType:{const:"events"}}},common183:{parentType:{const:"events"}},common184:{const:"events"},common185:{default:"@userId",pattern:"^([a-f0-9]{24}|@\\w+)$",type:"string"},common186:{const:"citoyens",default:"citoyens",enum:["citoyens"],type:"string"},common187:{enum:["citoyens","organizations","projects","events"],type:"string"},common188:{const:"citoyens",default:"citoyens",type:"string"},common189:{const:"@userId",default:"@userId",pattern:"^(?:[a-f0-9]{24}|@userId)$",type:"string"},common190:{default:{isOpenData:!0,isOpenEdition:!0},properties:{isOpenData:{default:!0,type:"boolean"},isOpenEdition:{default:!0,type:"boolean"}},required:["isOpenData","isOpenEdition"],type:"object"},common191:{isOpenData:!0,isOpenEdition:!0},common192:{isOpenData:{default:!0,type:"boolean"},isOpenEdition:{default:!0,type:"boolean"}},common193:{additionalProperties:!1,default:{"@userId":{type:"citoyens"}},patternProperties:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},type:"object"},common194:{"@userId":{type:"citoyens"}},common195:{type:"citoyens"},common196:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"}},common197:{additionalProperties:!1,properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"},common198:{const:"poi",default:"poi",type:"string"},common199:{const:"events",default:"events",type:"string"},common200:{format:"date-time",type:"string"},common201:{pattern:"^([01]\\d|2[0-3]):[0-5]\\d$",type:"string"},common202:{enum:["workshop","competition","concert","contest","conference","debate","exhibition","festival","crowdfunding","fair","course","protest","market","film","getTogether","meeting","spectacle","internship","stand","others"],type:"string"},common203:{type:"integer"},common204:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},common205:{additionalProperties:!1,properties:{id:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},type:{const:"citoyens",default:"citoyens",type:"string"}},required:["type","id"],type:"object"},common206:{id:{default:"@userId",pattern:"^[a-f0-9]{24}$",type:"string"},type:{const:"citoyens",default:"citoyens",type:"string"}},common207:{const:"badges",default:"badges",type:"string"},common208:{const:"badge",default:"badge",type:"string"},common209:{patternProperties:{"^[0-9a-f]{24}$":{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"}},type:"object"},common210:{"^[0-9a-f]{24}$":{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"}},common211:{additionalProperties:!1,properties:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},required:["name"],type:"object"},common212:{isAdmin:{default:"",enum:["","admin"],type:"string"},name:{type:"string"},roles:{items:{type:"string"},type:"array"}},common213:{default:"",enum:["","admin"],type:"string"}},dr=[{auth:"none",constant:"PERSON_REGISTER",contentType:"application/x-www-form-urlencoded",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/register",request:{additionalProperties:!1,properties:{app:lr.common1,email:lr.common2,isInvitation:lr.common3,mode:lr.common1,name:lr.common1,pendingUserId:lr.common1,pwd:lr.common1,username:lr.common1},required:["name","username","email","pwd"],type:"object"}},{auth:"none",constant:"AUTHENTICATE_URL",contentType:"application/json",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/api/cocolight/authenticate",postActions:[{path:"accessToken",type:"setToken"},{path:"refreshToken",type:"setRefreshToken"},{event:"userLoggedIn",path:"user",type:"emitEvent"}],request:{additionalProperties:!1,properties:{email:lr.common2,password:lr.common1},required:["email","password"],type:"object"}},{auth:"none",constant:"REFRESH_TOKEN_URL",contentType:"application/json",method:"POST",path:"/api/cocolight/refreshtoken",request:{additionalProperties:!1,properties:{refreshToken:lr.common1},required:["refreshToken"],type:"object"}},{auth:"bearer",constant:"ME_INFO_URL",contentType:"application/json",method:"POST",path:"/api/cocolight/me"},{auth:"none",constant:"PASSWORD_RECOVERY",contentType:"application/x-www-form-urlencoded",generateModule:"UserNoAuth",method:"POST",onlyAuthNone:!0,path:"/co2/person/sendemail",request:{additionalProperties:!1,properties:{email:lr.common2,type:{const:"password",default:"password",type:"string"}},required:["email","type"],type:"object"}},{auth:"bearer",constant:"SERVER_EXCHANGE_TOKEN",contentType:"application/json",method:"POST",path:"/api/cocolight/exchangetoken",request:{additionalProperties:!1,properties:{serverUrl:lr.common4},required:["serverUrl"],type:"object"}},{auth:"bearer",constant:"CHANGE_PASSWORD",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/person/changepassword",request:{additionalProperties:!1,properties:{mode:{const:"changePassword",default:"changePassword",type:"string"},newPassword:lr.common1,newPassword2:lr.common1,oldPassword:lr.common1,scope:{default:"",type:["string"]},userId:lr.common5},required:["mode","userId","oldPassword","newPassword","newPassword2"],type:"object"}},{auth:"bearer",constant:"DELETE_ACCOUNT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/id/{id}/type/citoyens",pathParams:lr.common6,postActions:[{type:"resetSession"},{event:"accountDeleted",path:null,type:"emitEvent"}],request:lr.common8},{auth:"bearer",constant:"UPDATE_SETTINGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatesettings",request:{additionalProperties:!1,allOf:[{else:{properties:{idEntity:lr.common11}},if:{properties:{typeEntity:lr.common12}},then:{properties:{idEntity:lr.common5}}},{if:{properties:{type:{enum:["birthDate","email","locality","phone","directory"]},typeEntity:lr.common12}},then:{properties:{value:{enum:["private","public","mask"],type:"string"}}}},{if:{properties:{type:{enum:["activitypub","isOpenData"]},typeEntity:lr.common12}},then:lr.common13},{if:{properties:{type:{enum:["isOpenData","isOpenEdition","private","feedback"]},typeEntity:{not:lr.common12}}},then:lr.common13}],properties:{idEntity:lr.common1,type:lr.common1,typeEntity:lr.common15,value:lr.common16},required:["type","value","typeEntity","idEntity"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_DESCRIPTION",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{additionalProperties:!1,allOf:[lr.common17,{anyOf:[{properties:{description:lr.common23},required:["description"]},{properties:{shortDescription:lr.common23},required:["shortDescription"]}]}],properties:{block:{const:"descriptions",default:"descriptions",type:"string"},descMentions:lr.common10,description:lr.common1,id:lr.common1,scope:{default:"",type:["string","null"]},shortDescription:lr.common1,typeElement:lr.common15},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_INFO",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{$defs:{sharedFields:{email:lr.common2,name:lr.common1,tags:lr.common25,url:lr.common4}},allOf:[{if:lr.common20,then:{additionalProperties:!1,anyOf:[lr.common28,{properties:{birthDate:lr.common23},required:["birthDate"]},{properties:{fixe:lr.common23},required:["fixe"]},{properties:{mobile:lr.common23},required:["mobile"]},lr.common30,lr.common32,lr.common34],properties:{birthDate:{format:"date",type:"string"},block:lr.common36,email:lr.common37,fixe:lr.common1,id:lr.common5,mobile:lr.common1,name:lr.common38,scope:lr.common10,tags:lr.common39,typeElement:lr.common15,url:lr.common40}}},{if:{properties:{typeElement:lr.common41}},then:{additionalProperties:!1,anyOf:[lr.common28,lr.common30,lr.common32,lr.common34,{properties:{avancement:lr.common23},required:["avancement"]},{properties:{parent:lr.common23},required:["parent"]}],properties:{avancement:{enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],type:"string"},block:lr.common36,email:lr.common37,id:lr.common1,name:lr.common38,parent:{additionalProperties:!1,patternProperties:{"^[a-fA-F0-9]{24}$":lr.common42},type:"object"},scope:lr.common10,tags:lr.common39,typeElement:lr.common15,url:lr.common40}}},{if:{properties:{typeElement:lr.common44}},then:{additionalProperties:!1,anyOf:[lr.common28,lr.common30,lr.common32,lr.common34,{properties:{type:lr.common23},required:["type"]}],properties:{block:lr.common36,email:lr.common37,id:lr.common1,name:lr.common38,scope:lr.common10,tags:lr.common39,type:{enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],type:"string"},typeElement:lr.common15,url:lr.common40}}}],properties:{block:lr.common36,id:lr.common1,scope:lr.common10,typeElement:lr.common15},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SOCIAL",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{$defs:{socialField:{anyOf:[lr.common27,lr.common4]}},allOf:[lr.common17,{anyOf:[{properties:{gitlab:lr.common23},required:["gitlab"]},{properties:{github:lr.common23},required:["github"]},{properties:{twitter:lr.common23},required:["twitter"]},{properties:{facebook:lr.common23},required:["facebook"]},{properties:{instagram:lr.common23},required:["instagram"]},{properties:{diaspora:lr.common23},required:["diaspora"]},{properties:{mastodon:lr.common23},required:["mastodon"]},{properties:{telegram:lr.common23},required:["telegram"]},{properties:{signal:lr.common23},required:["signal"]}]}],properties:{block:{const:"network",default:"network",type:"string"},diaspora:lr.common45,facebook:lr.common45,github:lr.common45,gitlab:lr.common45,id:lr.common1,instagram:lr.common45,mastodon:lr.common45,scope:lr.common10,signal:lr.common45,telegram:lr.common45,twitter:lr.common45,typeElement:lr.common15},required:["block","typeElement","id"],type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_LOCALITY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:lr.common46,if:lr.common20,properties:{address:lr.common49,block:{const:"localities",default:"localities",type:"string"},geo:lr.common53,geoPosition:lr.common57,id:lr.common1,scope:lr.common10,typeElement:lr.common15},required:["block","typeElement","id","address"],then:lr.common63,type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SLUG",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:lr.common46,if:lr.common20,properties:{block:lr.common36,id:lr.common1,scope:lr.common10,slug:lr.common66,typeElement:lr.common15},required:["block","typeElement","id","slug"],then:lr.common63,type:"object"}},{auth:"bearer",constant:"CHECK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/check",request:{additionalProperties:!1,else:lr.common46,if:lr.common67,properties:{block:lr.common36,id:lr.common1,slug:lr.common66,type:lr.common15},required:["block","type","id","slug"],then:lr.common63,type:"object"}},{auth:"bearer",constant:"PROFIL_IMAGE",contentType:"multipart/form-data",method:"POST",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/profil_avatar/contentKey/profil/docType/image",pathParams:lr.common69,request:{additionalProperties:!1,properties:{profil_avatar:lr.common16},required:["profil_avatar"],type:"object"}},{auth:"none",constant:"GET_ELEMENTS_ABOUT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/about/type/{type}/id/{id}/json/true",pathParams:lr.common77,request:{additionalProperties:!1,properties:{tpl:{const:"ficheInfoElement",default:"ficheInfoElement",type:"string"}},required:["tpl"],type:"object"}},{auth:"bearer",constant:"MULTICONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/multiconnect",request:{additionalProperties:!1,else:lr.common79,if:lr.common81,properties:{listInvite:{additionalProperties:!1,patternProperties:{"^(citoyens|projects|organizations)$":{additionalProperties:!1,patternProperties:{"^[0-9a-fA-F]{24}$":{additionalProperties:!1,properties:{name:lr.common1},required:["name"],type:"object"}},type:"object"}},type:"object"},parentId:lr.common1,parentType:lr.common15},required:["parentId","parentType","listInvite"],then:lr.common83,type:"object"}},{auth:"none",constant:"GET_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/get/type/{type}/id/{id}/isLive/{isLive}/json/true",pathParams:{additionalProperties:!1,else:lr.common46,if:lr.common67,properties:{id:lr.common1,isLive:lr.common85,type:lr.common15},required:["isLive","type","id"],then:lr.common63,type:"object"},request:{additionalProperties:!1,properties:{dateLimit:lr.common86,indexStep:{default:12,type:"integer"},search:{additionalProperties:!1,properties:{name:lr.common10},required:["name"],type:"object"}},required:["dateLimit","indexStep"],type:"object"}},{auth:"none",constant:"GET_NEWS_BY_ID",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/getbyids",request:{additionalProperties:!1,properties:{ids:{items:lr.common11,type:"array"}},required:["ids"],type:"object"}},{auth:"bearer",constant:"ADD_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/save",request:{additionalProperties:!1,anyOf:[lr.common87,lr.common88,lr.common89],else:lr.common79,if:lr.common81,properties:{json:lr.common61,markdownActive:lr.common85,mediaFile:lr.common90,mediaImg:lr.common92,mentions:lr.common94,parentId:lr.common1,parentType:lr.common15,scope:lr.common98,tags:lr.common25,text:lr.common1,type:lr.common99},required:["scope","markdownActive","parentId","parentType","type","json"],then:lr.common83,type:"object"}},{auth:"bearer",constant:"ADD_IMAGE_NEWS",contentType:"multipart/form-data",method:"POST",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/newsImage/docType/image/contentKey/slider",pathParams:lr.common69,request:{additionalProperties:!1,properties:{newsImage:lr.common16},required:["newsImage"],type:"object"}},{auth:"bearer",constant:"ADD_FILE_NEWS",contentType:"multipart/form-data",method:"POST",path:"/co2/document/uploadSave/dir/communecter/folder/{folder}/ownerId/{ownerId}}/input/newsFile/docType/file",pathParams:lr.common69,request:{additionalProperties:!1,properties:{newsFile:lr.common16},required:["newsFile"],type:"object"}},{auth:"bearer",constant:"DELETE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/delete/id/{id}",pathParams:lr.common100,request:{additionalProperties:!1,properties:{isLive:lr.common101},required:["isLive"],type:"object"}},{auth:"bearer",constant:"UPDATE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/update",request:{additionalProperties:!1,anyOf:[lr.common87,lr.common88,lr.common89],else:lr.common79,if:lr.common81,properties:{idNews:lr.common11,markdownActive:lr.common85,mediaFile:lr.common90,mediaImg:lr.common92,mentions:lr.common94,parentId:lr.common1,parentType:lr.common15,scope:lr.common98,tags:lr.common25,text:lr.common1,type:lr.common99},required:["idNews","scope","markdownActive","parentId","parentType","type"],then:lr.common83,type:"object"}},{auth:"bearer",constant:"SHARE_NEWS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,else:lr.common102,if:lr.common104,properties:{childId:lr.common11,childType:lr.common15,comment:lr.common1,connectType:lr.common106,parentId:lr.common11,parentType:lr.common99},required:["parentId","parentType","childId","childType","connectType"],then:lr.common107,type:"object"}},{auth:"none",constant:"GET_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/index/type/{type}/id/{id}/json/true",pathParams:lr.common109},{auth:"bearer",constant:"ADD_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/save",request:{additionalProperties:!1,properties:{argval:lr.common10,contextId:lr.common11,contextType:lr.common111,mentions:lr.common112,parentCommentId:lr.common11,path:lr.common10,text:lr.common1},required:["text","contextId","contextType"],type:"object"}},{auth:"bearer",constant:"DELETE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/delete/id/{id}",pathParams:lr.common100},{auth:"bearer",constant:"UPDATE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/update",request:{additionalProperties:!1,properties:{id:lr.common11,params:{properties:{mentions:lr.common112,text:lr.common1},required:["text"],type:"object"}},required:["id","params"],type:"object"}},{auth:"none",constant:"SEARCH_TAGS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/tags/search?q={q}",pathParams:{additionalProperties:!1,properties:{q:lr.common1},required:["q"],type:"object"}},{auth:"none",constant:"SHOW_VOTE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/action/list/type/{type}/id/{id}/actionType/vote/json/true",pathParams:lr.common109},{auth:"none",constant:"GLOBAL_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:{const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],items:lr.common115,type:"array"},fediverse:lr.common116,filters:lr.common117,indexMin:{const:0,default:0,type:"number"},indexStep:lr.common60,initType:lr.common117,locality:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":{additionalProperties:!1,properties:{id:lr.common1,type:{enum:["cities","level1"],type:"string"}},required:["id","type"],type:"object"}},type:"object"},name:lr.common1,notSourceKey:lr.common61,ranges:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":lr.common118},type:"object"},searchTags:lr.common26,searchType:{items:lr.common115,type:"array"}},required:["name","searchType","countType","indexMin","indexStep","initType","count","notSourceKey","filters","fediverse"],type:"object"}},{auth:"none",constant:"CITY_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{indexMax:{minimum:5,type:"integer"},indexMin:{minimum:0,type:"integer"},locality:lr.common117,name:lr.common1,searchBy:{const:"ALL",default:"ALL",type:"string"},searchType:{const:["cities"],default:["cities"],items:{enum:["cities"],type:"string"},type:"array"}},required:["name","locality","searchType"],type:"object"}},{auth:"none",constant:"SUGGESTION_INPUT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{indexMax:{default:20,minimum:20,type:"integer"},indexMin:lr.common120,name:lr.common1,searchType:{items:{enum:["organizations","projects","poi"],type:"string"},type:"array"}},required:["name","searchType","indexMin","indexMax"],type:"object"}},{auth:"none",constant:"GET_PROJECTS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common121,fediverse:lr.common116,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@userId":lr.common123,"parent.@userId":lr.common123},"links.contributors.@userId":lr.common123},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124,"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124},type:"object"}},required:["$or"],type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common121},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_PROJECTS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:lr.common77,request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common121,fediverse:lr.common116,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@{pathParams.id}":lr.common123,"parent.@{pathParams.id}":lr.common123},"links.contributors.@{pathParams.id}":lr.common123},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124,"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124},type:"object"}},required:["$or"],type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common121},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_POIS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common128,fediverse:lr.common116,filters:{additionalProperties:!1,default:{"parent.@userId":lr.common123},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common128},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_POIS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:lr.common77,request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common128,fediverse:lr.common116,filters:{additionalProperties:!1,default:{"parent.@{pathParams.id}":lr.common123},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common128},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_ORGANIZATIONS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common130,fediverse:lr.common116,filters:{additionalProperties:!1,default:{"links.members.@userId":lr.common123,"links.members.@userId.isInviting":lr.common132,"links.members.@userId.toBeValidated":lr.common132},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":lr.common133,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":lr.common133},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common130},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_ORGANIZATIONS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:{additionalProperties:!1,else:lr.common46,if:lr.common67,properties:{id:lr.common1,type:{default:"citoyens",enum:["citoyens","organizations"],type:"string"}},required:["type","id"],then:lr.common63,type:"object"},request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common130,fediverse:lr.common116,filters:{additionalProperties:!1,default:{"links.members.@{pathParams.id}":lr.common123,"links.members.@{pathParams.id}.isInviting":lr.common132,"links.members.@{pathParams.id}.toBeValidated":lr.common132},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":lr.common133,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":lr.common133},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common130},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_MEMBERS_NO_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common136,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)$)"}}},{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$)"}}}],patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":lr.common124,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":lr.common138,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":lr.common140,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":lr.common133},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common136},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_MEMBERS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/organizations/id/{id}/canSee/true",pathParams:lr.common100,request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common136,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.memberOf.@{pathParams.id}":lr.common123,"links.memberOf.@{pathParams.id}.isInviting":lr.common132,"links.memberOf.@{pathParams.id}.toBeValidated":lr.common132},patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":lr.common124,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":lr.common138,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":lr.common140,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":lr.common138},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common136},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_FRIENDS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/citoyens/id/{id}/canSee/true",pathParams:lr.common6,request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common143,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.friends.@{pathParams.id}":lr.common123,"links.friends.@{pathParams.id}.isInviting":lr.common132,"links.friends.@{pathParams.id}.toBeValidated":lr.common132},patternProperties:{"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":lr.common138,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":lr.common138},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common143},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_SUBSCRIPTIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common145,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[lr.common147],default:{"links.followers.@userId":lr.common123,"links.followers.@{userId}.isInviting":lr.common132,"links.followers.@{userId}.toBeValidated":lr.common132},patternProperties:lr.common150,type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common145},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_SUBSCRIPTIONS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/citoyens/id/{id}/canSee/true",pathParams:lr.common6,request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common145,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[lr.common147],default:{"links.followers.@{pathParams.id}":lr.common123,"links.followers.@{pathParams.id}.isInviting":lr.common132,"links.followers.@{pathParams.id}.toBeValidated":lr.common132},patternProperties:lr.common150,type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common145},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_SUBSCRIBERS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common143,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[lr.common151],default:{"links.follows.@userId":lr.common123,"links.follows.@{userId}.isInviting":lr.common132,"links.follows.@{userId}.toBeValidated":lr.common132},patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":lr.common133,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":lr.common133},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common143},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_SUBSCRIBERS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/{type}/id/{id}/canSee/true",pathParams:{additionalProperties:!1,allOf:[{else:lr.common46,if:lr.common67,then:lr.common63}],properties:{id:lr.common1,type:{default:"citoyens",enum:["citoyens","organizations","projects"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common143,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[lr.common151],default:{"links.follows.@{pathParams.id}":lr.common123},maxProperties:1,minProperties:1,patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common143},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_CONTRIBUTORS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common136,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)$)"}}},{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$)"}}}],patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":lr.common124,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":lr.common138,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":lr.common140,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":lr.common133},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common136},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"GET_CONTRIBUTORS_ADMIN",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocompleteadmin/type/projects/id/{id}/canSee/true",pathParams:lr.common100,request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common136,fediverse:lr.common116,filters:{additionalProperties:!1,allOf:[{not:{propertyNames:{pattern:"^(?!links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$)"}}}],default:{"links.projects.@{pathParams.id}":lr.common123,"links.projects.@{pathParams.id}.isInviting":lr.common132,"links.projects.@{pathParams.id}.toBeValidated":lr.common132},patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":lr.common124,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":lr.common124,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":lr.common138,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":lr.common140,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":lr.common138},type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common136},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common154,fediverse:lr.common116,filters:{properties:{$or:{additionalProperties:!1,minProperties:1,patternProperties:{"^issuer\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common124},type:"object"},isParcours:lr.common3,"preferences.private":lr.common116},required:["preferences.private"],type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,searchType:lr.common154},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","filters","locality","fediverse"],type:"object"}},{auth:"none",constant:"GET_BADGES_FILTERS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:lr.common61,countType:lr.common156,fediverse:lr.common116,fields:lr.common154,filters:{oneOf:[{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common158}},{additionalProperties:!1,maxProperties:3,minProperties:3,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":lr.common158,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":lr.common161,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":lr.common161}},{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:lr.common164},{additionalProperties:!1,maxProperties:1,minProperties:1,properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:lr.common164,type:"object"}},required:["$or"]},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.revoke$":lr.common160}},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":lr.common158}}],type:"object"},indexMin:lr.common120,indexStep:lr.common127,initType:lr.common117,locality:lr.common117,name:lr.common1,notSourceKey:lr.common61,ranges:{additionalProperties:!1,default:{Cooperative:lr.common165,GovernmentOrganization:lr.common165,Group:lr.common165,LocalBusiness:lr.common165,NGO:lr.common165,citoyens:lr.common165,projects:lr.common165},maxProperties:7,minProperties:7,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":lr.common118},type:"object"},searchType:lr.common156},required:["searchType","indexMin","initType","count","countType","indexStep","notSourceKey","locality","fediverse"],type:"object"}},{auth:"bearer",constant:"CONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/connect",request:{additionalProperties:!1,allOf:[lr.common166,lr.common170,lr.common176,{if:lr.common182,then:{properties:{connectType:{default:"attendee",enum:["attendee","connect"]}}}}],properties:{childId:lr.common185,childType:lr.common186,connectType:{enum:["admin","member","contributor","attendee","friend","connect"],type:"string"},parentId:lr.common11,parentType:lr.common187},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"bearer",constant:"DISCONNECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/disconnect",request:{additionalProperties:!1,allOf:[lr.common166,lr.common170,lr.common176,{if:lr.common182,then:{properties:{connectType:{const:"attendee",default:"attendee"}}}}],properties:{childId:lr.common185,childType:lr.common186,connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:lr.common11,parentType:lr.common187},required:["childId","childType","parentType","parentId","connectType"],type:"object"}},{auth:"none",constant:"GET_ELEMENTS_KEY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/getinfo/key/{slug}",pathParams:{additionalProperties:!1,properties:{slug:{pattern:"^([a-zA-Z0-9-_]+)$",type:"string"}},required:["slug"],type:"object"}},{auth:"bearer",constant:"GET_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/config/type/citoyens/id/{id}/json/true",pathParams:lr.common6},{auth:"bearer",constant:"DELETE_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue?index={index}",pathParams:{properties:{index:lr.common60},type:"object"},request:{additionalProperties:!1,properties:{collection:lr.common188,id:lr.common189,path:{const:"preferences.search.@{pathParams.index}",default:"preferences.search.@{pathParams.index}",type:"string"},pull:{const:"preferences.search",type:"string"},value:lr.common117},required:["id","collection","path","pull","value"],type:"object"}},{auth:"bearer",constant:"ADD_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue",request:{additionalProperties:!1,properties:{arrayForm:lr.common160,collection:lr.common188,id:lr.common189,path:{const:"preferences.search",default:"preferences.search",type:"string"},value:{additionalProperties:!1,properties:{description:lr.common1,locality:{patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:lr.common43,required:["name","type"]}},type:"object"},name:lr.common1,tags:lr.common26,url:lr.common1},required:["url","name"],type:"object"}},required:["id","collection","path","arrayForm","value"],type:"object"}},{auth:"bearer",constant:"ADD_ORGANIZATION",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:lr.common49,collection:{const:"organizations",default:"organizations",type:"string"},email:lr.common2,geo:lr.common53,geoPosition:lr.common57,id:lr.common11,key:{const:"organization",default:"organization",type:"string"},name:{minLength:3,type:"string"},preferences:lr.common190,role:{enum:["admin","member"],type:"string"},scope:lr.common117,shortDescription:lr.common1,tags:lr.common26,type:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},url:lr.common4},required:["id","collection","key","name","type","role","scope"],type:"object"}},{auth:"bearer",constant:"ADD_PROJECT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:lr.common49,collection:{const:"projects",default:"projects",type:"string"},geo:lr.common53,geoPosition:lr.common57,id:lr.common11,key:{const:"project",default:"project",type:"string"},name:lr.common1,parent:lr.common193,preferences:{default:{crowdfunding:!0,isOpenData:!1,isOpenEdition:!1},properties:{crowdfunding:lr.common85,isOpenData:lr.common101,isOpenEdition:lr.common101},required:["isOpenData","isOpenEdition"],type:"object"},public:lr.common85,scope:lr.common117,shortDescription:lr.common1,tags:lr.common26,url:lr.common4},required:["id","collection","key","parent","name","public","scope"],type:"object"}},{auth:"bearer",constant:"ADD_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{address:lr.common49,collection:lr.common198,description:lr.common1,geo:lr.common53,geoPosition:lr.common57,id:lr.common11,key:lr.common198,name:lr.common1,parent:lr.common193,scope:lr.common117,tags:lr.common26,type:{enum:["link","tool","machine","software","rh","Resource material","Financial Ressource","ficheBlanche","geoJson","compostPickup","video","sharedLibrary","recoveryCenter","trash","history","something2See","funPlace","place","artPiece","streetArts","openScene","stand","parking","other"],type:"string"},urls:lr.common26},required:["id","collection","key","parent","type","name"],type:"object"}},{auth:"bearer",constant:"ADD_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,else:{required:["openingHours"]},if:{properties:{recurrency:lr.common135}},properties:{address:lr.common49,collection:lr.common199,email:lr.common2,endDate:lr.common200,geo:lr.common53,geoPosition:lr.common57,id:lr.common11,key:{const:"event",default:"event",type:"string"},name:lr.common1,openingHours:{default:["","","","","","",""],items:{anyOf:[{const:"",type:"string"},{additionalProperties:!1,properties:{dayOfWeek:{enum:["Mo","Tu","We","Th","Fr","Sa","Su"],type:"string"},hours:{default:[],items:{additionalProperties:!1,properties:{closes:lr.common201,opens:lr.common201},required:["opens","closes"],type:"object"},type:"array"}},required:["dayOfWeek","hours"],type:"object"}]},maxItems:7,minItems:7,type:"array"},organizer:lr.common193,parent:{additionalProperties:!1,patternProperties:lr.common196,type:"object"},preferences:{default:{isOpenData:!1,isOpenEdition:!1},properties:{isOpenData:lr.common101,isOpenEdition:lr.common101},required:["isOpenData","isOpenEdition"],type:"object"},public:lr.common85,recurrency:lr.common101,scope:lr.common117,shortDescription:lr.common1,startDate:lr.common200,tags:lr.common26,timeZone:lr.common1,type:lr.common202,url:lr.common4},required:["id","collection","key","organizer","type","name","scope"],startBeforeEnd:!0,then:{required:["startDate","endDate"]},type:"object"}},{auth:"bearer",constant:"DELETE_POI",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/poi/id/{id}",pathParams:lr.common100,request:lr.common8},{auth:"bearer",constant:"DELETE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/events/id/{id}/",pathParams:lr.common100,request:lr.common8},{auth:"bearer",constant:"DELETE_ELEMENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/{type}/id/{id}",pathParams:{additionalProperties:!1,properties:{id:lr.common11,type:lr.common1},required:["type","id"],type:"object"},request:lr.common8},{auth:"bearer",constant:"ADD_IMAGE_ELEMENT",contentType:"multipart/form-data",method:"POST",path:"/co2/document/upload-save/dir/communecter/folder/{folder}/ownerId/{ownerId}/input/qqfile/docType/image/contentKey/profil",pathParams:{additionalProperties:!1,properties:{folder:{enum:["badges","events"],type:"string"},ownerId:lr.common11},required:["folder","ownerId"],type:"object"},request:{additionalProperties:!1,properties:{qqfile:lr.common16,qqfilename:lr.common1,qqtotalfilesize:lr.common203,qquuid:lr.common11},required:["qquuid","qqfilename","qqtotalfilesize","qqfile"],type:"object"}},{auth:"bearer",constant:"LINK_VALIDATE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/validate",request:{additionalProperties:!1,properties:{childId:lr.common204,childType:{default:"citoyens",enum:["citoyens"],type:"string"},linkOption:{enum:["isInviting","toBeValidated","isAdminPending"],type:"string"},parentId:lr.common11,parentType:lr.common187},required:["childId","childType","parentType","parentId"],type:"object"}},{auth:"none",constant:"SEARCH_MEMBER_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/searchmemberautocomplete",request:{additionalProperties:!1,properties:{search:lr.common1,searchMode:{default:"personOnly",enum:["personOnly","organizationOnly","mixte"],type:"string"}},required:["search","searchMode"],type:"object"}},{auth:"bearer",constant:"GET_NOTIFICATIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/getnotifications/type/{type}/id/{id}",pathParams:lr.common205,request:{additionalProperties:!1,properties:{indexMin:lr.common86},type:"object"}},{auth:"bearer",constant:"GET_NOTIFICATIONS_COUNT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/getnotifications/type/{type}/id/{id}",pathParams:lr.common205,request:{additionalProperties:!1,properties:{refreshTimestamp:lr.common203},type:"object"}},{auth:"bearer",constant:"NOTIFICATION_UPDATE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/update",request:{additionalProperties:!1,properties:{action:{enum:["seen","read"],type:"string"},all:lr.common61},required:["action","all"],type:"object"}},{auth:"bearer",constant:"REMOVE_ALL_NOTIFICATIONS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/removeall"},{auth:"bearer",constant:"MARK_NOTIFICATION_AS_READ",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/notification/marknotificationasread",request:lr.common100},{auth:"none",constant:"ACTIVITYPUB_SEARCH",contentType:"application/x-www-form-urlencoded",method:"GET",params:[lr.common16],path:"/api/activitypub/search?address={address}",pathParams:{additionalProperties:!1,properties:{address:lr.common1},required:["address"],type:"object"}},{auth:"bearer",constant:"ACTIVITYPUB_LINK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/activitypub/link",request:{additionalProperties:!1,properties:{action:{enum:["undo_follow","accept_invitation","reject_invitation","undo_accept","undo_request_follow","follow","remove_follow","accept_follower","reject_follower","remove_follower","remove_invitation"],type:"string"},actor:{additionalProperties:!1,properties:{id:lr.common1,name:lr.common1,type:{enum:["person"],type:"string"}},required:["id","type","name"],type:"object"},payload:lr.common4},required:["action","payload","actor"],type:"object"}},{auth:"none",constant:"ACTIVITYPUB_GET_COMMUNITY",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/api/activitypub/getcommunity/userId/${userId}/type/${type}/actor/person",pathParams:{additionalProperties:!1,properties:{type:{enum:["follows","followers"],type:"string"},userId:lr.common11},required:["userId","type"],type:"object"}},{auth:"none",constant:"GET_BADGE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/page/type/badges/id/{id}/json/true",pathParams:lr.common100},{auth:"none",constant:"GET_EMETTEUR_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/app/badge/json/true"},{auth:"bearer",constant:"ADD_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/save",request:{additionalProperties:!1,properties:{collection:lr.common207,criteria:{additionalProperties:!1,properties:{narrative:lr.common1},required:["narrative"],type:"object"},description:lr.common1,id:lr.common11,isParcours:lr.common101,issuer:{additionalProperties:!1,patternProperties:{"^(?:[a-f0-9]{24}|@userId)$":{additionalProperties:!1,properties:{name:lr.common1,type:{enum:["citoyens","organizations","projects"],type:"string"}},required:["type"],type:"object"}},type:"object"},key:lr.common208,name:lr.common1,parent:{additionalProperties:!1,patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:{name:lr.common1,type:lr.common207},required:["type"],type:"object"}},type:"object"},preferences:lr.common190,public:lr.common85,scope:lr.common117,tags:lr.common26},required:["id","collection","key","name","public","scope","issuer","criteria"],type:"object"}},{auth:"bearer",constant:"ASSIGN_BADGES",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/badges/assign",request:{additionalProperties:!1,properties:{award:{patternProperties:{"^[0-9a-f]{24}$":lr.common42},type:"object"},badgeId:lr.common11,collection:lr.common207,evidences:{items:{additionalProperties:!1,properties:{narative:lr.common1,url:lr.common4},required:["narative"],type:"object"},type:"array"},key:lr.common208,narative:lr.common1,scope:lr.common117},required:["key","collection","badgeId","award"],type:"object"}},{auth:"none",constant:"GET_EVENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/agenda",request:{additionalProperties:!1,properties:{count:lr.common101,countType:{const:["events"],default:["events"],type:"array"},endDateUTC:lr.common200,fediverse:lr.common101,indexMin:lr.common86,indexStep:{default:100,type:"integer"},locality:{patternProperties:{"^[^\\s]+$":{type:"object"}},type:"object"},name:lr.common1,searchType:{const:["events"],default:["events"],items:lr.common1,type:"array"},startDate:lr.common60,startDateUTC:lr.common200,type:lr.common202},required:["searchType","indexMin","indexStep","startDate","startDateUTC","fediverse"],type:"object"}},{auth:"bearer",constant:"SHARE_EVENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/news/co/share",request:{additionalProperties:!1,else:lr.common102,if:lr.common104,properties:{childId:lr.common11,childType:lr.common15,comment:lr.common1,connectType:lr.common106,parentId:lr.common11,parentType:lr.common199},required:["parentId","childId","childType","connectType","parentType"],then:lr.common107,type:"object"}},{auth:"bearer",constant:"INVITE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/link/multiconnect",request:{additionalProperties:!1,else:lr.common79,if:lr.common81,properties:{listInvite:{additionalProperties:!1,minProperties:1,properties:{citoyens:lr.common209,invites:{patternProperties:{"^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$":{additionalProperties:!1,properties:{email:lr.common2,isAdmin:lr.common213,msg:lr.common1,name:lr.common1,roles:lr.common26},required:["name","email"],type:"object"}},type:"object"},organizations:lr.common209,projects:lr.common209},type:"object"},parentId:lr.common1,parentType:lr.common15},required:["parentId","parentType","listInvite"],then:lr.common83,type:"object"}}];var pr=__webpack_require__(1027);or.addType("oid",(e=>new cr.ObjectID(e)));class ur extends v.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:o="/api/cocolight/refreshtoken",endpoints:i=dr,timeout:s=3e4,debug:a=!1,maxRetries:c=0,circuitBreakerThreshold:l=5,circuitBreakerResetTime:d=6e4,fromJSONValue:p=!0,tokenStorageStrategy:u=null}={}){if(super(),!e)throw new n('Le paramètre "baseURL" est obligatoire.',500);this.__entityTag="ApiClient",this._baseURL=e,this._refreshUrl=o,this._endpoints=i,this._debug=a;let m=null;this._fromJSONValue=p,Object.defineProperty(this,"userId",{get:()=>m,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{m=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new k({strict:!1,useDefaults:!0,allErrors:!0,verbose:!0}),I(this._ajv),this._ajv.addKeyword({keyword:"startBeforeEnd",type:"object",errors:!0,validate:this._startBeforeEndValidate}),this._logger=sr({transport:{target:"pino-pretty",options:{colorize:!0}},level:a?"debug":"info"}),this._client=Vt.create({baseURL:e,timeout:s}),c>0&&(nr(this._client,{retries:c,retryDelay:nr.exponentialDelay,retryCondition:e=>nr.isNetworkError(e)||nr.isRetryableError(e)}),this._logger.info(`[ApiClient] Retry activé : ${c} max`)),this._breakerThreshold=l,this._breakerResetTime=d,this._breakerErrorCount=0,this._breakerOpen=!1,this._lastBreakerOpenTime=null,this._accessToken=null,this._refreshToken=null,r&&this.setRefreshToken(r),t&&this.setToken(t),this._tokenStorage=u||new pr.GN;const f=this._tokenStorage.getAccessToken();f&&this.setToken(f);const h=this._tokenStorage.getRefreshToken();h&&this.setRefreshToken(h),this._client.interceptors.response.use((e=>e),(async e=>{const t=e.config;if(t._retry)throw this._logger.error("[ApiClient] Requête déjà retentée, échec définitif."),e;if(e.response&&401===e.response.status&&this._refreshToken){t._retry=!0;try{if(this._logger.info("[ApiClient] Tentative de refresh du token..."),await this._refreshAccessToken())return this._logger.info("[ApiClient] Token rafraîchi avec succès."),t.headers.Authorization="Bearer "+this.getToken(),this._logger.info("[ApiClient] Retente la requête originale avec le nouveau token."),this._client.request(t);throw this.resetSession(),new n("Impossible de rafraîchir le token.",401)}catch(e){throw this.resetSession(),new n("Erreur lors du rafraîchissement du token.",401,e)}}throw e}))}setToken(e){this._accessToken=e,this._tokenStorage.setAccessToken(e),this._client.defaults.headers.common.Authorization="Bearer "+e;const t=this._getIdFromToken(e);t&&(this._setUserId(t),this._logger.debug(`[ApiClient] userId extrait et défini : ${t}`)),this._logger.debug(`[ApiClient] setToken: ${e}`)}getToken(){return this._accessToken}setRefreshToken(e){if(this._refreshToken=e,this._tokenStorage.setRefreshToken(e),null===this.userId){const t=this._getIdFromToken(e);t&&(this._setUserId(t),this._logger.debug(`[ApiClient] userId extrait depuis refreshToken : ${t}`))}this._logger.debug(`[ApiClient] setRefreshToken: ${e}`)}getRefreshToken(){return this._refreshToken}get isConnected(){return!!this._accessToken}_getIdFromToken(e){if(!e)return null;try{const t=function(e,t){if("string"!=typeof e)throw new ir("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,n=e.split(".")[r];if("string"!=typeof n)throw new ir(`Invalid token specified: missing part #${r+1}`);let o;try{o=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return atob(t)}}(n)}catch(e){throw new ir(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new ir(`Invalid token specified: invalid json for part #${r+1} (${e.message})`)}}(e);return this._logger.debug("[ApiClient] Payload décodé :",t),t.id||t.userId||null}catch(e){return this._logger.error("[ApiClient] Erreur lors du décodage du token :",e),null}}async _refreshAccessToken(){if(!this._refreshToken)return!1;const e=Vt.create({baseURL:this._baseURL,timeout:1e4,headers:{"Content-Type":"application/json"}});try{const t=await e.post(this._refreshUrl,{refreshToken:this._refreshToken});return!(!t.data||!t.data.token||(this.setToken(t.data.token),t.data.refreshToken&&this.setRefreshToken(t.data.refreshToken),this.emit("refreshSuccess",t.data),0))}catch(e){return this.resetSession(),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]&&ur.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]&&ur.stripNullsInPlace(e[t]));return e}_resolveSpecialValuesInPlace(e,t={}){const r={userId:()=>this.userId,accessToken:()=>this._accessToken,refreshToken:()=>this._refreshToken,baseURL:()=>this._baseURL,pathParams:e=>{const r=this._getValueByPath(t,e);return null!=r?r:void 0}},n=/@(?:\{([^}]+)\}|([\w.]+))/g,o=e=>"string"!=typeof e?e:e.replace(n,((t,n,o)=>{if(n){if(n.startsWith("pathParams.")){const e=n.substring(11),t=r.pathParams(e);return null!=t?t:`@{${n}}`}{const e=r[n];if("function"==typeof e){const t=e();return null!=t?t:`@{${n}}`}return`@{${n}}`}}if(o){if(o.startsWith("pathParams.")){const e=o.match(/^pathParams\.([^.]+)(.*)$/);if(e){const t=e[1],n=e[2],i=r.pathParams(t);return null!=i?i+n:`@${o}`}return`@${o}`}{const e=r[o];if("function"==typeof e){const t=e();return null!=t?t:`@${o}`}return`@${o}`}}return e})),i=e=>{if((e=>e&&"object"==typeof e&&("function"==typeof e.pipe||"undefined"!=typeof Buffer&&e instanceof Buffer))(e))return e;if(Array.isArray(e))return e.map(i);if((e=>"[object Object]"===Object.prototype.toString.call(e))(e)){const t={};for(const[r,n]of Object.entries(e))t[o(r)]=i(n);return t}return"string"==typeof e?o(e):e};return i(e)}_cleanSchemaLeftoverAlias(e){const t=/@\w+/;if(Array.isArray(e))return e.map((e=>this._cleanSchemaLeftoverAlias(e)));if(e&&"object"==typeof e){const r={};for(const n of Object.keys(e)){const o=e[n];if(!t.test(n)){if("default"===n){if("string"==typeof o&&t.test(o))continue;if(o&&"object"==typeof o){const e=this._cleanSchemaLeftoverAlias(o);Object.keys(e).length>0&&(r[n]=e);continue}}"string"==typeof o&&t.test(o)||(r[n]=this._cleanSchemaLeftoverAlias(o))}}return r}return e}async safeCall(e,...t){try{return await e(...t)}catch(e){throw this._logger.error(`[ApiClient.safeCall] Erreur: ${e.message}`),e}}async callEndpoint(e,t={},r=!0,s=!0){if(!this._checkCircuitBreaker())throw new i("Le circuit breaker est activé, impossible d'appeler l'API");const a=this._endpoints.find((t=>t.constant===e));if(!a)throw new n(`Endpoint introuvable : ${e}`,404);const{path:c,method:l,contentType:d,auth:p,pathParams:u,request:m,responses:f}=a,h=(l||"GET").toLowerCase(),y=d||"application/json",g={"Content-Type":y};if(this._accessToken)"bearer"===p?g.Authorization=`Bearer ${this._accessToken}`:p&&"none"!==p||g.Authorization||(g.Authorization=`Bearer ${this._accessToken}`);else if("bearer"===p)throw new n(`Token requis pour l'endpoint sécurisé : ${e}`,401);let w,_=c,b={};if(u){let e=u;"none"===p&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(u));const r=t.pathParams||{},i=this._ajv.compile(e);if(!i(r)){const e=this._ajvErrorHuman(i.errors);throw this.emit("validationError",{stage:"pathParams",errors:i.errors}),new o("Path parameter validation failed.",400,e,i.errors)}b=this._resolveSpecialValuesInPlace(r),_=_.replace(/\{(\w+)\}/g,((e,t)=>{const r=b[t];if(void 0!==r)return encodeURIComponent(r);throw new n(`Path param manquant ou non résolu : {${t}}`,400)}))}if(m){let e=m;"none"===p&&null===this.userId&&(e=this._cleanSchemaLeftoverAlias(m));const r={...t};delete r.pathParams;const n=ur.stripNullsInPlace(r),i=this._ajv.compile(e);if(!i(n)){const e=i.errors?this._ajvErrorHuman(i.errors):[];throw this.emit("validationError",{stage:"request",errors:i.errors}),new o("Request validation failed.",400,e,i.errors)}t=this._resolveSpecialValuesInPlace(n,b)}"application/json"===y||"multipart/form-data"===y?w=t:"application/x-www-form-urlencoded"===y&&(w=ur.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${_}, method=${h}`);try{const e=await this._client.request({url:_,method:h,headers:g,["get"===h?"params":"data"]:w});if(s){const t=e.status.toString(),r=f?.[t];if(r){const n=this._ajv.compile(r);if(!n(e.data)){const e=this._ajvErrorHuman(n.errors);throw this.emit("validationError",{stage:"response",errors:n.errors}),new o("Response validation failed.",t,e,n.errors)}}}return this._resetCircuitBreakerSuccess(),"function"==typeof r?e.data=r(e.data):!0===r&&(e.data=this._transformData(e.data)),Array.isArray(a.postActions)&&a.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"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(t){throw this._updateCircuitBreakerError(),this._logger.error(`[ApiClient] Erreur lors de l'appel de ${e}: ${t.message}`),t instanceof o?t:new n(`Erreur lors de l'appel de l'API : ${t.message}`,t.response?t.response.status:500,t.response?t.response.data:null)}}_ajvErrorHuman(e){try{return new A(e).errors.map((({message:e})=>e))}catch(t){return this._logger.error("[ApiClient] _ajvErrorHuman",t),e.map((({message:e})=>e))}}checkAndThrowApiResponseError(e){const t=e.data;if(!t||"object"!=typeof t)return e;if("boolean"==typeof t.result&&!1===t.result)throw new s(t.msg||"Erreur inconnue",e.status,t);if(t.resultErrors&&"object"==typeof t.resultErrors&&"boolean"==typeof t.resultErrors.result&&!1===t.resultErrors.result)throw new s(t.resultErrors.msg||"Erreur inconnue",e.status,t);return e}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),this._tokenStorage.clear(),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:o=!1,metaTokens:i=!0}=r,s=[];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 l(e,t,r=!1){return e?e.concat(t).map(((e,t)=>(e=c(e),!r&&t?`[${e}]`:e))).join(r?".":""):t}function d(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,p=[]){null==r||s.includes(r)||(s.push(r),Object.entries(r).forEach((([r,s])=>{void 0!==s&&function(e,r,s){if(e&&"object"==typeof e){if(r.endsWith("{}"))return r=i?r:r.slice(0,-2),t.append(l(s,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=o?l(s.concat(r),i,n):`${l(s,r,n)}[]`;t.append(a,d(e))}})),!1}return!!a(e)||(t.append(l(s,r,n),d(e)),!1)}(s,r.trim(),p)&&e(s,p.concat(c(r)))})),s.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?or.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}`}_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}_startBeforeEndValidate=(e,t)=>{if(!t.startDate||!t.endDate)return!0;const r=new Date(t.startDate)<new Date(t.endDate);return r||(this._startBeforeEndValidate.errors=[{instancePath:"",schemaPath:"#/startBeforeEnd",keyword:"startBeforeEnd",params:{},message:"startDate must be before endDate"}]),r};getRequestSchema(e){const t=this._endpoints.find((t=>t.constant===e));return t?.request||null}getPathSchema(e){return this._endpoints.find((t=>t.constant===e))?.pathParams||null}}class mr{constructor(e){this.client=new ur(e),this.loggedUser=null}get isConnected(){return this.client.isConnected}get userId(){return this.client.userId}async login(e,t){return this.client.safeCall((async()=>{const r=await this.client.callEndpoint("AUTHENTICATE_URL",{email:e,password:t});return this.loggedUser=new b(this.client,r.data.user,{EndpointApi:c,Organization:w,Project:_,News:f}),this.loggedUser}))}async meIsconnected(){if(!this.client.isConnected||!this.client.userId)throw new r("User not connected",401);return this.client._logger.info("UserApi","meIsconnected",this.client.userId),this.loggedUser=new b(this.client,{id:this.client.userId},{EndpointApi:c,Organization:w,Project:_,News:f}),this.loggedUser}async register({name:e,username:t,email:r,pwd:n}={}){return this.client.safeCall((async()=>{const o=await this.client.callEndpoint("PERSON_REGISTER",{name:e,username:t,email:r,pwd:n});if(!1===o?.data?.result)throw new s(o.data.msg,o.status,o.data);return o.data}))}async recoverPassword(e){return this.client.safeCall((async()=>{const t=await this.client.callEndpoint("PASSWORD_RECOVERY",{email:e});if(!1===t?.data?.result)throw new s(t.data.msg,t.status,t.data);return t.data}))}}class fr{static async userLogin(e,t,r){const n=fr.userApi(r);return await fr.userApiLogin(n,e,t)}static userApi(e){try{return new mr(e)}catch(e){throw console.error("[Api.userApi] Erreur lors de la création d'un objet utilisateur :",e.message),e}}static async userApiLogin(e,t,o){try{if(!e)throw new r("userApi is not defined");if(!e.client)throw new r("userApi.client is not defined");if(e.client.isConnected){const t=await e.meIsconnected();return new fr(t,e.client)}{if(!t||!o)throw new r("email and password are required");const n=await e.login(t,o);return new fr(n,e.client)}}catch(e){if(e instanceof n&&e?.details?.error)throw new a(e.details.error,e.status,e.details);throw e}}constructor(e,t){this._loggedUser=e,this._client=t}async me(){if(!this._loggedUser)throw new a("Accès refusé : utilisateur non authentifié.");return await this._loggedUser.get(),this._loggedUser}async user(e){try{if(e.id||e.slug){const t=new b(this._client,e,{EndpointApi:c,Organization:w,Project:_,News:f});return await t.get(),t}return new b(this._client,e,{EndpointApi:c,Organization:w,Project:_,News:f})}catch(e){throw console.error("[Api.user] Erreur lors de la création d'un objet utilisateur public :",e.message),e}}async organization(e){try{const t=new w(this._client,e,{EndpointApi:c,User:b,Project:_,News:f});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Organization.");return await t.get(),t}catch(e){throw console.error("[Api.organization] Erreur lors de la création d'un objet organisation :",e.message),e}}async project(e){try{const t=new _(this._client,e,{User:b,News:f,EndpointApi:c});if(!e.id&&!e.slug)throw new Error("Vous devez fournir un id ou un slug pour créer une instance Project.");return await t.get(),t}catch(e){throw console.error("[Api.project] Erreur lors de la création d'un objet projet :",e.message),e}}get client(){return this._client}get endpointApi(){return new c(this._client)}logout(){this.loggedUser=null,this._client.resetSession(),this._client._logger.info("UserApi: User logged out")}}const hr={ApiClient:ur,Api:fr,error:e,tokenStorageStrategy:{createDefaultTokenStorageStrategy:async function(e="auto"){if("memory"===e)return new pr.GN;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new pr.Ge;throw new Error("localStorage is not available in this environment.")}if("file"===e){if("undefined"!=typeof window&&window.localStorage)throw new Error("file storage is not available in this environment.");const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}if("auto"===e){if("undefined"!=typeof window&&window.localStorage)return new pr.Ge;{const{FileStorageStrategy:e}=await __webpack_require__.e(405).then(__webpack_require__.bind(__webpack_require__,8405));return new e}}},TokenStorageStrategy:pr.u3}}})(),__webpack_exports__=__webpack_exports__.default,__webpack_exports__})()));
|