@nsshunt/stsoauth2plugin 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7447,9 +7447,7 @@ class STSOAuth2Manager {
7447
7447
  __privateSet(this, _aic, app.config.globalProperties.$sts.aic.PrimaryPublishInstrumentController);
7448
7448
  __privateSet(this, _router, app.config.globalProperties.$router);
7449
7449
  __privateSet(this, _transactionStore, new ClientStorageFactory({ clientStorageType: ClientStorageType.SESSION_STORAGE }).GetStorage());
7450
- __privateSet(this, _worker, new Worker("/assets/stsoauth2worker.56b3b966.js", {
7451
- type: "module"
7452
- }));
7450
+ __privateSet(this, _worker, new Worker("/assets/stsoauth2worker.56b3b966.js"));
7453
7451
  __privateGet(this, _worker).onmessage = (data) => {
7454
7452
  console.log(`this.#worker.onmessage = [${data}]`);
7455
7453
  };
@@ -3,4 +3,4 @@ var Fu=Object.defineProperty,Mu=Object.defineProperties;var Uu=Object.getOwnProp
3
3
  || (${H} == "string" && ${P} && ${P} == +${P})`).assign(W,(0,s._)`+${P}`);return;case"integer":_.elseIf((0,s._)`${H} === "boolean" || ${P} === null
4
4
  || (${H} === "string" && ${P} && ${P} == +${P} && !(${P} % 1))`).assign(W,(0,s._)`+${P}`);return;case"boolean":_.elseIf((0,s._)`${P} === "false" || ${P} === 0 || ${P} === null`).assign(W,!1).elseIf((0,s._)`${P} === "true" || ${P} === 1`).assign(W,!0);return;case"null":_.elseIf((0,s._)`${P} === "" || ${P} === 0 || ${P} === false`),_.assign(W,null);return;case"array":_.elseIf((0,s._)`${H} === "string" || ${H} === "number"
5
5
  || ${H} === "boolean" || ${P} === null`).assign(W,(0,s._)`[${P}]`)}}}function I({gen:N,parentData:j,parentDataProperty:K},_){N.if((0,s._)`${j} !== undefined`,()=>N.assign((0,s._)`${j}[${K}]`,_))}function T(N,j,K,_=c.Correct){const P=_===c.Correct?s.operators.EQ:s.operators.NEQ;let D;switch(N){case"null":return(0,s._)`${j} ${P} null`;case"array":D=(0,s._)`Array.isArray(${j})`;break;case"object":D=(0,s._)`${j} && typeof ${j} == "object" && !Array.isArray(${j})`;break;case"integer":D=H((0,s._)`!(${j} % 1) && !isNaN(${j})`);break;case"number":D=H();break;default:return(0,s._)`typeof ${j} ${P} ${N}`}return _===c.Correct?D:(0,s.not)(D);function H(W=s.nil){return(0,s.and)((0,s._)`typeof ${j} == "number"`,W,K?(0,s._)`isFinite(${j})`:s.nil)}}e.checkDataType=T;function A(N,j,K,_){if(N.length===1)return T(N[0],j,K,_);let P;const D=(0,a.toHash)(N);if(D.array&&D.object){const H=(0,s._)`typeof ${j} != "object"`;P=D.null?H:(0,s._)`!${j} || ${H}`,delete D.null,delete D.array,delete D.object}else P=s.nil;D.number&&delete D.integer;for(const H in D)P=(0,s.and)(P,T(H,j,K,_));return P}e.checkDataTypes=A;const w={message:({schema:N})=>`must be ${N}`,params:({schema:N,schemaValue:j})=>typeof N=="string"?(0,s._)`{type: ${N}}`:(0,s._)`{type: ${j}}`};function v(N){const j=C(N);(0,n.reportError)(j,w)}e.reportTypeError=v;function C(N){const{gen:j,data:K,schema:_}=N,P=(0,a.schemaRefOrVal)(N,_,"type");return{gen:j,keyword:"type",data:K,schema:_.type,schemaCode:P,schemaValue:P,parentSchema:_,params:{},it:N}}}(Fr);var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.assignDefaults=void 0;const Kt=ue,ro=Pe;function no(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const s in r)Xn(e,s,r[s].default);else t==="array"&&Array.isArray(n)&&n.forEach((s,a)=>Xn(e,a,s.default))}Mr.assignDefaults=no;function Xn(e,t,r){const{gen:n,compositeRule:s,data:a,opts:c}=e;if(r===void 0)return;const h=(0,Kt._)`${a}${(0,Kt.getProperty)(t)}`;if(s){(0,ro.checkStrictMode)(e,`default is ignored for: ${h}`);return}let g=(0,Kt._)`${h} === undefined`;c.useDefaults==="empty"&&(g=(0,Kt._)`${g} || ${h} === null || ${h} === ""`),n.if(g,(0,Kt._)`${h} = ${(0,Kt.stringify)(r)}`)}var Je={},ae={};Object.defineProperty(ae,"__esModule",{value:!0}),ae.validateUnion=ae.validateArray=ae.usePattern=ae.callValidateCode=ae.schemaProperties=ae.allSchemaProperties=ae.noPropertyInData=ae.propertyInData=ae.isOwnProperty=ae.hasPropFunc=ae.reportMissingProp=ae.checkMissingProp=ae.checkReportMissingProp=void 0;const fe=ue,un=Pe,lt=Ae,so=Pe;function ao(e,t){const{gen:r,data:n,it:s}=e;r.if(dn(r,n,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:(0,fe._)`${t}`},!0),e.error()})}ae.checkReportMissingProp=ao;function oo({gen:e,data:t,it:{opts:r}},n,s){return(0,fe.or)(...n.map(a=>(0,fe.and)(dn(e,t,a,r.ownProperties),(0,fe._)`${s} = ${a}`)))}ae.checkMissingProp=oo;function io(e,t){e.setParams({missingProperty:t},!0),e.error()}ae.reportMissingProp=io;function Zn(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,fe._)`Object.prototype.hasOwnProperty`})}ae.hasPropFunc=Zn;function ln(e,t,r){return(0,fe._)`${Zn(e)}.call(${t}, ${r})`}ae.isOwnProperty=ln;function co(e,t,r,n){const s=(0,fe._)`${t}${(0,fe.getProperty)(r)} !== undefined`;return n?(0,fe._)`${s} && ${ln(e,t,r)}`:s}ae.propertyInData=co;function dn(e,t,r,n){const s=(0,fe._)`${t}${(0,fe.getProperty)(r)} === undefined`;return n?(0,fe.or)(s,(0,fe.not)(ln(e,t,r))):s}ae.noPropertyInData=dn;function xn(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ae.allSchemaProperties=xn;function uo(e,t){return xn(t).filter(r=>!(0,un.alwaysValidSchema)(e,t[r]))}ae.schemaProperties=uo;function lo({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:s,errorPath:a},it:c},h,g,p){const u=p?(0,fe._)`${e}, ${t}, ${n}${s}`:t,m=[[lt.default.instancePath,(0,fe.strConcat)(lt.default.instancePath,a)],[lt.default.parentData,c.parentData],[lt.default.parentDataProperty,c.parentDataProperty],[lt.default.rootData,lt.default.rootData]];c.opts.dynamicRef&&m.push([lt.default.dynamicAnchors,lt.default.dynamicAnchors]);const b=(0,fe._)`${u}, ${r.object(...m)}`;return g!==fe.nil?(0,fe._)`${h}.call(${g}, ${b})`:(0,fe._)`${h}(${b})`}ae.callValidateCode=lo;const fo=(0,fe._)`new RegExp`;function ho({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,a=s(r,n);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,fe._)`${s.code==="new RegExp"?fo:(0,so.useFunc)(e,s)}(${r}, ${n})`})}ae.usePattern=ho;function po(e){const{gen:t,data:r,keyword:n,it:s}=e,a=t.name("valid");if(s.allErrors){const h=t.let("valid",!0);return c(()=>t.assign(h,!1)),h}return t.var(a,!0),c(()=>t.break()),a;function c(h){const g=t.const("len",(0,fe._)`${r}.length`);t.forRange("i",0,g,p=>{e.subschema({keyword:n,dataProp:p,dataPropType:un.Type.Num},a),t.if((0,fe.not)(a),h)})}}ae.validateArray=po;function mo(e){const{gen:t,schema:r,keyword:n,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(g=>(0,un.alwaysValidSchema)(s,g))&&!s.opts.unevaluated)return;const c=t.let("valid",!1),h=t.name("_valid");t.block(()=>r.forEach((g,p)=>{const u=e.subschema({keyword:n,schemaProp:p,compositeRule:!0},h);t.assign(c,(0,fe._)`${c} || ${h}`),e.mergeValidEvaluated(u,h)||t.if((0,fe.not)(c))})),e.result(c,()=>e.reset(),()=>e.error(!0))}ae.validateUnion=mo,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateKeywordUsage=Je.validSchemaType=Je.funcKeywordCode=Je.macroKeywordCode=void 0;const je=ue,Pt=Ae,go=ae,vo=sr;function yo(e,t){const{gen:r,keyword:n,schema:s,parentSchema:a,it:c}=e,h=t.macro.call(c.self,s,a,c),g=ts(r,n,h);c.opts.validateSchema!==!1&&c.self.validateSchema(h,!0);const p=r.name("valid");e.subschema({schema:h,schemaPath:je.nil,errSchemaPath:`${c.errSchemaPath}/${n}`,topSchemaRef:g,compositeRule:!0},p),e.pass(p,()=>e.error(!0))}Je.macroKeywordCode=yo;function _o(e,t){var r;const{gen:n,keyword:s,schema:a,parentSchema:c,$data:h,it:g}=e;Eo(g,t);const p=!h&&t.compile?t.compile.call(g.self,a,c,g):t.validate,u=ts(n,s,p),m=n.let("valid");e.block$data(m,b),e.ok((r=t.valid)!==null&&r!==void 0?r:m);function b(){if(t.errors===!1)A(),t.modifying&&es(e),w(()=>e.error());else{const v=t.async?I():T();t.modifying&&es(e),w(()=>$o(e,v))}}function I(){const v=n.let("ruleErrs",null);return n.try(()=>A((0,je._)`await `),C=>n.assign(m,!1).if((0,je._)`${C} instanceof ${g.ValidationError}`,()=>n.assign(v,(0,je._)`${C}.errors`),()=>n.throw(C))),v}function T(){const v=(0,je._)`${u}.errors`;return n.assign(v,null),A(je.nil),v}function A(v=t.async?(0,je._)`await `:je.nil){const C=g.opts.passContext?Pt.default.this:Pt.default.self,N=!("compile"in t&&!h||t.schema===!1);n.assign(m,(0,je._)`${v}${(0,go.callValidateCode)(e,u,C,N)}`,t.modifying)}function w(v){var C;n.if((0,je.not)((C=t.valid)!==null&&C!==void 0?C:m),v)}}Je.funcKeywordCode=_o;function es(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,je._)`${n.parentData}[${n.parentDataProperty}]`))}function $o(e,t){const{gen:r}=e;r.if((0,je._)`Array.isArray(${t})`,()=>{r.assign(Pt.default.vErrors,(0,je._)`${Pt.default.vErrors} === null ? ${t} : ${Pt.default.vErrors}.concat(${t})`).assign(Pt.default.errors,(0,je._)`${Pt.default.vErrors}.length`),(0,vo.extendErrors)(e)},()=>e.error())}function Eo({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function ts(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,je.stringify)(r)})}function wo(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e=="undefined")}Je.validSchemaType=wo;function So({schema:e,opts:t,self:r,errSchemaPath:n},s,a){if(Array.isArray(s.keyword)?!s.keyword.includes(a):s.keyword!==a)throw new Error("ajv implementation error");const c=s.dependencies;if(c!=null&&c.some(h=>!Object.prototype.hasOwnProperty.call(e,h)))throw new Error(`parent schema must have dependencies of ${a}: ${c.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[a])){const g=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(g);else throw new Error(g)}}Je.validateKeywordUsage=So;var dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.extendSubschemaMode=dt.extendSubschemaData=dt.getSubschema=void 0;const Ge=ue,rs=Pe;function bo(e,{keyword:t,schemaProp:r,schema:n,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const h=e.schema[t];return r===void 0?{schema:h,schemaPath:(0,Ge._)`${e.schemaPath}${(0,Ge.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:h[r],schemaPath:(0,Ge._)`${e.schemaPath}${(0,Ge.getProperty)(t)}${(0,Ge.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,rs.escapeFragment)(r)}`}}if(n!==void 0){if(s===void 0||a===void 0||c===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}dt.getSubschema=bo;function Po(e,t,{dataProp:r,dataPropType:n,data:s,dataTypes:a,propertyName:c}){if(s!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:h}=t;if(r!==void 0){const{errorPath:p,dataPathArr:u,opts:m}=t,b=h.let("data",(0,Ge._)`${t.data}${(0,Ge.getProperty)(r)}`,!0);g(b),e.errorPath=(0,Ge.str)`${p}${(0,rs.getErrorPath)(r,n,m.jsPropertySyntax)}`,e.parentDataProperty=(0,Ge._)`${r}`,e.dataPathArr=[...u,e.parentDataProperty]}if(s!==void 0){const p=s instanceof Ge.Name?s:h.let("data",s,!0);g(p),c!==void 0&&(e.propertyName=c)}a&&(e.dataTypes=a);function g(p){e.data=p,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,p]}}dt.extendSubschemaData=Po;function Co(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:a}){n!==void 0&&(e.compositeRule=n),s!==void 0&&(e.createErrors=s),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}dt.extendSubschemaMode=Co;var Ne={},No=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){var c=a[s];if(!e(t[c],r[c]))return!1}return!0}return t!==t&&r!==r},ns={exports:{}},ft=ns.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},s=r.post||function(){};Ur(t,n,s,e,"",e)};ft.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},ft.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},ft.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},ft.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ur(e,t,r,n,s,a,c,h,g,p){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,s,a,c,h,g,p);for(var u in n){var m=n[u];if(Array.isArray(m)){if(u in ft.arrayKeywords)for(var b=0;b<m.length;b++)Ur(e,t,r,m[b],s+"/"+u+"/"+b,a,s,u,n,b)}else if(u in ft.propsKeywords){if(m&&typeof m=="object")for(var I in m)Ur(e,t,r,m[I],s+"/"+u+"/"+Ro(I),a,s,u,n,I)}else(u in ft.keywords||e.allKeys&&!(u in ft.skipKeywords))&&Ur(e,t,r,m,s+"/"+u,a,s,u,n)}r(n,s,a,c,h,g,p)}}function Ro(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.getSchemaRefs=Ne.resolveUrl=Ne.normalizeId=Ne._getFullPath=Ne.getFullPath=Ne.inlineRef=void 0;const Oo=Pe,jo=No,To=ns.exports,Do=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Io(e,t=!0){return typeof e=="boolean"?!0:t===!0?!fn(e):t?ss(e)<=t:!1}Ne.inlineRef=Io;const Ao=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function fn(e){for(const t in e){if(Ao.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(fn)||typeof r=="object"&&fn(r))return!0}return!1}function ss(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!Do.has(r)&&(typeof e[r]=="object"&&(0,Oo.eachItem)(e[r],n=>t+=ss(n)),t===1/0))return 1/0}return t}function as(e,t="",r){r!==!1&&(t=Ht(t));const n=e.parse(t);return os(e,n)}Ne.getFullPath=as;function os(e,t){return e.serialize(t).split("#")[0]+"#"}Ne._getFullPath=os;const ko=/#\/?$/;function Ht(e){return e?e.replace(ko,""):""}Ne.normalizeId=Ht;function Fo(e,t,r){return r=Ht(r),e.resolve(t,r)}Ne.resolveUrl=Fo;const Mo=/^[a-z_][-a-z0-9._]*$/i;function Uo(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,s=Ht(e[r]||t),a={"":s},c=as(n,s,!1),h={},g=new Set;return To(e,{allKeys:!0},(m,b,I,T)=>{if(T===void 0)return;const A=c+b;let w=a[T];typeof m[r]=="string"&&(w=v.call(this,m[r])),C.call(this,m.$anchor),C.call(this,m.$dynamicAnchor),a[b]=w;function v(N){const j=this.opts.uriResolver.resolve;if(N=Ht(w?j(w,N):N),g.has(N))throw u(N);g.add(N);let K=this.refs[N];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?p(m,K.schema,N):N!==Ht(A)&&(N[0]==="#"?(p(m,h[N],N),h[N]=m):this.refs[N]=A),N}function C(N){if(typeof N=="string"){if(!Mo.test(N))throw new Error(`invalid anchor "${N}"`);v.call(this,`#${N}`)}}}),h;function p(m,b,I){if(b!==void 0&&!jo(m,b))throw u(I)}function u(m){return new Error(`reference "${m}" resolves to more than one schema`)}}Ne.getSchemaRefs=Uo,Object.defineProperty(He,"__esModule",{value:!0}),He.getData=He.KeywordCxt=He.validateFunctionCode=void 0;const is=Lt,cs=Fr,hn=et,Vr=Fr,Vo=Mr,or=Je,pn=dt,U=ue,G=Ae,zo=Ne,tt=Pe,ir=sr;function Lo(e){if(fs(e)&&(hs(e),ds(e))){Jo(e);return}us(e,()=>(0,is.topBoolOrEmptySchema)(e))}He.validateFunctionCode=Lo;function us({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},a){s.code.es5?e.func(t,(0,U._)`${G.default.data}, ${G.default.valCxt}`,n.$async,()=>{e.code((0,U._)`"use strict"; ${ls(r,s)}`),Ho(e,s),e.code(a)}):e.func(t,(0,U._)`${G.default.data}, ${Ko(s)}`,n.$async,()=>e.code(ls(r,s)).code(a))}function Ko(e){return(0,U._)`{${G.default.instancePath}="", ${G.default.parentData}, ${G.default.parentDataProperty}, ${G.default.rootData}=${G.default.data}${e.dynamicRef?(0,U._)`, ${G.default.dynamicAnchors}={}`:U.nil}}={}`}function Ho(e,t){e.if(G.default.valCxt,()=>{e.var(G.default.instancePath,(0,U._)`${G.default.valCxt}.${G.default.instancePath}`),e.var(G.default.parentData,(0,U._)`${G.default.valCxt}.${G.default.parentData}`),e.var(G.default.parentDataProperty,(0,U._)`${G.default.valCxt}.${G.default.parentDataProperty}`),e.var(G.default.rootData,(0,U._)`${G.default.valCxt}.${G.default.rootData}`),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,U._)`${G.default.valCxt}.${G.default.dynamicAnchors}`)},()=>{e.var(G.default.instancePath,(0,U._)`""`),e.var(G.default.parentData,(0,U._)`undefined`),e.var(G.default.parentDataProperty,(0,U._)`undefined`),e.var(G.default.rootData,G.default.data),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,U._)`{}`)})}function Jo(e){const{schema:t,opts:r,gen:n}=e;us(e,()=>{r.$comment&&t.$comment&&ms(e),Wo(e),n.let(G.default.vErrors,null),n.let(G.default.errors,0),r.unevaluated&&Go(e),ps(e),Zo(e)})}function Go(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,U._)`${r}.evaluated`),t.if((0,U._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,U._)`${e.evaluated}.props`,(0,U._)`undefined`)),t.if((0,U._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,U._)`${e.evaluated}.items`,(0,U._)`undefined`))}function ls(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,U._)`/*# sourceURL=${r} */`:U.nil}function qo(e,t){if(fs(e)&&(hs(e),ds(e))){Bo(e,t);return}(0,is.boolOrEmptySchema)(e,t)}function ds({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function fs(e){return typeof e.schema!="boolean"}function Bo(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&ms(e),Yo(e),Xo(e);const a=n.const("_errs",G.default.errors);ps(e,a),n.var(t,(0,U._)`${a} === ${G.default.errors}`)}function hs(e){(0,tt.checkUnknownRules)(e),Qo(e)}function ps(e,t){if(e.opts.jtd)return gs(e,[],!1,t);const r=(0,cs.getSchemaTypes)(e.schema),n=(0,cs.coerceAndCheckDataType)(e,r);gs(e,r,!n,t)}function Qo(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,tt.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Wo(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,tt.checkStrictMode)(e,"default is ignored in the schema root")}function Yo(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,zo.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Xo(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function ms({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const a=r.$comment;if(s.$comment===!0)e.code((0,U._)`${G.default.self}.logger.log(${a})`);else if(typeof s.$comment=="function"){const c=(0,U.str)`${n}/$comment`,h=e.scopeValue("root",{ref:t.root});e.code((0,U._)`${G.default.self}.opts.$comment(${a}, ${c}, ${h}.schema)`)}}function Zo(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:a}=e;r.$async?t.if((0,U._)`${G.default.errors} === 0`,()=>t.return(G.default.data),()=>t.throw((0,U._)`new ${s}(${G.default.vErrors})`)):(t.assign((0,U._)`${n}.errors`,G.default.vErrors),a.unevaluated&&xo(e),t.return((0,U._)`${G.default.errors} === 0`))}function xo({gen:e,evaluated:t,props:r,items:n}){r instanceof U.Name&&e.assign((0,U._)`${t}.props`,r),n instanceof U.Name&&e.assign((0,U._)`${t}.items`,n)}function gs(e,t,r,n){const{gen:s,schema:a,data:c,allErrors:h,opts:g,self:p}=e,{RULES:u}=p;if(a.$ref&&(g.ignoreKeywordsWithRef||!(0,tt.schemaHasRulesButRef)(a,u))){s.block(()=>$s(e,"$ref",u.all.$ref.definition));return}g.jtd||ei(e,t),s.block(()=>{for(const b of u.rules)m(b);m(u.post)});function m(b){!(0,hn.shouldUseGroup)(a,b)||(b.type?(s.if((0,Vr.checkDataType)(b.type,c,g.strictNumbers)),vs(e,b),t.length===1&&t[0]===b.type&&r&&(s.else(),(0,Vr.reportTypeError)(e)),s.endIf()):vs(e,b),h||s.if((0,U._)`${G.default.errors} === ${n||0}`))}}function vs(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,Vo.assignDefaults)(e,t.type),r.block(()=>{for(const a of t.rules)(0,hn.shouldUseRule)(n,a)&&$s(e,a.keyword,a.definition,t.type)})}function ei(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(ti(e,t),e.opts.allowUnionTypes||ri(e,t),ni(e,e.dataTypes))}function ti(e,t){if(!!t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{ys(e.dataTypes,r)||mn(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),e.dataTypes=e.dataTypes.filter(r=>ys(t,r))}}function ri(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&mn(e,"use allowUnionTypes to allow union type keyword")}function ni(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if(typeof s=="object"&&(0,hn.shouldUseRule)(e.schema,s)){const{type:a}=s.definition;a.length&&!a.some(c=>si(t,c))&&mn(e,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function si(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function ys(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function mn(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,tt.checkStrictMode)(e,t,e.opts.strictTypes)}class _s{constructor(t,r,n){if((0,or.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,tt.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Es(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,or.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",G.default.errors))}result(t,r,n){this.failResult((0,U.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,U.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,U._)`${r} !== undefined && (${(0,U.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?ir.reportExtraError:ir.reportError)(this,this.def.error,r)}$dataError(){(0,ir.reportError)(this,this.def.$dataError||ir.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ir.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=U.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=U.nil,r=U.nil){if(!this.$data)return;const{gen:n,schemaCode:s,schemaType:a,def:c}=this;n.if((0,U.or)((0,U._)`${s} === undefined`,r)),t!==U.nil&&n.assign(t,!0),(a.length||c.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==U.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:s,it:a}=this;return(0,U.or)(c(),h());function c(){if(n.length){if(!(r instanceof U.Name))throw new Error("ajv implementation error");const g=Array.isArray(n)?n:[n];return(0,U._)`${(0,Vr.checkDataTypes)(g,r,a.opts.strictNumbers,Vr.DataType.Wrong)}`}return U.nil}function h(){if(s.validateSchema){const g=t.scopeValue("validate$data",{ref:s.validateSchema});return(0,U._)`!${g}(${r})`}return U.nil}}subschema(t,r){const n=(0,pn.getSubschema)(this.it,t);(0,pn.extendSubschemaData)(n,this.it,t),(0,pn.extendSubschemaMode)(n,t);const s=le(Y(Y({},this.it),n),{items:void 0,props:void 0});return qo(s,r),s}mergeEvaluated(t,r){const{it:n,gen:s}=this;!n.opts.unevaluated||(n.props!==!0&&t.props!==void 0&&(n.props=tt.mergeEvaluated.props(s,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=tt.mergeEvaluated.items(s,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(r,()=>this.mergeEvaluated(t,U.Name)),!0}}He.KeywordCxt=_s;function $s(e,t,r,n){const s=new _s(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,or.funcKeywordCode)(s,r):"macro"in r?(0,or.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,or.funcKeywordCode)(s,r)}const ai=/^\/(?:[^~]|~0|~1)*$/,oi=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Es(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,a;if(e==="")return G.default.rootData;if(e[0]==="/"){if(!ai.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,a=G.default.rootData}else{const p=oi.exec(e);if(!p)throw new Error(`Invalid JSON-pointer: ${e}`);const u=+p[1];if(s=p[2],s==="#"){if(u>=t)throw new Error(g("property/index",u));return n[t-u]}if(u>t)throw new Error(g("data",u));if(a=r[t-u],!s)return a}let c=a;const h=s.split("/");for(const p of h)p&&(a=(0,U._)`${a}${(0,U.getProperty)((0,tt.unescapeJsonPointer)(p))}`,c=(0,U._)`${c} && ${a}`);return c;function g(p,u){return`Cannot access ${p} ${u} levels up, current level is ${t}`}}He.getData=Es;var zr={};Object.defineProperty(zr,"__esModule",{value:!0});class ii extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}zr.default=ii;var Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});const gn=Ne;class ci extends Error{constructor(t,r,n,s){super(s||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,gn.resolveUrl)(t,r,n),this.missingSchema=(0,gn.normalizeId)((0,gn.getFullPath)(t,this.missingRef))}}Ct.default=ci;var Oe={};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.resolveSchema=Oe.getCompilingSchema=Oe.resolveRef=Oe.compileSchema=Oe.SchemaEnv=void 0;const Le=ue,ui=zr,Nt=Ae,Ke=Ne,ws=Pe,li=He;class Lr{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Ke.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}Oe.SchemaEnv=Lr;function vn(e){const t=Ss.call(this,e);if(t)return t;const r=(0,Ke.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:a}=this.opts,c=new Le.CodeGen(this.scope,{es5:n,lines:s,ownProperties:a});let h;e.$async&&(h=c.scopeValue("Error",{ref:ui.default,code:(0,Le._)`require("ajv/dist/runtime/validation_error").default`}));const g=c.scopeName("validate");e.validateName=g;const p={gen:c,allErrors:this.opts.allErrors,data:Nt.default.data,parentData:Nt.default.parentData,parentDataProperty:Nt.default.parentDataProperty,dataNames:[Nt.default.data],dataPathArr:[Le.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:c.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Le.stringify)(e.schema)}:{ref:e.schema}),validateName:g,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Le.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Le._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(e),(0,li.validateFunctionCode)(p),c.optimize(this.opts.code.optimize);const m=c.toString();u=`${c.scopeRefs(Nt.default.scope)}return ${m}`,this.opts.code.process&&(u=this.opts.code.process(u,e));const I=new Function(`${Nt.default.self}`,`${Nt.default.scope}`,u)(this,this.scope.get());if(this.scope.value(g,{ref:I}),I.errors=null,I.schema=e.schema,I.schemaEnv=e,e.$async&&(I.$async=!0),this.opts.code.source===!0&&(I.source={validateName:g,validateCode:m,scopeValues:c._values}),this.opts.unevaluated){const{props:T,items:A}=p;I.evaluated={props:T instanceof Le.Name?void 0:T,items:A instanceof Le.Name?void 0:A,dynamicProps:T instanceof Le.Name,dynamicItems:A instanceof Le.Name},I.source&&(I.source.evaluated=(0,Le.stringify)(I.evaluated))}return e.validate=I,e}catch(m){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),m}finally{this._compilations.delete(e)}}Oe.compileSchema=vn;function di(e,t,r){var n;r=(0,Ke.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let a=pi.call(this,e,r);if(a===void 0){const c=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:h}=this.opts;c&&(a=new Lr({schema:c,schemaId:h,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=fi.call(this,a)}Oe.resolveRef=di;function fi(e){return(0,Ke.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:vn.call(this,e)}function Ss(e){for(const t of this._compilations)if(hi(t,e))return t}Oe.getCompilingSchema=Ss;function hi(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function pi(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Kr.call(this,e,t)}function Kr(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Ke._getFullPath)(this.opts.uriResolver,r);let s=(0,Ke.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return yn.call(this,r,e);const a=(0,Ke.normalizeId)(n),c=this.refs[a]||this.schemas[a];if(typeof c=="string"){const h=Kr.call(this,e,c);return typeof(h==null?void 0:h.schema)!="object"?void 0:yn.call(this,r,h)}if(typeof(c==null?void 0:c.schema)=="object"){if(c.validate||vn.call(this,c),a===(0,Ke.normalizeId)(t)){const{schema:h}=c,{schemaId:g}=this.opts,p=h[g];return p&&(s=(0,Ke.resolveUrl)(this.opts.uriResolver,s,p)),new Lr({schema:h,schemaId:g,root:e,baseId:s})}return yn.call(this,r,c)}}Oe.resolveSchema=Kr;const mi=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yn(e,{baseId:t,schema:r,root:n}){var s;if(((s=e.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(const h of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const g=r[(0,ws.unescapeFragment)(h)];if(g===void 0)return;r=g;const p=typeof r=="object"&&r[this.opts.schemaId];!mi.has(h)&&p&&(t=(0,Ke.resolveUrl)(this.opts.uriResolver,t,p))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,ws.schemaHasRulesButRef)(r,this.RULES)){const h=(0,Ke.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=Kr.call(this,n,h)}const{schemaId:c}=this.opts;if(a=a||new Lr({schema:r,schemaId:c,root:n,baseId:t}),a.schema!==a.root.schema)return a}var gi={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},_n={},$n={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(J,function(r){function n(){for(var l=arguments.length,i=Array(l),f=0;f<l;f++)i[f]=arguments[f];if(i.length>1){i[0]=i[0].slice(0,-1);for(var S=i.length-1,E=1;E<S;++E)i[E]=i[E].slice(1,-1);return i[S]=i[S].slice(1),i.join("")}else return i[0]}function s(l){return"(?:"+l+")"}function a(l){return l===void 0?"undefined":l===null?"null":Object.prototype.toString.call(l).split(" ").pop().split("]").shift().toLowerCase()}function c(l){return l.toUpperCase()}function h(l){return l!=null?l instanceof Array?l:typeof l.length!="number"||l.split||l.setInterval||l.call?[l]:Array.prototype.slice.call(l):[]}function g(l,i){var f=l;if(i)for(var S in i)f[S]=i[S];return f}function p(l){var i="[A-Za-z]",f="[0-9]",S=n(f,"[A-Fa-f]"),E=s(s("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+s("%[89A-Fa-f]"+S+"%"+S+S)+"|"+s("%"+S+S)),z="[\\:\\/\\?\\#\\[\\]\\@]",L="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",oe=n(z,L),me=l?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",we=l?"[\\uE000-\\uF8FF]":"[]",te=n(i,f,"[\\-\\.\\_\\~]",me);s(i+n(i,f,"[\\+\\-\\.]")+"*"),s(s(E+"|"+n(te,L,"[\\:]"))+"*");var de=s(s("25[0-5]")+"|"+s("2[0-4]"+f)+"|"+s("1"+f+f)+"|"+s("0?[1-9]"+f)+"|0?0?"+f),Se=s(de+"\\."+de+"\\."+de+"\\."+de),q=s(S+"{1,4}"),ye=s(s(q+"\\:"+q)+"|"+Se),be=s(s(q+"\\:")+"{6}"+ye),_e=s("\\:\\:"+s(q+"\\:")+"{5}"+ye),Et=s(s(q)+"?\\:\\:"+s(q+"\\:")+"{4}"+ye),Xe=s(s(s(q+"\\:")+"{0,1}"+q)+"?\\:\\:"+s(q+"\\:")+"{3}"+ye),Ze=s(s(s(q+"\\:")+"{0,2}"+q)+"?\\:\\:"+s(q+"\\:")+"{2}"+ye),rr=s(s(s(q+"\\:")+"{0,3}"+q)+"?\\:\\:"+q+"\\:"+ye),Ut=s(s(s(q+"\\:")+"{0,4}"+q)+"?\\:\\:"+ye),Ve=s(s(s(q+"\\:")+"{0,5}"+q)+"?\\:\\:"+q),xe=s(s(s(q+"\\:")+"{0,6}"+q)+"?\\:\\:"),Vt=s([be,_e,Et,Xe,Ze,rr,Ut,Ve,xe].join("|")),ct=s(s(te+"|"+E)+"+");s("[vV]"+S+"+\\."+n(te,L,"[\\:]")+"+"),s(s(E+"|"+n(te,L))+"*");var jr=s(E+"|"+n(te,L,"[\\:\\@]"));return s(s(E+"|"+n(te,L,"[\\@]"))+"+"),s(s(jr+"|"+n("[\\/\\?]",we))+"*"),{NOT_SCHEME:new RegExp(n("[^]",i,f,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",te,L),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",te,L),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",te,L),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",te,L),"g"),NOT_QUERY:new RegExp(n("[^\\%]",te,L,"[\\:\\@\\/\\?]",we),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",te,L,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",te,L),"g"),UNRESERVED:new RegExp(te,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",te,oe),"g"),PCT_ENCODED:new RegExp(E,"g"),IPV4ADDRESS:new RegExp("^("+Se+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Vt+")"+s(s("\\%25|\\%(?!"+S+"{2})")+"("+ct+")")+"?\\]?$")}}var u=p(!1),m=p(!0),b=function(){function l(i,f){var S=[],E=!0,z=!1,L=void 0;try{for(var oe=i[Symbol.iterator](),me;!(E=(me=oe.next()).done)&&(S.push(me.value),!(f&&S.length===f));E=!0);}catch(we){z=!0,L=we}finally{try{!E&&oe.return&&oe.return()}finally{if(z)throw L}}return S}return function(i,f){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return l(i,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),I=function(l){if(Array.isArray(l)){for(var i=0,f=Array(l.length);i<l.length;i++)f[i]=l[i];return f}else return Array.from(l)},T=2147483647,A=36,w=1,v=26,C=38,N=700,j=72,K=128,_="-",P=/^xn--/,D=/[^\0-\x7E]/,H=/[\x2E\u3002\uFF0E\uFF61]/g,W={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},pe=A-w,Z=Math.floor,ie=String.fromCharCode;function x(l){throw new RangeError(W[l])}function ve(l,i){for(var f=[],S=l.length;S--;)f[S]=i(l[S]);return f}function $e(l,i){var f=l.split("@"),S="";f.length>1&&(S=f[0]+"@",l=f[1]),l=l.replace(H,".");var E=l.split("."),z=ve(E,i).join(".");return S+z}function Ce(l){for(var i=[],f=0,S=l.length;f<S;){var E=l.charCodeAt(f++);if(E>=55296&&E<=56319&&f<S){var z=l.charCodeAt(f++);(z&64512)==56320?i.push(((E&1023)<<10)+(z&1023)+65536):(i.push(E),f--)}else i.push(E)}return i}var Me=function(i){return String.fromCodePoint.apply(String,I(i))},Wt=function(i){return i-48<10?i-22:i-65<26?i-65:i-97<26?i-97:A},k=function(i,f){return i+22+75*(i<26)-((f!=0)<<5)},y=function(i,f,S){var E=0;for(i=S?Z(i/N):i>>1,i+=Z(i/f);i>pe*v>>1;E+=A)i=Z(i/pe);return Z(E+(pe+1)*i/(i+C))},O=function(i){var f=[],S=i.length,E=0,z=K,L=j,oe=i.lastIndexOf(_);oe<0&&(oe=0);for(var me=0;me<oe;++me)i.charCodeAt(me)>=128&&x("not-basic"),f.push(i.charCodeAt(me));for(var we=oe>0?oe+1:0;we<S;){for(var te=E,de=1,Se=A;;Se+=A){we>=S&&x("invalid-input");var q=Wt(i.charCodeAt(we++));(q>=A||q>Z((T-E)/de))&&x("overflow"),E+=q*de;var ye=Se<=L?w:Se>=L+v?v:Se-L;if(q<ye)break;var be=A-ye;de>Z(T/be)&&x("overflow"),de*=be}var _e=f.length+1;L=y(E-te,_e,te==0),Z(E/_e)>T-z&&x("overflow"),z+=Z(E/_e),E%=_e,f.splice(E++,0,z)}return String.fromCodePoint.apply(String,f)},$=function(i){var f=[];i=Ce(i);var S=i.length,E=K,z=0,L=j,oe=!0,me=!1,we=void 0;try{for(var te=i[Symbol.iterator](),de;!(oe=(de=te.next()).done);oe=!0){var Se=de.value;Se<128&&f.push(ie(Se))}}catch(Tr){me=!0,we=Tr}finally{try{!oe&&te.return&&te.return()}finally{if(me)throw we}}var q=f.length,ye=q;for(q&&f.push(_);ye<S;){var be=T,_e=!0,Et=!1,Xe=void 0;try{for(var Ze=i[Symbol.iterator](),rr;!(_e=(rr=Ze.next()).done);_e=!0){var Ut=rr.value;Ut>=E&&Ut<be&&(be=Ut)}}catch(Tr){Et=!0,Xe=Tr}finally{try{!_e&&Ze.return&&Ze.return()}finally{if(Et)throw Xe}}var Ve=ye+1;be-E>Z((T-z)/Ve)&&x("overflow"),z+=(be-E)*Ve,E=be;var xe=!0,Vt=!1,ct=void 0;try{for(var jr=i[Symbol.iterator](),Ra;!(xe=(Ra=jr.next()).done);xe=!0){var Oa=Ra.value;if(Oa<E&&++z>T&&x("overflow"),Oa==E){for(var nn=z,sn=A;;sn+=A){var an=sn<=L?w:sn>=L+v?v:sn-L;if(nn<an)break;var ja=nn-an,Ta=A-an;f.push(ie(k(an+ja%Ta,0))),nn=Z(ja/Ta)}f.push(ie(k(nn,0))),L=y(z,Ve,ye==q),z=0,++ye}}}catch(Tr){Vt=!0,ct=Tr}finally{try{!xe&&jr.return&&jr.return()}finally{if(Vt)throw ct}}++z,++E}return f.join("")},o=function(i){return $e(i,function(f){return P.test(f)?O(f.slice(4).toLowerCase()):f})},d=function(i){return $e(i,function(f){return D.test(f)?"xn--"+$(f):f})},R={version:"2.1.0",ucs2:{decode:Ce,encode:Me},decode:O,encode:$,toASCII:d,toUnicode:o},F={};function M(l){var i=l.charCodeAt(0),f=void 0;return i<16?f="%0"+i.toString(16).toUpperCase():i<128?f="%"+i.toString(16).toUpperCase():i<2048?f="%"+(i>>6|192).toString(16).toUpperCase()+"%"+(i&63|128).toString(16).toUpperCase():f="%"+(i>>12|224).toString(16).toUpperCase()+"%"+(i>>6&63|128).toString(16).toUpperCase()+"%"+(i&63|128).toString(16).toUpperCase(),f}function ee(l){for(var i="",f=0,S=l.length;f<S;){var E=parseInt(l.substr(f+1,2),16);if(E<128)i+=String.fromCharCode(E),f+=3;else if(E>=194&&E<224){if(S-f>=6){var z=parseInt(l.substr(f+4,2),16);i+=String.fromCharCode((E&31)<<6|z&63)}else i+=l.substr(f,6);f+=6}else if(E>=224){if(S-f>=9){var L=parseInt(l.substr(f+4,2),16),oe=parseInt(l.substr(f+7,2),16);i+=String.fromCharCode((E&15)<<12|(L&63)<<6|oe&63)}else i+=l.substr(f,9);f+=9}else i+=l.substr(f,3),f+=3}return i}function se(l,i){function f(S){var E=ee(S);return E.match(i.UNRESERVED)?E:S}return l.scheme&&(l.scheme=String(l.scheme).replace(i.PCT_ENCODED,f).toLowerCase().replace(i.NOT_SCHEME,"")),l.userinfo!==void 0&&(l.userinfo=String(l.userinfo).replace(i.PCT_ENCODED,f).replace(i.NOT_USERINFO,M).replace(i.PCT_ENCODED,c)),l.host!==void 0&&(l.host=String(l.host).replace(i.PCT_ENCODED,f).toLowerCase().replace(i.NOT_HOST,M).replace(i.PCT_ENCODED,c)),l.path!==void 0&&(l.path=String(l.path).replace(i.PCT_ENCODED,f).replace(l.scheme?i.NOT_PATH:i.NOT_PATH_NOSCHEME,M).replace(i.PCT_ENCODED,c)),l.query!==void 0&&(l.query=String(l.query).replace(i.PCT_ENCODED,f).replace(i.NOT_QUERY,M).replace(i.PCT_ENCODED,c)),l.fragment!==void 0&&(l.fragment=String(l.fragment).replace(i.PCT_ENCODED,f).replace(i.NOT_FRAGMENT,M).replace(i.PCT_ENCODED,c)),l}function Ee(l){return l.replace(/^0*(.*)/,"$1")||"0"}function Qe(l,i){var f=l.match(i.IPV4ADDRESS)||[],S=b(f,2),E=S[1];return E?E.split(".").map(Ee).join("."):l}function Yt(l,i){var f=l.match(i.IPV6ADDRESS)||[],S=b(f,3),E=S[1],z=S[2];if(E){for(var L=E.toLowerCase().split("::").reverse(),oe=b(L,2),me=oe[0],we=oe[1],te=we?we.split(":").map(Ee):[],de=me.split(":").map(Ee),Se=i.IPV4ADDRESS.test(de[de.length-1]),q=Se?7:8,ye=de.length-q,be=Array(q),_e=0;_e<q;++_e)be[_e]=te[_e]||de[ye+_e]||"";Se&&(be[q-1]=Qe(be[q-1],i));var Et=be.reduce(function(Ve,xe,Vt){if(!xe||xe==="0"){var ct=Ve[Ve.length-1];ct&&ct.index+ct.length===Vt?ct.length++:Ve.push({index:Vt,length:1})}return Ve},[]),Xe=Et.sort(function(Ve,xe){return xe.length-Ve.length})[0],Ze=void 0;if(Xe&&Xe.length>1){var rr=be.slice(0,Xe.index),Ut=be.slice(Xe.index+Xe.length);Ze=rr.join(":")+"::"+Ut.join(":")}else Ze=be.join(":");return z&&(Ze+="%"+z),Ze}else return l}var Sr=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,br="".match(/(){0}/)[1]===void 0;function Ie(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f={},S=i.iri!==!1?m:u;i.reference==="suffix"&&(l=(i.scheme?i.scheme+":":"")+"//"+l);var E=l.match(Sr);if(E){br?(f.scheme=E[1],f.userinfo=E[3],f.host=E[4],f.port=parseInt(E[5],10),f.path=E[6]||"",f.query=E[7],f.fragment=E[8],isNaN(f.port)&&(f.port=E[5])):(f.scheme=E[1]||void 0,f.userinfo=l.indexOf("@")!==-1?E[3]:void 0,f.host=l.indexOf("//")!==-1?E[4]:void 0,f.port=parseInt(E[5],10),f.path=E[6]||"",f.query=l.indexOf("?")!==-1?E[7]:void 0,f.fragment=l.indexOf("#")!==-1?E[8]:void 0,isNaN(f.port)&&(f.port=l.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?E[4]:void 0)),f.host&&(f.host=Yt(Qe(f.host,S),S)),f.scheme===void 0&&f.userinfo===void 0&&f.host===void 0&&f.port===void 0&&!f.path&&f.query===void 0?f.reference="same-document":f.scheme===void 0?f.reference="relative":f.fragment===void 0?f.reference="absolute":f.reference="uri",i.reference&&i.reference!=="suffix"&&i.reference!==f.reference&&(f.error=f.error||"URI is not a "+i.reference+" reference.");var z=F[(i.scheme||f.scheme||"").toLowerCase()];if(!i.unicodeSupport&&(!z||!z.unicodeSupport)){if(f.host&&(i.domainHost||z&&z.domainHost))try{f.host=R.toASCII(f.host.replace(S.PCT_ENCODED,ee).toLowerCase())}catch(L){f.error=f.error||"Host's domain name can not be converted to ASCII via punycode: "+L}se(f,u)}else se(f,S);z&&z.parse&&z.parse(f,i)}else f.error=f.error||"URI can not be parsed.";return f}function Pr(l,i){var f=i.iri!==!1?m:u,S=[];return l.userinfo!==void 0&&(S.push(l.userinfo),S.push("@")),l.host!==void 0&&S.push(Yt(Qe(String(l.host),f),f).replace(f.IPV6ADDRESS,function(E,z,L){return"["+z+(L?"%25"+L:"")+"]"})),(typeof l.port=="number"||typeof l.port=="string")&&(S.push(":"),S.push(String(l.port))),S.length?S.join(""):void 0}var Xt=/^\.\.?\//,Zt=/^\/\.(\/|$)/,xt=/^\/\.\.(\/|$)/,Cr=/^\/?(?:.|\n)*?(?=\/|$)/;function We(l){for(var i=[];l.length;)if(l.match(Xt))l=l.replace(Xt,"");else if(l.match(Zt))l=l.replace(Zt,"/");else if(l.match(xt))l=l.replace(xt,"/"),i.pop();else if(l==="."||l==="..")l="";else{var f=l.match(Cr);if(f){var S=f[0];l=l.slice(S.length),i.push(S)}else throw new Error("Unexpected dot segment condition")}return i.join("")}function De(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=i.iri?m:u,S=[],E=F[(i.scheme||l.scheme||"").toLowerCase()];if(E&&E.serialize&&E.serialize(l,i),l.host&&!f.IPV6ADDRESS.test(l.host)){if(i.domainHost||E&&E.domainHost)try{l.host=i.iri?R.toUnicode(l.host):R.toASCII(l.host.replace(f.PCT_ENCODED,ee).toLowerCase())}catch(oe){l.error=l.error||"Host's domain name can not be converted to "+(i.iri?"Unicode":"ASCII")+" via punycode: "+oe}}se(l,f),i.reference!=="suffix"&&l.scheme&&(S.push(l.scheme),S.push(":"));var z=Pr(l,i);if(z!==void 0&&(i.reference!=="suffix"&&S.push("//"),S.push(z),l.path&&l.path.charAt(0)!=="/"&&S.push("/")),l.path!==void 0){var L=l.path;!i.absolutePath&&(!E||!E.absolutePath)&&(L=We(L)),z===void 0&&(L=L.replace(/^\/\//,"/%2F")),S.push(L)}return l.query!==void 0&&(S.push("?"),S.push(l.query)),l.fragment!==void 0&&(S.push("#"),S.push(l.fragment)),S.join("")}function er(l,i){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},S=arguments[3],E={};return S||(l=Ie(De(l,f),f),i=Ie(De(i,f),f)),f=f||{},!f.tolerant&&i.scheme?(E.scheme=i.scheme,E.userinfo=i.userinfo,E.host=i.host,E.port=i.port,E.path=We(i.path||""),E.query=i.query):(i.userinfo!==void 0||i.host!==void 0||i.port!==void 0?(E.userinfo=i.userinfo,E.host=i.host,E.port=i.port,E.path=We(i.path||""),E.query=i.query):(i.path?(i.path.charAt(0)==="/"?E.path=We(i.path):((l.userinfo!==void 0||l.host!==void 0||l.port!==void 0)&&!l.path?E.path="/"+i.path:l.path?E.path=l.path.slice(0,l.path.lastIndexOf("/")+1)+i.path:E.path=i.path,E.path=We(E.path)),E.query=i.query):(E.path=l.path,i.query!==void 0?E.query=i.query:E.query=l.query),E.userinfo=l.userinfo,E.host=l.host,E.port=l.port),E.scheme=l.scheme),E.fragment=i.fragment,E}function Nr(l,i,f){var S=g({scheme:"null"},f);return De(er(Ie(l,S),Ie(i,S),S,!0),S)}function Ft(l,i){return typeof l=="string"?l=De(Ie(l,i),i):a(l)==="object"&&(l=Ie(De(l,i),i)),l}function Rr(l,i,f){return typeof l=="string"?l=De(Ie(l,f),f):a(l)==="object"&&(l=De(l,f)),typeof i=="string"?i=De(Ie(i,f),f):a(i)==="object"&&(i=De(i,f)),l===i}function rn(l,i){return l&&l.toString().replace(!i||!i.iri?u.ESCAPE:m.ESCAPE,M)}function Ue(l,i){return l&&l.toString().replace(!i||!i.iri?u.PCT_ENCODED:m.PCT_ENCODED,ee)}var Mt={scheme:"http",domainHost:!0,parse:function(i,f){return i.host||(i.error=i.error||"HTTP URIs must have a host."),i},serialize:function(i,f){var S=String(i.scheme).toLowerCase()==="https";return(i.port===(S?443:80)||i.port==="")&&(i.port=void 0),i.path||(i.path="/"),i}},$a={scheme:"https",domainHost:Mt.domainHost,parse:Mt.parse,serialize:Mt.serialize};function Ea(l){return typeof l.secure=="boolean"?l.secure:String(l.scheme).toLowerCase()==="wss"}var Or={scheme:"ws",domainHost:!0,parse:function(i,f){var S=i;return S.secure=Ea(S),S.resourceName=(S.path||"/")+(S.query?"?"+S.query:""),S.path=void 0,S.query=void 0,S},serialize:function(i,f){if((i.port===(Ea(i)?443:80)||i.port==="")&&(i.port=void 0),typeof i.secure=="boolean"&&(i.scheme=i.secure?"wss":"ws",i.secure=void 0),i.resourceName){var S=i.resourceName.split("?"),E=b(S,2),z=E[0],L=E[1];i.path=z&&z!=="/"?z:void 0,i.query=L,i.resourceName=void 0}return i.fragment=void 0,i}},wa={scheme:"wss",domainHost:Or.domainHost,parse:Or.parse,serialize:Or.serialize},Pu={},Sa="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ye="[0-9A-Fa-f]",Cu=s(s("%[EFef]"+Ye+"%"+Ye+Ye+"%"+Ye+Ye)+"|"+s("%[89A-Fa-f]"+Ye+"%"+Ye+Ye)+"|"+s("%"+Ye+Ye)),Nu="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ru="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Ou=n(Ru,'[\\"\\\\]'),ju="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Tu=new RegExp(Sa,"g"),tr=new RegExp(Cu,"g"),Du=new RegExp(n("[^]",Nu,"[\\.]",'[\\"]',Ou),"g"),ba=new RegExp(n("[^]",Sa,ju),"g"),Iu=ba;function Jn(l){var i=ee(l);return i.match(Tu)?i:l}var Pa={scheme:"mailto",parse:function(i,f){var S=i,E=S.to=S.path?S.path.split(","):[];if(S.path=void 0,S.query){for(var z=!1,L={},oe=S.query.split("&"),me=0,we=oe.length;me<we;++me){var te=oe[me].split("=");switch(te[0]){case"to":for(var de=te[1].split(","),Se=0,q=de.length;Se<q;++Se)E.push(de[Se]);break;case"subject":S.subject=Ue(te[1],f);break;case"body":S.body=Ue(te[1],f);break;default:z=!0,L[Ue(te[0],f)]=Ue(te[1],f);break}}z&&(S.headers=L)}S.query=void 0;for(var ye=0,be=E.length;ye<be;++ye){var _e=E[ye].split("@");if(_e[0]=Ue(_e[0]),f.unicodeSupport)_e[1]=Ue(_e[1],f).toLowerCase();else try{_e[1]=R.toASCII(Ue(_e[1],f).toLowerCase())}catch(Et){S.error=S.error||"Email address's domain name can not be converted to ASCII via punycode: "+Et}E[ye]=_e.join("@")}return S},serialize:function(i,f){var S=i,E=h(i.to);if(E){for(var z=0,L=E.length;z<L;++z){var oe=String(E[z]),me=oe.lastIndexOf("@"),we=oe.slice(0,me).replace(tr,Jn).replace(tr,c).replace(Du,M),te=oe.slice(me+1);try{te=f.iri?R.toUnicode(te):R.toASCII(Ue(te,f).toLowerCase())}catch(ye){S.error=S.error||"Email address's domain name can not be converted to "+(f.iri?"Unicode":"ASCII")+" via punycode: "+ye}E[z]=we+"@"+te}S.path=E.join(",")}var de=i.headers=i.headers||{};i.subject&&(de.subject=i.subject),i.body&&(de.body=i.body);var Se=[];for(var q in de)de[q]!==Pu[q]&&Se.push(q.replace(tr,Jn).replace(tr,c).replace(ba,M)+"="+de[q].replace(tr,Jn).replace(tr,c).replace(Iu,M));return Se.length&&(S.query=Se.join("&")),S}},Au=/^([^\:]+)\:(.*)/,Ca={scheme:"urn",parse:function(i,f){var S=i.path&&i.path.match(Au),E=i;if(S){var z=f.scheme||E.scheme||"urn",L=S[1].toLowerCase(),oe=S[2],me=z+":"+(f.nid||L),we=F[me];E.nid=L,E.nss=oe,E.path=void 0,we&&(E=we.parse(E,f))}else E.error=E.error||"URN can not be parsed.";return E},serialize:function(i,f){var S=f.scheme||i.scheme||"urn",E=i.nid,z=S+":"+(f.nid||E),L=F[z];L&&(i=L.serialize(i,f));var oe=i,me=i.nss;return oe.path=(E||f.nid)+":"+me,oe}},ku=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Na={scheme:"urn:uuid",parse:function(i,f){var S=i;return S.uuid=S.nss,S.nss=void 0,!f.tolerant&&(!S.uuid||!S.uuid.match(ku))&&(S.error=S.error||"UUID is not valid."),S},serialize:function(i,f){var S=i;return S.nss=(i.uuid||"").toLowerCase(),S}};F[Mt.scheme]=Mt,F[$a.scheme]=$a,F[Or.scheme]=Or,F[wa.scheme]=wa,F[Pa.scheme]=Pa,F[Ca.scheme]=Ca,F[Na.scheme]=Na,r.SCHEMES=F,r.pctEncChar=M,r.pctDecChars=ee,r.parse=Ie,r.removeDotSegments=We,r.serialize=De,r.resolveComponents=er,r.resolve=Nr,r.normalize=Ft,r.equal=Rr,r.escapeComponent=rn,r.unescapeComponent=Ue,Object.defineProperty(r,"__esModule",{value:!0})})})($n,$n.exports),Object.defineProperty(_n,"__esModule",{value:!0});const bs=$n.exports;bs.code='require("ajv/dist/runtime/uri").default',_n.default=bs,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=He;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ue;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=zr,s=Ct,a=bt,c=Oe,h=ue,g=Ne,p=Fr,u=Pe,m=gi,b=_n,I=(k,y)=>new RegExp(k,y);I.code="new RegExp";const T=["removeAdditional","useDefaults","coerceTypes"],A=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},C=200;function N(k){var y,O,$,o,d,R,F,M,ee,se,Ee,Qe,Yt,Sr,br,Ie,Pr,Xt,Zt,xt,Cr,We,De,er,Nr;const Ft=k.strict,Rr=(y=k.code)===null||y===void 0?void 0:y.optimize,rn=Rr===!0||Rr===void 0?1:Rr||0,Ue=($=(O=k.code)===null||O===void 0?void 0:O.regExp)!==null&&$!==void 0?$:I,Mt=(o=k.uriResolver)!==null&&o!==void 0?o:b.default;return{strictSchema:(R=(d=k.strictSchema)!==null&&d!==void 0?d:Ft)!==null&&R!==void 0?R:!0,strictNumbers:(M=(F=k.strictNumbers)!==null&&F!==void 0?F:Ft)!==null&&M!==void 0?M:!0,strictTypes:(se=(ee=k.strictTypes)!==null&&ee!==void 0?ee:Ft)!==null&&se!==void 0?se:"log",strictTuples:(Qe=(Ee=k.strictTuples)!==null&&Ee!==void 0?Ee:Ft)!==null&&Qe!==void 0?Qe:"log",strictRequired:(Sr=(Yt=k.strictRequired)!==null&&Yt!==void 0?Yt:Ft)!==null&&Sr!==void 0?Sr:!1,code:k.code?le(Y({},k.code),{optimize:rn,regExp:Ue}):{optimize:rn,regExp:Ue},loopRequired:(br=k.loopRequired)!==null&&br!==void 0?br:C,loopEnum:(Ie=k.loopEnum)!==null&&Ie!==void 0?Ie:C,meta:(Pr=k.meta)!==null&&Pr!==void 0?Pr:!0,messages:(Xt=k.messages)!==null&&Xt!==void 0?Xt:!0,inlineRefs:(Zt=k.inlineRefs)!==null&&Zt!==void 0?Zt:!0,schemaId:(xt=k.schemaId)!==null&&xt!==void 0?xt:"$id",addUsedSchema:(Cr=k.addUsedSchema)!==null&&Cr!==void 0?Cr:!0,validateSchema:(We=k.validateSchema)!==null&&We!==void 0?We:!0,validateFormats:(De=k.validateFormats)!==null&&De!==void 0?De:!0,unicodeRegExp:(er=k.unicodeRegExp)!==null&&er!==void 0?er:!0,int32range:(Nr=k.int32range)!==null&&Nr!==void 0?Nr:!0,uriResolver:Mt}}class j{constructor(y={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,y=this.opts=Y(Y({},y),N(y));const{es5:O,lines:$}=this.opts.code;this.scope=new h.ValueScope({scope:{},prefixes:A,es5:O,lines:$}),this.logger=Z(y.logger);const o=y.validateFormats;y.validateFormats=!1,this.RULES=(0,a.getRules)(),K.call(this,w,y,"NOT SUPPORTED"),K.call(this,v,y,"DEPRECATED","warn"),this._metaOpts=W.call(this),y.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),y.keywords&&H.call(this,y.keywords),typeof y.meta=="object"&&this.addMetaSchema(y.meta),P.call(this),y.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:y,meta:O,schemaId:$}=this.opts;let o=m;$==="id"&&(o=Y({},m),o.id=o.$id,delete o.$id),O&&y&&this.addMetaSchema(o,o[$],!1)}defaultMeta(){const{meta:y,schemaId:O}=this.opts;return this.opts.defaultMeta=typeof y=="object"?y[O]||y:void 0}validate(y,O){let $;if(typeof y=="string"){if($=this.getSchema(y),!$)throw new Error(`no schema with key or ref "${y}"`)}else $=this.compile(y);const o=$(O);return"$async"in $||(this.errors=$.errors),o}compile(y,O){const $=this._addSchema(y,O);return $.validate||this._compileSchemaEnv($)}compileAsync(y,O){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:$}=this.opts;return o.call(this,y,O);async function o(se,Ee){await d.call(this,se.$schema);const Qe=this._addSchema(se,Ee);return Qe.validate||R.call(this,Qe)}async function d(se){se&&!this.getSchema(se)&&await o.call(this,{$ref:se},!0)}async function R(se){try{return this._compileSchemaEnv(se)}catch(Ee){if(!(Ee instanceof s.default))throw Ee;return F.call(this,Ee),await M.call(this,Ee.missingSchema),R.call(this,se)}}function F({missingSchema:se,missingRef:Ee}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${Ee} cannot be resolved`)}async function M(se){const Ee=await ee.call(this,se);this.refs[se]||await d.call(this,Ee.$schema),this.refs[se]||this.addSchema(Ee,se,O)}async function ee(se){const Ee=this._loading[se];if(Ee)return Ee;try{return await(this._loading[se]=$(se))}finally{delete this._loading[se]}}}addSchema(y,O,$,o=this.opts.validateSchema){if(Array.isArray(y)){for(const R of y)this.addSchema(R,void 0,$,o);return this}let d;if(typeof y=="object"){const{schemaId:R}=this.opts;if(d=y[R],d!==void 0&&typeof d!="string")throw new Error(`schema ${R} must be string`)}return O=(0,g.normalizeId)(O||d),this._checkUnique(O),this.schemas[O]=this._addSchema(y,$,O,o,!0),this}addMetaSchema(y,O,$=this.opts.validateSchema){return this.addSchema(y,O,!0,$),this}validateSchema(y,O){if(typeof y=="boolean")return!0;let $;if($=y.$schema,$!==void 0&&typeof $!="string")throw new Error("$schema must be a string");if($=$||this.opts.defaultMeta||this.defaultMeta(),!$)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const o=this.validate($,y);if(!o&&O){const d="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(d);else throw new Error(d)}return o}getSchema(y){let O;for(;typeof(O=_.call(this,y))=="string";)y=O;if(O===void 0){const{schemaId:$}=this.opts,o=new c.SchemaEnv({schema:{},schemaId:$});if(O=c.resolveSchema.call(this,o,y),!O)return;this.refs[y]=O}return O.validate||this._compileSchemaEnv(O)}removeSchema(y){if(y instanceof RegExp)return this._removeAllSchemas(this.schemas,y),this._removeAllSchemas(this.refs,y),this;switch(typeof y){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const O=_.call(this,y);return typeof O=="object"&&this._cache.delete(O.schema),delete this.schemas[y],delete this.refs[y],this}case"object":{const O=y;this._cache.delete(O);let $=y[this.opts.schemaId];return $&&($=(0,g.normalizeId)($),delete this.schemas[$],delete this.refs[$]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(y){for(const O of y)this.addKeyword(O);return this}addKeyword(y,O){let $;if(typeof y=="string")$=y,typeof O=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),O.keyword=$);else if(typeof y=="object"&&O===void 0){if(O=y,$=O.keyword,Array.isArray($)&&!$.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(x.call(this,$,O),!O)return(0,u.eachItem)($,d=>ve.call(this,d)),this;Ce.call(this,O);const o=le(Y({},O),{type:(0,p.getJSONTypes)(O.type),schemaType:(0,p.getJSONTypes)(O.schemaType)});return(0,u.eachItem)($,o.type.length===0?d=>ve.call(this,d,o):d=>o.type.forEach(R=>ve.call(this,d,o,R))),this}getKeyword(y){const O=this.RULES.all[y];return typeof O=="object"?O.definition:!!O}removeKeyword(y){const{RULES:O}=this;delete O.keywords[y],delete O.all[y];for(const $ of O.rules){const o=$.rules.findIndex(d=>d.keyword===y);o>=0&&$.rules.splice(o,1)}return this}addFormat(y,O){return typeof O=="string"&&(O=new RegExp(O)),this.formats[y]=O,this}errorsText(y=this.errors,{separator:O=", ",dataVar:$="data"}={}){return!y||y.length===0?"No errors":y.map(o=>`${$}${o.instancePath} ${o.message}`).reduce((o,d)=>o+O+d)}$dataMetaSchema(y,O){const $=this.RULES.all;y=JSON.parse(JSON.stringify(y));for(const o of O){const d=o.split("/").slice(1);let R=y;for(const F of d)R=R[F];for(const F in $){const M=$[F];if(typeof M!="object")continue;const{$data:ee}=M.definition,se=R[F];ee&&se&&(R[F]=Wt(se))}}return y}_removeAllSchemas(y,O){for(const $ in y){const o=y[$];(!O||O.test($))&&(typeof o=="string"?delete y[$]:o&&!o.meta&&(this._cache.delete(o.schema),delete y[$]))}}_addSchema(y,O,$,o=this.opts.validateSchema,d=this.opts.addUsedSchema){let R;const{schemaId:F}=this.opts;if(typeof y=="object")R=y[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof y!="boolean")throw new Error("schema must be object or boolean")}let M=this._cache.get(y);if(M!==void 0)return M;$=(0,g.normalizeId)(R||$);const ee=g.getSchemaRefs.call(this,y,$);return M=new c.SchemaEnv({schema:y,schemaId:F,meta:O,baseId:$,localRefs:ee}),this._cache.set(M.schema,M),d&&!$.startsWith("#")&&($&&this._checkUnique($),this.refs[$]=M),o&&this.validateSchema(y,!0),M}_checkUnique(y){if(this.schemas[y]||this.refs[y])throw new Error(`schema with key or id "${y}" already exists`)}_compileSchemaEnv(y){if(y.meta?this._compileMetaSchema(y):c.compileSchema.call(this,y),!y.validate)throw new Error("ajv implementation error");return y.validate}_compileMetaSchema(y){const O=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,y)}finally{this.opts=O}}}e.default=j,j.ValidationError=n.default,j.MissingRefError=s.default;function K(k,y,O,$="error"){for(const o in k){const d=o;d in y&&this.logger[$](`${O}: option ${o}. ${k[d]}`)}}function _(k){return k=(0,g.normalizeId)(k),this.schemas[k]||this.refs[k]}function P(){const k=this.opts.schemas;if(!!k)if(Array.isArray(k))this.addSchema(k);else for(const y in k)this.addSchema(k[y],y)}function D(){for(const k in this.opts.formats){const y=this.opts.formats[k];y&&this.addFormat(k,y)}}function H(k){if(Array.isArray(k)){this.addVocabulary(k);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const y in k){const O=k[y];O.keyword||(O.keyword=y),this.addKeyword(O)}}function W(){const k=Y({},this.opts);for(const y of T)delete k[y];return k}const pe={log(){},warn(){},error(){}};function Z(k){if(k===!1)return pe;if(k===void 0)return console;if(k.log&&k.warn&&k.error)return k;throw new Error("logger must implement log, warn and error methods")}const ie=/^[a-z_$][a-z0-9_$:-]*$/i;function x(k,y){const{RULES:O}=this;if((0,u.eachItem)(k,$=>{if(O.keywords[$])throw new Error(`Keyword ${$} is already defined`);if(!ie.test($))throw new Error(`Keyword ${$} has invalid name`)}),!!y&&y.$data&&!("code"in y||"validate"in y))throw new Error('$data keyword must have "code" or "validate" function')}function ve(k,y,O){var $;const o=y==null?void 0:y.post;if(O&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:d}=this;let R=o?d.post:d.rules.find(({type:M})=>M===O);if(R||(R={type:O,rules:[]},d.rules.push(R)),d.keywords[k]=!0,!y)return;const F={keyword:k,definition:le(Y({},y),{type:(0,p.getJSONTypes)(y.type),schemaType:(0,p.getJSONTypes)(y.schemaType)})};y.before?$e.call(this,R,F,y.before):R.rules.push(F),d.all[k]=F,($=y.implements)===null||$===void 0||$.forEach(M=>this.addKeyword(M))}function $e(k,y,O){const $=k.rules.findIndex(o=>o.keyword===O);$>=0?k.rules.splice($,0,y):(k.rules.push(y),this.logger.warn(`rule ${O} is not defined`))}function Ce(k){let{metaSchema:y}=k;y!==void 0&&(k.$data&&this.opts.$data&&(y=Wt(y)),k.validateSchema=this.compile(y,!0))}const Me={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Wt(k){return{anyOf:[k,Me]}}}(Bn);var En={},Rt={},Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.callRef=Ot.getValidate=void 0;const vi=Ct,Ps=ae,Te=ue,Jt=Ae,Cs=Oe,Hr=Pe,yi={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:s,schemaEnv:a,validateName:c,opts:h,self:g}=n,{root:p}=a;if((r==="#"||r==="#/")&&s===p.baseId)return m();const u=Cs.resolveRef.call(g,p,s,r);if(u===void 0)throw new vi.default(n.opts.uriResolver,s,r);if(u instanceof Cs.SchemaEnv)return b(u);return I(u);function m(){if(a===p)return Jr(e,c,a,a.$async);const T=t.scopeValue("root",{ref:p});return Jr(e,(0,Te._)`${T}.validate`,p,p.$async)}function b(T){const A=Ns(e,T);Jr(e,A,T,T.$async)}function I(T){const A=t.scopeValue("schema",h.code.source===!0?{ref:T,code:(0,Te.stringify)(T)}:{ref:T}),w=t.name("valid"),v=e.subschema({schema:T,dataTypes:[],schemaPath:Te.nil,topSchemaRef:A,errSchemaPath:r},w);e.mergeEvaluated(v),e.ok(w)}}};function Ns(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Te._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Ot.getValidate=Ns;function Jr(e,t,r,n){const{gen:s,it:a}=e,{allErrors:c,schemaEnv:h,opts:g}=a,p=g.passContext?Jt.default.this:Te.nil;n?u():m();function u(){if(!h.$async)throw new Error("async schema referenced by sync schema");const T=s.let("valid");s.try(()=>{s.code((0,Te._)`await ${(0,Ps.callValidateCode)(e,t,p)}`),I(t),c||s.assign(T,!0)},A=>{s.if((0,Te._)`!(${A} instanceof ${a.ValidationError})`,()=>s.throw(A)),b(A),c||s.assign(T,!1)}),e.ok(T)}function m(){e.result((0,Ps.callValidateCode)(e,t,p),()=>I(t),()=>b(t))}function b(T){const A=(0,Te._)`${T}.errors`;s.assign(Jt.default.vErrors,(0,Te._)`${Jt.default.vErrors} === null ? ${A} : ${Jt.default.vErrors}.concat(${A})`),s.assign(Jt.default.errors,(0,Te._)`${Jt.default.vErrors}.length`)}function I(T){var A;if(!a.opts.unevaluated)return;const w=(A=r==null?void 0:r.validate)===null||A===void 0?void 0:A.evaluated;if(a.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(a.props=Hr.mergeEvaluated.props(s,w.props,a.props));else{const v=s.var("props",(0,Te._)`${T}.evaluated.props`);a.props=Hr.mergeEvaluated.props(s,v,a.props,Te.Name)}if(a.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(a.items=Hr.mergeEvaluated.items(s,w.items,a.items));else{const v=s.var("items",(0,Te._)`${T}.evaluated.items`);a.items=Hr.mergeEvaluated.items(s,v,a.items,Te.Name)}}}Ot.callRef=Jr,Ot.default=yi;var ke={};Object.defineProperty(ke,"__esModule",{value:!0}),ke.checkMetadata=void 0;const _i=Pe,$i={keyword:"metadata",schemaType:"object",code(e){Rs(e);const{gen:t,schema:r,it:n}=e;if((0,_i.alwaysValidSchema)(n,r))return;const s=t.name("valid");e.subschema({keyword:"metadata",jtdMetadata:!0},s),e.ok(s)}};function Rs({it:e,keyword:t},r){if(e.jtdMetadata!==r)throw new Error(`JTD: "${t}" cannot be used in this schema location`)}ke.checkMetadata=Rs,ke.default=$i,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.hasRef=void 0;const Os=Oe,cr=ue,Ei=Ct,js=Ae,Ts=Ot,wi=ke,Si={keyword:"ref",schemaType:"string",code(e){(0,wi.checkMetadata)(e);const{gen:t,data:r,schema:n,parentSchema:s,it:a}=e,{schemaEnv:{root:c}}=a,h=t.name("valid");s.nullable?(t.var(h,(0,cr._)`${r} === null`),t.if((0,cr.not)(h),g)):(t.var(h,!1),g()),e.ok(h);function g(){var m;const b=(m=c.schema.definitions)===null||m===void 0?void 0:m[n];if(!b)throw new Ei.default(a.opts.uriResolver,"",n,`No definition ${n}`);wn(b)||!a.opts.inlineRefs?p(b):u(b)}function p(m){const b=Os.compileSchema.call(a.self,new Os.SchemaEnv({schema:m,root:c,schemaPath:`/definitions/${n}`})),I=(0,Ts.getValidate)(e,b),T=t.const("_errs",js.default.errors);(0,Ts.callRef)(e,I,b,b.$async),t.assign(h,(0,cr._)`${T} === ${js.default.errors}`)}function u(m){const b=t.scopeValue("schema",a.opts.code.source===!0?{ref:m,code:(0,cr.stringify)(m)}:{ref:m});e.subschema({schema:m,dataTypes:[],schemaPath:cr.nil,topSchemaRef:b,errSchemaPath:`/definitions/${n}`},h)}}};function wn(e){for(const t in e){let r;if(t==="ref"||typeof(r=e[t])=="object"&&wn(r))return!0}return!1}Rt.hasRef=wn,Rt.default=Si;var Sn={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});const bi=/t|\s/i,Pi=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Ci=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,Ni=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ds(e,t){const r=e.split(bi);return r.length===2&&Is(r[0])&&Ri(r[1])||t&&r.length===1&&Is(r[0])}Gr.default=Ds;function Is(e){const t=Pi.exec(e);if(!t)return!1;const r=+t[1],n=+t[2],s=+t[3];return n>=1&&n<=12&&s>=1&&(s<=Ni[n]||n===2&&s===29&&(r%100===0?r%400===0:r%4===0))}function Ri(e){const t=Ci.exec(e);if(!t)return!1;const r=+t[1],n=+t[2],s=+t[3],a=+(t[4]||0),c=+(t[5]||0);return r<=23&&n<=59&&s<=59||r-a===23&&n-c===59&&s===60}Ds.code='require("ajv/dist/runtime/timestamp").default';var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.typeErrorParams=Fe.typeErrorMessage=Fe.typeError=void 0;const Oi=ue;function ji(e){return{message:t=>As(t,e),params:t=>ks(t,e)}}Fe.typeError=ji;function As({parentSchema:e},t){return e!=null&&e.nullable?`must be ${t} or null`:`must be ${t}`}Fe.typeErrorMessage=As;function ks({parentSchema:e},t){return(0,Oi._)`{type: ${t}, nullable: ${!!(e!=null&&e.nullable)}}`}Fe.typeErrorParams=ks,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.intRange=void 0;const t=ue,r=Gr,n=Pe,s=ke,a=Fe;e.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};const c={message:p=>(0,a.typeErrorMessage)(p,p.schema),params:p=>(0,a.typeErrorParams)(p,p.schema)};function h(p){const{gen:u,data:m,it:b}=p,{timestamp:I,allowDate:T}=b.opts;if(I==="date")return(0,t._)`${m} instanceof Date `;const A=(0,n.useFunc)(u,r.default),w=T?(0,t._)`, true`:t.nil,v=(0,t._)`typeof ${m} == "string" && ${A}(${m}${w})`;return I==="string"?v:(0,t.or)((0,t._)`${m} instanceof Date`,v)}const g={keyword:"type",schemaType:"string",error:c,code(p){(0,s.checkMetadata)(p);const{data:u,schema:m,parentSchema:b,it:I}=p;let T;switch(m){case"boolean":case"string":T=(0,t._)`typeof ${u} == ${m}`;break;case"timestamp":{T=h(p);break}case"float32":case"float64":T=(0,t._)`typeof ${u} == "number"`;break;default:{const A=m;if(T=(0,t._)`typeof ${u} == "number" && isFinite(${u}) && !(${u} % 1)`,!I.opts.int32range&&(A==="int32"||A==="uint32"))A==="uint32"&&(T=(0,t._)`${T} && ${u} >= 0`);else{const[w,v]=e.intRange[A];T=(0,t._)`${T} && ${u} >= ${w} && ${u} <= ${v}`}}}p.pass(b.nullable?(0,t.or)((0,t._)`${u} === null`,T):T)}};e.default=g}(Sn);var bn={},qe={};Object.defineProperty(qe,"__esModule",{value:!0}),qe.checkNullableObject=qe.checkNullable=void 0;const qr=ue;function Fs({gen:e,data:t,parentSchema:r},n=qr.nil){const s=e.name("valid");return r.nullable?(e.let(s,(0,qr._)`${t} === null`),n=(0,qr.not)(s)):e.let(s,!1),[s,n]}qe.checkNullable=Fs;function Ti(e,t){const[r,n]=Fs(e,t);return[r,(0,qr._)`${n} && typeof ${e.data} == "object" && !Array.isArray(${e.data})`]}qe.checkNullableObject=Ti,Object.defineProperty(bn,"__esModule",{value:!0});const ht=ue,Di=ke,Ii=qe,Ai={keyword:"enum",schemaType:"array",error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ht._)`{allowedValues: ${e}}`},code(e){(0,Di.checkMetadata)(e);const{gen:t,data:r,schema:n,schemaValue:s,parentSchema:a,it:c}=e;if(n.length===0)throw new Error("enum must have non-empty array");if(n.length!==new Set(n).size)throw new Error("enum items must be unique");let h;const g=(0,ht._)`typeof ${r} == "string"`;if(n.length>=c.opts.loopEnum){let u;[h,u]=(0,Ii.checkNullable)(e,g),t.if(u,p)}else{if(!Array.isArray(n))throw new Error("ajv implementation error");h=(0,ht.and)(g,(0,ht.or)(...n.map(u=>(0,ht._)`${r} === ${u}`))),a.nullable&&(h=(0,ht.or)((0,ht._)`${r} === null`,h))}e.pass(h);function p(){t.forOf("v",s,u=>t.if((0,ht._)`${h} = ${r} === ${u}`,()=>t.break()))}}};bn.default=Ai;var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});const ki=Pe,Fi=ae,Ms=ue,Mi=ke,Ui=qe,Vi={keyword:"elements",schemaType:"object",error:(0,Fe.typeError)("array"),code(e){(0,Mi.checkMetadata)(e);const{gen:t,data:r,schema:n,it:s}=e;if((0,ki.alwaysValidSchema)(s,n))return;const[a]=(0,Ui.checkNullable)(e);t.if((0,Ms.not)(a),()=>t.if((0,Ms._)`Array.isArray(${r})`,()=>t.assign(a,(0,Fi.validateArray)(e)),()=>e.error())),e.ok(a)}};Pn.default=Vi;var Cn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperties=e.error=void 0;const t=ae,r=Pe,n=ue,s=ke,a=qe,c=Fe;var h;(function(u){u.Additional="additional",u.Missing="missing"})(h||(h={})),e.error={message:u=>{const{params:m}=u;return m.propError?m.propError===h.Additional?"must NOT have additional properties":`must have property '${m.missingProperty}'`:(0,c.typeErrorMessage)(u,"object")},params:u=>{const{params:m}=u;return m.propError?m.propError===h.Additional?(0,n._)`{error: ${m.propError}, additionalProperty: ${m.additionalProperty}}`:(0,n._)`{error: ${m.propError}, missingProperty: ${m.missingProperty}}`:(0,c.typeErrorParams)(u,"object")}};const g={keyword:"properties",schemaType:"object",error:e.error,code:p};function p(u){(0,s.checkMetadata)(u);const{gen:m,data:b,parentSchema:I,it:T}=u,{additionalProperties:A,nullable:w}=I;if(T.jtdDiscriminator&&w)throw new Error("JTD: nullable inside discriminator mapping");if(P())throw new Error("JTD: properties and optionalProperties have common members");const[v,C]=D("properties"),[N,j]=D("optionalProperties");if(C.length===0&&j.length===0&&A)return;const[K,_]=T.jtdDiscriminator===void 0?(0,a.checkNullableObject)(u,b):[m.let("valid",!1),!0];m.if(_,()=>m.assign(K,!0).block(()=>{H(C,"properties",!0),H(j,"optionalProperties"),A||pe()})),u.pass(K);function P(){const ie=I.properties,x=I.optionalProperties;if(!(ie&&x))return!1;for(const ve in ie)if(Object.prototype.hasOwnProperty.call(x,ve))return!0;return!1}function D(ie){const x=I[ie],ve=x?(0,t.allSchemaProperties)(x):[];if(T.jtdDiscriminator&&ve.some(Ce=>Ce===T.jtdDiscriminator))throw new Error(`JTD: discriminator tag used in ${ie}`);const $e=ve.filter(Ce=>!(0,r.alwaysValidSchema)(T,x[Ce]));return[ve,$e]}function H(ie,x,ve){const $e=m.var("valid");for(const Me of ie)m.if((0,t.propertyInData)(m,b,Me,T.opts.ownProperties),()=>W(Me,x,$e),()=>Ce(Me)),u.ok($e);function Ce(Me){ve?(m.assign($e,!1),u.error(!1,{propError:h.Missing,missingProperty:Me},{schemaPath:Me})):m.assign($e,!0)}}function W(ie,x,ve){u.subschema({keyword:x,schemaProp:ie,dataProp:ie},ve)}function pe(){m.forIn("key",b,ie=>{const x=T.jtdDiscriminator===void 0?v:[T.jtdDiscriminator].concat(v),ve=Z(ie,x,"properties"),$e=Z(ie,N,"optionalProperties"),Ce=ve===!0?$e:$e===!0?ve:(0,n.and)(ve,$e);m.if(Ce,()=>{T.opts.removeAdditional?m.code((0,n._)`delete ${b}[${ie}]`):(u.error(!1,{propError:h.Additional,additionalProperty:ie},{instancePath:ie,parentSchema:!0}),T.opts.allErrors||m.break())})})}function Z(ie,x,ve){let $e;if(x.length>8){const Ce=(0,r.schemaRefOrVal)(T,I[ve],ve);$e=(0,n.not)((0,t.isOwnProperty)(m,Ce,ie))}else x.length?$e=(0,n.and)(...x.map(Ce=>(0,n._)`${ie} !== ${Ce}`)):$e=!0;return $e}}e.validateProperties=p,e.default=g})(Cn);var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});const Us=Cn,zi={keyword:"optionalProperties",schemaType:"object",error:Us.error,code(e){e.parentSchema.properties||(0,Us.validateProperties)(e)}};Nn.default=zi;var Rn={},Vs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(Vs),Object.defineProperty(Rn,"__esModule",{value:!0});const jt=ue,Li=ke,Ki=qe,zs=Fe,Br=Vs,Hi={keyword:"discriminator",schemaType:"string",implements:["mapping"],error:{message:e=>{const{schema:t,params:r}=e;return r.discrError?r.discrError===Br.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in mapping`:(0,zs.typeErrorMessage)(e,"object")},params:e=>{const{schema:t,params:r}=e;return r.discrError?(0,jt._)`{error: ${r.discrError}, tag: ${t}, tagValue: ${r.tag}}`:(0,zs.typeErrorParams)(e,"object")}},code(e){(0,Li.checkMetadata)(e);const{gen:t,data:r,schema:n,parentSchema:s}=e,[a,c]=(0,Ki.checkNullableObject)(e,r);t.if(c),h(),t.elseIf((0,jt.not)(a)),e.error(),t.endIf(),e.ok(a);function h(){const u=t.const("tag",(0,jt._)`${r}${(0,jt.getProperty)(n)}`);t.if((0,jt._)`${u} === undefined`),e.error(!1,{discrError:Br.DiscrError.Tag,tag:u}),t.elseIf((0,jt._)`typeof ${u} == "string"`),g(u),t.else(),e.error(!1,{discrError:Br.DiscrError.Tag,tag:u},{instancePath:n}),t.endIf()}function g(u){t.if(!1);for(const m in s.mapping)t.elseIf((0,jt._)`${u} === ${m}`),t.assign(a,p(m));t.else(),e.error(!1,{discrError:Br.DiscrError.Mapping,tag:u},{instancePath:n,schemaPath:"mapping",parentSchema:!0}),t.endIf()}function p(u){const m=t.name("valid");return e.subschema({keyword:"mapping",schemaProp:u,jtdDiscriminator:n},m),m}}};Rn.default=Hi;var On={};Object.defineProperty(On,"__esModule",{value:!0});const Ls=Pe,Ks=ue,Ji=ke,Gi=qe,qi={keyword:"values",schemaType:"object",error:(0,Fe.typeError)("object"),code(e){(0,Ji.checkMetadata)(e);const{gen:t,data:r,schema:n,it:s}=e;if((0,Ls.alwaysValidSchema)(s,n))return;const[a,c]=(0,Gi.checkNullableObject)(e,r);t.if(c),t.assign(a,h()),t.elseIf((0,Ks.not)(a)),e.error(),t.endIf(),e.ok(a);function h(){const g=t.name("valid");if(s.allErrors){const u=t.let("valid",!0);return p(()=>t.assign(u,!1)),u}return t.var(g,!0),p(()=>t.break()),g;function p(u){t.forIn("key",r,m=>{e.subschema({keyword:"values",dataProp:m,dataPropType:Ls.Type.Str},g),t.if((0,Ks.not)(g),u)})}}}};On.default=qi;var jn={};Object.defineProperty(jn,"__esModule",{value:!0});const Bi={keyword:"union",schemaType:"array",trackErrors:!0,code:ae.validateUnion,error:{message:"must match a schema in union"}};jn.default=Bi,Object.defineProperty(En,"__esModule",{value:!0});const Qi=Rt,Wi=Sn,Yi=bn,Xi=Pn,Zi=Cn,xi=Nn,ec=Rn,tc=On,rc=jn,nc=ke,sc=["definitions",Qi.default,Wi.default,Yi.default,Xi.default,Zi.default,xi.default,ec.default,tc.default,rc.default,nc.default,{keyword:"additionalProperties",schemaType:"boolean"},{keyword:"nullable",schemaType:"boolean"}];En.default=sc;var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0});const rt=e=>{const t={nullable:{type:"boolean"},metadata:{optionalProperties:{union:{elements:{ref:"schema"}}},additionalProperties:!0}};return e&&(t.definitions={values:{ref:"schema"}}),t},ac=e=>({optionalProperties:rt(e)}),oc=e=>({properties:{ref:{type:"string"}},optionalProperties:rt(e)}),ic=e=>({properties:{type:{enum:["boolean","timestamp","string","float32","float64","int8","uint8","int16","uint16","int32","uint32"]}},optionalProperties:rt(e)}),cc=e=>({properties:{enum:{elements:{type:"string"}}},optionalProperties:rt(e)}),uc=e=>({properties:{elements:{ref:"schema"}},optionalProperties:rt(e)}),Hs=e=>({properties:{properties:{values:{ref:"schema"}}},optionalProperties:Y({optionalProperties:{values:{ref:"schema"}},additionalProperties:{type:"boolean"}},rt(e))}),Js=e=>({properties:{optionalProperties:{values:{ref:"schema"}}},optionalProperties:Y({additionalProperties:{type:"boolean"}},rt(e))}),lc=e=>({properties:{discriminator:{type:"string"},mapping:{values:{metadata:{union:[Hs(!1),Js(!1)]}}}},optionalProperties:rt(e)}),dc=e=>({properties:{values:{ref:"schema"}},optionalProperties:rt(e)}),Gs=e=>({metadata:{union:[ac,oc,ic,cc,uc,Hs,Js,lc,dc].map(t=>t(e))}}),fc=Y({definitions:{schema:Gs(!1)}},Gs(!0));Tn.default=fc;var Dn={},ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.jtdForms=void 0,ur.jtdForms=["elements","values","discriminator","properties","optionalProperties","enum","type","ref"];var In={};Object.defineProperty(In,"__esModule",{value:!0});const An=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,hc={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function qs(e){return An.lastIndex=0,'"'+(An.test(e)?e.replace(An,t=>{const r=hc[t];return typeof r=="string"?r:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}):e)+'"'}In.default=qs,qs.code='require("ajv/dist/runtime/quote").default',Object.defineProperty(Dn,"__esModule",{value:!0});const pc=ur,Bs=Oe,ne=ue,mc=Ct,he=Ae,gc=ae,vc=Rt,yc=Pe,_c=In,$c={elements:wc,values:Sc,discriminator:bc,properties:Ys,optionalProperties:Ys,enum:dr,type:Pc,ref:Nc};function Qs(e,t){const r=Bs.getCompilingSchema.call(this,e);if(r)return r;const{es5:n,lines:s}=this.opts.code,{ownProperties:a}=this.opts,c=new ne.CodeGen(this.scope,{es5:n,lines:s,ownProperties:a}),h=c.scopeName("serialize"),g={self:this,gen:c,schema:e.schema,schemaEnv:e,definitions:t,data:he.default.data};let p;try{this._compilations.add(e),e.serializeName=h,c.func(h,he.default.data,!1,()=>{c.let(he.default.json,(0,ne.str)``),lr(g),c.return(he.default.json)}),c.optimize(this.opts.code.optimize);const u=c.toString();p=`${c.scopeRefs(he.default.scope)}return ${u}`;const b=new Function(`${he.default.scope}`,p)(this.scope.get());this.scope.value(h,{ref:b}),e.serialize=b}catch(u){throw p&&this.logger.error("Error compiling serializer, function code:",p),delete e.serialize,delete e.serializeName,u}finally{this._compilations.delete(e)}return e}Dn.default=Qs;function lr(e){let t;for(const r of pc.jtdForms)if(r in e.schema){t=r;break}Ec(e,t?$c[t]:Oc)}function Ec(e,t){const{gen:r,schema:n,data:s}=e;if(!n.nullable)return t(e);r.if((0,ne._)`${s} === undefined || ${s} === null`,()=>r.add(he.default.json,(0,ne._)`"null"`),()=>t(e))}function wc(e){const{gen:t,schema:r,data:n}=e;t.add(he.default.json,(0,ne.str)`[`);const s=t.let("first",!0);t.forOf("el",n,a=>{Zs(e,s),lr(le(Y({},e),{schema:r.elements,data:a}))}),t.add(he.default.json,(0,ne.str)`]`)}function Sc(e){const{gen:t,schema:r,data:n}=e;t.add(he.default.json,(0,ne.str)`{`);const s=t.let("first",!0);t.forIn("key",n,a=>Ws(e,a,r.values,s)),t.add(he.default.json,(0,ne.str)`}`)}function Ws(e,t,r,n){const{gen:s,data:a}=e;Zs(e,n),dr(le(Y({},e),{data:t})),s.add(he.default.json,(0,ne.str)`:`);const c=s.const("value",(0,ne._)`${a}${(0,ne.getProperty)(t)}`);lr(le(Y({},e),{schema:r,data:c}))}function bc(e){const{gen:t,schema:r,data:n}=e,{discriminator:s}=r;t.add(he.default.json,(0,ne.str)`{${JSON.stringify(s)}:`);const a=t.const("tag",(0,ne._)`${n}${(0,ne.getProperty)(s)}`);dr(le(Y({},e),{data:a})),t.if(!1);for(const c in r.mapping){t.elseIf((0,ne._)`${a} === ${c}`);const h=r.mapping[c];Xs(le(Y({},e),{schema:h}),s)}t.endIf(),t.add(he.default.json,(0,ne.str)`}`)}function Ys(e){const{gen:t}=e;t.add(he.default.json,(0,ne.str)`{`),Xs(e),t.add(he.default.json,(0,ne.str)`}`)}function Xs(e,t){const{gen:r,schema:n,data:s}=e,{properties:a,optionalProperties:c}=n,h=m(a),g=m(c),p=b(h.concat(g));let u=!t;for(const w of h)T(w,a[w],I(w));for(const w of g){const v=I(w);r.if((0,ne.and)((0,ne._)`${v} !== undefined`,(0,gc.isOwnProperty)(r,s,w)),()=>T(w,c[w],v))}n.additionalProperties&&r.forIn("key",s,w=>r.if(A(w,p),()=>Ws(e,w,{},r.let("first",u))));function m(w){return w?Object.keys(w):[]}function b(w){if(t&&w.push(t),new Set(w).size!==w.length)throw new Error("JTD: properties/optionalProperties/disciminator overlap");return w}function I(w){return r.const("value",(0,ne._)`${s}${(0,ne.getProperty)(w)}`)}function T(w,v,C){u?u=!1:r.add(he.default.json,(0,ne.str)`,`),r.add(he.default.json,(0,ne.str)`${JSON.stringify(w)}:`),lr(le(Y({},e),{schema:v,data:C}))}function A(w,v){return v.length?(0,ne.and)(...v.map(C=>(0,ne._)`${w} !== ${C}`)):!0}}function Pc(e){const{gen:t,schema:r,data:n}=e;switch(r.type){case"boolean":t.add(he.default.json,(0,ne._)`${n} ? "true" : "false"`);break;case"string":dr(e);break;case"timestamp":t.if((0,ne._)`${n} instanceof Date`,()=>t.add(he.default.json,(0,ne._)`'"' + ${n}.toISOString() + '"'`),()=>dr(e));break;default:Cc(e)}}function dr({gen:e,data:t}){e.add(he.default.json,(0,ne._)`${(0,yc.useFunc)(e,_c.default)}(${t})`)}function Cc({gen:e,data:t}){e.add(he.default.json,(0,ne._)`"" + ${t}`)}function Nc(e){const{gen:t,self:r,data:n,definitions:s,schema:a,schemaEnv:c}=e,{ref:h}=a,g=s[h];if(!g)throw new mc.default(r.opts.uriResolver,"",h,`No definition ${h}`);if(!(0,vc.hasRef)(g))return lr(le(Y({},e),{schema:g}));const{root:p}=c,u=Qs.call(r,new Bs.SchemaEnv({schema:g,root:p}),s);t.add(he.default.json,(0,ne._)`${Rc(t,u)}(${n})`)}function Rc(e,t){return t.serialize?e.scopeValue("serialize",{ref:t.serialize}):(0,ne._)`${e.scopeValue("wrapper",{ref:t})}.serialize`}function Oc({gen:e,data:t}){e.add(he.default.json,(0,ne._)`JSON.stringify(${t})`)}function Zs({gen:e},t){e.if(t,()=>e.assign(t,!1),()=>e.add(he.default.json,(0,ne.str)`,`))}var kn={},pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.parseJsonString=pt.parseJsonNumber=pt.parseJson=void 0;const jc=/position\s(\d+)$/;function nt(e,t){let r;nt.message=void 0;let n;t&&(e=e.slice(t));try{return nt.position=t+e.length,JSON.parse(e)}catch(s){if(n=jc.exec(s.message),!n){nt.message="unexpected end";return}r=+n[1];const a=e[r];e=e.slice(0,r),nt.position=t+r;try{return JSON.parse(e)}catch{nt.message=`unexpected token ${a}`;return}}}pt.parseJson=nt,nt.message=void 0,nt.position=0,nt.code='require("ajv/dist/runtime/parseJson").parseJson';function st(e,t,r){let n="",s;if(st.message=void 0,e[t]==="-"&&(n+="-",t++),e[t]==="0")n+="0",t++;else if(!a(r)){c();return}if(r)return st.position=t,+n;if(e[t]==="."&&(n+=".",t++,!a())){c();return}if(s=e[t],(s==="e"||s==="E")&&(n+="e",t++,s=e[t],(s==="+"||s==="-")&&(n+=s,t++),!a())){c();return}return st.position=t,+n;function a(h){let g=!1;for(;s=e[t],s>="0"&&s<="9"&&(h===void 0||h-- >0);)g=!0,n+=s,t++;return g}function c(){st.position=t,st.message=t<e.length?`unexpected token ${e[t]}`:"unexpected end"}}pt.parseJsonNumber=st,st.message=void 0,st.position=0,st.code='require("ajv/dist/runtime/parseJson").parseJsonNumber';const xs={b:"\b",f:"\f",n:`
6
- `,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Tc="a".charCodeAt(0),Dc="0".charCodeAt(0);function mt(e,t){let r="",n;for(mt.message=void 0;n=e[t++],n!=='"';)if(n==="\\")if(n=e[t],n in xs)r+=xs[n],t++;else if(n==="u"){t++;let a=4,c=0;for(;a--;){if(c<<=4,n=e[t],n===void 0){s("unexpected end");return}if(n=n.toLowerCase(),n>="a"&&n<="f")c+=n.charCodeAt(0)-Tc+10;else if(n>="0"&&n<="9")c+=n.charCodeAt(0)-Dc;else{s(`unexpected token ${n}`);return}t++}r+=String.fromCharCode(c)}else{s(`unexpected token ${n}`);return}else if(n===void 0){s("unexpected end");return}else if(n.charCodeAt(0)>=32)r+=n;else{s(`unexpected token ${n}`);return}return mt.position=t,r;function s(a){mt.position=t,mt.message=a}}pt.parseJsonString=mt,mt.message=void 0,mt.position=0,mt.code='require("ajv/dist/runtime/parseJson").parseJsonString',Object.defineProperty(kn,"__esModule",{value:!0});const Ic=ur,ea=Oe,V=ue,Ac=Ct,X=Ae,kc=ae,Fc=Rt,Mc=Sn,Fn=pt,ta=Pe,Uc=Gr,Vc={elements:Hc,values:Jc,discriminator:qc,properties:sa,optionalProperties:sa,enum:Qc,type:Bc,ref:Wc};function ra(e,t){const r=ea.getCompilingSchema.call(this,e);if(r)return r;const{es5:n,lines:s}=this.opts.code,{ownProperties:a}=this.opts,c=new V.CodeGen(this.scope,{es5:n,lines:s,ownProperties:a}),h=c.scopeName("parse"),g={self:this,gen:c,schema:e.schema,schemaEnv:e,definitions:t,data:X.default.data,parseName:h,char:c.name("c")};let p;try{this._compilations.add(e),e.parseName=h,zc(g),c.optimize(this.opts.code.optimize);const u=c.toString();p=`${c.scopeRefs(X.default.scope)}return ${u}`;const b=new Function(`${X.default.scope}`,p)(this.scope.get());this.scope.value(h,{ref:b}),e.parse=b}catch(u){throw p&&this.logger.error("Error compiling parser, function code:",p),delete e.parse,delete e.parseName,u}finally{this._compilations.delete(e)}return e}kn.default=ra;const Mn=(0,V._)`undefined`;function zc(e){const{gen:t,parseName:r,char:n}=e;t.func(r,(0,V._)`${X.default.json}, ${X.default.jsonPos}, ${X.default.jsonPart}`,!1,()=>{t.let(X.default.data),t.let(n),t.assign((0,V._)`${r}.message`,Mn),t.assign((0,V._)`${r}.position`,Mn),t.assign(X.default.jsonPos,(0,V._)`${X.default.jsonPos} || 0`),t.const(X.default.jsonLen,(0,V._)`${X.default.json}.length`),Qr(e),Kn(e),t.if(X.default.jsonPart,()=>{t.assign((0,V._)`${r}.position`,X.default.jsonPos),t.return(X.default.data)}),t.if((0,V._)`${X.default.jsonPos} === ${X.default.jsonLen}`,()=>t.return(X.default.data)),Gt(e)})}function Qr(e){let t;for(const r of Ic.jtdForms)if(r in e.schema){t=r;break}t?Kc(e,Vc[t]):zn(e)}const Lc=ca(!0,ca(!1,Gt));function Kc(e,t){const{gen:r,schema:n,data:s}=e;if(!n.nullable)return t(e);fr(e,"null",t,()=>r.assign(s,null))}function Hc(e){const{gen:t,schema:r,data:n}=e;Be(e,"[");const s=t.let("i",0);t.assign(n,(0,V._)`[]`),Un(e,"]",()=>{const a=t.let("el");Qr(le(Y({},e),{schema:r.elements,data:a})),t.assign((0,V._)`${n}[${s}++]`,a)})}function Jc(e){const{gen:t,schema:r,data:n}=e;Be(e,"{"),t.assign(n,(0,V._)`{}`),Un(e,"}",()=>Gc(e,r.values))}function Un(e,t,r){na(e,t,r),Be(e,t)}function na(e,t,r){const{gen:n}=e;n.for((0,V._)`;${X.default.jsonPos}<${X.default.jsonLen} && ${Wr(1)}!==${t};`,()=>{r(),fr(e,",",()=>n.break(),s)});function s(){fr(e,t,()=>{},Gt)}}function Gc(e,t){const{gen:r}=e,n=r.let("key");Tt(le(Y({},e),{data:n})),Be(e,":"),ia(e,n,t)}function qc(e){const{gen:t,data:r,schema:n}=e,{discriminator:s,mapping:a}=n;Be(e,"{"),t.assign(r,(0,V._)`{}`);const c=t.const("pos",X.default.jsonPos),h=t.let("value"),g=t.let("tag");na(e,"}",()=>{const p=t.let("key");Tt(le(Y({},e),{data:p})),Be(e,":"),t.if((0,V._)`${p} === ${s}`,()=>{Tt(le(Y({},e),{data:g})),t.assign((0,V._)`${r}[${p}]`,g),t.break()},()=>zn(le(Y({},e),{data:h})))}),t.assign(X.default.jsonPos,c),t.if((0,V._)`${g} === undefined`),at(e,(0,V.str)`discriminator tag not found`);for(const p in a)t.elseIf((0,V._)`${g} === ${p}`),aa(le(Y({},e),{schema:a[p]}),s);t.else(),at(e,(0,V.str)`discriminator value not in schema`),t.endIf()}function sa(e){const{gen:t,data:r}=e;Be(e,"{"),t.assign(r,(0,V._)`{}`),aa(e)}function aa(e,t){const{gen:r,schema:n,data:s}=e,{properties:a,optionalProperties:c,additionalProperties:h}=n;if(Un(e,"}",()=>{const g=r.let("key");if(Tt(le(Y({},e),{data:g})),Be(e,":"),r.if(!1),oa(e,g,a),oa(e,g,c),t){r.elseIf((0,V._)`${g} === ${t}`);const p=r.let("tag");Tt(le(Y({},e),{data:p}))}r.else(),h?zn(le(Y({},e),{data:(0,V._)`${s}[${g}]`})):at(e,(0,V.str)`property ${g} not allowed`),r.endIf()}),a){const g=(0,kc.hasPropFunc)(r),p=(0,V.and)(...Object.keys(a).map(u=>(0,V._)`${g}.call(${s}, ${u})`));r.if((0,V.not)(p),()=>at(e,(0,V.str)`missing required properties`))}}function oa(e,t,r={}){const{gen:n}=e;for(const s in r)n.elseIf((0,V._)`${t} === ${s}`),ia(e,t,r[s])}function ia(e,t,r){Qr(le(Y({},e),{schema:r,data:(0,V._)`${e.data}[${t}]`}))}function Bc(e){const{gen:t,schema:r,data:n,self:s}=e;switch(r.type){case"boolean":Lc(e);break;case"string":Tt(e);break;case"timestamp":{Tt(e);const a=(0,ta.useFunc)(t,Uc.default),{allowDate:c,parseDate:h}=s.opts,g=c?(0,V._)`!${a}(${n}, true)`:(0,V._)`!${a}(${n})`,p=h?(0,V.or)(g,(0,V._)`(${n} = new Date(${n}), false)`,(0,V._)`isNaN(${n}.valueOf())`):g;t.if(p,()=>at(e,(0,V.str)`invalid timestamp`));break}case"float32":case"float64":Vn(e);break;default:{const a=r.type;if(!s.opts.int32range&&(a==="int32"||a==="uint32"))Vn(e,16),a==="uint32"&&t.if((0,V._)`${n} < 0`,()=>at(e,(0,V.str)`integer out of range`));else{const[c,h,g]=Mc.intRange[a];Vn(e,g),t.if((0,V._)`${n} < ${c} || ${n} > ${h}`,()=>at(e,(0,V.str)`integer out of range`))}}}}function Tt(e){Be(e,'"'),Ln(e,Fn.parseJsonString)}function Qc(e){const{gen:t,data:r,schema:n}=e,s=n.enum;Be(e,'"'),t.if(!1);for(const a of s){const c=JSON.stringify(a).slice(1);t.elseIf((0,V._)`${Wr(c.length)} === ${c}`),t.assign(r,(0,V.str)`${a}`),t.add(X.default.jsonPos,c.length)}t.else(),Gt(e),t.endIf()}function Vn(e,t){const{gen:r}=e;Kn(e),r.if((0,V._)`"-0123456789".indexOf(${Wr(1)}) < 0`,()=>Gt(e),()=>Ln(e,Fn.parseJsonNumber,t))}function ca(e,t){return r=>{const{gen:n,data:s}=r;fr(r,`${e}`,()=>t(r),()=>n.assign(s,e))}}function Wc(e){const{gen:t,self:r,definitions:n,schema:s,schemaEnv:a}=e,{ref:c}=s,h=n[c];if(!h)throw new Ac.default(r.opts.uriResolver,"",c,`No definition ${c}`);if(!(0,Fc.hasRef)(h))return Qr(le(Y({},e),{schema:h}));const{root:g}=a,p=ra.call(r,new ea.SchemaEnv({schema:h,root:g}),n);ua(e,Yc(t,p),!0)}function Yc(e,t){return t.parse?e.scopeValue("parse",{ref:t.parse}):(0,V._)`${e.scopeValue("wrapper",{ref:t})}.parse`}function zn(e){Ln(e,Fn.parseJson)}function Ln(e,t,r){ua(e,(0,ta.useFunc)(e.gen,t),r)}function ua(e,t,r){const{gen:n,data:s}=e;n.assign(s,(0,V._)`${t}(${X.default.json}, ${X.default.jsonPos}${r?(0,V._)`, ${r}`:V.nil})`),n.assign(X.default.jsonPos,(0,V._)`${t}.position`),n.if((0,V._)`${s} === undefined`,()=>at(e,(0,V._)`${t}.message`))}function Be(e,t){fr(e,t,Gt)}function fr(e,t,r,n){const{gen:s}=e,a=t.length;Kn(e),s.if((0,V._)`${Wr(a)} === ${t}`,()=>{s.add(X.default.jsonPos,a),n==null||n(e)},()=>r(e))}function Kn({gen:e,char:t}){e.code((0,V._)`while((${t}=${X.default.json}[${X.default.jsonPos}],${t}===" "||${t}==="\\n"||${t}==="\\r"||${t}==="\\t"))${X.default.jsonPos}++;`)}function Wr(e){return e===1?(0,V._)`${X.default.json}[${X.default.jsonPos}]`:(0,V._)`${X.default.json}.slice(${X.default.jsonPos}, ${X.default.jsonPos}+${e})`}function Gt(e){at(e,(0,V._)`"unexpected token " + ${X.default.json}[${X.default.jsonPos}]`)}function at({gen:e,parseName:t},r){e.assign((0,V._)`${t}.message`,r),e.assign((0,V._)`${t}.position`,X.default.jsonPos),e.return(Mn)}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=Bn,n=En,s=Tn,a=Dn,c=kn,h="JTD-meta-schema";class g extends r.default{constructor(b={}){super(le(Y({},b),{jtd:!0}))}_addVocabularies(){super._addVocabularies(),this.addVocabulary(n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema(),this.opts.meta&&this.addMetaSchema(s.default,h,!1)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(h)?h:void 0)}compileSerializer(b){const I=this._addSchema(b);return I.serialize||this._compileSerializer(I)}compileParser(b){const I=this._addSchema(b);return I.parse||this._compileParser(I)}_compileSerializer(b){if(a.default.call(this,b,b.schema.definitions||{}),!b.serialize)throw new Error("ajv implementation error");return b.serialize}_compileParser(b){if(c.default.call(this,b,b.schema.definitions||{}),!b.parse)throw new Error("ajv implementation error");return b.parse}}e.exports=t=g,Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var p=He;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=ue;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})})(on,on.exports);var Xc=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(St,"__esModule",{value:!0}),St.Validate=St.AddSchema=void 0;const Zc=Xc(on.exports),la=new Zc.default,xc=(e,t)=>e(t)?null:e.errors;function eu(e,t){la.addSchema(t,e)}St.AddSchema=eu;function tu(e,t){const r=la.getSchema(e);if(r)return xc(r,t)}St.Validate=tu,Object.defineProperty(kr,"__esModule",{value:!0}),kr.STSOptionsBase=void 0;const ru=St;class nu{constructor(t=null){nr(this,"_options");this._options=t,t!==null&&(typeof t.validator=="undefined"||(0,ru.Validate)(t.validator,t))}get options(){return this._options}}kr.STSOptionsBase=nu;var qt={};Object.defineProperty(qt,"__esModule",{value:!0}),qt.JestSleep=qt.Sleep=void 0;async function da(e=1e3){return new Promise(t=>setTimeout(t,e))}qt.Sleep=da;async function su(){return da(100)}qt.JestSleep=su;var fa={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compareParameterTypes=e.OAuth2ParameterErrorType=e.OIDCAddressClaim=e.OIDCStandardClaim=e.OAuth2ParameterType=void 0,function(n){n.AUDIENCE="AUDIENCE",n.CLIENT_ID="client_id",n.CLIENT_SECRET="client_secret",n.RESPONSE_TYPE="response_type",n.SCOPE="scope",n.STATE="state",n.REDIRECT_URI="redirect_uri",n.ERROR="error",n.ERROR_DESCRIPTION="error_description",n.ERROR_CODES="error_codes",n.ERROR_URI="error_uri",n.GRANT_TYPE="grant_type",n.CODE="code",n.ACCESS_TOKEN="access_token",n.TOKEN_TYPE="token_type",n.EXPIRES_IN="expires_in",n.USERNAME="username",n.PASSWORD="password",n.REFRESH_TOKEN="refresh_token",n.RESPONSE_MODE="response_mode",n.TIMESTAMP="timestamp",n.TRACE_ID="trace_id",n.CORRELATION_ID="correlation_id"}(e.OAuth2ParameterType||(e.OAuth2ParameterType={})),function(n){n.SUB="sub",n.NAME="name",n.GIVEN_NAME="given_name",n.FAMILY_NAME="family_name",n.MIDDLE_NAME="middle_name",n.NICKNAME="nickname",n.PREFERRED_USERNAME="preferred_username",n.PROFILE="profile",n.PICTURE="picture",n.WEBSITE="website",n.EMAIL="email",n.EMAIL_VERIFIED="email_verified",n.GENDER="gender",n.BIRTHDATE="birthdate",n.ZONEINFO="zoneinfo",n.LOCALE="locale",n.PHONE_NUMBER="phone_number",n.PHONE_NUMBER_VERIFIED="phone_number_verified",n.ADDRESS="address",n.CLIENT_SECRET="client_secret",n.NONCE="nonce"}(e.OIDCStandardClaim||(e.OIDCStandardClaim={})),function(n){n.FORMATTED="formatted",n.STREET_ADDRESS="street_address",n.LOCALITY="locality",n.REGION="region",n.COUNTRY="country"}(e.OIDCAddressClaim||(e.OIDCAddressClaim={}));class t{}nr(t,"NOT_EQUAL",{code:"STS_OAUTH2_ERR_0001",description:"Parameter values not equal."}),nr(t,"NOT_PRESENT",{code:"STS_OAUTH2_ERR_0002",description:"Parameter not provided."}),nr(t,"INVALID_FORMAT",{code:"STS_OAUTH2_ERR_0003",description:"Parameter value format invalid."}),nr(t,"EXPIRED",{code:"STS_OAUTH2_ERR_0004",description:"Parameter value expired."}),e.OAuth2ParameterErrorType=t;function r(n,s,a){const c=[];for(let h=0;h<a.length;h++){const g=a[h];if(n[h].localeCompare(s[h])!==0){const p={error:t.NOT_EQUAL.code,error_description:t.NOT_EQUAL.description,timestamp:Date.now(),details:`${t.NOT_EQUAL.description}: Parameter: [${g}]`};c.push(p)}}return c}e.compareParameterTypes=r})(fa),function(e){var t=J&&J.__createBinding||(Object.create?function(s,a,c,h){h===void 0&&(h=c);var g=Object.getOwnPropertyDescriptor(a,c);(!g||("get"in g?!a.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(s,h,g)}:function(s,a,c,h){h===void 0&&(h=c),s[h]=a[c]}),r=J&&J.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&t(a,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.$stsgdf=e.$stsgd=void 0,r(Ar,e),r(kr,e),r(qt,e),r(St,e),r(fa,e),e.$stsgd={};function n(){return e.$stsgd}e.$stsgdf=n}(Ir);class au{constructor(){this.DigestMessage=async function(t){const n=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",n),a=Array.from(new Uint8Array(s));return btoa(String.fromCharCode(...a))},this.CreateRandomString=(t=43)=>{const r=Array.from(crypto.getRandomValues(new Uint8Array(t)));return btoa(String.fromCharCode(...r))},this.CreateRandomStringEx=()=>{const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let r="";return Array.from(crypto.getRandomValues(new Uint8Array(43))).forEach(s=>r+=t[s%t.length]),r}}}class ou{constructor(){this.DecodeQueryParams=t=>{const r={};return Object.keys(t).filter(n=>typeof t[n]!="undefined").map(n=>{r[decodeURIComponent(n)]=decodeURIComponent(t[n])}),r},this.CreateQueryParams=t=>Object.keys(t).filter(r=>typeof t[r]!="undefined").map(r=>Array.isArray(t[r])?encodeURIComponent(r)+"="+encodeURIComponent(t[r].join(" ")):encodeURIComponent(r)+"="+encodeURIComponent(t[r])).join("&"),this._GetQueryParams=t=>{let r={};const n=t.split("?");if(n.length==2){const s=n[1].split("&"),a={};let c="";s.forEach(function(h){c=h.split("="),c.length==2&&(a[c[0]]=c[1])}),r=this.DecodeQueryParams(a)}return r},this.GetQueryParams=()=>this._GetQueryParams(window.location.href)}}var ha=(e=>(e.CODE="code",e.ID_TOKEN="id_token",e.TOKEN="token",e))(ha||{}),pa=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e))(pa||{}),ma=(e=>(e.CLIENT_CREDENTIALS="client_credentials",e.AUTHORIZATION_CODE="authorization_code",e.REFRESH_TOKEN="refresh_token",e))(ma||{}),ot=(e=>(e.RESTORE_SESSION="RestoreSession",e.AUTHORIZE="Authorize",e.HANDLE_REDIRECT="HandleRedirect",e.LOGOUT="Logout",e.AUTHENTICATE_EVENT="AuthenticateEvent",e.ERROR="Error",e))(ot||{}),hr=J&&J.__assign||function(){return hr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},hr.apply(this,arguments)};function pr(e,t){if(!t)return"";var r="; "+e;return t===!0?r:r+"="+t}function iu(e){if(typeof e.expires=="number"){var t=new Date;t.setMilliseconds(t.getMilliseconds()+e.expires*864e5),e.expires=t}return pr("Expires",e.expires?e.expires.toUTCString():"")+pr("Domain",e.domain)+pr("Path",e.path)+pr("Secure",e.secure)+pr("SameSite",e.sameSite)}function cu(e,t,r){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+iu(r)}function uu(e){for(var t={},r=e?e.split("; "):[],n=/(%[\dA-F]{2})+/gi,s=0;s<r.length;s++){var a=r[s].split("="),c=a.slice(1).join("=");c.charAt(0)==='"'&&(c=c.slice(1,-1));try{var h=a[0].replace(n,decodeURIComponent);t[h]=c.replace(n,decodeURIComponent)}catch{}}return t}function lu(){return uu(document.cookie)}function du(e){return lu()[e]}var fu=du;function ga(e,t,r){document.cookie=cu(e,t,hr({path:"/"},r))}var hu=ga;function pu(e,t){ga(e,"",hr(hr({},t),{expires:-1}))}var mu=pu;const Yr=qn(`proc:${process.pid}:storage.ts`);var va=(e=>(e.LOCAL_STORAGE="LocalStorage",e.SESSION_STORAGE="SessionStorage",e.COOKIE_STORAGE="CookieStorage",e.MEMORY_STORAGE="MemoryStorage",e))(va||{});class gu{constructor(){this.get=t=>{const r=fu(t);return r?JSON.parse(r):null},this.set=(t,r,n={})=>{let s={};window.location.protocol==="https:"&&(s={secure:!0,sameSite:"none"}),n&&n.daysUntilExpire?s.expires=n.daysUntilExpire:s.expires=1,Yr(`CookieStorage.set: key: ${t}, value: [${r}]`),hu(t,JSON.stringify(r),s)},this.remove=t=>{mu(t)}}}class vu{constructor(){this.get=t=>{const r=sessionStorage.getItem(t);return typeof r=="undefined"||r===null?null:JSON.parse(r)},this.set=(t,r)=>{Yr(`SessionStorage.set: key: ${t}, value: [${r}]`),sessionStorage.setItem(t,JSON.stringify(r))},this.remove=t=>{sessionStorage.removeItem(t)}}}class yu{constructor(){this.get=t=>{const r=localStorage.getItem(t);return typeof r=="undefined"||r===null?null:JSON.parse(r)},this.set=(t,r)=>{Yr(`LocalStorage.set: key: ${t}, value: [${r}]`),localStorage.setItem(t,JSON.stringify(r))},this.remove=t=>{localStorage.removeItem(t)}}}class _u{constructor(){ge(this,Dt,void 0);re(this,Dt,{}),this.get=t=>{const r=Q(this,Dt)[t];return typeof r=="undefined"||r===null?null:r},this.set=(t,r)=>{Yr(`MemoryStorage.set: key: ${t}, value: [${r}]`),Q(this,Dt)[t]=r},this.remove=t=>{delete Q(this,Dt)[t]}}}Dt=new WeakMap;class $u{constructor(t){ge(this,gt,null);switch(t.clientStorageType){case"SessionStorage":re(this,gt,new vu);break;case"LocalStorage":re(this,gt,new yu);break;case"CookieStorage":re(this,gt,new gu);break;case"MemoryStorage":re(this,gt,new _u);break;default:throw new Error(`Unknown [${t.clientStorageType}] storage type.`)}}GetStorage(){return Q(this,gt)}}gt=new WeakMap;function Hn(e){this.message=e}Hn.prototype=new Error,Hn.prototype.name="InvalidCharacterError";var ya=typeof window!="undefined"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Hn("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,s=0,a=0,c="";n=t.charAt(a++);~n&&(r=s%4?64*r+n:n,s++%4)?c+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return c};function Eu(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(ya(r).replace(/(.)/g,function(n,s){var a=s.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a="0"+a),"%"+a}))}(t)}catch{return ya(t)}}function Xr(e){this.message=e}function wu(e,t){if(typeof e!="string")throw new Xr("Invalid token specified");var r=(t=t||{}).header===!0?0:1;try{return JSON.parse(Eu(e.split(".")[r]))}catch(n){throw new Xr("Invalid token specified: "+n.message)}}Xr.prototype=new Error,Xr.prototype.name="InvalidTokenError";const Su=qn(`proc:${process.pid}:stsoauth2manager.ts`);class _a{constructor(t,r){ge(this,mr,void 0);ge(this,It,void 0);ge(this,vt,void 0);ge(this,Zr,void 0);ge(this,xr,void 0);ge(this,At,void 0);ge(this,en,void 0);ge(this,gr,void 0);ge(this,kt,void 0);ge(this,tn,void 0);ge(this,Bt,void 0);ge(this,vr,void 0);ge(this,yt,void 0);ge(this,Qt,void 0);ge(this,_t,void 0);ge(this,$t,void 0);ge(this,yr,void 0);ge(this,it,void 0);ge(this,_r,void 0);ge(this,$r,void 0);ge(this,Er,void 0);ge(this,wr,void 0);re(this,mr,null),re(this,It,null),re(this,vt,null),re(this,Zr,new au),re(this,xr,new ou),re(this,At,"authorize_options.stsmda.com.au"),re(this,en,"session.stsmda.com.au"),re(this,gr,null),re(this,kt,null),re(this,tn,{}),re(this,vr,0),re(this,yt,{}),re(this,Qt,1e3),re(this,_t,null),re(this,$t,null),re(this,yr,a=>{const c=a.data;if(c.messageId===-1)switch(c.command){case ot.AUTHENTICATE_EVENT:Q(this,$r).call(this,c.payload);break;case ot.ERROR:Q(this,_r).call(this,c.payload);break;default:throw new Error(`ProcessMessageResponse command [${c.command}] not valid.`)}else{const h=Q(this,yt)[c.messageId];if(h)h(c);else throw new Error(`Message: [${c.messageId}] does not exists in callBacks.`)}}),re(this,it,a=>(a.messageId=Aa(this,vr)._++,new Promise((c,h)=>{const g=setTimeout(()=>{delete Q(this,yt)[a.messageId],h(`Message: [${a.messageId}] timeout error after: [${Q(this,Qt)}] ms.`)},Q(this,Qt));Q(this,yt)[a.messageId]=p=>{clearTimeout(g),delete Q(this,yt)[a.messageId],c(p)},Q(this,Bt).postMessage(a)}))),re(this,_r,a=>{Q(this,vt).commit("AuthorizeError",{message:a}),setTimeout(()=>{Q(this,It).replace("/error")},0)}),re(this,$r,a=>{Q(this,kt).authenticateEvent&&Q(this,kt).authenticateEvent(a),Q(this,vt).commit("stsOAuth2SDK/SessionData",a)}),re(this,Er,(a,c)=>{c.beforeEach(async(h,g)=>{const p=a.config.globalProperties.$store,u=a.config.globalProperties.$sts;if(Su(`beforeEach: from: [${g.path}], to: [${h.path}]`),p.getters["stsOAuth2SDK/LoggedIn"]===!1){if(console.log("Not logged in"),h.path.localeCompare("/authorize")===0)return console.log("to = /authorize"),!0;if(h.path.localeCompare("/consent")===0&&typeof p.getters.Session.sessionId!="undefined"||h.path.localeCompare("/logout")===0||h.path.localeCompare("/error")===0||h.path.localeCompare("/logout")===0)return!0;const m=h.query;if(m[Ir.OAuth2ParameterType.CODE]||m[Ir.OAuth2ParameterType.ERROR])return console.log(`#SetupRout:str = [${m}]`),await u.om.HandleRedirect(m)?(setTimeout(()=>{window.history.replaceState({},document.title,window.location.origin+"/")},0),!0):(Q(this,It).replace("/error"),!1);const b=await u.om.RestoreSession();return console.log(`#SetupRoute:sessionRestored [${b}]`),b!==!0?(console.log("Session not restored - Need to Authorize"),u.om.Authorize(),!1):"/"}else return h.path.localeCompare("/consent")===0?"/":h.path.localeCompare("/authorize")===0?(c.replace({path:"/"}),!1):h.path.localeCompare("/logout")===0?(c.replace({path:"/"}),!1):!0})}),re(this,wr,()=>{Q(this,vt).registerModule("stsOAuth2SDK",{namespaced:!0,state(){return{sessionData:{}}},getters:{SessionData(a){return a.sessionData},LoggedIn(a){return!(typeof a.sessionData=="undefined"||a.sessionData===null)},UserDetails(a){if(a.sessionData){const c=a.sessionData;return wu(c)}else return null}},mutations:{SessionData(a,c){a.sessionData=c,console.log(`commit [sessionData]: ${JSON.stringify(c)}`)}}},{preserveState:!0})}),this.RestoreSession=async()=>{try{return(await Q(this,it).call(this,{command:ot.RESTORE_SESSION})).payload}catch(a){return console.log(`RestoreSession Error: ${a}`),!1}},this.Authorize=async()=>{try{const a=await Q(this,it).call(this,{command:ot.AUTHORIZE});Q(this,$t).set(Q(this,At),a.payload.authorizeOptions);const c=a.payload.url;window.location.replace(c)}catch(a){console.log(`Authorize Error: ${a}`)}},this.HandleRedirect=async a=>{try{let c=null;if(a[Ir.OAuth2ParameterType.CODE]){const h=Q(this,$t).get(Q(this,At));Q(this,$t).remove(Q(this,At)),c=await Q(this,it).call(this,{command:ot.HANDLE_REDIRECT,payload:{queryVars:a,authorizeOptions:h}})}else c=await Q(this,it).call(this,{command:ot.HANDLE_REDIRECT,payload:a});return c.payload}catch(c){return console.log(`HandleRedirect Error: ${c}`),!1}},this.Logout=async()=>{try{return(await Q(this,it).call(this,{command:ot.LOGOUT})).payload}catch(a){return console.log(`Logout Error: ${a}`),!1}},re(this,kt,r),re(this,mr,t.config.globalProperties.$sts.storage),re(this,vt,t.config.globalProperties.$store),re(this,gr,t.config.globalProperties.$sts.aic.PrimaryPublishInstrumentController),re(this,It,t.config.globalProperties.$router),re(this,$t,new $u({clientStorageType:va.SESSION_STORAGE}).GetStorage()),re(this,_t,new Worker("/assets/stsoauth2worker.56b3b966.js",{type:"module"})),Q(this,_t).onmessage=a=>{console.log(`this.#worker.onmessage = [${a}]`)},Q(this,_t).onerror=function(a){console.log(`this.#worker.onerror = [${a}]`)};const{port1:n,port2:s}=new MessageChannel;re(this,Bt,n),Q(this,_t).postMessage(s,[s]),Q(this,Bt).onmessage=a=>{Q(this,yr).call(this,a)},Q(this,wr).call(this),Q(this,Er).call(this,t,r.router)}}mr=new WeakMap,It=new WeakMap,vt=new WeakMap,Zr=new WeakMap,xr=new WeakMap,At=new WeakMap,en=new WeakMap,gr=new WeakMap,kt=new WeakMap,tn=new WeakMap,Bt=new WeakMap,vr=new WeakMap,yt=new WeakMap,Qt=new WeakMap,_t=new WeakMap,$t=new WeakMap,yr=new WeakMap,it=new WeakMap,_r=new WeakMap,$r=new WeakMap,Er=new WeakMap,wr=new WeakMap;const bu={install:(e,t)=>{const r=new _a(e,t);e.config.globalProperties.$sts.om=r}};B.AuthorizeOptionsResponseMode=pa,B.AuthorizeOptionsResponseType=ha,B.IOauth2ListenerCommand=ot,B.OAuthGrantTypes=ma,B.STSOAuth2Manager=_a,B.STSOAuth2ManagerPlugin=bu,Object.defineProperties(B,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
6
+ `,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Tc="a".charCodeAt(0),Dc="0".charCodeAt(0);function mt(e,t){let r="",n;for(mt.message=void 0;n=e[t++],n!=='"';)if(n==="\\")if(n=e[t],n in xs)r+=xs[n],t++;else if(n==="u"){t++;let a=4,c=0;for(;a--;){if(c<<=4,n=e[t],n===void 0){s("unexpected end");return}if(n=n.toLowerCase(),n>="a"&&n<="f")c+=n.charCodeAt(0)-Tc+10;else if(n>="0"&&n<="9")c+=n.charCodeAt(0)-Dc;else{s(`unexpected token ${n}`);return}t++}r+=String.fromCharCode(c)}else{s(`unexpected token ${n}`);return}else if(n===void 0){s("unexpected end");return}else if(n.charCodeAt(0)>=32)r+=n;else{s(`unexpected token ${n}`);return}return mt.position=t,r;function s(a){mt.position=t,mt.message=a}}pt.parseJsonString=mt,mt.message=void 0,mt.position=0,mt.code='require("ajv/dist/runtime/parseJson").parseJsonString',Object.defineProperty(kn,"__esModule",{value:!0});const Ic=ur,ea=Oe,V=ue,Ac=Ct,X=Ae,kc=ae,Fc=Rt,Mc=Sn,Fn=pt,ta=Pe,Uc=Gr,Vc={elements:Hc,values:Jc,discriminator:qc,properties:sa,optionalProperties:sa,enum:Qc,type:Bc,ref:Wc};function ra(e,t){const r=ea.getCompilingSchema.call(this,e);if(r)return r;const{es5:n,lines:s}=this.opts.code,{ownProperties:a}=this.opts,c=new V.CodeGen(this.scope,{es5:n,lines:s,ownProperties:a}),h=c.scopeName("parse"),g={self:this,gen:c,schema:e.schema,schemaEnv:e,definitions:t,data:X.default.data,parseName:h,char:c.name("c")};let p;try{this._compilations.add(e),e.parseName=h,zc(g),c.optimize(this.opts.code.optimize);const u=c.toString();p=`${c.scopeRefs(X.default.scope)}return ${u}`;const b=new Function(`${X.default.scope}`,p)(this.scope.get());this.scope.value(h,{ref:b}),e.parse=b}catch(u){throw p&&this.logger.error("Error compiling parser, function code:",p),delete e.parse,delete e.parseName,u}finally{this._compilations.delete(e)}return e}kn.default=ra;const Mn=(0,V._)`undefined`;function zc(e){const{gen:t,parseName:r,char:n}=e;t.func(r,(0,V._)`${X.default.json}, ${X.default.jsonPos}, ${X.default.jsonPart}`,!1,()=>{t.let(X.default.data),t.let(n),t.assign((0,V._)`${r}.message`,Mn),t.assign((0,V._)`${r}.position`,Mn),t.assign(X.default.jsonPos,(0,V._)`${X.default.jsonPos} || 0`),t.const(X.default.jsonLen,(0,V._)`${X.default.json}.length`),Qr(e),Kn(e),t.if(X.default.jsonPart,()=>{t.assign((0,V._)`${r}.position`,X.default.jsonPos),t.return(X.default.data)}),t.if((0,V._)`${X.default.jsonPos} === ${X.default.jsonLen}`,()=>t.return(X.default.data)),Gt(e)})}function Qr(e){let t;for(const r of Ic.jtdForms)if(r in e.schema){t=r;break}t?Kc(e,Vc[t]):zn(e)}const Lc=ca(!0,ca(!1,Gt));function Kc(e,t){const{gen:r,schema:n,data:s}=e;if(!n.nullable)return t(e);fr(e,"null",t,()=>r.assign(s,null))}function Hc(e){const{gen:t,schema:r,data:n}=e;Be(e,"[");const s=t.let("i",0);t.assign(n,(0,V._)`[]`),Un(e,"]",()=>{const a=t.let("el");Qr(le(Y({},e),{schema:r.elements,data:a})),t.assign((0,V._)`${n}[${s}++]`,a)})}function Jc(e){const{gen:t,schema:r,data:n}=e;Be(e,"{"),t.assign(n,(0,V._)`{}`),Un(e,"}",()=>Gc(e,r.values))}function Un(e,t,r){na(e,t,r),Be(e,t)}function na(e,t,r){const{gen:n}=e;n.for((0,V._)`;${X.default.jsonPos}<${X.default.jsonLen} && ${Wr(1)}!==${t};`,()=>{r(),fr(e,",",()=>n.break(),s)});function s(){fr(e,t,()=>{},Gt)}}function Gc(e,t){const{gen:r}=e,n=r.let("key");Tt(le(Y({},e),{data:n})),Be(e,":"),ia(e,n,t)}function qc(e){const{gen:t,data:r,schema:n}=e,{discriminator:s,mapping:a}=n;Be(e,"{"),t.assign(r,(0,V._)`{}`);const c=t.const("pos",X.default.jsonPos),h=t.let("value"),g=t.let("tag");na(e,"}",()=>{const p=t.let("key");Tt(le(Y({},e),{data:p})),Be(e,":"),t.if((0,V._)`${p} === ${s}`,()=>{Tt(le(Y({},e),{data:g})),t.assign((0,V._)`${r}[${p}]`,g),t.break()},()=>zn(le(Y({},e),{data:h})))}),t.assign(X.default.jsonPos,c),t.if((0,V._)`${g} === undefined`),at(e,(0,V.str)`discriminator tag not found`);for(const p in a)t.elseIf((0,V._)`${g} === ${p}`),aa(le(Y({},e),{schema:a[p]}),s);t.else(),at(e,(0,V.str)`discriminator value not in schema`),t.endIf()}function sa(e){const{gen:t,data:r}=e;Be(e,"{"),t.assign(r,(0,V._)`{}`),aa(e)}function aa(e,t){const{gen:r,schema:n,data:s}=e,{properties:a,optionalProperties:c,additionalProperties:h}=n;if(Un(e,"}",()=>{const g=r.let("key");if(Tt(le(Y({},e),{data:g})),Be(e,":"),r.if(!1),oa(e,g,a),oa(e,g,c),t){r.elseIf((0,V._)`${g} === ${t}`);const p=r.let("tag");Tt(le(Y({},e),{data:p}))}r.else(),h?zn(le(Y({},e),{data:(0,V._)`${s}[${g}]`})):at(e,(0,V.str)`property ${g} not allowed`),r.endIf()}),a){const g=(0,kc.hasPropFunc)(r),p=(0,V.and)(...Object.keys(a).map(u=>(0,V._)`${g}.call(${s}, ${u})`));r.if((0,V.not)(p),()=>at(e,(0,V.str)`missing required properties`))}}function oa(e,t,r={}){const{gen:n}=e;for(const s in r)n.elseIf((0,V._)`${t} === ${s}`),ia(e,t,r[s])}function ia(e,t,r){Qr(le(Y({},e),{schema:r,data:(0,V._)`${e.data}[${t}]`}))}function Bc(e){const{gen:t,schema:r,data:n,self:s}=e;switch(r.type){case"boolean":Lc(e);break;case"string":Tt(e);break;case"timestamp":{Tt(e);const a=(0,ta.useFunc)(t,Uc.default),{allowDate:c,parseDate:h}=s.opts,g=c?(0,V._)`!${a}(${n}, true)`:(0,V._)`!${a}(${n})`,p=h?(0,V.or)(g,(0,V._)`(${n} = new Date(${n}), false)`,(0,V._)`isNaN(${n}.valueOf())`):g;t.if(p,()=>at(e,(0,V.str)`invalid timestamp`));break}case"float32":case"float64":Vn(e);break;default:{const a=r.type;if(!s.opts.int32range&&(a==="int32"||a==="uint32"))Vn(e,16),a==="uint32"&&t.if((0,V._)`${n} < 0`,()=>at(e,(0,V.str)`integer out of range`));else{const[c,h,g]=Mc.intRange[a];Vn(e,g),t.if((0,V._)`${n} < ${c} || ${n} > ${h}`,()=>at(e,(0,V.str)`integer out of range`))}}}}function Tt(e){Be(e,'"'),Ln(e,Fn.parseJsonString)}function Qc(e){const{gen:t,data:r,schema:n}=e,s=n.enum;Be(e,'"'),t.if(!1);for(const a of s){const c=JSON.stringify(a).slice(1);t.elseIf((0,V._)`${Wr(c.length)} === ${c}`),t.assign(r,(0,V.str)`${a}`),t.add(X.default.jsonPos,c.length)}t.else(),Gt(e),t.endIf()}function Vn(e,t){const{gen:r}=e;Kn(e),r.if((0,V._)`"-0123456789".indexOf(${Wr(1)}) < 0`,()=>Gt(e),()=>Ln(e,Fn.parseJsonNumber,t))}function ca(e,t){return r=>{const{gen:n,data:s}=r;fr(r,`${e}`,()=>t(r),()=>n.assign(s,e))}}function Wc(e){const{gen:t,self:r,definitions:n,schema:s,schemaEnv:a}=e,{ref:c}=s,h=n[c];if(!h)throw new Ac.default(r.opts.uriResolver,"",c,`No definition ${c}`);if(!(0,Fc.hasRef)(h))return Qr(le(Y({},e),{schema:h}));const{root:g}=a,p=ra.call(r,new ea.SchemaEnv({schema:h,root:g}),n);ua(e,Yc(t,p),!0)}function Yc(e,t){return t.parse?e.scopeValue("parse",{ref:t.parse}):(0,V._)`${e.scopeValue("wrapper",{ref:t})}.parse`}function zn(e){Ln(e,Fn.parseJson)}function Ln(e,t,r){ua(e,(0,ta.useFunc)(e.gen,t),r)}function ua(e,t,r){const{gen:n,data:s}=e;n.assign(s,(0,V._)`${t}(${X.default.json}, ${X.default.jsonPos}${r?(0,V._)`, ${r}`:V.nil})`),n.assign(X.default.jsonPos,(0,V._)`${t}.position`),n.if((0,V._)`${s} === undefined`,()=>at(e,(0,V._)`${t}.message`))}function Be(e,t){fr(e,t,Gt)}function fr(e,t,r,n){const{gen:s}=e,a=t.length;Kn(e),s.if((0,V._)`${Wr(a)} === ${t}`,()=>{s.add(X.default.jsonPos,a),n==null||n(e)},()=>r(e))}function Kn({gen:e,char:t}){e.code((0,V._)`while((${t}=${X.default.json}[${X.default.jsonPos}],${t}===" "||${t}==="\\n"||${t}==="\\r"||${t}==="\\t"))${X.default.jsonPos}++;`)}function Wr(e){return e===1?(0,V._)`${X.default.json}[${X.default.jsonPos}]`:(0,V._)`${X.default.json}.slice(${X.default.jsonPos}, ${X.default.jsonPos}+${e})`}function Gt(e){at(e,(0,V._)`"unexpected token " + ${X.default.json}[${X.default.jsonPos}]`)}function at({gen:e,parseName:t},r){e.assign((0,V._)`${t}.message`,r),e.assign((0,V._)`${t}.position`,X.default.jsonPos),e.return(Mn)}(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=Bn,n=En,s=Tn,a=Dn,c=kn,h="JTD-meta-schema";class g extends r.default{constructor(b={}){super(le(Y({},b),{jtd:!0}))}_addVocabularies(){super._addVocabularies(),this.addVocabulary(n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema(),this.opts.meta&&this.addMetaSchema(s.default,h,!1)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(h)?h:void 0)}compileSerializer(b){const I=this._addSchema(b);return I.serialize||this._compileSerializer(I)}compileParser(b){const I=this._addSchema(b);return I.parse||this._compileParser(I)}_compileSerializer(b){if(a.default.call(this,b,b.schema.definitions||{}),!b.serialize)throw new Error("ajv implementation error");return b.serialize}_compileParser(b){if(c.default.call(this,b,b.schema.definitions||{}),!b.parse)throw new Error("ajv implementation error");return b.parse}}e.exports=t=g,Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var p=He;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=ue;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})})(on,on.exports);var Xc=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(St,"__esModule",{value:!0}),St.Validate=St.AddSchema=void 0;const Zc=Xc(on.exports),la=new Zc.default,xc=(e,t)=>e(t)?null:e.errors;function eu(e,t){la.addSchema(t,e)}St.AddSchema=eu;function tu(e,t){const r=la.getSchema(e);if(r)return xc(r,t)}St.Validate=tu,Object.defineProperty(kr,"__esModule",{value:!0}),kr.STSOptionsBase=void 0;const ru=St;class nu{constructor(t=null){nr(this,"_options");this._options=t,t!==null&&(typeof t.validator=="undefined"||(0,ru.Validate)(t.validator,t))}get options(){return this._options}}kr.STSOptionsBase=nu;var qt={};Object.defineProperty(qt,"__esModule",{value:!0}),qt.JestSleep=qt.Sleep=void 0;async function da(e=1e3){return new Promise(t=>setTimeout(t,e))}qt.Sleep=da;async function su(){return da(100)}qt.JestSleep=su;var fa={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compareParameterTypes=e.OAuth2ParameterErrorType=e.OIDCAddressClaim=e.OIDCStandardClaim=e.OAuth2ParameterType=void 0,function(n){n.AUDIENCE="AUDIENCE",n.CLIENT_ID="client_id",n.CLIENT_SECRET="client_secret",n.RESPONSE_TYPE="response_type",n.SCOPE="scope",n.STATE="state",n.REDIRECT_URI="redirect_uri",n.ERROR="error",n.ERROR_DESCRIPTION="error_description",n.ERROR_CODES="error_codes",n.ERROR_URI="error_uri",n.GRANT_TYPE="grant_type",n.CODE="code",n.ACCESS_TOKEN="access_token",n.TOKEN_TYPE="token_type",n.EXPIRES_IN="expires_in",n.USERNAME="username",n.PASSWORD="password",n.REFRESH_TOKEN="refresh_token",n.RESPONSE_MODE="response_mode",n.TIMESTAMP="timestamp",n.TRACE_ID="trace_id",n.CORRELATION_ID="correlation_id"}(e.OAuth2ParameterType||(e.OAuth2ParameterType={})),function(n){n.SUB="sub",n.NAME="name",n.GIVEN_NAME="given_name",n.FAMILY_NAME="family_name",n.MIDDLE_NAME="middle_name",n.NICKNAME="nickname",n.PREFERRED_USERNAME="preferred_username",n.PROFILE="profile",n.PICTURE="picture",n.WEBSITE="website",n.EMAIL="email",n.EMAIL_VERIFIED="email_verified",n.GENDER="gender",n.BIRTHDATE="birthdate",n.ZONEINFO="zoneinfo",n.LOCALE="locale",n.PHONE_NUMBER="phone_number",n.PHONE_NUMBER_VERIFIED="phone_number_verified",n.ADDRESS="address",n.CLIENT_SECRET="client_secret",n.NONCE="nonce"}(e.OIDCStandardClaim||(e.OIDCStandardClaim={})),function(n){n.FORMATTED="formatted",n.STREET_ADDRESS="street_address",n.LOCALITY="locality",n.REGION="region",n.COUNTRY="country"}(e.OIDCAddressClaim||(e.OIDCAddressClaim={}));class t{}nr(t,"NOT_EQUAL",{code:"STS_OAUTH2_ERR_0001",description:"Parameter values not equal."}),nr(t,"NOT_PRESENT",{code:"STS_OAUTH2_ERR_0002",description:"Parameter not provided."}),nr(t,"INVALID_FORMAT",{code:"STS_OAUTH2_ERR_0003",description:"Parameter value format invalid."}),nr(t,"EXPIRED",{code:"STS_OAUTH2_ERR_0004",description:"Parameter value expired."}),e.OAuth2ParameterErrorType=t;function r(n,s,a){const c=[];for(let h=0;h<a.length;h++){const g=a[h];if(n[h].localeCompare(s[h])!==0){const p={error:t.NOT_EQUAL.code,error_description:t.NOT_EQUAL.description,timestamp:Date.now(),details:`${t.NOT_EQUAL.description}: Parameter: [${g}]`};c.push(p)}}return c}e.compareParameterTypes=r})(fa),function(e){var t=J&&J.__createBinding||(Object.create?function(s,a,c,h){h===void 0&&(h=c);var g=Object.getOwnPropertyDescriptor(a,c);(!g||("get"in g?!a.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return a[c]}}),Object.defineProperty(s,h,g)}:function(s,a,c,h){h===void 0&&(h=c),s[h]=a[c]}),r=J&&J.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&t(a,s,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.$stsgdf=e.$stsgd=void 0,r(Ar,e),r(kr,e),r(qt,e),r(St,e),r(fa,e),e.$stsgd={};function n(){return e.$stsgd}e.$stsgdf=n}(Ir);class au{constructor(){this.DigestMessage=async function(t){const n=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",n),a=Array.from(new Uint8Array(s));return btoa(String.fromCharCode(...a))},this.CreateRandomString=(t=43)=>{const r=Array.from(crypto.getRandomValues(new Uint8Array(t)));return btoa(String.fromCharCode(...r))},this.CreateRandomStringEx=()=>{const t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let r="";return Array.from(crypto.getRandomValues(new Uint8Array(43))).forEach(s=>r+=t[s%t.length]),r}}}class ou{constructor(){this.DecodeQueryParams=t=>{const r={};return Object.keys(t).filter(n=>typeof t[n]!="undefined").map(n=>{r[decodeURIComponent(n)]=decodeURIComponent(t[n])}),r},this.CreateQueryParams=t=>Object.keys(t).filter(r=>typeof t[r]!="undefined").map(r=>Array.isArray(t[r])?encodeURIComponent(r)+"="+encodeURIComponent(t[r].join(" ")):encodeURIComponent(r)+"="+encodeURIComponent(t[r])).join("&"),this._GetQueryParams=t=>{let r={};const n=t.split("?");if(n.length==2){const s=n[1].split("&"),a={};let c="";s.forEach(function(h){c=h.split("="),c.length==2&&(a[c[0]]=c[1])}),r=this.DecodeQueryParams(a)}return r},this.GetQueryParams=()=>this._GetQueryParams(window.location.href)}}var ha=(e=>(e.CODE="code",e.ID_TOKEN="id_token",e.TOKEN="token",e))(ha||{}),pa=(e=>(e.QUERY="query",e.FRAGMENT="fragment",e.FORM_POST="form_post",e))(pa||{}),ma=(e=>(e.CLIENT_CREDENTIALS="client_credentials",e.AUTHORIZATION_CODE="authorization_code",e.REFRESH_TOKEN="refresh_token",e))(ma||{}),ot=(e=>(e.RESTORE_SESSION="RestoreSession",e.AUTHORIZE="Authorize",e.HANDLE_REDIRECT="HandleRedirect",e.LOGOUT="Logout",e.AUTHENTICATE_EVENT="AuthenticateEvent",e.ERROR="Error",e))(ot||{}),hr=J&&J.__assign||function(){return hr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},hr.apply(this,arguments)};function pr(e,t){if(!t)return"";var r="; "+e;return t===!0?r:r+"="+t}function iu(e){if(typeof e.expires=="number"){var t=new Date;t.setMilliseconds(t.getMilliseconds()+e.expires*864e5),e.expires=t}return pr("Expires",e.expires?e.expires.toUTCString():"")+pr("Domain",e.domain)+pr("Path",e.path)+pr("Secure",e.secure)+pr("SameSite",e.sameSite)}function cu(e,t,r){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+iu(r)}function uu(e){for(var t={},r=e?e.split("; "):[],n=/(%[\dA-F]{2})+/gi,s=0;s<r.length;s++){var a=r[s].split("="),c=a.slice(1).join("=");c.charAt(0)==='"'&&(c=c.slice(1,-1));try{var h=a[0].replace(n,decodeURIComponent);t[h]=c.replace(n,decodeURIComponent)}catch{}}return t}function lu(){return uu(document.cookie)}function du(e){return lu()[e]}var fu=du;function ga(e,t,r){document.cookie=cu(e,t,hr({path:"/"},r))}var hu=ga;function pu(e,t){ga(e,"",hr(hr({},t),{expires:-1}))}var mu=pu;const Yr=qn(`proc:${process.pid}:storage.ts`);var va=(e=>(e.LOCAL_STORAGE="LocalStorage",e.SESSION_STORAGE="SessionStorage",e.COOKIE_STORAGE="CookieStorage",e.MEMORY_STORAGE="MemoryStorage",e))(va||{});class gu{constructor(){this.get=t=>{const r=fu(t);return r?JSON.parse(r):null},this.set=(t,r,n={})=>{let s={};window.location.protocol==="https:"&&(s={secure:!0,sameSite:"none"}),n&&n.daysUntilExpire?s.expires=n.daysUntilExpire:s.expires=1,Yr(`CookieStorage.set: key: ${t}, value: [${r}]`),hu(t,JSON.stringify(r),s)},this.remove=t=>{mu(t)}}}class vu{constructor(){this.get=t=>{const r=sessionStorage.getItem(t);return typeof r=="undefined"||r===null?null:JSON.parse(r)},this.set=(t,r)=>{Yr(`SessionStorage.set: key: ${t}, value: [${r}]`),sessionStorage.setItem(t,JSON.stringify(r))},this.remove=t=>{sessionStorage.removeItem(t)}}}class yu{constructor(){this.get=t=>{const r=localStorage.getItem(t);return typeof r=="undefined"||r===null?null:JSON.parse(r)},this.set=(t,r)=>{Yr(`LocalStorage.set: key: ${t}, value: [${r}]`),localStorage.setItem(t,JSON.stringify(r))},this.remove=t=>{localStorage.removeItem(t)}}}class _u{constructor(){ge(this,Dt,void 0);re(this,Dt,{}),this.get=t=>{const r=Q(this,Dt)[t];return typeof r=="undefined"||r===null?null:r},this.set=(t,r)=>{Yr(`MemoryStorage.set: key: ${t}, value: [${r}]`),Q(this,Dt)[t]=r},this.remove=t=>{delete Q(this,Dt)[t]}}}Dt=new WeakMap;class $u{constructor(t){ge(this,gt,null);switch(t.clientStorageType){case"SessionStorage":re(this,gt,new vu);break;case"LocalStorage":re(this,gt,new yu);break;case"CookieStorage":re(this,gt,new gu);break;case"MemoryStorage":re(this,gt,new _u);break;default:throw new Error(`Unknown [${t.clientStorageType}] storage type.`)}}GetStorage(){return Q(this,gt)}}gt=new WeakMap;function Hn(e){this.message=e}Hn.prototype=new Error,Hn.prototype.name="InvalidCharacterError";var ya=typeof window!="undefined"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Hn("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,s=0,a=0,c="";n=t.charAt(a++);~n&&(r=s%4?64*r+n:n,s++%4)?c+=String.fromCharCode(255&r>>(-2*s&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return c};function Eu(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(ya(r).replace(/(.)/g,function(n,s){var a=s.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a="0"+a),"%"+a}))}(t)}catch{return ya(t)}}function Xr(e){this.message=e}function wu(e,t){if(typeof e!="string")throw new Xr("Invalid token specified");var r=(t=t||{}).header===!0?0:1;try{return JSON.parse(Eu(e.split(".")[r]))}catch(n){throw new Xr("Invalid token specified: "+n.message)}}Xr.prototype=new Error,Xr.prototype.name="InvalidTokenError";const Su=qn(`proc:${process.pid}:stsoauth2manager.ts`);class _a{constructor(t,r){ge(this,mr,void 0);ge(this,It,void 0);ge(this,vt,void 0);ge(this,Zr,void 0);ge(this,xr,void 0);ge(this,At,void 0);ge(this,en,void 0);ge(this,gr,void 0);ge(this,kt,void 0);ge(this,tn,void 0);ge(this,Bt,void 0);ge(this,vr,void 0);ge(this,yt,void 0);ge(this,Qt,void 0);ge(this,_t,void 0);ge(this,$t,void 0);ge(this,yr,void 0);ge(this,it,void 0);ge(this,_r,void 0);ge(this,$r,void 0);ge(this,Er,void 0);ge(this,wr,void 0);re(this,mr,null),re(this,It,null),re(this,vt,null),re(this,Zr,new au),re(this,xr,new ou),re(this,At,"authorize_options.stsmda.com.au"),re(this,en,"session.stsmda.com.au"),re(this,gr,null),re(this,kt,null),re(this,tn,{}),re(this,vr,0),re(this,yt,{}),re(this,Qt,1e3),re(this,_t,null),re(this,$t,null),re(this,yr,a=>{const c=a.data;if(c.messageId===-1)switch(c.command){case ot.AUTHENTICATE_EVENT:Q(this,$r).call(this,c.payload);break;case ot.ERROR:Q(this,_r).call(this,c.payload);break;default:throw new Error(`ProcessMessageResponse command [${c.command}] not valid.`)}else{const h=Q(this,yt)[c.messageId];if(h)h(c);else throw new Error(`Message: [${c.messageId}] does not exists in callBacks.`)}}),re(this,it,a=>(a.messageId=Aa(this,vr)._++,new Promise((c,h)=>{const g=setTimeout(()=>{delete Q(this,yt)[a.messageId],h(`Message: [${a.messageId}] timeout error after: [${Q(this,Qt)}] ms.`)},Q(this,Qt));Q(this,yt)[a.messageId]=p=>{clearTimeout(g),delete Q(this,yt)[a.messageId],c(p)},Q(this,Bt).postMessage(a)}))),re(this,_r,a=>{Q(this,vt).commit("AuthorizeError",{message:a}),setTimeout(()=>{Q(this,It).replace("/error")},0)}),re(this,$r,a=>{Q(this,kt).authenticateEvent&&Q(this,kt).authenticateEvent(a),Q(this,vt).commit("stsOAuth2SDK/SessionData",a)}),re(this,Er,(a,c)=>{c.beforeEach(async(h,g)=>{const p=a.config.globalProperties.$store,u=a.config.globalProperties.$sts;if(Su(`beforeEach: from: [${g.path}], to: [${h.path}]`),p.getters["stsOAuth2SDK/LoggedIn"]===!1){if(console.log("Not logged in"),h.path.localeCompare("/authorize")===0)return console.log("to = /authorize"),!0;if(h.path.localeCompare("/consent")===0&&typeof p.getters.Session.sessionId!="undefined"||h.path.localeCompare("/logout")===0||h.path.localeCompare("/error")===0||h.path.localeCompare("/logout")===0)return!0;const m=h.query;if(m[Ir.OAuth2ParameterType.CODE]||m[Ir.OAuth2ParameterType.ERROR])return console.log(`#SetupRout:str = [${m}]`),await u.om.HandleRedirect(m)?(setTimeout(()=>{window.history.replaceState({},document.title,window.location.origin+"/")},0),!0):(Q(this,It).replace("/error"),!1);const b=await u.om.RestoreSession();return console.log(`#SetupRoute:sessionRestored [${b}]`),b!==!0?(console.log("Session not restored - Need to Authorize"),u.om.Authorize(),!1):"/"}else return h.path.localeCompare("/consent")===0?"/":h.path.localeCompare("/authorize")===0?(c.replace({path:"/"}),!1):h.path.localeCompare("/logout")===0?(c.replace({path:"/"}),!1):!0})}),re(this,wr,()=>{Q(this,vt).registerModule("stsOAuth2SDK",{namespaced:!0,state(){return{sessionData:{}}},getters:{SessionData(a){return a.sessionData},LoggedIn(a){return!(typeof a.sessionData=="undefined"||a.sessionData===null)},UserDetails(a){if(a.sessionData){const c=a.sessionData;return wu(c)}else return null}},mutations:{SessionData(a,c){a.sessionData=c,console.log(`commit [sessionData]: ${JSON.stringify(c)}`)}}},{preserveState:!0})}),this.RestoreSession=async()=>{try{return(await Q(this,it).call(this,{command:ot.RESTORE_SESSION})).payload}catch(a){return console.log(`RestoreSession Error: ${a}`),!1}},this.Authorize=async()=>{try{const a=await Q(this,it).call(this,{command:ot.AUTHORIZE});Q(this,$t).set(Q(this,At),a.payload.authorizeOptions);const c=a.payload.url;window.location.replace(c)}catch(a){console.log(`Authorize Error: ${a}`)}},this.HandleRedirect=async a=>{try{let c=null;if(a[Ir.OAuth2ParameterType.CODE]){const h=Q(this,$t).get(Q(this,At));Q(this,$t).remove(Q(this,At)),c=await Q(this,it).call(this,{command:ot.HANDLE_REDIRECT,payload:{queryVars:a,authorizeOptions:h}})}else c=await Q(this,it).call(this,{command:ot.HANDLE_REDIRECT,payload:a});return c.payload}catch(c){return console.log(`HandleRedirect Error: ${c}`),!1}},this.Logout=async()=>{try{return(await Q(this,it).call(this,{command:ot.LOGOUT})).payload}catch(a){return console.log(`Logout Error: ${a}`),!1}},re(this,kt,r),re(this,mr,t.config.globalProperties.$sts.storage),re(this,vt,t.config.globalProperties.$store),re(this,gr,t.config.globalProperties.$sts.aic.PrimaryPublishInstrumentController),re(this,It,t.config.globalProperties.$router),re(this,$t,new $u({clientStorageType:va.SESSION_STORAGE}).GetStorage()),re(this,_t,new Worker("/assets/stsoauth2worker.56b3b966.js")),Q(this,_t).onmessage=a=>{console.log(`this.#worker.onmessage = [${a}]`)},Q(this,_t).onerror=function(a){console.log(`this.#worker.onerror = [${a}]`)};const{port1:n,port2:s}=new MessageChannel;re(this,Bt,n),Q(this,_t).postMessage(s,[s]),Q(this,Bt).onmessage=a=>{Q(this,yr).call(this,a)},Q(this,wr).call(this),Q(this,Er).call(this,t,r.router)}}mr=new WeakMap,It=new WeakMap,vt=new WeakMap,Zr=new WeakMap,xr=new WeakMap,At=new WeakMap,en=new WeakMap,gr=new WeakMap,kt=new WeakMap,tn=new WeakMap,Bt=new WeakMap,vr=new WeakMap,yt=new WeakMap,Qt=new WeakMap,_t=new WeakMap,$t=new WeakMap,yr=new WeakMap,it=new WeakMap,_r=new WeakMap,$r=new WeakMap,Er=new WeakMap,wr=new WeakMap;const bu={install:(e,t)=>{const r=new _a(e,t);e.config.globalProperties.$sts.om=r}};B.AuthorizeOptionsResponseMode=pa,B.AuthorizeOptionsResponseType=ha,B.IOauth2ListenerCommand=ot,B.OAuthGrantTypes=ma,B.STSOAuth2Manager=_a,B.STSOAuth2ManagerPlugin=bu,Object.defineProperties(B,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsshunt/stsoauth2plugin",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "STS OAuth2 VUE Plugin",
5
5
  "files": [
6
6
  "dist",
@@ -46,9 +46,13 @@ export class STSOAuth2Manager {
46
46
  // Use session storage for the transient nature of the OAuth2 authorize handshake. Once completed, the storage will be removed.
47
47
  this.#transactionStore = new ClientStorageFactory<IAuthorizeOptions>({clientStorageType: ClientStorageType.SESSION_STORAGE}).GetStorage();
48
48
 
49
+ /*
49
50
  this.#worker = new Worker(new URL('./stsoauth2worker.ts', import.meta.url), {
50
51
  type: 'module'
51
52
  });
53
+ */
54
+
55
+ this.#worker = new Worker(new URL('./stsoauth2worker.ts', import.meta.url));
52
56
 
53
57
  this.#worker.onmessage = (data: MessageEvent) => {
54
58
  console.log(`this.#worker.onmessage = [${data}]`); // green
@@ -1 +1 @@
1
- {"version":3,"file":"stsoauth2manager.d.ts","sourceRoot":"","sources":["../src/stsoauth2manager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AAKpE,OAAO,EACN,wBAAwB,EAAkF,MAAM,kBAAkB,CAAA;AAWnI,qBAAa,gBAAgB;;gBAkBhB,GAAG,KAAA,EAAE,OAAO,EAAE,wBAAwB;IA0PlD,cAAc,QAAY,QAAQ,OAAO,CAAC,CAQzC;IAED,SAAS,QAAa,QAAQ,IAAI,CAAC,CASlC;IAED,cAAc,cAAqB,UAAU,KAAG,QAAQ,OAAO,CAAC,CAoB/D;IAED,MAAM,QAAa,QAAQ,OAAO,CAAC,CAQlC;CACD"}
1
+ {"version":3,"file":"stsoauth2manager.d.ts","sourceRoot":"","sources":["../src/stsoauth2manager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AAKpE,OAAO,EACN,wBAAwB,EAAkF,MAAM,kBAAkB,CAAA;AAWnI,qBAAa,gBAAgB;;gBAkBhB,GAAG,KAAA,EAAE,OAAO,EAAE,wBAAwB;IA8PlD,cAAc,QAAY,QAAQ,OAAO,CAAC,CAQzC;IAED,SAAS,QAAa,QAAQ,IAAI,CAAC,CASlC;IAED,cAAc,cAAqB,UAAU,KAAG,QAAQ,OAAO,CAAC,CAoB/D;IAED,MAAM,QAAa,QAAQ,OAAO,CAAC,CAQlC;CACD"}