@communecter/cocolight-api-client 1.0.10 → 1.0.12

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.
@@ -2,7 +2,7 @@
2
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 e,t,r,n,o={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 u=d.filter((e=>!(0,i.alwaysValidSchema)(l,r[e])));if(0===u.length)return;const p=t.name("valid");for(const r of u)m(r)?f(r):(t.if((0,o.propertyInData)(t,c,r,l.opts.ownProperties)),f(r),l.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);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},p)}}};t.default=a},208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(396),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=p(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(p(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.L=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.M=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},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},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(o(e,r))return!1;for(const r of t.names)if(o(e,r))return!0;return!1},t.humanize=r(6585),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},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)}},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},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())}},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 v(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 _({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)),$(e,m),1===t.length&&t[0]===m.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):$(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)||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"))&&T(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}))&&T(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((()=>x(e,"$ref",h.all.$ref.definition)))}function $(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)&&x(e,r.keyword,r.definition,t.type)}))}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function T(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){w(e)&&(v(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&_(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,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)&&(v(e),g(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&_(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",u.default.errors);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 x(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 k=/^\/(?:[^~]|~0|~1)*$/,P=/^([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(!k.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=u.default.rootData}else{const s=P.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 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.L=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.M=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},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},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(o(e,r))return!1;for(const r of t.names)if(o(e,r))return!0;return!1},t.humanize=r(6585),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},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},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())}},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 v(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 _({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)),S(e,m),1===t.length&&t[0]===m.type&&r&&(o.else(),(0,s.reportTypeError)(e)),o.endIf()):S(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=>{$(e.dataTypes,t)||T(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)$(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"))&&T(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}))&&T(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((()=>k(e,"$ref",h.all.$ref.definition)))}function S(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)&&k(e,r.keyword,r.definition,t.type)}))}function $(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function T(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){w(e)&&(v(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;h(e,(()=>{r.$comment&&t.$comment&&_(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,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)&&(v(e),g(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&_(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",u.default.errors);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 k(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)*$/,P=/^([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=P.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},
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},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 v(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),v((()=>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),v((()=>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}')},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(_.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return g.lastIndex=0,g.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=v&&e>=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),v=2**31-1;function b(){return!0}const _=/[^\\]\\Z/},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var 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."},v={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,v,b,_,E,$,S,T,O,x;const k=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===P||void 0===P?1:P||0,C=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,j=null!==(o=e.uriResolver)&&void 0!==o?o:f.default;return{strictSchema:null===(s=null!==(i=e.strictSchema)&&void 0!==i?i:k)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:k)||void 0===c||c,strictTypes:null!==(d=null!==(l=e.strictTypes)&&void 0!==l?l:k)&&void 0!==d?d:"log",strictTuples:null!==(p=null!==(u=e.strictTuples)&&void 0!==u?u:k)&&void 0!==p?p:"log",strictRequired:null!==(y=null!==(m=e.strictRequired)&&void 0!==m?m:k)&&void 0!==y&&y,code:e.code?{...e.code,optimize:A,regExp:C}:{optimize:A,regExp:C},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(w=e.loopEnum)&&void 0!==w?w:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(_=e.inlineRefs)||void 0===_||_,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===($=e.addUsedSchema)||void 0===$||$,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(T=e.validateFormats)||void 0===T||T,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:j}}class _{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 k;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,v,e,"DEPRECATED","warn"),this._metaOpts=x.call(this),e.formats&&T.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=$.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=$.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=>C.call(this,e))),this;N.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=>C.call(this,e,n):e=>n.type.forEach((t=>C.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 $(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 T(){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 x(){const e={...this.opts};for(const t of y)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=s.default,t.default=_;const k={log(){},warn(){},error(){}},P=/^[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(!P.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 C(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?j.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 j(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 N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,I]}}},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},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},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=v),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:o[e]||o[l[e]||"log"]||v})),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,_,b,"error"),p(this,_,b,"fatal"),p(this,_,b,"warn"),p(this,_,b,"info"),p(this,_,b,"debug"),p(this,_,b,"trace"),h.forEach((e=>{p(this,_,b,e)}))}});const _={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||v};function 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=v,b.serializers=n,b._serialize=i,b._stdErrSerialize=c,b.child=function(...e){return E.call(this,_,...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)?v:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===v){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:_}function g(){return{}}function w(e){return e}function v(){}function b(){return!1}function _(){return Date.now()}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=i,u.stdTimeFunctions=Object.assign({},{nullTime:b,epochTime:_,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=u,e.exports.pino=u},4914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),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},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}()},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}},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},6585:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,i=7*o;function s(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,a){a=a||{};var c,l,d=typeof e;if("string"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===d&&isFinite(e))return a.long?(c=e,(l=Math.abs(c))>=o?s(c,l,o,"day"):l>=n?s(c,l,n,"hour"):l>=r?s(c,l,r,"minute"):l>=t?s(c,l,t,"second"):c+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},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},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={}))},7833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},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},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},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},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=C(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=C(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=C(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)||(j(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(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 v extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new w(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(N(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return A(e,this.condition),this.else&&P(e,this.else.names),e}}v.kind="if";class b extends y{}b.kind="for";class _ 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=C(this.iteration,e,t),this}get names(){return P(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 $ 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=C(this.iterable,e,t),this}get names(){return P(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 T extends h{render(e){return"return "+super.render(e)}}T.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&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class x extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}x.kind="catch";class k extends y{render(e){return"finally"+super.render(e)}}function P(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?P(e,t.names):e}function C(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 j(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${z(e)}`}k.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 v(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(v,w)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new _(e),t)}forRange(e,t,r,n,i=(this.opts.es5?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 $("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 $("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 T;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}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 x(e),t(e)}return r&&(this._currNode=n.finally=new k,this.code(r)),this._endBlockNode(x,k)}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 v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=N;const I=R(t.operators.AND);t.and=function(...e){return e.reduce(I)};const D=R(t.operators.OR);function R(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${z(t)} ${e} ${z(r)}`}function z(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"]}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,s),r.exports}s.m=o,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);s.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>i[e]=()=>r[e]));return i.default=()=>r,s.d(o,i),o},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>e+".cocolight-api-client.browser.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="CocolightApiClient:",s.l=(e,t,o,i)=>{if(r[e])r[e].push(t);else{var a,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+o){a=u;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",n+o),a.src=e),r[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(m);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.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(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={792:0};s.f.j=(t,r)=>{var n=s.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=s.p+s.u(t),a=new Error;s.l(i,(r=>{if(s.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;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[i,a,c]=r,l=0;if(i.some((t=>0!==e[t]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);c&&c(s)}for(t&&t(r);l<i.length;l++)o=i[l],s.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 a={};return(()=>{"use strict";s.d(a,{default:()=>jn});var e={};s.r(e),s.d(e,{ApiAuthenticationError:()=>l,ApiClientError:()=>n,ApiError:()=>r,ApiResponseError:()=>c,ApiValidationError:()=>o,CircuitBreakerError:()=>i});var t={};s.r(t),s.d(t,{hasBrowserEnv:()=>er,hasStandardBrowserEnv:()=>rr,hasStandardBrowserWebWorkerEnv:()=>nr,navigator:()=>tr,origin:()=>or});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 c extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiResponseError",this.status=t,this.responseData=r,this.details=n}}class l extends r{constructor(e,t,r){super(e,t,r),this.name="ApiAuthenticationError"}}const d=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 l("Vous ne devez pas être connecté pour faire cette action.");return this.call(e,t)}async callIsConnected(e,t={}){if(!this.isConnected)throw new l("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)}},u={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 p=s(2808);function m(e){return new DataView(e.buffer,e.byteOffset)}s(251);const f={len:1,get:(e,t)=>m(e).getUint8(t),put:(e,t,r)=>(m(e).setUint8(t,r),t+1)},h={len:2,get:(e,t)=>m(e).getUint16(t,!0),put:(e,t,r)=>(m(e).setUint16(t,r,!0),t+2)},y={len:2,get:(e,t)=>m(e).getUint16(t),put:(e,t,r)=>(m(e).setUint16(t,r),t+2)},g={len:4,get:(e,t)=>m(e).getUint32(t,!0),put:(e,t,r)=>(m(e).setUint32(t,r,!0),t+4)},w={len:4,get:(e,t)=>m(e).getUint32(t),put:(e,t,r)=>(m(e).setUint32(t,r),t+4)},v={len:4,get:(e,t)=>m(e).getInt32(t),put:(e,t,r)=>(m(e).setInt32(t,r),t+4)},b={len:8,get:(e,t)=>m(e).getBigUint64(t,!0),put:(e,t,r)=>(m(e).setBigUint64(t,r,!0),t+8)};class _{constructor(e,t){this.len=e,this.encoding=t,this.textDecoder=new TextDecoder(t)}get(e,t){return this.textDecoder.decode(e.subarray(t,t+this.len))}}class E extends Error{constructor(){super("End-Of-Stream"),this.name="EndOfStreamError"}}class $ extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}}class S{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){const r=await this.read(e,t);return this.peekQueue.push(e.subarray(0,r)),r}async read(e,t=!1){if(0===e.length)return 0;let r=this.readFromPeekBuffer(e);if(this.endOfStream||(r+=await this.readRemainderFromStream(e.subarray(r),t)),0===r)throw new E;return r}readFromPeekBuffer(e){let t=e.length,r=0;for(;this.peekQueue.length>0&&t>0;){const n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");const o=Math.min(n.length,t);e.set(n.subarray(0,o),r),r+=o,t-=o,o<n.length&&this.peekQueue.push(n.subarray(o))}return r}async readRemainderFromStream(e,t){let r=0;for(;r<e.length&&!this.endOfStream;){if(this.interrupted)throw new $;const n=await this.readFromStream(e.subarray(r),t);if(0===n)break;r+=n}if(!t&&r<e.length)throw new E;return r}}class T extends S{constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}}class O extends T{async readFromStream(e,t){if(0===e.length)return 0;const r=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value),r.value.length):0}}class x extends S{constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){const r=Math.min(t.length,e.length);return e.set(t.subarray(0,r)),r<t.length?this.buffer=t.subarray(r):this.buffer=null,r}async readFromStream(e,t){if(0===e.length)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(e,this.buffer));r<e.length&&!this.endOfStream;){const t=await this.reader.read();if(t.done){this.endOfStream=!0;break}t.value&&(r+=this.writeChunk(e.subarray(r),t.value))}if(0===r&&this.endOfStream)throw new E;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}class k{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",(()=>{this.abort()}))}async readToken(e,t=this.position){const r=new Uint8Array(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new E;return e.get(r,0)}async peekToken(e,t=this.position){const r=new Uint8Array(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new E;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new E;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new E;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(){await this.abort(),await(this.onClose?.())}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e.length,position:this.position,...t}}abort(){return Promise.resolve()}}class P extends k{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.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 o=await this.streamReader.read(e.subarray(0,r.length),r.mayBeLess);if(this.position+=o,(!t||!t.mayBeLess)&&o<r.length)throw new E;return o}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)),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.subarray(0,r.length),r.mayBeLess)}catch(e){if(t?.mayBeLess&&e instanceof E)return 0;throw e}if(!r.mayBeLess&&n<r.length)throw new E}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}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}}class A extends k{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){t?.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),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new E;return e.set(this.uint8Array.subarray(r.position,r.position+n)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}}var C=Uint8Array,j=Uint16Array,N=Int32Array,I=new C([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),D=new C([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),R=new C([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),z=function(e,t){for(var r=new j(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var o=new N(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return{b:r,r:o}},L=z(I,2),M=L.b,F=L.r;M[28]=258,F[258]=28;for(var U=z(D,0),q=U.b,B=(U.r,new j(32768)),V=0;V<32768;++V){var G=(43690&V)>>1|(21845&V)<<1;G=(61680&(G=(52428&G)>>2|(13107&G)<<2))>>4|(3855&G)<<4,B[V]=((65280&G)>>8|(255&G)<<8)>>1}var K=function(e,t,r){for(var n=e.length,o=0,i=new j(t);o<n;++o)e[o]&&++i[e[o]-1];var s,a=new j(t);for(o=1;o<t;++o)a[o]=a[o-1]+i[o-1]<<1;if(r){s=new j(1<<t);var c=15-t;for(o=0;o<n;++o)if(e[o])for(var l=o<<4|e[o],d=t-e[o],u=a[e[o]-1]++<<d,p=u|(1<<d)-1;u<=p;++u)s[B[u]>>c]=l}else for(s=new j(n),o=0;o<n;++o)e[o]&&(s[o]=B[a[e[o]-1]++]>>15-e[o]);return s},J=new C(288);for(V=0;V<144;++V)J[V]=8;for(V=144;V<256;++V)J[V]=9;for(V=256;V<280;++V)J[V]=7;for(V=280;V<288;++V)J[V]=8;var H=new C(32);for(V=0;V<32;++V)H[V]=5;var Z=K(J,9,1),W=K(H,5,1),Y=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},X=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&r},Q=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},ee=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],te=function(e,t,r){var n=new Error(t||ee[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,te),!r)throw n;return n},re=function(e,t,r,n){var o=e.length,i=n?n.length:0;if(!o||t.f&&!t.l)return r||new C(0);var s=!r,a=s||2!=t.i,c=t.i;s&&(r=new C(3*o));var l,d=function(e){var t=r.length;if(e>t){var n=new C(Math.max(2*t,e));n.set(r),r=n}},u=t.f||0,p=t.p||0,m=t.b||0,f=t.l,h=t.d,y=t.m,g=t.n,w=8*o;do{if(!f){u=X(e,p,1);var v=X(e,p+1,3);if(p+=3,!v){var b=e[(l=p,(j=4+((l+7)/8|0))-4)]|e[j-3]<<8,_=j+b;if(_>o){c&&te(0);break}a&&d(m+b),r.set(e.subarray(j,_),m),t.b=m+=b,t.p=p=8*_,t.f=u;continue}if(1==v)f=Z,h=W,y=9,g=5;else if(2==v){var E=X(e,p,31)+257,$=X(e,p+10,15)+4,S=E+X(e,p+5,31)+1;p+=14;for(var T=new C(S),O=new C(19),x=0;x<$;++x)O[R[x]]=X(e,p+3*x,7);p+=3*$;var k=Y(O),P=(1<<k)-1,A=K(O,k,1);for(x=0;x<S;){var j,N=A[X(e,p,P)];if(p+=15&N,(j=N>>4)<16)T[x++]=j;else{var z=0,L=0;for(16==j?(L=3+X(e,p,3),p+=2,z=T[x-1]):17==j?(L=3+X(e,p,7),p+=3):18==j&&(L=11+X(e,p,127),p+=7);L--;)T[x++]=z}}var F=T.subarray(0,E),U=T.subarray(E);y=Y(F),g=Y(U),f=K(F,y,1),h=K(U,g,1)}else te(1);if(p>w){c&&te(0);break}}a&&d(m+131072);for(var B=(1<<y)-1,V=(1<<g)-1,G=p;;G=p){var J=(z=f[Q(e,p)&B])>>4;if((p+=15&z)>w){c&&te(0);break}if(z||te(2),J<256)r[m++]=J;else{if(256==J){G=p,f=null;break}var H=J-254;if(J>264){var ee=I[x=J-257];H=X(e,p,(1<<ee)-1)+M[x],p+=ee}var re=h[Q(e,p)&V],ne=re>>4;if(re||te(3),p+=15&re,U=q[ne],ne>3&&(ee=D[ne],U+=Q(e,p)&(1<<ee)-1,p+=ee),p>w){c&&te(0);break}a&&d(m+131072);var oe=m+H;if(m<U){var ie=i-U,se=Math.min(U,oe);for(ie+m<0&&te(3);m<se;++m)r[m]=n[ie+m]}for(;m<oe;++m)r[m]=r[m-U]}}t.l=f,t.p=G,t.b=m,t.f=u,f&&(u=1,t.m=y,t.d=h,t.n=g)}while(!u);return m!=r.length&&s?function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new C(e.subarray(t,r))}(r,0,m):r.subarray(0,m)},ne=new C(0);function oe(e,t){var r,n,o=function(e){31==e[0]&&139==e[1]&&8==e[2]||te(6,"invalid gzip data");var t=e[3],r=10;4&t&&(r+=2+(e[10]|e[11]<<8));for(var n=(t>>3&1)+(t>>4&1);n>0;n-=!e[r++]);return r+(2&t)}(e);return o+8>e.length&&te(6,"invalid gzip data"),re(e.subarray(o,-8),{i:2},t&&t.out||new C((n=(r=e).length,(r[n-4]|r[n-3]<<8|r[n-2]<<16|r[n-1]<<24)>>>0)),t&&t.dictionary)}function ie(e,t){return re(e.subarray((r=e,n=t&&t.dictionary,(8!=(15&r[0])||r[0]>>4>7||(r[0]<<8|r[1])%31)&&te(6,"invalid zlib data"),(r[1]>>5&1)==+!n&&te(6,"invalid zlib data: "+(32&r[1]?"need":"unexpected")+" dictionary"),2+(r[1]>>3&4)),-4),{i:2},t&&t.out,t&&t.dictionary);var r,n}var se="undefined"!=typeof TextDecoder&&new TextDecoder;try{se.decode(ne,{stream:!0})}catch(e){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var ae=s(7833);const ce=67324752,le=33639248,de={get:e=>(h.get(e,6),{signature:g.get(e,0),compressedSize:g.get(e,8),uncompressedSize:g.get(e,12)}),len:16},ue={get(e){const t=h.get(e,6);return{signature:g.get(e,0),minVersion:h.get(e,4),dataDescriptor:!!(8&t),compressedMethod:h.get(e,8),compressedSize:g.get(e,18),uncompressedSize:g.get(e,22),filenameLength:h.get(e,26),extraFieldLength:h.get(e,28),filename:null}},len:30},pe={get:e=>({signature:g.get(e,0),nrOfThisDisk:h.get(e,4),nrOfThisDiskWithTheStart:h.get(e,6),nrOfEntriesOnThisDisk:h.get(e,8),nrOfEntriesOfSize:h.get(e,10),sizeOfCd:g.get(e,12),offsetOfStartOfCd:g.get(e,16),zipFileCommentLength:h.get(e,20)}),len:22},me={get(e){const t=h.get(e,8);return{signature:g.get(e,0),minVersion:h.get(e,6),dataDescriptor:!!(8&t),compressedMethod:h.get(e,10),compressedSize:g.get(e,20),uncompressedSize:g.get(e,24),filenameLength:h.get(e,28),extraFieldLength:h.get(e,30),fileCommentLength:h.get(e,32),relativeOffsetOfLocalHeader:g.get(e,42),filename:null}},len:46};function fe(e){const t=new Uint8Array(g.len);return g.put(t,0,e),t}const he=ae("tokenizer:inflate"),ye=262144,ge=fe(134695760),we=fe(101010256);class ve{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(ye)}async isZip(){return await this.peekSignature()===ce}peekSignature(){return this.tokenizer.peekToken(g)}async findEndOfCentralDirectoryLocator(){const e=this.tokenizer,t=Math.min(16384,e.fileInfo.size),r=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(r,{position:e.fileInfo.size-t});for(let n=r.length-4;n>=0;n--)if(r[n]===we[0]&&r[n+1]===we[1]&&r[n+2]===we[2]&&r[n+3]===we[3])return e.fileInfo.size-t+n;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess())return void he("Cannot reading central-directory without random-read support");he("Reading central-directory...");const e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){he("Central-directory 32-bit signature found");const r=await this.tokenizer.readToken(pe,t),n=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let e=0;e<r.nrOfEntriesOfSize;++e){const t=await this.tokenizer.readToken(me);if(t.signature!==le)throw new Error("Expected Central-File-Header signature");t.filename=await this.tokenizer.readToken(new _(t.filenameLength,"utf-8")),await this.tokenizer.ignore(t.extraFieldLength),await this.tokenizer.ignore(t.fileCommentLength),n.push(t),he(`Add central-directory file-entry: n=${e+1}/${n.length}: filename=${n[e].filename}`)}return this.tokenizer.setPosition(e),n}this.tokenizer.setPosition(e)}async unzip(e){const t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let r=!1;do{const t=await this.readLocalFileHeader();if(!t)break;const n=e(t);let o;if(r=!!n.stop,await this.tokenizer.ignore(t.extraFieldLength),t.dataDescriptor&&0===t.compressedSize){const e=[];let r=ye;he("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let o=-1;for(;o<0&&r===ye;){r=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),o=be(this.syncBuffer.subarray(0,r),ge);const t=o>=0?o:r;if(n.handler){const r=new Uint8Array(t);await this.tokenizer.readBuffer(r),e.push(r)}else await this.tokenizer.ignore(t)}he(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),n.handler&&await this.inflate(t,_e(e),n.handler)}else n.handler?(he(`Reading compressed-file-data: ${t.compressedSize} bytes`),o=new Uint8Array(t.compressedSize),await this.tokenizer.readBuffer(o),await this.inflate(t,o,n.handler)):(he(`Ignoring compressed-file-data: ${t.compressedSize} bytes`),await this.tokenizer.ignore(t.compressedSize));if(he(`Reading data-descriptor at pos=${this.tokenizer.position}`),t.dataDescriptor&&134695760!==(await this.tokenizer.readToken(de)).signature)throw new Error("Expected data-descriptor-signature at position "+(this.tokenizer.position-de.len))}while(!r)}async iterateOverCentralDirectory(e,t){for(const r of e){const e=t(r);if(e.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);const t=await this.readLocalFileHeader();if(t){await this.tokenizer.ignore(t.extraFieldLength);const n=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(n),await this.inflate(t,n,e.handler)}}if(e.stop)break}}inflate(e,t,r){return 0===e.compressedMethod?r(t):(he(`Decompress filename=${e.filename}, compressed-size=${t.length}`),r(31==(n=t)[0]&&139==n[1]&&8==n[2]?oe(n,o):8!=(15&n[0])||n[0]>>4>7||(n[0]<<8|n[1])%31?function(e,t){return re(e,{i:2},t&&t.out,t&&t.dictionary)}(n,o):ie(n,o)));var n,o}async readLocalFileHeader(){const e=await this.tokenizer.peekToken(g);if(e===ce){const e=await this.tokenizer.readToken(ue);return e.filename=await this.tokenizer.readToken(new _(e.filenameLength,"utf-8")),e}if(e===le)return!1;if(3759263696===e)throw new Error("Encrypted ZIP");throw new Error("Unexpected signature")}}function be(e,t){const r=e.length,n=t.length;if(n>r)return-1;for(let o=0;o<=r-n;o++){let r=!0;for(let i=0;i<n;i++)if(e[o+i]!==t[i]){r=!1;break}if(r)return o}return-1}function _e(e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}function Ee(e){const{byteLength:t}=e;return 6===t?e.getUint16(0)*2**32+e.getUint32(2):5===t?e.getUint8(0)*2**32+e.getUint32(1):4===t?e.getUint32(0):3===t?65536*e.getUint8(0)+e.getUint16(1):2===t?e.getUint16(0):1===t?e.getUint8(0):void 0}Object.prototype.toString,new globalThis.TextDecoder("utf8"),new globalThis.TextEncoder,Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const $e={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},Se=4100;async function Te(e){return(new ke).fromBuffer(e)}function Oe(e){switch(e){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.text-template":return{ext:"ott",mime:"application/vnd.oasis.opendocument.text-template"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:"application/vnd.oasis.opendocument.spreadsheet-template"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:"application/vnd.oasis.opendocument.presentation-template"};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:"application/vnd.oasis.opendocument.graphics"};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:"application/vnd.oasis.opendocument.graphics-template"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};case"application/vnd.ms-excel.sheet.macroEnabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.template"};case"application/vnd.ms-excel.template.macroEnabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"application/vnd.ms-word.document.macroEnabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.template"};case"application/vnd.ms-word.template.macroEnabledTemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:"application/vnd.openxmlformats-officedocument.presentationml.template"};case"application/vnd.ms-powerpoint.template.macroEnabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"application/vnd.ms-powerpoint.presentation.macroEnabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroEnabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"}}}function xe(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}class ke{constructor(e){this.detectors=[...e?.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:e?.signal}}async fromTokenizer(e){const t=e.position;for(const r of this.detectors){const n=await r.detect(e);if(n)return n;if(t!==e.position)return}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Uint8Array?e:new Uint8Array(e);var r,n;if(t?.length>1)return this.fromTokenizer((r=t,n=this.tokenizerOptions,new A(r,n)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await function(e,t){const r=function(e){try{const t=e.getReader({mode:"byob"});return t instanceof ReadableStreamDefaultReader?new x(t):new O(t)}catch(t){if(t instanceof TypeError)return new x(e.getReader());throw t}}(e),n=t??{},o=n.onClose;return n.onClose=async()=>{if(await r.close(),o)return o()},new P(r,n)}(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:r=Se}=t;let n,o;const i=e.getReader({mode:"byob"});try{const{value:e,done:t}=await i.read(new Uint8Array(r));if(o=e,!t&&e)try{n=await this.fromBuffer(e.slice(0,r))}catch(e){if(!(e instanceof E))throw e;n=void 0}o=e}finally{i.releaseLock()}const s=new TransformStream({async start(e){e.enqueue(o)},transform(e,t){t.enqueue(e)}}),a=e.pipeThrough(s);return a.fileType=n,a}check(e,t){return xe(this.buffer,e,t)}checkString(e,t){return this.check((r=e,[...r].map((e=>e.charCodeAt(0)))),t);var r}detectConfident=async e=>{if(this.buffer=new Uint8Array(Se),void 0===e.fileInfo.size&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:12,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.detectConfident(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);const t=await e.readToken($e);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===this.buffer[0]||70===this.buffer[0])&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let r;return await new ve(e).unzip((e=>{switch(e.filename){case"META-INF/mozilla.rsa":return r={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return r={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return{async handler(e){const t=new TextDecoder("utf-8").decode(e).trim();r=Oe(t)},stop:!0};case"[Content_Types].xml":return{async handler(e){let t=new TextDecoder("utf-8").decode(e);const n=t.indexOf('.main+xml"');if(-1===n){const e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";t.includes(`ContentType="${e}"`)&&(r=Oe(e))}else{t=t.slice(0,Math.max(0,n));const e=t.lastIndexOf('"'),o=t.slice(Math.max(0,e+1));r=Oe(o)}},stop:!0};default:return/classes\d*\.dex/.test(e.filename)?(r={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})),r??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);const n=new Uint8Array(8);return await e.readBuffer(n),xe(n,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:xe(n,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:xe(n,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:xe(n,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:xe(n,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:xe(n,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF")){try{const o=1350;if(o===await e.ignore(o)){const i=10485760,s=new Uint8Array(Math.min(i,e.fileInfo.size-o));if(await e.readBuffer(s,{mayBeLess:!0}),-1!==function(e,t){const r=e.length,n=t.length;if(0===n)return-1;if(n>r)return-1;const o=r-n;for(let r=0;r<=o;r++){let o=!0;for(let i=0;i<n;i++)if(e[r+i]!==t[i]){o=!1;break}if(o)return r}return-1}(s,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}}catch(a){if(!(a instanceof E))throw a}return{ext:"pdf",mime:"application/pdf"}}if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){const c=await this.readTiffHeader(!1);if(c)return c}if(this.check([77,77])){const l=await this.readTiffHeader(!0);if(l)return l}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function d(){const t=await e.peekNumber(f);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const o=new Uint8Array(n+1);return await e.readBuffer(o),o}async function u(){const e=await d(),t=await d();t[0]^=128>>t.length-1;const r=Math.min(6,t.length),n=new DataView(e.buffer),o=new DataView(t.buffer,t.length-r,r);return{id:Ee(n),len:Ee(o)}}async function p(t){for(;t>0;){const r=await u();if(17026===r.id)return(await e.readToken(new _(r.len))).replaceAll(/\00.*$/g,"");await e.ignore(r.len),--t}}const m=await u();switch(await p(m.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1"))return{ext:"parquet",mime:"application/x-parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(0===this.buffer[6]||1===this.buffer[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){const h=new _(4,"latin1").get(this.buffer,2);if(h.match("^d*")&&h>=1e3&&h<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new _(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&["\n","\r","\t"," ","\0"].some((e=>this.checkString(e,{offset:6}))))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){async function y(){return{length:await e.readToken(v),type:await e.readToken(new _(4,"latin1"))}}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(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&96&this.buffer[8]){const w=new _(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(w){case"avif":case"avis":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 w.startsWith("3g")?w.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function $(){const t=new Uint8Array(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(b))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const S=await $();let T=S.size-24;if(xe(S.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const O=new Uint8Array(16);if(T-=await e.readBuffer(O),xe(O,[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(xe(O,[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(T)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new _(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(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.check([0,60,0,63,0,120,0,109,0,108],{offset:2})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){const x=new DataView(this.buffer.buffer).getUint32(12,!0);if(x>12&&this.buffer.length>=x+16)try{const k=(new TextDecoder).decode(this.buffer.slice(16,x+16));if(JSON.parse(k).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}return this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:this.checkString("SCRM",{offset:44})?{ext:"s3m",mime:"audio/x-s3m"}:this.check([71])&&this.check([71],{offset:188})||this.check([71],{offset:4})&&this.check([71],{offset:196})?{ext:"mts",mime:"video/mp2t"}:this.check([66,79,79,75,77,79,66,73],{offset:60})?{ext:"mobi",mime:"application/x-mobipocket-ebook"}:this.check([68,73,67,77],{offset:128})?{ext:"dcm",mime:"application/dicom"}:this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70])?{ext:"lnk",mime:"application/x.ms.shortcut"}:this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0])?{ext:"alias",mime:"application/x.apple.alias"}:this.checkString("Kaydara FBX Binary \0")?{ext:"fbx",mime:"application/x.autodesk.fbx"}:this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8}))?{ext:"eot",mime:"application/vnd.ms-fontobject"}:this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29])?{ext:"indd",mime:"application/x-indesign"}:(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),function(e,t=0){const r=Number.parseInt(new _(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.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}(this.buffer)?{ext:"tar",mime:"application/x-tar"}:this.check([255,254])?this.check([60,0,63,0,120,0,109,0,108,0],{offset:2})?{ext:"xml",mime:"application/xml"}:this.check([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],{offset:2})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:void 0:this.checkString("-----BEGIN PGP MESSAGE-----")?{ext:"pgp",mime:"application/pgp-encrypted"}:void 0)};detectImprecise=async e=>{if(this.buffer=new Uint8Array(Se),await e.peekBuffer(this.buffer,{length:Math.min(8,e.fileInfo.size),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(this.buffer.length>=2&&this.check([255,224],{offset:0,mask:[255,224]})){if(this.check([16],{offset:1,mask:[22]}))return this.check([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}};async readTiffTag(e){const t=await this.tokenizer.readToken(e?y:h);switch(this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"}}}async readTiffIFD(e){const t=await this.tokenizer.readToken(e?y:h);for(let r=0;r<t;++r){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?y:h).get(this.buffer,2),r=(e?w:g).get(this.buffer,4);if(42===t){if(r>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r>=8){const t=(e?y:h).get(this.buffer,8),r=(e?y:h).get(this.buffer,10);if(28===t&&254===r||31===t&&11===r)return{ext:"nef",mime:"image/x-nikon-nef"}}}return await this.tokenizer.ignore(r),await this.readTiffIFD(e)??{ext:"tif",mime:"image/tiff"}}if(43===t)return{ext:"tif",mime:"image/tiff"}}}new Set(["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","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","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","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","rm"]),new Set(["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/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","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/j2c","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","text/vtt","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","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/x-parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-word.document.macroEnabled.12","application/vnd.ms-word.template.macroEnabled.12","application/vnd.ms-powerpoint.template.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/java-archive","application/vnd.rn-realmedia"]);const Pe={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 l("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 l("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 l("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 Te(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),u=await Te(d);if(i=u?.mime,!u||!t.includes(i))throw new o("Le type du fichier est invalide.");a.path=`${Date.now()}.${u.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 s.e(931).then(s.bind(s,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 s.e(931).then(s.bind(s,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 p).toString()};class Ae{#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:Ae.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:Ae.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 Ae.entityType}static fromServerData(e,t,r){const n=new Ae(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:Ae.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(Ae.prototype,Pe,u);const Ce={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 c)throw new c("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)))}},je={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 c(`Le slug ${this.slug} ne correspond pas à un ${e}`,200,t);this._id(t.contextId)}catch(t){throw t instanceof c?t?.responseData?.contextType!==e?t:new c(`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()}})}},Ne={async getNews(e={}){e.pathParams={type:this.getEntityType(),id:this.id};const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new c("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 Ie{#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:Ie.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:Ie.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 Ie.entityType}static fromServerData(e,t,r){const n=new Ie(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:Ie.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 Ie.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 Ie.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(Ie.prototype,Pe,je,Ce,Ne,u);class De{#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:De.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 De.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:De.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 De.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 De.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 De(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:De.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 De(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(De.prototype,Pe,je,Ce,Ne,u);class Re{#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:Re.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:Re.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 Re.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 Re.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 c)throw new c("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 c("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:Re,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:Re,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 c("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:Re,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:Re,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 c("Erreur lors de la récupération des actualités.",500,t);const r=t.map((e=>this.deps.News.fromServerData(e,this,{User:Re,EndpointApi:this.deps.EndpointApi})));return this._createFilteredProxy(r)}async news(e={}){try{const t=new this.deps.News(this,e,{User:Re,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(Re.prototype,je,Pe,{},u);var ze=s(7007);const Le=(e,t)=>1===t?e:`${e}s`,Me=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},Fe=e=>{switch(e[0]){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}},Ue=(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]}`,qe={"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"},Be={fieldLabels:"title",includeOriginalError:!1,includeData:!1};class Ve extends Error{constructor(e,t={}){super(),this.options={},this.redundant=!1,this.options={...Be,...t},this.pointer=e.instancePath,this.path=Me(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 ${Me(e).replace(/^\$/,"")}`;case"jsonPath":return`the value at ${Me(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: ${Ue(e,"or")}`}case"type":{const t=Array.isArray(n.type)?n.type:n.type.split(","),r=Ue(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`${Fe(t)} ${t}`}})(e);return`${c} must be ${Fe(r)} ${r} but it was ${o}`}case"minLength":{const t=n.limit,r=Le("character",t),o=e.length;return`${c} must be ${t} ${r} or more but it was ${o} ${Le("character",o)}`}case"maxLength":{const t=n.limit,r=Le("character",t),o=e.length;return`${c} must be ${t} ${r} or fewer but it was ${o} ${Le("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 ${qe[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 Ge extends Error{constructor(e,t={}){super(),this.name="AggregateAjvError",this.errors=(null!=e?e:[]).map((e=>new Ve(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 Ke=s(3282),Je=s(8182);function He(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ze}=Object.prototype,{getPrototypeOf:We}=Object,Ye=(Xe=Object.create(null),e=>{const t=Ze.call(e);return Xe[t]||(Xe[t]=t.slice(8,-1).toLowerCase())});var Xe;const Qe=e=>(e=e.toLowerCase(),t=>Ye(t)===e),et=e=>t=>typeof t===e,{isArray:tt}=Array,rt=et("undefined"),nt=Qe("ArrayBuffer"),ot=et("string"),it=et("function"),st=et("number"),at=e=>null!==e&&"object"==typeof e,ct=e=>{if("object"!==Ye(e))return!1;const t=We(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},lt=Qe("Date"),dt=Qe("File"),ut=Qe("Blob"),pt=Qe("FileList"),mt=Qe("URLSearchParams"),[ft,ht,yt,gt]=["ReadableStream","Request","Response","Headers"].map(Qe);function wt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),tt(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 vt(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 bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,_t=e=>!rt(e)&&e!==bt,Et=($t="undefined"!=typeof Uint8Array&&We(Uint8Array),e=>$t&&e instanceof $t);var $t;const St=Qe("HTMLFormElement"),Tt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ot=Qe("RegExp"),xt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};wt(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},kt=Qe("AsyncFunction"),Pt=(At="function"==typeof setImmediate,Ct=it(bt.postMessage),At?setImmediate:Ct?(jt=`axios@${Math.random()}`,Nt=[],bt.addEventListener("message",(({source:e,data:t})=>{e===bt&&t===jt&&Nt.length&&Nt.shift()()}),!1),e=>{Nt.push(e),bt.postMessage(jt,"*")}):e=>setTimeout(e));var At,Ct,jt,Nt;const It="undefined"!=typeof queueMicrotask?queueMicrotask.bind(bt):"undefined"!=typeof process&&process.nextTick||Pt,Dt={isArray:tt,isArrayBuffer:nt,isBuffer:function(e){return null!==e&&!rt(e)&&null!==e.constructor&&!rt(e.constructor)&&it(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||it(e.append)&&("formdata"===(t=Ye(e))||"object"===t&&it(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&nt(e.buffer),t},isString:ot,isNumber:st,isBoolean:e=>!0===e||!1===e,isObject:at,isPlainObject:ct,isReadableStream:ft,isRequest:ht,isResponse:yt,isHeaders:gt,isUndefined:rt,isDate:lt,isFile:dt,isBlob:ut,isRegExp:Ot,isFunction:it,isStream:e=>at(e)&&it(e.pipe),isURLSearchParams:mt,isTypedArray:Et,isFileList:pt,forEach:wt,merge:function e(){const{caseless:t}=_t(this)&&this||{},r={},n=(n,o)=>{const i=t&&vt(r,o)||o;ct(r[i])&&ct(n)?r[i]=e(r[i],n):ct(n)?r[i]=e({},n):tt(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&wt(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(wt(t,((t,n)=>{r&&it(t)?e[n]=He(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&&We(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Ye,kindOfTest:Qe,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(tt(e))return e;let t=e.length;if(!st(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:St,hasOwnProperty:Tt,hasOwnProp:Tt,reduceDescriptors:xt,freezeMethods:e=>{xt(e,((t,r)=>{if(it(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];it(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 tt(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:vt,global:bt,isContextDefined:_t,isSpecCompliantForm:function(e){return!!(e&&it(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(at(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=tt(e)?[]:{};return wt(e,((e,t)=>{const i=r(e,n+1);!rt(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:kt,isThenable:e=>e&&(at(e)||it(e))&&it(e.then)&&it(e.catch),setImmediate:Pt,asap:It};function Rt(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)}Dt.inherits(Rt,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:Dt.toJSONObject(this.config),code:this.code,status:this.status}}});const zt=Rt.prototype,Lt={};["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=>{Lt[e]={value:e}})),Object.defineProperties(Rt,Lt),Object.defineProperty(zt,"isAxiosError",{value:!0}),Rt.from=(e,t,r,n,o,i)=>{const s=Object.create(zt);return Dt.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Rt.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Mt=Rt;function Ft(e){return Dt.isPlainObject(e)||Dt.isArray(e)}function Ut(e){return Dt.endsWith(e,"[]")?e.slice(0,-2):e}function qt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ut(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Bt=Dt.toFlatObject(Dt,{},null,(function(e){return/^is[A-Z]/.test(e)})),Vt=function(e,t,r){if(!Dt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Dt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Dt.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Dt.isSpecCompliantForm(t);if(!Dt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Dt.isDate(e))return e.toISOString();if(!a&&Dt.isBlob(e))throw new Mt("Blob is not supported. Use a Buffer instead.");return Dt.isArrayBuffer(e)||Dt.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(Dt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Dt.isArray(e)&&function(e){return Dt.isArray(e)&&!e.some(Ft)}(e)||(Dt.isFileList(e)||Dt.endsWith(r,"[]"))&&(a=Dt.toArray(e)))return r=Ut(r),a.forEach((function(e,n){!Dt.isUndefined(e)&&null!==e&&t.append(!0===s?qt([r],n,i):null===s?r:r+"[]",c(e))})),!1;return!!Ft(e)||(t.append(qt(o,r,i),c(e)),!1)}const d=[],u=Object.assign(Bt,{defaultVisitor:l,convertValue:c,isVisitable:Ft});if(!Dt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Dt.isUndefined(r)){if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),Dt.forEach(r,(function(r,i){!0===(!(Dt.isUndefined(r)||null===r)&&o.call(t,r,Dt.isString(i)?i.trim():i,n,u))&&e(r,n?n.concat(i):[i])})),d.pop()}}(e),t};function Gt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Kt(e,t){this._pairs=[],e&&Vt(e,this,t)}const Jt=Kt.prototype;Jt.append=function(e,t){this._pairs.push([e,t])},Jt.toString=function(e){const t=e?function(t){return e.call(this,t,Gt)}:Gt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ht=Kt;function Zt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wt(e,t,r){if(!t)return e;const n=r&&r.encode||Zt;Dt.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Dt.isURLSearchParams(t)?t.toString():new Ht(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Yt=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){Dt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Xt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ht,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},er="undefined"!=typeof window&&"undefined"!=typeof document,tr="object"==typeof navigator&&navigator||void 0,rr=er&&(!tr||["ReactNative","NativeScript","NS"].indexOf(tr.product)<0),nr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,or=er&&window.location.href||"http://localhost",ir={...t,...Qt},sr=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&&Dt.isArray(n)?n.length:i,a?(Dt.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&Dt.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&Dt.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(Dt.isFormData(e)&&Dt.isFunction(e.entries)){const r={};return Dt.forEachEntry(e,((e,n)=>{t(function(e){return Dt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},ar={transitional:Xt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Dt.isObject(e);if(o&&Dt.isHTMLForm(e)&&(e=new FormData(e)),Dt.isFormData(e))return n?JSON.stringify(sr(e)):e;if(Dt.isArrayBuffer(e)||Dt.isBuffer(e)||Dt.isStream(e)||Dt.isFile(e)||Dt.isBlob(e)||Dt.isReadableStream(e))return e;if(Dt.isArrayBufferView(e))return e.buffer;if(Dt.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 Vt(e,new ir.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ir.isNode&&Dt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Dt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Vt(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(Dt.isString(e))try{return(0,JSON.parse)(e),Dt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ar.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Dt.isResponse(e)||Dt.isReadableStream(e))return e;if(e&&Dt.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 Mt.from(e,Mt.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:ir.classes.FormData,Blob:ir.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Dt.forEach(["delete","get","head","post","put","patch"],(e=>{ar.headers[e]={}}));const cr=ar,lr=Dt.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"]),dr=Symbol("internals");function ur(e){return e&&String(e).trim().toLowerCase()}function pr(e){return!1===e||null==e?e:Dt.isArray(e)?e.map(pr):String(e)}function mr(e,t,r,n,o){return Dt.isFunction(n)?n.call(this,t,r):(o&&(t=r),Dt.isString(t)?Dt.isString(n)?-1!==t.indexOf(n):Dt.isRegExp(n)?n.test(t):void 0:void 0)}class fr{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ur(t);if(!o)throw new Error("header name must be a non-empty string");const i=Dt.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=pr(e))}const i=(e,t)=>Dt.forEach(e,((e,r)=>o(e,r,t)));if(Dt.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Dt.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]&&lr[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(Dt.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=ur(e)){const r=Dt.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(Dt.isFunction(t))return t.call(this,e,r);if(Dt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ur(e)){const r=Dt.findKey(this,e);return!(!r||void 0===this[r]||t&&!mr(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ur(e)){const o=Dt.findKey(r,e);!o||t&&!mr(0,r[o],o,t)||(delete r[o],n=!0)}}return Dt.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&&!mr(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Dt.forEach(this,((n,o)=>{const i=Dt.findKey(r,o);if(i)return t[i]=pr(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]=pr(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Dt.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Dt.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[dr]=this[dr]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ur(e);t[n]||(function(e,t){const r=Dt.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 Dt.isArray(e)?e.forEach(n):n(e),this}}fr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Dt.reduceDescriptors(fr.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Dt.freezeMethods(fr);const hr=fr;function yr(e,t){const r=this||cr,n=t||r,o=hr.from(n.headers);let i=n.data;return Dt.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function gr(e){return!(!e||!e.__CANCEL__)}function wr(e,t,r){Mt.call(this,null==e?"canceled":e,Mt.ERR_CANCELED,t,r),this.name="CanceledError"}Dt.inherits(wr,Mt,{__CANCEL__:!0});const vr=wr;function br(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Mt("Request failed with status code "+r.status,[Mt.ERR_BAD_REQUEST,Mt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const _r=(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)},Er=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},$r=e=>(...t)=>Dt.asap((()=>e(...t))),Sr=ir.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ir.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ir.origin),ir.navigator&&/(msie|trident)/i.test(ir.navigator.userAgent)):()=>!0,Tr=ir.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];Dt.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Dt.isString(n)&&s.push("path="+n),Dt.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 Or(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 xr=e=>e instanceof hr?{...e}:e;function kr(e,t){t=t||{};const r={};function n(e,t,r,n){return Dt.isPlainObject(e)&&Dt.isPlainObject(t)?Dt.merge.call({caseless:n},e,t):Dt.isPlainObject(t)?Dt.merge({},t):Dt.isArray(t)?t.slice():t}function o(e,t,r,o){return Dt.isUndefined(t)?Dt.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Dt.isUndefined(t))return n(void 0,t)}function s(e,t){return Dt.isUndefined(t)?Dt.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(xr(e),xr(t),0,!0)};return Dt.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,s=i(e[n],t[n],n);Dt.isUndefined(s)&&i!==a||(r[n]=s)})),r}const Pr=e=>{const t=kr({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=hr.from(a),t.url=Wt(Or(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Dt.isFormData(n))if(ir.hasStandardBrowserEnv||ir.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(ir.hasStandardBrowserEnv&&(o&&Dt.isFunction(o)&&(o=o(t)),o||!1!==o&&Sr(t.url))){const e=i&&s&&Tr.read(s);e&&a.set(i,e)}return t},Ar="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Pr(e);let o=n.data;const i=hr.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=hr.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());br((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 Mt("Request aborted",Mt.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Mt("Network Error",Mt.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||Xt;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Mt(t,o.clarifyTimeoutError?Mt.ETIMEDOUT:Mt.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&Dt.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),Dt.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),u&&"json"!==u&&(h.responseType=n.responseType),m&&([c,d]=_r(m,!0),h.addEventListener("progress",c)),p&&h.upload&&([a,l]=_r(p),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new vr(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===ir.protocols.indexOf(g)?r(new Mt("Unsupported protocol "+g+":",Mt.ERR_BAD_REQUEST,e)):h.send(o||null)}))},Cr=(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 Mt?t:new vr(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Mt(`timeout ${t} of ms exceeded`,Mt.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=()=>Dt.asap(s),a}},jr=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},Nr=(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*jr(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})},Ir="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Dr=Ir&&"function"==typeof ReadableStream,Rr=Ir&&("function"==typeof TextEncoder?(zr=new TextEncoder,e=>zr.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var zr;const Lr=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Mr=Dr&&Lr((()=>{let e=!1;const t=new Request(ir.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Fr=Dr&&Lr((()=>Dt.isReadableStream(new Response("").body))),Ur={stream:Fr&&(e=>e.body)};var qr;Ir&&(qr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ur[e]&&(Ur[e]=Dt.isFunction(qr[e])?t=>t[e]():(t,r)=>{throw new Mt(`Response type '${e}' is not supported`,Mt.ERR_NOT_SUPPORT,r)})})));const Br=Ir&&(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}=Pr(e);l=l?(l+"").toLowerCase():"text";let m,f=Cr([o,i&&i.toAbortSignal()],s);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Mr&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=Dt.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Dt.isBlob(e))return e.size;if(Dt.isSpecCompliantForm(e)){const t=new Request(ir.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Dt.isArrayBufferView(e)||Dt.isArrayBuffer(e)?e.byteLength:(Dt.isURLSearchParams(e)&&(e+=""),Dt.isString(e)?(await Rr(e)).byteLength:void 0)})(t):r})(d,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Dt.isFormData(n)&&(e=r.headers.get("content-type"))&&d.setContentType(e),r.body){const[e,t]=Er(y,_r($r(c)));n=Nr(r.body,65536,e,t)}}Dt.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=Fr&&("stream"===l||"response"===l);if(Fr&&(a||s&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Dt.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&Er(t,_r($r(a),!0))||[];i=new Response(Nr(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}l=l||"text";let g=await Ur[Dt.findKey(Ur,l)||"text"](i,e);return!s&&h&&h(),await new Promise(((t,r)=>{br(t,r,{data:g,headers:hr.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 Mt("Network Error",Mt.ERR_NETWORK,e,m),{cause:t.cause||t});throw Mt.from(t,t&&t.code,e,m)}}),Vr={http:null,xhr:Ar,fetch:Br};Dt.forEach(Vr,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Gr=e=>`- ${e}`,Kr=e=>Dt.isFunction(e)||null===e||!1===e,Jr=e=>{e=Dt.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,!Kr(r)&&(n=Vr[(t=String(r)).toLowerCase()],void 0===n))throw new Mt(`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(Gr).join("\n"):" "+Gr(e[0]):"as no adapter specified";throw new Mt("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function Hr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vr(null,e)}function Zr(e){return Hr(e),e.headers=hr.from(e.headers),e.data=yr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jr(e.adapter||cr.adapter)(e).then((function(t){return Hr(e),t.data=yr.call(e,e.transformResponse,t),t.headers=hr.from(t.headers),t}),(function(t){return gr(t)||(Hr(e),t&&t.response&&(t.response.data=yr.call(e,e.transformResponse,t.response),t.response.headers=hr.from(t.response.headers))),Promise.reject(t)}))}const Wr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Wr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Yr={};Wr.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 Mt(n(o," has been removed"+(t?" in "+t:"")),Mt.ERR_DEPRECATED);return t&&!Yr[o]&&(Yr[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)}},Wr.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Xr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Mt("options must be an object",Mt.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 Mt("option "+i+" must be "+r,Mt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Mt("Unknown option "+i,Mt.ERR_BAD_OPTION)}},validators:Wr},Qr=Xr.validators;class en{constructor(e){this.defaults=e,this.interceptors={request:new Yt,response:new Yt}}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=kr(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Xr.assertOptions(r,{silentJSONParsing:Qr.transitional(Qr.boolean),forcedJSONParsing:Qr.transitional(Qr.boolean),clarifyTimeoutError:Qr.transitional(Qr.boolean)},!1),null!=n&&(Dt.isFunction(n)?t.paramsSerializer={serialize:n}:Xr.assertOptions(n,{encode:Qr.function,serialize:Qr.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Xr.assertOptions(t,{baseUrl:Qr.spelling("baseURL"),withXsrfToken:Qr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Dt.merge(o.common,o[t.method]);o&&Dt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=hr.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=[Zr.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=Zr.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 Wt(Or((e=kr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Dt.forEach(["delete","get","head","options"],(function(e){en.prototype[e]=function(t,r){return this.request(kr(r||{},{method:e,url:t,data:(r||{}).data}))}})),Dt.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(kr(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}en.prototype[e]=t(),en.prototype[e+"Form"]=t(!0)}));const tn=en;class rn{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 vr(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 rn((function(t){e=t})),cancel:e}}}const nn=rn,on={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(on).forEach((([e,t])=>{on[t]=e}));const sn=on,an=function e(t){const r=new tn(t),n=He(tn.prototype.request,r);return Dt.extend(n,tn.prototype,r,{allOwnKeys:!0}),Dt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(kr(t,r))},n}(cr);an.Axios=tn,an.CanceledError=vr,an.CancelToken=nn,an.isCancel=gr,an.VERSION="1.8.4",an.toFormData=Vt,an.AxiosError=Mt,an.Cancel=an.CanceledError,an.all=function(e){return Promise.all(e)},an.spread=function(e){return function(t){return e.apply(null,t)}},an.isAxiosError=function(e){return Dt.isObject(e)&&!0===e.isAxiosError},an.mergeConfig=kr,an.AxiosHeaders=hr,an.formToJSON=e=>sr(Dt.isHTMLForm(e)?new FormData(e):e),an.getAdapter=Jr,an.HttpStatusCode=sn,an.default=an;const cn=an;var ln=s(1111);const dn="axios-retry";function un(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&ln(e)}const pn=["get","head","options"],mn=pn.concat(["put","delete"]);function fn(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function hn(e){return!!e.config?.method&&fn(e)&&-1!==mn.indexOf(e.config.method)}function yn(e){return un(e)||hn(e)}function gn(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 wn={retries:3,retryCondition:yn,retryDelay:function(e=0,t=void 0){return Math.max(0,gn(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function vn(e,t,r=!1){const n=function(e,t){return{...wn,...t,...e[dn]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[dn]=n,n}const bn=(e,t)=>{const r=e.interceptors.request.use((e=>(vn(e,t,!0),e[dn]?.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=vn(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}};bn.isNetworkError=un,bn.isSafeRequestError=function(e){return!!e.config?.method&&fn(e)&&-1!==pn.indexOf(e.config.method)},bn.isIdempotentRequestError=hn,bn.isNetworkOrIdempotentRequestError=yn,bn.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,o=Math.max(n,gn(t));return o+.2*o*Math.random()},bn.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,gn(r))}},bn.isRetryableError=fn;const _n=bn;var En=s(6022);class $n extends Error{}$n.prototype.name="InvalidTokenError";var Sn=s(4874);const Tn={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!Tn._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof Tn.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new Tn.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()}}},On=Tn,xn={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"}},kn=[{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:xn.common1,email:xn.common2,isInvitation:xn.common3,mode:xn.common1,name:xn.common1,pendingUserId:xn.common1,pwd:xn.common1,username:xn.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:xn.common2,password:xn.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:xn.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:xn.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:xn.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:xn.common1,newPassword2:xn.common1,oldPassword:xn.common1,scope:{default:"",type:["string"]},userId:xn.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:xn.common6,postActions:[{type:"resetSession"},{event:"accountDeleted",path:null,type:"emitEvent"}],request:xn.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:xn.common11}},if:{properties:{typeEntity:xn.common12}},then:{properties:{idEntity:xn.common5}}},{if:{properties:{type:{enum:["birthDate","email","locality","phone","directory"]},typeEntity:xn.common12}},then:{properties:{value:{enum:["private","public","mask"],type:"string"}}}},{if:{properties:{type:{enum:["activitypub","isOpenData"]},typeEntity:xn.common12}},then:xn.common13},{if:{properties:{type:{enum:["isOpenData","isOpenEdition","private","feedback"]},typeEntity:{not:xn.common12}}},then:xn.common13}],properties:{idEntity:xn.common1,type:xn.common1,typeEntity:xn.common15,value:xn.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:[xn.common17,{anyOf:[{properties:{description:xn.common23},required:["description"]},{properties:{shortDescription:xn.common23},required:["shortDescription"]}]}],properties:{block:{const:"descriptions",default:"descriptions",type:"string"},descMentions:xn.common10,description:xn.common1,id:xn.common1,scope:{default:"",type:["string","null"]},shortDescription:xn.common1,typeElement:xn.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:xn.common2,name:xn.common1,tags:xn.common25,url:xn.common4}},allOf:[{if:xn.common20,then:{additionalProperties:!1,anyOf:[xn.common28,{properties:{birthDate:xn.common23},required:["birthDate"]},{properties:{fixe:xn.common23},required:["fixe"]},{properties:{mobile:xn.common23},required:["mobile"]},xn.common30,xn.common32,xn.common34],properties:{birthDate:{format:"date",type:"string"},block:xn.common36,email:xn.common37,fixe:xn.common1,id:xn.common5,mobile:xn.common1,name:xn.common38,scope:xn.common10,tags:xn.common39,typeElement:xn.common15,url:xn.common40}}},{if:{properties:{typeElement:xn.common41}},then:{additionalProperties:!1,anyOf:[xn.common28,xn.common30,xn.common32,xn.common34,{properties:{avancement:xn.common23},required:["avancement"]},{properties:{parent:xn.common23},required:["parent"]}],properties:{avancement:{enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],type:"string"},block:xn.common36,email:xn.common37,id:xn.common1,name:xn.common38,parent:{additionalProperties:!1,patternProperties:{"^[a-fA-F0-9]{24}$":{additionalProperties:!1,properties:xn.common42,required:["type","name"],type:"object"}},type:"object"},scope:xn.common10,tags:xn.common39,typeElement:xn.common15,url:xn.common40}}},{if:{properties:{typeElement:xn.common43}},then:{additionalProperties:!1,anyOf:[xn.common28,xn.common30,xn.common32,xn.common34,{properties:{type:xn.common23},required:["type"]}],properties:{block:xn.common36,email:xn.common37,id:xn.common1,name:xn.common38,scope:xn.common10,tags:xn.common39,type:{enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],type:"string"},typeElement:xn.common15,url:xn.common40}}}],properties:{block:xn.common36,id:xn.common1,scope:xn.common10,typeElement:xn.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:[xn.common27,xn.common4]}},allOf:[xn.common17,{anyOf:[{properties:{gitlab:xn.common23},required:["gitlab"]},{properties:{github:xn.common23},required:["github"]},{properties:{twitter:xn.common23},required:["twitter"]},{properties:{facebook:xn.common23},required:["facebook"]},{properties:{instagram:xn.common23},required:["instagram"]},{properties:{diaspora:xn.common23},required:["diaspora"]},{properties:{mastodon:xn.common23},required:["mastodon"]},{properties:{telegram:xn.common23},required:["telegram"]},{properties:{signal:xn.common23},required:["signal"]}]}],properties:{block:{const:"network",default:"network",type:"string"},diaspora:xn.common44,facebook:xn.common44,github:xn.common44,gitlab:xn.common44,id:xn.common1,instagram:xn.common44,mastodon:xn.common44,scope:xn.common10,signal:xn.common44,telegram:xn.common44,twitter:xn.common44,typeElement:xn.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:xn.common45,if:xn.common20,properties:{address:xn.common48,block:{const:"localities",default:"localities",type:"string"},geo:xn.common52,geoPosition:xn.common56,id:xn.common1,scope:xn.common10,typeElement:xn.common15},required:["block","typeElement","id","address"],then:xn.common62,type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SLUG",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:xn.common45,if:xn.common20,properties:{block:xn.common36,id:xn.common1,scope:xn.common10,slug:xn.common65,typeElement:xn.common15},required:["block","typeElement","id","slug"],then:xn.common62,type:"object"}},{auth:"bearer",constant:"CHECK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/check",request:{additionalProperties:!1,else:xn.common45,if:xn.common66,properties:{block:xn.common36,id:xn.common1,slug:xn.common65,type:xn.common15},required:["block","type","id","slug"],then:xn.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:xn.common68,request:{additionalProperties:!1,properties:{profil_avatar:xn.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:xn.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:xn.common78,if:xn.common80,properties:{listInvite:{additionalProperties:!1,patternProperties:{"^(citoyens|projects|organizations)$":{additionalProperties:!1,patternProperties:{"^[0-9a-fA-F]{24}$":{additionalProperties:!1,properties:{name:xn.common1},required:["name"],type:"object"}},type:"object"}},type:"object"},parentId:xn.common1,parentType:xn.common15},required:["parentId","parentType","listInvite"],then:xn.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:xn.common45,if:xn.common66,properties:{id:xn.common1,isLive:xn.common84,type:xn.common15},required:["isLive","type","id"],then:xn.common62,type:"object"},request:{additionalProperties:!1,properties:{dateLimit:{default:0,type:"integer"},indexStep:{default:12,type:"integer"},search:{additionalProperties:!1,properties:{name:xn.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:xn.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:[xn.common85,xn.common86,xn.common87],else:xn.common78,if:xn.common80,properties:{json:xn.common60,markdownActive:xn.common84,mediaFile:xn.common88,mediaImg:xn.common90,mentions:xn.common92,parentId:xn.common1,parentType:xn.common15,scope:xn.common96,tags:xn.common25,text:xn.common1,type:xn.common97},required:["scope","markdownActive","parentId","parentType","type","json"],then:xn.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:xn.common68,request:{additionalProperties:!1,properties:{newsImage:xn.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:xn.common68,request:{additionalProperties:!1,properties:{newsFile:xn.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:xn.common98,request:{additionalProperties:!1,properties:{isLive:xn.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:[xn.common85,xn.common86,xn.common87],else:xn.common78,if:xn.common80,properties:{idNews:xn.common11,markdownActive:xn.common84,mediaFile:xn.common88,mediaImg:xn.common90,mentions:xn.common92,parentId:xn.common1,parentType:xn.common15,scope:xn.common96,tags:xn.common25,text:xn.common1,type:xn.common97},required:["idNews","scope","markdownActive","parentId","parentType","type"],then:xn.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:xn.common47}},if:{properties:{childType:xn.common12}},properties:{childId:xn.common11,childType:xn.common15,comment:xn.common1,connectType:{const:"share",default:"share",type:"string"},parentId:xn.common11,parentType:xn.common97},required:["parentId","parentType","childId","childType","connectType"],then:{properties:{childId:xn.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:xn.common100},{auth:"bearer",constant:"ADD_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/save",request:{additionalProperties:!1,properties:{argval:xn.common10,contextId:xn.common11,contextType:xn.common102,mentions:xn.common103,parentCommentId:xn.common11,path:xn.common10,text:xn.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:xn.common98},{auth:"bearer",constant:"UPDATE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/update",request:{additionalProperties:!1,properties:{id:xn.common11,params:{properties:{mentions:xn.common103,text:xn.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:xn.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:xn.common100},{auth:"none",constant:"GLOBAL_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:xn.common60,countType:{const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],items:xn.common106,type:"array"},fediverse:xn.common107,filters:xn.common108,indexMin:{const:0,default:0,type:"number"},indexStep:xn.common59,initType:xn.common108,locality:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":{additionalProperties:!1,properties:{id:xn.common1,type:{enum:["cities","level1"],type:"string"}},required:["id","type"],type:"object"}},type:"object"},name:xn.common1,notSourceKey:xn.common60,ranges:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":xn.common109},type:"object"},searchTags:xn.common26,searchType:{items:xn.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:xn.common108,name:xn.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:xn.common111,name:xn.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:xn.common60,countType:xn.common112,fediverse:xn.common107,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@userId":xn.common114,"parent.@userId":xn.common114},"links.contributors.@userId":xn.common114},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common115},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common115,"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common115},type:"object"}},required:["$or"],type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common76,request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common112,fediverse:xn.common107,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@{pathParams.id}":xn.common114,"parent.@{pathParams.id}":xn.common114},"links.contributors.@{pathParams.id}":xn.common114},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115,"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115},type:"object"}},required:["$or"],type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common119,fediverse:xn.common107,filters:{additionalProperties:!1,default:{"parent.@userId":xn.common114},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common115},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common76,request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common119,fediverse:xn.common107,filters:{additionalProperties:!1,default:{"parent.@{pathParams.id}":xn.common114},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common121,fediverse:xn.common107,filters:{additionalProperties:!1,default:{"links.members.@userId":xn.common114,"links.members.@userId.isInviting":xn.common123,"links.members.@userId.toBeValidated":xn.common123},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common115,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":xn.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":xn.common124},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common45,if:xn.common66,properties:{id:xn.common1,type:{default:"citoyens",enum:["citoyens","organizations"],type:"string"}},required:["type","id"],then:xn.common62,type:"object"},request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common121,fediverse:xn.common107,filters:{additionalProperties:!1,default:{"links.members.@{pathParams.id}":xn.common114,"links.members.@{pathParams.id}.isInviting":xn.common123,"links.members.@{pathParams.id}.toBeValidated":xn.common123},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":xn.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":xn.common124},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common127,fediverse:xn.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+)$":xn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":xn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":xn.common129,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":xn.common131,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":xn.common124},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common98,request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common127,fediverse:xn.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}":xn.common114,"links.memberOf.@{pathParams.id}.isInviting":xn.common123,"links.memberOf.@{pathParams.id}.toBeValidated":xn.common123},patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":xn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":xn.common129,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":xn.common131,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":xn.common129},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common6,request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common134,fediverse:xn.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}":xn.common114,"links.friends.@{pathParams.id}.isInviting":xn.common123,"links.friends.@{pathParams.id}.toBeValidated":xn.common123},patternProperties:{"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":xn.common129,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":xn.common129},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common136,fediverse:xn.common107,filters:{additionalProperties:!1,allOf:[xn.common138],default:{"links.followers.@userId":xn.common114,"links.followers.@{userId}.isInviting":xn.common123,"links.followers.@{userId}.toBeValidated":xn.common123},patternProperties:xn.common141,type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common6,request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common136,fediverse:xn.common107,filters:{additionalProperties:!1,allOf:[xn.common138],default:{"links.followers.@{pathParams.id}":xn.common114,"links.followers.@{pathParams.id}.isInviting":xn.common123,"links.followers.@{pathParams.id}.toBeValidated":xn.common123},patternProperties:xn.common141,type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common134,fediverse:xn.common107,filters:{additionalProperties:!1,allOf:[xn.common142],default:{"links.follows.@userId":xn.common114,"links.follows.@{userId}.isInviting":xn.common123,"links.follows.@{userId}.toBeValidated":xn.common123},patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":xn.common124,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":xn.common124},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common45,if:xn.common66,then:xn.common62}],properties:{id:xn.common1,type:{default:"citoyens",enum:["citoyens","organizations","projects"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common134,fediverse:xn.common107,filters:{additionalProperties:!1,allOf:[xn.common142],default:{"links.follows.@{pathParams.id}":xn.common114},maxProperties:1,minProperties:1,patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common127,fediverse:xn.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+)$":xn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":xn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":xn.common129,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":xn.common131,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":xn.common124},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common98,request:{additionalProperties:!1,properties:{count:xn.common60,countType:xn.common127,fediverse:xn.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}":xn.common114,"links.projects.@{pathParams.id}.isInviting":xn.common123,"links.projects.@{pathParams.id}.toBeValidated":xn.common123},patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":xn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":xn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":xn.common129,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":xn.common131,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":xn.common129},type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common145,fediverse:xn.common107,filters:{properties:{$or:{additionalProperties:!1,minProperties:1,patternProperties:{"^issuer\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common115},type:"object"},isParcours:xn.common3,"preferences.private":xn.common107},required:["preferences.private"],type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,searchType:xn.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:xn.common60,countType:xn.common147,fediverse:xn.common107,fields:xn.common145,filters:{oneOf:[{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common149}},{additionalProperties:!1,maxProperties:3,minProperties:3,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":xn.common149,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":xn.common152,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":xn.common152}},{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:xn.common155},{additionalProperties:!1,maxProperties:1,minProperties:1,properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:xn.common155,type:"object"}},required:["$or"]},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.revoke$":xn.common151}},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":xn.common149}}],type:"object"},indexMin:xn.common111,indexStep:xn.common118,initType:xn.common108,locality:xn.common108,name:xn.common1,notSourceKey:xn.common60,ranges:{additionalProperties:!1,default:{Cooperative:xn.common156,GovernmentOrganization:xn.common156,Group:xn.common156,LocalBusiness:xn.common156,NGO:xn.common156,citoyens:xn.common156,projects:xn.common156},maxProperties:7,minProperties:7,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":xn.common109},type:"object"},searchType:xn.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:[xn.common157,xn.common161,xn.common167,{if:xn.common173,then:{properties:{connectType:{default:"attendee",enum:["attendee","connect"]}}}}],properties:{childId:xn.common176,childType:xn.common177,connectType:{enum:["admin","member","contributor","attendee","friend","connect"],type:"string"},parentId:xn.common11,parentType:xn.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:[xn.common157,xn.common161,xn.common167,{if:xn.common173,then:{properties:{connectType:{const:"attendee",default:"attendee"}}}}],properties:{childId:xn.common176,childType:xn.common177,connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:xn.common11,parentType:xn.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:xn.common6},{auth:"bearer",constant:"DELETE_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue?index={index}",pathParams:{properties:{index:xn.common59},type:"object"},request:{additionalProperties:!1,properties:{collection:xn.common179,id:xn.common180,path:{const:"preferences.search.@{pathParams.index}",default:"preferences.search.@{pathParams.index}",type:"string"},pull:{const:"preferences.search",type:"string"},value:xn.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:xn.common151,collection:xn.common179,id:xn.common180,path:{const:"preferences.search",default:"preferences.search",type:"string"},value:{additionalProperties:!1,properties:{description:xn.common1,locality:{patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:xn.common42,required:["name","type"]}},type:"object"},name:xn.common1,tags:xn.common26,url:xn.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:xn.common48,collection:{const:"organizations",default:"organizations",type:"string"},email:xn.common2,geo:xn.common52,geoPosition:xn.common56,id:xn.common11,key:{const:"organization",default:"organization",type:"string"},name:{minLength:3,type:"string"},preferences:{default:{isOpenData:!0,isOpenEdition:!0},properties:{isOpenData:xn.common84,isOpenEdition:xn.common84},required:["isOpenData","isOpenEdition"],type:"object"},role:{enum:["admin","member"],type:"string"},scope:xn.common108,shortDescription:xn.common1,tags:xn.common26,type:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},url:xn.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:xn.common48,collection:{const:"projects",default:"projects",type:"string"},geo:xn.common52,geoPosition:xn.common56,id:xn.common11,key:{const:"project",default:"project",type:"string"},name:xn.common1,parent:xn.common181,preferences:{default:{crowdfunding:!0,isOpenData:!1,isOpenEdition:!1},properties:{crowdfunding:xn.common84,isOpenData:xn.common99,isOpenEdition:xn.common99},required:["isOpenData","isOpenEdition"],type:"object"},public:xn.common84,scope:xn.common108,shortDescription:xn.common1,tags:xn.common26,url:xn.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:xn.common48,collection:xn.common186,description:xn.common1,geo:xn.common52,geoPosition:xn.common56,id:xn.common11,key:xn.common186,name:xn.common1,parent:xn.common181,scope:xn.common108,tags:xn.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:xn.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:xn.common126}},properties:{address:xn.common48,collection:{const:"events",default:"events",type:"string"},email:xn.common2,endDate:xn.common187,geo:xn.common52,geoPosition:xn.common56,id:xn.common11,key:{const:"event",default:"event",type:"string"},name:xn.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:xn.common188,opens:xn.common188},required:["opens","closes"],type:"object"},type:"array"}},required:["dayOfWeek","hours"],type:"object"}]},maxItems:7,minItems:7,type:"array"},organizer:xn.common181,parent:{additionalProperties:!1,patternProperties:xn.common184,type:"object"},preferences:{default:{isOpenData:!1,isOpenEdition:!1},properties:{isOpenData:xn.common99,isOpenEdition:xn.common99},required:["isOpenData","isOpenEdition"],type:"object"},public:xn.common84,recurrency:xn.common99,scope:xn.common108,shortDescription:xn.common1,startDate:xn.common187,tags:xn.common26,timeZone:xn.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:xn.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:xn.common98,request:xn.common8},{auth:"bearer",constant:"DELETE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/events/id/{id}/",pathParams:xn.common98,request:xn.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:xn.common11,type:xn.common1},required:["type","id"],type:"object"},request:xn.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:xn.common11},required:["folder","ownerId"],type:"object"},request:{additionalProperties:!1,properties:{qqfile:xn.common16,qqfilename:xn.common1,qqtotalfilesize:{type:"integer"},qquuid:xn.common11},required:["qquuid","qqfilename","qqtotalfilesize","qqfile"],type:"object"}}];En.addType("oid",(e=>new On.ObjectID(e)));class Pn extends ze.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:o="/api/cocolight/refreshtoken",endpoints:i=kn,timeout:s=3e4,debug:a=!1,maxRetries:c=0,circuitBreakerThreshold:l=5,circuitBreakerResetTime:d=6e4,fromJSONValue:u=!0}={}){if(super(),!e)throw new n('Le paramètre "baseURL" est obligatoire.',500);this.__entityTag="ApiClient",this._baseURL=e,this._refreshToken=r,this._refreshUrl=o,this._endpoints=i,this._debug=a;let p=null;this._fromJSONValue=u,Object.defineProperty(this,"userId",{get:()=>p,set:()=>{throw new Error("Modification directe de userId non autorisée.")},enumerable:!0}),this._setUserId=e=>{p=e,this._logger.debug(`[ApiClient] userId set: ${e}`)},this._ajv=new Ke({strict:!1,useDefaults:!0,allErrors:!0,verbose:!0}),Je(this._ajv),this._ajv.addKeyword({keyword:"startBeforeEnd",type:"object",errors:!0,validate:this._startBeforeEndValidate}),this._logger=Sn({transport:{target:"pino-pretty",options:{colorize:!0}},level:a?"debug":"info"}),this._client=cn.create({baseURL:e,timeout:s}),c>0&&(_n(this._client,{retries:c,retryDelay:_n.exponentialDelay,retryCondition:e=>_n.isNetworkError(e)||_n.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,t&&this.setToken(t),this._client.interceptors.response.use((e=>e),(async e=>{if(e.response&&401===e.response.status&&this._refreshToken)try{if(await this._refreshAccessToken())return this._client.request(e.config)}catch(e){throw new n(e.message,401,e)}throw e}))}setToken(e){this._accessToken=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){this._refreshToken=e;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 $n("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 $n(`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 $n(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new $n(`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;try{const e=await this._client.post(this._refreshUrl,{refreshToken:this._refreshToken},{headers:{"Content-Type":"application/json"}});return!(!e.data||!e.data.accessToken||(this.setToken(e.data.accessToken),e.data.refreshToken&&this.setRefreshToken(e.data.refreshToken),this.emit("refreshSuccess",e.data),0))}catch(e){return this.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]&&Pn.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]&&Pn.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,v=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),v=v.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=Pn.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=Pn.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${v}, method=${h}`);try{const e=await this._client.request({url:v,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 Ge(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 c(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 c(t.resultErrors.msg||"Erreur inconnue",e.status,t);return e}resetSession(){this.setToken(null),this.setRefreshToken(null),this._setUserId(null),delete this._client.defaults.headers.common.Authorization,this._logger.info("[ApiClient] Session utilisateur réinitialisée."),this.emit("sessionReset")}_getValueByPath(e,t){if(t)return t.split(".").reduce(((e,t)=>e&&e[t]),e)}static toURLSearchParams(e,t={}){return this._buildParams(e,new URLSearchParams,t)}static _buildParams(e,t,r={}){if("object"!=typeof e||null===e)throw new TypeError("La donnée doit être un objet non nul.");const{dots:n=!1,indexes: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?En.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 An{constructor(e){this.client=new Pn(e),this.loggedUser=null}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 Re(this.client,r.data.user,{EndpointApi:d,Organization:Ie,Project:De,News:Ae}),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 c(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 c(t.data.msg,t.status,t.data);return t.data}))}}class Cn{static async userLogin(e,t,r){const n=Cn.userApi(r);return await Cn.userApiLogin(n,e,t)}static userApi(e){try{return new An(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,r){try{const n=await e.login(t,r);return new Cn(n,e.client)}catch(e){if(e instanceof n&&e?.details?.error)throw new l(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 l("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 Re(this._client,e,{EndpointApi:d,Organization:Ie,Project:De,News:Ae});return await t.get(),t}return new Re(this._client,e,{EndpointApi:d,Organization:Ie,Project:De,News:Ae})}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 Ie(this._client,e,{EndpointApi:d,User:Re,Project:De,News:Ae});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 De(this._client,e,{User:Re,News:Ae,EndpointApi:d});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 d(this._client)}}const jn={ApiClient:Pn,Api:Cn,error:e}})(),a.default})()));
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},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 v(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),v((()=>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),v((()=>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}')},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(_.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return g.lastIndex=0,g.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=v&&e>=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),v=2**31-1;function b(){return!0}const _=/[^\\]\\Z/},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var 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."},v={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,v,b,_,E,S,$,T,O,k;const x=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===P||void 0===P?1:P||0,C=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,j=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:C}:{optimize:A,regExp:C},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(w=e.loopEnum)&&void 0!==w?w:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(_=e.inlineRefs)||void 0===_||_,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===($=e.validateSchema)||void 0===$||$,validateFormats:null===(T=e.validateFormats)||void 0===T||T,unicodeRegExp:null===(O=e.unicodeRegExp)||void 0===O||O,int32range:null===(k=e.int32range)||void 0===k||k,uriResolver:j}}class _{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,v,e,"DEPRECATED","warn"),this._metaOpts=k.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),$.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=S.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=S.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=>C.call(this,e))),this;N.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=>C.call(this,e,n):e=>n.type.forEach((t=>C.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 S(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function $(){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 T(){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 k(){const e={...this.opts};for(const t of y)delete e[t];return e}_.ValidationError=i.default,_.MissingRefError=s.default,t.default=_;const x={log(){},warn(){},error(){}},P=/^[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(!P.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 C(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?j.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 j(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 N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,I]}}},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},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},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=v),function(e,t,r){const n={};t.forEach((e=>{n[e]=r[e]?r[e]:o[e]||o[l[e]||"log"]||v})),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,_,b,"error"),p(this,_,b,"fatal"),p(this,_,b,"warn"),p(this,_,b,"info"),p(this,_,b,"debug"),p(this,_,b,"trace"),h.forEach((e=>{p(this,_,b,e)}))}});const _={transmit:t,serialize:i,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:g,timestamp:y(e),messageKey:e.messageKey||"msg",onChild:e.onChild||v};function 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=v,b.serializers=n,b._serialize=i,b._stdErrSerialize=c,b.child=function(...e){return E.call(this,_,...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)?v:r[a][i],writable:!0,enumerable:!0,configurable:!0}),e[i]===v){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:_}function g(){return{}}function w(e){return e}function v(){}function b(){return!1}function _(){return Date.now()}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=i,u.stdTimeFunctions=Object.assign({},{nullTime:b,epochTime:_,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=u,e.exports.pino=u},4914:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},5333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5765),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},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}()},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}},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},6585:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,i=7*o;function s(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,a){a=a||{};var c,l,d=typeof e;if("string"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===d&&isFinite(e))return a.long?(c=e,(l=Math.abs(c))>=o?s(c,l,o,"day"):l>=n?s(c,l,n,"hour"):l>=r?s(c,l,r,"minute"):l>=t?s(c,l,t,"second"):c+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},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},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={}))},7833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},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},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},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},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=C(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=C(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=C(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)||(j(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(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 v extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new w(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(N(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return A(e,this.condition),this.else&&P(e,this.else.names),e}}v.kind="if";class b extends y{}b.kind="for";class _ 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=C(this.iteration,e,t),this}get names(){return P(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 S 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=C(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class $ 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)}}$.kind="func";class T extends h{render(e){return"return "+super.render(e)}}T.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&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class k extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}k.kind="catch";class x extends y{render(e){return"finally"+super.render(e)}}function P(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?P(e,t.names):e}function C(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 j(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function N(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${z(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 v(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(v,w)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new _(e),t)}forRange(e,t,r,n,i=(this.opts.es5?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 S("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 S("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 T;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}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 k(e),t(e)}return r&&(this._currNode=n.finally=new x,this.code(r)),this._endBlockNode(k,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 $(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=N;const I=R(t.operators.AND);t.and=function(...e){return e.reduce(I)};const D=R(t.operators.OR);function R(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${z(t)} ${e} ${z(r)}`}function z(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"]}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,s),r.exports}s.m=o,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);s.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>i[e]=()=>r[e]));return i.default=()=>r,s.d(o,i),o},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>e+".cocolight-api-client.browser.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="CocolightApiClient:",s.l=(e,t,o,i)=>{if(r[e])r[e].push(t);else{var a,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==n+o){a=u;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",n+o),a.src=e),r[e]=[t];var p=(t,n)=>{a.onerror=a.onload=null,clearTimeout(m);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(n))),t)return t(n)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.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(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={792:0};s.f.j=(t,r)=>{var n=s.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=s.p+s.u(t),a=new Error;s.l(i,(r=>{if(s.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;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,n[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[i,a,c]=r,l=0;if(i.some((t=>0!==e[t]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);c&&c(s)}for(t&&t(r);l<i.length;l++)o=i[l],s.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 a={};return(()=>{"use strict";s.d(a,{default:()=>Nn});var e={};s.r(e),s.d(e,{ApiAuthenticationError:()=>l,ApiClientError:()=>n,ApiError:()=>r,ApiResponseError:()=>c,ApiValidationError:()=>o,CircuitBreakerError:()=>i});var t={};s.r(t),s.d(t,{hasBrowserEnv:()=>er,hasStandardBrowserEnv:()=>rr,hasStandardBrowserWebWorkerEnv:()=>nr,navigator:()=>tr,origin:()=>or});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 c extends Error{constructor(e,t,r,n=null){super(e),this.name="ApiResponseError",this.status=t,this.responseData=r,this.details=n}}class l extends r{constructor(e,t,r){super(e,t,r),this.name="ApiAuthenticationError"}}const d=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 l("Vous ne devez pas être connecté pour faire cette action.");return this.call(e,t)}async callIsConnected(e,t={}){if(!this.isConnected)throw new l("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)}},u={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 p=s(2808);function m(e){return new DataView(e.buffer,e.byteOffset)}s(251);const f={len:1,get:(e,t)=>m(e).getUint8(t),put:(e,t,r)=>(m(e).setUint8(t,r),t+1)},h={len:2,get:(e,t)=>m(e).getUint16(t,!0),put:(e,t,r)=>(m(e).setUint16(t,r,!0),t+2)},y={len:2,get:(e,t)=>m(e).getUint16(t),put:(e,t,r)=>(m(e).setUint16(t,r),t+2)},g={len:4,get:(e,t)=>m(e).getUint32(t,!0),put:(e,t,r)=>(m(e).setUint32(t,r,!0),t+4)},w={len:4,get:(e,t)=>m(e).getUint32(t),put:(e,t,r)=>(m(e).setUint32(t,r),t+4)},v={len:4,get:(e,t)=>m(e).getInt32(t),put:(e,t,r)=>(m(e).setInt32(t,r),t+4)},b={len:8,get:(e,t)=>m(e).getBigUint64(t,!0),put:(e,t,r)=>(m(e).setBigUint64(t,r,!0),t+8)};class _{constructor(e,t){this.len=e,this.encoding=t,this.textDecoder=new TextDecoder(t)}get(e,t){return this.textDecoder.decode(e.subarray(t,t+this.len))}}class E extends Error{constructor(){super("End-Of-Stream"),this.name="EndOfStreamError"}}class S extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}}class ${constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){const r=await this.read(e,t);return this.peekQueue.push(e.subarray(0,r)),r}async read(e,t=!1){if(0===e.length)return 0;let r=this.readFromPeekBuffer(e);if(this.endOfStream||(r+=await this.readRemainderFromStream(e.subarray(r),t)),0===r)throw new E;return r}readFromPeekBuffer(e){let t=e.length,r=0;for(;this.peekQueue.length>0&&t>0;){const n=this.peekQueue.pop();if(!n)throw new Error("peekData should be defined");const o=Math.min(n.length,t);e.set(n.subarray(0,o),r),r+=o,t-=o,o<n.length&&this.peekQueue.push(n.subarray(o))}return r}async readRemainderFromStream(e,t){let r=0;for(;r<e.length&&!this.endOfStream;){if(this.interrupted)throw new S;const n=await this.readFromStream(e.subarray(r),t);if(0===n)break;r+=n}if(!t&&r<e.length)throw new E;return r}}class T extends ${constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}}class O extends T{async readFromStream(e,t){if(0===e.length)return 0;const r=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return r.done&&(this.endOfStream=r.done),r.value?(e.set(r.value),r.value.length):0}}class k extends ${constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){const r=Math.min(t.length,e.length);return e.set(t.subarray(0,r)),r<t.length?this.buffer=t.subarray(r):this.buffer=null,r}async readFromStream(e,t){if(0===e.length)return 0;let r=0;for(this.buffer&&(r+=this.writeChunk(e,this.buffer));r<e.length&&!this.endOfStream;){const t=await this.reader.read();if(t.done){this.endOfStream=!0;break}t.value&&(r+=this.writeChunk(e.subarray(r),t.value))}if(0===r&&this.endOfStream)throw new E;return r}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}class x{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",(()=>{this.abort()}))}async readToken(e,t=this.position){const r=new Uint8Array(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new E;return e.get(r,0)}async peekToken(e,t=this.position){const r=new Uint8Array(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new E;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new E;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new E;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(){await this.abort(),await(this.onClose?.())}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return{mayBeLess:!1,offset:0,length:e.length,position:this.position,...t}}abort(){return Promise.resolve()}}class P extends x{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.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 o=await this.streamReader.read(e.subarray(0,r.length),r.mayBeLess);if(this.position+=o,(!t||!t.mayBeLess)&&o<r.length)throw new E;return o}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)),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.subarray(0,r.length),r.mayBeLess)}catch(e){if(t?.mayBeLess&&e instanceof E)return 0;throw e}if(!r.mayBeLess&&n<r.length)throw new E}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}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}}class A extends x{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},size:e.length}}async readBuffer(e,t){t?.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),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new E;return e.set(this.uint8Array.subarray(r.position,r.position+n)),n}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}}var C=Uint8Array,j=Uint16Array,N=Int32Array,I=new C([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),D=new C([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),R=new C([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),z=function(e,t){for(var r=new j(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var o=new N(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return{b:r,r:o}},L=z(I,2),M=L.b,F=L.r;M[28]=258,F[258]=28;for(var U=z(D,0),q=U.b,B=(U.r,new j(32768)),V=0;V<32768;++V){var G=(43690&V)>>1|(21845&V)<<1;G=(61680&(G=(52428&G)>>2|(13107&G)<<2))>>4|(3855&G)<<4,B[V]=((65280&G)>>8|(255&G)<<8)>>1}var K=function(e,t,r){for(var n=e.length,o=0,i=new j(t);o<n;++o)e[o]&&++i[e[o]-1];var s,a=new j(t);for(o=1;o<t;++o)a[o]=a[o-1]+i[o-1]<<1;if(r){s=new j(1<<t);var c=15-t;for(o=0;o<n;++o)if(e[o])for(var l=o<<4|e[o],d=t-e[o],u=a[e[o]-1]++<<d,p=u|(1<<d)-1;u<=p;++u)s[B[u]>>c]=l}else for(s=new j(n),o=0;o<n;++o)e[o]&&(s[o]=B[a[e[o]-1]++]>>15-e[o]);return s},J=new C(288);for(V=0;V<144;++V)J[V]=8;for(V=144;V<256;++V)J[V]=9;for(V=256;V<280;++V)J[V]=7;for(V=280;V<288;++V)J[V]=8;var H=new C(32);for(V=0;V<32;++V)H[V]=5;var Z=K(J,9,1),W=K(H,5,1),Y=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},X=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&r},Q=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},ee=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],te=function(e,t,r){var n=new Error(t||ee[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,te),!r)throw n;return n},re=function(e,t,r,n){var o=e.length,i=n?n.length:0;if(!o||t.f&&!t.l)return r||new C(0);var s=!r,a=s||2!=t.i,c=t.i;s&&(r=new C(3*o));var l,d=function(e){var t=r.length;if(e>t){var n=new C(Math.max(2*t,e));n.set(r),r=n}},u=t.f||0,p=t.p||0,m=t.b||0,f=t.l,h=t.d,y=t.m,g=t.n,w=8*o;do{if(!f){u=X(e,p,1);var v=X(e,p+1,3);if(p+=3,!v){var b=e[(l=p,(j=4+((l+7)/8|0))-4)]|e[j-3]<<8,_=j+b;if(_>o){c&&te(0);break}a&&d(m+b),r.set(e.subarray(j,_),m),t.b=m+=b,t.p=p=8*_,t.f=u;continue}if(1==v)f=Z,h=W,y=9,g=5;else if(2==v){var E=X(e,p,31)+257,S=X(e,p+10,15)+4,$=E+X(e,p+5,31)+1;p+=14;for(var T=new C($),O=new C(19),k=0;k<S;++k)O[R[k]]=X(e,p+3*k,7);p+=3*S;var x=Y(O),P=(1<<x)-1,A=K(O,x,1);for(k=0;k<$;){var j,N=A[X(e,p,P)];if(p+=15&N,(j=N>>4)<16)T[k++]=j;else{var z=0,L=0;for(16==j?(L=3+X(e,p,3),p+=2,z=T[k-1]):17==j?(L=3+X(e,p,7),p+=3):18==j&&(L=11+X(e,p,127),p+=7);L--;)T[k++]=z}}var F=T.subarray(0,E),U=T.subarray(E);y=Y(F),g=Y(U),f=K(F,y,1),h=K(U,g,1)}else te(1);if(p>w){c&&te(0);break}}a&&d(m+131072);for(var B=(1<<y)-1,V=(1<<g)-1,G=p;;G=p){var J=(z=f[Q(e,p)&B])>>4;if((p+=15&z)>w){c&&te(0);break}if(z||te(2),J<256)r[m++]=J;else{if(256==J){G=p,f=null;break}var H=J-254;if(J>264){var ee=I[k=J-257];H=X(e,p,(1<<ee)-1)+M[k],p+=ee}var re=h[Q(e,p)&V],ne=re>>4;if(re||te(3),p+=15&re,U=q[ne],ne>3&&(ee=D[ne],U+=Q(e,p)&(1<<ee)-1,p+=ee),p>w){c&&te(0);break}a&&d(m+131072);var oe=m+H;if(m<U){var ie=i-U,se=Math.min(U,oe);for(ie+m<0&&te(3);m<se;++m)r[m]=n[ie+m]}for(;m<oe;++m)r[m]=r[m-U]}}t.l=f,t.p=G,t.b=m,t.f=u,f&&(u=1,t.m=y,t.d=h,t.n=g)}while(!u);return m!=r.length&&s?function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new C(e.subarray(t,r))}(r,0,m):r.subarray(0,m)},ne=new C(0);function oe(e,t){var r,n,o=function(e){31==e[0]&&139==e[1]&&8==e[2]||te(6,"invalid gzip data");var t=e[3],r=10;4&t&&(r+=2+(e[10]|e[11]<<8));for(var n=(t>>3&1)+(t>>4&1);n>0;n-=!e[r++]);return r+(2&t)}(e);return o+8>e.length&&te(6,"invalid gzip data"),re(e.subarray(o,-8),{i:2},t&&t.out||new C((n=(r=e).length,(r[n-4]|r[n-3]<<8|r[n-2]<<16|r[n-1]<<24)>>>0)),t&&t.dictionary)}function ie(e,t){return re(e.subarray((r=e,n=t&&t.dictionary,(8!=(15&r[0])||r[0]>>4>7||(r[0]<<8|r[1])%31)&&te(6,"invalid zlib data"),(r[1]>>5&1)==+!n&&te(6,"invalid zlib data: "+(32&r[1]?"need":"unexpected")+" dictionary"),2+(r[1]>>3&4)),-4),{i:2},t&&t.out,t&&t.dictionary);var r,n}var se="undefined"!=typeof TextDecoder&&new TextDecoder;try{se.decode(ne,{stream:!0})}catch(e){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var ae=s(7833);const ce=67324752,le=33639248,de={get:e=>(h.get(e,6),{signature:g.get(e,0),compressedSize:g.get(e,8),uncompressedSize:g.get(e,12)}),len:16},ue={get(e){const t=h.get(e,6);return{signature:g.get(e,0),minVersion:h.get(e,4),dataDescriptor:!!(8&t),compressedMethod:h.get(e,8),compressedSize:g.get(e,18),uncompressedSize:g.get(e,22),filenameLength:h.get(e,26),extraFieldLength:h.get(e,28),filename:null}},len:30},pe={get:e=>({signature:g.get(e,0),nrOfThisDisk:h.get(e,4),nrOfThisDiskWithTheStart:h.get(e,6),nrOfEntriesOnThisDisk:h.get(e,8),nrOfEntriesOfSize:h.get(e,10),sizeOfCd:g.get(e,12),offsetOfStartOfCd:g.get(e,16),zipFileCommentLength:h.get(e,20)}),len:22},me={get(e){const t=h.get(e,8);return{signature:g.get(e,0),minVersion:h.get(e,6),dataDescriptor:!!(8&t),compressedMethod:h.get(e,10),compressedSize:g.get(e,20),uncompressedSize:g.get(e,24),filenameLength:h.get(e,28),extraFieldLength:h.get(e,30),fileCommentLength:h.get(e,32),relativeOffsetOfLocalHeader:g.get(e,42),filename:null}},len:46};function fe(e){const t=new Uint8Array(g.len);return g.put(t,0,e),t}const he=ae("tokenizer:inflate"),ye=262144,ge=fe(134695760),we=fe(101010256);class ve{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(ye)}async isZip(){return await this.peekSignature()===ce}peekSignature(){return this.tokenizer.peekToken(g)}async findEndOfCentralDirectoryLocator(){const e=this.tokenizer,t=Math.min(16384,e.fileInfo.size),r=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(r,{position:e.fileInfo.size-t});for(let n=r.length-4;n>=0;n--)if(r[n]===we[0]&&r[n+1]===we[1]&&r[n+2]===we[2]&&r[n+3]===we[3])return e.fileInfo.size-t+n;return-1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess())return void he("Cannot reading central-directory without random-read support");he("Reading central-directory...");const e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){he("Central-directory 32-bit signature found");const r=await this.tokenizer.readToken(pe,t),n=[];this.tokenizer.setPosition(r.offsetOfStartOfCd);for(let e=0;e<r.nrOfEntriesOfSize;++e){const t=await this.tokenizer.readToken(me);if(t.signature!==le)throw new Error("Expected Central-File-Header signature");t.filename=await this.tokenizer.readToken(new _(t.filenameLength,"utf-8")),await this.tokenizer.ignore(t.extraFieldLength),await this.tokenizer.ignore(t.fileCommentLength),n.push(t),he(`Add central-directory file-entry: n=${e+1}/${n.length}: filename=${n[e].filename}`)}return this.tokenizer.setPosition(e),n}this.tokenizer.setPosition(e)}async unzip(e){const t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let r=!1;do{const t=await this.readLocalFileHeader();if(!t)break;const n=e(t);let o;if(r=!!n.stop,await this.tokenizer.ignore(t.extraFieldLength),t.dataDescriptor&&0===t.compressedSize){const e=[];let r=ye;he("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let o=-1;for(;o<0&&r===ye;){r=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0}),o=be(this.syncBuffer.subarray(0,r),ge);const t=o>=0?o:r;if(n.handler){const r=new Uint8Array(t);await this.tokenizer.readBuffer(r),e.push(r)}else await this.tokenizer.ignore(t)}he(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),n.handler&&await this.inflate(t,_e(e),n.handler)}else n.handler?(he(`Reading compressed-file-data: ${t.compressedSize} bytes`),o=new Uint8Array(t.compressedSize),await this.tokenizer.readBuffer(o),await this.inflate(t,o,n.handler)):(he(`Ignoring compressed-file-data: ${t.compressedSize} bytes`),await this.tokenizer.ignore(t.compressedSize));if(he(`Reading data-descriptor at pos=${this.tokenizer.position}`),t.dataDescriptor&&134695760!==(await this.tokenizer.readToken(de)).signature)throw new Error("Expected data-descriptor-signature at position "+(this.tokenizer.position-de.len))}while(!r)}async iterateOverCentralDirectory(e,t){for(const r of e){const e=t(r);if(e.handler){this.tokenizer.setPosition(r.relativeOffsetOfLocalHeader);const t=await this.readLocalFileHeader();if(t){await this.tokenizer.ignore(t.extraFieldLength);const n=new Uint8Array(r.compressedSize);await this.tokenizer.readBuffer(n),await this.inflate(t,n,e.handler)}}if(e.stop)break}}inflate(e,t,r){return 0===e.compressedMethod?r(t):(he(`Decompress filename=${e.filename}, compressed-size=${t.length}`),r(31==(n=t)[0]&&139==n[1]&&8==n[2]?oe(n,o):8!=(15&n[0])||n[0]>>4>7||(n[0]<<8|n[1])%31?function(e,t){return re(e,{i:2},t&&t.out,t&&t.dictionary)}(n,o):ie(n,o)));var n,o}async readLocalFileHeader(){const e=await this.tokenizer.peekToken(g);if(e===ce){const e=await this.tokenizer.readToken(ue);return e.filename=await this.tokenizer.readToken(new _(e.filenameLength,"utf-8")),e}if(e===le)return!1;if(3759263696===e)throw new Error("Encrypted ZIP");throw new Error("Unexpected signature")}}function be(e,t){const r=e.length,n=t.length;if(n>r)return-1;for(let o=0;o<=r-n;o++){let r=!0;for(let i=0;i<n;i++)if(e[o+i]!==t[i]){r=!1;break}if(r)return o}return-1}function _e(e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}function Ee(e){const{byteLength:t}=e;return 6===t?e.getUint16(0)*2**32+e.getUint32(2):5===t?e.getUint8(0)*2**32+e.getUint32(1):4===t?e.getUint32(0):3===t?65536*e.getUint8(0)+e.getUint16(1):2===t?e.getUint16(0):1===t?e.getUint8(0):void 0}Object.prototype.toString,new globalThis.TextDecoder("utf8"),new globalThis.TextEncoder,Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const Se={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},$e=4100;async function Te(e){return(new xe).fromBuffer(e)}function Oe(e){switch(e){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.text-template":return{ext:"ott",mime:"application/vnd.oasis.opendocument.text-template"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:"application/vnd.oasis.opendocument.spreadsheet-template"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:"application/vnd.oasis.opendocument.presentation-template"};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:"application/vnd.oasis.opendocument.graphics"};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:"application/vnd.oasis.opendocument.graphics-template"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};case"application/vnd.ms-excel.sheet.macroEnabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.template"};case"application/vnd.ms-excel.template.macroEnabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"application/vnd.ms-word.document.macroEnabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.template"};case"application/vnd.ms-word.template.macroEnabledTemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:"application/vnd.openxmlformats-officedocument.presentationml.template"};case"application/vnd.ms-powerpoint.template.macroEnabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroEnabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"application/vnd.ms-powerpoint.presentation.macroEnabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroEnabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"}}}function ke(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}class xe{constructor(e){this.detectors=[...e?.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:e?.signal}}async fromTokenizer(e){const t=e.position;for(const r of this.detectors){const n=await r.detect(e);if(n)return n;if(t!==e.position)return}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Uint8Array?e:new Uint8Array(e);var r,n;if(t?.length>1)return this.fromTokenizer((r=t,n=this.tokenizerOptions,new A(r,n)))}async fromBlob(e){return this.fromStream(e.stream())}async fromStream(e){const t=await function(e,t){const r=function(e){try{const t=e.getReader({mode:"byob"});return t instanceof ReadableStreamDefaultReader?new k(t):new O(t)}catch(t){if(t instanceof TypeError)return new k(e.getReader());throw t}}(e),n=t??{},o=n.onClose;return n.onClose=async()=>{if(await r.close(),o)return o()},new P(r,n)}(e,this.tokenizerOptions);try{return await this.fromTokenizer(t)}finally{await t.close()}}async toDetectionStream(e,t){const{sampleSize:r=$e}=t;let n,o;const i=e.getReader({mode:"byob"});try{const{value:e,done:t}=await i.read(new Uint8Array(r));if(o=e,!t&&e)try{n=await this.fromBuffer(e.slice(0,r))}catch(e){if(!(e instanceof E))throw e;n=void 0}o=e}finally{i.releaseLock()}const s=new TransformStream({async start(e){e.enqueue(o)},transform(e,t){t.enqueue(e)}}),a=e.pipeThrough(s);return a.fileType=n,a}check(e,t){return ke(this.buffer,e,t)}checkString(e,t){return this.check((r=e,[...r].map((e=>e.charCodeAt(0)))),t);var r}detectConfident=async e=>{if(this.buffer=new Uint8Array($e),void 0===e.fileInfo.size&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,await e.peekBuffer(this.buffer,{length:12,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191]))return this.tokenizer.ignore(3),this.detectConfident(e);if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await e.ignore(6);const t=await e.readToken(Se);return e.position+t>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(t),this.fromTokenizer(e))}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===this.buffer[0]||70===this.buffer[0])&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let r;return await new ve(e).unzip((e=>{switch(e.filename){case"META-INF/mozilla.rsa":return r={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return r={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":return{async handler(e){const t=new TextDecoder("utf-8").decode(e).trim();r=Oe(t)},stop:!0};case"[Content_Types].xml":return{async handler(e){let t=new TextDecoder("utf-8").decode(e);const n=t.indexOf('.main+xml"');if(-1===n){const e="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";t.includes(`ContentType="${e}"`)&&(r=Oe(e))}else{t=t.slice(0,Math.max(0,n));const e=t.lastIndexOf('"'),o=t.slice(Math.max(0,e+1));r=Oe(o)}},stop:!0};default:return/classes\d*\.dex/.test(e.filename)?(r={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0}):{}}})),r??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);const n=new Uint8Array(8);return await e.readBuffer(n),ke(n,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/ogg; codecs=opus"}:ke(n,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:ke(n,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:ke(n,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:ke(n,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:ke(n,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF")){try{const o=1350;if(o===await e.ignore(o)){const i=10485760,s=new Uint8Array(Math.min(i,e.fileInfo.size-o));if(await e.readBuffer(s,{mayBeLess:!0}),-1!==function(e,t){const r=e.length,n=t.length;if(0===n)return-1;if(n>r)return-1;const o=r-n;for(let r=0;r<=o;r++){let o=!0;for(let i=0;i<n;i++)if(e[r+i]!==t[i]){o=!1;break}if(o)return r}return-1}(s,(new TextEncoder).encode("AIPrivateData")))return{ext:"ai",mime:"application/postscript"}}}catch(a){if(!(a instanceof E))throw a}return{ext:"pdf",mime:"application/pdf"}}if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){const c=await this.readTiffHeader(!1);if(c)return c}if(this.check([77,77])){const l=await this.readTiffHeader(!0);if(l)return l}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function d(){const t=await e.peekNumber(f);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const o=new Uint8Array(n+1);return await e.readBuffer(o),o}async function u(){const e=await d(),t=await d();t[0]^=128>>t.length-1;const r=Math.min(6,t.length),n=new DataView(e.buffer),o=new DataView(t.buffer,t.length-r,r);return{id:Ee(n),len:Ee(o)}}async function p(t){for(;t>0;){const r=await u();if(17026===r.id)return(await e.readToken(new _(r.len))).replaceAll(/\00.*$/g,"");await e.ignore(r.len),--t}}const m=await u();switch(await p(m.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1"))return{ext:"parquet",mime:"application/x-parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190]))return{ext:"class",mime:"application/java-vm"};if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(0===this.buffer[6]||1===this.buffer[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){const h=new _(4,"latin1").get(this.buffer,2);if(h.match("^d*")&&h>=1e3&&h<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new _(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&["\n","\r","\t"," ","\0"].some((e=>this.checkString(e,{offset:6}))))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){async function y(){return{length:await e.readToken(v),type:await e.readToken(new _(4,"latin1"))}}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(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&96&this.buffer[8]){const w=new _(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(w){case"avif":case"avis":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 w.startsWith("3g")?w.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){async function S(){const t=new Uint8Array(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(b))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const $=await S();let T=$.size-24;if(ke($.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const O=new Uint8Array(16);if(T-=await e.readBuffer(O),ke(O,[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(ke(O,[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(T)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new _(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(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.check([0,60,0,63,0,120,0,109,0,108],{offset:2})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){const k=new DataView(this.buffer.buffer).getUint32(12,!0);if(k>12&&this.buffer.length>=k+16)try{const x=(new TextDecoder).decode(this.buffer.slice(16,k+16));if(JSON.parse(x).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}return this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:this.checkString("SCRM",{offset:44})?{ext:"s3m",mime:"audio/x-s3m"}:this.check([71])&&this.check([71],{offset:188})||this.check([71],{offset:4})&&this.check([71],{offset:196})?{ext:"mts",mime:"video/mp2t"}:this.check([66,79,79,75,77,79,66,73],{offset:60})?{ext:"mobi",mime:"application/x-mobipocket-ebook"}:this.check([68,73,67,77],{offset:128})?{ext:"dcm",mime:"application/dicom"}:this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70])?{ext:"lnk",mime:"application/x.ms.shortcut"}:this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0])?{ext:"alias",mime:"application/x.apple.alias"}:this.checkString("Kaydara FBX Binary \0")?{ext:"fbx",mime:"application/x.autodesk.fbx"}:this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8}))?{ext:"eot",mime:"application/vnd.ms-fontobject"}:this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29])?{ext:"indd",mime:"application/x-indesign"}:(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),function(e,t=0){const r=Number.parseInt(new _(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.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}(this.buffer)?{ext:"tar",mime:"application/x-tar"}:this.check([255,254])?this.check([60,0,63,0,120,0,109,0,108,0],{offset:2})?{ext:"xml",mime:"application/xml"}:this.check([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],{offset:2})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:void 0:this.checkString("-----BEGIN PGP MESSAGE-----")?{ext:"pgp",mime:"application/pgp-encrypted"}:void 0)};detectImprecise=async e=>{if(this.buffer=new Uint8Array($e),await e.peekBuffer(this.buffer,{length:Math.min(8,e.fileInfo.size),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(this.buffer.length>=2&&this.check([255,224],{offset:0,mask:[255,224]})){if(this.check([16],{offset:1,mask:[22]}))return this.check([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}};async readTiffTag(e){const t=await this.tokenizer.readToken(e?y:h);switch(this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"}}}async readTiffIFD(e){const t=await this.tokenizer.readToken(e?y:h);for(let r=0;r<t;++r){const t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){const t=(e?y:h).get(this.buffer,2),r=(e?w:g).get(this.buffer,4);if(42===t){if(r>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r>=8){const t=(e?y:h).get(this.buffer,8),r=(e?y:h).get(this.buffer,10);if(28===t&&254===r||31===t&&11===r)return{ext:"nef",mime:"image/x-nikon-nef"}}}return await this.tokenizer.ignore(r),await this.readTiffIFD(e)??{ext:"tif",mime:"image/tiff"}}if(43===t)return{ext:"tif",mime:"image/tiff"}}}new Set(["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","elf","macho","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ttc","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","j2c","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","jls","pst","dwg","parquet","class","arj","cpio","ace","avro","icc","fbx","vsdx","vtt","apk","drc","lz4","potx","xltx","dotx","xltm","ott","ots","otp","odg","otg","xlsm","docm","dotm","potm","pptm","jar","rm"]),new Set(["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/wav","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","video/ogg","audio/ogg","audio/ogg; codecs=opus","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-elf","application/x-mach-binary","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","font/collection","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/j2c","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","text/vtt","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","image/jls","application/vnd.ms-outlook","image/vnd.dwg","application/x-parquet","application/java-vm","application/x-arj","application/x-cpio","application/x-ace-compressed","application/avro","application/vnd.iccprofile","application/x.autodesk.fbx","application/vnd.visio","application/vnd.android.package-archive","application/vnd.google.draco","application/x-lz4","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-excel.template.macroenabled.12","application/vnd.oasis.opendocument.text-template","application/vnd.oasis.opendocument.spreadsheet-template","application/vnd.oasis.opendocument.presentation-template","application/vnd.oasis.opendocument.graphics","application/vnd.oasis.opendocument.graphics-template","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-word.document.macroEnabled.12","application/vnd.ms-word.template.macroEnabled.12","application/vnd.ms-powerpoint.template.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/java-archive","application/vnd.rn-realmedia"]);const Pe={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 l("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 l("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 l("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 Te(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),u=await Te(d);if(i=u?.mime,!u||!t.includes(i))throw new o("Le type du fichier est invalide.");a.path=`${Date.now()}.${u.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 s.e(931).then(s.bind(s,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 s.e(931).then(s.bind(s,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 p).toString()};class Ae{#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:Ae.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:Ae.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 Ae.entityType}static fromServerData(e,t,r){const n=new Ae(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:Ae.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(Ae.prototype,Pe,u);const Ce={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 c)throw new c("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)))}},je={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 c(`Le slug ${this.slug} ne correspond pas à un ${e}`,200,t);this._id(t.contextId)}catch(t){throw t instanceof c?t?.responseData?.contextType!==e?t:new c(`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()}})}},Ne={async getNews(e={}){e.pathParams={type:this.getEntityType(),id:this.id};const t=await this.endpointApi.getNews(e);if(!Array.isArray(t))throw new c("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 Ie{#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:Ie.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:Ie.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 Ie.entityType}static fromServerData(e,t,r){const n=new Ie(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:Ie.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 Ie.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 Ie.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(Ie.prototype,Pe,je,Ce,Ne,u);class De{#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:De.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 De.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:De.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 De.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 De.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 De(t,{},r);n.#r={...e};const{draft:o,proxy:i}=n.buildDraftAndProxy({data:{...e,...n.defaultFields},serverData:n.#r,constant:De.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 De(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(De.prototype,Pe,je,Ce,Ne,u);class Re{#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:Re.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:Re.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 Re.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 Re.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 c)throw new c("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 c("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:Re,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:Re,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 c("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:Re,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:Re,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 c("Erreur lors de la récupération des actualités.",500,t);const r=t.map((e=>this.deps.News.fromServerData(e,this,{User:Re,EndpointApi:this.deps.EndpointApi})));return this._createFilteredProxy(r)}async news(e={}){try{const t=new this.deps.News(this,e,{User:Re,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(Re.prototype,je,Pe,{},u);var ze=s(7007);const Le=(e,t)=>1===t?e:`${e}s`,Me=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},Fe=e=>{switch(e[0]){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}},Ue=(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]}`,qe={"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"},Be={fieldLabels:"title",includeOriginalError:!1,includeData:!1};class Ve extends Error{constructor(e,t={}){super(),this.options={},this.redundant=!1,this.options={...Be,...t},this.pointer=e.instancePath,this.path=Me(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 ${Me(e).replace(/^\$/,"")}`;case"jsonPath":return`the value at ${Me(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: ${Ue(e,"or")}`}case"type":{const t=Array.isArray(n.type)?n.type:n.type.split(","),r=Ue(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`${Fe(t)} ${t}`}})(e);return`${c} must be ${Fe(r)} ${r} but it was ${o}`}case"minLength":{const t=n.limit,r=Le("character",t),o=e.length;return`${c} must be ${t} ${r} or more but it was ${o} ${Le("character",o)}`}case"maxLength":{const t=n.limit,r=Le("character",t),o=e.length;return`${c} must be ${t} ${r} or fewer but it was ${o} ${Le("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 ${qe[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 Ge extends Error{constructor(e,t={}){super(),this.name="AggregateAjvError",this.errors=(null!=e?e:[]).map((e=>new Ve(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 Ke=s(3282),Je=s(8182);function He(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ze}=Object.prototype,{getPrototypeOf:We}=Object,Ye=(Xe=Object.create(null),e=>{const t=Ze.call(e);return Xe[t]||(Xe[t]=t.slice(8,-1).toLowerCase())});var Xe;const Qe=e=>(e=e.toLowerCase(),t=>Ye(t)===e),et=e=>t=>typeof t===e,{isArray:tt}=Array,rt=et("undefined"),nt=Qe("ArrayBuffer"),ot=et("string"),it=et("function"),st=et("number"),at=e=>null!==e&&"object"==typeof e,ct=e=>{if("object"!==Ye(e))return!1;const t=We(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},lt=Qe("Date"),dt=Qe("File"),ut=Qe("Blob"),pt=Qe("FileList"),mt=Qe("URLSearchParams"),[ft,ht,yt,gt]=["ReadableStream","Request","Response","Headers"].map(Qe);function wt(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),tt(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 vt(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 bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,_t=e=>!rt(e)&&e!==bt,Et=(St="undefined"!=typeof Uint8Array&&We(Uint8Array),e=>St&&e instanceof St);var St;const $t=Qe("HTMLFormElement"),Tt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ot=Qe("RegExp"),kt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};wt(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},xt=Qe("AsyncFunction"),Pt=(At="function"==typeof setImmediate,Ct=it(bt.postMessage),At?setImmediate:Ct?(jt=`axios@${Math.random()}`,Nt=[],bt.addEventListener("message",(({source:e,data:t})=>{e===bt&&t===jt&&Nt.length&&Nt.shift()()}),!1),e=>{Nt.push(e),bt.postMessage(jt,"*")}):e=>setTimeout(e));var At,Ct,jt,Nt;const It="undefined"!=typeof queueMicrotask?queueMicrotask.bind(bt):"undefined"!=typeof process&&process.nextTick||Pt,Dt={isArray:tt,isArrayBuffer:nt,isBuffer:function(e){return null!==e&&!rt(e)&&null!==e.constructor&&!rt(e.constructor)&&it(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||it(e.append)&&("formdata"===(t=Ye(e))||"object"===t&&it(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&nt(e.buffer),t},isString:ot,isNumber:st,isBoolean:e=>!0===e||!1===e,isObject:at,isPlainObject:ct,isReadableStream:ft,isRequest:ht,isResponse:yt,isHeaders:gt,isUndefined:rt,isDate:lt,isFile:dt,isBlob:ut,isRegExp:Ot,isFunction:it,isStream:e=>at(e)&&it(e.pipe),isURLSearchParams:mt,isTypedArray:Et,isFileList:pt,forEach:wt,merge:function e(){const{caseless:t}=_t(this)&&this||{},r={},n=(n,o)=>{const i=t&&vt(r,o)||o;ct(r[i])&&ct(n)?r[i]=e(r[i],n):ct(n)?r[i]=e({},n):tt(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&wt(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(wt(t,((t,n)=>{r&&it(t)?e[n]=He(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&&We(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Ye,kindOfTest:Qe,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(tt(e))return e;let t=e.length;if(!st(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:$t,hasOwnProperty:Tt,hasOwnProp:Tt,reduceDescriptors:kt,freezeMethods:e=>{kt(e,((t,r)=>{if(it(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];it(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 tt(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:vt,global:bt,isContextDefined:_t,isSpecCompliantForm:function(e){return!!(e&&it(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(at(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=tt(e)?[]:{};return wt(e,((e,t)=>{const i=r(e,n+1);!rt(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:xt,isThenable:e=>e&&(at(e)||it(e))&&it(e.then)&&it(e.catch),setImmediate:Pt,asap:It};function Rt(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)}Dt.inherits(Rt,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:Dt.toJSONObject(this.config),code:this.code,status:this.status}}});const zt=Rt.prototype,Lt={};["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=>{Lt[e]={value:e}})),Object.defineProperties(Rt,Lt),Object.defineProperty(zt,"isAxiosError",{value:!0}),Rt.from=(e,t,r,n,o,i)=>{const s=Object.create(zt);return Dt.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Rt.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Mt=Rt;function Ft(e){return Dt.isPlainObject(e)||Dt.isArray(e)}function Ut(e){return Dt.endsWith(e,"[]")?e.slice(0,-2):e}function qt(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ut(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Bt=Dt.toFlatObject(Dt,{},null,(function(e){return/^is[A-Z]/.test(e)})),Vt=function(e,t,r){if(!Dt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Dt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Dt.isUndefined(t[e])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Dt.isSpecCompliantForm(t);if(!Dt.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Dt.isDate(e))return e.toISOString();if(!a&&Dt.isBlob(e))throw new Mt("Blob is not supported. Use a Buffer instead.");return Dt.isArrayBuffer(e)||Dt.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(Dt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Dt.isArray(e)&&function(e){return Dt.isArray(e)&&!e.some(Ft)}(e)||(Dt.isFileList(e)||Dt.endsWith(r,"[]"))&&(a=Dt.toArray(e)))return r=Ut(r),a.forEach((function(e,n){!Dt.isUndefined(e)&&null!==e&&t.append(!0===s?qt([r],n,i):null===s?r:r+"[]",c(e))})),!1;return!!Ft(e)||(t.append(qt(o,r,i),c(e)),!1)}const d=[],u=Object.assign(Bt,{defaultVisitor:l,convertValue:c,isVisitable:Ft});if(!Dt.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Dt.isUndefined(r)){if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),Dt.forEach(r,(function(r,i){!0===(!(Dt.isUndefined(r)||null===r)&&o.call(t,r,Dt.isString(i)?i.trim():i,n,u))&&e(r,n?n.concat(i):[i])})),d.pop()}}(e),t};function Gt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Kt(e,t){this._pairs=[],e&&Vt(e,this,t)}const Jt=Kt.prototype;Jt.append=function(e,t){this._pairs.push([e,t])},Jt.toString=function(e){const t=e?function(t){return e.call(this,t,Gt)}:Gt;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ht=Kt;function Zt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wt(e,t,r){if(!t)return e;const n=r&&r.encode||Zt;Dt.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Dt.isURLSearchParams(t)?t.toString():new Ht(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Yt=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){Dt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Xt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Ht,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},er="undefined"!=typeof window&&"undefined"!=typeof document,tr="object"==typeof navigator&&navigator||void 0,rr=er&&(!tr||["ReactNative","NativeScript","NS"].indexOf(tr.product)<0),nr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,or=er&&window.location.href||"http://localhost",ir={...t,...Qt},sr=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&&Dt.isArray(n)?n.length:i,a?(Dt.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&Dt.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&Dt.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(Dt.isFormData(e)&&Dt.isFunction(e.entries)){const r={};return Dt.forEachEntry(e,((e,n)=>{t(function(e){return Dt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},ar={transitional:Xt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Dt.isObject(e);if(o&&Dt.isHTMLForm(e)&&(e=new FormData(e)),Dt.isFormData(e))return n?JSON.stringify(sr(e)):e;if(Dt.isArrayBuffer(e)||Dt.isBuffer(e)||Dt.isStream(e)||Dt.isFile(e)||Dt.isBlob(e)||Dt.isReadableStream(e))return e;if(Dt.isArrayBufferView(e))return e.buffer;if(Dt.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 Vt(e,new ir.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ir.isNode&&Dt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Dt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Vt(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(Dt.isString(e))try{return(0,JSON.parse)(e),Dt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ar.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Dt.isResponse(e)||Dt.isReadableStream(e))return e;if(e&&Dt.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 Mt.from(e,Mt.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:ir.classes.FormData,Blob:ir.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Dt.forEach(["delete","get","head","post","put","patch"],(e=>{ar.headers[e]={}}));const cr=ar,lr=Dt.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"]),dr=Symbol("internals");function ur(e){return e&&String(e).trim().toLowerCase()}function pr(e){return!1===e||null==e?e:Dt.isArray(e)?e.map(pr):String(e)}function mr(e,t,r,n,o){return Dt.isFunction(n)?n.call(this,t,r):(o&&(t=r),Dt.isString(t)?Dt.isString(n)?-1!==t.indexOf(n):Dt.isRegExp(n)?n.test(t):void 0:void 0)}class fr{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ur(t);if(!o)throw new Error("header name must be a non-empty string");const i=Dt.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=pr(e))}const i=(e,t)=>Dt.forEach(e,((e,r)=>o(e,r,t)));if(Dt.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Dt.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]&&lr[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(Dt.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=ur(e)){const r=Dt.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(Dt.isFunction(t))return t.call(this,e,r);if(Dt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ur(e)){const r=Dt.findKey(this,e);return!(!r||void 0===this[r]||t&&!mr(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ur(e)){const o=Dt.findKey(r,e);!o||t&&!mr(0,r[o],o,t)||(delete r[o],n=!0)}}return Dt.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&&!mr(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Dt.forEach(this,((n,o)=>{const i=Dt.findKey(r,o);if(i)return t[i]=pr(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]=pr(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Dt.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Dt.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[dr]=this[dr]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ur(e);t[n]||(function(e,t){const r=Dt.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 Dt.isArray(e)?e.forEach(n):n(e),this}}fr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Dt.reduceDescriptors(fr.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Dt.freezeMethods(fr);const hr=fr;function yr(e,t){const r=this||cr,n=t||r,o=hr.from(n.headers);let i=n.data;return Dt.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function gr(e){return!(!e||!e.__CANCEL__)}function wr(e,t,r){Mt.call(this,null==e?"canceled":e,Mt.ERR_CANCELED,t,r),this.name="CanceledError"}Dt.inherits(wr,Mt,{__CANCEL__:!0});const vr=wr;function br(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Mt("Request failed with status code "+r.status,[Mt.ERR_BAD_REQUEST,Mt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const _r=(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)},Er=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Sr=e=>(...t)=>Dt.asap((()=>e(...t))),$r=ir.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ir.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ir.origin),ir.navigator&&/(msie|trident)/i.test(ir.navigator.userAgent)):()=>!0,Tr=ir.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];Dt.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Dt.isString(n)&&s.push("path="+n),Dt.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 Or(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 kr=e=>e instanceof hr?{...e}:e;function xr(e,t){t=t||{};const r={};function n(e,t,r,n){return Dt.isPlainObject(e)&&Dt.isPlainObject(t)?Dt.merge.call({caseless:n},e,t):Dt.isPlainObject(t)?Dt.merge({},t):Dt.isArray(t)?t.slice():t}function o(e,t,r,o){return Dt.isUndefined(t)?Dt.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Dt.isUndefined(t))return n(void 0,t)}function s(e,t){return Dt.isUndefined(t)?Dt.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(kr(e),kr(t),0,!0)};return Dt.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,s=i(e[n],t[n],n);Dt.isUndefined(s)&&i!==a||(r[n]=s)})),r}const Pr=e=>{const t=xr({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=hr.from(a),t.url=Wt(Or(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Dt.isFormData(n))if(ir.hasStandardBrowserEnv||ir.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(ir.hasStandardBrowserEnv&&(o&&Dt.isFunction(o)&&(o=o(t)),o||!1!==o&&$r(t.url))){const e=i&&s&&Tr.read(s);e&&a.set(i,e)}return t},Ar="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Pr(e);let o=n.data;const i=hr.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=hr.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());br((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 Mt("Request aborted",Mt.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Mt("Network Error",Mt.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||Xt;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Mt(t,o.clarifyTimeoutError?Mt.ETIMEDOUT:Mt.ECONNABORTED,e,h)),h=null},void 0===o&&i.setContentType(null),"setRequestHeader"in h&&Dt.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),Dt.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),u&&"json"!==u&&(h.responseType=n.responseType),m&&([c,d]=_r(m,!0),h.addEventListener("progress",c)),p&&h.upload&&([a,l]=_r(p),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{h&&(r(!t||t.type?new vr(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===ir.protocols.indexOf(g)?r(new Mt("Unsupported protocol "+g+":",Mt.ERR_BAD_REQUEST,e)):h.send(o||null)}))},Cr=(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 Mt?t:new vr(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new Mt(`timeout ${t} of ms exceeded`,Mt.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=()=>Dt.asap(s),a}},jr=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},Nr=(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*jr(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})},Ir="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Dr=Ir&&"function"==typeof ReadableStream,Rr=Ir&&("function"==typeof TextEncoder?(zr=new TextEncoder,e=>zr.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var zr;const Lr=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Mr=Dr&&Lr((()=>{let e=!1;const t=new Request(ir.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Fr=Dr&&Lr((()=>Dt.isReadableStream(new Response("").body))),Ur={stream:Fr&&(e=>e.body)};var qr;Ir&&(qr=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ur[e]&&(Ur[e]=Dt.isFunction(qr[e])?t=>t[e]():(t,r)=>{throw new Mt(`Response type '${e}' is not supported`,Mt.ERR_NOT_SUPPORT,r)})})));const Br=Ir&&(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}=Pr(e);l=l?(l+"").toLowerCase():"text";let m,f=Cr([o,i&&i.toAbortSignal()],s);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(c&&Mr&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=Dt.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Dt.isBlob(e))return e.size;if(Dt.isSpecCompliantForm(e)){const t=new Request(ir.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Dt.isArrayBufferView(e)||Dt.isArrayBuffer(e)?e.byteLength:(Dt.isURLSearchParams(e)&&(e+=""),Dt.isString(e)?(await Rr(e)).byteLength:void 0)})(t):r})(d,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(Dt.isFormData(n)&&(e=r.headers.get("content-type"))&&d.setContentType(e),r.body){const[e,t]=Er(y,_r(Sr(c)));n=Nr(r.body,65536,e,t)}}Dt.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=Fr&&("stream"===l||"response"===l);if(Fr&&(a||s&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Dt.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&Er(t,_r(Sr(a),!0))||[];i=new Response(Nr(i.body,65536,r,(()=>{n&&n(),h&&h()})),e)}l=l||"text";let g=await Ur[Dt.findKey(Ur,l)||"text"](i,e);return!s&&h&&h(),await new Promise(((t,r)=>{br(t,r,{data:g,headers:hr.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 Mt("Network Error",Mt.ERR_NETWORK,e,m),{cause:t.cause||t});throw Mt.from(t,t&&t.code,e,m)}}),Vr={http:null,xhr:Ar,fetch:Br};Dt.forEach(Vr,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Gr=e=>`- ${e}`,Kr=e=>Dt.isFunction(e)||null===e||!1===e,Jr=e=>{e=Dt.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,!Kr(r)&&(n=Vr[(t=String(r)).toLowerCase()],void 0===n))throw new Mt(`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(Gr).join("\n"):" "+Gr(e[0]):"as no adapter specified";throw new Mt("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function Hr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vr(null,e)}function Zr(e){return Hr(e),e.headers=hr.from(e.headers),e.data=yr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jr(e.adapter||cr.adapter)(e).then((function(t){return Hr(e),t.data=yr.call(e,e.transformResponse,t),t.headers=hr.from(t.headers),t}),(function(t){return gr(t)||(Hr(e),t&&t.response&&(t.response.data=yr.call(e,e.transformResponse,t.response),t.response.headers=hr.from(t.response.headers))),Promise.reject(t)}))}const Wr={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Wr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Yr={};Wr.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 Mt(n(o," has been removed"+(t?" in "+t:"")),Mt.ERR_DEPRECATED);return t&&!Yr[o]&&(Yr[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)}},Wr.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Xr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Mt("options must be an object",Mt.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 Mt("option "+i+" must be "+r,Mt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Mt("Unknown option "+i,Mt.ERR_BAD_OPTION)}},validators:Wr},Qr=Xr.validators;class en{constructor(e){this.defaults=e,this.interceptors={request:new Yt,response:new Yt}}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=xr(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Xr.assertOptions(r,{silentJSONParsing:Qr.transitional(Qr.boolean),forcedJSONParsing:Qr.transitional(Qr.boolean),clarifyTimeoutError:Qr.transitional(Qr.boolean)},!1),null!=n&&(Dt.isFunction(n)?t.paramsSerializer={serialize:n}:Xr.assertOptions(n,{encode:Qr.function,serialize:Qr.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Xr.assertOptions(t,{baseUrl:Qr.spelling("baseURL"),withXsrfToken:Qr.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Dt.merge(o.common,o[t.method]);o&&Dt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=hr.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=[Zr.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=Zr.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 Wt(Or((e=xr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Dt.forEach(["delete","get","head","options"],(function(e){en.prototype[e]=function(t,r){return this.request(xr(r||{},{method:e,url:t,data:(r||{}).data}))}})),Dt.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(xr(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}en.prototype[e]=t(),en.prototype[e+"Form"]=t(!0)}));const tn=en;class rn{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 vr(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 rn((function(t){e=t})),cancel:e}}}const nn=rn,on={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(on).forEach((([e,t])=>{on[t]=e}));const sn=on,an=function e(t){const r=new tn(t),n=He(tn.prototype.request,r);return Dt.extend(n,tn.prototype,r,{allOwnKeys:!0}),Dt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(xr(t,r))},n}(cr);an.Axios=tn,an.CanceledError=vr,an.CancelToken=nn,an.isCancel=gr,an.VERSION="1.8.4",an.toFormData=Vt,an.AxiosError=Mt,an.Cancel=an.CanceledError,an.all=function(e){return Promise.all(e)},an.spread=function(e){return function(t){return e.apply(null,t)}},an.isAxiosError=function(e){return Dt.isObject(e)&&!0===e.isAxiosError},an.mergeConfig=xr,an.AxiosHeaders=hr,an.formToJSON=e=>sr(Dt.isHTMLForm(e)?new FormData(e):e),an.getAdapter=Jr,an.HttpStatusCode=sn,an.default=an;const cn=an;var ln=s(1111);const dn="axios-retry";function un(e){return!e.response&&!!e.code&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&ln(e)}const pn=["get","head","options"],mn=pn.concat(["put","delete"]);function fn(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function hn(e){return!!e.config?.method&&fn(e)&&-1!==mn.indexOf(e.config.method)}function yn(e){return un(e)||hn(e)}function gn(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 wn={retries:3,retryCondition:yn,retryDelay:function(e=0,t=void 0){return Math.max(0,gn(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function vn(e,t,r=!1){const n=function(e,t){return{...wn,...t,...e[dn]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e[dn]=n,n}const bn=(e,t)=>{const r=e.interceptors.request.use((e=>(vn(e,t,!0),e[dn]?.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=vn(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}};bn.isNetworkError=un,bn.isSafeRequestError=function(e){return!!e.config?.method&&fn(e)&&-1!==pn.indexOf(e.config.method)},bn.isIdempotentRequestError=hn,bn.isNetworkOrIdempotentRequestError=yn,bn.exponentialDelay=function(e=0,t=void 0,r=100){const n=2**e*r,o=Math.max(n,gn(t));return o+.2*o*Math.random()},bn.linearDelay=function(e=100){return(t=0,r=void 0)=>{const n=t*e;return Math.max(n,gn(r))}},bn.isRetryableError=fn;const _n=bn;var En=s(6022);class Sn extends Error{}Sn.prototype.name="InvalidTokenError";var $n=s(4874);const Tn={_looksLikeObjectID:e=>24===e.length&&/^[0-9a-f]*$/.test(e),ObjectID:class{constructor(e){if(e){if(e=e.toLowerCase(),!Tn._looksLikeObjectID(e))throw new Error("Invalid hexadecimal string for creating an ObjectID");this._str=e}}equals(e){return e instanceof Tn.ObjectID&&this.valueOf()===e.valueOf()}toString(){return`ObjectID("${this._str}")`}clone(){return new Tn.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()}}},On=Tn,kn={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"}},xn=[{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:kn.common1,email:kn.common2,isInvitation:kn.common3,mode:kn.common1,name:kn.common1,pendingUserId:kn.common1,pwd:kn.common1,username:kn.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:kn.common2,password:kn.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:kn.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:kn.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:kn.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:kn.common1,newPassword2:kn.common1,oldPassword:kn.common1,scope:{default:"",type:["string"]},userId:kn.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:kn.common6,postActions:[{type:"resetSession"},{event:"accountDeleted",path:null,type:"emitEvent"}],request:kn.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:kn.common11}},if:{properties:{typeEntity:kn.common12}},then:{properties:{idEntity:kn.common5}}},{if:{properties:{type:{enum:["birthDate","email","locality","phone","directory"]},typeEntity:kn.common12}},then:{properties:{value:{enum:["private","public","mask"],type:"string"}}}},{if:{properties:{type:{enum:["activitypub","isOpenData"]},typeEntity:kn.common12}},then:kn.common13},{if:{properties:{type:{enum:["isOpenData","isOpenEdition","private","feedback"]},typeEntity:{not:kn.common12}}},then:kn.common13}],properties:{idEntity:kn.common1,type:kn.common1,typeEntity:kn.common15,value:kn.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:[kn.common17,{anyOf:[{properties:{description:kn.common23},required:["description"]},{properties:{shortDescription:kn.common23},required:["shortDescription"]}]}],properties:{block:{const:"descriptions",default:"descriptions",type:"string"},descMentions:kn.common10,description:kn.common1,id:kn.common1,scope:{default:"",type:["string","null"]},shortDescription:kn.common1,typeElement:kn.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:kn.common2,name:kn.common1,tags:kn.common25,url:kn.common4}},allOf:[{if:kn.common20,then:{additionalProperties:!1,anyOf:[kn.common28,{properties:{birthDate:kn.common23},required:["birthDate"]},{properties:{fixe:kn.common23},required:["fixe"]},{properties:{mobile:kn.common23},required:["mobile"]},kn.common30,kn.common32,kn.common34],properties:{birthDate:{format:"date",type:"string"},block:kn.common36,email:kn.common37,fixe:kn.common1,id:kn.common5,mobile:kn.common1,name:kn.common38,scope:kn.common10,tags:kn.common39,typeElement:kn.common15,url:kn.common40}}},{if:{properties:{typeElement:kn.common41}},then:{additionalProperties:!1,anyOf:[kn.common28,kn.common30,kn.common32,kn.common34,{properties:{avancement:kn.common23},required:["avancement"]},{properties:{parent:kn.common23},required:["parent"]}],properties:{avancement:{enum:["abandoned","concept","development","production","started","testing","idea","mature","qa","finished"],type:"string"},block:kn.common36,email:kn.common37,id:kn.common1,name:kn.common38,parent:{additionalProperties:!1,patternProperties:{"^[a-fA-F0-9]{24}$":{additionalProperties:!1,properties:kn.common42,required:["type","name"],type:"object"}},type:"object"},scope:kn.common10,tags:kn.common39,typeElement:kn.common15,url:kn.common40}}},{if:{properties:{typeElement:kn.common43}},then:{additionalProperties:!1,anyOf:[kn.common28,kn.common30,kn.common32,kn.common34,{properties:{type:kn.common23},required:["type"]}],properties:{block:kn.common36,email:kn.common37,id:kn.common1,name:kn.common38,scope:kn.common10,tags:kn.common39,type:{enum:["NGO","Cooperative","LocalBusiness","GovernmentOrganizationautre"],type:"string"},typeElement:kn.common15,url:kn.common40}}}],properties:{block:kn.common36,id:kn.common1,scope:kn.common10,typeElement:kn.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:[kn.common27,kn.common4]}},allOf:[kn.common17,{anyOf:[{properties:{gitlab:kn.common23},required:["gitlab"]},{properties:{github:kn.common23},required:["github"]},{properties:{twitter:kn.common23},required:["twitter"]},{properties:{facebook:kn.common23},required:["facebook"]},{properties:{instagram:kn.common23},required:["instagram"]},{properties:{diaspora:kn.common23},required:["diaspora"]},{properties:{mastodon:kn.common23},required:["mastodon"]},{properties:{telegram:kn.common23},required:["telegram"]},{properties:{signal:kn.common23},required:["signal"]}]}],properties:{block:{const:"network",default:"network",type:"string"},diaspora:kn.common44,facebook:kn.common44,github:kn.common44,gitlab:kn.common44,id:kn.common1,instagram:kn.common44,mastodon:kn.common44,scope:kn.common10,signal:kn.common44,telegram:kn.common44,twitter:kn.common44,typeElement:kn.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:kn.common45,if:kn.common20,properties:{address:kn.common48,block:{const:"localities",default:"localities",type:"string"},geo:kn.common52,geoPosition:kn.common56,id:kn.common1,scope:kn.common10,typeElement:kn.common15},required:["block","typeElement","id","address"],then:kn.common62,type:"object"}},{auth:"bearer",constant:"UPDATE_BLOCK_SLUG",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updateblock/",request:{else:kn.common45,if:kn.common20,properties:{block:kn.common36,id:kn.common1,scope:kn.common10,slug:kn.common65,typeElement:kn.common15},required:["block","typeElement","id","slug"],then:kn.common62,type:"object"}},{auth:"bearer",constant:"CHECK",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/slug/check",request:{additionalProperties:!1,else:kn.common45,if:kn.common66,properties:{block:kn.common36,id:kn.common1,slug:kn.common65,type:kn.common15},required:["block","type","id","slug"],then:kn.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:kn.common68,request:{additionalProperties:!1,properties:{profil_avatar:kn.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:kn.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:kn.common78,if:kn.common80,properties:{listInvite:{additionalProperties:!1,patternProperties:{"^(citoyens|projects|organizations)$":{additionalProperties:!1,patternProperties:{"^[0-9a-fA-F]{24}$":{additionalProperties:!1,properties:{name:kn.common1},required:["name"],type:"object"}},type:"object"}},type:"object"},parentId:kn.common1,parentType:kn.common15},required:["parentId","parentType","listInvite"],then:kn.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:kn.common45,if:kn.common66,properties:{id:kn.common1,isLive:kn.common84,type:kn.common15},required:["isLive","type","id"],then:kn.common62,type:"object"},request:{additionalProperties:!1,properties:{dateLimit:{default:0,type:"integer"},indexStep:{default:12,type:"integer"},search:{additionalProperties:!1,properties:{name:kn.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:kn.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:[kn.common85,kn.common86,kn.common87],else:kn.common78,if:kn.common80,properties:{json:kn.common60,markdownActive:kn.common84,mediaFile:kn.common88,mediaImg:kn.common90,mentions:kn.common92,parentId:kn.common1,parentType:kn.common15,scope:kn.common96,tags:kn.common25,text:kn.common1,type:kn.common97},required:["scope","markdownActive","parentId","parentType","type","json"],then:kn.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:kn.common68,request:{additionalProperties:!1,properties:{newsImage:kn.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:kn.common68,request:{additionalProperties:!1,properties:{newsFile:kn.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:kn.common98,request:{additionalProperties:!1,properties:{isLive:kn.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:[kn.common85,kn.common86,kn.common87],else:kn.common78,if:kn.common80,properties:{idNews:kn.common11,markdownActive:kn.common84,mediaFile:kn.common88,mediaImg:kn.common90,mentions:kn.common92,parentId:kn.common1,parentType:kn.common15,scope:kn.common96,tags:kn.common25,text:kn.common1,type:kn.common97},required:["idNews","scope","markdownActive","parentId","parentType","type"],then:kn.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:kn.common47}},if:{properties:{childType:kn.common12}},properties:{childId:kn.common11,childType:kn.common15,comment:kn.common1,connectType:{const:"share",default:"share",type:"string"},parentId:kn.common11,parentType:kn.common97},required:["parentId","parentType","childId","childType","connectType"],then:{properties:{childId:kn.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:kn.common100},{auth:"bearer",constant:"ADD_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/save",request:{additionalProperties:!1,properties:{argval:kn.common10,contextId:kn.common11,contextType:kn.common102,mentions:kn.common103,parentCommentId:kn.common11,path:kn.common10,text:kn.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:kn.common98},{auth:"bearer",constant:"UPDATE_COMMENTS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/comment/update",request:{additionalProperties:!1,properties:{id:kn.common11,params:{properties:{mentions:kn.common103,text:kn.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:kn.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:kn.common100},{auth:"none",constant:"GLOBAL_AUTOCOMPLETE",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/search/globalautocomplete",request:{additionalProperties:!1,properties:{count:kn.common60,countType:{const:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],default:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative","projects","citoyens","poi"],items:kn.common106,type:"array"},fediverse:kn.common107,filters:kn.common108,indexMin:{const:0,default:0,type:"number"},indexStep:kn.common59,initType:kn.common108,locality:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":{additionalProperties:!1,properties:{id:kn.common1,type:{enum:["cities","level1"],type:"string"}},required:["id","type"],type:"object"}},type:"object"},name:kn.common1,notSourceKey:kn.common60,ranges:{additionalProperties:!1,patternProperties:{"^[^\\s]+$":kn.common109},type:"object"},searchTags:kn.common26,searchType:{items:kn.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:kn.common108,name:kn.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:kn.common111,name:kn.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:kn.common60,countType:kn.common112,fediverse:kn.common107,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@userId":kn.common114,"parent.@userId":kn.common114},"links.contributors.@userId":kn.common114},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common115},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common115,"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common115},type:"object"}},required:["$or"],type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common76,request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common112,fediverse:kn.common107,filters:{additionalProperties:!1,default:{$or:{"links.contributors.@{pathParams.id}":kn.common114,"parent.@{pathParams.id}":kn.common114},"links.contributors.@{pathParams.id}":kn.common114},patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115},properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:{"^links\\.contributors\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115,"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115},type:"object"}},required:["$or"],type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common119,fediverse:kn.common107,filters:{additionalProperties:!1,default:{"parent.@userId":kn.common114},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common115},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common76,request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common119,fediverse:kn.common107,filters:{additionalProperties:!1,default:{"parent.@{pathParams.id}":kn.common114},patternProperties:{"^parent\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common121,fediverse:kn.common107,filters:{additionalProperties:!1,default:{"links.members.@userId":kn.common114,"links.members.@userId.isInviting":kn.common123,"links.members.@userId.toBeValidated":kn.common123},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common115,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":kn.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":kn.common124},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common45,if:kn.common66,properties:{id:kn.common1,type:{default:"citoyens",enum:["citoyens","organizations"],type:"string"}},required:["type","id"],then:kn.common62,type:"object"},request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common121,fediverse:kn.common107,filters:{additionalProperties:!1,default:{"links.members.@{pathParams.id}":kn.common114,"links.members.@{pathParams.id}.isInviting":kn.common123,"links.members.@{pathParams.id}.toBeValidated":kn.common123},patternProperties:{"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":kn.common124,"^links\\.members\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":kn.common124},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common127,fediverse:kn.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+)$":kn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":kn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":kn.common129,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":kn.common131,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":kn.common124},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common98,request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common127,fediverse:kn.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}":kn.common114,"links.memberOf.@{pathParams.id}.isInviting":kn.common123,"links.memberOf.@{pathParams.id}.toBeValidated":kn.common123},patternProperties:{"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":kn.common115,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":kn.common129,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":kn.common131,"^links\\.memberOf\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":kn.common129},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common6,request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common134,fediverse:kn.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}":kn.common114,"links.friends.@{pathParams.id}.isInviting":kn.common123,"links.friends.@{pathParams.id}.toBeValidated":kn.common123},patternProperties:{"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":kn.common129,"^links\\.friends\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":kn.common129},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common136,fediverse:kn.common107,filters:{additionalProperties:!1,allOf:[kn.common138],default:{"links.followers.@userId":kn.common114,"links.followers.@{userId}.isInviting":kn.common123,"links.followers.@{userId}.toBeValidated":kn.common123},patternProperties:kn.common141,type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common6,request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common136,fediverse:kn.common107,filters:{additionalProperties:!1,allOf:[kn.common138],default:{"links.followers.@{pathParams.id}":kn.common114,"links.followers.@{pathParams.id}.isInviting":kn.common123,"links.followers.@{pathParams.id}.toBeValidated":kn.common123},patternProperties:kn.common141,type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common134,fediverse:kn.common107,filters:{additionalProperties:!1,allOf:[kn.common142],default:{"links.follows.@userId":kn.common114,"links.follows.@{userId}.isInviting":kn.common123,"links.follows.@{userId}.toBeValidated":kn.common123},patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":kn.common124,"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":kn.common124},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common45,if:kn.common66,then:kn.common62}],properties:{id:kn.common1,type:{default:"citoyens",enum:["citoyens","organizations","projects"],type:"string"}},required:["type","id"],type:"object"},request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common134,fediverse:kn.common107,filters:{additionalProperties:!1,allOf:[kn.common142],default:{"links.follows.@{pathParams.id}":kn.common114},maxProperties:1,minProperties:1,patternProperties:{"^links\\.follows\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common127,fediverse:kn.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+)$":kn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isAdmin$":kn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.isInviting$":kn.common129,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.roles$":kn.common131,"^links\\.projects\\.(?:[a-f0-9]{24}|@\\w+)\\.toBeValidated$":kn.common124},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common98,request:{additionalProperties:!1,properties:{count:kn.common60,countType:kn.common127,fediverse:kn.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}":kn.common114,"links.projects.@{pathParams.id}.isInviting":kn.common123,"links.projects.@{pathParams.id}.toBeValidated":kn.common123},patternProperties:{"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))$":kn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isAdmin$":kn.common115,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.isInviting$":kn.common129,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.roles$":kn.common131,"^links\\.projects\\.(?:[a-f0-9]{24}|@(?:\\{[^}]+\\}|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)?))\\.toBeValidated$":kn.common129},type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common145,fediverse:kn.common107,filters:{properties:{$or:{additionalProperties:!1,minProperties:1,patternProperties:{"^issuer\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common115},type:"object"},isParcours:kn.common3,"preferences.private":kn.common107},required:["preferences.private"],type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,searchType:kn.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:kn.common60,countType:kn.common147,fediverse:kn.common107,fields:kn.common145,filters:{oneOf:[{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common149}},{additionalProperties:!1,maxProperties:3,minProperties:3,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)$":kn.common149,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":kn.common152,"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteRecepteur$":kn.common152}},{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:kn.common155},{additionalProperties:!1,maxProperties:1,minProperties:1,properties:{$or:{additionalProperties:!1,maxProperties:2,minProperties:2,patternProperties:kn.common155,type:"object"}},required:["$or"]},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.revoke$":kn.common151}},{additionalProperties:!1,maxProperties:1,minProperties:1,patternProperties:{"badges\\.(?:[a-f0-9]{24}|@\\w+)\\.attenteEmetteur$":kn.common149}}],type:"object"},indexMin:kn.common111,indexStep:kn.common118,initType:kn.common108,locality:kn.common108,name:kn.common1,notSourceKey:kn.common60,ranges:{additionalProperties:!1,default:{Cooperative:kn.common156,GovernmentOrganization:kn.common156,Group:kn.common156,LocalBusiness:kn.common156,NGO:kn.common156,citoyens:kn.common156,projects:kn.common156},maxProperties:7,minProperties:7,patternProperties:{"^[a-zA-Z][a-zA-Z0-9]*$":kn.common109},type:"object"},searchType:kn.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:[kn.common157,kn.common161,kn.common167,{if:kn.common173,then:{properties:{connectType:{default:"attendee",enum:["attendee","connect"]}}}}],properties:{childId:kn.common176,childType:kn.common177,connectType:{enum:["admin","member","contributor","attendee","friend","connect"],type:"string"},parentId:kn.common11,parentType:kn.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:[kn.common157,kn.common161,kn.common167,{if:kn.common173,then:{properties:{connectType:{const:"attendee",default:"attendee"}}}}],properties:{childId:kn.common176,childType:kn.common177,connectType:{enum:["admin","member","contributor","attendee","friend"],type:"string"},parentId:kn.common11,parentType:kn.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:kn.common6},{auth:"bearer",constant:"DELETE_FAVORIS",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/updatepathvalue?index={index}",pathParams:{properties:{index:kn.common59},type:"object"},request:{additionalProperties:!1,properties:{collection:kn.common179,id:kn.common180,path:{const:"preferences.search.@{pathParams.index}",default:"preferences.search.@{pathParams.index}",type:"string"},pull:{const:"preferences.search",type:"string"},value:kn.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:kn.common151,collection:kn.common179,id:kn.common180,path:{const:"preferences.search",default:"preferences.search",type:"string"},value:{additionalProperties:!1,properties:{description:kn.common1,locality:{patternProperties:{"^[a-f0-9]{24}$":{additionalProperties:!1,properties:kn.common42,required:["name","type"]}},type:"object"},name:kn.common1,tags:kn.common26,url:kn.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:kn.common48,collection:{const:"organizations",default:"organizations",type:"string"},email:kn.common2,geo:kn.common52,geoPosition:kn.common56,id:kn.common11,key:{const:"organization",default:"organization",type:"string"},name:{minLength:3,type:"string"},preferences:{default:{isOpenData:!0,isOpenEdition:!0},properties:{isOpenData:kn.common84,isOpenEdition:kn.common84},required:["isOpenData","isOpenEdition"],type:"object"},role:{enum:["admin","member"],type:"string"},scope:kn.common108,shortDescription:kn.common1,tags:kn.common26,type:{enum:["NGO","LocalBusiness","Group","GovernmentOrganization","Cooperative"],type:"string"},url:kn.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:kn.common48,collection:{const:"projects",default:"projects",type:"string"},geo:kn.common52,geoPosition:kn.common56,id:kn.common11,key:{const:"project",default:"project",type:"string"},name:kn.common1,parent:kn.common181,preferences:{default:{crowdfunding:!0,isOpenData:!1,isOpenEdition:!1},properties:{crowdfunding:kn.common84,isOpenData:kn.common99,isOpenEdition:kn.common99},required:["isOpenData","isOpenEdition"],type:"object"},public:kn.common84,scope:kn.common108,shortDescription:kn.common1,tags:kn.common26,url:kn.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:kn.common48,collection:kn.common186,description:kn.common1,geo:kn.common52,geoPosition:kn.common56,id:kn.common11,key:kn.common186,name:kn.common1,parent:kn.common181,scope:kn.common108,tags:kn.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:kn.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:kn.common126}},properties:{address:kn.common48,collection:{const:"events",default:"events",type:"string"},email:kn.common2,endDate:kn.common187,geo:kn.common52,geoPosition:kn.common56,id:kn.common11,key:{const:"event",default:"event",type:"string"},name:kn.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:kn.common188,opens:kn.common188},required:["opens","closes"],type:"object"},type:"array"}},required:["dayOfWeek","hours"],type:"object"}]},maxItems:7,minItems:7,type:"array"},organizer:kn.common181,parent:{additionalProperties:!1,patternProperties:kn.common184,type:"object"},preferences:{default:{isOpenData:!1,isOpenEdition:!1},properties:{isOpenData:kn.common99,isOpenEdition:kn.common99},required:["isOpenData","isOpenEdition"],type:"object"},public:kn.common84,recurrency:kn.common99,scope:kn.common108,shortDescription:kn.common1,startDate:kn.common187,tags:kn.common26,timeZone:kn.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:kn.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:kn.common98,request:kn.common8},{auth:"bearer",constant:"DELETE_EVENT",contentType:"application/x-www-form-urlencoded",method:"POST",path:"/co2/element/delete/type/events/id/{id}/",pathParams:kn.common98,request:kn.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:kn.common11,type:kn.common1},required:["type","id"],type:"object"},request:kn.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:kn.common11},required:["folder","ownerId"],type:"object"},request:{additionalProperties:!1,properties:{qqfile:kn.common16,qqfilename:kn.common1,qqtotalfilesize:{type:"integer"},qquuid:kn.common11},required:["qquuid","qqfilename","qqtotalfilesize","qqfile"],type:"object"}}];var Pn=s(1027);En.addType("oid",(e=>new On.ObjectID(e)));class An extends ze.EventEmitter{constructor({baseURL:e,accessToken:t,refreshToken:r,refreshUrl:o="/api/cocolight/refreshtoken",endpoints:i=xn,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 Ke({strict:!1,useDefaults:!0,allErrors:!0,verbose:!0}),Je(this._ajv),this._ajv.addKeyword({keyword:"startBeforeEnd",type:"object",errors:!0,validate:this._startBeforeEndValidate}),this._logger=$n({transport:{target:"pino-pretty",options:{colorize:!0}},level:a?"debug":"info"}),this._client=cn.create({baseURL:e,timeout:s}),c>0&&(_n(this._client,{retries:c,retryDelay:_n.exponentialDelay,retryCondition:e=>_n.isNetworkError(e)||_n.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 Pn.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 Sn("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 Sn(`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 Sn(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new Sn(`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=cn.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]&&An.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]&&An.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,v=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),v=v.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=An.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=An.toURLSearchParams(t)),this._logger.debug(`[ApiClient] callEndpoint: ${e} -> ${v}, method=${h}`);try{const e=await this._client.request({url:v,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 Ge(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 c(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 c(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?En.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 Cn{constructor(e){this.client=new An(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 Re(this.client,r.data.user,{EndpointApi:d,Organization:Ie,Project:De,News:Ae}),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 Re(this.client,{id:this.client.userId},{EndpointApi:d,Organization:Ie,Project:De,News:Ae}),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 c(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 c(t.data.msg,t.status,t.data);return t.data}))}}class jn{static async userLogin(e,t,r){const n=jn.userApi(r);return await jn.userApiLogin(n,e,t)}static userApi(e){try{return new Cn(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 jn(t,e.client)}{if(!t||!o)throw new r("email and password are required");const n=await e.login(t,o);return new jn(n,e.client)}}catch(e){if(e instanceof n&&e?.details?.error)throw new l(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 l("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 Re(this._client,e,{EndpointApi:d,Organization:Ie,Project:De,News:Ae});return await t.get(),t}return new Re(this._client,e,{EndpointApi:d,Organization:Ie,Project:De,News:Ae})}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 Ie(this._client,e,{EndpointApi:d,User:Re,Project:De,News:Ae});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 De(this._client,e,{User:Re,News:Ae,EndpointApi:d});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 d(this._client)}logout(){this.loggedUser=null,this._client.resetSession(),this._client._logger.info("UserApi: User logged out")}}const Nn={ApiClient:An,Api:jn,error:e,tokenStorageStrategy:{createDefaultTokenStorageStrategy:async function(e="auto"){if("memory"===e)return new Pn.GN;if("localStorage"===e){if("undefined"!=typeof window&&window.localStorage)return new Pn.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 s.e(405).then(s.bind(s,8405));return new e}if("auto"===e){if("undefined"!=typeof window&&window.localStorage)return new Pn.Ge;{const{FileStorageStrategy:e}=await s.e(405).then(s.bind(s,8405));return new e}}},TokenStorageStrategy:Pn.u3}}})(),a.default})()));