From f0caab71b8a9e387df117e8e60e0376541a7af2e Mon Sep 17 00:00:00 2001 From: Pavel Bodiachevskii Date: Fri, 15 Dec 2023 03:44:02 +0400 Subject: [PATCH] feat: up preview version --- .../plugin/idea/_core/AsyncAPISpecificationHtmlRenderer.kt | 4 ++-- .../ui/{default(1.2.6).min.css => default(1.2.9).min.css} | 0 src/main/resources/ui/{index(1.2.6).js => index(1.2.9).js} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/main/resources/ui/{default(1.2.6).min.css => default(1.2.9).min.css} (100%) rename src/main/resources/ui/{index(1.2.6).js => index(1.2.9).js} (82%) diff --git a/src/main/kotlin/com/asyncapi/plugin/idea/_core/AsyncAPISpecificationHtmlRenderer.kt b/src/main/kotlin/com/asyncapi/plugin/idea/_core/AsyncAPISpecificationHtmlRenderer.kt index 4f7468b..c5ac76c 100644 --- a/src/main/kotlin/com/asyncapi/plugin/idea/_core/AsyncAPISpecificationHtmlRenderer.kt +++ b/src/main/kotlin/com/asyncapi/plugin/idea/_core/AsyncAPISpecificationHtmlRenderer.kt @@ -28,8 +28,8 @@ class AsyncAPISpecificationHtmlRenderer { private val urlProvider = service() private val specificationTemplateUrl = "/ui/index.html" - private val specificationTemplateCssUrl = "default(1.2.6).min.css" - private val specificationTemplateJsUrl = "index(1.2.6).js" + private val specificationTemplateCssUrl = "default(1.2.9).min.css" + private val specificationTemplateJsUrl = "index(1.2.9).js" fun render(request: FullHttpRequest, specificationUrl: String?): String { specificationUrl ?: return "specification: not found." diff --git a/src/main/resources/ui/default(1.2.6).min.css b/src/main/resources/ui/default(1.2.9).min.css similarity index 100% rename from src/main/resources/ui/default(1.2.6).min.css rename to src/main/resources/ui/default(1.2.9).min.css diff --git a/src/main/resources/ui/index(1.2.6).js b/src/main/resources/ui/index(1.2.9).js similarity index 82% rename from src/main/resources/ui/index(1.2.6).js rename to src/main/resources/ui/index(1.2.9).js index 942c225..349df1a 100644 --- a/src/main/resources/ui/index(1.2.6).js +++ b/src/main/resources/ui/index(1.2.9).js @@ -29,4 +29,4 @@ || ${a} === "boolean" || ${i} === null`).assign(c,s._`[${i}]`)}}r.else(),h(e),r.endIf(),r.if(s._`${c} !== undefined`,(()=>{r.assign(i,c),function({gen:e,parentData:t,parentDataProperty:n},r){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${n}]`,r)))}(e,c)}))}(e,t,a):h(e)}))}return p};const l=new Set(["string","number","integer","boolean","null"]);function u(e,t,n,r=c.Correct){const i=r===c.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return r===c.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,n?s._`isFinite(${t})`:s.nil)}}function d(e,t,n,r){if(1===e.length)return u(e[0],t,n,r);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,u(e,t,n,r));return i}t.checkDataType=u,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}(e);(0,o.reportError)(t,f)}t.reportTypeError=h},57054:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const r=n(48461),i=n(40950);function o(e,t,n){const{gen:o,compositeRule:s,data:a,opts:c}=e;if(void 0===n)return;const p=r._`${a}${(0,r.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${p}`);let l=r._`${p} === undefined`;"empty"===c.useDefaults&&(l=r._`${l} || ${p} === null || ${p} === ""`),o.if(l,r._`${p} = ${(0,r.stringify)(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:r}=e.schema;if("object"===t&&n)for(const t in n)o(e,t,n[t].default);else"array"===t&&Array.isArray(r)&&r.forEach(((t,n)=>o(e,n,t.default)))}},25700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(57122),i=n(85298),o=n(51134),s=n(85298),a=n(57054),c=n(83134),p=n(75197),l=n(48461),u=n(5077),d=n(77679),f=n(40950),h=n(2024);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},o){i.code.es5?e.func(t,l._`${u.default.data}, ${u.default.valCxt}`,r.$async,(()=>{e.code(l._`"use strict"; ${y(n,i)}`),function(e,t){e.if(u.default.valCxt,(()=>{e.var(u.default.instancePath,l._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,l._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,l._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,l._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,l._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{e.var(u.default.instancePath,l._`""`),e.var(u.default.parentData,l._`undefined`),e.var(u.default.parentDataProperty,l._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,l._`{}`)}))}(e,i),e.code(o)})):e.func(t,l._`${u.default.data}, ${function(e){return l._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?l._`, ${u.default.dynamicAnchors}={}`:l.nil}}={}`}(i)}`,r.$async,(()=>e.code(y(n,i)).code(o)))}function y(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?l._`/*# sourceURL=${n} */`:l.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function _(e,t){if(e.opts.jtd)return w(e,[],!1,t);const n=(0,i.getSchemaTypes)(e.schema);w(e,n,!(0,i.coerceAndCheckDataType)(e,n),t)}function $({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){const o=n.$comment;if(!0===i.$comment)e.code(l._`${u.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const n=l.str`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(l._`${u.default.self}.opts.$comment(${o}, ${n}, ${i}.schema)`)}}function w(e,t,n,r){const{gen:i,schema:a,data:c,allErrors:p,opts:d,self:h}=e,{RULES:m}=h;function y(f){(0,o.shouldUseGroup)(a,f)&&(f.type?(i.if((0,s.checkDataType)(f.type,c,d.strictNumbers)),j(e,f),1===t.length&&t[0]===f.type&&n&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):j(e,f),p||i.if(l._`${u.default.errors} === ${r||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,m)?(d.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{x(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const n=[];for(const r of e.dataTypes)x(t,r)?n.push(r):t.includes("integer")&&"number"===r&&n.push("integer");e.dataTypes=n}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const n=e.self.RULES.all;for(const r in n){const i=n[r];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:n}=i.definition;n.length&&!n.some((e=>{return r=e,(n=t).includes(r)||"number"===r&&n.includes("integer");var n,r}))&&S(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of m.rules)y(e);y(m.post)}))):i.block((()=>E(e,"$ref",m.all.$ref.definition)))}function j(e,t){const{gen:n,schema:r,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,o.shouldUseRule)(r,n)&&E(e,n.keyword,n.definition,t.type)}))}function x(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),g(e))?function(e){const{schema:t,opts:n,gen:r}=e;m(e,(()=>{n.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(u.default.vErrors,null),r.let(u.default.errors,0),n.unevaluated&&function(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",l._`${n}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),_(e),function(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:o}=e;n.$async?t.if(l._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(l._`new ${i}(${u.default.vErrors})`))):(t.assign(l._`${r}.errors`,u.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:n,items:r}){n instanceof l.Name&&e.assign(l._`${t}.props`,n),r instanceof l.Name&&e.assign(l._`${t}.items`,r)}(e),t.return(l._`${u.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,r.topBoolOrEmptySchema)(e)))};class P{constructor(e,t,n){if((0,c.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",k(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} 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,n){this.failResult((0,l.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.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,n=l.nil){this.gen.block((()=>{this.check$data(e,n),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:n,schemaCode:r,schemaType:i,def:o}=this;n.if((0,l.or)(l._`${r} === undefined`,t)),e!==l.nil&&n.assign(e,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:r,it:i}=this;return(0,l.or)(function(){if(n.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(n)?n:[n];return l._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return l.nil}(),function(){if(r.validateSchema){const n=e.scopeValue("validate$data",{ref:r.validateSchema});return l._`!${n}(${t})`}return l.nil}())}subschema(e,t){const n=(0,p.getSubschema)(this.it,e);(0,p.extendSubschemaData)(n,this.it,e),(0,p.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),g(e))?function(e,t){const{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&$(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.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 o=r.const("_errs",u.default.errors);_(e,o),r.var(t,l._`${o} === ${u.default.errors}`)}(e,t):(0,r.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=f.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=f.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function E(e,t,n,r){const i=new P(e,n,t);"code"in n?n.code(i,r):i.$data&&n.validate?(0,c.funcKeywordCode)(i,n):"macro"in n?(0,c.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,c.funcKeywordCode)(i,n)}t.KeywordCxt=P;const O=/^\/(?:[^~]|~0|~1)*$/,T=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function k(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,o;if(""===e)return u.default.rootData;if("/"===e[0]){if(!O.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=u.default.rootData}else{const s=T.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(c("property/index",a));return r[t-a]}if(a>t)throw new Error(c("data",a));if(o=n[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=l._`${o}${(0,l.getProperty)((0,f.unescapeJsonPointer)(e))}`,s=l._`${s} && ${o}`);return s;function c(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}t.getData=k},83134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const r=n(48461),i=n(5077),o=n(47813),s=n(2024);function a(e){const{gen:t,data:n,it:i}=e;t.if(i.parentData,(()=>t.assign(n,r._`${i.parentData}[${i.parentDataProperty}]`)))}function c(e,t,n){if(void 0===n)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,r.stringify)(n)})}t.macroKeywordCode=function(e,t){const{gen:n,keyword:i,schema:o,parentSchema:s,it:a}=e,p=t.macro.call(a.self,o,s,a),l=c(n,i,p);!1!==a.opts.validateSchema&&a.self.validateSchema(p,!0);const u=n.name("valid");e.subschema({schema:p,schemaPath:r.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var n;const{gen:p,keyword:l,schema:u,parentSchema:d,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,u,d,h):t.validate,y=c(p,l,m),g=p.let("valid");function v(n=(t.async?r._`await `:r.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!f||!1===t.schema);p.assign(g,r._`${n}${(0,o.callValidateCode)(e,y,s,a)}`,t.modifying)}function b(e){var n;p.if((0,r.not)(null!==(n=t.valid)&&void 0!==n?n:g),e)}e.block$data(g,(function(){if(!1===t.errors)v(),t.modifying&&a(e),b((()=>e.error()));else{const n=t.async?function(){const e=p.let("ruleErrs",null);return p.try((()=>v(r._`await `)),(t=>p.assign(g,!1).if(r._`${t} instanceof ${h.ValidationError}`,(()=>p.assign(e,r._`${t}.errors`)),(()=>p.throw(t))))),e}():function(){const e=r._`${y}.errors`;return p.assign(e,null),v(r.nil),e}();t.modifying&&a(e),b((()=>function(e,t){const{gen:n}=e;n.if(r._`Array.isArray(${t})`,(()=>{n.assign(i.default.vErrors,r._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,r._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,n)))}})),e.ok(null!==(n=t.valid)&&void 0!==n?n:g)},t.validSchemaType=function(e,t,n=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:n,errSchemaPath:r},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);n.logger.error(e)}}},75197:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const r=n(48461),i=n(40950);t.getSubschema=function(e,{keyword:t,schemaProp:n,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===n?{schema:o,schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[n],schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(t)}${(0,r.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(n)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:n,dataPropType:o,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=t;if(void 0!==n){const{errorPath:s,dataPathArr:a,opts:c}=t;l(p.let("data",r._`${t.data}${(0,r.getProperty)(n)}`,!0)),e.errorPath=r.str`${s}${(0,i.getErrorPath)(n,o,c.jsPropertySyntax)}`,e.parentDataProperty=r._`${n}`,e.dataPathArr=[...a,e.parentDataProperty]}function l(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}void 0!==s&&(l(s instanceof r.Name?s:p.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:o}){void 0!==r&&(e.compositeRule=r),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=n}},70623:(e,t,n)=>{"use strict";var r=n(25108);Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var i=n(25700);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var o=n(48461);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 s=n(14007),a=n(32381),c=n(68803),p=n(22478),l=n(48461),u=n(77679),d=n(85298),f=n(40950),h=n(87099),m=n(10579),y=(e,t)=>new RegExp(e,t);y.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(e){var t,n,r,i,o,s,a,c,p,l,u,d,f,h,g,v,b,_,$,w,j,x,S,P,E;const O=e.strict,T=null===(t=e.code)||void 0===t?void 0:t.optimize,k=!0===T||void 0===T?1:T||0,A=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:y,I=null!==(i=e.uriResolver)&&void 0!==i?i:m.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:O)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:O)||void 0===c||c,strictTypes:null!==(l=null!==(p=e.strictTypes)&&void 0!==p?p:O)&&void 0!==l?l:"log",strictTuples:null!==(d=null!==(u=e.strictTuples)&&void 0!==u?u:O)&&void 0!==d?d:"log",strictRequired:null!==(h=null!==(f=e.strictRequired)&&void 0!==f?f:O)&&void 0!==h&&h,code:e.code?{...e.code,optimize:k,regExp:A}:{optimize:k,regExp:A},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===($=e.inlineRefs)||void 0===$||$,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(j=e.addUsedSchema)||void 0===j||j,validateSchema:null===(x=e.validateSchema)||void 0===x||x,validateFormats:null===(S=e.validateFormats)||void 0===S||S,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(E=e.int32range)||void 0===E||E,uriResolver:I}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...$(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:v,es5:t,lines:n}),this.logger=function(e){if(!1===e)return T;if(void 0===e)return r;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,c.getRules)(),j.call(this,b,e,"NOT SUPPORTED"),j.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=O.call(this),e.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:n}=this.opts;let r=h;"id"===n&&(r={...h},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!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 n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);const r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){const n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await i.call(this,e.$schema);const n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function i(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({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 n=await p.call(this,e);this.refs[e]||await i.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function p(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,n,r);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let n;if(n=e.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(n,e);if(!r&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:n}=this.opts,r=new p.SchemaEnv({schema:{},schemaId:n});if(t=p.resolveSchema.call(this,r,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=x.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 n=e[this.opts.schemaId];return n&&(n=(0,u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),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 n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,n,t),!t)return(0,f.eachItem)(n,(e=>I.call(this,e))),this;R.call(this,t);const r={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(n,0===r.type.length?e=>I.call(this,e,r):e=>r.type.forEach((t=>I.call(this,e,r,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 n of t.rules){const t=n.rules.findIndex((t=>t.keyword===e));t>=0&&n.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:n="data"}={}){return e&&0!==e.length?e.map((e=>`${n}${e.instancePath} ${e.message}`)).reduce(((e,n)=>e+t+n)):"No errors"}$dataMetaSchema(e,t){const n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const r of t){const t=r.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in n){const t=n[e];if("object"!=typeof t)continue;const{$data:r}=t.definition,o=i[e];r&&o&&(i[e]=C(o))}}return e}_removeAllSchemas(e,t){for(const n in e){const r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=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;n=(0,u.normalizeId)(o||n);const c=u.getSchemaRefs.call(this,e,n);return a=new p.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:c}),this._cache.set(a.schema,a),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=a),r&&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):p.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{p.compileSchema.call(this,e)}finally{this.opts=t}}}function j(e,t,n,r="error"){for(const i in e){const o=i;o in t&&this.logger[r](`${n}: option ${i}. ${e[o]}`)}}function x(e){return e=(0,u.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 P(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(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 n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}}function O(){const e={...this.opts};for(const t of g)delete e[t];return e}t.default=w,w.ValidationError=s.default,w.MissingRefError=a.default;const T={log(){},warn(){},error(){}},k=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:n}=this;if((0,f.eachItem)(e,(e=>{if(n.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!k.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,n){var r;const i=null==t?void 0:t.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===n));if(s||(s={type:n,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?N.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(r=t.implements)||void 0===r||r.forEach((e=>this.addKeyword(e)))}function N(e,t,n){const r=e.rules.findIndex((e=>e.keyword===n));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}const M={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,M]}}},22444:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(64063);r.code='require("ajv/dist/runtime/equal").default',t.default=r},36670:(e,t)=>{"use strict";function n(e){const t=e.length;let n,r=0,i=0;for(;i=55296&&n<=56319&&i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(60540);r.code='require("ajv/dist/runtime/uri").default',t.default=r},14007:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=n},59756:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const r=n(48461),i=n(40950),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{parentSchema:t,it:n}=e,{items:r}=t;Array.isArray(r)?s(e,r):(0,i.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:n,schema:o,data:s,keyword:a,it:c}=e;c.items=!0;const p=n.const("len",r._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(r._`${p} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(c,o)){const o=n.var("valid",r._`${p} <= ${t.length}`);n.if((0,r.not)(o),(()=>function(o){n.forRange("i",t.length,p,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),c.allErrors||n.if((0,r.not)(o),(()=>n.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},79670:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(47813),i=n(48461),o=n(5077),s=n(40950),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:n,parentSchema:a,data:c,errsCount:p,it:l}=e;if(!p)throw new Error("ajv implementation error");const{allErrors:u,opts:d}=l;if(l.props=!0,"all"!==d.removeAdditional&&(0,s.alwaysValidSchema)(l,n))return;const f=(0,r.allSchemaProperties)(a.properties),h=(0,r.allSchemaProperties)(a.patternProperties);function m(e){t.code(i._`delete ${c}[${e}]`)}function y(r){if("all"===d.removeAdditional||d.removeAdditional&&!1===n)m(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(u||t.break());if("object"==typeof n&&!(0,s.alwaysValidSchema)(l,n)){const n=t.name("valid");"failing"===d.removeAdditional?(g(r,n,!1),t.if((0,i.not)(n),(()=>{e.reset(),m(r)}))):(g(r,n),u||t.if((0,i.not)(n),(()=>t.break())))}}}function g(t,n,r){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===r&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,n)}t.forIn("key",c,(n=>{f.length||h.length?t.if(function(n){let o;if(f.length>8){const e=(0,s.schemaRefOrVal)(l,a.properties,"properties");o=(0,r.isOwnProperty)(t,e,n)}else o=f.length?(0,i.or)(...f.map((e=>i._`${n} === ${e}`))):i.nil;return h.length&&(o=(0,i.or)(o,...h.map((t=>i._`${(0,r.usePattern)(e,t)}.test(${n})`)))),(0,i.not)(o)}(n),(()=>y(n))):y(n)})),e.ok(i._`${p} === ${o.default.errors}`)}};t.default=a},67516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(40950),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:i}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const o=t.name("valid");n.forEach(((t,n)=>{if((0,r.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:n},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},55812:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(47813).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r},90220:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?r.str`must contain at least ${e} valid item(s)`:r.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?r._`{minContains: ${e}}`:r._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:n,parentSchema:o,data:s,it:a}=e;let c,p;const{minContains:l,maxContains:u}=o;a.opts.next?(c=void 0===l?1:l,p=u):c=1;const d=t.const("len",r._`${s}.length`);if(e.setParams({min:c,max:p}),void 0===p&&0===c)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==p&&c>p)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,n)){let t=r._`${d} >= ${c}`;return void 0!==p&&(t=r._`${t} && ${d} <= ${p}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function h(){const e=t.name("_valid"),n=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(r._`${e}++`),void 0===p?t.if(r._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(r._`${e} > ${p}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(r._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(n)))))}function m(n,r){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},n),r()}))}void 0===p&&1===c?m(f,(()=>t.if(f,(()=>t.break())))):0===c?(t.let(f,!0),void 0!==p&&t.if(r._`${s}.length > 0`,h)):(t.let(f,!1),h()),e.result(f,(()=>e.reset()))}};t.default=o},54853:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const r=n(48461),i=n(40950),o=n(47813);t.error={message:({params:{property:e,depsCount:t,deps:n}})=>{const i=1===t?"property":"properties";return r.str`must have ${i} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:i}})=>r._`{property: ${e}, missingProperty: ${i}, depsCount: ${t}, - deps: ${n}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:n)[r]=e[r]);return[t,n]}(e);a(e,t),c(e,n)}};function a(e,t=e.schema){const{gen:n,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=n.let("missing");for(const c in t){const p=t[c];if(0===p.length)continue;const l=(0,o.propertyInData)(n,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:p.length,deps:p.join(", ")}),s.allErrors?n.if(l,(()=>{for(const t of p)(0,o.checkReportMissingProp)(e,t)})):(n.if(r._`${l} && (${(0,o.checkMissingProp)(e,p,a)})`),(0,o.reportMissingProp)(e,a),n.else())}}function c(e,t=e.schema){const{gen:n,data:r,keyword:s,it:a}=e,c=n.name("valid");for(const p in t)(0,i.alwaysValidSchema)(a,t[p])||(n.if((0,o.propertyInData)(n,r,p,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:p},c);e.mergeValidEvaluated(t,c)}),(()=>n.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},73449:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>r.str`must match "${e.ifClause}" schema`,params:({params:e})=>r._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:o}=e;void 0===n.then&&void 0===n.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),c=s(o,"else");if(!a&&!c)return;const p=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&c){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(l,u("then",n),u("else",n))}else a?t.if(l,u("then")):t.if((0,r.not)(l),u("else"));function u(n,i){return()=>{const o=e.subschema({keyword:n},l);t.assign(p,l),e.mergeValidEvaluated(o,p),i?t.assign(i,r._`${n}`):e.setParams({ifClause:n})}}e.pass(p,(()=>e.error(!0)))}};function s(e,t){const n=e.schema[t];return void 0!==n&&!(0,i.alwaysValidSchema)(e,n)}t.default=o},61964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(59756),i=n(81849),o=n(42031),s=n(8089),a=n(90220),c=n(54853),p=n(21523),l=n(79670),u=n(90704),d=n(66125),f=n(98556),h=n(55812),m=n(94164),y=n(67516),g=n(73449),v=n(65846);t.default=function(e=!1){const t=[f.default,h.default,m.default,y.default,g.default,v.default,p.default,l.default,c.default,u.default,d.default];return e?t.push(i.default,s.default):t.push(r.default,o.default),t.push(a.default),t}},42031:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(48461),i=n(40950),o=n(47813),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return a(e,"additionalItems",t);n.items=!0,(0,i.alwaysValidSchema)(n,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,n=e.schema){const{gen:o,parentSchema:s,data:a,keyword:c,it:p}=e;!function(e){const{opts:r,errSchemaPath:o}=p,s=n.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(r.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(p,e,r.strictTuples)}}(s),p.opts.unevaluated&&n.length&&!0!==p.items&&(p.items=i.mergeEvaluated.items(o,n.length,p.items));const l=o.name("valid"),u=o.const("len",r._`${a}.length`);n.forEach(((t,n)=>{(0,i.alwaysValidSchema)(p,t)||(o.if(r._`${u} > ${n}`,(()=>e.subschema({keyword:c,schemaProp:n,dataProp:n},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},8089:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o=n(47813),s=n(59756),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:a}=n;r.items=!0,(0,i.alwaysValidSchema)(r,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},98556:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(40950),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:i}=e;if((0,r.alwaysValidSchema)(i,n))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},94164:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>r._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:n,parentSchema:o,it:s}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=n,c=t.let("valid",!1),p=t.let("passing",null),l=t.name("_valid");e.setParams({passing:p}),t.block((function(){a.forEach(((n,o)=>{let a;(0,i.alwaysValidSchema)(s,n)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(r._`${l} && ${c}`).assign(c,!1).assign(p,r._`[${p}, ${o}]`).else(),t.if(l,(()=>{t.assign(c,!0),t.assign(p,o),a&&e.mergeEvaluated(a,r.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},66125:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(47813),i=n(48461),o=n(40950),s=n(40950),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:a,parentSchema:c,it:p}=e,{opts:l}=p,u=(0,r.allSchemaProperties)(n),d=u.filter((e=>(0,o.alwaysValidSchema)(p,n[e])));if(0===u.length||d.length===u.length&&(!p.opts.unevaluated||!0===p.props))return;const f=l.strictSchema&&!l.allowMatchingProperties&&c.properties,h=t.name("valid");!0===p.props||p.props instanceof i.Name||(p.props=(0,s.evaluatedPropsToName)(t,p.props));const{props:m}=p;function y(e){for(const t in f)new RegExp(e).test(t)&&(0,o.checkStrictMode)(p,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(n){t.forIn("key",a,(o=>{t.if(i._`${(0,r.usePattern)(e,n)}.test(${o})`,(()=>{const r=d.includes(n);r||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:o,dataPropType:s.Type.Str},h),p.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${o}]`,!0):r||p.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of u)f&&y(e),p.allErrors?g(e):(t.var(h,!0),g(e),t.if(h))}()}};t.default=a},81849:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(42031),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")};t.default=i},90704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(25700),i=n(47813),o=n(40950),s=n(79670),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:a,data:c,it:p}=e;"all"===p.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new r.KeywordCxt(p,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(n);for(const e of l)p.definedProperties.add(e);p.opts.unevaluated&&l.length&&!0!==p.props&&(p.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),p.props));const u=l.filter((e=>!(0,o.alwaysValidSchema)(p,n[e])));if(0===u.length)return;const d=t.name("valid");for(const n of u)f(n)?h(n):(t.if((0,i.propertyInData)(t,c,n,p.opts.ownProperties)),h(n),p.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(d);function f(e){return p.opts.useDefaults&&!p.compositeRule&&void 0!==n[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=a},21523:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>r._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:n,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,n))return;const a=t.name("valid");t.forIn("key",o,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},a),t.if((0,r.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},65846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(40950),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,r.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};t.default=i},47813:(e,t,n)=>{"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 r=n(48461),i=n(40950),o=n(5077),s=n(40950);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function c(e,t,n){return r._`${a(e)}.call(${t}, ${n})`}function p(e,t,n,i){const o=r._`${t}${(0,r.getProperty)(n)} === undefined`;return i?(0,r.or)(o,(0,r.not)(c(e,t,n))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:n,data:i,it:o}=e;n.if(p(n,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:r._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:n}},i,o){return(0,r.or)(...i.map((i=>(0,r.and)(p(e,t,i,n.ownProperties),r._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,n,i){const o=r._`${t}${(0,r.getProperty)(n)} !== undefined`;return i?r._`${o} && ${c(e,t,n)}`:o},t.noPropertyInData=p,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((n=>!(0,i.alwaysValidSchema)(e,t[n])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:i,schemaPath:s,errorPath:a},it:c},p,l,u){const d=u?r._`${e}, ${t}, ${i}${s}`:t,f=[[o.default.instancePath,(0,r.strConcat)(o.default.instancePath,a)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&f.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=r._`${d}, ${n.object(...f)}`;return l!==r.nil?r._`${p}.call(${l}, ${h})`:r._`${p}(${h})`};const u=r._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},n){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(n,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:r._`${"new RegExp"===o.code?u:(0,s.useFunc)(e,o)}(${n}, ${i})`})},t.validateArray=function(e){const{gen:t,data:n,keyword:o,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",r._`${n}.length`);t.forRange("i",0,c,(n=>{e.subschema({keyword:o,dataProp:n,dataPropType:i.Type.Num},a),t.if((0,r.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:n,keyword:o,it:s}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>n.forEach(((n,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);t.assign(a,r._`${a} || ${c}`),e.mergeValidEvaluated(s,c)||t.if((0,r.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},59899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=n},69265:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(59899),i=n(3672),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,i.default];t.default=o},3672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r=n(32381),i=n(47813),o=n(48461),s=n(5077),a=n(22478),c=n(40950),p={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:i}=e,{baseId:s,schemaEnv:c,validateName:p,opts:d,self:f}=i,{root:h}=c;if(("#"===n||"#/"===n)&&s===h.baseId)return function(){if(c===h)return u(e,p,c,c.$async);const n=t.scopeValue("root",{ref:h});return u(e,o._`${n}.validate`,h,h.$async)}();const m=a.resolveRef.call(f,h,s,n);if(void 0===m)throw new r.default(i.opts.uriResolver,s,n);return m instanceof a.SchemaEnv?function(t){const n=l(e,t);u(e,n,t,t.$async)}(m):function(r){const i=t.scopeValue("schema",!0===d.code.source?{ref:r,code:(0,o.stringify)(r)}:{ref:r}),s=t.name("valid"),a=e.subschema({schema:r,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:n},s);e.mergeEvaluated(a),e.ok(s)}(m)}};function l(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):o._`${n.scopeValue("wrapper",{ref:t})}.validate`}function u(e,t,n,r){const{gen:a,it:p}=e,{allErrors:l,schemaEnv:u,opts:d}=p,f=d.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function m(e){var t;if(!p.opts.unevaluated)return;const r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==p.props)if(r&&!r.dynamicProps)void 0!==r.props&&(p.props=c.mergeEvaluated.props(a,r.props,p.props));else{const t=a.var("props",o._`${e}.evaluated.props`);p.props=c.mergeEvaluated.props(a,t,p.props,o.Name)}if(!0!==p.items)if(r&&!r.dynamicItems)void 0!==r.items&&(p.items=c.mergeEvaluated.items(a,r.items,p.items));else{const t=a.var("items",o._`${e}.evaluated.items`);p.items=c.mergeEvaluated.items(a,t,p.items,o.Name)}}r?function(){if(!u.$async)throw new Error("async schema referenced by sync schema");const n=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),l||a.assign(n,!0)}),(e=>{a.if(o._`!(${e} instanceof ${p.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(n,!1)})),e.ok(n)}():e.result((0,i.callValidateCode)(e,t,f),(()=>m(t)),(()=>h(t)))}t.getValidate=l,t.callRef=u,t.default=p},85451:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(5447),o=n(22478),s=n(40950),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>r._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){const{gen:t,data:n,schema:a,parentSchema:c,it:p}=e,{oneOf:l}=c;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const u=a.propertyName;if("string"!=typeof u)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),f=t.const("tag",r._`${n}${(0,r.getProperty)(u)}`);function h(n){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:n},i);return e.mergeEvaluated(o,r.Name),i}t.if(r._`typeof ${f} == "string"`,(()=>function(){const n=function(){var e;const t={},n=i(c);let r=!0;for(let t=0;te.error(!1,{discrError:i.DiscrError.Tag,tag:f,tagName:u}))),e.ok(d)}};t.default=a},5447:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"},60892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(69265),i=n(67978),o=n(61964),s=n(89179),a=n(26001),c=[r.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},9079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match format "${e}"`,params:({schemaCode:e})=>r._`{format: ${e}}`},code(e,t){const{gen:n,data:i,$data:o,schema:s,schemaCode:a,it:c}=e,{opts:p,errSchemaPath:l,schemaEnv:u,self:d}=c;p.validateFormats&&(o?function(){const o=n.scopeValue("formats",{ref:d.formats,code:p.code.formats}),s=n.const("fDef",r._`${o}[${a}]`),c=n.let("fType"),l=n.let("format");n.if(r._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>n.assign(c,r._`${s}.type || "string"`).assign(l,r._`${s}.validate`)),(()=>n.assign(c,r._`"string"`).assign(l,s))),e.fail$data((0,r.or)(!1===p.strictSchema?r.nil:r._`${a} && !${l}`,function(){const e=u.$async?r._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:r._`${l}(${i})`,n=r._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return r._`${l} && ${l} !== true && ${c} === ${t} && !${n}`}()))}():function(){const o=d.formats[s];if(!o)return void function(){if(!1!==p.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}d.logger.warn(e())}();if(!0===o)return;const[a,c,f]=function(e){const t=e instanceof RegExp?(0,r.regexpCode)(e):p.code.formats?r._`${p.code.formats}${(0,r.getProperty)(s)}`:void 0,i=n.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,r._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!u.$async)throw new Error("async format in sync schema");return r._`await ${f}(${i})`}return"function"==typeof c?r._`${f}(${i})`:r._`${f}.test(${i})`}())}())}};t.default=i},89179:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=[n(9079).default];t.default=r},26001:(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"]},23723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o=n(22444),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>r._`{allowedValue: ${e}}`},code(e){const{gen:t,data:n,$data:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(r._`!${(0,i.useFunc)(t,o.default)}(${n}, ${a})`):e.fail(r._`${c} !== ${n}`)}};t.default=s},73186:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o=n(22444),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>r._`{allowedValues: ${e}}`},code(e){const{gen:t,data:n,$data:s,schema:a,schemaCode:c,it:p}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=p.opts.loopEnum;let u;const d=()=>null!=u?u:u=(0,i.useFunc)(t,o.default);let f;if(l||s)f=t.let("valid"),e.block$data(f,(function(){t.assign(f,!1),t.forOf("v",c,(e=>t.if(r._`${d()}(${n}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);f=(0,r.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?r._`${d()}(${n}, ${e}[${t}])`:r._`${n} === ${i}`}(e,i))))}e.pass(f)}};t.default=s},67978:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(80949),i=n(43229),o=n(66346),s=n(41244),a=n(12561),c=n(19798),p=n(35767),l=n(89320),u=n(23723),d=n(73186),f=[r.default,i.default,o.default,s.default,a.default,c.default,p.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,d.default];t.default=f},35767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxItems"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:i}=e,o="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`${n}.length ${o} ${i}`)}};t.default=i},66346:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=n(40950),o=n(36670),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxLength"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:s,it:a}=e,c="maxLength"===t?r.operators.GT:r.operators.LT,p=!1===a.opts.unicode?r._`${n}.length`:r._`${(0,i.useFunc)(e.gen,o.default)}(${n})`;e.fail$data(r._`${p} ${c} ${s}`)}};t.default=s},80949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i=r.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>r.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:n,schemaCode:i}=e;e.fail$data(r._`${n} ${o[t].fail} ${i} || isNaN(${n})`)}};t.default=a},12561:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxProperties"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:i}=e,o="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`Object.keys(${n}).length ${o} ${i}`)}};t.default=i},43229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48461),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>r.str`must be multiple of ${e}`,params:({schemaCode:e})=>r._`{multipleOf: ${e}}`},code(e){const{gen:t,data:n,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),c=s?r._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:r._`${a} !== parseInt(${a})`;e.fail$data(r._`(${i} === 0 || (${a} = ${n}/${i}, ${c}))`)}};t.default=i},41244:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(47813),i=n(48461),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:n,schema:o,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",p=n?i._`(new RegExp(${s}, ${c}))`:(0,r.usePattern)(e,o);e.fail$data(i._`!${p}.test(${t})`)}};t.default=o},19798:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(47813),i=n(48461),o=n(40950),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:n,schemaCode:s,data:a,$data:c,it:p}=e,{opts:l}=p;if(!c&&0===n.length)return;const u=n.length>=l.loopRequired;if(p.allErrors?function(){if(u||c)e.block$data(i.nil,d);else for(const t of n)(0,r.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(u||c){const n=t.let("valid",!0);e.block$data(n,(()=>function(n,o){e.setParams({missingProperty:n}),t.forOf(n,s,(()=>{t.assign(o,(0,r.propertyInData)(t,a,n,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,n))),e.ok(n)}else t.if((0,r.checkMissingProp)(e,n,o)),(0,r.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:r}=e.it;for(const e of n)if(void 0===(null==t?void 0:t[e])&&!r.has(e)){const t=`required property "${e}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(p,t,p.opts.strictRequired)}}function d(){t.forOf("prop",s,(n=>{e.setParams({missingProperty:n}),t.if((0,r.noPropertyInData)(t,a,n,l.ownProperties),(()=>e.error()))}))}}};t.default=s},89320:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(85298),i=n(48461),o=n(40950),s=n(22444),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:n,$data:a,schema:c,parentSchema:p,schemaCode:l,it:u}=e;if(!a&&!c)return;const d=t.let("valid"),f=p.items?(0,r.getSchemaTypes)(p.items):[];function h(o,s){const a=t.name("item"),c=(0,r.checkDataTypes)(f,a,u.opts.strictNumbers,r.DataType.Wrong),p=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${n}[${o}]`),t.if(c,i._`continue`),f.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${p}[${a}] == "number"`,(()=>{t.assign(s,i._`${p}[${a}]`),e.error(),t.assign(d,!1).break()})).code(i._`${p}[${a}] = ${o}`)}))}function m(r,a){const c=(0,o.useFunc)(t,s.default),p=t.name("outer");t.label(p).for(i._`;${r}--;`,(()=>t.for(i._`${a} = ${r}; ${a}--;`,(()=>t.if(i._`${c}(${n}[${r}], ${n}[${a}])`,(()=>{e.error(),t.assign(d,!1).break(p)}))))))}e.block$data(d,(function(){const r=t.let("i",i._`${n}.length`),o=t.let("j");e.setParams({i:r,j:o}),t.assign(d,!0),t.if(i._`${r} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?h:m)(r,o)))}),i._`${l} === false`),e.ok(d)}};t.default=a},55136:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e,r,i,o,s,a,c,p,l,u){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var d in r(o,s,a,c,p,l,u),o){var f=o[d];if(Array.isArray(f)){if(d in t.arrayKeywords)for(var h=0;h{"use strict";var r=n(34155),i=n(25108);function o(e){return o="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},o(e)}function s(e,t){for(var n=0;n1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i{"use strict";var r=n(34155);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te.length)&&(n=e.length),e.substring(n-t.length,n)===t}var b="",_="",$="",w="",j={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function S(e){return y(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var P=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(P,e);var n,i,a,l,u=(n=P,i=d(),function(){var e,t=h(n);if(i){var r=h(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return c(this,e)});function P(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),"object"!==m(e)||null===e)throw new g("options","Object",e);var n=e.message,i=e.operator,o=e.stackStartFn,s=e.actual,a=e.expected,l=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)t=u.call(this,String(n));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(b="",_="",w="",$=""):(b="",_="",w="",$="")),"object"===m(s)&&null!==s&&"object"===m(a)&&null!==a&&"stack"in s&&s instanceof Error&&"stack"in a&&a instanceof Error&&(s=x(s),a=x(a)),"deepStrictEqual"===i||"strictEqual"===i)t=u.call(this,function(e,t,n){var i="",o="",s=0,a="",c=!1,p=S(e),l=p.split("\n"),u=S(t).split("\n"),d=0,f="";if("strictEqual"===n&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===l.length&&1===u.length&&l[0]!==u[0]){var h=l[0].length+u[0].length;if(h<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(j[n],"\n\n")+"".concat(l[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==n&&h<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;l[0][d]===u[0][d];)d++;d>2&&(f="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",d),"^"),d=0)}}for(var y=l[l.length-1],g=u[u.length-1];y===g&&(d++<2?a="\n ".concat(y).concat(a):i=y,l.pop(),u.pop(),0!==l.length&&0!==u.length);)y=l[l.length-1],g=u[u.length-1];var x=Math.max(l.length,u.length);if(0===x){var P=p.split("\n");if(P.length>30)for(P[26]="".concat(b,"...").concat(w);P.length>27;)P.pop();return"".concat(j.notIdentical,"\n\n").concat(P.join("\n"),"\n")}d>3&&(a="\n".concat(b,"...").concat(w).concat(a),c=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var E=0,O=j[n]+"\n".concat(_,"+ actual").concat(w," ").concat($,"- expected").concat(w),T=" ".concat(b,"...").concat(w," Lines skipped");for(d=0;d1&&d>2&&(k>4?(o+="\n".concat(b,"...").concat(w),c=!0):k>3&&(o+="\n ".concat(u[d-2]),E++),o+="\n ".concat(u[d-1]),E++),s=d,i+="\n".concat($,"-").concat(w," ").concat(u[d]),E++;else if(u.length1&&d>2&&(k>4?(o+="\n".concat(b,"...").concat(w),c=!0):k>3&&(o+="\n ".concat(l[d-2]),E++),o+="\n ".concat(l[d-1]),E++),s=d,o+="\n".concat(_,"+").concat(w," ").concat(l[d]),E++;else{var A=u[d],I=l[d],N=I!==A&&(!v(I,",")||I.slice(0,-1)!==A);N&&v(A,",")&&A.slice(0,-1)===I&&(N=!1,I+=","),N?(k>1&&d>2&&(k>4?(o+="\n".concat(b,"...").concat(w),c=!0):k>3&&(o+="\n ".concat(l[d-2]),E++),o+="\n ".concat(l[d-1]),E++),s=d,o+="\n".concat(_,"+").concat(w," ").concat(I),i+="\n".concat($,"-").concat(w," ").concat(A),E+=2):(o+=i,i="",1!==k&&0!==d||(o+="\n ".concat(I),E++))}if(E>20&&d30)for(f[26]="".concat(b,"...").concat(w);f.length>27;)f.pop();t=1===f.length?u.call(this,"".concat(d," ").concat(f[0])):u.call(this,"".concat(d,"\n\n").concat(f.join("\n"),"\n"))}else{var h=S(s),y="",E=j[i];"notDeepEqual"===i||"notEqual"===i?(h="".concat(j[i],"\n\n").concat(h)).length>1024&&(h="".concat(h.slice(0,1021),"...")):(y="".concat(S(a)),h.length>512&&(h="".concat(h.slice(0,509),"...")),y.length>512&&(y="".concat(y.slice(0,509),"...")),"deepEqual"===i||"equal"===i?h="".concat(E,"\n\n").concat(h,"\n\nshould equal\n\n"):y=" ".concat(i," ").concat(y)),t=u.call(this,"".concat(h).concat(y))}return Error.stackTraceLimit=l,t.generatedMessage=!n,Object.defineProperty(p(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=s,t.expected=a,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(p(t),o),t.stack,t.name="AssertionError",c(t)}return a=P,(l=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return y(this,o(o({},t),{},{customInspect:!1,depth:0}))}}])&&s(a.prototype,l),Object.defineProperty(a,"prototype",{writable:!1}),P}(l(Error),y.custom);e.exports=P},62136:(e,t,n)=>{"use strict";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 i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s,a,c={};function p(e,t,n){n||(n=Error);var s=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(l,n);var s,a,c,p=(a=l,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=o(a);if(c){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(n,r,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),o=p.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i)),o.code=e,o}return s=l,Object.defineProperty(s,"prototype",{writable:!1}),s}(n);c[e]=s}function l(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}p("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),p("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,a,c,p,u;if(void 0===s&&(s=n(69282)),s("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(0,4)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))c="The ".concat(e," ").concat(o," ").concat(l(t,"type"));else{var d=("number"!=typeof u&&(u=0),u+1>(p=e).length||-1===p.indexOf(".",u)?"argument":"property");c='The "'.concat(e,'" ').concat(d," ").concat(o," ").concat(l(t,"type"))}return c+". Received type ".concat(r(i))}),TypeError),p("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=n(89539));var i=a.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)}),TypeError,RangeError),p("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),p("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=c},19158:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],c=!0,p=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){p=!0,i=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(p)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}(e,t)||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.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function N(e){return Object.keys(e).filter(I).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i{"use strict";function n(e,t){for(var n=0;n":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},o=17;t.NEEDS_PARENTHESES=o;var s,a,c,p,l,u,d={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:o,ClassExpression:o,FunctionExpression:o,ObjectExpression:o,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function f(e,t){var n=e.generator;if(e.write("("),null!=t&&t.length>0){n[t[0].type](t[0],e);for(var r=t.length,i=1;i0){e.write(r);for(var s=1;s0){n.VariableDeclarator(r[0],e);for(var o=1;o0){t.write(r),i&&null!=e.comments&&g(t,e.comments,o,r);for(var a=s.length,c=0;c0){for(;i0&&t.write(", ");var o=n[i],s=o.type[6];if("D"===s)t.write(o.local.name,o),i++;else{if("N"!==s)break;t.write("* as "+o.local.name,o),i++}}if(i0)for(var i=0;;){var o=n[i],s=o.local.name;if(t.write(s,o),s!==o.exported.name&&t.write(" as "+o.exported.name),!(++i "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression:function(e,t){t.write("this",e)},Super:function(e,t){t.write("super",e)},RestElement:c=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:c,YieldExpression:function(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression:function(e,t){t.write("await ",e),m(t,e.argument,e)},TemplateLiteral:function(e,t){var n=e.quasis,r=e.expressions;t.write("`");for(var i=r.length,o=0;o0)for(var n=e.elements,r=n.length,i=0;;){var o=n[i];if(null!=o&&this[o.type](o,t),!(++i0){t.write(r),i&&null!=e.comments&&g(t,e.comments,o,r);for(var s=","+r,a=e.properties,c=a.length,p=0;;){var l=a[p];if(i&&null!=l.comments&&g(t,l.comments,o,r),t.write(o),this[l.type](l,t),!(++p0)for(var n=e.properties,r=n.length,i=0;this[n[i].type](n[i],t),++i1)&&("U"!==i[0]||"n"!==i[1]&&"p"!==i[1]||!r.prefix||r.operator[0]!==n||"+"!==n&&"-"!==n)||t.write(" "),o?(t.write(n.length>1?" (":"("),this[i](r,t),t.write(")")):this[i](r,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression:function(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression:function(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern:function(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:p=function(e,t){var n="in"===e.operator;n&&t.write("("),m(t,e.left,e,!1),t.write(" "+e.operator+" "),m(t,e.right,e,!0),n&&t.write(")")},LogicalExpression:p,ConditionalExpression:function(e,t){var n=e.test,r=t.expressionsPrecedence[n.type];r===o||r<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[n.type](n,t),t.write(")")):this[n.type](n,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression:function(e,t){t.write("new ");var n=t.expressionsPrecedence[e.callee.type];n===o||n0&&(this.lineEndSize>0&&(1===p.length?e[c-1]===p:e.endsWith(p))?(this.line+=this.lineEndSize,this.column=0):this.column+=c)}},{key:"toString",value:function(){return this.output}}])&&n(t.prototype,r),e}()},17457:(e,t,n)=>{"use strict";var r=n(98844),i=n(6724),o=n(5117),s=n(34570);e.exports={Service:i.Service,assembleProtocol:o.assembleProtocol,discoverProtocol:i.discoverProtocol,parse:function(e,t){var n=o.read(e);return n.protocol?i.Service.forProtocol(n,t):r.Type.forSchema(n,t)},readProtocol:o.readProtocol,readSchema:o.readSchema},s.copyOwnProperties(r,e.exports)},98844:(e,t,n)=>{"use strict";var r=n(87608);e.exports={Type:r.Type,parse:function(e,t){var n;if("string"==typeof e)try{n=JSON.parse(e)}catch(t){n=e}else n=e;return r.Type.forSchema(n,t)},types:r.builtins,combine:r.Type.forTypes,infer:r.Type.forValue}},97064:(e,t,n)=>{"use strict";var r=n(17457),i=n(94186),o=n(34570),s=n(42830),a=n(89539);function c(e,t){s.Readable.call(this),t=t||{},this._batchSize=t.batchSize||65536,this._blob=e,this._pos=0}function p(){s.Transform.call(this,{readableObjectMode:!0}),this._bufs=[]}a.inherits(c,s.Readable),c.prototype._read=function(){var e=this._pos;if(e>=this._blob.size)this.push(null);else{this._pos+=this._batchSize;var t=this._blob.slice(e,this._pos,this._blob.type),n=new FileReader,r=this;n.addEventListener("loadend",(function e(t){n.removeEventListener("loadend",e,!1),t.error?r.emit("error",t.error):r.push(o.bufferFrom(n.result))}),!1),n.readAsArrayBuffer(t)}},a.inherits(p,s.Transform),p.prototype._transform=function(e,t,n){this._bufs.push(e),n()},p.prototype._flush=function(e){this.push(new Blob(this._bufs,{type:"application/octet-binary"})),e()},e.exports={createBlobDecoder:function(e,t){return new c(e).pipe(new i.streams.BlockDecoder(t))},createBlobEncoder:function(e,t){var n=new i.streams.BlockEncoder(e,t),r=new p;return n.pipe(r),new s.Duplex({objectMode:!0,read:function(){var e=r.read();e?n(e):r.once("readable",n);var t=this;function n(e){t.push(e||r.read()),t.push(null)}},write:function(e,t,r){return n.write(e,t,r)}}).on("finish",(function(){n.end()}))},streams:i.streams},o.copyOwnProperties(r,e.exports)},35880:(e,t,n)=>{"use strict";var r=n(48764).Buffer;function i(){this.data=void 0}function o(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];n=a(n,r,i,o,t[0],7,-680876936),o=a(o,n,r,i,t[1],12,-389564586),i=a(i,o,n,r,t[2],17,606105819),r=a(r,i,o,n,t[3],22,-1044525330),n=a(n,r,i,o,t[4],7,-176418897),o=a(o,n,r,i,t[5],12,1200080426),i=a(i,o,n,r,t[6],17,-1473231341),r=a(r,i,o,n,t[7],22,-45705983),n=a(n,r,i,o,t[8],7,1770035416),o=a(o,n,r,i,t[9],12,-1958414417),i=a(i,o,n,r,t[10],17,-42063),r=a(r,i,o,n,t[11],22,-1990404162),n=a(n,r,i,o,t[12],7,1804603682),o=a(o,n,r,i,t[13],12,-40341101),i=a(i,o,n,r,t[14],17,-1502002290),n=c(n,r=a(r,i,o,n,t[15],22,1236535329),i,o,t[1],5,-165796510),o=c(o,n,r,i,t[6],9,-1069501632),i=c(i,o,n,r,t[11],14,643717713),r=c(r,i,o,n,t[0],20,-373897302),n=c(n,r,i,o,t[5],5,-701558691),o=c(o,n,r,i,t[10],9,38016083),i=c(i,o,n,r,t[15],14,-660478335),r=c(r,i,o,n,t[4],20,-405537848),n=c(n,r,i,o,t[9],5,568446438),o=c(o,n,r,i,t[14],9,-1019803690),i=c(i,o,n,r,t[3],14,-187363961),r=c(r,i,o,n,t[8],20,1163531501),n=c(n,r,i,o,t[13],5,-1444681467),o=c(o,n,r,i,t[2],9,-51403784),i=c(i,o,n,r,t[7],14,1735328473),n=p(n,r=c(r,i,o,n,t[12],20,-1926607734),i,o,t[5],4,-378558),o=p(o,n,r,i,t[8],11,-2022574463),i=p(i,o,n,r,t[11],16,1839030562),r=p(r,i,o,n,t[14],23,-35309556),n=p(n,r,i,o,t[1],4,-1530992060),o=p(o,n,r,i,t[4],11,1272893353),i=p(i,o,n,r,t[7],16,-155497632),r=p(r,i,o,n,t[10],23,-1094730640),n=p(n,r,i,o,t[13],4,681279174),o=p(o,n,r,i,t[0],11,-358537222),i=p(i,o,n,r,t[3],16,-722521979),r=p(r,i,o,n,t[6],23,76029189),n=p(n,r,i,o,t[9],4,-640364487),o=p(o,n,r,i,t[12],11,-421815835),i=p(i,o,n,r,t[15],16,530742520),n=l(n,r=p(r,i,o,n,t[2],23,-995338651),i,o,t[0],6,-198630844),o=l(o,n,r,i,t[7],10,1126891415),i=l(i,o,n,r,t[14],15,-1416354905),r=l(r,i,o,n,t[5],21,-57434055),n=l(n,r,i,o,t[12],6,1700485571),o=l(o,n,r,i,t[3],10,-1894986606),i=l(i,o,n,r,t[10],15,-1051523),r=l(r,i,o,n,t[1],21,-2054922799),n=l(n,r,i,o,t[8],6,1873313359),o=l(o,n,r,i,t[15],10,-30611744),i=l(i,o,n,r,t[6],15,-1560198380),r=l(r,i,o,n,t[13],21,1309151649),n=l(n,r,i,o,t[4],6,-145523070),o=l(o,n,r,i,t[11],10,-1120210379),i=l(i,o,n,r,t[2],15,718787259),r=l(r,i,o,n,t[9],21,-343485551),e[0]=d(n,e[0]),e[1]=d(r,e[1]),e[2]=d(i,e[2]),e[3]=d(o,e[3])}function s(e,t,n,r,i,o){return t=d(d(t,e),d(r,o)),d(t<>>32-i,n)}function a(e,t,n,r,i,o,a){return s(t&n|~t&r,e,t,i,o,a)}function c(e,t,n,r,i,o,a){return s(t&r|n&~r,e,t,i,o,a)}function p(e,t,n,r,i,o,a){return s(t^n^r,e,t,i,o,a)}function l(e,t,n,r,i,o,a){return s(n^(t|~r),e,t,i,o,a)}function u(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function d(e,t){return e+t&4294967295}i.prototype.end=function(e){this.data=e},i.prototype.read=function(){return function(e){var t,n=function(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)o(r,u(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(o(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,o(r,i),r}(e),i=r.alloc?r.alloc(16):new r(16);for(t=0;t<4;t++)i.writeIntLE(n[t],4*t,4);return i}(this.data)},e.exports={createHash:function(e){if("md5"!==e)throw new Error("only md5 is supported in the browser");return new i}}},67776:e=>{"use strict";function t(){return new Error("unsupported in the browser")}e.exports={createImportHook:function(){return function(e,n,r){r(t())}},createSyncImportHook:function(){return function(){throw t()}},existsSync:function(){return!1},readFileSync:function(){throw t()}}},94186:(e,t,n)=>{"use strict";var r=n(34155),i=n(87608),o=n(34570),s=n(48764),a=n(42830),c=n(89539),p=n(42635),l=s.Buffer,u={namespace:"org.apache.avro.file"},d=i.Type.forSchema("long",u),f=i.Type.forSchema({type:"map",values:"bytes"},u),h=i.Type.forSchema({name:"Header",type:"record",fields:[{name:"magic",type:{type:"fixed",name:"Magic",size:4}},{name:"meta",type:f},{name:"sync",type:{type:"fixed",name:"Sync",size:16}}]},u),m=i.Type.forSchema({name:"Block",type:"record",fields:[{name:"count",type:"long"},{name:"data",type:"bytes"},{name:"sync",type:"Sync"}]},u),y=o.bufferFrom("Obj"),g=c.format,v=o.Tap;function b(e,t){var n=!!(t=t||{}).noDecode;a.Duplex.call(this,{readableObjectMode:!n,allowHalfOpen:!1}),this._type=i.Type.forSchema(e),this._tap=new v(o.newBuffer(0)),this._writeCb=null,this._needPush=!1,this._readValue=P(n,this._type),this._finished=!1,this.on("finish",(function(){this._finished=!0,this._read()}))}function _(e){var t=!!(e=e||{}).noDecode;a.Duplex.call(this,{allowHalfOpen:!0,readableObjectMode:!t}),this._rType=void 0!==e.readerSchema?i.Type.forSchema(e.readerSchema):void 0,this._wType=null,this._codecs=e.codecs,this._codec=void 0,this._parseHook=e.parseHook,this._tap=new v(o.newBuffer(0)),this._blockTap=new v(o.newBuffer(0)),this._syncMarker=null,this._readValue=null,this._noDecode=t,this._queue=new o.OrderedQueue,this._decompress=null,this._index=0,this._remaining=void 0,this._needPush=!1,this._finished=!1,this.on("finish",(function(){this._finished=!0,this._needPush&&this._read()}))}function $(e,t){t=t||{},a.Transform.call(this,{writableObjectMode:!0,allowHalfOpen:!1}),this._type=i.Type.forSchema(e),this._writeValue=function(e,t){try{this._type._write(e,t)}catch(e){this.emit("typeError",e,t,this._type)}},this._tap=new v(o.newBuffer(t.batchSize||65536)),this.on("typeError",(function(e){this.emit("error",e)}))}function w(e,t){var n;if(t=t||{},a.Duplex.call(this,{allowHalfOpen:!0,writableObjectMode:!0}),i.Type.isType(e)?(n=e,e=void 0):n=i.Type.forSchema(e),this._schema=e,this._type=n,this._writeValue=function(e,t){try{this._type._write(e,t)}catch(e){return this.emit("typeError",e,t,this._type),!1}return!0},this._blockSize=t.blockSize||65536,this._tap=new v(o.newBuffer(this._blockSize)),this._codecs=t.codecs,this._codec=t.codec||"null",this._blockCount=0,this._syncMarker=t.syncMarker||(new o.Lcg).nextBuffer(16),this._queue=new o.OrderedQueue,this._pending=0,this._finished=!1,this._needHeader=!1,this._needPush=!1,this._metadata=t.metadata||{},!f.isValid(this._metadata))throw new Error("invalid metadata");var r=this._codec;if(this._compress=(this._codecs||w.getDefaultCodecs())[r],!this._compress)throw new Error(g("unsupported codec: %s",r));switch(void 0!==t.omitHeader&&(t.writeHeader=t.omitHeader?"never":"auto"),t.writeHeader){case!1:case"never":break;case void 0:case"auto":this._needHeader=!0;break;default:this._writeHeader()}this.on("finish",(function(){this._finished=!0,this._blockCount?this._flushChunk():this._finished&&this._needPush&&this.push(null)})),this.on("typeError",(function(e){this.emit("error",e)}))}function j(e,t,n){this.valueCount=e,this.rawDataLength=t,this.compressedDataLength=n}function x(e,t,n,r){this.index=e,this.buf=t,this.cb=n,this.count=0|r}function S(e){var t=e.pos,n=m._read(e);return e.isValid()?n:(e.pos=t,null)}function P(e,t,n){if(e)return i=t._skip,function(e){var t=e.pos;return i(e),e.buf.slice(t,e.pos)};if(n){var r=n.createResolver(t);return function(e){return r._read(e)}}return function(e){return t._read(e)};var i}c.inherits(b,a.Duplex),b.prototype._write=function(e,t,n){this._writeCb=n;var r=this._tap;r.buf=l.concat([r.buf.slice(r.pos),e]),r.pos=0,this._needPush&&(this._needPush=!1,this._read())},b.prototype._read=function(){this._needPush=!1;var e=this._tap,t=e.pos,n=this._readValue(e);e.isValid()?this.push(n):this._finished?this.push(null):(e.pos=t,this._needPush=!0,this._writeCb&&this._writeCb())},c.inherits(_,a.Duplex),_.defaultCodecs=function(){return{null:function(e,t){t(null,e)},deflate:p.inflateRaw}},_.getDefaultCodecs=_.defaultCodecs,_.prototype._decodeHeader=function(){var e=this._tap;if(e.buf.lengthi.length&&(r.buf=o.newBuffer(2*a)),r.pos=0,this._writeValue(r,e)}n()},$.prototype._flush=function(e){var t=this._tap,n=t.pos;n&&this.push(t.buf.slice(0,n)),e()},c.inherits(w,a.Duplex),w.defaultCodecs=function(){return{null:function(e,t){t(null,e)},deflate:p.deflateRaw}},w.getDefaultCodecs=w.defaultCodecs,w.prototype._writeHeader=function(){var e=JSON.stringify(this._schema?this._schema:this._type.getSchema({exportAttrs:!0})),t=o.copyOwnProperties(this._metadata,{"avro.schema":o.bufferFrom(e),"avro.codec":o.bufferFrom(this._codec)},!0),n=new(h.getRecordConstructor())(y,t,this._syncMarker);this.push(n.toBuffer())},w.prototype._write=function(e,t,n){this._needHeader&&(this._writeHeader(),this._needHeader=!1);var r=this._tap,i=r.pos,s=!1;if(this._writeValue(r,e)){if(!r.isValid()){i&&(this._flushChunk(i,n),s=!0);var a=r.pos-i;a>this._blockSize&&(this._blockSize=2*a),r.buf=o.newBuffer(this._blockSize),r.pos=0,this._writeValue(r,e)}this._blockCount++}else r.pos=i;s||n()},w.prototype._flushChunk=function(e,t){var n=this._tap;e=e||n.pos,this._compress(n.buf.slice(0,e),this._createBlockCallback(e,t)),this._blockCount=0},w.prototype._read=function(){var e=this,t=this._queue.pop();t?(this.push(d.toBuffer(t.count,!0)),this.push(d.toBuffer(t.buf.length,!0)),this.push(t.buf),this.push(this._syncMarker),this._finished||t.cb()):this._finished&&!this._pending?r.nextTick((function(){e.push(null)})):this._needPush=!0},w.prototype._createBlockCallback=function(e,t){var n=this,r=this._index++,i=this._blockCount;return this._pending++,function(o,s){if(o){var a=new Error(g("%s codec compression error",n._codec));return a.cause=o,void n.emit("error",a)}n._pending--,n.emit("block",new j(i,e,s.length)),n._queue.push(new x(r,s,t,i)),n._needPush&&(n._needPush=!1,n._read())}},e.exports={BLOCK_TYPE:m,HEADER_TYPE:h,MAGIC_BYTES:y,streams:{BlockDecoder:_,BlockEncoder:w,RawDecoder:b,RawEncoder:$}}},6724:(e,t,n)=>{"use strict";var r=n(34155),i=n(25108),o=n(87608),s=n(34570),a=n(48764),c=n(17187),p=n(42830),l=n(89539),u=a.Buffer,d=s.Tap,f=o.Type,h=l.debuglog("avsc:services"),m=l.format,y={namespace:"org.apache.avro.ipc"},g=f.forSchema("boolean",y),v=f.forSchema({type:"map",values:"bytes"},y),b=f.forSchema("string",y),_=f.forSchema({name:"HandshakeRequest",type:"record",fields:[{name:"clientHash",type:{name:"MD5",type:"fixed",size:16}},{name:"clientProtocol",type:["null","string"],default:null},{name:"serverHash",type:"MD5"},{name:"meta",type:["null",v],default:null}]},y),$=f.forSchema({name:"HandshakeResponse",type:"record",fields:[{name:"match",type:{name:"HandshakeMatch",type:"enum",symbols:["BOTH","CLIENT","NONE"]}},{name:"serverProtocol",type:["null","string"],default:null},{name:"serverHash",type:["null","MD5"],default:null},{name:"meta",type:["null",v],default:null}]},y),w=16,j=new x("",f.forSchema({name:"PingRequest",type:"record",fields:[]},y),f.forSchema(["string"],y),f.forSchema("null",y));function x(e,t,n,r,i,o){if(this.name=e,!f.isType(t,"record"))throw new Error("invalid request type");if(this.requestType=t,!f.isType(n,"union")||!f.isType(n.getTypes()[0],"string"))throw new Error("invalid error type");if(this.errorType=n,i&&(!f.isType(r,"null")||n.getTypes().length>1))throw new Error("inapplicable one-way parameter");this.responseType=r,this.oneWay=!!i,this.doc=void 0!==o?""+o:void 0,Object.freeze(this)}function S(e,t,n,r,i){if("string"!=typeof e)return S.forProtocol(e,t);this.name=e,this._messagesByName=t||{},this.messages=Object.freeze(s.objectValues(this._messagesByName)),this._typesByName=n||{},this.types=Object.freeze(s.objectValues(this._typesByName)),this.protocol=r,this._hashStr=s.getHash(JSON.stringify(r)).toString("binary"),this.doc=r.doc?""+r.doc:void 0,this._server=i||this.createServer({silent:!0}),Object.freeze(this)}function P(e,t){t=t||{},c.EventEmitter.call(this),this._svc$=e,this._channels$=[],this._fns$=[],this._buffering$=!!t.buffering,this._cache$=t.cache||{},this._policy$=t.channelPolicy,this._strict$=!!t.strictTypes,this._timeout$=s.getOption(t,"timeout",1e4),t.remoteProtocols&&G(this._cache$,t.remoteProtocols,e,!0),this._svc$.messages.forEach((function(e){this[e.name]=this._createMessageHandler$(e)}),this)}function E(e,t){t=t||{},c.EventEmitter.call(this),this.service=e,this._handlers={},this._fns=[],this._channels={},this._nextChannelId=1,this._cache=t.cache||{},this._defaultHandler=t.defaultHandler,this._sysErrFormatter=t.systemErrorFormatter,this._silent=!!t.silent,this._strict=!!t.strictTypes,t.remoteProtocols&&G(this._cache,t.remoteProtocols,e,!1),e.messages.forEach((function(e){var n=e.name;t.noCapitalize||(n=s.capitalize(n)),this["on"+n]=this._createMessageHandler(e)}),this)}function O(e,t){t=t||{},c.EventEmitter.call(this),this.client=e,this.timeout=s.getOption(t,"timeout",e._timeout$),this._endWritable=!!s.getOption(t,"endWritable",!0),this._prefix=X(t.scope);var n=e._cache$,r=e._svc$,i=t.serverHash;i||(i=r.hash);var o=n[i];o||(o=n[i=r.hash]=new q(r,r,i)),this._adapter=o,this._registry=new D(this,w),this.pending=0,this.destroyed=!1,this.draining=!1,this.once("_eot",(function(e,t){h("client channel EOT"),this.destroyed=!0,this.emit("eot",e,t)}))}function T(e,t,n){O.call(this,e,n),this._writableFactory=t,n&&n.noPing||(h("emitting ping request"),this.ping())}function k(e,t,n,i){O.call(this,e,i),this._readable=t,this._writable=n,this._connected=!(!i||!i.noPing),this._readable.on("end",f),this._writable.on("finish",m);var o,a=this,c=null;function p(e){if(!a.destroyed){o=a._createHandshakeRequest(a._adapter,!e);var t=[_.toBuffer(o),s.bufferFrom([0,0])];a._writable.write({id:a._prefix,payload:t})}}function l(e){if(a._matchesPrefix(e.id)){var t=u.concat(e.payload);try{var n=B($,t).head;n.serverHash&&(a._adapter=a._getAdapter(n))}catch(e){return void a.destroy(e)}var i=n.match;h("handshake match: %s",i),a.emit("handshake",o,n),"NONE"===i?r.nextTick((function(){p(!0)})):(h("successfully connected"),c&&(clearTimeout(c),c=null),a._readable.removeListener("data",l).on("data",d),a._connected=!0,a.emit("_ready"),o=null)}else h("discarding unscoped response %s (still connecting)",e.id)}function d(e){var t=e.id;if(a._matchesPrefix(t)){var n=a._registry.get(t);n&&r.nextTick((function(){h("received message %s",t),n(null,u.concat(e.payload),a._adapter)}))}else h("discarding unscoped message %s",t)}function f(){a.destroy(!0)}function m(){a.destroy()}this.once("eot",(function(){c&&(clearTimeout(c),c=null),a._connected||a.emit("_ready"),this._writable.removeListener("finish",m),this._endWritable&&(h("ending transport"),this._writable.end()),this._readable.removeListener("data",l).removeListener("data",d).removeListener("end",f)})),this._connected?this._readable.on("data",d):(this._readable.on("data",l),r.nextTick(p),a.timeout&&(c=setTimeout((function(){a.destroy(new Error("timeout"))}),a.timeout)))}function A(e,t){t=t||{},c.EventEmitter.call(this),this.server=e,this._endWritable=!!s.getOption(t,"endWritable",!0),this._prefix=X(t.scope);var n=e._cache,r=e.service,i=r.hash;n[i]||(n[i]=new q(r,r,i)),this._adapter=null,this.destroyed=!1,this.draining=!1,this.pending=0,this.once("_eot",(function(e,t){h("server channel EOT"),this.emit("eot",e,t)}))}function I(e,t,n){A.call(this,e,n),this._writable=void 0;var i,o=this;function s(e){var t,n=e.id,r=u.concat(e.payload);try{var i=B(_,r),s=i.head,a=o._getAdapter(s)}catch(e){t=Z("INVALID_HANDSHAKE_REQUEST",e)}var c=o._createHandshakeResponse(t,s);function p(e){if(!o.destroyed){if(!o._writable)return void o.once("_writable",(function(){p(e)}));o._writable.write({id:n,payload:[$.toBuffer(c),e]})}o._writable&&o._endWritable&&o._writable.end()}o.emit("handshake",s,c),t?p(o._encodeSystemError(t)):o._receive(i.tail,a,p)}function a(){o.destroy()}function c(e){i.removeListener("data",s).removeListener("end",a),o.destroy(e||!0)}r.nextTick((function(){i=t.call(o,(function(e,t){r.nextTick((function(){e?c(e):(o._writable=t.on("finish",c),o.emit("_writable"))}))})).on("data",s).on("end",a)}))}function N(e,t,n,r){A.call(this,e,r),this._adapter=void 0,this._writable=n.on("finish",c),this._readable=t.on("data",o).on("end",a),this.once("_drain",(function(){this._readable.removeListener("data",o).removeListener("data",s).removeListener("end",a)})).once("eot",(function(){this._writable.removeListener("finish",c),this._endWritable&&this._writable.end()}));var i=this;function o(e){var t=e.id;if(i._matchesPrefix(t)){var n,r=u.concat(e.payload);try{var a=B(_,r),c=a.head;i._adapter=i._getAdapter(c)}catch(e){n=Z("INVALID_HANDSHAKE_REQUEST",e)}var p=i._createHandshakeResponse(n,c);i.emit("handshake",c,p),n?l(i._encodeSystemError(n)):(i._readable.removeListener("data",o).on("data",s),i._receive(a.tail,i._adapter,l))}function l(e){i.destroyed||i._writable.write({id:t,payload:[$.toBuffer(p),e]})}}function s(e){var t=e.id;if(i._matchesPrefix(t)){var n=u.concat(e.payload);i._receive(n,i._adapter,(function(e,n){i.destroyed||n||i._writable.write({id:t,payload:[e]})}))}}function a(){i.destroy()}function c(){i.destroy(!0)}}function R(e,t,n){this._msg=e,this.headers=t||{},this.request=n||{}}function M(e,t,n,r){this._msg=e,this.headers=t,this.error=n,this.response=r}function C(e,t){this.channel=t,this.locals={},this.message=e,Object.freeze(this)}function D(e,t){this._ctx=e,this._mask=-1>>>(0|t),this._id=0,this._n=0,this._cbs={}}function q(e,t,n,r){this._clientSvc=e,this._serverSvc=t,this._hash=n,this._isRemote=!!r,this._readers=H(e,t)}function F(){p.Transform.call(this,{readableObjectMode:!0}),this._id=void 0,this._buf=s.newBuffer(0),this._bufs=[],this.on("finish",(function(){this.push(null)}))}function U(){p.Transform.call(this,{writableObjectMode:!0}),this.on("finish",(function(){this.push(null)}))}function V(){p.Transform.call(this,{readableObjectMode:!0}),this._id=void 0,this._frameCount=0,this._buf=s.newBuffer(0),this._bufs=[],this.on("finish",(function(){this.push(null)}))}function L(){p.Transform.call(this,{writableObjectMode:!0}),this.on("finish",(function(){this.push(null)}))}function z(e){var t=s.newBuffer(4);return t.writeInt32BE(e),t}function B(e,t){var n=new d(t),r=e._read(n);if(!n.isValid())throw new Error(m("truncated %j",e.schema()));return{head:r,tail:n.buf.slice(n.pos)}}function K(e,t){return e.equals(t)?e:e.createResolver(t)}function H(e,t){var n={};return e.messages.forEach((function(e){var r=e.name,i=t.message(r);try{if(!i)throw new Error(m("missing server message: %s",r));if(i.oneWay!==e.oneWay)throw new Error(m("inconsistent one-way message: %s",r));n[r+"?"]=K(i.requestType,e.requestType),n[r+"*"]=K(e.errorType,i.errorType),n[r+"!"]=K(e.responseType,i.responseType)}catch(e){throw Z("INCOMPATIBLE_PROTOCOL",e)}})),n}function G(e,t,n,r){Object.keys(t).forEach((function(i){var o,s,a=t[i];r?(o=n,s=S.forProtocol(a)):(o=S.forProtocol(a),s=n),e[i]=new q(o,s,i,!0)}))}function W(e,t){var n={};return Object.keys(e).forEach((function(r){var i=e[r];if(i._isRemote){var o=t?i._serverSvc:i._clientSvc;n[r]=o.protocol}})),n}function J(e){return!!e&&"[object Error]"===Object.prototype.toString.call(e)}function Q(e,t){var n=new Error(e);return n.cause=t,n}function Z(e,t){var n=Q(e.toLowerCase().replace(/_/g," "),t);return n.rpcCode=t&&t.rpcCode?t.rpcCode:e,n}function Y(e,t,n){var r,i,o,s=[];for(r=0,i=n.length;r>32-w==0}function te(e){return!(!e||!e.pipe)}function ne(e,t){var n=e.message(t);if(!n)throw new Error(m("unknown message: %s",t));return n}function re(e){var t,n=[e.wreq,e.wres],i=[];function o(){var n=i.pop();if(n){var r=!1;n.call(e.ctx,t,(function(n){r?e.onError(Q("duplicate backward middleware call",n)):(t=n,r=!0,o())}))}else e.onCompletion.call(e.ctx,t)}!function s(a){var c=!1;a1&&(t.errors=r.slice(1)),this.oneWay&&(t["one-way"]=!0),t},s.addDeprecatedGetters(x,["name","errorType","requestType","responseType"]),x.prototype.isOneWay=l.deprecate((function(){return this.oneWay}),"use `.oneWay` directly instead of `.isOneWay()`"),S.Client=P,S.Server=E,S.compatible=function(e,t){try{H(e,t)}catch(e){return!1}return!0},S.forProtocol=function(e,t){t=t||{};var n,r=e.protocol;if(!r)throw new Error("missing protocol name");if(void 0!==e.namespace)t.namespace=e.namespace;else{var i=/^(.*)\.[^.]+$/.exec(r);i&&(t.namespace=i[1])}return r=s.qualify(r,t.namespace),e.types&&e.types.forEach((function(e){f.forSchema(e,t)})),e.messages&&(n={},Object.keys(e.messages).forEach((function(r){n[r]=x.forSchema(r,e.messages[r],t)}))),new S(r,n,t.registry,e)},S.isService=function(e){return!!e&&e.hasOwnProperty("_hashStr")},S.prototype.createClient=function(e){var t=new P(this,e);return r.nextTick((function(){if(e&&e.server){var n={objectMode:!0},r=[new p.PassThrough(n),new p.PassThrough(n)];e.server.createChannel({readable:r[0],writable:r[1]},n),t.createChannel({readable:r[1],writable:r[0]},n)}else e&&e.transport&&t.createChannel(e.transport)})),t},S.prototype.createServer=function(e){return new E(this,e)},Object.defineProperty(S.prototype,"hash",{enumerable:!0,get:function(){return s.bufferFrom(this._hashStr,"binary")}}),S.prototype.message=function(e){return this._messagesByName[e]},S.prototype.type=function(e){return this._typesByName[e]},S.prototype.inspect=function(){return m("",this.name)},s.addDeprecatedGetters(S,["message","messages","name","type","types"]),S.prototype.createEmitter=l.deprecate((function(e,t){t=t||{};var n,r,i=this.createClient({cache:t.cache,buffering:!1,strictTypes:t.strictErrors,timeout:t.timeout}),o=i.createChannel(e,t);return r=o,(n=i).on("error",(function(e){r.emit("error",e,n)})),o}),"use `.createClient()` instead of `.createEmitter()`"),S.prototype.createListener=l.deprecate((function(e,t){if(t&&t.strictErrors)throw new Error("use `.createServer()` to support strict errors");return this._server.createChannel(e,t)}),"use `.createServer().createChannel()` instead of `.createListener()`"),S.prototype.emit=l.deprecate((function(e,t,n,r){if(!n||!this.equals(n.client._svc$))throw new Error("invalid emitter");var i=n.client;return P.prototype.emitMessage.call(i,e,t,r&&r.bind(this)),n.getPending()}),"create a client via `.createClient()` to emit messages instead of `.emit()`"),S.prototype.equals=l.deprecate((function(e){return S.isService(e)&&this.getFingerprint().equals(e.getFingerprint())}),"equality testing is deprecated, compare the `.protocol`s instead"),S.prototype.getFingerprint=l.deprecate((function(e){return s.getHash(JSON.stringify(this.protocol),e)}),"use `.hash` instead of `.getFingerprint()`"),S.prototype.getSchema=l.deprecate(f.prototype.getSchema,"use `.protocol` instead of `.getSchema()`"),S.prototype.on=l.deprecate((function(e,t){var n=this;return this._server.onMessage(e,(function(e,r){return t.call(n,e,this.channel,r)})),this}),"use `.createServer().onMessage()` instead of `.on()`"),S.prototype.subprotocol=l.deprecate((function(){var e=this._server,t={strictTypes:e._strict,cache:e._cache},n=new E(e.service,t);return n._handlers=Object.create(e._handlers),new S(this.name,this._messagesByName,this._typesByName,this.protocol,n)}),"`.subprotocol()` will be removed in 5.1"),S.prototype._attrs=function(e){var t={protocol:this.name},n=[];this.types.forEach((function(t){if(void 0!==t.getName()){var r=t._attrs(e);"string"!=typeof r&&n.push(r)}})),n.length&&(t.types=n);var r=Object.keys(this._messagesByName);return r.length&&(t.messages={},r.forEach((function(n){t.messages[n]=this._messagesByName[n]._attrs(e)}),this)),e&&e.exportAttrs&&void 0!==this.doc&&(t.doc=this.doc),t},l.inherits(P,c.EventEmitter),P.prototype.activeChannels=function(){return this._channels$.slice()},P.prototype.createChannel=function(e,t){var n,r=t&&t.objectMode;if("function"==typeof e){var i;i=r?e:function(t){var r=new U,i=e((function(e,r){if(e)t(e);else{var i=(new F).once("error",(function(e){n.destroy(e)}));t(null,r.pipe(i))}}));if(i)return r.pipe(i),r},n=new T(this,i,t)}else{var o,s;if(te(e)?o=s=e:(o=e.readable,s=e.writable),!r){var a=new V;o=o.pipe(a);var c=new L;c.pipe(s),s=c}n=new k(this,o,s,t),r||(n.once("eot",(function(){o.unpipe(a),c.unpipe(s)})),a.once("error",(function(e){n.destroy(e)})))}var p=this._channels$;return p.push(n),n.once("_drain",(function(){p.splice(p.indexOf(this),1)})),this._buffering$=!1,this.emit("channel",n),n},P.prototype.destroyChannels=function(e){this._channels$.forEach((function(t){t.destroy(e&&e.noWait)}))},P.prototype.emitMessage=function(e,t,n,r){var i=new R(ne(this._svc$,e),{},t);this._emitMessage$(i,n,r)},P.prototype.remoteProtocols=function(){return W(this._cache$,!0)},Object.defineProperty(P.prototype,"service",{enumerable:!0,get:function(){return this._svc$}}),P.prototype.use=function(){var e,t,n;for(e=0,t=arguments.length;e0&&(n=setTimeout((function(){o(new Error("timeout"))}),e)),this._cbs[i]=o,this._n++,i;function o(){r._cbs[i]&&(delete r._cbs[i],r._n--,n&&clearTimeout(n),t.apply(r._ctx,arguments))}},D.prototype.clear=function(){Object.keys(this._cbs).forEach((function(e){this._cbs[e](new Error("interrupted"))}),this)},q.prototype._decodeRequest=function(e){var t,n,r=new d(e),i=v._read(r),o=b._read(r);if(o?(t=this._serverSvc.message(o),n=this._readers[o+"?"]._read(r)):t=j,!r.isValid())throw new Error(m("truncated %s request",o||"ping$"));return new R(t,i,n)},q.prototype._decodeResponse=function(e,t,n){var r=new d(e);s.copyOwnProperties(v._read(r),t.headers,!0);var i=g._read(r),o=n.name;if(o){var a=this._readers[o+(i?"*":"!")];if(n=this._clientSvc.message(o),i?t.error=a._read(r):t.response=a._read(r),!r.isValid())throw new Error(m("truncated %s response",o))}else n=j},l.inherits(F,p.Transform),F.prototype._transform=function(e,t,n){var r;for(e=u.concat([this._buf,e]);e.length>=4&&e.length>=(r=e.readInt32BE(0))+4;){if(r)this._bufs.push(e.slice(4,r+4));else{var i=this._bufs;this._bufs=[],this.push({id:null,payload:i})}e=e.slice(r+4)}this._buf=e,n()},F.prototype._flush=function(e){if(this._buf.length||this._bufs.length){var t=this._bufs.slice();t.unshift(this._buf);var n=Z("TRAILING_DATA");n.trailingData=u.concat(t).toString(),this.emit("error",n)}e()},l.inherits(U,p.Transform),U.prototype._transform=function(e,t,n){var r,i,o,s=e.payload;for(r=0,i=s.length;r=4&&e.length>=(r=e.readInt32BE(0))+4;)this._frameCount--,this._bufs.push(e.slice(4,r+4)),e=e.slice(r+4);if(this._frameCount)return this._buf=e,void n();var i={id:this._id,payload:this._bufs};this._bufs=[],this._id=void 0,this.push(i)}},V.prototype._flush=F.prototype._flush,l.inherits(L,p.Transform),L.prototype._transform=function(e,t,n){var r,i,o=e.payload,a=o.length;for((r=s.newBuffer(8)).writeInt32BE(e.id,0),r.writeInt32BE(a,4),this.push(r),i=0;i{"use strict";var r=n(67776),i=n(34570),o=n(26470),s=n(89539).format,a={date:{type:"int",logicalType:"date"},decimal:{type:"bytes",logicalType:"decimal"},time_ms:{type:"long",logicalType:"time-millis"},timestamp_ms:{type:"long",logicalType:"timestamp-millis"}};function c(e,t,n){n||"function"!=typeof t||(n=t,t=void 0),(t=t||{}).importHook||(t.importHook=r.createImportHook()),function e(n,r){t.importHook(n,"idl",(function(i,a){if(i)r(i);else if(void 0!==a){try{var c=new p(a,t)._readProtocol(a,t)}catch(i){return i.path=n,void r(i)}!function(n,r,i,a){var c=[];!function p(){var l=r.shift();if(l){var u=o.join(i,l.name);"idl"===l.kind?e(u,(function(e,t){e?a(e):(t&&c.push(t),p())})):t.importHook(u,l.kind,(function(e,t){if(e)a(e);else switch(l.kind){case"protocol":case"schema":if(void 0===t)return void p();try{var n=JSON.parse(t)}catch(e){return e.path=u,void a(e)}var r="schema"===l.kind?{types:[n]}:n;return c.push(r),void p();default:a(new Error(s("invalid import kind: %s",l.kind)))}}))}else{c.reverse();try{c.forEach((function(e){!function(e,t){var n=t.types||[];n.reverse(),n.forEach((function(n){e.types||(e.types=[]),void 0===n.namespace&&(n.namespace=d(t)||""),e.types.unshift(n)})),Object.keys(t.messages||{}).forEach((function(n){if(e.messages||(e.messages={}),e.messages[n])throw new Error(s("duplicate message: %s",n));e.messages[n]=t.messages[n]}))}(n,e)}))}catch(e){return void a(e)}a(null,n)}}()}(c.protocol,c.imports,o.dirname(n),r)}else r()}))}(e,(function(e,t){if(e)n(e);else if(t){var r=t.types;if(r){var i=d(t)||"";r.forEach((function(e){e.namespace===i&&delete e.namespace}))}n(null,t)}else n(new Error("empty root import"))}))}function p(e,t){t=t||{},this._tk=new l(e),this._ackVoidMessages=!!t.ackVoidMessages,this._implicitTags=!t.delimitedCollections,this._typeRefs=t.typeRefs||a}function l(e){this._str=e,this.pos=0}function u(e){for(var t=e.replace(/^[ \t]+|[ \t]+$/g,"").split("\n").map((function(e,t){return t?e.replace(/^\s*\*\s?/,""):e}));t.length&&!t[0];)t.shift();for(;t.length&&!t[t.length-1];)t.pop();return t.join("\n")}function d(e){if(e.namespace)return e.namespace;var t=/^(.*)\.[^.]+$/.exec(e.protocol);return t?t[1]:void 0}p.readProtocol=function(e,t){var n=new p(e,t)._readProtocol();if(n.imports.length)throw new Error("unresolvable import");return n.protocol},p.readSchema=function(e,t){var n=new p(e,t),r=n._readJavadoc(),i=n._readType(void 0===r?{}:{doc:r},!0);return n._tk.next({id:"(eof)"}),i},p.prototype._readProtocol=function(){var e,t=this._tk,n=[],r=[],i={};this._readImports(n);var o={},a=this._readJavadoc();for(void 0!==a&&(o.doc=a),this._readAnnotations(o),t.next({val:"protocol"}),t.next({val:"{",silent:!0})||(o.protocol=t.next({id:"name"}).val,t.next({val:"{"}));!t.next({val:"}",silent:!0});)if(!this._readImports(n)){var c=this._readJavadoc(),p=this._readType({},!0),l=this._readImports(n,!0),u=void 0;if(e=t.pos,!l&&(u=this._readMessage(p))){void 0!==c&&void 0===u.schema.doc&&(u.schema.doc=c);var d=!1;if("void"!==u.schema.response&&"void"!==u.schema.response.type||(d=!this._ackVoidMessages&&!u.schema.errors,"void"===u.schema.response?u.schema.response="null":u.schema.response.type="null"),d&&(u.schema["one-way"]=!0),i[u.name])throw new Error(s("duplicate message: %s",u.name));i[u.name]=u.schema}else c&&("string"==typeof p?p={doc:c,type:p}:void 0===p.doc&&(p.doc=c)),r.push(p),t.pos=e,t.next({val:";",silent:!0});c=void 0}return t.next({id:"(eof)"}),r.length&&(o.types=r),Object.keys(i).length&&(o.messages=i),{protocol:o,imports:n}},p.prototype._readAnnotations=function(e){for(var t=this._tk;t.next({val:"@",silent:!0});){for(var n=[];!t.next({val:"(",silent:!0});)n.push(t.next().val);e[n.join("")]=t.next({id:"json"}).val,t.next({val:")"})}},p.prototype._readMessage=function(e){var t=this._tk,n={request:[],response:e};this._readAnnotations(n);var r=t.next().val;if("("===t.next().val){if(!t.next({val:")",silent:!0}))do{n.request.push(this._readField())}while(!t.next({val:")",silent:!0})&&t.next({val:","}));var i=t.next();switch(i.val){case"throws":n.errors=[];do{n.errors.push(this._readType())}while(!t.next({val:";",silent:!0})&&t.next({val:","}));break;case"oneway":n["one-way"]=!0,t.next({val:";"});break;case";":break;default:throw t.error("invalid message suffix",i)}return{name:r,schema:n}}},p.prototype._readJavadoc=function(){var e=this._tk.next({id:"javadoc",emitJavadoc:!0,silent:!0});if(e)return e.val},p.prototype._readField=function(){var e=this._tk,t=this._readJavadoc(),n={type:this._readType()};return void 0!==t&&void 0===n.doc&&(n.doc=t),this._readAnnotations(n),n.name=e.next({id:"name"}).val,e.next({val:"=",silent:!0})&&(n.default=e.next({id:"json"}).val),n},p.prototype._readType=function(e,t){switch(e=e||{},this._readAnnotations(e),e.type=this._tk.next({id:"name"}).val,e.type){case"record":case"error":return this._readRecord(e);case"fixed":return this._readFixed(e);case"enum":return this._readEnum(e,t);case"map":return this._readMap(e);case"array":return this._readArray(e);case"union":if(Object.keys(e).length>1)throw new Error("union annotations are not supported");return this._readUnion();default:var n=this._typeRefs[e.type];return n&&(delete e.type,i.copyOwnProperties(n,e)),Object.keys(e).length>1?e:e.type}},p.prototype._readFixed=function(e){var t=this._tk;return t.next({val:"(",silent:!0})||(e.name=t.next({id:"name"}).val,t.next({val:"("})),e.size=parseInt(t.next({id:"number"}).val),t.next({val:")"}),e},p.prototype._readMap=function(e){var t=this._tk,n=this._implicitTags,r=void 0===t.next({val:"<",silent:n});return e.values=this._readType(),t.next({val:">",silent:r}),e},p.prototype._readArray=function(e){var t=this._tk,n=this._implicitTags,r=void 0===t.next({val:"<",silent:n});return e.items=this._readType(),t.next({val:">",silent:r}),e},p.prototype._readEnum=function(e,t){var n=this._tk;n.next({val:"{",silent:!0})||(e.name=n.next({id:"name"}).val,n.next({val:"{"})),e.symbols=[];do{e.symbols.push(n.next().val)}while(!n.next({val:"}",silent:!0})&&n.next({val:","}));return t&&n.next({val:"=",silent:!0})&&(e.default=n.next().val,n.next({val:";"})),e},p.prototype._readUnion=function(){var e=this._tk,t=[];e.next({val:"{"});do{t.push(this._readType())}while(!e.next({val:"}",silent:!0})&&e.next({val:","}));return t},p.prototype._readRecord=function(e){var t=this._tk;for(t.next({val:"{",silent:!0})||(e.name=t.next({id:"name"}).val,t.next({val:"{"})),e.fields=[];!t.next({val:"}",silent:!0});)e.fields.push(this._readField()),t.next({val:";"});return e},p.prototype._readImports=function(e,t){for(var n=this._tk,r=0,i=n.pos;n.next({val:"import",silent:!0});){if(!r&&t&&n.next({val:"(",silent:!0}))return void(n.pos=i);var o=n.next({id:"name"}).val,s=JSON.parse(n.next({id:"string"}).val);n.next({val:";"}),e.push({kind:o,name:s}),r++}return r},l.prototype.next=function(e){var t,n={pos:this.pos,id:void 0,val:void 0},r=this._skip(e&&e.emitJavadoc);if("string"==typeof r)n.id="javadoc",n.val=r;else{var i=this.pos,o=this._str,a=o.charAt(i);if(a)if(e&&"json"===e.id?(n.id="json",this.pos=this._endOfJson()):'"'===a?(n.id="string",this.pos=this._endOfString()):/[0-9]/.test(a)?(n.id="number",this.pos=this._endOf(/[0-9]/)):/[`A-Za-z_.]/.test(a)?(n.id="name",this.pos=this._endOf(/[`A-Za-z0-9_.]/)):(n.id="operator",this.pos=i+1),n.val=o.slice(i,this.pos),"json"===n.id)try{n.val=JSON.parse(n.val)}catch(t){throw this.error("invalid JSON",n)}else"name"===n.id&&(n.val=n.val.replace(/`/g,""));else n.id="(eof)"}if(e&&e.id&&e.id!==n.id?t=this.error(s("expected ID %s",e.id),n):e&&e.val&&e.val!==n.val&&(t=this.error(s("expected value %s",e.val),n)),t){if(e&&e.silent)return void(this.pos=n.pos);throw t}return n},l.prototype.error=function(e,t){var n,r="number"!=typeof t,i=r?t.pos:t,o=this._str,a=1,c=0;for(n=0;n{"use strict";var r=n(34570),i=n(48764),o=n(89539),s=i.Buffer,a=i.SlowBuffer,c=r.Tap,p=o.debuglog("avsc:types"),l=o.format,u={array:I,boolean:b,bytes:S,double:j,enum:T,error:N,fixed:k,float:w,int:_,long:$,map:A,null:v,record:N,string:x},d=new r.Lcg,f=new c(new a(1024)),h=null,m=[];function y(e,t){var n;if(h?(n=h,m.push([h,this]),h=null):n=this,this._hash=new q,this.name=void 0,this.aliases=void 0,this.doc=e&&e.doc?""+e.doc:void 0,e){var r=e.name,i=void 0===e.namespace?t&&t.namespace:e.namespace;if(void 0!==r){if(L(r=W(r,i)))throw new Error(l("cannot rename primitive type: %j",r));var o=t&&t.registry;if(o){if(void 0!==o[r])throw new Error(l("duplicate type name: %s",r));o[r]=n}}else if(t&&t.noAnonymousTypes)throw new Error(l("missing name property in schema: %j",e));this.name=r,this.aliases=e.aliases?e.aliases.map((function(e){return W(e,i)})):[]}}function g(e){y.call(this),this._branchConstructor=this._createBranchConstructor(),e||Object.freeze(this)}function v(){g.call(this)}function b(){g.call(this)}function _(){g.call(this)}function $(){g.call(this)}function w(){g.call(this)}function j(){g.call(this)}function x(){g.call(this)}function S(){g.call(this)}function P(e,t){if(y.call(this),!Array.isArray(e))throw new Error(l("non-array union schema: %j",e));if(!e.length)throw new Error("empty union");this.types=Object.freeze(e.map((function(e){return y.forSchema(e,t)}))),this._branchIndices={},this.types.forEach((function(e,t){if(y.isType(e,"union"))throw new Error("unions cannot be directly nested");var n=e.branchName;if(void 0!==this._branchIndices[n])throw new Error(l("duplicate union branch name: %j",n));this._branchIndices[n]=t}),this)}function E(e,t){P.call(this,e,t),this._dynamicBranches=null,this._bucketIndices={},this.types.forEach((function(e,t){if(y.isType(e,"abstract","logical"))this._dynamicBranches||(this._dynamicBranches=[]),this._dynamicBranches.push({index:t,type:e});else{var n=J(e);if(void 0!==this._bucketIndices[n])throw new Error(l("ambiguous unwrapped union: %j",this));this._bucketIndices[n]=t}}),this),Object.freeze(this)}function O(e,t){P.call(this,e,t),Object.freeze(this)}function T(e,t){if(y.call(this,e,t),!Array.isArray(e.symbols)||!e.symbols.length)throw new Error(l("invalid enum symbols: %j",e.symbols));if(this.symbols=Object.freeze(e.symbols.slice()),this._indices={},this.symbols.forEach((function(e,t){if(!r.isValidName(e))throw new Error(l("invalid %s symbol: %j",this,e));if(void 0!==this._indices[e])throw new Error(l("duplicate %s symbol: %j",this,e));this._indices[e]=t}),this),this.default=e.default,void 0!==this.default&&void 0===this._indices[this.default])throw new Error(l("invalid %s default: %j",this,this.default));this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function k(e,t){if(y.call(this,e,t),e.size!==(0|e.size)||e.size<0)throw new Error(l("invalid %s size",this.branchName));this.size=0|e.size,this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function A(e,t){if(y.call(this),!e.values)throw new Error(l("missing map values: %j",e));this.valuesType=y.forSchema(e.values,t),this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function I(e,t){if(y.call(this),!e.items)throw new Error(l("missing array items: %j",e));this.itemsType=y.forSchema(e.items,t),this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function N(e,t){var n=(t=t||{}).namespace;if(void 0!==e.namespace)t.namespace=e.namespace;else if(e.name){var i=r.impliedNamespace(e.name);void 0!==i&&(t.namespace=i)}if(y.call(this,e,t),!Array.isArray(e.fields))throw new Error(l("non-array record fields: %j",e.fields));if(r.hasDuplicates(e.fields,(function(e){return e.name})))throw new Error(l("duplicate field name: %j",e.fields));this._fieldsByName={},this.fields=Object.freeze(e.fields.map((function(e){var n=new C(e,t);return this._fieldsByName[n.name]=n,n}),this)),this._branchConstructor=this._createBranchConstructor(),this._isError="error"===e.type,this.recordConstructor=this._createConstructor(t.errorStackTraces,t.omitRecordMethods),this._read=this._createReader(),this._skip=this._createSkipper(),this._write=this._createWriter(),this._check=this._createChecker(),t.namespace=n,Object.freeze(this)}function R(e,t){this._logicalTypeName=e.logicalType,y.call(this),h=this;try{this._underlyingType=y.forSchema(e,t)}finally{h=null;var n=m.length;n&&m[n-1][0]===this&&m.pop()}y.isType(this.underlyingType,"union")?this._branchConstructor=this.underlyingType._branchConstructor:this._branchConstructor=this.underlyingType._createBranchConstructor()}function M(e){this._concreteTypeName="long",g.call(this,!0),this._noUnpack=!!e}function C(e,t){var n=e.name;if("string"!=typeof n||!r.isValidName(n))throw new Error(l("invalid field name: %s",n));this.name=n,this.type=y.forSchema(e.type,t),this.aliases=e.aliases||[],this.doc=void 0!==e.doc?""+e.doc:void 0,this._order=function(e){switch(e){case"ascending":return 1;case"descending":return-1;case"ignore":return 0;default:throw new Error(l("invalid order: %j",e))}}(void 0===e.order?"ascending":e.order);var i=e.default;if(void 0!==i){var o,s=this.type;try{o=s._copy(i,{coerce:2,wrap:2})}catch(e){var a=l("incompatible field default %j (%s)",i,e.message);throw y.isType(s,"union")&&(a+=l(", union defaults must match the first branch's type (%j)",s.types[0])),new Error(a)}L(s.typeName)&&"bytes"!==s.typeName?this.defaultValue=function(){return o}:this.defaultValue=function(){return s._copy(o)}}Object.freeze(this)}function D(e){this._readerType=e,this._read=null,this.itemsType=null,this.size=0,this.symbols=null,this.valuesType=null}function q(){this.str=void 0}function F(e,t,n,r){if(n){if(n._readerType!==e)throw new Error("invalid resolver");return n._read(t,r)}return e._read(t)}function U(e){var t={};e.name&&(t[e.name]=!0);var n,r,i=e.aliases;for(n=0,r=i.length;n=-9007199254740990&&e<=9007199254740990}function H(e){return e&&"Buffer"===e.type&&Array.isArray(e.data)}function G(e,t){throw new Error(l("invalid %j: %j",t.schema(),e))}function W(e,t){var n=r.unqualify(e);return L(n)?n:r.qualify(e,t)}function J(e){var t=e.typeName;switch(t){case"double":case"float":case"int":case"long":return"number";case"bytes":case"fixed":return"buffer";case"enum":return"string";case"map":case"error":case"record":return"object";default:return t}}function Q(e){if(null===e)return"null";var t=typeof e;if("object"===t){if(Array.isArray(e))return"array";if(s.isBuffer(e))return"buffer"}return t}y.forSchema=function(e,t){(t=t||{}).registry=t.registry||{};var n,r=function(e){switch(!0===e?e="always":!1===e?e="never":void 0===e?e="auto":"string"==typeof e&&(e=e.toLowerCase()),e){case"always":return O;case"never":return E;case"auto":return;default:throw new Error(l("invalid wrap unions option: %j",e))}}(t.wrapUnions);if(null===e)throw new Error('invalid type: null (did you mean "null"?)');if(y.isType(e))return e;if(t.typeHook&&(n=t.typeHook(e,t))){if(!y.isType(n))throw new Error(l("invalid typehook return value: %j",n));return n}if("string"==typeof e){if(e=W(e,t.namespace),n=t.registry[e])return n;if(L(e))return t.registry[e]=y.forSchema({type:e},t);throw new Error(l("undefined type name: %s",e))}if(e.logicalType&&t.logicalTypes&&!h){var i=t.logicalTypes[e.logicalType];if(i){var o=t.namespace,s={};Object.keys(t.registry).forEach((function(e){s[e]=t.registry[e]}));try{return p("instantiating logical type for %s",e.logicalType),new i(e,t)}catch(n){if(p("failed to instantiate logical type for %s",e.logicalType),t.assertLogicalTypes)throw n;h=null,t.namespace=o,t.registry=s}}}if(Array.isArray(e)){var a=h;h=null;var c=e.map((function(e){return y.forSchema(e,t)}));r||(r=function(e){var t,n,r,i,o={};for(t=0,n=e.length;ts&&(s=i,a=r);return a}(n);case"string":return function(e,t){var n,r,i,o,s={};for(n=0,r=e.length;n0){var a=s[0];s[0]=s[i],s[i]=a,n=y.forSchema(s,t)}}return{name:e,type:n,default:p[e]}}))}:{type:"map",values:y.forTypes(a,t)},y.forSchema(s,t)}(n,t)}}));return 1===p.length?p[0]:y.forSchema(p,t)},y.isType=function(){var e=arguments.length;if(!e)return!1;var t=arguments[0];if(!t||"function"!=typeof t._update||"function"!=typeof t.fingerprint)return!1;if(1===e)return!0;var n,r=t.typeName;for(n=1;n",t);var n=this.schema({exportAttrs:!0,noDeref:!0});return"object"!=typeof n||y.isType(this,"logical")||(n.type=void 0),l("<%s %j>",t,n)},y.prototype.isValid=function(e,t){var n,r,i=0|(t&&t.noUndeclaredFields),o=t&&t.errorHook;return o&&(r=[],n=function(t,n){o.call(this,r.slice(),t,n,e)}),this._check(e,i,n,r)},y.prototype.random=r.abstractFunction,y.prototype.schema=function(e){return this._attrs({exportAttrs:!(!e||!e.exportAttrs),noDeref:!(!e||!e.noDeref)})},y.prototype.toBuffer=function(e){f.pos=0,this._write(f,e);var t=r.newBuffer(f.pos);return f.isValid()?f.buf.copy(t,0,0,f.pos):this._write(new c(t),e),t},y.prototype.toJSON=function(){return this.schema({exportAttrs:!0})},y.prototype.toString=function(e){return void 0===e?JSON.stringify(this.schema({noDeref:!0})):JSON.stringify(this._copy(e,{coerce:3}))},y.prototype.wrap=function(e){var t=this._branchConstructor;return null===t?null:new t(e)},y.prototype._attrs=function(e){e.derefed=e.derefed||{};var t=this.name;if(void 0!==t){if(e.noDeref||e.derefed[t])return t;e.derefed[t]=!0}var n={};void 0!==this.name&&(n.name=t),n.type=this.typeName;var r=this._deref(n,e);return void 0!==r&&(n=r),e.exportAttrs&&(this.aliases&&this.aliases.length&&(n.aliases=this.aliases),void 0!==this.doc&&(n.doc=this.doc)),n},y.prototype._createBranchConstructor=function(){var e=this.branchName;if("null"===e)return null;var t=~e.indexOf(".")?"this['"+e+"']":"this."+e,n=new Function("return function Branch$(val) { "+t+" = val; };")();return n.type=this,n.prototype.unwrap=new Function("return "+t+";"),n.prototype.unwrapped=n.prototype.unwrap,n},y.prototype._peek=function(e){var t=e.pos,n=this._read(e);return e.pos=t,n},y.prototype._check=r.abstractFunction,y.prototype._copy=r.abstractFunction,y.prototype._deref=r.abstractFunction,y.prototype._match=r.abstractFunction,y.prototype._read=r.abstractFunction,y.prototype._skip=r.abstractFunction,y.prototype._update=r.abstractFunction,y.prototype._write=r.abstractFunction,y.prototype.getAliases=function(){return this.aliases},y.prototype.getFingerprint=y.prototype.fingerprint,y.prototype.getName=function(e){return this.name||!e?this.name:this.branchName},y.prototype.getSchema=y.prototype.schema,y.prototype.getTypeName=function(){return this.typeName},o.inherits(g,y),g.prototype._update=function(e,t){t.typeName===this.typeName&&(e._read=this._read)},g.prototype._copy=function(e){return this._check(e,void 0,G),e},g.prototype._deref=function(){return this.typeName},g.prototype.compare=r.compare,o.inherits(v,g),v.prototype._check=function(e,t,n){var r=null===e;return!r&&n&&n(e,this),r},v.prototype._read=function(){return null},v.prototype._skip=function(){},v.prototype._write=function(e,t){null!==t&&G(t,this)},v.prototype._match=function(){return 0},v.prototype.compare=v.prototype._match,v.prototype.typeName="null",v.prototype.random=v.prototype._read,o.inherits(b,g),b.prototype._check=function(e,t,n){var r="boolean"==typeof e;return!r&&n&&n(e,this),r},b.prototype._read=function(e){return e.readBoolean()},b.prototype._skip=function(e){e.skipBoolean()},b.prototype._write=function(e,t){"boolean"!=typeof t&&G(t,this),e.writeBoolean(t)},b.prototype._match=function(e,t){return e.matchBoolean(t)},b.prototype.typeName="boolean",b.prototype.random=function(){return d.nextBoolean()},o.inherits(_,g),_.prototype._check=function(e,t,n){var r=e===(0|e);return!r&&n&&n(e,this),r},_.prototype._read=function(e){return e.readInt()},_.prototype._skip=function(e){e.skipInt()},_.prototype._write=function(e,t){t!==(0|t)&&G(t,this),e.writeInt(t)},_.prototype._match=function(e,t){return e.matchInt(t)},_.prototype.typeName="int",_.prototype.random=function(){return 0|d.nextInt(1e3)},o.inherits($,g),$.prototype._check=function(e,t,n){var r="number"==typeof e&&e%1==0&&K(e);return!r&&n&&n(e,this),r},$.prototype._read=function(e){var t=e.readLong();if(!K(t))throw new Error("potential precision loss");return t},$.prototype._skip=function(e){e.skipLong()},$.prototype._write=function(e,t){("number"!=typeof t||t%1||!K(t))&&G(t,this),e.writeLong(t)},$.prototype._match=function(e,t){return e.matchLong(t)},$.prototype._update=function(e,t){switch(t.typeName){case"int":e._read=t._read;break;case"abstract:long":case"long":e._read=this._read}},$.prototype.typeName="long",$.prototype.random=function(){return d.nextInt()},$.__with=function(e,t){e=e||{};var n={toBuffer:"_toBuffer",fromBuffer:"_fromBuffer",fromJSON:"_fromJSON",toJSON:"_toJSON",isValid:"_isValid",compare:"compare"},r=new M(t);return Object.keys(n).forEach((function(t){if(void 0===e[t])throw new Error(l("missing method implementation: %s",t));r[n[t]]=e[t]})),Object.freeze(r)},o.inherits(w,g),w.prototype._check=function(e,t,n){var r="number"==typeof e;return!r&&n&&n(e,this),r},w.prototype._read=function(e){return e.readFloat()},w.prototype._skip=function(e){e.skipFloat()},w.prototype._write=function(e,t){"number"!=typeof t&&G(t,this),e.writeFloat(t)},w.prototype._match=function(e,t){return e.matchFloat(t)},w.prototype._update=function(e,t){switch(t.typeName){case"float":case"int":e._read=t._read;break;case"abstract:long":case"long":e._read=function(e){return e.readLong()}}},w.prototype.typeName="float",w.prototype.random=function(){return d.nextFloat(1e3)},o.inherits(j,g),j.prototype._check=function(e,t,n){var r="number"==typeof e;return!r&&n&&n(e,this),r},j.prototype._read=function(e){return e.readDouble()},j.prototype._skip=function(e){e.skipDouble()},j.prototype._write=function(e,t){"number"!=typeof t&&G(t,this),e.writeDouble(t)},j.prototype._match=function(e,t){return e.matchDouble(t)},j.prototype._update=function(e,t){switch(t.typeName){case"double":case"float":case"int":e._read=t._read;break;case"abstract:long":case"long":e._read=function(e){return e.readLong()}}},j.prototype.typeName="double",j.prototype.random=function(){return d.nextFloat()},o.inherits(x,g),x.prototype._check=function(e,t,n){var r="string"==typeof e;return!r&&n&&n(e,this),r},x.prototype._read=function(e){return e.readString()},x.prototype._skip=function(e){e.skipString()},x.prototype._write=function(e,t){"string"!=typeof t&&G(t,this),e.writeString(t)},x.prototype._match=function(e,t){return e.matchString(t)},x.prototype._update=function(e,t){switch(t.typeName){case"bytes":case"string":e._read=this._read}},x.prototype.typeName="string",x.prototype.random=function(){return d.nextString(d.nextInt(32))},o.inherits(S,g),S.prototype._check=function(e,t,n){var r=s.isBuffer(e);return!r&&n&&n(e,this),r},S.prototype._read=function(e){return e.readBytes()},S.prototype._skip=function(e){e.skipBytes()},S.prototype._write=function(e,t){s.isBuffer(t)||G(t,this),e.writeBytes(t)},S.prototype._match=function(e,t){return e.matchBytes(t)},S.prototype._update=x.prototype._update,S.prototype._copy=function(e,t){var n;switch(0|(t&&t.coerce)){case 3:return this._check(e,void 0,G),e.toString("binary");case 2:if("string"!=typeof e)throw new Error(l("cannot coerce to buffer: %j",e));return n=r.bufferFrom(e,"binary"),this._check(n,void 0,G),n;case 1:if(!H(e))throw new Error(l("cannot coerce to buffer: %j",e));return n=r.bufferFrom(e.data),this._check(n,void 0,G),n;default:return this._check(e,void 0,G),r.bufferFrom(e)}},S.prototype.compare=s.compare,S.prototype.typeName="bytes",S.prototype.random=function(){return d.nextBuffer(d.nextInt(32))},o.inherits(P,y),P.prototype._branchConstructor=function(){throw new Error("unions cannot be directly wrapped")},P.prototype._skip=function(e){this.types[e.readLong()]._skip(e)},P.prototype._match=function(e,t){var n=e.readLong(),r=t.readLong();return n===r?this.types[n]._match(e,t):n1)throw new Error(l("ambiguous aliasing for %s.%s (%s)",t.name,s.name,p));if(p.length)a=p[0],u={resolver:s.type.createResolver(h[a].type,n),name:"_"+s.name},y[a]?y[a].push(u):y[a]=[u],m.push(u.name);else{if(void 0===s.defaultValue())throw new Error(l("no matching field for default-less %s.%s",t.name,s.name));m.push("undefined")}}var g=-1;for(i=f.length;i&&void 0===y[f[--i].name];)g=i;var v=this._getConstructorName(),b=[v],_=[this.recordConstructor],$=" return function read"+v+"(t, b) {\n";for(i=0;i=g?" ":" ",b.push("r"+i),_.push(s.type),$+="r"+i+"._skip(t);\n";else for(o=y[a].length;o--;)$+=~g&&i>=g?" ":" ",b.push("r"+i+"f"+o),u=y[a][o],_.push(u.resolver),$+="var "+u.name+" = ",$+="r"+i+"f"+o+"._"+(o?"peek":"read")+"(t);\n";~g&&($+=" }\n"),$+=" return new "+v+"("+m.join()+");\n};",e._read=new Function(b.join(),$).apply(void 0,_)},N.prototype._match=function(e,t){var n,r,i,o,s,a=this.fields;for(n=0,r=a.length;n"},e.exports={Type:y,getTypeBucket:J,getValueBucket:Q,isPrimitive:L,builtins:function(){var e,t,n,r={LogicalType:R,UnwrappedUnionType:E,WrappedUnionType:O},i=Object.keys(u);for(e=0,t=i.length;e{"use strict";var r=n(48764),i=n(35880),o=n(89539),s=r.Buffer,a=new h(4096),c=/^[A-Za-z_][A-Za-z0-9_]*$/,p=o.format;function l(e){return"function"==typeof s.alloc?s.alloc(e):new s(e)}function u(e,t){return"function"==typeof s.from?s.from(e,t):new s(e,t)}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}function f(e){return c.test(e)}function h(e){this._len=0|e,this._pos=0,this._slab=l(this._len)}function m(e){var t=Math.pow(2,31),n=Math.floor(e||Math.random()*(t-1));this._max=t,this._nextInt=function(){return n=(1103515245*n+12345)%t}}function y(){this._index=0,this._items=[]}function g(e,t){if(this.buf=e,this.pos=0|t,this.pos<0)throw new Error("negative offset")}function v(e,t){for(;t--;)e[t]=~e[t]}h.prototype.alloc=function(e){if(e<0)throw new Error("negative length");var t=this._len;return e>t?l(e):(this._pos+e>t&&(this._slab=l(t),this._pos=0),this._slab.slice(this._pos,this._pos+=e))},m.prototype.nextBoolean=function(){return!!(this._nextInt()%2)},m.prototype.nextInt=function(e,t){return void 0===t&&(t=e,e=0),t=void 0===t?this._max:t,e+Math.floor(this.nextFloat()*(t-e))},m.prototype.nextFloat=function(e,t){return void 0===t&&(t=e,e=0),e+((t=void 0===t?1:t)-e)*this._nextInt()/this._max},m.prototype.nextString=function(e,t){e|=0;var n="";(t=t||"aA").indexOf("a")>-1&&(n+="abcdefghijklmnopqrstuvwxyz"),t.indexOf("A")>-1&&(n+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.indexOf("#")>-1&&(n+="0123456789"),t.indexOf("!")>-1&&(n+="~`!@#$%^&*()_+-={}[]:\";'<>?,./|\\");for(var r=[],i=0;i0&&n[r].index>1].index;)e=n[r],n[r]=n[t],n[t]=e,r=t},y.prototype.pop=function(){var e=this._items,t=e.length-1|0,n=e[0];if(!n||n.index>this._index)return null;if(this._index++,!t)return e.pop(),n;e[0]=e.pop();for(var r,i,o,s,a,c,p,l=t>>1,u=0;u=s.index));)e[o]=s,e[u]=a,u=o;return n},g.prototype.isValid=function(){return this.pos<=this.buf.length},g.prototype._invalidate=function(){this.pos=this.buf.length+1},g.prototype.readBoolean=function(){return!!this.buf[this.pos++]},g.prototype.skipBoolean=function(){this.pos++},g.prototype.writeBoolean=function(e){this.buf[this.pos++]=!!e},g.prototype.readInt=g.prototype.readLong=function(){var e,t,n,r,i=0,o=0,s=this.buf;do{t=128&(e=s[this.pos++]),i|=(127&e)<>1^-(1&i)},g.prototype.skipInt=g.prototype.skipLong=function(){for(var e=this.buf;128&e[this.pos++];);},g.prototype.writeInt=g.prototype.writeLong=function(e){var t,n,r=this.buf;if(e>=-1073741824&&e<1073741824){n=e>=0?e<<1:~e<<1|1;do{r[this.pos]=127&n,n>>=7}while(n&&(r[this.pos++]|=128))}else{t=e>=0?2*e:2*-e-1;do{r[this.pos]=127&t,t/=128}while(t>=1&&(r[this.pos++]|=128))}this.pos++},g.prototype.readFloat=function(){var e=this.buf,t=this.pos;return this.pos+=4,this.pos>e.length?0:this.buf.readFloatLE(t)},g.prototype.skipFloat=function(){this.pos+=4},g.prototype.writeFloat=function(e){var t=this.buf,n=this.pos;if(this.pos+=4,!(this.pos>t.length))return this.buf.writeFloatLE(e,n)},g.prototype.readDouble=function(){var e=this.buf,t=this.pos;return this.pos+=8,this.pos>e.length?0:this.buf.readDoubleLE(t)},g.prototype.skipDouble=function(){this.pos+=8},g.prototype.writeDouble=function(e){var t=this.buf,n=this.pos;if(this.pos+=8,!(this.pos>t.length))return this.buf.writeDoubleLE(e,n)},g.prototype.readFixed=function(e){var t=this.pos;if(this.pos+=e,!(this.pos>this.buf.length)){var n=a.alloc(e);return this.buf.copy(n,0,t,t+e),n}},g.prototype.skipFixed=function(e){this.pos+=e},g.prototype.writeFixed=function(e,t){t=t||e.length;var n=this.pos;this.pos+=t,this.pos>this.buf.length||e.copy(this.buf,n,0,t)},g.prototype.readBytes=function(){var e=this.readLong();if(!(e<0))return this.readFixed(e);this._invalidate()},g.prototype.skipBytes=function(){var e=this.readLong();e<0?this._invalidate():this.pos+=e},g.prototype.writeBytes=function(e){var t=e.length;this.writeLong(t),this.writeFixed(e,t)},"function"==typeof s.prototype.utf8Slice?g.prototype.readString=function(){var e=this.readLong();if(e<0)return this._invalidate(),"";var t=this.pos,n=this.buf;return this.pos+=e,this.pos>n.length?void 0:this.buf.utf8Slice(t,t+e)}:g.prototype.readString=function(){var e=this.readLong();if(e<0)return this._invalidate(),"";var t=this.pos,n=this.buf;return this.pos+=e,this.pos>n.length?void 0:this.buf.slice(t,t+e).toString()},g.prototype.skipString=function(){var e=this.readLong();e<0?this._invalidate():this.pos+=e},g.prototype.writeString=function(e){var t=s.byteLength(e),n=this.buf;this.writeLong(t);var r,i,o,a,c=this.pos;if(this.pos+=t,!(this.pos>n.length))if(t>64&&"function"==typeof s.prototype.utf8Write)n.utf8Write(e,c,t);else for(r=0,i=t;r>6|192,n[c++]=63&o|128):55296==(64512&o)&&56320==(64512&(a=e.charCodeAt(r+1)))?(o=65536+((1023&o)<<10)+(1023&a),r++,n[c++]=o>>18|240,n[c++]=o>>12&63|128,n[c++]=o>>6&63|128,n[c++]=63&o|128):(n[c++]=o>>12|224,n[c++]=o>>6&63|128,n[c++]=63&o|128)},"function"==typeof s.prototype.latin1Write?g.prototype.writeBinary=function(e,t){var n=this.pos;this.pos+=t,this.pos>this.buf.length||this.buf.latin1Write(e,n,t)}:"function"==typeof s.prototype.binaryWrite?g.prototype.writeBinary=function(e,t){var n=this.pos;this.pos+=t,this.pos>this.buf.length||this.buf.binaryWrite(e,n,t)}:g.prototype.writeBinary=function(e,t){var n=this.pos;this.pos+=t,this.pos>this.buf.length||this.buf.write(e,n,t,"binary")},g.prototype.matchBoolean=function(e){return this.buf[this.pos++]-e.buf[e.pos++]},g.prototype.matchInt=g.prototype.matchLong=function(e){var t=this.readLong(),n=e.readLong();return t===n?0:t>1;128&e;)r|=(127&(e=s[this.pos++]))<=8&&(o-=8,n[i++]=r,r>>=8);return n[i]=r,t&&v(n,8),n},g.prototype.packLongBytes=function(e){var t,n=(128&e[7])>>7,r=this.buf,i=1,o=0,s=3;n?(v(e,8),t=1):t=0;for(var a=[e.readUIntLE(0,3),e.readUIntLE(3,3),e.readUIntLE(6,2)];s&&!a[--s];);for(;o7;)r[this.pos++]=127&t|128,t>>=7,i-=7;t|=a[s]<>=7}while(t&&(r[this.pos++]|=128));this.pos++,n&&v(e,8)},e.exports={abstractFunction:function(){throw new Error("abstract")},addDeprecatedGetters:function(e,t){var n,r,i,s,a=e.prototype;for(n=0,r=t.length;n=0)return-2;i=n}return i},hasDuplicates:function(e,t){var n,r,i,o=Object.create(null);for(n=0,r=e.length;n{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,s,a,c=n.indexOf(e),p=n.indexOf(t,c+1),l=c;if(c>=0&&p>0){if(e===t)return[c,p];for(r=[],o=n.length;l>=0&&!a;)l==c?(r.push(l),c=n.indexOf(e,l+1)):1==r.length?a=[r.pop(),p]:((i=r.pop())=0?c:p;r.length&&(a=[o,s])}return a}e.exports=t,t.range=r},79742:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=a(e),s=o[0],c=o[1],p=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,u=c>0?s-4:s;for(n=0;n>16&255,p[l++]=t>>8&255,p[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,p[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,p[l++]=t>>8&255,p[l++]=255&t),p},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,p=r-i;ap?p:a+s));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},3644:(e,t,n)=>{var r=n(11048),i=n(5623);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),g(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(p)}(e),!0).map(u)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",p="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(p).join(".")}function d(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,s=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var c=d(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function f(e){return"{"+e+"}"}function h(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function y(e,t){return e>=t}function g(e,t){var n=[],o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),u=c||p,v=o.body.indexOf(",")>=0;if(!u&&!v)return o.post.match(/,.*\}/)?g(e=o.pre+"{"+o.body+a+o.post):[e];if(u)s=o.body.split(/\.\./);else if(1===(s=d(o.body)).length&&1===(s=g(s[0],!1).map(f)).length)return($=o.post.length?g(o.post,!1):[""]).map((function(e){return o.pre+s[0]+e}));var b,_=o.pre,$=o.post.length?g(o.post,!1):[""];if(u){var w=l(s[0]),j=l(s[1]),x=Math.max(s[0].length,s[1].length),S=3==s.length?Math.abs(l(s[2])):1,P=m;j0){var A=new Array(k+1).join("0");T=O<0?"-"+A+T.slice(1):A+T}}b.push(T)}}else b=r(s,(function(e){return g(e,!1)}));for(var I=0;I{"use strict";var r=n(48764).Buffer,i=n(34155),o=n(69282),s=n(62292),a=n(30405),c=n(27948),p=n(71619);for(var l in p)t[l]=p[l];function u(e){if("number"!=typeof e||et.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,u.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},u.prototype.write=function(e,t,n,r,i,o,s){return this._write(!0,e,t,n,r,i,o,s)},u.prototype.writeSync=function(e,t,n,r,i,o,s){return this._write(!1,e,t,n,r,i,o,s)},u.prototype._write=function(e,n,s,a,c,p,l,u){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==t.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===n,"must provide flush value"),this.write_in_progress=!0,n!==t.Z_NO_FLUSH&&n!==t.Z_PARTIAL_FLUSH&&n!==t.Z_SYNC_FLUSH&&n!==t.Z_FULL_FLUSH&&n!==t.Z_FINISH&&n!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=r.alloc(0),c=0,a=0),this.strm.avail_in=c,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=u,this.strm.output=p,this.strm.next_out=l,this.flush=n,!e)return this._process(),this._checkError()?this._afterSync():void 0;var d=this;return i.nextTick((function(){d._process(),d._after()})),this},u.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},u.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},u.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},u.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},u.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},u.prototype.init=function(e,n,r,i,s){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(e>=8&&e<=15,"invalid windowBits"),o(n>=-1&&n<=9,"invalid compression level"),o(r>=1&&r<=9,"invalid memlevel"),o(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(n,e,r,i,s),this._setDictionary()},u.prototype.params=function(){throw new Error("deflateParams Not supported")},u.prototype.reset=function(){this._reset(),this._setDictionary()},u.prototype._init=function(e,n,r,i,o){switch(this.level=e,this.windowBits=n,this.memLevel=r,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},u.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},u.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=a.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=u},42635:(e,t,n)=>{"use strict";var r=n(34155),i=n(48764).Buffer,o=n(42830).Transform,s=n(74505),a=n(89539),c=n(69282).ok,p=n(48764).kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+p.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(s),d=0;d=p?s=new RangeError(l):t=i.concat(r,o),r=[],e.close(),n(s,t)}e.on("error",(function(t){e.removeListener("end",a),e.removeListener("readable",s),n(t)})),e.on("end",a),e.end(t),s()}function b(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var n=e._finishFlushFlag;return e._processChunk(t,n)}function _(e){if(!(this instanceof _))return new _(e);O.call(this,e,s.DEFLATE)}function $(e){if(!(this instanceof $))return new $(e);O.call(this,e,s.INFLATE)}function w(e){if(!(this instanceof w))return new w(e);O.call(this,e,s.GZIP)}function j(e){if(!(this instanceof j))return new j(e);O.call(this,e,s.GUNZIP)}function x(e){if(!(this instanceof x))return new x(e);O.call(this,e,s.DEFLATERAW)}function S(e){if(!(this instanceof S))return new S(e);O.call(this,e,s.INFLATERAW)}function P(e){if(!(this instanceof P))return new P(e);O.call(this,e,s.UNZIP)}function E(e){return e===s.Z_NO_FLUSH||e===s.Z_PARTIAL_FLUSH||e===s.Z_SYNC_FLUSH||e===s.Z_FULL_FLUSH||e===s.Z_FINISH||e===s.Z_BLOCK}function O(e,n){var r=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,o.call(this,e),e.flush&&!E(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!E(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||s.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:s.Z_FINISH,e.chunkSize&&(e.chunkSizet.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitst.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(n);var a=this;this._hadError=!1,this._handle.onerror=function(e,n){T(a),a._hadError=!0;var r=new Error(e);r.errno=n,r.code=t.codes[n],a.emit("error",r)};var c=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(c=e.level);var p=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(p=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,c,e.memLevel||t.Z_DEFAULT_MEMLEVEL,p,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=c,this._strategy=p,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}function T(e,t){t&&r.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function k(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(h),writable:!1}),t.Deflate=_,t.Inflate=$,t.Gzip=w,t.Gunzip=j,t.DeflateRaw=x,t.InflateRaw=S,t.Unzip=P,t.createDeflate=function(e){return new _(e)},t.createInflate=function(e){return new $(e)},t.createDeflateRaw=function(e){return new x(e)},t.createInflateRaw=function(e){return new S(e)},t.createGzip=function(e){return new w(e)},t.createGunzip=function(e){return new j(e)},t.createUnzip=function(e){return new P(e)},t.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),v(new _(t),e,n)},t.deflateSync=function(e,t){return b(new _(t),e)},t.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),v(new w(t),e,n)},t.gzipSync=function(e,t){return b(new w(t),e)},t.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),v(new x(t),e,n)},t.deflateRawSync=function(e,t){return b(new x(t),e)},t.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),v(new P(t),e,n)},t.unzipSync=function(e,t){return b(new P(t),e)},t.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),v(new $(t),e,n)},t.inflateSync=function(e,t){return b(new $(t),e)},t.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),v(new j(t),e,n)},t.gunzipSync=function(e,t){return b(new j(t),e)},t.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),v(new S(t),e,n)},t.inflateRawSync=function(e,t){return b(new S(t),e)},a.inherits(O,o),O.prototype.params=function(e,n,i){if(et.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=t.Z_FILTERED&&n!=t.Z_HUFFMAN_ONLY&&n!=t.Z_RLE&&n!=t.Z_FIXED&&n!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var o=this;this.flush(s.Z_SYNC_FLUSH,(function(){c(o._handle,"zlib binding closed"),o._handle.params(e,n),o._hadError||(o._level=e,o._strategy=n,i&&i())}))}else r.nextTick(i)},O.prototype.reset=function(){return c(this._handle,"zlib binding closed"),this._handle.reset()},O.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},O.prototype.flush=function(e,t){var n=this,o=this._writableState;("function"==typeof e||void 0===e&&!t)&&(t=e,e=s.Z_FULL_FLUSH),o.ended?t&&r.nextTick(t):o.ending?t&&this.once("end",t):o.needDrain?t&&this.once("drain",(function(){return n.flush(e,t)})):(this._flushFlag=e,this.write(i.alloc(0),"",t))},O.prototype.close=function(e){T(this,e),r.nextTick(k,this)},O.prototype._transform=function(e,t,n){var r,o=this._writableState,a=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||i.isBuffer(e)?this._handle?(a?r=this._finishFlushFlag:(r=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(e,r,n)):n(new Error("zlib binding closed")):n(new Error("invalid input"))},O.prototype._processChunk=function(e,t,n){var r=e&&e.length,o=this._chunkSize-this._offset,s=0,a=this,u="function"==typeof n;if(!u){var d,f=[],h=0;this.on("error",(function(e){d=e})),c(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,s,r,this._buffer,this._offset,o)}while(!this._hadError&&v(m[0],m[1]));if(this._hadError)throw d;if(h>=p)throw T(this),new RangeError(l);var y=i.concat(f,h);return T(this),y}c(this._handle,"zlib binding closed");var g=this._handle.write(t,e,s,r,this._buffer,this._offset,o);function v(p,l){if(this&&(this.buffer=null,this.callback=null),!a._hadError){var d=o-l;if(c(d>=0,"have should not go down"),d>0){var m=a._buffer.slice(a._offset,a._offset+d);a._offset+=d,u?a.push(m):(f.push(m),h+=m.length)}if((0===l||a._offset>=a._chunkSize)&&(o=a._chunkSize,a._offset=0,a._buffer=i.allocUnsafe(a._chunkSize)),0===l){if(s+=r-p,r=p,!u)return!0;var y=a._handle.write(t,e,s,r,a._buffer,a._offset,a._chunkSize);return y.callback=v,void(y.buffer=e)}if(!u)return!1;n()}}g.buffer=e,g.callback=v},a.inherits(_,O),a.inherits($,O),a.inherits(w,O),a.inherits(j,O),a.inherits(x,O),a.inherits(S,O),a.inherits(P,O)},48764:(e,t,n)=>{"use strict";var r=n(25108);const i=n(79742),o=n(80645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=p,t.SlowBuffer=function(e){return+e!=e&&(e=0),p.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function c(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|y(e,t);let r=c(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return p.from(r,t,n);const i=function(e){if(p.isBuffer(e)){const t=0|m(e.length),n=c(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?c(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),c(e<0?0:0|m(e))}function f(e){const t=e.length<0?0:0|m(e.length),n=c(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return r?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=p.from(t,r)),p.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){let o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function p(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let r=-1;for(o=n;oa&&(n=a-c),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=t.length;let s;for(r>o/2&&(r=o/2),s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function P(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=n){let n,r,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(o=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(p.isBuffer(t)||(t=p.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!p.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},p.byteLength=y,p.prototype._isBuffer=!0,p.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},s&&(p.prototype[s]=p.prototype.inspect),p.prototype.compare=function(e,t,n,r,i){if(Q(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return $(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return j(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r,i){z(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function C(e,t,n,r,i){z(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function q(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,i){return t=+t,n>>>=0,i||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}p.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=X((function(e){B(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*t)),r},p.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},p.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=X((function(e){B(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||K(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||N(e,4,this.length),o.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),o.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),o.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),o.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=X((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=X((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}let i=0,o=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},p.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+n},p.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=X((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=X((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,n){return q(this,e,t,!0,n)},p.prototype.writeFloatBE=function(e,t,n){return q(this,e,t,!1,n)},p.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},p.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},p.prototype.copy=function(e,t,n,r){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function z(e,t,n,r,i,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){B(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||K(t,e.length-(n+1))}(r,i,o)}function B(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,n){if(Math.floor(e)!==e)throw B(e,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=L(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=L(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let s=0;s55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},21924:(e,t,n)=>{"use strict";var r=n(40210),i=n(55559),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},55559:(e,t,n)=>{"use strict";var r=n(58612),i=n(40210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(s,o),c=i("%Object.getOwnPropertyDescriptor%",!0),p=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(p)try{p({},"a",{value:1})}catch(e){p=null}e.exports=function(e){var t=a(r,s,arguments);return c&&p&&c(t,"length").configurable&&p(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var u=function(){return a(r,o,arguments)};p?p(e.exports,"apply",{value:u}):e.exports.apply=u},11048:e=>{e.exports=function(e,n){for(var r=[],i=0;i{var r=n(89539),i=n(69282);function o(){return(new Date).getTime()}var s,a=Array.prototype.slice,c={};s=void 0!==n.g&&n.g.console?n.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var p=[[function(){},"log"],[function(){s.log.apply(s,arguments)},"info"],[function(){s.log.apply(s,arguments)},"warn"],[function(){s.warn.apply(s,arguments)},"error"],[function(e){c[e]=o()},"time"],[function(e){var t=c[e];if(!t)throw new Error("No such label: "+e);delete c[e];var n=o()-t;s.log(e+": "+n+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=r.format.apply(null,arguments),s.error(e.stack)},"trace"],[function(e){s.log(r.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=a.call(arguments,1);i.ok(!1,r.format.apply(null,t))}},"assert"]],l=0;l{"use strict";var r=n(31044)(),i=n(40210),o=r&&i("%Object.defineProperty%",!0),s=i("%SyntaxError%"),a=i("%TypeError%"),c=n(27296);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean`");if(arguments.length>4&&"boolean"!=typeof arguments[4])throw new a("`nonWritable`, if provided, must be a boolean`");if(arguments.length>5&&"boolean"!=typeof arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean`");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,l=!!c&&c(e,t);if(o)o(e,t,{configurable:null===p&&l?l.configurable:!p,enumerable:null===r&&l?l.enumerable:!r,value:n,writable:null===i&&l?l.writable:!i});else{if(r||i||p)throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},4289:(e,t,n)=>{"use strict";var r=n(82215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=n(12296),c=n(31044)(),p=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!=typeof(i=r)||"[object Function]"!==o.call(i)||!r())return;var i;c?a(e,t,n,!0):a(e,t,n)},l=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=s.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a1?n-1:0),i=1;i/gm),U=a(/^data-[\-\w.\u00B7-\uFFFF]/),V=a(/^aria-[\-\w]+$/),L=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=a(/^(?:\w+script|data):/i),B=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),H="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};function G(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:W(),n=function(t){return e(t)};if(n.version="2.3.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var i=t.document,o=t.document,a=t.DocumentFragment,c=t.HTMLTemplateElement,p=t.Node,l=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,j=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,J=t.HTMLFormElement,Q=t.DOMParser,Z=t.trustedTypes,Y=l.prototype,X=P(Y,"cloneNode"),ee=P(Y,"nextSibling"),te=P(Y,"childNodes"),ne=P(Y,"parentNode");if("function"==typeof c){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var ie=function(e,t){if("object"!==(void 0===e?"undefined":H(e))||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return r.warn("TrustedTypes policy "+o+" could not be created."),null}}(Z,i),oe=ie?ie.createHTML(""):"",se=o,ae=se.implementation,ce=se.createNodeIterator,pe=se.createDocumentFragment,le=se.getElementsByTagName,ue=i.importNode,de={};try{de=S(o).documentMode?o.documentMode:{}}catch(e){}var fe={};n.isSupported="function"==typeof ne&&ae&&void 0!==ae.createHTMLDocument&&9!==de;var he=q,me=F,ye=U,ge=V,ve=z,be=B,_e=L,$e=null,we=x({},[].concat(G(E),G(O),G(T),G(A),G(N))),je=null,xe=x({},[].concat(G(R),G(M),G(C),G(D))),Se=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pe=null,Ee=null,Oe=!0,Te=!0,ke=!1,Ae=!1,Ie=!1,Ne=!1,Re=!1,Me=!1,Ce=!1,De=!1,qe=!0,Fe=!0,Ue=!1,Ve={},Le=null,ze=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Be=null,Ke=x({},["audio","video","img","source","image","track"]),He=null,Ge=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml",Ze=Qe,Ye=!1,Xe=void 0,et=["application/xhtml+xml","text/html"],tt=void 0,nt=null,rt=o.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},ot=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":H(e))||(e={}),e=S(e),$e="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS):we,je="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR):xe,He="ADD_URI_SAFE_ATTR"in e?x(S(Ge),e.ADD_URI_SAFE_ATTR):Ge,Be="ADD_DATA_URI_TAGS"in e?x(S(Ke),e.ADD_DATA_URI_TAGS):Ke,Le="FORBID_CONTENTS"in e?x({},e.FORBID_CONTENTS):ze,Pe="FORBID_TAGS"in e?x({},e.FORBID_TAGS):{},Ee="FORBID_ATTR"in e?x({},e.FORBID_ATTR):{},Ve="USE_PROFILES"in e&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Te=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,Ie=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,Re=e.FORCE_BODY||!1,qe=!1!==e.SANITIZE_DOM,Fe=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||_e,Ze=e.NAMESPACE||Qe,e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xe=Xe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Xe?function(e){return e}:y,Ae&&(Te=!1),Ce&&(Me=!0),Ve&&($e=x({},[].concat(G(N))),je=[],!0===Ve.html&&(x($e,E),x(je,R)),!0===Ve.svg&&(x($e,O),x(je,M),x(je,D)),!0===Ve.svgFilters&&(x($e,T),x(je,M),x(je,D)),!0===Ve.mathMl&&(x($e,A),x(je,C),x(je,D))),e.ADD_TAGS&&($e===we&&($e=S($e)),x($e,e.ADD_TAGS)),e.ADD_ATTR&&(je===xe&&(je=S(je)),x(je,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&x(He,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Le===ze&&(Le=S(Le)),x(Le,e.FORBID_CONTENTS)),Fe&&($e["#text"]=!0),Ie&&x($e,["html","head","body"]),$e.table&&(x($e,["tbody"]),delete Pe.tbody),s&&s(e),nt=e)},st=x({},["mi","mo","mn","ms","mtext"]),at=x({},["foreignobject","desc","title","annotation-xml"]),ct=x({},O);x(ct,T),x(ct,k);var pt=x({},A);x(pt,I);var lt=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ut=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!je[e])if(Me||Ce)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){var t=void 0,n=void 0;if(Re)e=""+e;else{var r=g(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===Xe&&(e=''+e+"");var i=ie?ie.createHTML(e):e;if(Ze===Qe)try{t=(new Q).parseFromString(i,Xe)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Ye?"":i}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(o.createTextNode(n),s.childNodes[0]||null),Ze===Qe?le.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:s},ft=function(e){return ce.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},ht=function(e){return"object"===(void 0===p?"undefined":H(p))?e instanceof p:e&&"object"===(void 0===e?"undefined":H(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},mt=function(e,t,r){fe[e]&&f(fe[e],(function(e){e.call(n,t,r,nt)}))},yt=function(e){var t,r=void 0;if(mt("beforeSanitizeElements",e,null),(t=e)instanceof J&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof j)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore))return lt(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return lt(e),!0;var i=tt(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:i,allowedTags:$e}),!ht(e.firstElementChild)&&(!ht(e.content)||!ht(e.content.firstElementChild))&&$(/<[/\w]/g,e.innerHTML)&&$(/<[/\w]/g,e.textContent))return lt(e),!0;if("select"===i&&$(/