(e)
| 4273 | * https://github.com/Starcounter-Jack/JSON-Patch |
| 4274 | * (c) 2017-2021 Joachim Wester |
| 4275 | * MIT license |
| 4276 | */var ar=new WeakMap,ur=function(e){this.observers=new Map,this.obj=e},lr=function(e,t){this.callback=e,this.observer=t};function hr(e,t){void 0===t&&(t=!1);var r=ar.get(e.object);fr(r.value,e.object,e.patches,"",t),e.patches.length&&nr(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function fr(e,t,r,n,s){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=Jt(t),o=Jt(e),c=!1,a=o.length-1;a>=0;a--){var u=e[h=o[a]];if(!Ut(t,h)||void 0===t[h]&&void 0!==u&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(s&&r.push({op:"test",path:n+"/"+Ht(h),value:Vt(u)}),r.push({op:"remove",path:n+"/"+Ht(h)}),c=!0):(s&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}));else{var l=t[h];"object"==typeof u&&null!=u&&"object"==typeof l&&null!=l&&Array.isArray(u)===Array.isArray(l)?fr(u,l,r,n+"/"+Ht(h),s):u!==l&&(s&&r.push({op:"test",path:n+"/"+Ht(h),value:Vt(u)}),r.push({op:"replace",path:n+"/"+Ht(h),value:Vt(l)}))}}if(c||i.length!=o.length)for(a=0;a<i.length;a++){var h;Ut(e,h=i[a])||void 0===t[h]||r.push({op:"add",path:n+"/"+Ht(h),value:Vt(t[h])})}}}const pr=Object.freeze(Object.defineProperty({__proto__:null,compare:function(e,t,r){void 0===r&&(r=!1);var n=[];return fr(e,t,n,"",r),n},generate:hr,observe:function(e,t){var r,n=function(e){return ar.get(e)}(e);if(n){var s=function(e,t){return e.observers.get(t)}(n,t);r=s&&s.observer}else n=new ur(e),ar.set(e,n);if(r)return r;if(r={},n.value=Vt(e),t){r.callback=t,r.next=null;var i=function(){hr(r)},o=function(){clearTimeout(r.next),r.next=setTimeout(i)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return r.patches=[],r.object=e,r.unobserve=function(){hr(r),clearTimeout(r.next),function(e,t){e.observers.delete(t.callback)}(n,r),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},n.observers.set(t,new lr(t,r)),r},unobserve:function(e,t){t.unobserve()}},Symbol.toStringTag,{value:"Module"}));function dr(e){return e&&e.t&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.assign({},cr,pr,{JsonPatchError:Yt,deepClone:Vt,escapePathComponent:Ht,unescapePathComponent:zt});var mr=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===vr}(e)}(e)};var vr="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function yr(e,t){return!1!==t.clone&&t.isMergeableObject(e)?jr((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function br(e,t,r){return e.concat(t).map((function(e){return yr(e,r)}))}function gr(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function wr(e,t){try{return t in e}catch(e){return!1}}function xr(e,t,r){var n={};return r.isMergeableObject(e)&&gr(e).forEach((function(t){n[t]=yr(e[t],r)})),gr(t).forEach((function(s){(function(e,t){return wr(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(wr(e,s)&&r.isMergeableObject(t[s])?n[s]=function(e,t){if(!t.customMerge)return jr;var r=t.customMerge(e);return"function"==typeof r?r:jr}(s,r)(e[s],t[s],r):n[s]=yr(t[s],r))})),n}function jr(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||br,r.isMergeableObject=r.isMergeableObject||mr,r.cloneUnlessOtherwiseSpecified=yr;var n=Array.isArray(t);return n===Array.isArray(e)?n?r.arrayMerge(e,t,r):xr(e,t,r):yr(t,r)}jr.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return jr(e,r,t)}),{})};const Er=dr(jr),$r={add:function(e,t){return{op:"add",path:e,value:t}},replace:Sr,remove:function(e){return{op:"remove",path:e}},merge:function(e,t){return{type:"mutation",op:"merge",path:e,value:t}},mergeDeep:function(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}},context:function(e,t){return{type:"context",path:e,value:t}},getIn:function(e,t){return t.reduce(((e,t)=>void 0!==t&&e?e[t]:e),e)},applyPatch:function(e,t,r){if(r=r||{},"merge"===(t={...t,path:t.path&&Or(t.path)}).op){const r=qr(e,t.path);Object.assign(r,t.value),nr(e,[Sr(t.path,r)])}else if("mergeDeep"===t.op){const r=qr(e,t.path),n=Er(r,t.value);e=nr(e,[Sr(t.path,n)]).newDocument}else if("add"===t.op&&""===t.path&&Rr(t.value)){const r=Object.keys(t.value).reduce(((e,r)=>(e.push({op:"add",path:`/${Or(r)}`,value:t.value[r]}),e)),[]);nr(e,r)}else if("replace"===t.op&&""===t.path){let{value:n}=t;r.allowMetaPatches&&t.meta&&Mr(t)&&(Array.isArray(t.value)||Rr(t.value))&&(n={...n,...t.meta}),e=n}else if(nr(e,[t]),r.allowMetaPatches&&t.meta&&Mr(t)&&(Array.isArray(t.value)||Rr(t.value))){const r={...qr(e,t.path),...t.meta};nr(e,[Sr(t.path,r)])}return e},parentPathMatch:function(e,t){if(!Array.isArray(t))return!1;for(let r=0,n=t.length;r<n;r+=1)if(t[r]!==e[r])return!1;return!0},flatten:Fr,fullyNormalizeArray:function(e){return Ir(Fr(kr(e)))},normalizeArray:kr,isPromise:function(e){return Rr(e)&&Dr(e.then)},forEachNew:function(e,t){try{return Ar(e,Tr,t)}catch(e){return e}},forEachNewPrimitive:function(e,t){try{return Ar(e,Pr,t)}catch(e){return e}},isJsonPatch:_r,isContextPatch:function(e){return Nr(e)&&"context"===e.type},isPatch:Nr,isMutation:Cr,isAdditiveMutation:Mr,isGenerator:function(e){return"[object GeneratorFunction]"===Object.prototype.toString.call(e)},isFunction:Dr,isObject:Rr,isError:function(e){return e instanceof Error}};function Or(e){return Array.isArray(e)?e.length<1?"":`/${e.map((e=>(e+"").replace(/~/g,"~0").replace(/\//g,"~1"))).join("/")}`:e}function Sr(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function Ar(e,t,r){return Ir(Fr(e.filter(Mr).map((e=>t(e.value,r,e.path)))||[]))}function Pr(e,t,r){return r=r||[],Array.isArray(e)?e.map(((e,n)=>Pr(e,t,r.concat(n)))):Rr(e)?Object.keys(e).map((n=>Pr(e[n],t,r.concat(n)))):t(e,r[r.length-1],r)}function Tr(e,t,r){let n=[];if((r=r||[]).length>0){const s=t(e,r[r.length-1],r);s&&(n=n.concat(s))}if(Array.isArray(e)){const s=e.map(((e,n)=>Tr(e,t,r.concat(n))));s&&(n=n.concat(s))}else if(Rr(e)){const s=Object.keys(e).map((n=>Tr(e[n],t,r.concat(n))));s&&(n=n.concat(s))}return n=Fr(n),n}function kr(e){return Array.isArray(e)?e:[e]}function Fr(e){return[].concat(...e.map((e=>Array.isArray(e)?Fr(e):e)))}function Ir(e){return e.filter((e=>void 0!==e))}function Rr(e){return e&&"object"==typeof e}function Dr(e){return e&&"function"==typeof e}function _r(e){if(Nr(e)){const{op:t}=e;return"add"===t||"remove"===t||"replace"===t}return!1}function Cr(e){return _r(e)||Nr(e)&&"mutation"===e.type}function Mr(e){return Cr(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function Nr(e){return e&&"object"==typeof e}function qr(e,t){try{return tr(e,t)}catch(e){return console.error(e),{}}}var Br=function(e){return e&&e.Math===Math&&e},Lr=Br("object"==typeof globalThis&&globalThis)||Br("object"==typeof window&&window)||Br("object"==typeof self&&self)||Br("object"==typeof global&&global)||Br(!1)||function(){return this}()||Function("return this")(),Ur=function(e){try{return!!e()}catch(e){return!0}},Jr=!Ur((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Vr=Jr,Gr=Function.prototype,Hr=Gr.apply,zr=Gr.call,Xr="object"==typeof Reflect&&Reflect.apply||(Vr?zr.bind(Hr):function(){return zr.apply(Hr,arguments)}),Wr=Jr,Yr=Function.prototype,Zr=Yr.call,Kr=Wr&&Yr.bind.bind(Zr,Zr),Qr=Wr?Kr:function(e){return function(){return Zr.apply(e,arguments)}},en=Qr,tn=en({}.toString),rn=en("".slice),nn=function(e){return rn(tn(e),8,-1)},sn=nn,on=Qr,cn=function(e){if("Function"===sn(e))return on(e)},an="object"==typeof document&&document.all,un=void 0===an&&void 0!==an?function(e){return"function"==typeof e||e===an}:function(e){return"function"==typeof e},ln={},hn=!Ur((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),fn=Jr,pn=Function.prototype.call,dn=fn?pn.bind(pn):function(){return pn.apply(pn,arguments)},mn={},vn={}.propertyIsEnumerable,yn=Object.getOwnPropertyDescriptor,bn=yn&&!vn.call({1:2},1);mn.f=bn?function(e){var t=yn(this,e);return!!t&&t.enumerable}:vn;var gn,wn,xn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},jn=Ur,En=nn,$n=Object,On=Qr("".split),Sn=jn((function(){return!$n("z").propertyIsEnumerable(0)}))?function(e){return"String"===En(e)?On(e,""):$n(e)}:$n,An=function(e){return null==e},Pn=An,Tn=TypeError,kn=function(e){if(Pn(e))throw new Tn("Can't call method on "+e);return e},Fn=Sn,In=kn,Rn=function(e){return Fn(In(e))},Dn=un,_n=function(e){return"object"==typeof e?null!==e:Dn(e)},Cn={},Mn=Cn,Nn=Lr,qn=un,Bn=function(e){return qn(e)?e:void 0},Ln=function(e,t){return arguments.length<2?Bn(Mn[e])||Bn(Nn[e]):Mn[e]&&Mn[e][t]||Nn[e]&&Nn[e][t]},Un=Qr({}.isPrototypeOf),Jn=Lr.navigator,Vn=Jn&&Jn.userAgent,Gn=Lr,Hn=Vn?String(Vn):"",zn=Gn.process,Xn=Gn.Deno,Wn=zn&&zn.versions||Xn&&Xn.version,Yn=Wn&&Wn.v8;Yn&&(wn=(gn=Yn.split("."))[0]>0&&gn[0]<4?1:+(gn[0]+gn[1])),!wn&&Hn&&(!(gn=Hn.match(/Edge\/(\d+)/))||gn[1]>=74)&&(gn=Hn.match(/Chrome\/(\d+)/))&&(wn=+gn[1]);var Zn=wn,Kn=Ur,Qn=Lr.String,es=!!Object.getOwnPropertySymbols&&!Kn((function(){var e=Symbol("symbol detection");return!Qn(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Zn&&Zn<41})),ts=es&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,rs=Ln,ns=un,ss=Un,is=Object,os=ts?function(e){return"symbol"==typeof e}:function(e){var t=rs("Symbol");return ns(t)&&ss(t.prototype,is(e))},cs=String,as=function(e){try{return cs(e)}catch(e){return"Object"}},us=un,ls=as,hs=TypeError,fs=function(e){if(us(e))return e;throw new hs(ls(e)+" is not a function")},ps=fs,ds=An,ms=function(e,t){var r=e[t];return ds(r)?void 0:ps(r)},vs=dn,ys=un,bs=_n,gs=TypeError,ws={exports:{}},xs=Lr,js=Object.defineProperty,Es=Lr,$s=function(e,t){try{js(xs,e,{value:t,configurable:!0,writable:!0})}catch(r){xs[e]=t}return t},Os=ws.exports=Es["o"]||$s("__core-js_shared__",{});(Os.versions||(Os.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ss=ws.exports,As=Ss,Ps=function(e,t){return As[e]||(As[e]=t||{})},Ts=kn,ks=Object,Fs=function(e){return ks(Ts(e))},Is=Fs,Rs=Qr({}.hasOwnProperty),Ds=Object.hasOwn||function(e,t){return Rs(Is(e),t)},_s=Qr,Cs=0,Ms=Math.random(),Ns=_s(1..toString),qs=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ns(++Cs+Ms,36)},Bs=Ps,Ls=Ds,Us=qs,Js=es,Vs=ts,Gs=Lr.Symbol,Hs=Bs("wks"),zs=Vs?Gs.for||Gs:Gs&&Gs.withoutSetter||Us,Xs=function(e){return Ls(Hs,e)||(Hs[e]=Js&&Ls(Gs,e)?Gs[e]:zs("Symbol."+e)),Hs[e]},Ws=dn,Ys=_n,Zs=os,Ks=ms,Qs=function(e,t){var r,n;if("string"===t&&ys(r=e.toString)&&!bs(n=vs(r,e)))return n;if(ys(r=e.valueOf)&&!bs(n=vs(r,e)))return n;if("string"!==t&&ys(r=e.toString)&&!bs(n=vs(r,e)))return n;throw new gs("Can't convert object to primitive value")},ei=TypeError,ti=Xs("toPrimitive"),ri=function(e,t){if(!Ys(e)||Zs(e))return e;var r,n=Ks(e,ti);if(n){if(void 0===t&&(t="default"),r=Ws(n,e,t),!Ys(r)||Zs(r))return r;throw new ei("Can't convert object to primitive value")}return void 0===t&&(t="number"),Qs(e,t)},ni=os,openapi_parser_si=function(e){var t=ri(e,"string");return ni(t)?t:t+""},ii=_n,oi=Lr.document,ci=ii(oi)&&ii(oi.createElement),ai=function(e){return ci?oi.createElement(e):{}},ui=ai,li=!hn&&!Ur((function(){return 7!==Object.defineProperty(ui("div"),"a",{get:function(){return 7}}).a})),hi=hn,fi=dn,pi=mn,di=xn,mi=Rn,vi=openapi_parser_si,yi=Ds,bi=li,gi=Object.getOwnPropertyDescriptor;ln.f=hi?gi:function(e,t){if(e=mi(e),t=vi(t),bi)try{return gi(e,t)}catch(e){}if(yi(e,t))return di(!fi(pi.f,e,t),e[t])};var wi=Ur,xi=un,ji=/#|\.prototype\./,Ei=function(e,t){var r=Oi[$i(e)];return r===Ai||r!==Si&&(xi(t)?wi(t):!!t)},$i=Ei.normalize=function(e){return String(e).replace(ji,".").toLowerCase()},Oi=Ei.data={},Si=Ei.NATIVE="N",Ai=Ei.POLYFILL="P",Pi=Ei,Ti=fs,ki=Jr,Fi=cn(cn.bind),Ii=function(e,t){return Ti(e),void 0===t?e:ki?Fi(e,t):function(){return e.apply(t,arguments)}},Ri={},Di=hn&&Ur((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),_i=_n,Ci=String,Mi=TypeError,Ni=function(e){if(_i(e))return e;throw new Mi(Ci(e)+" is not an object")},qi=hn,Bi=li,Li=Di,Ui=Ni,Ji=openapi_parser_si,Vi=TypeError,Gi=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor;Ri.f=qi?Li?function(e,t,r){if(Ui(e),t=Ji(t),Ui(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Hi(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Gi(e,t,r)}:Gi:function(e,t,r){if(Ui(e),t=Ji(t),Ui(r),Bi)try{return Gi(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Vi("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var zi=Ri,Xi=xn,Wi=hn?function(e,t,r){return zi.f(e,t,Xi(1,r))}:function(e,t,r){return e[t]=r,e},Yi=Lr,Zi=Xr,Ki=cn,Qi=un,eo=ln.f,to=Pi,ro=Cn,no=Ii,so=Wi,io=Ds,oo=function(e){var t=function(r,n,s){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,s)}return Zi(e,this,arguments)};return t.prototype=e.prototype,t},co=function(e,t){var r,n,s,i,o,c,a,u,l,h=e.target,f=e.global,p=e.stat,d=e.proto,m=f?Yi:p?Yi[h]:Yi[h]&&Yi[h].prototype,v=f?ro:ro[h]||so(ro,h,{})[h],y=v.prototype;for(i in t)n=!(r=to(f?i:h+(p?".":"#")+i,e.forced))&&m&&io(m,i),c=v[i],n&&(a=e.dontCallGetSet?(l=eo(m,i))&&l.value:m[i]),o=n&&a?a:t[i],(r||d||typeof c!=typeof o)&&(u=e.bind&&n?no(o,Yi):e.wrap&&n?oo(o):d&&Qi(o)?Ki(o):o,(e.sham||o&&o.sham||c&&c.sham)&&so(u,"sham",!0),so(v,i,u),d&&(io(ro,s=h+"Prototype")||so(ro,s,{}),so(ro[s],i,o),e.real&&y&&(r||!y[i])&&so(y,i,o)))},ao=qs,uo=Ps("keys"),lo=function(e){return uo[e]||(uo[e]=ao(e))},ho=!Ur((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),fo=Ds,po=un,mo=Fs,vo=ho,yo=lo("IE_PROTO"),bo=Object,go=bo.prototype,wo=vo?bo.getPrototypeOf:function(e){var t=mo(e);if(fo(t,yo))return t[yo];var r=t.constructor;return po(r)&&t instanceof r?r.prototype:t instanceof bo?go:null},xo=Qr,jo=fs,Eo=_n,$o=function(e){return Eo(e)||null===e},Oo=String,So=TypeError,Ao=function(e,t,r){try{return xo(jo(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},Po=_n,To=kn,ko=function(e){if($o(e))return e;throw new So("Can't set "+Oo(e)+" as a prototype")},Fo=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Ao(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return To(r),ko(n),Po(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),Io={},Ro=Math.ceil,Do=Math.floor,_o=Math.trunc||function(e){var t=+e;return(t>0?Do:Ro)(t)},Co=function(e){var t=+e;return t!=t||0===t?0:_o(t)},Mo=Co,No=Math.max,qo=Math.min,Bo=Co,Lo=Math.min,Uo=function(e){var t=Bo(e);return t>0?Lo(t,9007199254740991):0},Jo=function(e){return Uo(e.length)},Vo=Rn,Go=function(e,t){var r=Mo(e);return r<0?No(r+t,0):qo(r,t)},Ho=Jo,zo=function(e){return function(t,r,n){var s=Vo(t),i=Ho(s);if(0===i)return!e&&-1;var o,c=Go(n,i);if(e&&r!=r){for(;i>c;)if((o=s[c++])!=o)return!0}else for(;i>c;c++)if((e||c in s)&&s[c]===r)return e||c||0;return!e&&-1}},Xo={includes:zo(!0),indexOf:zo(!1)},Wo={},Yo=Ds,Zo=Rn,Ko=Xo.indexOf,Qo=Wo,ec=Qr([].push),tc=function(e,t){var r,n=Zo(e),s=0,i=[];for(r in n)!Yo(Qo,r)&&Yo(n,r)&&ec(i,r);for(;t.length>s;)Yo(n,r=t[s++])&&(~Ko(i,r)||ec(i,r));return i},rc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],nc=tc,sc=rc.concat("length","prototype");Io.f=Object.getOwnPropertyNames||function(e){return nc(e,sc)};var ic={};ic.f=Object.getOwnPropertySymbols;var oc=Ln,cc=Io,ac=ic,uc=Ni,lc=Qr([].concat),hc=oc("Reflect","ownKeys")||function(e){var t=cc.f(uc(e)),r=ac.f;return r?lc(t,r(e)):t},fc=Ds,pc=hc,dc=ln,mc=Ri,vc=function(e,t,r){for(var n=pc(t),s=mc.f,i=dc.f,o=0;o<n.length;o++){var c=n[o];fc(e,c)||r&&fc(r,c)||s(e,c,i(t,c))}},yc={},bc=tc,gc=rc,wc=Object.keys||function(e){return bc(e,gc)},xc=hn,jc=Di,Ec=Ri,$c=Ni,Oc=Rn,Sc=wc;yc.f=xc&&!jc?Object.defineProperties:function(e,t){$c(e);for(var r,n=Oc(t),s=Sc(t),i=s.length,o=0;i>o;)Ec.f(e,r=s[o++],n[r]);return e};var Ac,Pc=Ln("document","documentElement"),Tc=Ni,kc=yc,Fc=rc,Ic=Wo,Rc=Pc,Dc=ai,_c=lo("IE_PROTO"),Cc=function(){},Mc=function(e){return"<script>"+e+"<\/script>"},Nc=function(e){e.write(Mc("")),e.close();var t=e.parentWindow.Object;return e=null,t},qc=function(){try{Ac=new ActiveXObject("htmlfile")}catch(e){}var e,t;qc="undefined"!=typeof document?document.domain&&Ac?Nc(Ac):((t=Dc("iframe")).style.display="none",Rc.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Mc("document.F=Object")),e.close(),e.F):Nc(Ac);for(var r=Fc.length;r--;)delete qc.prototype[Fc[r]];return qc()};Ic[_c]=!0;var Bc=Object.create||function(e,t){var r;return null!==e?(Cc.prototype=Tc(e),r=new Cc,Cc.prototype=null,r[_c]=e):r=qc(),void 0===t?r:kc.f(r,t)},Lc=_n,Uc=Wi,Jc=function(e,t){Lc(t)&&"cause"in t&&Uc(e,"cause",t.cause)},Vc=Error,Gc=Qr("".replace),Hc=String(new Vc("zxcasd").stack),zc=/\n\s*at [^:]*:[^\n]*/,Xc=zc.test(Hc),Wc=xn,Yc=!Ur((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Wc(1,7)),7!==e.stack)})),Zc=Wi,Kc=function(e,t){if(Xc&&"string"==typeof e&&!Vc.prepareStackTrace)for(;t--;)e=Gc(e,zc,"");return e},Qc=Yc,ea=Error.captureStackTrace,ta=function(e,t,r,n){Qc&&(ea?ea(e,t):Zc(e,"stack",Kc(r,n)))},ra={},na=ra,sa=Xs("iterator"),ia=Array.prototype,oa={};oa[Xs("toStringTag")]="z";var ca="[object z]"===String(oa),aa=ca,ua=un,la=nn,ha=Xs("toStringTag"),fa=Object,pa="Arguments"===la(function(){return arguments}()),da=aa?la:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=fa(e),ha))?r:pa?la(t):"Object"===(n=la(t))&&ua(t.callee)?"Arguments":n},ma=da,va=ms,ya=An,ba=ra,ga=Xs("iterator"),wa=function(e){if(!ya(e))return va(e,ga)||va(e,"@@iterator")||ba[ma(e)]},xa=dn,ja=fs,Ea=Ni,$a=as,Oa=wa,Sa=TypeError,Aa=dn,Pa=Ni,Ta=ms,ka=Ii,Fa=dn,Ia=Ni,Ra=as,Da=function(e){return void 0!==e&&(na.Array===e||ia[sa]===e)},_a=Jo,Ca=Un,Ma=function(e,t){var r=arguments.length<2?Oa(e):t;if(ja(r))return Ea(xa(r,e));throw new Sa($a(e)+" is not iterable")},Na=wa,qa=function(e,t,r){var n,s;Pa(e);try{if(!(n=Ta(e,"return"))){if("throw"===t)throw r;return r}n=Aa(n,e)}catch(e){s=!0,n=e}if("throw"===t)throw r;if(s)throw n;return Pa(n),r},Ba=TypeError,La=function(e,t){this.stopped=e,this.result=t},Ua=La.prototype,Ja=da,Va=String,Ga=function(e){if("Symbol"===Ja(e))throw new TypeError("Cannot convert a Symbol value to a string");return Va(e)},Ha=Ga,za=function(e,t){return void 0===e?arguments.length<2?"":t:Ha(e)},Xa=co,Wa=Un,Ya=wo,Za=Fo,Ka=vc,Qa=Bc,eu=Wi,tu=xn,ru=Jc,nu=ta,su=function(e,t,r){var n,s,i,o,c,a,u,l=r&&r.that,h=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),m=ka(t,l),v=function(e){return n&&qa(n,"normal",e),new La(!0,e)},y=function(e){return h?(Ia(e),d?m(e[0],e[1],v):m(e[0],e[1])):d?m(e,v):m(e)};if(f)n=e.iterator;else if(p)n=e;else{if(!(s=Na(e)))throw new Ba(Ra(e)+" is not iterable");if(Da(s)){for(i=0,o=_a(e);o>i;i++)if((c=y(e[i]))&&Ca(Ua,c))return c;return new La(!1)}n=Ma(e,s)}for(a=f?e.next:n.next;!(u=Fa(a,n)).done;){try{c=y(u.value)}catch(e){qa(n,"throw",e)}if("object"==typeof c&&c&&Ca(Ua,c))return c}return new La(!1)},iu=za,ou=Xs("toStringTag"),cu=Error,au=[].push,uu=function(e,t){var r,n=Wa(lu,this);Za?r=Za(new cu,n?Ya(this):lu):(r=n?this:Qa(lu),eu(r,ou,"Error")),void 0!==t&&eu(r,"message",iu(t)),nu(r,uu,r.stack,1),arguments.length>2&&ru(r,arguments[2]);var s=[];return su(e,au,{that:s}),eu(r,"errors",s),r};Za?Za(uu,cu):Ka(uu,cu,{name:!0});var lu=uu.prototype=Qa(cu.prototype,{constructor:tu(1,uu),message:tu(1,""),name:tu(1,"AggregateError")});Xa({global:!0,constructor:!0,arity:2},{AggregateError:uu});var hu=Ri.f,fu=un,pu=_n,du=Fo,mu=Ln,vu=Wi,yu=Un,bu=Fo,gu=vc,wu=function(e,t,r){r in e||hu(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},xu=function(e,t,r){var n,s;return du&&fu(n=t.constructor)&&n!==r&&pu(s=n.prototype)&&s!==r.prototype&&du(e,s),e},ju=za,Eu=Jc,$u=ta,Ou=hn,Su=function(e,t,r,n){var s="stackTraceLimit",i=n?2:1,o=e.split("."),c=o[o.length-1],a=mu.apply(null,o);if(a){var u=a.prototype;if(!r)return a;var l=mu("Error"),h=t((function(e,t){var r=ju(n?t:e,void 0),s=n?new a(e):new a;return void 0!==r&&vu(s,"message",r),$u(s,h,s.stack,2),this&&yu(u,this)&&xu(s,this,h),arguments.length>i&&Eu(s,arguments[i]),s}));return h.prototype=u,"Error"!==c?bu?bu(h,l):gu(h,l,{name:!0}):Ou&&s in a&&(wu(h,a,s),wu(h,a,"prepareStackTrace")),gu(h,a),h}},Au=co,Pu=Xr,Tu=Su,ku=Lr.WebAssembly,Fu=7!==new Error("e",{cause:7}).cause,Iu=function(e,t){var r={};r[e]=Tu(e,t,Fu),Au({global:!0,constructor:!0,arity:1,forced:Fu},r)},Ru=function(e,t){if(ku&&ku[e]){var r={};r[e]=Tu("WebAssembly."+e,t,Fu),Au({target:"WebAssembly",stat:!0,constructor:!0,arity:1,forced:Fu},r)}};Iu("Error",(function(e){return function(t){return Pu(e,this,arguments)}})),Iu("EvalError",(function(e){return function(t){return Pu(e,this,arguments)}})),Iu("RangeError",(function(e){return function(t){return Pu(e,this,arguments)}})),Iu("ReferenceError",(function(e){return function(t){return Pu(e,this,arguments)}})),Iu("SyntaxError",(function(e){return function(t){return Pu(e,this,arguments)}})),Iu("TypeError",(function(e){return function(t){return Pu(e,this,arguments)}})),Iu("URIError",(function(e){return function(t){return Pu(e,this,arguments)}})),Ru("CompileError",(function(e){return function(t){return Pu(e,this,arguments)}})),Ru("LinkError",(function(e){return function(t){return Pu(e,this,arguments)}})),Ru("RuntimeError",(function(e){return function(t){return Pu(e,this,arguments)}}));var Du=co,_u=Xr,Cu=Ur,Mu=Su,Nu=Ln("AggregateError"),qu=!Cu((function(){return 1!==Nu([1]).errors[0]}))&&Cu((function(){return 7!==Nu([1],"AggregateError",{cause:7}).cause}));Du({global:!0,constructor:!0,arity:2,forced:qu},{AggregateError:Mu("AggregateError",(function(e){return function(t,r){return _u(e,this,arguments)}}),qu,!0)});var Bu,Lu,Uu,Ju=un,Vu=Lr.WeakMap,Gu=Ju(Vu)&&/native code/.test(String(Vu)),Hu=Lr,zu=_n,Xu=Wi,Wu=Ds,Yu=Ss,Zu=lo,Ku=Wo,Qu=Hu.TypeError,el=Hu.WeakMap;if(Gu||Yu.state){var tl=Yu.state||(Yu.state=new el);tl.get=tl.get,tl.has=tl.has,tl.set=tl.set,Bu=function(e,t){if(tl.has(e))throw new Qu("Object already initialized");return t.facade=e,tl.set(e,t),t},Lu=function(e){return tl.get(e)||{}},Uu=function(e){return tl.has(e)}}else{var rl=Zu("state");Ku[rl]=!0,Bu=function(e,t){if(Wu(e,rl))throw new Qu("Object already initialized");return t.facade=e,Xu(e,rl,t),t},Lu=function(e){return Wu(e,rl)?e[rl]:{}},Uu=function(e){return Wu(e,rl)}}var nl,sl,il,ol={set:Bu,get:Lu,has:Uu,enforce:function(e){return Uu(e)?Lu(e):Bu(e,{})},getterFor:function(e){return function(t){var r;if(!zu(t)||(r=Lu(t)).type!==e)throw new Qu("Incompatible receiver, "+e+" required");return r}}},cl=hn,al=Ds,ul=Function.prototype,ll=cl&&Object.getOwnPropertyDescriptor,hl=al(ul,"name"),fl={EXISTS:hl,PROPER:hl&&"something"===function(){}.name,CONFIGURABLE:hl&&(!cl||cl&&ll(ul,"name").configurable)},pl=Wi,dl=function(e,t,r,n){return n&&n.enumerable?e[t]=r:pl(e,t,r),e},ml=Ur,vl=un,yl=_n,bl=Bc,gl=wo,wl=dl,xl=Xs("iterator"),jl=!1;[].keys&&("next"in(il=[].keys())?(sl=gl(gl(il)))!==Object.prototype&&(nl=sl):jl=!0);var El=!yl(nl)||ml((function(){var e={};return nl[xl].call(e)!==e}));vl((nl=El?{}:bl(nl))[xl])||wl(nl,xl,(function(){return this}));var $l={IteratorPrototype:nl,BUGGY_SAFARI_ITERATORS:jl},Ol=da,Sl=ca?{}.toString:function(){return"[object "+Ol(this)+"]"},Al=ca,Pl=Ri.f,Tl=Wi,kl=Ds,Fl=Sl,Il=Xs("toStringTag"),Rl=function(e,t,r,n){var s=r?e:e&&e.prototype;s&&(kl(s,Il)||Pl(s,Il,{configurable:!0,value:t}),n&&!Al&&Tl(s,"toString",Fl))},Dl=$l.IteratorPrototype,_l=Bc,Cl=xn,Ml=Rl,Nl=ra,ql=function(){return this},Bl=co,Ll=dn,Ul=fl,Jl=function(e,t,r,n){var s=t+" Iterator";return e.prototype=_l(Dl,{next:Cl(+!n,r)}),Ml(e,s,!1,!0),Nl[s]=ql,e},Vl=wo,Gl=Rl,Hl=dl,zl=ra,Xl=$l,Wl=Ul.PROPER,Yl=Xl.BUGGY_SAFARI_ITERATORS,Zl=Xs("iterator"),Kl=function(){return this},Ql=function(e,t,r,n,s,i,o){Jl(r,t,n);var c,a,u,l=function(e){if(e===s&&m)return m;if(!Yl&&e&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",f=!1,p=e.prototype,d=p[Zl]||p["@@iterator"]||s&&p[s],m=!Yl&&d||l(s),v="Array"===t&&p.entries||d;if(v&&(c=Vl(v.call(new e)))!==Object.prototype&&c.next&&(Gl(c,h,!0,!0),zl[h]=Kl),Wl&&"values"===s&&d&&"values"!==d.name&&(f=!0,m=function(){return Ll(d,this)}),s)if(a={values:l("values"),keys:i?m:l("keys"),entries:l("entries")},o)for(u in a)(Yl||f||!(u in p))&&Hl(p,u,a[u]);else Bl({target:t,proto:!0,forced:Yl||f},a);return o&&p[Zl]!==m&&Hl(p,Zl,m,{name:s}),zl[t]=m,a},eh=function(e,t){return{value:e,done:t}},th=Rn,rh=ra,nh=ol;Ri.f;var sh=Ql,ih=eh,oh=nh.set,ch=nh.getterFor("Array Iterator");sh(Array,"Array",(function(e,t){oh(this,{type:"Array Iterator",target:th(e),index:0,kind:t})}),(function(){var e=ch(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,ih(void 0,!0);switch(e.kind){case"keys":return ih(r,!1);case"values":return ih(t[r],!1)}return ih([r,t[r]],!1)}),"values"),rh.Arguments=rh.Array;var ah=Qr,uh=Co,lh=Ga,hh=kn,fh=ah("".charAt),ph=ah("".charCodeAt),dh=ah("".slice),mh=function(e){return function(t,r){var n,s,i=lh(hh(t)),o=uh(r),c=i.length;return o<0||o>=c?e?"":void 0:(n=ph(i,o))<55296||n>56319||o+1===c||(s=ph(i,o+1))<56320||s>57343?e?fh(i,o):n:e?dh(i,o,o+2):s-56320+(n-55296<<10)+65536}},vh={codeAt:mh(!1),charAt:mh(!0)}.charAt,yh=Ga,bh=ol,gh=Ql,wh=eh,xh=bh.set,jh=bh.getterFor("String Iterator");gh(String,"String",(function(e){xh(this,{type:"String Iterator",string:yh(e),index:0})}),(function(){var e,t=jh(this),r=t.string,n=t.index;return n>=r.length?wh(void 0,!0):(e=vh(r,n),t.index+=e.length,wh(e,!1))}));var Eh=Cn.AggregateError,$h={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Oh=Lr,Sh=Rl,Ah=ra;for(var Ph in $h)Sh(Oh[Ph],Ph),Ah[Ph]=Ah.Array;const Th=dr(Eh);class kh extends Th{constructor(e,t,r){if(super(e,t,r),this.name=this.constructor.name,"string"==typeof t&&(this.message=t),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,null!=r&&"object"==typeof r&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:e}=r;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class Fh extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(kh,e)}constructor(e,t){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class Ih extends Fh{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}class Rh extends Fh{}class Dh extends Rh{}var _h=function(){return!1},Ch=function(){return!0};function Mh(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function Nh(e){return function t(r){return 0===arguments.length||Mh(r)?t:e.apply(this,arguments)}}function qh(e){return function t(r,n){switch(arguments.length){case 0:return t;case 1:return Mh(r)?t:Nh((function(t){return e(r,t)}));default:return Mh(r)&&Mh(n)?t:Mh(r)?Nh((function(t){return e(t,n)})):Mh(n)?Nh((function(t){return e(r,t)})):e(r,n)}}}function Bh(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,n){return t.apply(this,arguments)};case 4:return function(e,r,n,s){return t.apply(this,arguments)};case 5:return function(e,r,n,s,i){return t.apply(this,arguments)};case 6:return function(e,r,n,s,i,o){return t.apply(this,arguments)};case 7:return function(e,r,n,s,i,o,c){return t.apply(this,arguments)};case 8:return function(e,r,n,s,i,o,c,a){return t.apply(this,arguments)};case 9:return function(e,r,n,s,i,o,c,a,u){return t.apply(this,arguments)};case 10:return function(e,r,n,s,i,o,c,a,u,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function Lh(e,t,r){return function(){for(var n=[],s=0,i=e,o=0,c=!1;o<t.length||s<arguments.length;){var a;o<t.length&&(!Mh(t[o])||s>=arguments.length)?a=t[o]:(a=arguments[s],s+=1),n[o]=a,Mh(a)?c=!0:i-=1,o+=1}return!c&&i<=0?r.apply(this,n):Bh(Math.max(0,i),Lh(e,n,r))}}var Uh=qh((function(e,t){return 1===e?Nh(t):Bh(e,Lh(e,[],t))}));function Jh(e){return function t(r,n,s){switch(arguments.length){case 0:return t;case 1:return Mh(r)?t:qh((function(t,n){return e(r,t,n)}));case 2:return Mh(r)&&Mh(n)?t:Mh(r)?qh((function(t,r){return e(t,n,r)})):Mh(n)?qh((function(t,n){return e(r,t,n)})):Nh((function(t){return e(r,n,t)}));default:return Mh(r)&&Mh(n)&&Mh(s)?t:Mh(r)&&Mh(n)?qh((function(t,r){return e(t,r,s)})):Mh(r)&&Mh(s)?qh((function(t,r){return e(t,n,r)})):Mh(n)&&Mh(s)?qh((function(t,n){return e(r,t,n)})):Mh(r)?Nh((function(t){return e(t,n,s)})):Mh(n)?Nh((function(t){return e(r,t,s)})):Mh(s)?Nh((function(t){return e(r,n,t)})):e(r,n,s)}}}const Vh=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function Gh(e){return null!=e&&"function"==typeof e["@@transducer/step"]}function Hh(e,t,r){return function(){if(0===arguments.length)return r();var n=arguments[arguments.length-1];if(!Vh(n)){for(var s=0;s<e.length;){if("function"==typeof n[e[s]])return n[e[s]].apply(n,Array.prototype.slice.call(arguments,0,-1));s+=1}if(Gh(n)){var i=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return i(n)}}return r.apply(this,arguments)}}function zh(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Xh=function(){return this.xf["@@transducer/init"]()},Wh=function(e){return this.xf["@@transducer/result"](e)};var Yh=function(){function e(e,t){this.xf=t,this.f=e,this.all=!0}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=function(e){return this.all&&(e=this.xf["@@transducer/step"](e,!0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)||(this.all=!1,e=zh(this.xf["@@transducer/step"](e,!1))),e},e}();function Zh(e){return function(t){return new Yh(e,t)}}var Kh=qh(Hh(["all"],Zh,(function(e,t){for(var r=0;r<t.length;){if(!e(t[r]))return!1;r+=1}return!0})));function Qh(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function ef(e,t,r){for(var n=0,s=r.length;n<s;){if(e(t,r[n]))return!0;n+=1}return!1}function tf(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const rf="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var nf=Object.prototype.toString,sf=function(){return"[object Arguments]"===nf.call(arguments)?function(e){return"[object Arguments]"===nf.call(e)}:function(e){return tf("callee",e)}}(),of=!{toString:null}.propertyIsEnumerable("toString"),cf=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],af=function(){return arguments.propertyIsEnumerable("length")}(),uf=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},lf="function"!=typeof Object.keys||af?Nh((function(e){if(Object(e)!==e)return[];var t,r,n=[],s=af&&sf(e);for(t in e)!tf(t,e)||s&&"length"===t||(n[n.length]=t);if(of)for(r=cf.length-1;r>=0;)tf(t=cf[r],e)&&!uf(n,t)&&(n[n.length]=t),r-=1;return n})):Nh((function(e){return Object(e)!==e?[]:Object.keys(e)})),hf=Nh((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function ff(e,t,r,n){var s=Qh(e);function i(e,t){return pf(e,t,r.slice(),n.slice())}return!ef((function(e,t){return!ef(i,t,e)}),Qh(t),s)}function pf(e,t,r,n){if(rf(e,t))return!0;var s=hf(e);if(s!==hf(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!rf(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!rf(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===e)return n[i]===t;i-=1}switch(s){case"Map":return e.size===t.size&&ff(e.entries(),t.entries(),r.concat([e]),n.concat([t]));case"Set":return e.size===t.size&&ff(e.values(),t.values(),r.concat([e]),n.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=lf(e);if(o.length!==lf(t).length)return!1;var c=r.concat([e]),a=n.concat([t]);for(i=o.length-1;i>=0;){var u=o[i];if(!tf(u,t)||!pf(t[u],e[u],c,a))return!1;i-=1}return!0}var df=qh((function(e,t){return pf(e,t,[],[])}));function mf(e,t){return function(e,t,r){var n,s;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(n=1/t;r<e.length;){if(0===(s=e[r])&&1/s===n)return r;r+=1}return-1}if(t!=t){for(;r<e.length;){if("number"==typeof(s=e[r])&&s!=s)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(null===t)return e.indexOf(t,r)}for(;r<e.length;){if(df(e[r],t))return r;r+=1}return-1}(t,e,0)>=0}function vf(e,t){for(var r=0,n=t.length,s=Array(n);r<n;)s[r]=e(t[r]),r+=1;return s}function yf(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var bf=function(e){return(e<10?"0":"")+e},gf="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+bf(e.getUTCMonth()+1)+"-"+bf(e.getUTCDate())+"T"+bf(e.getUTCHours())+":"+bf(e.getUTCMinutes())+":"+bf(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function wf(e){return function(){return!e.apply(this,arguments)}}function xf(e,t,r){for(var n=0,s=r.length;n<s;)t=e(t,r[n]),n+=1;return t}function jf(e){return"[object Object]"===Object.prototype.toString.call(e)}var Ef=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=Wh,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();function $f(e){return function(t){return new Ef(e,t)}}var Of=qh(Hh(["fantasy-land/filter","filter"],$f,(function(e,t){return jf(t)?xf((function(r,n){return e(t[n])&&(r[n]=t[n]),r}),{},lf(t)):function(e,t){for(var r=0,n=t.length,s=[];r<n;)e(t[r])&&(s[s.length]=t[r]),r+=1;return s}(e,t)}))),Sf=qh((function(e,t){return Of(wf(e),t)}));function Af(e,t){var r=function(r){var n=t.concat([e]);return mf(r,n)?"<Circular>":Af(r,n)},n=function(e,t){return vf((function(t){return yf(t)+": "+r(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+vf(r,e).join(", ")+"))";case"[object Array]":return"["+vf(r,e).concat(n(e,Sf((function(e){return/^\d+$/.test(e)}),lf(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):yf(gf(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":yf(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var s=e.toString();if("[object Object]"!==s)return s}return"{"+n(e,lf(e)).join(", ")+"}"}}var Pf=Nh((function(e){return Af(e,[])})),Tf=qh((function(e,t){if(e===t)return t;function r(e,t){if(e>t!=t>e)return t>e?t:e}var n=r(e,t);if(void 0!==n)return n;var s=r(typeof e,typeof t);if(void 0!==s)return s===typeof e?e:t;var i=Pf(e),o=r(i,Pf(t));return void 0!==o&&o===i?e:t})),kf=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=Wh,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),Ff=qh(Hh(["fantasy-land/map","map"],(function(e){return function(t){return new kf(e,t)}}),(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Uh(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return xf((function(r,n){return r[n]=e(t[n]),r}),{},lf(t));default:return vf(e,t)}})));const If=Number.isInteger||function(e){return e<<0===e};function Rf(e){return"[object String]"===Object.prototype.toString.call(e)}function Df(e,t){var r=e<0?t.length+e:e;return Rf(t)?t.charAt(r):t[r]}var _f=qh((function(e,t){if(null!=t)return If(e)?Df(e,t):t[e]})),Cf=qh((function(e,t){return Ff(_f(e),t)})),Mf=Nh((function(e){return!!Vh(e)||!!e&&("object"==typeof e&&(!Rf(e)&&(0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))})),Nf="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function qf(e,t,r){return function(n,s,i){if(Mf(i))return e(n,s,i);if(null==i)return s;if("function"==typeof i["fantasy-land/reduce"])return t(n,s,i,"fantasy-land/reduce");if(null!=i[Nf])return r(n,s,i[Nf]());if("function"==typeof i.next)return r(n,s,i);if("function"==typeof i.reduce)return t(n,s,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function Bf(e,t,r){for(var n=0,s=r.length;n<s;){if((t=e["@@transducer/step"](t,r[n]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n+=1}return e["@@transducer/result"](t)}var Lf=qh((function(e,t){return Bh(e.length,(function(){return e.apply(t,arguments)}))}));function Uf(e,t,r){for(var n=r.next();!n.done;){if((t=e["@@transducer/step"](t,n.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}n=r.next()}return e["@@transducer/result"](t)}function Jf(e,t,r,n){return e["@@transducer/result"](r[n](Lf(e["@@transducer/step"],e),t))}var Vf=qf(Bf,Jf,Uf),Gf=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function Hf(e){return new Gf(e)}var zf=Jh((function(e,t,r){return Vf("function"==typeof e?Hf(e):e,t,r)})),Xf=Nh((function(e){return Uh(zf(Tf,0,Cf("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0}))})),Wf=Nh((function(e){return function(){return e}})),Yf=qh((function(e,t){return e&&t})),Zf=Nh((function(e){return Uh(zf(Tf,0,Cf("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(e[t].apply(this,arguments))return!0;t+=1}return!1}))}));function Kf(e,t,r){for(var n=r.next();!n.done;)t=e(t,n.value),n=r.next();return t}function Qf(e,t,r,n){return r[n](e,t)}var ep=qf(xf,Qf,Kf),tp=qh((function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(r){return e(r)(t(r))}:ep((function(e,r){return function(e,t){var r;t=t||[];var n=(e=e||[]).length,s=t.length,i=[];for(r=0;r<n;)i[i.length]=e[r],r+=1;for(r=0;r<s;)i[i.length]=t[r],r+=1;return i}(e,Ff(r,t))}),[],e)})),rp=qh((function(e,t){return e.apply(this,t)})),np=Nh((function(e){return Uh(e.length,e)}));var sp=Nh((function(e){return null==e})),ip=Jh((function e(t,r,n){if(0===t.length)return r;var s=t[0];if(t.length>1){var i=!sp(n)&&tf(s,n)&&"object"==typeof n[s]?n[s]:If(t[1])?[]:{};r=e(Array.prototype.slice.call(t,1),r,i)}return function(e,t,r){if(If(e)&&Vh(r)){var n=[].concat(r);return n[e]=t,n}var s={};for(var i in r)s[i]=r[i];return s[e]=t,s}(s,r,n)}));function op(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}var cp=qh((function(e,t){var r=Uh(e,t);return Uh(e,(function(){return xf(tp,Ff(r,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),ap=Nh((function(e){return cp(e.length,e)})),up=qh((function(e,t){return op(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:ap(Yf)(e,t)}));function lp(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}function hp(e,t,r){if(r||(r=new fp),function(e){var t=typeof e;return null==e||"object"!=t&&"function"!=t}(e))return e;var n=function(t){var n=r.get(e);if(n)return n;for(var s in r.set(e,t),e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t};switch(hf(e)){case"Object":return n(Object.create(Object.getPrototypeOf(e)));case"Array":return n(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return lp(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var fp=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var r=this.hash(e),n=this.map[r];n||(this.map[r]=n=[]),n.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var r in e)t.push(Object.prototype.toString.call(e[r]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var r=this.map[t],n=0;n<r.length;n+=1){if((i=r[n])[0]===e)return i[1]}else{var s=this.hash(e);if(r=this.map[s])for(n=0;n<r.length;n+=1){var i;if((i=r[n])[0]===e)return i[1]}}},e}(),pp=Nh((function(e){return function(t,r){return e(t,r)?-1:e(r,t)?1:0}})),dp=ap(Nh((function(e){return!e})));function mp(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function vp(e,t){return function(){var r=arguments.length;if(0===r)return t();var n=arguments[r-1];return Vh(n)||"function"!=typeof n[e]?t.apply(this,arguments):n[e].apply(n,Array.prototype.slice.call(arguments,0,r-1))}}var yp=Jh(vp("slice",(function(e,t,r){return Array.prototype.slice.call(r,e,t)}))),bp=Nh(vp("tail",yp(1,1/0)));function gp(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return Bh(arguments[0].length,zf(mp,arguments[0],bp(arguments)))}var wp=Nh((function(e){return Df(0,e)}));function xp(e){return e}var jp=Nh(xp),Ep=qh((function(e,t){return Uh(zf(Tf,0,Cf("length",t)),(function(){var r=arguments,n=this;return e.apply(n,vf((function(e){return e.apply(n,r)}),t))}))})),$p=function(){function e(e,t,r,n){this.valueFn=e,this.valueAcc=t,this.keyFn=r,this.xf=n,this.inputs={}}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=function(e){var t;for(t in this.inputs)if(tf(t,this.inputs)&&(e=this.xf["@@transducer/step"](e,this.inputs[t]))["@@transducer/reduced"]){e=e["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){var r=this.keyFn(t);return this.inputs[r]=this.inputs[r]||[r,hp(this.valueAcc)],this.inputs[r][1]=this.valueFn(this.inputs[r][1],t),e},e}();function Op(e,t,r){return function(n){return new $p(e,t,r,n)}}var Sp=Lh(4,[],Hh([],Op,(function(e,t,r,n){var s=Hf((function(n,s){var i=r(s),o=e(tf(i,n)?n[i]:hp(t),s);return o&&o["@@transducer/reduced"]?zh(n):(n[i]=o,n)}));return Vf(s,{},n)}))),Ap=qh((function(e,t){return null==t||t!=t?e:t})),Pp=function(){function e(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return e.prototype.add=function(e){return!Tp(e,!0,this)},e.prototype.has=function(e){return Tp(e,!1,this)},e}();function Tp(e,t,r){var n,s=typeof e;switch(s){case"string":case"number":return 0===e&&1/e==-1/0?!!r._items["-0"]||(t&&(r._items["-0"]=!0),!1):null!==r._nativeSet?t?(n=r._nativeSet.size,r._nativeSet.add(e),r._nativeSet.size===n):r._nativeSet.has(e):s in r._items?e in r._items[s]||(t&&(r._items[s][e]=!0),!1):(t&&(r._items[s]={},r._items[s][e]=!0),!1);case"boolean":if(s in r._items){var i=e?1:0;return!!r._items[s][i]||(t&&(r._items[s][i]=!0),!1)}return t&&(r._items[s]=e?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?t?(n=r._nativeSet.size,r._nativeSet.add(e),r._nativeSet.size===n):r._nativeSet.has(e):s in r._items?!!mf(e,r._items[s])||(t&&r._items[s].push(e),!1):(t&&(r._items[s]=[e]),!1);case"undefined":return!!r._items[s]||(t&&(r._items[s]=!0),!1);case"object":if(null===e)return!!r._items.null||(t&&(r._items.null=!0),!1);default:return(s=Object.prototype.toString.call(e))in r._items?!!mf(e,r._items[s])||(t&&r._items[s].push(e),!1):(t&&(r._items[s]=[e]),!1)}}var kp=qh((function(e,t){for(var r=[],n=0,s=e.length,i=t.length,o=new Pp,c=0;c<i;c+=1)o.add(t[c]);for(;n<s;)o.add(e[n])&&(r[r.length]=e[n]),n+=1;return r})),Fp=function(){function e(e,t){this.xf=t,this.n=e,this.i=0}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=Wh,e.prototype["@@transducer/step"]=function(e,t){this.i+=1;var r=0===this.n?e:this.xf["@@transducer/step"](e,t);return this.n>=0&&this.i>=this.n?zh(r):r},e}();function Ip(e){return function(t){return new Fp(e,t)}}var Rp=qh(Hh(["take"],Ip,(function(e,t){return yp(0,e<0?1/0:e,t)})));function Dp(e,t){for(var r=t.length-1;r>=0&&e(t[r]);)r-=1;return yp(0,r+1,t)}var _p=function(){function e(e,t){this.f=e,this.retained=[],this.xf=t}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=function(e){return this.retained=null,this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.retain(e,t):this.flush(e,t)},e.prototype.flush=function(e,t){return e=Vf(this.xf,e,this.retained),this.retained=[],this.xf["@@transducer/step"](e,t)},e.prototype.retain=function(e,t){return this.retained.push(t),e},e}();function Cp(e){return function(t){return new _p(e,t)}}var Mp=qh(Hh([],Cp,Dp)),Np=Nh((function(e){return Df(-1,e)})),qp=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=Wh,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();function Bp(e){return function(t){return new qp(e,t)}}var Lp=qh(Hh(["dropWhile"],Bp,(function(e,t){for(var r=0,n=t.length;r<n&&e(t[r]);)r+=1;return yp(r,1/0,t)}))),Up=qh((function(e,t){return e||t})),Jp=qh((function(e,t){return op(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:ap(Up)(e,t)}));var Vp=Nh((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():Vh(e)?[]:Rf(e)?"":jf(e)?{}:sf(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0})),Gp=Nh((function(e){return Uh(e.length,(function(t,r){var n=Array.prototype.slice.call(arguments,0);return n[0]=r,n[1]=t,e.apply(this,n)}))})),Hp=qh(vp("groupBy",Sp((function(e,t){return e.push(t),e}),[]))),zp=qh((function(e,t){if(0===e.length||sp(t))return!1;for(var r=t,n=0;n<e.length;){if(sp(r)||!tf(e[n],r))return!1;r=r[e[n]],n+=1}return!0})),Xp=qh((function(e,t){return zp([e],t)})),Wp=function(e,t){switch(arguments.length){case 0:return Wp;case 1:return function t(r){return 0===arguments.length?t:rf(e,r)};default:return rf(e,t)}},Yp=Jh((function(e,t,r){return Uh(Math.max(e.length,t.length,r.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):r.apply(this,arguments)}))})),Zp=qh(mf),Kp=yp(0,-1),Qp=qh((function(e,t){return Uh(e+1,(function(){var r=arguments[e];if(null!=r&&op(r[t]))return r[t].apply(r,Array.prototype.slice.call(arguments,0,e));throw new TypeError(Pf(r)+' does not have a method named "'+t+'"')}))})),ed=Nh((function(e){return null!=e&&df(e,Vp(e))})),td=Nh((function(e){return!ed(e)})),rd=Qp(1,"join");function nd(e){return"[object Number]"===Object.prototype.toString.call(e)}var sd=qh((function(e,t){return function(r){return function(n){return Ff((function(e){return t(e,n)}),r(e(n)))}}}));function id(e,t){for(var r=t,n=0;n<e.length;n+=1){if(null==r)return;var s=e[n];r=If(s)?Df(s,r):r[s]}return r}var od=qh((function(e,t){return xf((function(r,n){return r[n]=e(t[n],n,t),r}),{},lf(t))})),cd=Jh((function(e,t,r){var n,s={};for(n in r=r||{},t=t||{})tf(n,t)&&(s[n]=tf(n,r)?e(n,t[n],r[n]):t[n]);for(n in r)tf(n,r)&&!tf(n,s)&&(s[n]=r[n]);return s})),ad=Jh((function e(t,r,n){return cd((function(r,n,s){return jf(n)&&jf(s)?e(t,n,s):t(r,n,s)}),r,n)})),ud=qh((function(e,t){return ad((function(e,t,r){return r}),e,t)})),ld=qh((function(e,t){return Kh(wf(e),t)})),hd=function(e){return{value:e,map:function(t){return hd(t(e))}}},fd=Jh((function(e,t,r){return e((function(e){return hd(t(e))}))(r).value})),pd=qh(id),dd=Jh((function(e,t,r){return Ap(e,id(t,r))})),md=Jh((function(e,t,r){return e(id(t,r))})),vd=qh((function(e,t){for(var r={},n=0;n<e.length;)e[n]in t&&(r[e[n]]=t[e[n]]),n+=1;return r})),yd=Jh((function(e,t,r){return df(e,_f(t,r))})),bd=Jh((function(e,t,r){return Ap(e,_f(t,r))})),gd=Jh((function(e,t,r){return e(_f(t,r))})),wd=qh((function(e,t){if(!nd(e)||!nd(t))throw new TypeError("Both arguments to range must be numbers");for(var r=Array(e<t?t-e:0),n=e<0?t+Math.abs(e):t-e,s=0;s<n;)r[s]=s+e,s+=1;return r})),xd=Nh(zh),jd=Jh((function(e,t,r){return r.replace(e,t)})),Ed=qh((function(e,t){return Array.prototype.slice.call(t,0).sort(e)})),$d=Qp(1,"split"),Od=qh((function(e,t){return df(Rp(e.length,t),e)}));var Sd=qh((function(e,t){if(r=e,"[object RegExp]"!==Object.prototype.toString.call(r))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+Pf(e));var r;return lp(e).test(t)})),Ad=function(){function e(e,t){this.xf=t,this.pred=e,this.items=[]}return e.prototype["@@transducer/init"]=Xh,e.prototype["@@transducer/result"]=Wh,e.prototype["@@transducer/step"]=function(e,t){return ef(this.pred,t,this.items)?e:(this.items.push(t),this.xf["@@transducer/step"](e,t))},e}();function Pd(e){return function(t){return new Ad(e,t)}}var Td=qh(Hh([],Pd,(function(e,t){for(var r,n=0,s=t.length,i=[];n<s;)ef(e,r=t[n],i)||(i[i.length]=r),n+=1;return i}))),kd=Jh((function(e,t,r){return e(r)?t(r):r})),Fd=Wf(void 0),Id=df(Fd()),Rd=dp(Id),Dd=df(null),_d=dp(Dd),Cd=dp(sp),Md=Uh(1,gp(hf,Wp("GeneratorFunction"))),Nd=Uh(1,gp(hf,Wp("AsyncFunction"))),qd=Zf([gp(hf,Wp("Function")),Md,Nd]),Bd=Uh(1,qd(Array.isArray)?Array.isArray:gp(hf,Wp("Array"))),Ld=up(Bd,ed),Ud=up(Bd,td),Jd=Uh(1,gp(hf,Wp("String"))),Vd=df("");function Gd(e){return Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gd(e)}var Hd=function(e){return"object"===Gd(e)},zd=dp(Uh(1,up(_d,Jp(Hd,qd)))),Xd=Xf([Jd,zd,td]),Wd=dp(qd),Yd=Uh(1,up(_d,Hd)),Zd=gp(hf,Wp("Object")),Kd=gp(Pf,df(Pf(Object))),Qd=md(up(qd,Kd),["constructor"]),em=Uh(1,(function(e){if(!Yd(e)||!Zd(e))return!1;var t=Object.getPrototypeOf(e);return!!Dd(t)||Qd(t)})),tm=up(Uh(1,gp(hf,Wp("Number"))),isFinite),rm=Uh(1,tm),nm=up(qd(Number.isFinite)?Uh(1,Lf(Number.isFinite,Number)):rm,Ep(df,[Math.floor,jp])),sm=Uh(1,nm),im=qd(Number.isInteger)?Uh(1,Lf(Number.isInteger,Number)):sm,om=Uh(1,gp(hf,Wp("RegExp")));function cm(e){return function(e){if(Array.isArray(e))return am(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return am(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?am(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function am(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var um,lm,hm=gp(Ed(pp((function(e,t){return e.length>t.length}))),wp,_f("length")),fm=np((function(e,t,r){var n=r.apply(void 0,cm(e));return Cd(n)?xd(n):t})),pm=Yp(Ud,(function(e){var t=hm(e);return Uh(t,(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zf(fm(r),void 0,e)}))}),Fd),dm=Gp(Zp),mm=Uh(3,(function(e,t,r){var n=pd(e,r),s=pd(Kp(e),r);if(!Wd(n)&&!Ld(e)){var i=Lf(n,s);return rp(i,t)}})),vm=kd(Jd,jd(/[.*+?^${}()|[\]\\-]/g,"\\$&")),ym=function(e,t){if("string"!=typeof e&&!(e instanceof String))throw TypeError("`".concat(t,"` must be a string"))},bm=Uh(3,(function(e,t,r){!function(e,t,r){if(null==r||null==e||null==t)throw TypeError("Input values must not be `null` or `undefined`")}(e,t,r),ym(r,"str"),ym(t,"replaceValue"),function(e){if(!("string"==typeof e||e instanceof String||e instanceof RegExp))throw TypeError("`searchValue` must be a string or an regexp")}(e);var n=new RegExp(om(e)?e:vm(e),"g");return jd(n,t,r)})),gm=Qp(2,"replaceAll"),wm=qd(String.prototype.replaceAll)?gm:bm,xm=np((function(e,t){return gp($d(""),Mp(dm(e)),rd(""))(t)})),jm=np((function(e,t){return gp($d(""),Lp(dm(e)),rd(""))(t)})),Em={exports:{}},$m=Em.exports={};function Om(){throw new Error("setTimeout has not been defined")}function Sm(){throw new Error("clearTimeout has not been defined")}function Am(e){if(um===setTimeout)return setTimeout(e,0);if((um===Om||!um)&&setTimeout)return um=setTimeout,setTimeout(e,0);try{return um(e,0)}catch(t){try{return um.call(null,e,0)}catch(t){return um.call(this,e,0)}}}!function(){try{um="function"==typeof setTimeout?setTimeout:Om}catch(e){um=Om}try{lm="function"==typeof clearTimeout?clearTimeout:Sm}catch(e){lm=Sm}}();var Pm,Tm=[],km=!1,Fm=-1;function Im(){km&&Pm&&(km=!1,Pm.length?Tm=Pm.concat(Tm):Fm=-1,Tm.length&&Rm())}function Rm(){if(!km){var e=Am(Im);km=!0;for(var t=Tm.length;t;){for(Pm=Tm,Tm=[];++Fm<t;)Pm&&Pm[Fm].run();Fm=-1,t=Tm.length}Pm=null,km=!1,function(e){if(lm===clearTimeout)return clearTimeout(e);if((lm===Sm||!lm)&&clearTimeout)return lm=clearTimeout,clearTimeout(e);try{lm(e)}catch(t){try{return lm.call(null,e)}catch(t){return lm.call(this,e)}}}(e)}}function Dm(e,t){this.fun=e,this.array=t}function _m(){}$m.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Tm.push(new Dm(e,t)),1!==Tm.length||km||Am(Rm)},Dm.prototype.run=function(){this.fun.apply(null,this.array)},$m.title="browser",$m.browser=!0,$m.env={},$m.argv=[],$m.version="",$m.versions={},$m.on=_m,$m.addListener=_m,$m.once=_m,$m.off=_m,$m.removeListener=_m,$m.removeAllListeners=_m,$m.emit=_m,$m.prependListener=_m,$m.prependOnceListener=_m,$m.listeners=function(e){return[]},$m.binding=function(e){throw new Error("process.binding is not supported")},$m.cwd=function(){return"/"},$m.chdir=function(e){throw new Error("process.chdir is not supported")},$m.umask=function(){return 0};const Cm=dr(Em.exports),Mm=()=>md(Sd(/^win/),["platform"],Cm),Nm=e=>{try{const t=new URL(e);return xm(":",t.protocol)}catch{return}},qm=gp(Nm,Rd),Bm=e=>{const t=e.lastIndexOf(".");return t>=0?e.substring(t).toLowerCase():""},Lm=e=>{if(Cm.browser)return!1;const t=Nm(e);return Id(t)||"file"===t||/^[a-zA-Z]$/.test(t)},Um=e=>{const t=Nm(e);return"http"===t||"https"===t},Jm=(e,t)=>{const r=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],n=bd(!1,"keepFileProtocol",t),s=bd(Mm,"isWindows",t);let i=decodeURI(e);for(let e=0;e<r.length;e+=2)i=i.replace(r[e],r[e+1]);let o="file://"===i.substring(0,7).toLowerCase();return o&&(i="/"===i[7]?i.substring(8):i.substring(7),s()&&"/"===i[1]&&(i=`${i[0]}:${i.substring(1)}`),n?i=`file:///${i}`:(o=!1,i=s()?i:`/${i}`)),s()&&!o&&(i=wm("/","\\",i),":\\"===i.substring(1,3)&&(i=i[0].toUpperCase()+i.substring(1))),i},Vm=e=>{const t=[/\?/g,"%3F",/#/g,"%23"];let r=e;Mm()&&(r=r.replace(/\\/g,"/")),r=encodeURI(r);for(let e=0;e<t.length;e+=2)r=r.replace(t[e],t[e+1]);return r},Gm=e=>{const t=e.indexOf("#");return-1!==t?e.substring(t):"#"},Hm=e=>{const t=e.indexOf("#");let r=e;return t>=0&&(r=e.substring(0,t)),r},zm=()=>{if(Cm.browser)return Hm(globalThis.location.href);const e=Cm.cwd(),t=Np(e);return["/","\\"].includes(t)?e:e+(Mm()?"\\":"/")},Xm=(e,t)=>{const r=new URL(t,new URL(e,"resolve://"));if("resolve:"===r.protocol){const{pathname:e,search:t,hash:n}=r;return e+t+n}return r.toString()},Wm=e=>{if(Lm(e))return Vm(Jm(e));try{return new URL(e).toString()}catch{return encodeURI(decodeURI(e)).replace(/%5B/g,"[").replace(/%5D/g,"]")}},Ym=e=>Lm(e)?Jm(e):decodeURI(e),Zm=Object.freeze(Object.defineProperty({__proto__:null,cwd:zm,fromFileSystemPath:Vm,getExtension:Bm,getHash:Gm,getProtocol:Nm,hasProtocol:qm,isFileSystemPath:Lm,isHttpUrl:Um,isURI:e=>{try{return new URL(e)&&!0}catch{return!1}},resolve:Xm,sanitize:Wm,stripHash:Hm,toFileSystemPath:Jm,unsanitize:Ym},Symbol.toStringTag,{value:"Module"}));let Km=class{uri;mediaType;data;parseResult;constructor({uri:e,mediaType:t="text/plain",data:r,parseResult:n}){this.uri=e,this.mediaType=t,this.data=r,this.parseResult=n}get extension(){return Jd(this.uri)?Bm(this.uri):""}toString(){if("string"==typeof this.data)return this.data;if(this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(hf(this.data))||ArrayBuffer.isView(this.data)){return new TextDecoder("utf-8").decode(this.data)}return String(this.data)}};class Qm{rootRef;refs;circular;constructor({refs:e=[],circular:t=!1}={}){this.refs=[],this.circular=t,e.forEach(this.add.bind(this))}get size(){return this.refs.length}add(e){return this.has(e)||(this.refs.push(e),this.rootRef=void 0===this.rootRef?e:this.rootRef,e.refSet=this),this}merge(e){for(const t of e.values())this.add(t);return this}has(e){const t=Jd(e)?e:e.uri;return Rd(this.find((e=>e.uri===t)))}find(e){return this.refs.find(e)}*values(){yield*this.refs}clean(){this.refs.forEach((e=>{e.refSet=void 0})),this.rootRef=void 0,this.refs.length=0}}const ev={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:"ignore",circularReplacer:jp,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}},tv=sd(pd(["resolve","baseURI"]),ip(["resolve","baseURI"])),rv=e=>Vd(e)?zm():e,nv=(e,t)=>{const r=ud(e,t);return fd(tv,rv,r)};class sv extends Fh{plugin;constructor(e,t){super(e,{cause:t.cause}),this.plugin=t.plugin}}const iv=async(e,t,r)=>{const n=await Promise.all(r.map(mm([e],t)));return r.filter(((e,t)=>n[t]))},ov=async(e,t,r)=>{let n;for(const s of r)try{const r=await s[e].call(s,...t);return{plugin:s,result:r}}catch(e){n=new sv("Error while running plugin",{cause:e,plugin:s})}return Promise.reject(n)};class cv extends Fh{}class av extends Fh{}class uv extends av{}class lv extends uv{}const hv=async(e,t)=>{const r=new Km({uri:Wm(Hm(e)),mediaType:t.parse.mediaType}),n=await(async(e,t)=>{const r=t.resolve.resolvers.map((e=>{const r=Object.create(e);return Object.assign(r,t.resolve.resolverOpts)})),n=await iv("canRead",[e,t],r);if(ed(n))throw new lv(e.uri);try{const{result:t}=await ov("read",[e],n);return t}catch(t){throw new av(`Error while reading file "${e.uri}"`,{cause:t})}})(r,t);return(async(e,t)=>{const r=t.parse.parsers.map((e=>{const r=Object.create(e);return Object.assign(r,t.parse.parserOpts)})),n=await iv("canParse",[e,t],r);if(ed(n))throw new lv(e.uri);try{const{plugin:r,result:s}=await ov("parse",[e,t],n);return!r.allowEmpty&&s.isEmpty?Promise.reject(new cv(`Error while parsing file "${e.uri}". File is empty.`)):s}catch(t){throw new cv(`Error while parsing file "${e.uri}"`,{cause:t})}})(new Km({...r,data:n}),t)};var fv=function(e){return null===e},pv="object"==typeof global&&global&&global.Object===Object&&global,dv=pv,mv="object"==typeof self&&self&&self.Object===Object&&self,vv=dv||mv||Function("return this")(),yv=vv.Symbol,bv=yv,gv=Object.prototype,wv=gv.hasOwnProperty,xv=gv.toString,jv=bv?bv.toStringTag:void 0;var Ev=function(e){var t=wv.call(e,jv),r=e[jv];try{e[jv]=void 0;var n=!0}catch(e){}var s=xv.call(e);return n&&(t?e[jv]=r:delete e[jv]),s},$v=Object.prototype.toString;var Ov=Ev,Sv=function(e){return $v.call(e)},Av=yv?yv.toStringTag:void 0;var Pv=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Av&&Av in Object(e)?Ov(e):Sv(e)},Tv=Array.isArray;var kv=function(e){return null!=e&&"object"==typeof e},Fv=Pv,Iv=Tv,Rv=kv;var Dv=function(e){return"string"==typeof e||!Iv(e)&&Rv(e)&&"[object String]"==Fv(e)},_v=Pv,Cv=kv;var Mv=function(e){return"number"==typeof e||Cv(e)&&"[object Number]"==_v(e)},Nv=Pv,qv=kv;var Bv=function(e){return!0===e||!1===e||qv(e)&&"[object Boolean]"==Nv(e)};var Lv=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var Uv=class{constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};e._meta&&e._meta.length>0&&(t.meta=this.serialiseObject(e.meta)),e._attributes&&e._attributes.length>0&&(t.attributes=this.serialiseObject(e.attributes));const r=this.serialiseContent(e.content);return void 0!==r&&(t.content=r),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));t.element!==e.element&&(t.element=e.element),e.meta&&this.deserialiseObject(e.meta,t.meta),e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const r=this.deserialiseContent(e.content);return void 0===r&&null!==t.content||(t.content=r),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}if(e&&e.map){if(0===e.length)return;return e.map(this.serialise,this)}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}serialiseObject(e){const t={};if(e.forEach(((e,r)=>{e&&(t[r.toValue()]=this.serialise(e))})),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach((r=>{t.set(r,this.deserialise(e[r]))}))}};var Jv=function(){this.u=[],this.size=0};var Vv=function(e,t){return e===t||e!=e&&t!=t},Gv=Vv;var Hv=function(e,t){for(var r=e.length;r--;)if(Gv(e[r][0],t))return r;return-1},zv=Hv,Xv=Array.prototype.splice;var Wv=function(e){var t=this.u,r=zv(t,e);return!(r<0)&&(r==t.length-1?t.pop():Xv.call(t,r,1),--this.size,!0)},Yv=Hv;var Zv=function(e){var t=this.u,r=Yv(t,e);return r<0?void 0:t[r][1]},Kv=Hv;var Qv=Hv;var ey=function(e,t){var r=this.u,n=Qv(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ty=Jv,ry=Wv,ny=Zv,sy=function(e){return Kv(this.u,e)>-1},iy=ey;function oy(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}oy.prototype.clear=ty,oy.prototype.delete=ry,oy.prototype.get=ny,oy.prototype.has=sy,oy.prototype.set=iy;var cy=oy,ay=cy;var uy=function(){this.u=new ay,this.size=0};var ly=function(e){var t=this.u,r=t.delete(e);return this.size=t.size,r};var hy=function(e){return this.u.get(e)};var fy=function(e){return this.u.has(e)},py=Pv,dy=Lv;var my=function(e){if(!dy(e))return!1;var t=py(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},vy=vv["o"],yy=function(){var e=/[^.]+$/.exec(vy&&vy.keys&&vy.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var by=function(e){return!!yy&&yy in e},gy=Function.prototype.toString;var wy=function(e){if(null!=e){try{return gy.call(e)}catch(e){}try{return e+""}catch(e){}}return""},xy=my,jy=by,Ey=Lv,$y=wy,Oy=/^\[object .+?Constructor\]$/,Sy=Function.prototype,Ay=Object.prototype,Py=Sy.toString,Ty=Ay.hasOwnProperty,ky=RegExp("^"+Py.call(Ty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Fy=function(e){return!(!Ey(e)||jy(e))&&(xy(e)?ky:Oy).test($y(e))},Iy=function(e,t){return null==e?void 0:e[t]};var Ry=function(e,t){var r=Iy(e,t);return Fy(r)?r:void 0},Dy=Ry(vv,"Map"),_y=Ry(Object,"create"),Cy=_y;var My=function(){this.u=Cy?Cy(null):{},this.size=0};var Ny=function(e){var t=this.has(e)&&delete this.u[e];return this.size-=t?1:0,t},qy=_y,By=Object.prototype.hasOwnProperty;var Ly=function(e){var t=this.u;if(qy){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return By.call(t,e)?t[e]:void 0},Uy=_y,Jy=Object.prototype.hasOwnProperty;var Vy=function(e){var t=this.u;return Uy?void 0!==t[e]:Jy.call(t,e)},Gy=_y;var Hy=function(e,t){var r=this.u;return this.size+=this.has(e)?0:1,r[e]=Gy&&void 0===t?"__lodash_hash_undefined__":t,this},zy=My,Xy=Ny,Wy=Ly,Yy=Vy,Zy=Hy;function Ky(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ky.prototype.clear=zy,Ky.prototype.delete=Xy,Ky.prototype.get=Wy,Ky.prototype.has=Yy,Ky.prototype.set=Zy;var Qy=Ky,eb=cy,tb=Dy;var rb=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},nb=rb;var sb=function(e,t){var r=e.u;return nb(t)?r["string"==typeof t?"string":"hash"]:r.map},ib=sb;var ob=sb;var cb=sb;var ab=sb;var ub=function(e,t){var r=ab(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},lb=function(){this.size=0,this.u={hash:new Qy,map:new(tb||eb),string:new Qy}},hb=function(e){var t=ib(this,e).delete(e);return this.size-=t?1:0,t},fb=function(e){return ob(this,e).get(e)},pb=function(e){return cb(this,e).has(e)},db=ub;function mb(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mb.prototype.clear=lb,mb.prototype.delete=hb,mb.prototype.get=fb,mb.prototype.has=pb,mb.prototype.set=db;var vb=mb,yb=cy,bb=Dy,gb=vb;var wb=function(e,t){var r=this.u;if(r instanceof yb){var n=r.u;if(!bb||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.u=new gb(n)}return r.set(e,t),this.size=r.size,this},xb=cy,jb=uy,Eb=ly,$b=hy,Ob=fy,Sb=wb;function Ab(e){var t=this.u=new xb(e);this.size=t.size}Ab.prototype.clear=jb,Ab.prototype.delete=Eb,Ab.prototype.get=$b,Ab.prototype.has=Ob,Ab.prototype.set=Sb;var Pb=Ab;var Tb=vb,kb=function(e){return this.u.set(e,"__lodash_hash_undefined__"),this},Fb=function(e){return this.u.has(e)};function Ib(e){var t=-1,r=null==e?0:e.length;for(this.u=new Tb;++t<r;)this.add(e[t])}Ib.prototype.add=Ib.prototype.push=kb,Ib.prototype.has=Fb;var Rb=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var Db=Ib,_b=Rb,Cb=function(e,t){return e.has(t)};var Mb=function(e,t,r,n,s,i){var o=1&r,c=e.length,a=t.length;if(c!=a&&!(o&&a>c))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var h=-1,f=!0,p=2&r?new Db:void 0;for(i.set(e,t),i.set(t,e);++h<c;){var d=e[h],m=t[h];if(n)var v=o?n(m,d,h,t,e,i):n(d,m,h,e,t,i);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!_b(t,(function(e,t){if(!Cb(p,t)&&(d===e||s(d,e,r,n,i)))return p.push(t)}))){f=!1;break}}else if(d!==m&&!s(d,m,r,n,i)){f=!1;break}}return i.delete(e),i.delete(t),f};var Nb=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r};var qb=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},Bb=vv.Uint8Array,Lb=Vv,Ub=Mb,Jb=Nb,Vb=qb,Gb=yv?yv.prototype:void 0,Hb=Gb?Gb.valueOf:void 0;var zb=function(e,t,r,n,s,i,o){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Bb(e),new Bb(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Lb(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var c=Jb;case"[object Set]":var a=1&n;if(c||(c=Vb),e.size!=t.size&&!a)return!1;var u=o.get(e);if(u)return u==t;n|=2,o.set(e,t);var l=Ub(c(e),c(t),n,s,i,o);return o.delete(e),l;case"[object Symbol]":if(Hb)return Hb.call(e)==Hb.call(t)}return!1};var Xb=function(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e},Wb=Xb,Yb=Tv;var Zb=function(e,t,r){var n=t(e);return Yb(e)?n:Wb(n,r(e))};var Kb=function(e,t){for(var r=-1,n=null==e?0:e.length,s=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[s++]=o)}return i};var Qb=Kb,eg=function(){return[]},tg=Object.prototype.propertyIsEnumerable,rg=Object.getOwnPropertySymbols,ng=rg?function(e){return null==e?[]:(e=Object(e),Qb(rg(e),(function(t){return tg.call(e,t)})))}:eg;var sg=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},ig=Pv,og=kv;var cg=function(e){return og(e)&&"[object Arguments]"==ig(e)},ag=kv,ug=Object.prototype,lg=ug.hasOwnProperty,hg=ug.propertyIsEnumerable,fg=cg(function(){return arguments}())?cg:function(e){return ag(e)&&lg.call(e,"callee")&&!hg.call(e,"callee")},pg={exports:{}};var dg=function(){return!1};!function(e,t){var r=vv,n=dg,s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,o=i&&i.exports===s?r.Buffer:void 0,c=(o?o.isBuffer:void 0)||n;e.exports=c}(pg,pg.exports);var mg=pg.exports,vg=/^(?:0|[1-9]\d*)$/;var yg=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&vg.test(e))&&e>-1&&e%1==0&&e<t};var bg=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},gg=Pv,wg=bg,xg=kv,jg={};jg["[object Float32Array]"]=jg["[object Float64Array]"]=jg["[object Int8Array]"]=jg["[object Int16Array]"]=jg["[object Int32Array]"]=jg["[object Uint8Array]"]=jg["[object Uint8ClampedArray]"]=jg["[object Uint16Array]"]=jg["[object Uint32Array]"]=!0,jg["[object Arguments]"]=jg["[object Array]"]=jg["[object ArrayBuffer]"]=jg["[object Boolean]"]=jg["[object DataView]"]=jg["[object Date]"]=jg["[object Error]"]=jg["[object Function]"]=jg["[object Map]"]=jg["[object Number]"]=jg["[object Object]"]=jg["[object RegExp]"]=jg["[object Set]"]=jg["[object String]"]=jg["[object WeakMap]"]=!1;var Eg=function(e){return xg(e)&&wg(e.length)&&!!jg[gg(e)]};var $g=function(e){return function(t){return e(t)}},Og={exports:{}};!function(e,t){var r=pv,n=t&&!t.nodeType&&t,s=n&&e&&!e.nodeType&&e,i=s&&s.exports===n&&r.process,o=function(){try{var e=s&&s.require&&s.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(Og,Og.exports);var Sg=Og.exports,Ag=Eg,Pg=$g,Tg=Sg&&Sg.isTypedArray,kg=Tg?Pg(Tg):Ag,Fg=sg,Ig=fg,Rg=Tv,Dg=mg,_g=yg,Cg=kg,Mg=Object.prototype.hasOwnProperty;var Ng=function(e,t){var r=Rg(e),n=!r&&Ig(e),s=!r&&!n&&Dg(e),i=!r&&!n&&!s&&Cg(e),o=r||n||s||i,c=o?Fg(e.length,String):[],a=c.length;for(var u in e)!t&&!Mg.call(e,u)||o&&("length"==u||s&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||_g(u,a))||c.push(u);return c},qg=Object.prototype;var Bg=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||qg)};var Lg=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),Ug=Bg,Jg=Lg,Vg=Object.prototype.hasOwnProperty;var Gg=my,Hg=bg;var zg=Ng,Xg=function(e){if(!Ug(e))return Jg(e);var t=[];for(var r in Object(e))Vg.call(e,r)&&"constructor"!=r&&t.push(r);return t},Wg=function(e){return null!=e&&Hg(e.length)&&!Gg(e)};var Yg=Zb,Zg=ng,Kg=function(e){return Wg(e)?zg(e):Xg(e)};var Qg=function(e){return Yg(e,Kg,Zg)},ew=Object.prototype.hasOwnProperty;var tw=function(e,t,r,n,s,i){var o=1&r,c=Qg(e),a=c.length;if(a!=Qg(t).length&&!o)return!1;for(var u=a;u--;){var l=c[u];if(!(o?l in t:ew.call(t,l)))return!1}var h=i.get(e),f=i.get(t);if(h&&f)return h==t&&f==e;var p=!0;i.set(e,t),i.set(t,e);for(var d=o;++u<a;){var m=e[l=c[u]],v=t[l];if(n)var y=o?n(v,m,l,t,e,i):n(m,v,l,e,t,i);if(!(void 0===y?m===v||s(m,v,r,n,i):y)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var b=e.constructor,g=t.constructor;b==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g||(p=!1)}return i.delete(e),i.delete(t),p},rw=Ry(vv,"DataView"),nw=Dy,sw=Ry(vv,"Promise"),iw=Ry(vv,"Set"),ow=Ry(vv,"WeakMap"),cw=Pv,aw=wy,uw=aw(rw),lw=aw(nw),hw=aw(sw),fw=aw(iw),pw=aw(ow),dw=cw;(rw&&"[object DataView]"!=dw(new rw(new ArrayBuffer(1)))||nw&&"[object Map]"!=dw(new nw)||sw&&"[object Promise]"!=dw(sw.resolve())||iw&&"[object Set]"!=dw(new iw)||ow&&"[object WeakMap]"!=dw(new ow))&&(dw=function(e){var t=cw(e),r="[object Object]"==t?e.constructor:void 0,n=r?aw(r):"";if(n)switch(n){case uw:return"[object DataView]";case lw:return"[object Map]";case hw:return"[object Promise]";case fw:return"[object Set]";case pw:return"[object WeakMap]"}return t});var mw=Pb,vw=Mb,yw=zb,bw=tw,gw=dw,ww=Tv,xw=mg,jw=kg,Ew="[object Object]",$w=Object.prototype.hasOwnProperty;var Ow=function(e,t,r,n,s,i){var o=ww(e),c=ww(t),a=o?"[object Array]":gw(e),u=c?"[object Array]":gw(t),l=(a="[object Arguments]"==a?Ew:a)==Ew,h=(u="[object Arguments]"==u?Ew:u)==Ew,f=a==u;if(f&&xw(e)){if(!xw(t))return!1;o=!0,l=!1}if(f&&!l)return i||(i=new mw),o||jw(e)?vw(e,t,r,n,s,i):yw(e,t,a,r,n,s,i);if(!(1&r)){var p=l&&$w.call(e,"__wrapped__"),d=h&&$w.call(t,"__wrapped__");if(p||d){var m=p?e.value():e,v=d?t.value():t;return i||(i=new mw),s(m,v,r,n,i)}}return!!f&&(i||(i=new mw),bw(e,t,r,n,s,i))},Sw=kv;var Aw=function e(t,r,n,s,i){return t===r||(null==t||null==r||!Sw(t)&&!Sw(r)?t!=t&&r!=r:Ow(t,r,n,s,e,i))},Pw=Aw;var Tw=function(e,t){return Pw(e,t)};var kw=class e{constructor(e,t){this.key=e,this.value=t}clone(){const t=new e;return this.key&&(t.key=this.key.clone()),this.value&&(t.value=this.value.clone()),t}};var Fw=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};const Iw=Fw;function Rw(e){return"string"==typeof e?t=>t.element===e:e.constructor&&e.extend?t=>t instanceof e:e}let Dw=class e{constructor(e){this.elements=e||[]}toValue(){return this.elements.map((e=>e.toValue()))}map(e,t){return this.elements.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((n=>{const s=e.bind(t)(n);s&&r.push(s)})),r}filter(t,r){return t=Rw(t),new e(this.elements.filter(t,r))}reject(t,r){return t=Rw(t),new e(this.elements.filter(Iw(t),r))}find(e,t){return e=Rw(e),this.elements.find(e,t)}forEach(e,t){this.elements.forEach(e,t)}reduce(e,t){return this.elements.reduce(e,t)}includes(e){return this.elements.some((t=>t.equals(e)))}shift(){return this.elements.shift()}unshift(e){this.elements.unshift(this.refract(e))}push(e){return this.elements.push(this.refract(e)),this}add(e){this.push(e)}get(e){return this.elements[e]}getValue(e){const t=this.elements[e];if(t)return t.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}};"undefined"!=typeof Symbol&&(Dw.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()});var _w=Dw;const Cw=Tw,Mw=kw,Nw=_w;var qw=class e{constructor(e,t,r){t&&(this.meta=t),r&&(this.attributes=r),this.content=e}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((e=>{e.parent=this,e.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const e=new this.constructor;return e.element=this.element,this.meta.length&&(e._meta=this.meta.clone()),this.attributes.length&&(e._attributes=this.attributes.clone()),this.content?this.content.clone?e.content=this.content.clone():Array.isArray(this.content)?e.content=this.content.map((e=>e.clone())):e.content=this.content:e.content=this.content,e}toValue(){return this.content instanceof e?this.content.toValue():this.content instanceof Mw?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((e=>e.toValue()),this):this.content}toRef(e){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const t=new this.RefElement(this.id.toValue());return e&&(t.path=e),t}findRecursive(...e){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const t=e.pop();let r=new Nw;const n=(e,t)=>(e.push(t),e),s=(e,r)=>{r.element===t&&e.push(r);const i=r.findRecursive(t);return i&&i.reduce(n,e),r.content instanceof Mw&&(r.content.key&&s(e,r.content.key),r.content.value&&s(e,r.content.value)),e};return this.content&&(this.content.element&&s(r,this.content),Array.isArray(this.content)&&this.content.reduce(s,r)),e.isEmpty||(r=r.filter((t=>{let r=t.parents.map((e=>e.element));for(const t in e){const n=e[t],s=r.indexOf(n);if(-1===s)return!1;r=r.splice(0,s)}return!0}))),r}set(e){return this.content=e,this}equals(e){return Cw(this.toValue(),e)}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}get element(){return this._storedElement||"element"}set element(e){this._storedElement=e}get content(){return this._content}set content(t){if(t instanceof e)this._content=t;else if(t instanceof Nw)this.content=t.elements;else if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"null"===t||null==t)this._content=t;else if(t instanceof Mw)this._content=t;else if(Array.isArray(t))this._content=t.map(this.refract);else{if("object"!=typeof t)throw new Error("Cannot set content to given value");this._content=Object.keys(t).map((e=>new this.MemberElement(e,t[e])))}}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof this.ObjectElement?this._meta=e:this.meta.set(e||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof this.ObjectElement?this._attributes=e:this.attributes.set(e||{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get title(){return this.getMetaProperty("title","")}set title(e){this.setMetaProperty("title",e)}get description(){return this.getMetaProperty("description","")}set description(e){this.setMetaProperty("description",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:e}=this;const t=new Nw;for(;e;)t.push(e),e=e.parent;return t}get children(){if(Array.isArray(this.content))return new Nw(this.content);if(this.content instanceof Mw){const e=new Nw([this.content.key]);return this.content.value&&e.push(this.content.value),e}return this.content instanceof e?new Nw([this.content]):new Nw}get recursiveChildren(){const e=new Nw;return this.children.forEach((t=>{e.push(t),t.recursiveChildren.forEach((t=>{e.push(t)}))})),e}};const Bw=qw;var Lw=class extends Bw{constructor(e,t,r){super(e||null,t,r),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}};const Uw=qw;const Jw=qw;const Vw=qw;const Gw=Fw,Hw=qw,zw=_w;let Xw=class extends Hw{constructor(e,t,r){super(e||[],t,r),this.element="array"}primitive(){return"array"}get(e){return this.content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}getIndex(e){return this.content[e]}set(e,t){return this.content[e]=this.refract(t),this}remove(e){const t=this.content.splice(e,1);return t.length?t[0]:null}map(e,t){return this.content.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((n=>{const s=e.bind(t)(n);s&&r.push(s)})),r}filter(e,t){return new zw(this.content.filter(e,t))}reject(e,t){return this.filter(Gw(e),t)}reduce(e,t){let r,n;void 0!==t?(r=0,n=this.refract(t)):(r=1,n="object"===this.primitive()?this.first.value:this.first);for(let t=r;t<this.length;t+=1){const r=this.content[t];n="object"===this.primitive()?this.refract(e(n,r.value,r.key,r,this)):this.refract(e(n,r,t,this))}return n}forEach(e,t){this.content.forEach(((r,n)=>{e.bind(t)(r,this.refract(n))}))}shift(){return this.content.shift()}unshift(e){this.content.unshift(this.refract(e))}push(e){return this.content.push(this.refract(e)),this}add(e){this.push(e)}findElements(e,t){const r=t||{},n=!!r.recursive,s=void 0===r.results?[]:r.results;return this.forEach(((t,r,i)=>{n&&void 0!==t.findElements&&t.findElements(e,{results:s,recursive:n}),e(t,r,i)&&s.push(t)})),s}find(e){return new zw(this.findElements(e,{recursive:!0}))}findByElement(e){return this.find((t=>t.element===e))}findByClass(e){return this.find((t=>t.classes.includes(e)))}getById(e){return this.find((t=>t.id.toValue()===e)).first}includes(e){return this.content.some((t=>t.equals(e)))}contains(e){return this.includes(e)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(e){return new this.constructor(this.content.concat(e.content))}"fantasy-land/concat"(e){return this.concat(e)}"fantasy-land/map"(e){return new this.constructor(this.map(e))}"fantasy-land/chain"(e){return this.map((t=>e(t)),this).reduce(((e,t)=>e.concat(t)),this.empty())}"fantasy-land/filter"(e){return new this.constructor(this.content.filter(e))}"fantasy-land/reduce"(e,t){return this.content.reduce(e,t)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}};Xw.empty=function(){return new this},Xw["fantasy-land/empty"]=Xw.empty,"undefined"!=typeof Symbol&&(Xw.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()});var Ww=Xw;const Yw=kw,Zw=qw;var Kw=class extends Zw{constructor(e,t,r,n){super(new Yw,r,n),this.element="member",this.key=e,this.value=t}get key(){return this.content.key}set key(e){this.content.key=this.refract(e)}get value(){return this.content.value}set value(e){this.content.value=this.refract(e)}};const Qw=Fw,ex=_w;var tx=class e extends ex{map(e,t){return this.elements.map((r=>e.bind(t)(r.value,r.key,r)))}filter(t,r){return new e(this.elements.filter((e=>t.bind(r)(e.value,e.key,e))))}reject(e,t){return this.filter(Qw(e.bind(t)))}forEach(e,t){return this.elements.forEach(((r,n)=>{e.bind(t)(r.value,r.key,r,n)}))}keys(){return this.map(((e,t)=>t.toValue()))}values(){return this.map((e=>e.toValue()))}};const rx=Fw,nx=Lv,sx=Ww,ix=Kw,ox=tx;var cx=class extends sx{constructor(e,t,r){super(e||[],t,r),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e)),{})}get(e){const t=this.getMember(e);if(t)return t.value}getMember(e){if(void 0!==e)return this.content.find((t=>t.key.toValue()===e))}remove(e){let t=null;return this.content=this.content.filter((r=>r.key.toValue()!==e||(t=r,!1))),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if(nx(e))return Object.keys(e).forEach((t=>{this.set(t,e[t])})),this;const r=e,n=this.getMember(r);return n?n.value=t:this.content.push(new ix(r,t)),this}keys(){return this.content.map((e=>e.key.toValue()))}values(){return this.content.map((e=>e.value.toValue()))}hasKey(e){return this.content.some((t=>t.key.equals(e)))}items(){return this.content.map((e=>[e.key.toValue(),e.value.toValue()]))}map(e,t){return this.content.map((r=>e.bind(t)(r.value,r.key,r)))}compactMap(e,t){const r=[];return this.forEach(((n,s,i)=>{const o=e.bind(t)(n,s,i);o&&r.push(o)})),r}filter(e,t){return new ox(this.content).filter(e,t)}reject(e,t){return this.filter(rx(e),t)}forEach(e,t){return this.content.forEach((r=>e.bind(t)(r.value,r.key,r)))}};const ax=qw;const ux=qw;const lx=qw,hx=Lw,fx=class extends Uw{constructor(e,t,r){super(e,t,r),this.element="string"}primitive(){return"string"}get length(){return this.content.length}},px=class extends Jw{constructor(e,t,r){super(e,t,r),this.element="number"}primitive(){return"number"}},dx=class extends Vw{constructor(e,t,r){super(e,t,r),this.element="boolean"}primitive(){return"boolean"}},mx=Ww,vx=Kw,yx=cx,bx=class extends ax{constructor(e,t,r){super(e||[],t,r),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}},gx=class extends ux{constructor(e,t,r){super(e||[],t,r),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}},wx=_w,xx=tx,jx=kw;function Ex(e){if(e instanceof lx)return e;if("string"==typeof e)return new fx(e);if("number"==typeof e)return new px(e);if("boolean"==typeof e)return new dx(e);if(null===e)return new hx;if(Array.isArray(e))return new mx(e.map(Ex));if("object"==typeof e){return new yx(e)}return e}lx.prototype.ObjectElement=yx,lx.prototype.RefElement=gx,lx.prototype.MemberElement=vx,lx.prototype.refract=Ex,wx.prototype.refract=Ex;var $x={Element:lx,NullElement:hx,StringElement:fx,NumberElement:px,BooleanElement:dx,ArrayElement:mx,MemberElement:vx,ObjectElement:yx,LinkElement:bx,RefElement:gx,refract:Ex,ArraySlice:wx,ObjectSlice:xx,KeyValuePair:jx};const Ox=fv,Sx=Dv,Ax=Mv,Px=Bv,Tx=Lv,kx=Uv,Fx=$x;let Ix=class{constructor(e){this.elementMap={},this.elementDetection=[],this.Element=Fx.Element,this.KeyValuePair=Fx.KeyValuePair,e&&e.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",Fx.NullElement).register("string",Fx.StringElement).register("number",Fx.NumberElement).register("boolean",Fx.BooleanElement).register("array",Fx.ArrayElement).register("object",Fx.ObjectElement).register("member",Fx.MemberElement).register("ref",Fx.RefElement).register("link",Fx.LinkElement),this.detect(Ox,Fx.NullElement,!1).detect(Sx,Fx.StringElement,!1).detect(Ax,Fx.NumberElement,!1).detect(Px,Fx.BooleanElement,!1).detect(Array.isArray,Fx.ArrayElement,!1).detect(Tx,Fx.ObjectElement,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,r){return void 0===r||r?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(let r=0;r<this.elementDetection.length;r+=1){const n=this.elementDetection[r][0],s=this.elementDetection[r][1];if(n(e)){t=new s(e);break}}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((e=>{const t=e[0].toUpperCase()+e.substr(1);this._elements[t]=this.elementMap[e]}))),this._elements}get serialiser(){return new kx(this)}};kx.prototype.Namespace=Ix;var Rx=Ix,Dx=kw,_x=$x.ArraySlice,Cx=$x.ObjectSlice,Mx=$x.Element,Nx=$x.StringElement,qx=$x.NumberElement,Bx=$x.BooleanElement,Lx=$x.NullElement,Ux=$x.ArrayElement,Jx=$x.ObjectElement,Vx=$x.MemberElement,Gx=$x.RefElement,Hx=$x.LinkElement,zx=$x.refract;class Xx extends Nx{constructor(e,t,r){super(e,t,r),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}class Wx extends Nx{constructor(e,t,r){super(e,t,r),this.element="comment"}}class Yx extends Ux{constructor(e,t,r){super(e,t,r),this.element="parseResult"}get api(){return this.children.filter((e=>e.classes.contains("api"))).first}get results(){return this.children.filter((e=>e.classes.contains("result")))}get result(){return this.results.first}get annotations(){return this.children.filter((e=>"annotation"===e.element))}get warnings(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("warning")))}get errors(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("error")))}get isEmpty(){return this.children.reject((e=>"annotation"===e.element)).isEmpty}replaceResult(e){const{result:t}=this;if(Id(t))return!1;const r=this.content.findIndex((e=>e===t));return-1!==r&&(this.content[r]=e,!0)}}class Zx extends Ux{constructor(e,t,r){super(e,t,r),this.element="sourceMap"}get positionStart(){return this.children.filter((e=>e.classes.contains("position"))).get(0)}get positionEnd(){return this.children.filter((e=>e.classes.contains("position"))).get(1)}set position(e){if(void 0===e)return;const t=new Ux([e.start.row,e.start.column,e.start.char]),r=new Ux([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),r.classes.push("position"),this.push(t).push(r)}}const Kx=(e,t)=>"object"==typeof t&&null!==t&&e in t&&"function"==typeof t[e],Qx=e=>"object"==typeof e&&null!=e&&"_storedElement"in e&&"string"==typeof e._storedElement&&"_content"in e,ej=(e,t)=>"object"==typeof t&&null!==t&&"primitive"in t&&("function"==typeof t.primitive&&t.primitive()===e),tj=(e,t)=>"object"==typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof Ux)&&t.classes.includes(e),rj=(e,t)=>"object"==typeof t&&null!==t&&"element"in t&&t.element===e,nj=e=>e({hasMethod:Kx,hasBasicElementProps:Qx,primitiveEq:ej,isElementType:rj,hasClass:tj}),sj=nj((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Mx||e(r)&&t(void 0,r))),ij=nj((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Nx||e(r)&&t("string",r))),oj=nj((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof qx||e(r)&&t("number",r))),cj=nj((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Lx||e(r)&&t("null",r))),aj=nj((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof Bx||e(r)&&t("boolean",r))),uj=nj((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof Jx||e(n)&&t("object",n)&&r("keys",n)&&r("values",n)&&r("items",n))),lj=nj((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>n=>n instanceof Ux&&!(n instanceof Jx)||e(n)&&t("array",n)&&r("push",n)&&r("unshift",n)&&r("map",n)&&r("reduce",n))),hj=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Vx||e(n)&&t("member",n)&&r(void 0,n))),fj=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Hx||e(n)&&t("link",n)&&r(void 0,n))),pj=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Gx||e(n)&&t("ref",n)&&r(void 0,n))),dj=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Xx||e(n)&&t("annotation",n)&&r("array",n))),mj=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Wx||e(n)&&t("comment",n)&&r("string",n))),vj=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Yx||e(n)&&t("parseResult",n)&&r("array",n))),yj=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof Zx||e(n)&&t("sourceMap",n)&&r("array",n))),bj=e=>rj("object",e)||rj("array",e)||rj("boolean",e)||rj("number",e)||rj("string",e)||rj("null",e)||rj("member",e),gj=e=>yj(e.meta.get("sourceMap")),wj=(e,t)=>0===e.length||Kh(dm(t.classes.toValue()),e),xj=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:gj,includesClasses:wj,includesSymbols:(e,t)=>{if(0===e.length)return!0;const r=t.attributes.get("symbols");return!!lj(r)&&Kh(dm(r.toValue()),e)},isAnnotationElement:dj,isArrayElement:lj,isBooleanElement:aj,isCommentElement:mj,isElement:sj,isLinkElement:fj,isMemberElement:hj,isNullElement:cj,isNumberElement:oj,isObjectElement:uj,isParseResultElement:vj,isPrimitiveElement:bj,isRefElement:pj,isSourceMapElement:yj,isStringElement:ij},Symbol.toStringTag,{value:"Module"}));class jj extends Rx{constructor(){super(),this.register("annotation",Xx),this.register("comment",Wx),this.register("parseResult",Yx),this.register("sourceMap",Zx)}}const Ej=new jj,$j=e=>{const t=new jj;return em(e)&&t.use(e),t},Oj=()=>({predicates:{...xj},namespace:Ej}),Sj=(e,t,r)=>{const n=e[t];if(null!=n){if(!r&&"function"==typeof n)return n;const e=r?n.leave:n.enter;if("function"==typeof e)return e}else{const n=r?e.leave:e.enter;if(null!=n){if("function"==typeof n)return n;const e=n[t];if("function"==typeof e)return e}}return null},Aj={},Pj=e=>null==e?void 0:e.type,Tj=e=>"string"==typeof Pj(e),kj=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),Fj=(e,{visitFnGetter:t=Sj,nodeTypeGetter:r=Pj,breakSymbol:n=Aj,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const c=Symbol("skip"),a=new Array(e.length).fill(c);return{enter(u,l,h,f,p,d){let m=u,v=!1;const y={...d,replaceWith(e,t){d.replaceWith(e,t),m=e}};for(let u=0;u<e.length;u+=1)if(a[u]===c){const c=t(e[u],r(m),!1);if("function"==typeof c){const t=c.call(e[u],m,l,h,f,p,y);if("function"==typeof(null==t?void 0:t.then))throw new Ih("Async visitor not supported in sync mode",{visitor:e[u],visitFn:c});if(t===i)a[u]=m;else if(t===n)a[u]=n;else{if(t===s)return t;if(void 0!==t){if(!o)return t;m=t,v=!0}}}}return v?m:void 0},leave(s,o,u,l,h,f){let p=s;const d={...f,replaceWith(e,t){f.replaceWith(e,t),p=e}};for(let s=0;s<e.length;s+=1)if(a[s]===c){const c=t(e[s],r(p),!0);if("function"==typeof c){const t=c.call(e[s],p,o,u,l,h,d);if("function"==typeof(null==t?void 0:t.then))throw new Ih("Async visitor not supported in sync mode",{visitor:e[s],visitFn:c});if(t===n)a[s]=n;else if(void 0!==t&&t!==i)return t}}else a[s]===p&&(a[s]=c)}}};Fj[Symbol.for("nodejs.util.promisify.custom")]=(e,{visitFnGetter:t=Sj,nodeTypeGetter:r=Pj,breakSymbol:n=Aj,deleteNodeSymbol:s=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const c=Symbol("skip"),a=new Array(e.length).fill(c);return{async enter(u,l,h,f,p,d){let m=u,v=!1;const y={...d,replaceWith(e,t){d.replaceWith(e,t),m=e}};for(let u=0;u<e.length;u+=1)if(a[u]===c){const c=t(e[u],r(m),!1);if("function"==typeof c){const t=await c.call(e[u],m,l,h,f,p,y);if(t===i)a[u]=m;else if(t===n)a[u]=n;else{if(t===s)return t;if(void 0!==t){if(!o)return t;m=t,v=!0}}}}return v?m:void 0},async leave(s,o,u,l,h,f){let p=s;const d={...f,replaceWith(e,t){f.replaceWith(e,t),p=e}};for(let s=0;s<e.length;s+=1)if(a[s]===c){const c=t(e[s],r(p),!0);if("function"==typeof c){const t=await c.call(e[s],p,o,u,l,h,d);if(t===n)a[s]=n;else if(void 0!==t&&t!==i)return t}}else a[s]===p&&(a[s]=c)}}};const Ij=(e,t,{keyMap:r=null,state:n={},breakSymbol:s=Aj,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=Sj,nodeTypeGetter:a=Pj,nodePredicate:u=Tj,nodeCloneFn:l=kj,detectCycles:h=!0}={})=>{const f=r||{};let p,d,m=Array.isArray(e),v=[e],y=-1,b=[],g=e;const w=[],x=[];do{y+=1;const e=y===v.length;let r;const $=e&&0!==b.length;if(e){if(r=0===x.length?void 0:w.pop(),g=d,d=x.pop(),$)if(m){g=g.slice();let e=0;for(const[t,r]of b){const n=t-e;r===i?(g.splice(n,1),e+=1):g[n]=r}}else{g=l(g);for(const[e,t]of b)g[e]=t}y=p.index,v=p.keys,b=p.edits,m=p.inArray,p=p.prev}else if(d!==i&&void 0!==d){if(r=m?y:v[y],g=d[r],g===i||void 0===g)continue;w.push(r)}let O;if(!Array.isArray(g)){var j;if(!u(g))throw new Ih(`Invalid AST Node: ${String(g)}`,{node:g});if(h&&x.includes(g)){w.pop();continue}const i=c(t,a(g),e);if(i){for(const[e,r]of Object.entries(n))t[e]=r;const s={replaceWith(t,n){"function"==typeof n?n(t,g,r,d,w,x):d&&(d[r]=t),e||(g=t)}};O=i.call(t,g,r,d,w,x,s)}if("function"==typeof(null===(j=O)||void 0===j?void 0:j.then))throw new Ih("Async visitor not supported in sync mode",{visitor:t,visitFn:i});if(O===s)break;if(O===o){if(!e){w.pop();continue}}else if(void 0!==O&&(b.push([r,O]),!e)){if(!u(O)){w.pop();continue}g=O}}var E;if(void 0===O&&$&&b.push([r,g]),!e)p={inArray:m,index:y,keys:v,edits:b,prev:p},m=Array.isArray(g),v=m?g:null!==(E=f[a(g)])&&void 0!==E?E:[],y=-1,b=[],d!==i&&void 0!==d&&x.push(d),d=g}while(void 0!==p);return 0!==b.length?b[b.length-1][1]:e};Ij[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=null,state:n={},breakSymbol:s=Aj,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=Sj,nodeTypeGetter:a=Pj,nodePredicate:u=Tj,nodeCloneFn:l=kj,detectCycles:h=!0}={})=>{const f=r||{};let p,d,m=Array.isArray(e),v=[e],y=-1,b=[],g=e;const w=[],x=[];do{y+=1;const e=y===v.length;let r;const E=e&&0!==b.length;if(e){if(r=0===x.length?void 0:w.pop(),g=d,d=x.pop(),E)if(m){g=g.slice();let e=0;for(const[t,r]of b){const n=t-e;r===i?(g.splice(n,1),e+=1):g[n]=r}}else{g=l(g);for(const[e,t]of b)g[e]=t}y=p.index,v=p.keys,b=p.edits,m=p.inArray,p=p.prev}else if(d!==i&&void 0!==d){if(r=m?y:v[y],g=d[r],g===i||void 0===g)continue;w.push(r)}let $;if(!Array.isArray(g)){if(!u(g))throw new Ih(`Invalid AST Node: ${String(g)}`,{node:g});if(h&&x.includes(g)){w.pop();continue}const i=c(t,a(g),e);if(i){for(const[e,r]of Object.entries(n))t[e]=r;const s={replaceWith(t,n){"function"==typeof n?n(t,g,r,d,w,x):d&&(d[r]=t),e||(g=t)}};$=await i.call(t,g,r,d,w,x,s)}if($===s)break;if($===o){if(!e){w.pop();continue}}else if(void 0!==$&&(b.push([r,$]),!e)){if(!u($)){w.pop();continue}g=$}}var j;if(void 0===$&&E&&b.push([r,g]),!e)p={inArray:m,index:y,keys:v,edits:b,prev:p},m=Array.isArray(g),v=m?g:null!==(j=f[a(g)])&&void 0!==j?j:[],y=-1,b=[],d!==i&&void 0!==d&&x.push(d),d=g}while(void 0!==p);return 0!==b.length?b[b.length-1][1]:e};class Rj extends Ih{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}}class Dj extends Rj{}class _j extends Rj{}const Cj=(e,t={})=>{const{visited:r=new WeakMap}=t,n={...t,visited:r};if(r.has(e))return r.get(e);if(e instanceof Dx){const{key:t,value:s}=e,i=sj(t)?Cj(t,n):t,o=sj(s)?Cj(s,n):s,c=new Dx(i,o);return r.set(e,c),c}if(e instanceof Cx){const t=e=>Cj(e,n),s=[...e].map(t),i=new Cx(s);return r.set(e,i),i}if(e instanceof _x){const t=e=>Cj(e,n),s=[...e].map(t),i=new _x(s);return r.set(e,i),i}if(sj(e)){const t=qj(e);if(r.set(e,t),e.content)if(sj(e.content))t.content=Cj(e.content,n);else if(e.content instanceof Dx)t.content=Cj(e.content,n);else if(Array.isArray(e.content)){const r=e=>Cj(e,n);t.content=e.content.map(r)}else t.content=e.content;else t.content=e.content;return t}throw new Dj("Value provided to cloneDeep function couldn't be cloned",{value:e})};Cj.safe=e=>{try{return Cj(e)}catch{return e}};const Mj=e=>{const{key:t,value:r}=e;return new Dx(t,r)},Nj=e=>{const t=new e.constructor;if(t.element=e.element,e.meta.length>0&&(t._meta=Cj(e.meta)),e.attributes.length>0&&(t._attributes=Cj(e.attributes)),sj(e.content)){const r=e.content;t.content=Nj(r)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof Dx?t.content=Mj(e.content):t.content=e.content;return t},qj=e=>{if(e instanceof Dx)return Mj(e);if(e instanceof Cx)return(e=>{const t=[...e];return new Cx(t)})(e);if(e instanceof _x)return(e=>{const t=[...e];return new _x(t)})(e);if(sj(e))return Nj(e);throw new _j("Value provided to cloneShallow function couldn't be cloned",{value:e})};qj.safe=e=>{try{return qj(e)}catch{return e}};const Bj=e=>uj(e)?"ObjectElement":lj(e)?"ArrayElement":hj(e)?"MemberElement":ij(e)?"StringElement":aj(e)?"BooleanElement":oj(e)?"NumberElement":cj(e)?"NullElement":fj(e)?"LinkElement":pj(e)?"RefElement":void 0,Lj=e=>sj(e)?qj(e):kj(e),Uj=gp(Bj,Jd),Jj={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};class Vj{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:e=_h,returnOnTrue:t,returnOnFalse:r}={}){this.result=[],this.predicate=e,this.returnOnTrue=t,this.returnOnFalse=r}enter(e){return this.predicate(e)?(this.result.push(e),this.returnOnTrue):this.returnOnFalse}}const Gj=(e,t,{keyMap:r=Jj,...n}={})=>Ij(e,t,{keyMap:r,nodeTypeGetter:Bj,nodePredicate:Uj,nodeCloneFn:Lj,...n});Gj[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=Jj,...n}={})=>Ij[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:r,nodeTypeGetter:Bj,nodePredicate:Uj,nodeCloneFn:Lj,...n});const Hj={toolboxCreator:Oj,visitorOptions:{nodeTypeGetter:Bj,exposeEdits:!0}},zj=(e,t,r={})=>{if(0===t.length)return e;const n=ud(Hj,r),{toolboxCreator:s,visitorOptions:i}=n,o=s(),c=t.map((e=>e(o))),a=Fj(c.map(bd({},"visitor")),{...i});c.forEach(mm(["pre"],[]));const u=Gj(e,a,i);return c.forEach(mm(["post"],[])),u};zj[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,r={})=>{if(0===t.length)return e;const n=ud(Hj,r),{toolboxCreator:s,visitorOptions:i}=n,o=s(),c=t.map((e=>e(o))),a=Fj[Symbol.for("nodejs.util.promisify.custom")],u=Gj[Symbol.for("nodejs.util.promisify.custom")],l=a(c.map(bd({},"visitor")),{...i});await Promise.allSettled(c.map(mm(["pre"],[])));const h=await u(e,l,i);return await Promise.allSettled(c.map(mm(["post"],[]))),h};var Xj={exports:{}};!function(e){var t=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,c=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&o(e,r,t[r]);if(n)for(var r of n(t))i.call(t,r)&&o(e,r,t[r]);return e},a=(e,t,r)=>(o(e,"symbol"!=typeof t?t+"":t,r),r),u={};((t,r)=>{for(var n in r)e(t,n,{get:r[n],enumerable:!0})})(u,{DEFAULT_OPTIONS:()=>h,DEFAULT_UUID_LENGTH:()=>l,default:()=>p});var l=6,h={dictionary:"alphanum",shuffle:!0,debug:!1,length:l,counter:0},f=class{constructor(e={}){a(this,"counter"),a(this,"debug"),a(this,"dict"),a(this,"version"),a(this,"dictIndex",0),a(this,"dictRange",[]),a(this,"lowerBound",0),a(this,"upperBound",0),a(this,"dictLength",0),a(this,"uuidLength"),a(this,"_digit_first_ascii",48),a(this,"_digit_last_ascii",58),a(this,"_alpha_lower_first_ascii",97),a(this,"_alpha_lower_last_ascii",123),a(this,"_hex_last_ascii",103),a(this,"_alpha_upper_first_ascii",65),a(this,"_alpha_upper_last_ascii",91),a(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),a(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),a(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),a(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),a(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),a(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),a(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),a(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),a(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),a(this,"log",((...e)=>{const t=[...e];if(t[0]=`[short-unique-id] ${e[0]}`,!0===this.debug&&"undefined"!=typeof console&&null!==console)return console.log(...t)})),a(this,"_normalizeDictionary",((e,t)=>{let r;if(e&&Array.isArray(e)&&e.length>1)r=e;else{let t;r=[],this.dictIndex=t=0;const n=`_${e}_dict_ranges`,s=this._dict_ranges[n];Object.keys(s).forEach((e=>{const n=e;for(this.dictRange=s[n],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=t=this.lowerBound;this.lowerBound<=this.upperBound?t<this.upperBound:t>this.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?t+=1:t-=1)r.push(String.fromCharCode(this.dictIndex))}))}if(t){const e=.5;r=r.sort((()=>Math.random()-e))}return r})),a(this,"setDictionary",((e,t)=>{this.dict=this._normalizeDictionary(e,t),this.dictLength=this.dict.length,this.setCounter(0)})),a(this,"seq",(()=>this.sequentialUUID())),a(this,"sequentialUUID",(()=>{let e,t,r="";e=this.counter;do{t=e%this.dictLength,e=Math.trunc(e/this.dictLength),r+=this.dict[t]}while(0!==e);return this.counter+=1,r})),a(this,"rnd",((e=this.uuidLength||l)=>this.randomUUID(e))),a(this,"randomUUID",((e=this.uuidLength||l)=>{let t,r,n;if(null==e||e<1)throw new Error("Invalid UUID Length Provided");for(t="",n=0;n<e;n+=1)r=parseInt((Math.random()*this.dictLength).toFixed(0),10)%this.dictLength,t+=this.dict[r];return t})),a(this,"fmt",((e,t)=>this.formattedUUID(e,t))),a(this,"formattedUUID",((e,t)=>{const r={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return e.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(e=>{const n=e.slice(0,2),s=parseInt(e.slice(2),10);return"$s"===n?r[n]().padStart(s,"0"):"$t"===n&&t?r[n](s,t):r[n](s)}))})),a(this,"availableUUIDs",((e=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,e).toFixed(0)))),a(this,"approxMaxBeforeCollision",((e=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*e).toFixed(20)))),a(this,"collisionProbability",((e=this.availableUUIDs(this.uuidLength),t=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(e)/this.availableUUIDs(t)).toFixed(20)))),a(this,"uniqueness",((e=this.availableUUIDs(this.uuidLength))=>{const t=parseFloat((1-this.approxMaxBeforeCollision(e)/e).toFixed(20));return t>1?1:t<0?0:t})),a(this,"getVersion",(()=>this.version)),a(this,"stamp",((e,t)=>{const r=Math.floor(+(t||new Date)/1e3).toString(16);if("number"==typeof e&&0===e)return r;if("number"!=typeof e||e<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join("\n"));const n=e-9,s=Math.round(Math.random()*(n>15?15:n)),i=this.randomUUID(n);return`${i.substring(0,s)}${r}${i.substring(s)}${s.toString(16)}`})),a(this,"parseStamp",((e,t)=>{if(t&&!/t0|t[1-9]\d{1,}/.test(t))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const r=t?t.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(e=>{const t={$r:e=>[...Array(e)].map((()=>"r")).join(""),$s:e=>[...Array(e)].map((()=>"s")).join(""),$t:e=>[...Array(e)].map((()=>"t")).join("")},r=e.slice(0,2),n=parseInt(e.slice(2),10);return t[r](n)})).replace(/^(.*?)(t{8,})(.*)$/g,((t,r,n)=>e.substring(r.length,r.length+n.length))):e;if(8===r.length)return new Date(1e3*parseInt(r,16));if(r.length<10)throw new Error("Stamp length invalid");const n=parseInt(r.substring(r.length-1),16);return new Date(1e3*parseInt(r.substring(n,n+8),16))})),a(this,"setCounter",(e=>{this.counter=e})),a(this,"validate",((e,t)=>{const r=t?this._normalizeDictionary(t):this.dict;return e.split("").every((e=>r.includes(e)))}));const t=c(c({},h),e);this.counter=0,this.debug=!1,this.dict=[],this.version="5.2.0";const{dictionary:r,shuffle:n,length:s,counter:i}=t;return this.uuidLength=s,this.setDictionary(r,n),this.setCounter(i),this.debug=t.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};a(f,"default",f);var p=f;return(n=>((n,i,o,c)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let a of r(i))s.call(n,a)||a===o||e(n,a,{get:()=>i[a],enumerable:!(c=t(i,a))||c.enumerable});return n})(e({},"__esModule",{value:!0}),n))(u)})();e.exports=t.default,"undefined"!=typeof window&&(t=t.default)}(Xj);const Wj=dr(Xj.exports);class Yj extends Ih{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}}class Zj{uuid;identityMap;constructor({length:e=6}={}){this.uuid=new Wj({length:e}),this.identityMap=new WeakMap}identify(e){if(!sj(e))throw new Yj("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:e});if(e.meta.hasKey("id")&&ij(e.meta.get("id"))&&!e.meta.get("id").equals(""))return e.id;if(this.identityMap.has(e))return this.identityMap.get(e);const t=new Nx(this.generateId());return this.identityMap.set(e,t),t}forget(e){return!!this.identityMap.has(e)&&(this.identityMap.delete(e),!0)}generateId(){return this.uuid.randomUUID()}}new Zj;class Kj extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new Dh("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new Dh("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new Dh("latest method in MediaTypes class is not yet implemented.")}}const Qj=e=>(t,r={})=>((e,{Type:t,plugins:r=[]})=>{const n=new t(e);return sj(e)&&(e.meta.length>0&&(n.meta=Cj(e.meta)),e.attributes.length>0&&(n.attributes=Cj(e.attributes))),zj(n,r,{toolboxCreator:Oj,visitorOptions:{nodeTypeGetter:Bj}})})(t,{...r,Type:e});Jx.refract=Qj(Jx),Ux.refract=Qj(Ux),Nx.refract=Qj(Nx),Bx.refract=Qj(Bx),Lx.refract=Qj(Lx),qx.refract=Qj(qx),Hx.refract=Qj(Hx),Gx.refract=Qj(Gx),Xx.refract=Qj(Xx),Wx.refract=Qj(Wx),Yx.refract=Qj(Yx),Zx.refract=Qj(Zx);const eE=(e,t)=>{const r=new Vj({predicate:e,returnOnTrue:Aj});return Gj(t,r),dd(void 0,[0],r.result)},tE=e=>"string"==typeof(null==e?void 0:e.type)?e.type:Bj(e),rE={EphemeralObject:["content"],EphemeralArray:["content"],...Jj},nE=(e,t,{keyMap:r=rE,...n}={})=>Gj(e,t,{keyMap:r,nodeTypeGetter:tE,nodePredicate:Ch,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...n});nE[Symbol.for("nodejs.util.promisify.custom")]=async(e,{keyMap:t=rE,...r}={})=>Gj[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:tE,nodePredicate:Ch,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});class sE{type="EphemeralArray";content=[];reference=void 0;constructor(e){this.content=e,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}class iE{type="EphemeralObject";content=[];reference=void 0;constructor(e){this.content=e,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}const oE=e=>sj(e)?ij(e)||oj(e)||aj(e)||cj(e)?e.toValue():nE(e,new class{ObjectElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new iE(e.content);return this.references.set(e,t),t}};EphemeralObject={leave:e=>e.toObject()};MemberElement={enter:e=>[e.key,e.value]};ArrayElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new sE(e.content);return this.references.set(e,t),t}};EphemeralArray={leave:e=>e.toArray()};references=new WeakMap;BooleanElement(e){return e.toValue()}NumberElement(e){return e.toValue()}StringElement(e){return e.toValue()}NullElement(){return null}RefElement(e,...t){var r;const n=t[3];return"EphemeralObject"===(null===(r=n[n.length-1])||void 0===r?void 0:r.type)?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return ij(e.href)?e.href.toValue():""}}):e,cE=(e,t=new WeakMap)=>(hj(e)?(t.set(e.key,e),cE(e.key,t),t.set(e.value,e),cE(e.value,t)):e.children.forEach((r=>{t.set(r,e),cE(r,t)})),t);class aE{element;edges;constructor({element:e}){this.element=e}transclude(e,t){var r;if(e===this.element)return t;if(e===t)return this.element;this.edges=null!==(r=this.edges)&&void 0!==r?r:cE(this.element);const n=this.edges.get(e);return Id(n)?void 0:(uj(n)?((e,t,r)=>{const n=r.get(e);uj(n)&&(n.content=n.map(((s,i,o)=>o===e?(r.delete(e),r.set(t,n),t):o)))})(e,t,this.edges):lj(n)?((e,t,r)=>{const n=r.get(e);lj(n)&&(n.content=n.map((s=>s===e?(r.delete(e),r.set(t,n),t):s)))})(e,t,this.edges):hj(n)&&((e,t,r)=>{const n=r.get(e);hj(n)&&(n.key===e&&(n.key=t,r.delete(e),r.set(t,n)),n.value===e&&(n.value=t,r.delete(e),r.set(t,n)))})(e,t,this.edges),this.element)}}const uE=(e,t)=>{const r=Ap(e,t);return od((e=>{if(em(e)&&Xp("$ref",e)&&gd(Jd,"$ref",e)){const t=pd(["$ref"],e),n=jm("#/",t);return pd(n.split("/"),r)}return em(e)?uE(e,r):e}),e)},lE=(e,t=Ej)=>{if(Jd(e))try{return t.fromRefract(JSON.parse(e))}catch{}return em(e)&&Xp("element",e)?t.fromRefract(e):t.toElement(e)},hE=e=>{const t=e.meta.length>0?Cj(e.meta):void 0,r=e.attributes.length>0?Cj(e.attributes):void 0;return new e.constructor(void 0,t,r)},fE=(e,t)=>t.clone&&t.isMergeableElement(e)?dE(hE(e),e,t):e,pE={clone:!0,isMergeableElement:e=>uj(e)||lj(e),arrayElementMerge:(e,t,r)=>e.concat(t)["fantasy-land/map"]((e=>fE(e,r))),objectElementMerge:(e,t,r)=>{const n=uj(e)?hE(e):hE(t);return uj(e)&&e.forEach(((e,t,s)=>{const i=qj(s);i.value=fE(e,r),n.content.push(i)})),t.forEach(((t,s,i)=>{const o=oE(s);let c;if(uj(e)&&e.hasKey(o)&&r.isMergeableElement(t)){const n=e.get(o);c=qj(i),c.value=((e,t)=>{if("function"!=typeof t.customMerge)return dE;const r=t.customMerge(e,t);return"function"==typeof r?r:dE})(s,r)(n,t)}else c=qj(i),c.value=fE(t,r);n.remove(o),n.content.push(c)})),n},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0};function dE(e,t,r){var n,s,i;const o={...pE,...r};o.isMergeableElement=null!==(n=o.isMergeableElement)&&void 0!==n?n:pE.isMergeableElement,o.arrayElementMerge=null!==(s=o.arrayElementMerge)&&void 0!==s?s:pE.arrayElementMerge,o.objectElementMerge=null!==(i=o.objectElementMerge)&&void 0!==i?i:pE.objectElementMerge;const c=lj(t);if(!(c===lj(e)))return fE(t,o);const a=c&&"function"==typeof o.arrayElementMerge?o.arrayElementMerge(e,t,o):o.objectElementMerge(e,t,o);return a.meta=(e=>"function"!=typeof e.customMetaMerge?e=>Cj(e):e.customMetaMerge)(o)(e.meta,t.meta),a.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>Cj(e):e.customAttributesMerge)(o)(e.attributes,t.attributes),a}dE.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new Jx:e.reduce(((e,r)=>dE(e,r,t)),hE(e[0]))};class mE extends Fh{}class vE extends mE{}let yE=class{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:e,allowEmpty:t=!0,sourceMap:r=!1,fileExtensions:n=[],mediaTypes:s=[]}){this.name=e,this.allowEmpty=t,this.sourceMap=r,this.fileExtensions=n,this.mediaTypes=s}};class bE extends Array{includesCycle(e){return this.filter((t=>t.has(e))).length>1}includes(e,t){return e instanceof Set?super.includes(e,t):this.some((t=>t.has(e)))}findItem(e){for(const t of this)for(const r of t)if(sj(r)&&e(r))return r}}let gE=class{uri;depth;value;refSet;errors;constructor({uri:e,depth:t=0,refSet:r,value:n}){this.uri=e,this.value=n,this.depth=t,this.refSet=r,this.errors=[]}};class wE extends Fh{}class xE extends wE{}class jE extends Fh{}class EE extends jE{}class $E extends wE{constructor(e){super(`Invalid JSON Schema $anchor "${e}".`)}}class OE extends mE{}class SE extends av{}class AE extends cv{}const PE=async(e,t={})=>(async(e,t)=>{let r=e,n=!1;if(!vj(e)){const t=qj(e);t.classes.push("result"),r=new Yx([t]),n=!0}const s=new Km({uri:t.resolve.baseURI,parseResult:r,mediaType:t.parse.mediaType}),i=await iv("canDereference",[s,t],t.dereference.strategies);if(ed(i))throw new vE(s.uri);try{const{result:e}=await ov("dereference",[s,t],i);return n?e.get(0):e}catch(e){throw new mE(`Error while dereferencing file "${s.uri}"`,{cause:e})}})(e,nv(ev,t));function TE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FE(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}function IE(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function RE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i=[],o=!0,c=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);o=!0);}catch(e){c=!0,s=e}finally{try{o||null==r.return||r.return()}finally{if(c)throw s}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return TE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DE(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var _E=function(e){throw TypeError(e)},CE=function(e,t,r){return t.has(e)||_E("Cannot "+r)},ME=function(e,t,r){return CE(e,t,"read from private field"),t.get(e)},NE=function(e,t,r){return t.has(e)?_E("Cannot add the same private member more than once"):IE(t,WeakSet)?t.add(e):t.set(e,r)},qE=function(e,t,r,n){return CE(e,t,"write to private field"),t.set(e,r),r},BE=function(e){return Object.prototype.toString.call(e)},LE=function(e){return ArrayBuffer.isView(e)&&!IE(e,DataView)},UE=Array.isArray,JE=Object.getOwnPropertyDescriptor,VE=Object.prototype.propertyIsEnumerable,GE=Object.getOwnPropertySymbols,HE=Object.prototype.hasOwnProperty;function zE(e){for(var t=Object.keys(e),r=GE(e),n=0;n<r.length;n++)VE.call(e,r[n])&&t.push(r[n]);return t}function XE(e,t){var r;return!(null===(r=JE(e,t))||void 0===r?void 0:r.writable)}function WE(e,t){if("object"===(void 0===e?"undefined":DE(e))&&null!==e){var r;if(UE(e))r=[];else if("[object Date]"===BE(e))r=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===BE(e)}(e))r=new RegExp(e);else if(function(e){return"[object Error]"===BE(e)}(e))r={message:e.message};else if(function(e){return"[object Boolean]"===BE(e)}(e)||function(e){return"[object Number]"===BE(e)}(e)||function(e){return"[object String]"===BE(e)}(e))r=Object(e);else{if(LE(e))return e.slice();r=Object.create(Object.getPrototypeOf(e))}var n=t.includeSymbols?zE:Object.keys,s=!0,i=!1,o=void 0;try{for(var c,a=n(e)[Symbol.iterator]();!(s=(c=a.next()).done);s=!0){var u=c.value;r[u]=e[u]}}catch(e){i=!0,o=e}finally{try{s||null==a.return||a.return()}finally{if(i)throw o}}return r}return e}var YE,ZE,KE={includeSymbols:!1,immutable:!1};function QE(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:KE,n=[],s=[],i=!0,o=r.includeSymbols?zE:Object.keys,c=!!r.immutable;return function e(a){var u=c?WE(a,r):a,l={},h=!0,f={node:u,node_:a,path:[].concat(n),parent:s[s.length-1],parents:s,key:n[n.length-1],isRoot:0===n.length,level:n.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f.isRoot||(f.parent.node[f.key]=e),f.node=e,t&&(h=!1)},delete:function(e){delete f.parent.node[f.key],e&&(h=!1)},remove:function(e){UE(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],e&&(h=!1)},keys:null,before:function(e){l.before=e},after:function(e){l.after=e},pre:function(e){l.pre=e},post:function(e){l.post=e},stop:function(){i=!1},block:function(){h=!1}};if(!i)return f;function p(){if("object"===DE(f.node)&&null!==f.node){f.keys&&f.node_===f.node||(f.keys=o(f.node)),f.isLeaf=0===f.keys.length;for(var e=0;e<s.length;e++)if(s[e].node_===a){f.circular=s[e];break}}else f.isLeaf=!0,f.keys=null;f.notLeaf=!f.isLeaf,f.notRoot=!f.isRoot}p();var d=t.call(f,f.node);if(void 0!==d&&f.update&&f.update(d),l.before&&l.before.call(f,f.node),!h)return f;if("object"===DE(f.node)&&null!==f.node&&!f.circular){var m;s.push(f),p();var v=!0,y=!1,b=void 0;try{for(var g,w=Object.entries(null!==(m=f.keys)&&void 0!==m?m:[])[Symbol.iterator]();!(v=(g=w.next()).done);v=!0){var x,j=RE(g.value,2),E=j[0],$=j[1];n.push($),l.pre&&l.pre.call(f,f.node[$],$);var O=e(f.node[$]);c&&HE.call(f.node,$)&&!XE(f.node,$)&&(f.node[$]=O.node),O.isLast=!!(null===(x=f.keys)||void 0===x?void 0:x.length)&&+E==f.keys.length-1,O.isFirst=0==+E,l.post&&l.post.call(f,O),n.pop()}}catch(e){y=!0,b=e}finally{try{v||null==w.return||w.return()}finally{if(y)throw b}}s.pop()}return l.after&&l.after.call(f,f.node),f}(e).node}var e$=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:KE;kE(this,e),NE(this,YE),NE(this,ZE),qE(this,YE,t),qE(this,ZE,r)}return FE(e,[{key:"get",value:function(e){for(var t=ME(this,YE),r=0;t&&r<e.length;r++){var n=e[r];if(!HE.call(t,n)||!ME(this,ZE).includeSymbols&&"symbol"===(void 0===n?"undefined":DE(n)))return;t=t[n]}return t}},{key:"has",value:function(e){for(var t=ME(this,YE),r=0;t&&r<e.length;r++){var n=e[r];if(!HE.call(t,n)||!ME(this,ZE).includeSymbols&&"symbol"===(void 0===n?"undefined":DE(n)))return!1;t=t[n]}return!0}},{key:"set",value:function(e,t){var r=ME(this,YE),n=0;for(n=0;n<e.length-1;n++){var s=e[n];HE.call(r,s)||(r[s]={}),r=r[s]}return r[e[n]]=t,t}},{key:"map",value:function(e){return QE(ME(this,YE),e,{immutable:!0,includeSymbols:!!ME(this,ZE).includeSymbols})}},{key:"forEach",value:function(e){return qE(this,YE,QE(ME(this,YE),e,ME(this,ZE))),ME(this,YE)}},{key:"reduce",value:function(e,t){var r=1===arguments.length,n=r?ME(this,YE):t;return this.forEach((function(t){this.isRoot&&r||(n=e.call(this,n,t))})),n}},{key:"paths",value:function(){var e=[];return this.forEach((function(){e.push(this.path)})),e}},{key:"nodes",value:function(){var e=[];return this.forEach((function(){e.push(this.node)})),e}},{key:"clone",value:function(){var e=[],t=[],r=ME(this,ZE);return LE(ME(this,YE))?ME(this,YE).slice():function n(s){for(var i=0;i<e.length;i++)if(e[i]===s)return t[i];if("object"===(void 0===s?"undefined":DE(s))&&null!==s){var o=WE(s,r);e.push(s),t.push(o);var c=r.includeSymbols?zE:Object.keys,a=!0,u=!1,l=void 0;try{for(var h,f=c(s)[Symbol.iterator]();!(a=(h=f.next()).done);a=!0){var p=h.value;o[p]=n(s[p])}}catch(e){u=!0,l=e}finally{try{a||null==f.return||f.return()}finally{if(u)throw l}}return e.pop(),t.pop(),o}return s}(ME(this,YE))}}]),e}();YE=new WeakMap,ZE=new WeakMap;var t$=function(e,t){return new e$(e,t)};t$.get=function(e,t,r){return new e$(e,r).get(t)},t$.set=function(e,t,r,n){return new e$(e,n).set(t,r)},t$.has=function(e,t,r){return new e$(e,r).has(t)},t$.map=function(e,t,r){return new e$(e,r).map(t)},t$.forEach=function(e,t,r){return new e$(e,r).forEach(t)},t$.reduce=function(e,t,r,n){return new e$(e,n).reduce(t,r)},t$.paths=function(e,t){return new e$(e,t).paths()},t$.nodes=function(e,t){return new e$(e,t).nodes()},t$.clone=function(e,t){return new e$(e,t).clone()};var r$=t$;const n$=["properties"],s$=["properties"],i$=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],o$=["schema/example","items/example"];function c$(e){const t=e[e.length-1],r=e[e.length-2],n=e.join("/");return n$.indexOf(t)>-1&&-1===s$.indexOf(r)||i$.indexOf(n)>-1||o$.some((e=>n.indexOf(e)>-1))}function a$(e,t){const[r,n]=e.split("#"),s=null!=t?t:"",i=null!=r?r:"";let o;if(Um(s))o=Xm(s,i);else{const e=Xm("https://swagger.io",s),t=Xm(e,i).replace("https://swagger.io","");o=i.startsWith("/")?t:t.substring(1)}return n?`${o}#${n}`:o}const u$=/^([a-z]+:\/\/|\/\/)/i;class l$ extends Ih{}const h$={},f$=new WeakMap,p$=[e=>"paths"===e[0]&&"responses"===e[3]&&"examples"===e[5],e=>"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"example"===e[7],e=>"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9],e=>"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"example"===e[6],e=>"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8],e=>"paths"===e[0]&&"parameters"===e[2]&&"example"===e[4],e=>"paths"===e[0]&&"parameters"===e[3]&&"example"===e[5],e=>"paths"===e[0]&&"parameters"===e[2]&&"examples"===e[4]&&"value"===e[6],e=>"paths"===e[0]&&"parameters"===e[3]&&"examples"===e[5]&&"value"===e[7],e=>"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"example"===e[6],e=>"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8],e=>"paths"===e[0]&&"parameters"===e[3]&&"content"===e[4]&&"example"===e[7],e=>"paths"===e[0]&&"parameters"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9]],d$={key:"$ref",plugin:(e,t,r,n)=>{const s=n.getInstance(),i=r.slice(0,-1);if(c$(i)||(e=>p$.some((t=>t(e))))(i))return;const{baseDoc:o}=n.getContext(r);if("string"!=typeof e)return new l$("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:o,fullPath:r});const c=b$(e),a=c[0],u=c[1]||"";let l,h,f;try{l=o||a?v$(a,o):null}catch(t){return y$(t,{pointer:u,$ref:e,basePath:l,fullPath:r})}if(function(e,t,r,n){let s=f$.get(n);s||(s={},f$.set(n,s));const i=function(e){if(0===e.length)return"";return`/${e.map($$).join("/")}`}(r),o=`${t||"<specmap-base>"}#${e}`,c=i.replace(/allOf\/\d+\/?/g,""),a=n.contextTree.get([]).baseDoc;if(t===a&&O$(c,e))return!0;let u="";const l=r.some((e=>(u=`${u}/${$$(e)}`,s[u]&&s[u].some((e=>O$(e,o)||O$(o,e))))));if(l)return!0;return void(s[c]=(s[c]||[]).concat(o))}(u,l,i,n)&&!s.useCircularStructures){const t=a$(e,l);return e===t?null:$r.replace(r,t)}if(null==l?(f=j$(u),h=n.get(f),void 0===h&&(h=new l$(`Could not resolve reference: ${e}`,{pointer:u,$ref:e,baseDoc:o,fullPath:r}))):(h=g$(l,u),h=null!=h.l?h.l:h.catch((t=>{throw y$(t,{pointer:u,$ref:e,baseDoc:o,fullPath:r})}))),h instanceof Error)return[$r.remove(r),h];const p=a$(e,l),d=$r.replace(i,h,{$$ref:p});if(l&&l!==o)return[d,$r.context(i,{baseDoc:l})];try{if(!function(e,t){const r=[e];return t.path.reduce(((e,t)=>(r.push(e[t]),e[t])),e),n(t.value);function n(e){return $r.isObject(e)&&(r.indexOf(e)>=0||Object.keys(e).some((t=>n(e[t]))))}}(n.state,d)||s.useCircularStructures)return d}catch(e){return null}}},m$=Object.assign(d$,{docCache:h$,absoluteify:v$,clearCache:function(e){void 0!==e?delete h$[e]:Object.keys(h$).forEach((e=>{delete h$[e]}))},JSONRefError:l$,wrapError:y$,getDoc:w$,split:b$,extractFromDoc:g$,fetchJSON:function(e){return fetch(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((e=>e.text())).then((e=>It.load(e)))},extract:x$,jsonPointerToArray:j$,unescapeJsonPointerToken:E$});function v$(e,t){if(!u$.test(e)){if(!t)throw new l$(`Tried to resolve a relative URL, without having a basePath. path: '${e}' basePath: '${t}'`);return Xm(t,e)}return e}function y$(e,t){let r;return r=e&&e.response&&e.response.body?`${e.response.body.code} ${e.response.body.message}`:e.message,new l$(`Could not resolve reference: ${r}`,{...t,cause:e})}function b$(e){return(e+"").split("#")}function g$(e,t){const r=h$[e];if(r&&!$r.isPromise(r))try{const e=x$(t,r);return Object.assign(Promise.resolve(e),{l:e})}catch(e){return Promise.reject(e)}return w$(e).then((e=>x$(t,e)))}function w$(e){const t=h$[e];return t?$r.isPromise(t)?t:Promise.resolve(t):(h$[e]=m$.fetchJSON(e).then((t=>(h$[e]=t,t))),h$[e])}function x$(e,t){const r=j$(e);if(r.length<1)return t;const n=$r.getIn(t,r);if(void 0===n)throw new l$(`Could not resolve pointer: ${e} does not exist in document`,{pointer:e});return n}function j$(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+typeof e);return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(E$)}function E$(e){if("string"!=typeof e)return e;return new URLSearchParams(`=${e.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function $$(e){return new URLSearchParams([["",e.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function O$(e,t){if(!(r=t)||"/"===r||"#"===r)return!0;var r;const n=e.charAt(t.length),s=t.slice(-1);return 0===e.indexOf(t)&&(!n||"/"===n||"#"===n)&&"#"!==s}const S$={key:"allOf",plugin:(e,t,r,n,s)=>{if(s.meta&&s.meta.$$ref)return;const i=r.slice(0,-1);if(c$(i))return;if(!Array.isArray(e)){const e=new TypeError("allOf must be an array");return e.fullPath=r,e}let o=!1,c=s.value;if(i.forEach((e=>{c&&(c=c[e])})),c={...c},0===Object.keys(c).length)return;delete c.allOf;const a=[];return a.push(n.replace(i,{})),e.forEach(((e,t)=>{if(!n.isObject(e)){if(o)return null;o=!0;const e=new TypeError("Elements in allOf must be objects");return e.fullPath=r,a.push(e)}a.push(n.mergeDeep(i,e));const s=function(e,t,{specmap:r,getBaseUrlForNodePath:n=(e=>r.getContext([...t,...e]).baseDoc),targetKeys:s=["$ref","$$ref"]}={}){const i=[];return r$(e).forEach((function(){if(s.includes(this.key)&&"string"==typeof this.node){const e=this.path,s=t.concat(this.path),o=a$(this.node,n(e));i.push(r.replace(s,o))}})),i}(e,r.slice(0,-1),{getBaseUrlForNodePath:e=>n.getContext([...r,t,...e]).baseDoc,specmap:n});a.push(...s)})),c.example&&a.push(n.remove([].concat(i,"example"))),a.push(n.mergeDeep(i,c)),c.$$ref||a.push(n.remove([].concat(i,"$$ref"))),a}},A$={key:"parameters",plugin:(e,t,r,n)=>{if(Array.isArray(e)&&e.length){const t=Object.assign([],e),s=r.slice(0,-1),i={...$r.getIn(n.spec,s)};for(let s=0;s<e.length;s+=1){const o=e[s];try{t[s].default=n.parameterMacro(i,o)}catch(e){const t=new Error(e);return t.fullPath=r,t}}return $r.replace(r,t)}return $r.replace(r,e)}},P$={key:"properties",plugin:(e,t,r,n)=>{const s={...e};for(const t in e)try{s[t].default=n.modelPropertyMacro(s[t])}catch(e){const t=new Error(e);return t.fullPath=r,t}return $r.replace(r,s)}};class T${constructor(e){this.root=k$(e||{})}set(e,t){const r=this.getParent(e,!0);if(!r)return void F$(this.root,t,null);const n=e[e.length-1],{children:s}=r;s[n]?F$(s[n],t,r):s[n]=k$(t,r)}get(e){if((e=e||[]).length<1)return this.root.value;let t,r,n=this.root;for(let s=0;s<e.length&&(r=e[s],t=n.children,t[r]);s+=1)n=t[r];return n&&n.protoValue}getParent(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(((e,r)=>{if(!e)return e;const{children:n}=e;return!n[r]&&t&&(n[r]=k$(null,e)),n[r]}),this.root)}}function k$(e,t){return F$({children:{}},e,t)}function F$(e,t,r){return e.value=t||{},e.protoValue=r?{...r.protoValue,...e.value}:e.value,Object.keys(e.children).forEach((t=>{const r=e.children[t];e.children[t]=F$(r,r.value,e)})),e}const I$=()=>{};class R${static getPluginName(e){return e.pluginName}static getPatchesOfType(e,t){return e.filter(t)}constructor(e){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new T$,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),$r,{getInstance:()=>this}),allowMetaPatches:!1},e),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter($r.isFunction),this.patches.push($r.add([],this.spec)),this.patches.push($r.context([],this.context)),this.updatePatches(this.patches)}debug(e,...t){this.debugLevel===e&&console.log(...t)}verbose(e,...t){"verbose"===this.debugLevel&&console.log(`[${e}] `,...t)}wrapPlugin(e,t){const{pathDiscriminator:r}=this;let n,s=null;return e[this.pluginProp]?(s=e,n=e[this.pluginProp]):$r.isFunction(e)?n=e:$r.isObject(e)&&(n=function(e){const t=(e,t)=>!Array.isArray(e)||e.every(((e,r)=>e===t[r]));return function*(n,s){const i={};for(const[e,t]of n.filter($r.isAdditiveMutation).entries()){if(!(e<3e3))return;yield*o(t.value,t.path,t)}function*o(n,c,a){if($r.isObject(n)){const u=c.length-1,l=c[u],h=c.indexOf("properties"),f="properties"===l&&u===h,p=s.allowMetaPatches&&i[n.$$ref];for(const u of Object.keys(n)){const l=n[u],h=c.concat(u),d=$r.isObject(l),m=n.$$ref;if(p||d&&(s.allowMetaPatches&&m&&(i[m]=!0),yield*o(l,h,a)),!f&&u===e.key){const n=t(r,c);r&&!n||(yield e.plugin(l,u,h,s,a))}}}else e.key===c[c.length-1]&&(yield e.plugin(n,e.key,c,s))}}}(e)),Object.assign(n.bind(s),{pluginName:e.name||t,isGenerator:$r.isGenerator(n)})}nextPlugin(){return this.wrappedPlugins.find((e=>this.getMutationsForPlugin(e).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((e=>e.value)))}getPluginHistory(e){const t=this.constructor.getPluginName(e);return this.pluginHistory[t]||[]}getPluginRunCount(e){return this.getPluginHistory(e).length}getPluginHistoryTip(e){const t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}getPluginMutationIndex(e){const t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}updatePluginHistory(e,t){const r=this.constructor.getPluginName(e);this.pluginHistory[r]=this.pluginHistory[r]||[],this.pluginHistory[r].push(t)}updatePatches(e){$r.normalizeArray(e).forEach((e=>{if(e instanceof Error)this.errors.push(e);else try{if(!$r.isObject(e))return void this.debug("updatePatches","Got a non-object patch",e);if(this.showDebug&&this.allPatches.push(e),$r.isPromise(e.value))return this.promisedPatches.push(e),void this.promisedPatchThen(e);if($r.isContextPatch(e))return void this.setContext(e.path,e.value);$r.isMutation(e)&&this.updateMutations(e)}catch(e){console.error(e),this.errors.push(e)}}))}updateMutations(e){"object"==typeof e.value&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value={...e.value});const t=$r.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}removePromisedPatch(e){const t=this.promisedPatches.indexOf(e);t<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(t,1)}promisedPatchThen(e){return e.value=e.value.then((t=>{const r={...e,value:t};this.removePromisedPatch(e),this.updatePatches(r)})).catch((t=>{this.removePromisedPatch(e),this.updatePatches(t)})),e.value}getMutations(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(e){const t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(e){return $r.getIn(this.state,e)}_getContext(e){return this.contextTree.get(e)}setContext(e,t){return this.contextTree.set(e,t)}_hasRun(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}dispatch(){const e=this,t=this.nextPlugin();if(!t){const e=this.nextPromisedPatch();if(e)return e.then((()=>this.dispatch())).catch((()=>this.dispatch()));const t={spec:this.state,errors:this.errors};return this.showDebug&&(t.patches=this.allPatches),Promise.resolve(t)}if(e.pluginCount=e.pluginCount||new WeakMap,e.pluginCount.set(t,(e.pluginCount.get(t)||0)+1),e.pluginCount[t]>100)return Promise.resolve({spec:e.state,errors:e.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(t!==this.currentPlugin&&this.promisedPatches.length){const e=this.promisedPatches.map((e=>e.value));return Promise.all(e.map((e=>e.then(I$,I$)))).then((()=>this.dispatch()))}return function(){e.currentPlugin=t;const n=e.getCurrentMutations(),s=e.mutations.length-1;try{if(t.isGenerator)for(const s of t(n,e.getLib()))r(s);else{r(t(n,e.getLib()))}}catch(e){console.error(e),r([Object.assign(Object.create(e),{plugin:t})])}finally{e.updatePluginHistory(t,{mutationIndex:s})}return e.dispatch()}();function r(r){r&&(r=$r.fullyNormalizeArray(r),e.updatePatches(r,t))}}}const D$={refs:m$,allOf:S$,parameters:A$,properties:P$};async function _$(e){const{spec:t,mode:r,allowMetaPatches:n=!0,pathDiscriminator:s,modelPropertyMacro:i,parameterMacro:o,requestInterceptor:c,responseInterceptor:a,skipNormalization:u=!1,useCircularStructures:l,strategies:h}=e,f=Mt(e),p=Nt(e),d=h.find((e=>e.match(t)));return async function(e){f&&(D$.refs.docCache[f]=e);D$.refs.fetchJSON=Ct(p,{requestInterceptor:c,responseInterceptor:a});const t=[D$.refs];"function"==typeof o&&t.push(D$.parameters);"function"==typeof i&&t.push(D$.properties);"strict"!==r&&t.push(D$.allOf);const h=await(m={spec:e,context:{baseDoc:f},plugins:t,allowMetaPatches:n,pathDiscriminator:s,parameterMacro:o,modelPropertyMacro:i,useCircularStructures:l},new R$(m).dispatch());var m;u||(h.spec=d.normalize(h.spec));return h}(t)}const C$=e=>e.replace(/\W/gi,"_");function M$(e,t,r="",{v2OperationIdCompatibilityMode:n}={}){if(!e||"object"!=typeof e)return null;return(e.operationId||"").replace(/\s/g,"").length?C$(e.operationId):function(e,t,{v2OperationIdCompatibilityMode:r}={}){if(r){let r=`${t.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return r=r||`${e.substring(1)}_${t}`,r.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${t.toLowerCase()}${C$(e)}`}(t,r,{v2OperationIdCompatibilityMode:n})}function N$(e){const{spec:t}=e,{paths:r}=t,n={};if(!r||t.$$normalized)return e;for(const e in r){const s=r[e];if(null==s||!["object","function"].includes(typeof s))continue;const i=s.parameters;for(const r in s){const o=s[r];if(null==o||!["object","function"].includes(typeof o))continue;const c=M$(o,e,r);if(c){n[c]?n[c].push(o):n[c]=[o];const e=n[c];if(e.length>1)e.forEach(((e,t)=>{e.h=e.h||e.operationId,e.operationId=`${c}${t+1}`}));else if(void 0!==o.operationId){const t=e[0];t.h=t.h||o.operationId,t.operationId=c}}if("parameters"!==r){const e=[],r={};for(const n in t)"produces"!==n&&"consumes"!==n&&"security"!==n||(r[n]=t[n],e.push(r));if(i&&(r.parameters=i,e.push(r)),e.length)for(const t of e)for(const e in t)if(o[e]){if("parameters"===e)for(const r of t[e]){o[e].some((e=>e.name&&e.name===r.name||e.$ref&&e.$ref===r.$ref||e.$$ref&&e.$$ref===r.$$ref||e===r))||o[e].push(r)}}else o[e]=t[e]}}}return t.$$normalized=!0,e}const q$={name:"generic",match:()=>!0,normalize(e){const{spec:t}=N$({spec:e});return t},resolve:async e=>_$(e)};const B$=e=>{try{const{swagger:t}=e;return"2.0"===t}catch{return!1}},L$=e=>{try{const{openapi:t}=e;return"string"==typeof t&&/^3\.0\.([0123])(?:-rc[012])?$/.test(t)}catch{return!1}},U$=e=>{try{const{openapi:t}=e;return"string"==typeof t&&/^3\.1\.(?:[1-9]\d*|0)$/.test(t)}catch{return!1}},J$=e=>L$(e)||U$(e),V$={name:"openapi-2",match:e=>B$(e),normalize(e){const{spec:t}=N$({spec:e});return t},resolve:async e=>async function(e){return _$(e)}(e)};const G$={name:"openapi-3-0",match:e=>L$(e),normalize(e){const{spec:t}=N$({spec:e});return t},resolve:async e=>async function(e){return _$(e)}(e)},H$=e=>async t=>(async e=>{const{spec:t,requestInterceptor:r,responseInterceptor:n}=e,s=Mt(e),i=Nt(e),o=t||await Ct(i,{requestInterceptor:r,responseInterceptor:n})(s),c={...e,spec:o};return e.strategies.find((e=>e.match(o))).resolve(c)})({...e,...t}),z$=H$({strategies:[G$,V$,q$]});class X$ extends Ih{}class W$ extends X${pointer;constructor(e,t){super(e,t),void 0!==t&&(this.pointer=t.pointer)}}class Y$ extends X${tokens;constructor(e,t){super(e,t),void 0!==t&&(this.tokens=[...t.tokens])}}class Z$ extends X${pointer;tokens;failedToken;failedTokenPosition;element;constructor(e,t){super(e,t),void 0!==t&&(this.pointer=t.pointer,Array.isArray(t.tokens)&&(this.tokens=[...t.tokens]),this.failedToken=t.failedToken,this.failedTokenPosition=t.failedTokenPosition,this.element=t.element)}}const K$=gp(jd(/~/g,"~0"),jd(/\//g,"~1"),encodeURIComponent),Q$=gp(jd(/~1/g,"/"),jd(/~0/g,"~"),(e=>{try{return decodeURIComponent(e)}catch{return e}})),eO=e=>{const t=(e=>{const t=e.indexOf("#");return-1!==t?e.substring(t):"#"})(e);return jm("#",t)},tO=e=>{try{return 0===e.length?"":`/${e.map(K$).join("/")}`}catch(t){throw new Y$("JSON Pointer compilation of tokens encountered an error.",{tokens:e,cause:t})}},rO=(e,t)=>{let r;try{r=(e=>{if(Vd(e))return[];if(!Od("/",e))throw new W$(`Invalid JSON Pointer "${e}". JSON Pointers must begin with "/"`,{pointer:e});try{const t=gp($d("/"),Ff(Q$))(e);return bp(t)}catch(t){throw new W$(`JSON Pointer parsing of "${e}" encountered an error.`,{pointer:e,cause:t})}})(e)}catch(r){throw new Z$(`JSON Pointer evaluation failed while parsing the pointer "${e}".`,{pointer:e,element:Cj(t),cause:r})}return r.reduce(((t,n,s)=>{if(uj(t)){if(!t.hasKey(n))throw new Z$(`JSON Pointer evaluation failed while evaluating token "${n}" against an ObjectElement`,{pointer:e,tokens:r,failedToken:n,failedTokenPosition:s,element:Cj(t)});return t.get(n)}if(lj(t)){if(!(n in t.content)||!im(Number(n)))throw new Z$(`JSON Pointer evaluation failed while evaluating token "${n}" against an ArrayElement`,{pointer:e,tokens:r,failedToken:n,failedTokenPosition:s,element:Cj(t)});return t.get(Number(n))}throw new Z$(`JSON Pointer evaluation failed while evaluating token "${n}" against an unexpected Element`,{pointer:e,tokens:r,failedToken:n,failedTokenPosition:s,element:Cj(t)})}),t)};class nO extends Kj{filterByFormat(e="generic"){const t="generic"===e?"openapi;version":e;return this.filter((e=>e.includes(t)))}findBy(e="3.1.0",t="generic"){const r="generic"===t?`vnd.oai.openapi;version=${e}`:`vnd.oai.openapi+${t};version=${e}`;return this.find((e=>e.includes(r)))||this.unknownMediaType}latest(e="generic"){return Np(this.filterByFormat(e))}}const sO=new nO("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");let iO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="callback"}},oO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="components"}get schemas(){return this.get("schemas")}set schemas(e){this.set("schemas",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get requestBodies(){return this.get("requestBodies")}set requestBodies(e){this.set("requestBodies",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(e){this.set("securitySchemes",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}get callbacks(){return this.get("callbacks")}set callbacks(e){this.set("callbacks",e)}},cO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="contact"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}get email(){return this.get("email")}set email(e){this.set("email",e)}},aO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(e){this.set("propertyName",e)}get mapping(){return this.get("mapping")}set mapping(e){this.set("mapping",e)}},uO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(e){this.set("contentType",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(e){this.set("allowedReserved",e)}},lO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="example"}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get value(){return this.get("value")}set value(e){this.set("value",e)}get externalValue(){return this.get("externalValue")}set externalValue(e){this.set("externalValue",e)}},hO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="externalDocumentation"}get description(){return this.get("description")}set description(e){this.set("description",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}},fO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new Bx(!1)}set required(e){this.set("required",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Bx(!1)}set deprecated(e){this.set("deprecated",e)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(e){this.set("allowEmptyValue",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowReserved(){return this.get("allowReserved")}set allowReserved(e){this.set("allowReserved",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}};Object.defineProperty(fO.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});let pO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get termsOfService(){return this.get("termsOfService")}set termsOfService(e){this.set("termsOfService",e)}get contact(){return this.get("contact")}set contact(e){this.set("contact",e)}get license(){return this.get("license")}set license(e){this.set("license",e)}get version(){return this.get("version")}set version(e){this.set("version",e)}},dO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="license"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}},mO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(e){this.set("operationRef",e)}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get operation(){var e,t;return ij(this.operationRef)?null===(e=this.operationRef)||void 0===e?void 0:e.meta.get("operation"):ij(this.operationId)?null===(t=this.operationId)||void 0===t?void 0:t.meta.get("operation"):void 0}set operation(e){this.set("operation",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get server(){return this.get("server")}set server(e){this.set("server",e)}},vO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="mediaType"}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get encoding(){return this.get("encoding")}set encoding(e){this.set("encoding",e)}},yO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(e){this.set("authorizationUrl",e)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(e){this.set("tokenUrl",e)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(e){this.set("refreshUrl",e)}get scopes(){return this.get("scopes")}set scopes(e){this.set("scopes",e)}},bO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(e){this.set("implicit",e)}get password(){return this.get("password")}set password(e){this.set("password",e)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(e){this.set("clientCredentials",e)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(e){this.set("authorizationCode",e)}},gO=class extends Nx{constructor(e,t,r){super(e,t,r),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}};class wO extends Jx{constructor(e,t,r){super(e,t,r),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(e){this.set("openapi",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}}let xO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="operation"}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}set externalDocs(e){this.set("externalDocs",e)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get callbacks(){return this.get("callbacks")}set callbacks(e){this.set("callbacks",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Bx(!1)}set deprecated(e){this.set("deprecated",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get servers(){return this.get("severs")}set servers(e){this.set("servers",e)}},jO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="parameter"}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get required(){return this.hasKey("required")?this.get("required"):new Bx(!1)}set required(e){this.set("required",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new Bx(!1)}set deprecated(e){this.set("deprecated",e)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(e){this.set("allowEmptyValue",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowReserved(){return this.get("allowReserved")}set allowReserved(e){this.set("allowReserved",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}};Object.defineProperty(jO.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});let EO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get GET(){return this.get("get")}set GET(e){this.set("GET",e)}get PUT(){return this.get("put")}set PUT(e){this.set("PUT",e)}get POST(){return this.get("post")}set POST(e){this.set("POST",e)}get DELETE(){return this.get("delete")}set DELETE(e){this.set("DELETE",e)}get OPTIONS(){return this.get("options")}set OPTIONS(e){this.set("OPTIONS",e)}get HEAD(){return this.get("head")}set HEAD(e){this.set("HEAD",e)}get PATCH(){return this.get("patch")}set PATCH(e){this.set("PATCH",e)}get TRACE(){return this.get("trace")}set TRACE(e){this.set("TRACE",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}},$O=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="paths"}},OO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}},SO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="requestBody"}get description(){return this.get("description")}set description(e){this.set("description",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}get required(){return this.hasKey("required")?this.get("required"):new Bx(!1)}set required(e){this.set("required",e)}},AO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="response"}get description(){return this.get("description")}set description(e){this.set("description",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}},PO=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="responses"}get default(){return this.get("default")}set default(e){this.set("default",e)}};class TO extends Jx{constructor(e,t,r){super(e,t,r),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}}class kO extends Jx{constructor(e,t,r){super(e,t,r),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}class FO extends Jx{constructor(e,t,r){super(e,t,r),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}}class IO extends Jx{constructor(e,t,r){super(e,t,r),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}const RO={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",TO),t.register("jSONReference",kO),t.register("media",FO),t.register("linkDescription",IO),t}},DO=e=>{if(sj(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},_O={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Jj};let CO=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=dE(t.meta,e.meta),gj(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=dE(t.attributes,e.attributes))}},MO=class extends CO{enter(e){return this.element=Cj(e),Aj}};const NO=(e,t,r=[])=>{const n=Object.getOwnPropertyDescriptors(t);for(let e of r)delete n[e];Object.defineProperties(e,n)},qO=(e,t=[e])=>{const r=Object.getPrototypeOf(e);return null===r?t:qO(r,[...t,r])},BO=(e,t,r=[])=>{var n;const s=null!==(n=((...e)=>{if(0===e.length)return;let t;const r=e.map((e=>qO(e)));for(;r.every((e=>e.length>0));){const e=r.map((e=>e.pop())),n=e[0];if(!e.every((e=>e===n)))break;t=n}return t})(...e))&&void 0!==n?n:Object.prototype,i=Object.create(s),o=qO(s);for(let t of e){let e=qO(t);for(let t=e.length-1;t>=0;t--){let n=e[t];-1===o.indexOf(n)&&(NO(i,n,["constructor",...r]),o.push(n))}}return i.constructor=t,i},LO=e=>e.filter(((t,r)=>e.indexOf(t)==r)),UO=new WeakMap,JO=e=>UO.get(e),VO=(e,t)=>{var r,n;const s=LO([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of s)i[o]=LO([...null!==(r=null==e?void 0:e[o])&&void 0!==r?r:[],...null!==(n=null==t?void 0:t[o])&&void 0!==n?n:[]]);return i},GO=(e,t)=>{var r,n,s,i;return{property:VO(null!==(r=null==e?void 0:e.property)&&void 0!==r?r:{},null!==(n=null==t?void 0:t.property)&&void 0!==n?n:{}),method:VO(null!==(s=null==e?void 0:e.method)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},HO=new Map,zO=(...e)=>{const t=((...e)=>{var t;const r=new Set,n=new Set([...e]);for(;n.size>0;)for(let e of n){const s=[...qO(e.prototype).map((e=>e.constructor)),...null!==(t=JO(e))&&void 0!==t?t:[]].filter((e=>!r.has(e)));for(let e of s)n.add(e);r.add(e),n.delete(e)}return[...r]})(...e).map((e=>HO.get(e))).filter((e=>!!e));return 0==t.length?{}:1==t.length?t[0]:t.reduce(((e,t)=>((e,t)=>{var r,n,s,i,o,c;return{class:LO([...null!==(r=null==e?void 0:e.class)&&void 0!==r?r:[],...null!==(n=null==t?void 0:t.class)&&void 0!==n?n:[]]),static:GO(null!==(s=null==e?void 0:e.static)&&void 0!==s?s:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:GO(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(c=null==t?void 0:t.instance)&&void 0!==c?c:{})}})(e,t)))};function XO(...e){var t,r,n;const s=e.map((e=>e.prototype));function i(...t){for(const r of e)NO(this,new r(...t))}i.prototype=BO(s,i),Object.setPrototypeOf(i,BO(e,null,["prototype"]));let o=i;{const s=zO(...e);for(let e of null!==(t=null==s?void 0:s.class)&&void 0!==t?t:[]){const t=e(o);t&&(o=t)}WO(null!==(r=null==s?void 0:s.static)&&void 0!==r?r:{},o),WO(null!==(n=null==s?void 0:s.instance)&&void 0!==n?n:{},o.prototype)}var c,a;return c=o,a=e,UO.set(c,a),o}const WO=(e,t)=>{const r=e.property,n=e.method;if(r)for(let e in r)for(let n of r[e])n(t,e);if(n)for(let e in n)for(let r of n[e])r(t,e,Object.getOwnPropertyDescriptor(t,e))};let YO=class extends CO{specObj;passingOptionsNames=["specObj"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return vd(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=pd(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return md(qd,["visitors",...e],this.specObj)?pd(["visitors",...e],this.specObj):pd(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...r,...t})}toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r);return n instanceof MO&&(null==n?void 0:n.constructor)===MO?Cj(t):(Gj(t,n,r),n.element)}},ZO=class extends YO{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach(((e,n,s)=>{if(ij(n)&&r.includes(oE(n))&&!this.ignoredFields.includes(oE(n))){const r=this.toRefractedElement([...t,"fixedFields",oE(n)],e),i=new Vx(Cj(n),r);this.copyMetaAndAttributes(s,i),i.classes.push("fixed-field"),this.element.content.push(i)}else this.ignoredFields.includes(oE(n))||this.element.content.push(Cj(s))})),this.copyMetaAndAttributes(e,this.element),Aj}};class KO extends(XO(ZO,MO)){constructor(e){super(e),this.element=new TO,this.specPath=Wf(["document","objects","JSONSchema"])}}let QO=class{parent;constructor({parent:e}){this.parent=e}};const eS=e=>uj(e)&&e.hasKey("$ref");let tS=class extends(XO(YO,QO,MO)){ObjectElement(e){const t=eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),Aj}ArrayElement(e){return this.element=new Ux,this.element.classes.push("json-schema-items"),e.forEach((e=>{const t=eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}};let rS=class extends YO{specPath;ignoredFields;fieldPatternPredicate=_h;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:r,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof r&&(this.fieldPatternPredicate=r)}ObjectElement(e){return e.forEach(((e,t,r)=>{if(!this.ignoredFields.includes(oE(t))&&this.fieldPatternPredicate(oE(t))){const n=this.specPath(e),s=this.toRefractedElement(n,e),i=new Vx(Cj(t),s);this.copyMetaAndAttributes(r,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(oE(t))||this.element.content.push(Cj(r))})),this.copyMetaAndAttributes(e,this.element),Aj}},nS=class extends rS{constructor(e){super(e),this.fieldPatternPredicate=Xd}},sS=class extends(XO(nS,QO,MO)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-properties"),this.specPath=e=>eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}},iS=class extends(XO(nS,QO,MO)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};class oS extends(XO(nS,QO,MO)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let cS=class extends(XO(YO,QO,MO)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach((e=>{const t=eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}},aS=class extends(XO(YO,QO,MO)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach((e=>{const t=eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}},uS=class extends(XO(YO,QO,MO)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach((e=>{const t=eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}};class lS extends(XO(nS,QO,MO)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-definitions"),this.specPath=e=>eS(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let hS=class extends(XO(YO,QO,MO)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-links")}ArrayElement(e){return e.forEach((e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)})),this.copyMetaAndAttributes(e,this.element),Aj}};class fS extends(XO(ZO,MO)){constructor(e){super(e),this.element=new kO,this.specPath=Wf(["document","objects","JSONReference"])}ObjectElement(e){const t=ZO.prototype.ObjectElement.call(this,e);return ij(this.element.$ref)&&this.element.classes.push("reference-element"),t}}let pS=class extends YO{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=this.alternator.map((({predicate:e,specPath:t})=>Yp(e,Wf(t),Fd))),r=pm(t)(e);return this.element=this.toRefractedElement(r,e),Aj}},dS=class extends pS{constructor(e){super(e),this.alternator=[{predicate:eS,specPath:["document","objects","JSONReference"]},{predicate:Ch,specPath:["document","objects","JSONSchema"]}]}};class mS extends(XO(ZO,MO)){constructor(e){super(e),this.element=new FO,this.specPath=Wf(["document","objects","Media"])}}class vS extends(XO(ZO,MO)){constructor(e){super(e),this.element=new IO,this.specPath=Wf(["document","objects","LinkDescription"])}}const yS={visitors:{value:MO,JSONSchemaOrJSONReferenceVisitor:dS,document:{objects:{JSONSchema:{$visitor:KO,fixedFields:{id:{$ref:"#/visitors/value"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:dS,items:tS,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:class extends MO{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-required"),t}},properties:sS,additionalProperties:dS,patternProperties:iS,dependencies:oS,enum:class extends MO{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-enum"),t}},type:class extends MO{StringElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}},allOf:cS,anyOf:aS,oneOf:uS,not:dS,definitions:lS,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:hS,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:fS,fixedFields:{$ref:class extends MO{StringElement(e){const t=this.enter(e);return this.element.classes.push("reference-value"),t}}}},Media:{$visitor:mS,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:vS,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:dS,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:dS}}}}}},bS=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof TO||e(n)&&t("JSONSchemaDraft4",n)&&r("object",n))),gS=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof kO||e(n)&&t("JSONReference",n)&&r("object",n))),wS=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof FO||e(n)&&t("media",n)&&r("object",n))),xS=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof IO||e(n)&&t("linkDescription",n)&&r("object",n))),jS=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:gS,isJSONSchemaElement:bS,isLinkDescriptionElement:xS,isMediaElement:wS},Symbol.toStringTag,{value:"Module"})),ES=()=>{const e=$j(RO);return{predicates:{...jS,isStringElement:ij},namespace:e}},$S=e=>(t,r={})=>((e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:n=yS}={})=>{const s=zx(e),i=uE(n),o=new(pd(t,i))({specObj:i});return Gj(s,o),zj(o.element,r,{toolboxCreator:ES,visitorOptions:{keyMap:_O,nodeTypeGetter:DO}})})(t,{specPath:e,...r});TO.refract=$S(["visitors","document","objects","JSONSchema","$visitor"]),kO.refract=$S(["visitors","document","objects","JSONReference","$visitor"]),FO.refract=$S(["visitors","document","objects","Media","$visitor"]),IO.refract=$S(["visitors","document","objects","LinkDescription","$visitor"]);let OS=class extends TO{constructor(e,t,r){super(e,t,r),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new Rh("idProp getter in Schema class is not not supported.")}set idProp(e){throw new Rh("idProp setter in Schema class is not not supported.")}get $schema(){throw new Rh("$schema getter in Schema class is not not supported.")}set $schema(e){throw new Rh("$schema setter in Schema class is not not supported.")}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){throw new Rh("patternProperties getter in Schema class is not not supported.")}set patternProperties(e){throw new Rh("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new Rh("dependencies getter in Schema class is not not supported.")}set dependencies(e){throw new Rh("dependencies setter in Schema class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){throw new Rh("definitions getter in Schema class is not not supported.")}set definitions(e){throw new Rh("definitions setter in Schema class is not not supported.")}get base(){throw new Rh("base getter in Schema class is not not supported.")}set base(e){throw new Rh("base setter in Schema class is not not supported.")}get links(){throw new Rh("links getter in Schema class is not not supported.")}set links(e){throw new Rh("links setter in Schema class is not not supported.")}get media(){throw new Rh("media getter in Schema class is not not supported.")}set media(e){throw new Rh("media setter in Schema class is not not supported.")}get nullable(){return this.get("nullable")}set nullable(e){this.set("nullable",e)}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}},SS=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="securityRequirement"}},AS=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="securityScheme"}get type(){return this.get("type")}set type(e){this.set("type",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get scheme(){return this.get("scheme")}set scheme(e){this.set("scheme",e)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(e){this.set("bearerFormat",e)}get flows(){return this.get("flows")}set flows(e){this.set("flows",e)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(e){this.set("openIdConnectUrl",e)}},PS=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="server"}get url(){return this.get("url")}set url(e){this.set("url",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get variables(){return this.get("variables")}set variables(e){this.set("variables",e)}},TS=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}},kS=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="tag"}get name(){return this.get("name")}set name(e){this.set("name",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}},FS=class extends Jx{constructor(e,t,r){super(e,t,r),this.element="xml"}get name(){return this.get("name")}set name(e){this.set("name",e)}get namespace(){return this.get("namespace")}set namespace(e){this.set("namespace",e)}get prefix(){return this.get("prefix")}set prefix(e){this.set("prefix",e)}get attribute(){return this.get("attribute")}set attribute(e){this.set("attribute",e)}get wrapped(){return this.get("wrapped")}set wrapped(e){this.set("wrapped",e)}};const IS={namespace:e=>{const{base:t}=e;return t.register("callback",iO),t.register("components",oO),t.register("contact",cO),t.register("discriminator",aO),t.register("encoding",uO),t.register("example",lO),t.register("externalDocumentation",hO),t.register("header",fO),t.register("info",pO),t.register("license",dO),t.register("link",mO),t.register("mediaType",vO),t.register("oAuthFlow",yO),t.register("oAuthFlows",bO),t.register("openapi",gO),t.register("openApi3_0",wO),t.register("operation",xO),t.register("parameter",jO),t.register("pathItem",EO),t.register("paths",$O),t.register("reference",OO),t.register("requestBody",SO),t.register("response",AO),t.register("responses",PO),t.register("schema",OS),t.register("securityRequirement",SS),t.register("securityScheme",AS),t.register("server",PS),t.register("serverVariable",TS),t.register("tag",kS),t.register("xml",FS),t}};class RS extends Ux{static primaryClass="servers";constructor(e,t,r){super(e,t,r),this.classes.push(RS.primaryClass)}}class DS extends Ux{static primaryClass="security";constructor(e,t,r){super(e,t,r),this.classes.push(DS.primaryClass)}}class _S extends Ux{static primaryClass="tags";constructor(e,t,r){super(e,t,r),this.classes.push(_S.primaryClass)}}class CS extends Jx{static primaryClass="server-variables";constructor(e,t,r){super(e,t,r),this.classes.push(CS.primaryClass)}}class MS extends Jx{static primaryClass="components-schemas";constructor(e,t,r){super(e,t,r),this.classes.push(MS.primaryClass)}}class NS extends Jx{static primaryClass="components-responses";constructor(e,t,r){super(e,t,r),this.classes.push(NS.primaryClass)}}class qS extends Jx{static primaryClass="components-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(qS.primaryClass),this.classes.push("parameters")}}class BS extends Jx{static primaryClass="components-examples";constructor(e,t,r){super(e,t,r),this.classes.push(BS.primaryClass),this.classes.push("examples")}}class LS extends Jx{static primaryClass="components-request-bodies";constructor(e,t,r){super(e,t,r),this.classes.push(LS.primaryClass)}}class US extends Jx{static primaryClass="components-headers";constructor(e,t,r){super(e,t,r),this.classes.push(US.primaryClass)}}class JS extends Jx{static primaryClass="components-security-schemes";constructor(e,t,r){super(e,t,r),this.classes.push(JS.primaryClass)}}class VS extends Jx{static primaryClass="components-links";constructor(e,t,r){super(e,t,r),this.classes.push(VS.primaryClass)}}class GS extends Jx{static primaryClass="components-callbacks";constructor(e,t,r){super(e,t,r),this.classes.push(GS.primaryClass)}}class HS extends Ux{static primaryClass="path-item-servers";constructor(e,t,r){super(e,t,r),this.classes.push(HS.primaryClass),this.classes.push("servers")}}class zS extends Ux{static primaryClass="path-item-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(zS.primaryClass),this.classes.push("parameters")}}class XS extends Ux{static primaryClass="operation-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(XS.primaryClass),this.classes.push("parameters")}}class WS extends Jx{static primaryClass="parameter-examples";constructor(e,t,r){super(e,t,r),this.classes.push(WS.primaryClass),this.classes.push("examples")}}class YS extends Jx{static primaryClass="parameter-content";constructor(e,t,r){super(e,t,r),this.classes.push(YS.primaryClass),this.classes.push("content")}}class ZS extends Ux{static primaryClass="operation-tags";constructor(e,t,r){super(e,t,r),this.classes.push(ZS.primaryClass)}}class KS extends Jx{static primaryClass="operation-callbacks";constructor(e,t,r){super(e,t,r),this.classes.push(KS.primaryClass)}}class QS extends Ux{static primaryClass="operation-security";constructor(e,t,r){super(e,t,r),this.classes.push(QS.primaryClass),this.classes.push("security")}}class eA extends Ux{static primaryClass="operation-servers";constructor(e,t,r){super(e,t,r),this.classes.push(eA.primaryClass),this.classes.push("servers")}}class tA extends Jx{static primaryClass="request-body-content";constructor(e,t,r){super(e,t,r),this.classes.push(tA.primaryClass),this.classes.push("content")}}class rA extends Jx{static primaryClass="media-type-examples";constructor(e,t,r){super(e,t,r),this.classes.push(rA.primaryClass),this.classes.push("examples")}}class nA extends Jx{static primaryClass="media-type-encoding";constructor(e,t,r){super(e,t,r),this.classes.push(nA.primaryClass)}}class sA extends Jx{static primaryClass="encoding-headers";constructor(e,t,r){super(e,t,r),this.classes.push(sA.primaryClass)}}class iA extends Jx{static primaryClass="response-headers";constructor(e,t,r){super(e,t,r),this.classes.push(iA.primaryClass)}}class oA extends Jx{static primaryClass="response-content";constructor(e,t,r){super(e,t,r),this.classes.push(oA.primaryClass),this.classes.push("content")}}class cA extends Jx{static primaryClass="response-links";constructor(e,t,r){super(e,t,r),this.classes.push(cA.primaryClass)}}class aA extends Jx{static primaryClass="discriminator-mapping";constructor(e,t,r){super(e,t,r),this.classes.push(aA.primaryClass)}}class uA extends Jx{static primaryClass="oauth-flow-scopes";constructor(e,t,r){super(e,t,r),this.classes.push(uA.primaryClass)}}class lA extends Jx{static primaryClass="link-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(lA.primaryClass)}}class hA extends Jx{static primaryClass="header-examples";constructor(e,t,r){super(e,t,r),this.classes.push(hA.primaryClass),this.classes.push("examples")}}class fA extends Jx{static primaryClass="header-content";constructor(e,t,r){super(e,t,r),this.classes.push(fA.primaryClass),this.classes.push("content")}}const pA=e=>{if(sj(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},dA={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Jj};class mA{element;constructor(e={}){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=dE(t.meta,e.meta),gj(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=dE(t.attributes,e.attributes))}}class vA extends mA{enter(e){return this.element=Cj(e),Aj}}class yA extends mA{specObj;passingOptionsNames=["specObj","openApiGenericElement","openApiSemanticElement"];openApiGenericElement;openApiSemanticElement;constructor({specObj:e,passingOptionsNames:t,openApiGenericElement:r,openApiSemanticElement:n,...s}){super({...s}),this.specObj=e,this.openApiGenericElement=r,this.openApiSemanticElement=n,Array.isArray(t)&&(this.passingOptionsNames=t)}retrievePassingOptions(){return vd(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=pd(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return md(qd,["visitors",...e],this.specObj)?pd(["visitors",...e],this.specObj):pd(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...r,...t})}toRefractedElement(e,t,r={}){const n=this.retrieveVisitorInstance(e,r);return n instanceof vA&&(null==n?void 0:n.constructor)===vA?Cj(t):(Gj(t,n,r),n.element)}}const bA=e=>uj(e)&&e.hasKey("$ref"),gA=uj,wA=uj,xA=e=>ij(e.key)&&Od("x-",oE(e.key));class jA extends yA{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=xA;constructor({specPath:e,ignoredFields:t,canSupportSpecificationExtensions:r,specificationExtensionPredicate:n,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[],"boolean"==typeof r&&(this.canSupportSpecificationExtensions=r),"function"==typeof n&&(this.specificationExtensionPredicate=n)}ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach(((e,n,s)=>{if(ij(n)&&r.includes(oE(n))&&!this.ignoredFields.includes(oE(n))){const r=this.toRefractedElement([...t,"fixedFields",oE(n)],e),i=new Vx(Cj(n),r);this.copyMetaAndAttributes(s,i),i.classes.push("fixed-field"),this.element.content.push(i)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(s)){const e=this.toRefractedElement(["document","extension"],s);this.element.content.push(e)}else this.ignoredFields.includes(oE(n))||this.element.content.push(Cj(s))})),this.copyMetaAndAttributes(e,this.element),Aj}}class EA extends(XO(jA,vA)){constructor(e){super(e),this.element=new wO,this.specPath=Wf(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){return jA.prototype.ObjectElement.call(this,e)}}class $A extends(XO(yA,vA)){StringElement(e){const t=new gO(oE(e));return this.copyMetaAndAttributes(e,t),this.element=t,Aj}}let OA=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new pO,this.specPath=Wf(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}};let SA=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new cO,this.specPath=Wf(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}},AA=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new dO,this.specPath=Wf(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},PA=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new mO,this.specPath=Wf(["document","objects","Link"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return(ij(this.element.operationId)||ij(this.element.operationRef))&&this.element.classes.push("reference-element"),t}};class TA extends yA{specPath;ignoredFields;fieldPatternPredicate=_h;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=xA;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:r,canSupportSpecificationExtensions:n,specificationExtensionPredicate:s,...i}){super({...i}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof r&&(this.fieldPatternPredicate=r),"boolean"==typeof n&&(this.canSupportSpecificationExtensions=n),"function"==typeof s&&(this.specificationExtensionPredicate=s)}ObjectElement(e){return e.forEach(((e,t,r)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(r)){const e=this.toRefractedElement(["document","extension"],r);this.element.content.push(e)}else if(!this.ignoredFields.includes(oE(t))&&this.fieldPatternPredicate(oE(t))){const n=this.specPath(e),s=this.toRefractedElement(n,e),i=new Vx(Cj(t),s);this.copyMetaAndAttributes(r,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(oE(t))||this.element.content.push(Cj(r))})),this.copyMetaAndAttributes(e,this.element),Aj}}class kA extends TA{constructor(e){super(e),this.fieldPatternPredicate=Xd}}let FA=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new lA,this.specPath=Wf(["value"])}},IA=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new PS,this.specPath=Wf(["document","objects","Server"]),this.canSupportSpecificationExtensions=!0}};let RA=class extends(XO(yA,vA)){constructor(e){super(e),this.element=new RS}ArrayElement(e){return e.forEach((e=>{const t=gA(e)?["document","objects","Server"]:["value"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}},DA=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new TS,this.specPath=Wf(["document","objects","ServerVariable"]),this.canSupportSpecificationExtensions=!0}};class _A extends(XO(kA,vA)){constructor(e){super(e),this.element=new CS,this.specPath=Wf(["document","objects","ServerVariable"])}}let CA=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new vO,this.specPath=Wf(["document","objects","MediaType"]),this.canSupportSpecificationExtensions=!0}};class MA extends yA{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e||[]}enter(e){const t=this.alternator.map((({predicate:e,specPath:t})=>Yp(e,Wf(t),Fd))),r=pm(t)(e);return this.element=this.toRefractedElement(r,e),Aj}}const NA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof iO||e(n)&&t("callback",n)&&r("object",n))),qA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof oO||e(n)&&t("components",n)&&r("object",n))),BA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof cO||e(n)&&t("contact",n)&&r("object",n))),LA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof lO||e(n)&&t("example",n)&&r("object",n))),UA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof hO||e(n)&&t("externalDocumentation",n)&&r("object",n))),JA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof fO||e(n)&&t("header",n)&&r("object",n))),VA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof pO||e(n)&&t("info",n)&&r("object",n))),GA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof dO||e(n)&&t("license",n)&&r("object",n))),HA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof mO||e(n)&&t("link",n)&&r("object",n))),zA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof gO||e(n)&&t("openapi",n)&&r("string",n))),XA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:n})=>s=>s instanceof wO||e(s)&&t("openApi3_0",s)&&r("object",s)&&n("api",s))),WA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof xO||e(n)&&t("operation",n)&&r("object",n))),YA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof jO||e(n)&&t("parameter",n)&&r("object",n))),ZA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof EO||e(n)&&t("pathItem",n)&&r("object",n))),KA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof $O||e(n)&&t("paths",n)&&r("object",n))),QA=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof OO||e(n)&&t("reference",n)&&r("object",n))),eP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof SO||e(n)&&t("requestBody",n)&&r("object",n))),tP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof AO||e(n)&&t("response",n)&&r("object",n))),rP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof PO||e(n)&&t("responses",n)&&r("object",n))),nP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof OS||e(n)&&t("schema",n)&&r("object",n))),sP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof SS||e(n)&&t("securityRequirement",n)&&r("object",n))),iP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof AS||e(n)&&t("securityScheme",n)&&r("object",n))),oP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof PS||e(n)&&t("server",n)&&r("object",n))),cP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof TS||e(n)&&t("serverVariable",n)&&r("object",n))),aP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof vO||e(n)&&t("mediaType",n)&&r("object",n))),uP=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:n})=>s=>s instanceof RS||e(s)&&t("array",s)&&r("array",s)&&n("servers",s))),lP=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:e=>aj(e)&&e.classes.includes("boolean-json-schema"),isCallbackElement:NA,isComponentsElement:qA,isContactElement:BA,isExampleElement:LA,isExternalDocumentationElement:UA,isHeaderElement:JA,isInfoElement:VA,isLicenseElement:GA,isLinkElement:HA,isMediaTypeElement:aP,isOpenApi3_0Element:XA,isOpenapiElement:zA,isOperationElement:WA,isParameterElement:YA,isPathItemElement:ZA,isPathsElement:KA,isReferenceElement:QA,isRequestBodyElement:eP,isResponseElement:tP,isResponsesElement:rP,isSchemaElement:nP,isSecurityRequirementElement:sP,isSecuritySchemeElement:iP,isServerElement:oP,isServerVariableElement:cP,isServersElement:uP},Symbol.toStringTag,{value:"Module"}));let hP=class extends(XO(MA,vA)){constructor(e){super(e),this.alternator=[{predicate:bA,specPath:["document","objects","Reference"]},{predicate:Ch,specPath:["document","objects","Schema"]}]}ObjectElement(e){const t=MA.prototype.enter.call(this,e);return QA(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}},fP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("examples"),this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Example"],this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","example")})),t}},pP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new nA,this.specPath=Wf(["document","objects","Encoding"])}},dP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new SS,this.specPath=Wf(["value"])}},mP=class extends(XO(yA,vA)){constructor(e){super(e),this.element=new DS}ArrayElement(e){return e.forEach((e=>{if(uj(e)){const t=this.toRefractedElement(["document","objects","SecurityRequirement"],e);this.element.push(t)}else this.element.push(Cj(e))})),this.copyMetaAndAttributes(e,this.element),Aj}},vP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new oO,this.specPath=Wf(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}},yP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new kS,this.specPath=Wf(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}},bP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new OO,this.specPath=Wf(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return ij(this.element.$ref)&&this.element.classes.push("reference-element"),t}},gP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new jO,this.specPath=Wf(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return uj(this.element.contentProp)&&this.element.contentProp.filter(aP).forEach(((e,t)=>{e.setMetaProperty("media-type",oE(t))})),t}},wP=class extends(XO(MA,vA)){constructor(e){super(e),this.alternator=[{predicate:bA,specPath:["document","objects","Reference"]},{predicate:Ch,specPath:["document","objects","Schema"]}]}ObjectElement(e){const t=MA.prototype.enter.call(this,e);return QA(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}},xP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new fO,this.specPath=Wf(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}},jP=class extends(XO(MA,vA)){constructor(e){super(e),this.alternator=[{predicate:bA,specPath:["document","objects","Reference"]},{predicate:Ch,specPath:["document","objects","Schema"]}]}ObjectElement(e){const t=MA.prototype.enter.call(this,e);return QA(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}},EP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("content"),this.specPath=Wf(["document","objects","MediaType"])}},$P=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new OS,this.specPath=Wf(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}};const{allOf:OP}=yS.visitors.document.objects.JSONSchema.fixedFields;const{anyOf:SP}=yS.visitors.document.objects.JSONSchema.fixedFields;const{oneOf:AP}=yS.visitors.document.objects.JSONSchema.fixedFields;const{items:PP}=yS.visitors.document.objects.JSONSchema.fixedFields;const{properties:TP}=yS.visitors.document.objects.JSONSchema.fixedFields;const{type:kP}=yS.visitors.document.objects.JSONSchema.fixedFields;const{JSONSchemaOrJSONReferenceVisitor:FP}=yS.visitors;class IP extends FP{ObjectElement(e){const t=FP.prototype.enter.call(this,e);return QA(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}let RP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new aO,this.specPath=Wf(["document","objects","Discriminator"]),this.canSupportSpecificationExtensions=!1}};class DP extends(XO(kA,vA)){constructor(e){super(e),this.element=new aA,this.specPath=Wf(["value"])}}let _P=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new FS,this.specPath=Wf(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}},CP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new MS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Schema"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},MP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new NS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Response"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","response")})),this.element.filter(tP).forEach(((e,t)=>{e.setMetaProperty("http-status-code",oE(t))})),t}},NP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new qS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Parameter"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","parameter")})),t}},qP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new BS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Example"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","example")})),t}};class BP extends(XO(kA,vA)){constructor(e){super(e),this.element=new LS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","RequestBody"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","requestBody")})),t}}let LP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new US,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","header")})),this.element.filter(JA).forEach(((e,t)=>{e.setMetaProperty("header-name",oE(t))})),t}};class UP extends(XO(kA,vA)){constructor(e){super(e),this.element=new JS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","SecurityScheme"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","securityScheme")})),t}}let JP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new VS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","link")})),t}},VP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new GS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","callback")})),t}},GP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new lO,this.specPath=Wf(["document","objects","Example"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return ij(this.element.externalValue)&&this.element.classes.push("reference-element"),t}};let HP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new hO,this.specPath=Wf(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}},zP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new uO,this.specPath=Wf(["document","objects","Encoding"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return uj(this.element.headers)&&this.element.headers.filter(JA).forEach(((e,t)=>{e.setMetaProperty("header-name",oE(t))})),t}},XP=class extends(XO(kA,vA)){constructor(e){super(e),this.element=new sA,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","header")})),this.element.forEach(((e,t)=>{if(!JA(e))return;const r=oE(t);e.setMetaProperty("headerName",r)})),t}},WP=class extends(XO(TA,vA)){constructor(e){super(e),this.element=new $O,this.specPath=Wf(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=Ch}ObjectElement(e){const t=TA.prototype.ObjectElement.call(this,e);return this.element.filter(ZA).forEach(((e,t)=>{t.classes.push("openapi-path-template"),t.classes.push("path-template"),e.setMetaProperty("path",Cj(t))})),t}},YP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new SO,this.specPath=Wf(["document","objects","RequestBody"])}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return uj(this.element.contentProp)&&this.element.contentProp.filter(aP).forEach(((e,t)=>{e.setMetaProperty("media-type",oE(t))})),t}},ZP=class extends(XO(TA,vA)){constructor(e){super(e),this.element=new iO,this.specPath=Wf(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=e=>/{(?<expression>[^}]{1,2083})}/.test(String(e))}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(ZA).forEach(((e,t)=>{e.setMetaProperty("runtime-expression",oE(t))})),t}},KP=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new AO,this.specPath=Wf(["document","objects","Response"])}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return uj(this.element.contentProp)&&this.element.contentProp.filter(aP).forEach(((e,t)=>{e.setMetaProperty("media-type",oE(t))})),uj(this.element.headers)&&this.element.headers.filter(JA).forEach(((e,t)=>{e.setMetaProperty("header-name",oE(t))})),t}};class QP extends(XO(kA,vA)){constructor(e){super(e),this.element=new iA,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","header")})),this.element.forEach(((e,t)=>{if(!JA(e))return;const r=oE(t);e.setMetaProperty("header-name",r)})),t}}class eT extends(XO(kA,vA)){constructor(e){super(e),this.element=new cA,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","link")})),t}}class tT extends(XO(jA,TA)){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:e,specPathPatternedFields:t,...r}){super({...r}),this.specPathFixedFields=e,this.specPathPatternedFields=t}ObjectElement(e){const{specPath:t,ignoredFields:r}=this;try{this.specPath=this.specPathFixedFields;const t=this.retrieveFixedFields(this.specPath(e));this.ignoredFields=[...r,...kp(e.keys(),t)],jA.prototype.ObjectElement.call(this,e),this.specPath=this.specPathPatternedFields,this.ignoredFields=t,TA.prototype.ObjectElement.call(this,e)}catch(e){throw this.specPath=t,e}return Aj}}let rT=class extends(XO(tT,vA)){constructor(e){super(e),this.element=new PO,this.specPathFixedFields=Wf(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=e=>bA(e)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=e=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${wd(100,600).join("|")})$`).test(String(e))}ObjectElement(e){const t=tT.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","response")})),this.element.filter(tP).forEach(((e,t)=>{const r=Cj(t);this.fieldPatternPredicate(oE(r))&&e.setMetaProperty("http-status-code",r)})),t}};class nT extends(XO(MA,vA)){constructor(e){super(e),this.alternator=[{predicate:bA,specPath:["document","objects","Reference"]},{predicate:Ch,specPath:["document","objects","Response"]}]}ObjectElement(e){const t=MA.prototype.enter.call(this,e);return QA(this.element)?this.element.setMetaProperty("referenced-element","response"):tP(this.element)&&this.element.setMetaProperty("http-status-code","default"),t}}let sT=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new xO,this.specPath=Wf(["document","objects","Operation"])}},iT=class extends(XO(yA,vA)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("parameters")}ArrayElement(e){return e.forEach((e=>{const t=bA(e)?["document","objects","Reference"]:["document","objects","Parameter"],r=this.toRefractedElement(t,e);QA(r)&&r.setMetaProperty("referenced-element","parameter"),this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}};class oT extends(XO(kA,vA)){specPath;constructor(e){super(e),this.element=new KS,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","callback")})),t}}class cT extends(XO(yA,vA)){constructor(e){super(e),this.element=new QS}ArrayElement(e){return e.forEach((e=>{const t=uj(e)?["document","objects","SecurityRequirement"]:["value"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}}let aT=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new EO,this.specPath=Wf(["document","objects","PathItem"])}ObjectElement(e){const t=jA.prototype.ObjectElement.call(this,e);return this.element.filter(WA).forEach(((e,t)=>{const r=Cj(t);r.content=oE(r).toUpperCase(),e.setMetaProperty("http-method",r)})),ij(this.element.$ref)&&this.element.classes.push("reference-element"),t}};let uT=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new AS,this.specPath=Wf(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}},lT=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new bO,this.specPath=Wf(["document","objects","OAuthFlows"]),this.canSupportSpecificationExtensions=!0}},hT=class extends(XO(jA,vA)){constructor(e){super(e),this.element=new yO,this.specPath=Wf(["document","objects","OAuthFlow"]),this.canSupportSpecificationExtensions=!0}};class fT extends(XO(kA,vA)){constructor(e){super(e),this.element=new uA,this.specPath=Wf(["value"])}}class pT extends(XO(yA,vA)){constructor(e){super(e),this.element=new _S}ArrayElement(e){return e.forEach((e=>{const t=wA(e)?["document","objects","Tag"]:["value"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),Aj}}const{fixedFields:dT}=yS.visitors.document.objects.JSONSchema,mT={visitors:{value:vA,document:{objects:{OpenApi:{$visitor:EA,fixedFields:{openapi:$A,info:{$ref:"#/visitors/document/objects/Info"},servers:RA,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:mP,tags:pT,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:OA,fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("api-version"),this.element.classes.push("version"),t}}}},Contact:{$visitor:SA,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:AA,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Server:{$visitor:IA,fixedFields:{url:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("server-url"),t}},description:{$ref:"#/visitors/value"},variables:_A}},ServerVariable:{$visitor:DA,fixedFields:{enum:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Components:{$visitor:vP,fixedFields:{schemas:CP,responses:MP,parameters:NP,examples:qP,requestBodies:BP,headers:LP,securitySchemes:UP,links:JP,callbacks:VP}},Paths:{$visitor:WP},PathItem:{$visitor:aT,fixedFields:{$ref:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:class extends RA{constructor(e){super(e),this.element=new HS}},parameters:class extends iT{constructor(e){super(e),this.element=new zS}}}},Operation:{$visitor:sT,fixedFields:{tags:class extends vA{constructor(e){super(e),this.element=new ZS}ArrayElement(e){return this.element=this.element.concat(Cj(e)),Aj}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},parameters:class extends iT{constructor(e){super(e),this.element=new XS}},requestBody:class extends MA{constructor(e){super(e),this.alternator=[{predicate:bA,specPath:["document","objects","Reference"]},{predicate:Ch,specPath:["document","objects","RequestBody"]}]}ObjectElement(e){const t=MA.prototype.enter.call(this,e);return QA(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),t}},responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:oT,deprecated:{$ref:"#/visitors/value"},security:cT,servers:class extends RA{constructor(e){super(e),this.element=new eA}}}},ExternalDocumentation:{$visitor:HP,fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:gP,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:wP,example:{$ref:"#/visitors/value"},examples:class extends fP{constructor(e){super(e),this.element=new WS}},content:class extends EP{constructor(e){super(e),this.element=new YS}}}},RequestBody:{$visitor:YP,fixedFields:{description:{$ref:"#/visitors/value"},content:class extends EP{constructor(e){super(e),this.element=new tA}},required:{$ref:"#/visitors/value"}}},MediaType:{$visitor:CA,fixedFields:{schema:hP,example:{$ref:"#/visitors/value"},examples:class extends fP{constructor(e){super(e),this.element=new rA}},encoding:pP}},Encoding:{$visitor:zP,fixedFields:{contentType:{$ref:"#/visitors/value"},headers:XP,style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"}}},Responses:{$visitor:rT,fixedFields:{default:nT}},Response:{$visitor:KP,fixedFields:{description:{$ref:"#/visitors/value"},headers:QP,content:class extends EP{constructor(e){super(e),this.element=new oA}},links:eT}},Callback:{$visitor:ZP},Example:{$visitor:GP,fixedFields:{summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"},externalValue:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}}}},Link:{$visitor:PA,fixedFields:{operationRef:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},operationId:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},parameters:FA,requestBody:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:xP,fixedFields:{description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:jP,example:{$ref:"#/visitors/value"},examples:class extends fP{constructor(e){super(e),this.element=new hA}},content:class extends EP{constructor(e){super(e),this.element=new fA}}}},Tag:{$visitor:yP,fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:bP,fixedFields:{$ref:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}}}},JSONSchema:{$ref:"#/visitors/document/objects/Schema"},JSONReference:{$ref:"#/visitors/document/objects/Reference"},Schema:{$visitor:$P,fixedFields:{title:dT.title,multipleOf:dT.multipleOf,maximum:dT.maximum,exclusiveMaximum:dT.exclusiveMaximum,minimum:dT.minimum,exclusiveMinimum:dT.exclusiveMinimum,maxLength:dT.maxLength,minLength:dT.minLength,pattern:dT.pattern,maxItems:dT.maxItems,minItems:dT.minItems,uniqueItems:dT.uniqueItems,maxProperties:dT.maxProperties,minProperties:dT.minProperties,required:dT.required,enum:dT.enum,type:class extends kP{ArrayElement(e){return this.enter(e)}},allOf:class extends OP{ArrayElement(e){const t=OP.prototype.ArrayElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},anyOf:class extends SP{ArrayElement(e){const t=SP.prototype.ArrayElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},oneOf:class extends AP{ArrayElement(e){const t=AP.prototype.ArrayElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},not:IP,items:class extends PP{ObjectElement(e){const t=PP.prototype.ObjectElement.call(this,e);return QA(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}ArrayElement(e){return this.enter(e)}},properties:class extends TP{ObjectElement(e){const t=TP.prototype.ObjectElement.call(this,e);return this.element.filter(QA).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},additionalProperties:IP,description:dT.description,format:dT.format,default:dT.default,nullable:{$ref:"#/visitors/value"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:RP,fixedFields:{propertyName:{$ref:"#/visitors/value"},mapping:DP}},XML:{$visitor:_P,fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},SecurityScheme:{$visitor:uT,fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},scheme:{$ref:"#/visitors/value"},bearerFormat:{$ref:"#/visitors/value"},flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:{$ref:"#/visitors/value"}}},OAuthFlows:{$visitor:lT,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:hT,fixedFields:{authorizationUrl:{$ref:"#/visitors/value"},tokenUrl:{$ref:"#/visitors/value"},refreshUrl:{$ref:"#/visitors/value"},scopes:fT}},SecurityRequirement:{$visitor:dP}},extension:{$visitor:class extends yA{MemberElement(e){return this.element=Cj(e),this.element.classes.push("specification-extension"),Aj}}}}}},vT=()=>{const e=$j(IS);return{predicates:{...lP,isElement:sj,isStringElement:ij,isArrayElement:lj,isObjectElement:uj,isMemberElement:hj,includesClasses:wj,hasElementSourceMap:gj},namespace:e}},yT=e=>(t,r={})=>((e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=zx(e),s=uE(mT),i=new(pd(t,s))({specObj:s});return Gj(n,i),zj(i.element,r,{toolboxCreator:vT,visitorOptions:{keyMap:dA,nodeTypeGetter:pA}})})(t,{specPath:e,...r});iO.refract=yT(["visitors","document","objects","Callback","$visitor"]),oO.refract=yT(["visitors","document","objects","Components","$visitor"]),cO.refract=yT(["visitors","document","objects","Contact","$visitor"]),lO.refract=yT(["visitors","document","objects","Example","$visitor"]),aO.refract=yT(["visitors","document","objects","Discriminator","$visitor"]),uO.refract=yT(["visitors","document","objects","Encoding","$visitor"]),hO.refract=yT(["visitors","document","objects","ExternalDocumentation","$visitor"]),fO.refract=yT(["visitors","document","objects","Header","$visitor"]),pO.refract=yT(["visitors","document","objects","Info","$visitor"]),dO.refract=yT(["visitors","document","objects","License","$visitor"]),mO.refract=yT(["visitors","document","objects","Link","$visitor"]),vO.refract=yT(["visitors","document","objects","MediaType","$visitor"]),yO.refract=yT(["visitors","document","objects","OAuthFlow","$visitor"]),bO.refract=yT(["visitors","document","objects","OAuthFlows","$visitor"]),gO.refract=yT(["visitors","document","objects","OpenApi","fixedFields","openapi"]),wO.refract=yT(["visitors","document","objects","OpenApi","$visitor"]),xO.refract=yT(["visitors","document","objects","Operation","$visitor"]),jO.refract=yT(["visitors","document","objects","Parameter","$visitor"]),EO.refract=yT(["visitors","document","objects","PathItem","$visitor"]),$O.refract=yT(["visitors","document","objects","Paths","$visitor"]),OO.refract=yT(["visitors","document","objects","Reference","$visitor"]),SO.refract=yT(["visitors","document","objects","RequestBody","$visitor"]),AO.refract=yT(["visitors","document","objects","Response","$visitor"]),PO.refract=yT(["visitors","document","objects","Responses","$visitor"]),OS.refract=yT(["visitors","document","objects","Schema","$visitor"]),SS.refract=yT(["visitors","document","objects","SecurityRequirement","$visitor"]),AS.refract=yT(["visitors","document","objects","SecurityScheme","$visitor"]),PS.refract=yT(["visitors","document","objects","Server","$visitor"]),TS.refract=yT(["visitors","document","objects","ServerVariable","$visitor"]),kS.refract=yT(["visitors","document","objects","Tag","$visitor"]),FS.refract=yT(["visitors","document","objects","XML","$visitor"]);class bT extends iO{}class gT extends oO{get pathItems(){return this.get("pathItems")}set pathItems(e){this.set("pathItems",e)}}class wT extends cO{}class xT extends aO{}class jT extends uO{}class ET extends lO{}class $T extends hO{}class OT extends fO{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class ST extends pO{get license(){return this.get("license")}set license(e){this.set("license",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}}class AT extends Nx{static default=new AT("https://spec.openapis.org/oas/3.1/dialect/base");constructor(e,t,r){super(e,t,r),this.element="jsonSchemaDialect"}}class PT extends dO{get identifier(){return this.get("identifier")}set identifier(e){this.set("identifier",e)}}class TT extends mO{}class kT extends vO{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class FT extends yO{}class IT extends bO{}class RT extends gO{}class DT extends Jx{constructor(e,t,r){super(e,t,r),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(e){this.set("openapi",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(e){this.set("jsonSchemaDialect",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get webhooks(){return this.get("webhooks")}set webhooks(e){this.set("webhooks",e)}}class _T extends xO{get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}}class CT extends jO{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class MT extends EO{get GET(){return this.get("get")}set GET(e){this.set("GET",e)}get PUT(){return this.get("put")}set PUT(e){this.set("PUT",e)}get POST(){return this.get("post")}set POST(e){this.set("POST",e)}get DELETE(){return this.get("delete")}set DELETE(e){this.set("DELETE",e)}get OPTIONS(){return this.get("options")}set OPTIONS(e){this.set("OPTIONS",e)}get HEAD(){return this.get("head")}set HEAD(e){this.set("HEAD",e)}get PATCH(){return this.get("patch")}set PATCH(e){this.set("PATCH",e)}get TRACE(){return this.get("trace")}set TRACE(e){this.set("TRACE",e)}}class NT extends $O{}class qT extends OO{}Object.defineProperty(qT.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0}),Object.defineProperty(qT.prototype,"summary",{get(){return this.get("summary")},set(e){this.set("summary",e)},enumerable:!0});class BT extends SO{}let LT=class extends AO{};class UT extends PO{}class JT extends Jx{constructor(e,t,r){super(e,t,r),this.element="schema"}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(e){this.set("$vocabulary",e)}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get $anchor(){return this.get("$anchor")}set $anchor(e){this.set("$anchor",e)}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(e){this.set("$dynamicRef",e)}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get $defs(){return this.get("$defs")}set $defs(e){this.set("$defs",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(e){this.set("dependentSchemas",e)}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get containsProp(){return this.get("contains")}set containsProp(e){this.set("contains",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(e){this.set("unevaluatedItems",e)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(e){this.set("unevaluatedProperties",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxContains(){return this.get("maxContains")}set maxContains(e){this.set("maxContains",e)}get minContains(){return this.get("minContains")}set minContains(e){this.set("minContains",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(e){this.set("dependentRequired",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get contentSchema(){return this.get("contentSchema")}set contentSchema(e){this.set("contentSchema",e)}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}}class VT extends SS{}class GT extends AS{}class HT extends PS{}class zT extends TS{}class XT extends kS{}class WT extends FS{}const YT={namespace:e=>{const{base:t}=e;return t.register("callback",bT),t.register("components",gT),t.register("contact",wT),t.register("discriminator",xT),t.register("encoding",jT),t.register("example",ET),t.register("externalDocumentation",$T),t.register("header",OT),t.register("info",ST),t.register("jsonSchemaDialect",AT),t.register("license",PT),t.register("link",TT),t.register("mediaType",kT),t.register("oAuthFlow",FT),t.register("oAuthFlows",IT),t.register("openapi",RT),t.register("openApi3_1",DT),t.register("operation",_T),t.register("parameter",CT),t.register("pathItem",MT),t.register("paths",NT),t.register("reference",qT),t.register("requestBody",BT),t.register("response",LT),t.register("responses",UT),t.register("schema",JT),t.register("securityRequirement",VT),t.register("securityScheme",GT),t.register("server",HT),t.register("serverVariable",zT),t.register("tag",XT),t.register("xml",WT),t}};class ZT extends Jx{static primaryClass="components-path-items";constructor(e,t,r){super(e,t,r),this.classes.push(ZT.primaryClass)}}class KT extends Jx{static primaryClass="webhooks";constructor(e,t,r){super(e,t,r),this.classes.push(KT.primaryClass)}}const QT=e=>{if(sj(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},ek={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Jj};class tk{internalStore;constructor(e,t,r){this.storageElement=e,this.storageField=t,this.storageSubField=r}get store(){if(!this.internalStore){let e=this.storageElement.get(this.storageField);uj(e)||(e=new Jx,this.storageElement.set(this.storageField,e));let t=e.get(this.storageSubField);lj(t)||(t=new Ux,e.set(this.storageSubField,t)),this.internalStore=t}return this.internalStore}append(e){this.includes(e)||this.store.push(e)}includes(e){return this.store.includes(e)}}const rk=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:n}=t,s=(e,t)=>!!r.isParameterElement(e)&&(!!r.isParameterElement(t)&&(!!r.isStringElement(e.name)&&(!!r.isStringElement(e.in)&&(!!r.isStringElement(t.name)&&(!!r.isStringElement(t.in)&&(oE(e.name)===oE(t.name)&&oE(e.in)===oE(t.in))))))),i=[];let o;return{visitor:{OpenApi3_1Element:{enter(t){o=new tk(t,e,"parameters")},leave(){o=void 0}},PathItemElement:{enter(e,t,n,s,o){if(o.some(r.isComponentsElement))return;const{parameters:c}=e;r.isArrayElement(c)?i.push([...c.content]):i.push([])},leave(){i.pop()}},OperationElement:{leave(e,t,r,c,a){const u=Np(i);if(!Array.isArray(u)||0===u.length)return;const l=n([...a,r,e]);if(o.includes(l))return;const h=dd([],["parameters","content"],e),f=Td(s,[...h,...u]);e.parameters=new XS(f),o.append(l)}}}}},nk=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:n}=t;let s,i;return{visitor:{OpenApi3_1Element:{enter(t){i=new tk(t,e,"security-requirements"),r.isArrayElement(t.security)&&(s=t.security)},leave(){i=void 0,s=void 0}},OperationElement:{leave(e,t,o,c,a){if(a.some(r.isComponentsElement))return;const u=n([...a,o,e]);if(i.includes(u))return;var l;void 0===e.security&&void 0!==s&&(e.security=new QS(null===(l=s)||void 0===l?void 0:l.content),i.append(u))}}}}},sk=e=>e.replace(/\s/g,""),ik=e=>e.replace(/\W/gi,"_"),ok=(e,t,r)=>{const n=sk(e);return n.length>0?ik(n):((e,t)=>`${ik(sk(t.toLowerCase()))}${ik(sk(e))}`)(t,r)},ck=({storageField:e="x-normalized",operationIdNormalizer:t=ok}={})=>r=>{const{predicates:n,ancestorLineageToJSONPointer:s,namespace:i}=r,o=[],c=[],a=[];let u;return{visitor:{OpenApi3_1Element:{enter(t){u=new tk(t,e,"operation-ids")},leave(){const e=Hp((e=>oE(e.operationId)),c);Object.entries(e).forEach((([e,t])=>{Array.isArray(t)&&(t.length<=1||t.forEach(((t,r)=>{const n=`${e}${r+1}`;t.operationId=new i.elements.String(n)})))})),a.forEach((e=>{if(void 0===e.operationId)return;const t=String(oE(e.operationId)),r=c.find((e=>oE(e.meta.get("originalOperationId"))===t));void 0!==r&&(e.operationId=Cj.safe(r.operationId),e.meta.set("originalOperationId",t),e.set("__originalOperationId",t))})),c.length=0,a.length=0,u=void 0}},PathItemElement:{enter(e){const t=Ap("path",oE(e.meta.get("path")));o.push(t)},leave(){o.pop()}},OperationElement:{enter(e,r,n,a,l){if(void 0===e.operationId)return;const h=s([...l,n,e]);if(u.includes(h))return;const f=String(oE(e.operationId)),p=Np(o),d=Ap("method",oE(e.meta.get("http-method"))),m=t(f,p,d);f!==m&&(e.operationId=new i.elements.String(m),e.set("__originalOperationId",f),e.meta.set("originalOperationId",f),c.push(e),u.append(h))}},LinkElement:{leave(e){n.isLinkElement(e)&&void 0!==e.operationId&&a.push(e)}}}}},ak=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:n}=t;let s;return{visitor:{OpenApi3_1Element:{enter(t){s=new tk(t,e,"parameter-examples")},leave(){s=void 0}},ParameterElement:{leave(e,t,i,o,c){var a,u;if(c.some(r.isComponentsElement))return;if(void 0===e.schema||!r.isSchemaElement(e.schema))return;if(void 0===(null===(a=e.schema)||void 0===a?void 0:a.example)&&void 0===(null===(u=e.schema)||void 0===u?void 0:u.examples))return;const l=n([...c,i,e]);if(!s.includes(l)){if(void 0!==e.examples&&r.isObjectElement(e.examples)){const t=e.examples.map((e=>Cj.safe(e.value)));return void 0!==e.schema.examples&&(e.schema.set("examples",t),s.append(l)),void(void 0!==e.schema.example&&(e.schema.set("example",t[0]),s.append(l)))}void 0!==e.example&&(void 0!==e.schema.examples&&(e.schema.set("examples",[Cj(e.example)]),s.append(l)),void 0!==e.schema.example&&(e.schema.set("example",Cj(e.example)),s.append(l)))}}}}}},uk=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:n}=t;let s;return{visitor:{OpenApi3_1Element:{enter(t){s=new tk(t,e,"header-examples")},leave(){s=void 0}},HeaderElement:{leave(e,t,i,o,c){var a,u;if(c.some(r.isComponentsElement))return;if(void 0===e.schema||!r.isSchemaElement(e.schema))return;if(void 0===(null===(a=e.schema)||void 0===a?void 0:a.example)&&void 0===(null===(u=e.schema)||void 0===u?void 0:u.examples))return;const l=n([...c,i,e]);if(!s.includes(l)){if(void 0!==e.examples&&r.isObjectElement(e.examples)){const t=e.examples.map((e=>Cj.safe(e.value)));return void 0!==e.schema.examples&&(e.schema.set("examples",t),s.append(l)),void(void 0!==e.schema.example&&(e.schema.set("example",t[0]),s.append(l)))}void 0!==e.example&&(void 0!==e.schema.examples&&(e.schema.set("examples",[Cj(e.example)]),s.append(l)),void 0!==e.schema.example&&(e.schema.set("example",Cj(e.example)),s.append(l)))}}}}}},lk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof bT||e(n)&&t("callback",n)&&r("object",n))),hk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof gT||e(n)&&t("components",n)&&r("object",n))),fk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof wT||e(n)&&t("contact",n)&&r("object",n))),pk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof ET||e(n)&&t("example",n)&&r("object",n))),dk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof $T||e(n)&&t("externalDocumentation",n)&&r("object",n))),mk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof OT||e(n)&&t("header",n)&&r("object",n))),vk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof ST||e(n)&&t("info",n)&&r("object",n))),yk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof AT||e(n)&&t("jsonSchemaDialect",n)&&r("string",n))),bk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof PT||e(n)&&t("license",n)&&r("object",n))),gk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof TT||e(n)&&t("link",n)&&r("object",n))),wk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof RT||e(n)&&t("openapi",n)&&r("string",n))),xk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:n})=>s=>s instanceof DT||e(s)&&t("openApi3_1",s)&&r("object",s)&&n("api",s))),jk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof _T||e(n)&&t("operation",n)&&r("object",n))),Ek=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof CT||e(n)&&t("parameter",n)&&r("object",n))),$k=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof MT||e(n)&&t("pathItem",n)&&r("object",n))),Ok=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof NT||e(n)&&t("paths",n)&&r("object",n))),Sk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof qT||e(n)&&t("reference",n)&&r("object",n))),Ak=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof BT||e(n)&&t("requestBody",n)&&r("object",n))),Pk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof LT||e(n)&&t("response",n)&&r("object",n))),Tk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof UT||e(n)&&t("responses",n)&&r("object",n))),kk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof JT||e(n)&&t("schema",n)&&r("object",n))),Fk=e=>aj(e)&&e.classes.includes("boolean-json-schema"),Ik=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof VT||e(n)&&t("securityRequirement",n)&&r("object",n))),Rk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof GT||e(n)&&t("securityScheme",n)&&r("object",n))),Dk=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof HT||e(n)&&t("server",n)&&r("object",n))),_k=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof zT||e(n)&&t("serverVariable",n)&&r("object",n))),Ck=nj((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>n=>n instanceof kT||e(n)&&t("mediaType",n)&&r("object",n))),Mk=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:Fk,isCallbackElement:lk,isComponentsElement:hk,isContactElement:fk,isExampleElement:pk,isExternalDocumentationElement:dk,isHeaderElement:mk,isInfoElement:vk,isJsonSchemaDialectElement:yk,isLicenseElement:bk,isLinkElement:gk,isMediaTypeElement:Ck,isOpenApi3_1Element:xk,isOpenapiElement:wk,isOperationElement:jk,isParameterElement:Ek,isPathItemElement:$k,isPathItemElementExternal:e=>{if(!$k(e))return!1;if(!ij(e.$ref))return!1;const t=oE(e.$ref);return"string"==typeof t&&t.length>0&&!t.startsWith("#")},isPathsElement:Ok,isReferenceElement:Sk,isReferenceElementExternal:e=>{if(!Sk(e))return!1;if(!ij(e.$ref))return!1;const t=oE(e.$ref);return"string"==typeof t&&t.length>0&&!t.startsWith("#")},isRequestBodyElement:Ak,isResponseElement:Pk,isResponsesElement:Tk,isSchemaElement:kk,isSecurityRequirementElement:Ik,isSecuritySchemeElement:Rk,isServerElement:Dk,isServerVariableElement:_k},Symbol.toStringTag,{value:"Module"})),Nk=e=>{const t=e.reduce(((t,r,n)=>{if(hj(r)){const e=String(oE(r.key));t.push(e)}else if(lj(e[n-2])){const s=String(e[n-2].content.indexOf(r));t.push(s)}return t}),[]);return tO(t)},qk=()=>{const e=$j(YT);return{predicates:{...Mk,isElement:sj,isStringElement:ij,isArrayElement:lj,isObjectElement:uj,isMemberElement:hj,isServersElement:uP,includesClasses:wj,hasElementSourceMap:gj},ancestorLineageToJSONPointer:Nk,namespace:e}};class Bk extends(XO(jA,vA)){constructor(e){super(e),this.element=new DT,this.specPath=Wf(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(e){return this.openApiGenericElement=e,jA.prototype.ObjectElement.call(this,e)}}const{visitors:{document:{objects:{Info:{$visitor:Lk}}}}}=mT;const{visitors:{document:{objects:{Contact:{$visitor:Uk}}}}}=mT;const{visitors:{document:{objects:{License:{$visitor:Jk}}}}}=mT;const{visitors:{document:{objects:{Link:{$visitor:Vk}}}}}=mT;class Gk extends(XO(yA,vA)){StringElement(e){const t=new AT(oE(e));return this.copyMetaAndAttributes(e,t),this.element=t,Aj}}const{visitors:{document:{objects:{Server:{$visitor:Hk}}}}}=mT;const{visitors:{document:{objects:{ServerVariable:{$visitor:zk}}}}}=mT;const{visitors:{document:{objects:{MediaType:{$visitor:Xk}}}}}=mT;const{visitors:{document:{objects:{SecurityRequirement:{$visitor:Wk}}}}}=mT;const{visitors:{document:{objects:{Components:{$visitor:Yk}}}}}=mT;const{visitors:{document:{objects:{Tag:{$visitor:Zk}}}}}=mT;const{visitors:{document:{objects:{Reference:{$visitor:Kk}}}}}=mT;const{visitors:{document:{objects:{Parameter:{$visitor:Qk}}}}}=mT;const{visitors:{document:{objects:{Header:{$visitor:eF}}}}}=mT;class tF{parent;constructor({parent:e}){this.parent=e}}class rF extends(XO(jA,tF,vA)){constructor(e){super(e),this.element=new JT,this.specPath=Wf(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=AT.default,this.passingOptionsNames.push("parent")}ObjectElement(e){this.handle$schema(e),this.handle$id(e),this.parent=this.element;const t=jA.prototype.ObjectElement.call(this,e);return ij(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),t}BooleanElement(e){const t=super.enter(e);return this.element.classes.push("boolean-json-schema"),t}getJsonSchemaDialect(){let e;return e=void 0!==this.openApiSemanticElement&&yk(this.openApiSemanticElement.jsonSchemaDialect)?oE(this.openApiSemanticElement.jsonSchemaDialect):void 0!==this.openApiGenericElement&&ij(this.openApiGenericElement.get("jsonSchemaDialect"))?oE(this.openApiGenericElement.get("jsonSchemaDialect")):oE(this.jsonSchemaDefaultDialect),e}handle$schema(e){if(Id(this.parent)&&!ij(e.get("$schema")))this.element.setMetaProperty("inherited$schema",this.getJsonSchemaDialect());else if(kk(this.parent)&&!ij(e.get("$schema"))){const e=Ap(oE(this.parent.meta.get("inherited$schema")),oE(this.parent.$schema));this.element.setMetaProperty("inherited$schema",e)}}handle$id(e){const t=void 0!==this.parent?Cj(this.parent.getMetaProperty("inherited$id",[])):new Ux,r=oE(e.get("$id"));Xd(r)&&t.push(r),this.element.setMetaProperty("inherited$id",t)}}class nF extends(XO(kA,tF,vA)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-$defs"),this.specPath=Wf(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}let sF=class extends(XO(yA,tF,vA)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-allOf"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(uj(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=Cj(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),Aj}};class iF extends(XO(yA,tF,vA)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-anyOf"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(uj(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=Cj(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),Aj}}class oF extends(XO(yA,tF,vA)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-oneOf"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(uj(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=Cj(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),Aj}}class cF extends(XO(kA,tF,vA)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=Wf(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class aF extends(XO(yA,tF,vA)){constructor(e){super(e),this.element=new Ux,this.element.classes.push("json-schema-prefixItems"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(uj(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=Cj(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),Aj}}class uF extends(XO(kA,tF,vA)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-properties"),this.specPath=Wf(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class lF extends(XO(kA,tF,vA)){constructor(e){super(e),this.element=new Jx,this.element.classes.push("json-schema-patternProperties"),this.specPath=Wf(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}const{visitors:{document:{objects:{Discriminator:{$visitor:hF}}}}}=mT;const{visitors:{document:{objects:{XML:{$visitor:fF}}}}}=mT;class pF extends(XO(kA,vA)){constructor(e){super(e),this.element=new MS,this.specPath=Wf(["document","objects","Schema"])}}class dF extends(XO(kA,vA)){constructor(e){super(e),this.element=new ZT,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(Sk).forEach((e=>{e.setMetaProperty("referenced-element","pathItem")})),t}}const{visitors:{document:{objects:{Example:{$visitor:mF}}}}}=mT;const{visitors:{document:{objects:{ExternalDocumentation:{$visitor:vF}}}}}=mT;const{visitors:{document:{objects:{Encoding:{$visitor:yF}}}}}=mT;const{visitors:{document:{objects:{Paths:{$visitor:bF}}}}}=mT;const{visitors:{document:{objects:{RequestBody:{$visitor:gF}}}}}=mT;const{visitors:{document:{objects:{Callback:{$visitor:wF}}}}}=mT;const{visitors:{document:{objects:{Response:{$visitor:xF}}}}}=mT;const{visitors:{document:{objects:{Responses:{$visitor:jF}}}}}=mT;const{visitors:{document:{objects:{Operation:{$visitor:EF}}}}}=mT;const{visitors:{document:{objects:{PathItem:{$visitor:$F}}}}}=mT;const{visitors:{document:{objects:{SecurityScheme:{$visitor:OF}}}}}=mT;const{visitors:{document:{objects:{OAuthFlows:{$visitor:SF}}}}}=mT;const{visitors:{document:{objects:{OAuthFlow:{$visitor:AF}}}}}=mT;class PF extends(XO(kA,vA)){constructor(e){super(e),this.element=new KT,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const t=kA.prototype.ObjectElement.call(this,e);return this.element.filter(Sk).forEach((e=>{e.setMetaProperty("referenced-element","pathItem")})),this.element.filter($k).forEach(((e,t)=>{e.setMetaProperty("webhook-name",oE(t))})),t}}const TF={visitors:{value:mT.visitors.value,document:{objects:{OpenApi:{$visitor:Bk,fixedFields:{openapi:mT.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:Gk,servers:mT.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:PF,components:{$ref:"#/visitors/document/objects/Components"},security:mT.visitors.document.objects.OpenApi.fixedFields.security,tags:mT.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:class extends Lk{constructor(e){super(e),this.element=new ST}},fixedFields:{title:mT.visitors.document.objects.Info.fixedFields.title,description:mT.visitors.document.objects.Info.fixedFields.description,summary:{$ref:"#/visitors/value"},termsOfService:mT.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:mT.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:class extends Uk{constructor(e){super(e),this.element=new wT}},fixedFields:{name:mT.visitors.document.objects.Contact.fixedFields.name,url:mT.visitors.document.objects.Contact.fixedFields.url,email:mT.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:class extends Jk{constructor(e){super(e),this.element=new PT}},fixedFields:{name:mT.visitors.document.objects.License.fixedFields.name,identifier:{$ref:"#/visitors/value"},url:mT.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:class extends Hk{constructor(e){super(e),this.element=new HT}},fixedFields:{url:mT.visitors.document.objects.Server.fixedFields.url,description:mT.visitors.document.objects.Server.fixedFields.description,variables:mT.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:class extends zk{constructor(e){super(e),this.element=new zT}},fixedFields:{enum:mT.visitors.document.objects.ServerVariable.fixedFields.enum,default:mT.visitors.document.objects.ServerVariable.fixedFields.default,description:mT.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:class extends Yk{constructor(e){super(e),this.element=new gT}},fixedFields:{schemas:pF,responses:mT.visitors.document.objects.Components.fixedFields.responses,parameters:mT.visitors.document.objects.Components.fixedFields.parameters,examples:mT.visitors.document.objects.Components.fixedFields.examples,requestBodies:mT.visitors.document.objects.Components.fixedFields.requestBodies,headers:mT.visitors.document.objects.Components.fixedFields.headers,securitySchemes:mT.visitors.document.objects.Components.fixedFields.securitySchemes,links:mT.visitors.document.objects.Components.fixedFields.links,callbacks:mT.visitors.document.objects.Components.fixedFields.callbacks,pathItems:dF}},Paths:{$visitor:class extends bF{constructor(e){super(e),this.element=new NT}}},PathItem:{$visitor:class extends $F{constructor(e){super(e),this.element=new MT}},fixedFields:{$ref:mT.visitors.document.objects.PathItem.fixedFields.$ref,summary:mT.visitors.document.objects.PathItem.fixedFields.summary,description:mT.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:mT.visitors.document.objects.PathItem.fixedFields.servers,parameters:mT.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:class extends EF{constructor(e){super(e),this.element=new _T}},fixedFields:{tags:mT.visitors.document.objects.Operation.fixedFields.tags,summary:mT.visitors.document.objects.Operation.fixedFields.summary,description:mT.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:mT.visitors.document.objects.Operation.fixedFields.operationId,parameters:mT.visitors.document.objects.Operation.fixedFields.parameters,requestBody:mT.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:mT.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:mT.visitors.document.objects.Operation.fixedFields.deprecated,security:mT.visitors.document.objects.Operation.fixedFields.security,servers:mT.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:class extends vF{constructor(e){super(e),this.element=new $T}},fixedFields:{description:mT.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:mT.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:class extends Qk{constructor(e){super(e),this.element=new CT}},fixedFields:{name:mT.visitors.document.objects.Parameter.fixedFields.name,in:mT.visitors.document.objects.Parameter.fixedFields.in,description:mT.visitors.document.objects.Parameter.fixedFields.description,required:mT.visitors.document.objects.Parameter.fixedFields.required,deprecated:mT.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:mT.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:mT.visitors.document.objects.Parameter.fixedFields.style,explode:mT.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:mT.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:mT.visitors.document.objects.Parameter.fixedFields.example,examples:mT.visitors.document.objects.Parameter.fixedFields.examples,content:mT.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:class extends gF{constructor(e){super(e),this.element=new BT}},fixedFields:{description:mT.visitors.document.objects.RequestBody.fixedFields.description,content:mT.visitors.document.objects.RequestBody.fixedFields.content,required:mT.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:class extends Xk{constructor(e){super(e),this.element=new kT}},fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:mT.visitors.document.objects.MediaType.fixedFields.example,examples:mT.visitors.document.objects.MediaType.fixedFields.examples,encoding:mT.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:class extends yF{constructor(e){super(e),this.element=new jT}},fixedFields:{contentType:mT.visitors.document.objects.Encoding.fixedFields.contentType,headers:mT.visitors.document.objects.Encoding.fixedFields.headers,style:mT.visitors.document.objects.Encoding.fixedFields.style,explode:mT.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:mT.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:class extends jF{constructor(e){super(e),this.element=new UT}},fixedFields:{default:mT.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:class extends xF{constructor(e){super(e),this.element=new LT}},fixedFields:{description:mT.visitors.document.objects.Response.fixedFields.description,headers:mT.visitors.document.objects.Response.fixedFields.headers,content:mT.visitors.document.objects.Response.fixedFields.content,links:mT.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:class extends wF{constructor(e){super(e),this.element=new bT,this.specPath=e=>bA(e)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const t=wF.prototype.ObjectElement.call(this,e);return this.element.filter(Sk).forEach((e=>{e.setMetaProperty("referenced-element","pathItem")})),t}}},Example:{$visitor:class extends mF{constructor(e){super(e),this.element=new ET}},fixedFields:{summary:mT.visitors.document.objects.Example.fixedFields.summary,description:mT.visitors.document.objects.Example.fixedFields.description,value:mT.visitors.document.objects.Example.fixedFields.value,externalValue:mT.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:class extends Vk{constructor(e){super(e),this.element=new TT}},fixedFields:{operationRef:mT.visitors.document.objects.Link.fixedFields.operationRef,operationId:mT.visitors.document.objects.Link.fixedFields.operationId,parameters:mT.visitors.document.objects.Link.fixedFields.parameters,requestBody:mT.visitors.document.objects.Link.fixedFields.requestBody,description:mT.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:class extends eF{constructor(e){super(e),this.element=new OT}},fixedFields:{description:mT.visitors.document.objects.Header.fixedFields.description,required:mT.visitors.document.objects.Header.fixedFields.required,deprecated:mT.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:mT.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:mT.visitors.document.objects.Header.fixedFields.style,explode:mT.visitors.document.objects.Header.fixedFields.explode,allowReserved:mT.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:mT.visitors.document.objects.Header.fixedFields.example,examples:mT.visitors.document.objects.Header.fixedFields.examples,content:mT.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:class extends Zk{constructor(e){super(e),this.element=new XT}},fixedFields:{name:mT.visitors.document.objects.Tag.fixedFields.name,description:mT.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:class extends Kk{constructor(e){super(e),this.element=new qT}},fixedFields:{$ref:mT.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Schema:{$visitor:rF,fixedFields:{$schema:{$ref:"#/visitors/value"},$vocabulary:class extends vA{ObjectElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-$vocabulary"),t}},$id:{$ref:"#/visitors/value"},$anchor:{$ref:"#/visitors/value"},$dynamicAnchor:{$ref:"#/visitors/value"},$dynamicRef:{$ref:"#/visitors/value"},$ref:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},$defs:nF,$comment:{$ref:"#/visitors/value"},allOf:sF,anyOf:iF,oneOf:oF,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:cF,prefixItems:aF,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:uF,patternProperties:lF,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},type:class extends vA{StringElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-type"),t}},enum:class extends vA{ArrayElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-enum"),t}},const:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxContains:{$ref:"#/visitors/value"},minContains:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},dependentRequired:class extends vA{ObjectElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-dependentRequired"),t}},title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},readOnly:{$ref:"#/visitors/value"},writeOnly:{$ref:"#/visitors/value"},examples:class extends vA{ArrayElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-examples"),t}},format:{$ref:"#/visitors/value"},contentEncoding:{$ref:"#/visitors/value"},contentMediaType:{$ref:"#/visitors/value"},contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:class extends hF{constructor(e){super(e),this.element=new xT,this.canSupportSpecificationExtensions=!0}},fixedFields:{propertyName:mT.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:mT.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:class extends fF{constructor(e){super(e),this.element=new WT}},fixedFields:{name:mT.visitors.document.objects.XML.fixedFields.name,namespace:mT.visitors.document.objects.XML.fixedFields.namespace,prefix:mT.visitors.document.objects.XML.fixedFields.prefix,attribute:mT.visitors.document.objects.XML.fixedFields.attribute,wrapped:mT.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:class extends OF{constructor(e){super(e),this.element=new GT}},fixedFields:{type:mT.visitors.document.objects.SecurityScheme.fixedFields.type,description:mT.visitors.document.objects.SecurityScheme.fixedFields.description,name:mT.visitors.document.objects.SecurityScheme.fixedFields.name,in:mT.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:mT.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:mT.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:mT.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:class extends SF{constructor(e){super(e),this.element=new IT}},fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:class extends AF{constructor(e){super(e),this.element=new FT}},fixedFields:{authorizationUrl:mT.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:mT.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:mT.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:mT.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:class extends Wk{constructor(e){super(e),this.element=new VT}}}},extension:{$visitor:mT.visitors.document.extension.$visitor}}}},kF=e=>(t,r={})=>((e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const n=zx(e),s=uE(TF),i=new(pd(t,s))({specObj:s});return Gj(n,i),zj(i.element,r,{toolboxCreator:qk,visitorOptions:{keyMap:ek,nodeTypeGetter:QT}})})(t,{specPath:e,...r});bT.refract=kF(["visitors","document","objects","Callback","$visitor"]),gT.refract=kF(["visitors","document","objects","Components","$visitor"]),wT.refract=kF(["visitors","document","objects","Contact","$visitor"]),ET.refract=kF(["visitors","document","objects","Example","$visitor"]),xT.refract=kF(["visitors","document","objects","Discriminator","$visitor"]),jT.refract=kF(["visitors","document","objects","Encoding","$visitor"]),$T.refract=kF(["visitors","document","objects","ExternalDocumentation","$visitor"]),OT.refract=kF(["visitors","document","objects","Header","$visitor"]),ST.refract=kF(["visitors","document","objects","Info","$visitor"]),AT.refract=kF(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]),PT.refract=kF(["visitors","document","objects","License","$visitor"]),TT.refract=kF(["visitors","document","objects","Link","$visitor"]),kT.refract=kF(["visitors","document","objects","MediaType","$visitor"]),FT.refract=kF(["visitors","document","objects","OAuthFlow","$visitor"]),IT.refract=kF(["visitors","document","objects","OAuthFlows","$visitor"]),RT.refract=kF(["visitors","document","objects","OpenApi","fixedFields","openapi"]),DT.refract=kF(["visitors","document","objects","OpenApi","$visitor"]),_T.refract=kF(["visitors","document","objects","Operation","$visitor"]),CT.refract=kF(["visitors","document","objects","Parameter","$visitor"]),MT.refract=kF(["visitors","document","objects","PathItem","$visitor"]),NT.refract=kF(["visitors","document","objects","Paths","$visitor"]),qT.refract=kF(["visitors","document","objects","Reference","$visitor"]),BT.refract=kF(["visitors","document","objects","RequestBody","$visitor"]),LT.refract=kF(["visitors","document","objects","Response","$visitor"]),UT.refract=kF(["visitors","document","objects","Responses","$visitor"]),JT.refract=kF(["visitors","document","objects","Schema","$visitor"]),VT.refract=kF(["visitors","document","objects","SecurityRequirement","$visitor"]),GT.refract=kF(["visitors","document","objects","SecurityScheme","$visitor"]),HT.refract=kF(["visitors","document","objects","Server","$visitor"]),zT.refract=kF(["visitors","document","objects","ServerVariable","$visitor"]),XT.refract=kF(["visitors","document","objects","Tag","$visitor"]),WT.refract=kF(["visitors","document","objects","XML","$visitor"]);class FF extends yE{constructor(e){super({...null!=e?e:{},name:"binary"})}canParse(e){return 0===this.fileExtensions.length||this.fileExtensions.includes(e.extension)}parse(e){try{const t=unescape(encodeURIComponent(e.toString())),r=btoa(t),n=new Yx;if(0!==r.length){const e=new Nx(r);e.classes.push("result"),n.push(e)}return n}catch(t){throw new AE(`Error parsing "${e.uri}"`,{cause:t})}}}class IF extends class{name;constructor({name:e}){this.name=e}}{constructor(e){super({...null!=e?e:{},name:"openapi-3-1"})}canResolve(e,t){const r=t.dereference.strategies.find((e=>"openapi-3-1"===e.name));return void 0!==r&&r.canDereference(e,t)}async resolve(e,t){const r=t.dereference.strategies.find((e=>"openapi-3-1"===e.name));if(void 0===r)throw new vE('"openapi-3-1" dereference strategy is not available.');const n=new Qm,s=nv(t,{resolve:{internal:!1},dereference:{refSet:n}});return await r.dereference(e,s),n}}const{AbortController:RF,AbortSignal:DF}=globalThis;void 0===globalThis.AbortController&&(globalThis.AbortController=RF),void 0===globalThis.AbortSignal&&(globalThis.AbortSignal=DF);class _F extends class extends class{name;constructor({name:e}){this.name=e}}{timeout;redirects;withCredentials;constructor(e){const{name:t="http-resolver",timeout:r=5e3,redirects:n=5,withCredentials:s=!1}=null!=e?e:{};super({name:t}),this.timeout=r,this.redirects=n,this.withCredentials=s}canRead(e){return Um(e.uri)}}{swaggerHTTPClient=_t;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:e=_t,swaggerHTTPClientConfig:t={},...r}={}){super({...r,name:"http-swagger-client"}),this.swaggerHTTPClient=e,this.swaggerHTTPClientConfig=t}getHttpClient(){return this.swaggerHTTPClient}async read(e){const t=this.getHttpClient(),r=new AbortController,{signal:n}=r,s=setTimeout((()=>{r.abort()}),this.timeout),i=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",o=0===this.redirects?"error":"follow",c=this.redirects>0?this.redirects:void 0;try{return(await t({url:e.uri,signal:n,userFetch:async(e,t)=>{let r=await fetch(e,t);try{r.headers.delete("Content-Type")}catch{r=new Response(r.body,{...r,headers:new Headers(r.headers)}),r.headers.delete("Content-Type")}return r},credentials:i,redirect:o,follow:c,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(t){throw new uv(`Error downloading "${e.uri}"`,{cause:t})}finally{clearTimeout(s)}}}class CF extends yE{constructor(e={}){super({name:"json-swagger-client",mediaTypes:["application/json"],...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return JSON.parse(e.toString()),!0}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new AE("json-swagger-client parser plugin doesn't support sourceMaps option");const t=new Yx,r=e.toString();if(this.allowEmpty&&""===r.trim())return t;try{const e=lE(JSON.parse(r));return e.classes.push("result"),t.push(e),t}catch(t){throw new AE(`Error parsing "${e.uri}"`,{cause:t})}}}class MF extends yE{constructor(e={}){super({name:"yaml-1-2-swagger-client",mediaTypes:["text/yaml","application/yaml"],...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return It.load(e.toString(),{schema:xt}),!0}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new AE("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const t=new Yx,r=e.toString();try{const e=It.load(r,{schema:xt});if(this.allowEmpty&&void 0===e)return t;const n=lE(e);return n.classes.push("result"),t.push(n),t}catch(t){throw new AE(`Error parsing "${e.uri}"`,{cause:t})}}}class NF extends yE{detectionRegExp=/"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))"/;constructor(e={}){super({name:"openapi-json-3-1-swagger-client",mediaTypes:new nO(...sO.filterByFormat("generic"),...sO.filterByFormat("json")),...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const t=e.toString();return JSON.parse(t),this.detectionRegExp.test(t)}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new AE("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new Yx,r=e.toString();if(this.allowEmpty&&""===r.trim())return t;try{const e=JSON.parse(r),n=DT.refract(e,this.refractorOpts);return n.classes.push("result"),t.push(n),t}catch(t){throw new AE(`Error parsing "${e.uri}"`,{cause:t})}}}class qF extends yE{detectionRegExp=/(?<YAML>^(["']?)openapi\2\s*:\s*(["']?)(?<version_yaml>3\.1\.(?:[1-9]\d*|0))\3(?:\s+|$))|(?<JSON>"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))")/m;constructor(e={}){super({name:"openapi-yaml-3-1-swagger-client",mediaTypes:new nO(...sO.filterByFormat("generic"),...sO.filterByFormat("yaml")),...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const t=e.toString();return It.load(t),this.detectionRegExp.test(t)}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new AE("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new Yx,r=e.toString();try{const e=It.load(r,{schema:xt});if(this.allowEmpty&&void 0===e)return t;const n=DT.refract(e,this.refractorOpts);return n.classes.push("result"),t.push(n),t}catch(t){throw new AE(`Error parsing "${e.uri}"`,{cause:t})}}}const BF=e=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(e),LF=e=>{const t=Gm(e);return jm("#",t)},UF=(e,t)=>{const r=(e=>{if(!BF(e))throw new $E(e);return e})(e),n=eE((e=>kk(e)&&oE(e.$anchor)===r),t);if(Id(n))throw new xE(`Evaluation failed on token: "${r}"`);return n},JF=(e,t)=>{if(void 0===t.$ref)return;const r=Gm(oE(t.$ref)),n=oE(t.meta.get("inherited$id"));return`${zf(((e,t)=>Xm(e,Wm(Hm(t)))),e,[...n,oE(t.$ref)])}${"#"===r?"":r}`},VF=e=>{if(VF.cache.has(e))return VF.cache.get(e);const t=JT.refract(e);return VF.cache.set(e,t),t};VF.cache=new WeakMap;const GF=e=>bj(e)?VF(e):e,HF=(e,t)=>{const{cache:r}=HF,n=Hm(e),s=e=>kk(e)&&void 0!==e.$id;if(!r.has(t)){const e=((e,t)=>{const r=new Vj({predicate:e});return Gj(t,r),new _x(r.result)})(s,t);r.set(t,Array.from(e))}const i=r.get(t).find((e=>{const t=((e,t)=>{if(void 0===t.$id)return;const r=oE(t.meta.get("inherited$id"));return zf(((e,t)=>Xm(e,Wm(Hm(t)))),e,[...r,oE(t.$id)])})(n,e);return t===n}));if(Id(i))throw new EE(`Evaluation failed on URI: "${e}"`);let o,c;return BF(LF(e))?(o=UF,c=LF(e)):(o=rO,c=eO(e)),o(c,i)};HF.cache=new WeakMap;const zF=Gj[Symbol.for("nodejs.util.promisify.custom")],XF=new Zj,WF=(e,t,r,n)=>{hj(n)?n.value=e:Array.isArray(n)&&(n[r]=e)};class YF{indirections;namespace;reference;options;ancestors;refractCache;constructor({reference:e,namespace:t,options:r,indirections:n=[],ancestors:s=new bE,refractCache:i=new Map}){this.indirections=n,this.namespace=t,this.reference=e,this.options=r,this.ancestors=new bE(...s),this.refractCache=i}toBaseURI(e){return Xm(this.reference.uri,Wm(Hm(e)))}async toReference(e){if(this.reference.depth>=this.options.resolve.maxDepth)throw new SE(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const t=this.toBaseURI(e),{refSet:r}=this.reference;if(r.has(t))return r.find(yd(t,"uri"));const n=await hv(Ym(t),{...this.options,parse:{...this.options.parse,mediaType:"text/plain"}}),s=new gE({uri:t,value:Cj(n),depth:this.reference.depth+1});if(r.add(s),this.options.dereference.immutable){const e=new gE({uri:`immutable://${t}`,value:n,depth:this.reference.depth+1});r.add(e)}return s}toAncestorLineage(e){const t=new Set(e.filter(sj));return[new bE(...this.ancestors,t),t]}async ReferenceElement(e,t,r,n,s,i){if(this.indirections.includes(e))return!1;const[o,c]=this.toAncestorLineage([...s,r]),a=this.toBaseURI(oE(e.$ref)),u=Hm(this.reference.uri)===a,l=!u;if(!this.options.resolve.internal&&u)return!1;if(!this.options.resolve.external&&l)return!1;const h=await this.toReference(oE(e.$ref)),f=Xm(a,oE(e.$ref));this.indirections.push(e);const p=eO(f);let d=rO(p,h.value.result);if(d.id=XF.identify(d),bj(d)){const t=oE(e.meta.get("referenced-element")),r=`${t}-${oE(XF.identify(d))}`;if(this.refractCache.has(r))d=this.refractCache.get(r);else if(bA(d))d=qT.refract(d),d.setMetaProperty("referenced-element",t),this.refractCache.set(r,d);else{d=this.namespace.getElementClass(t).refract(d),this.refractCache.set(r,d)}}if(e===d)throw new Fh("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new OE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(o.includes(d)){if(h.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Fh("Circular reference detected");if("replace"===this.options.dereference.circular){var m,v;const t=new Gx(d.id,{type:"reference",uri:h.uri,$ref:oE(e.$ref)}),n=(null!==(m=null===(v=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===v?void 0:v.circularReplacer)&&void 0!==m?m:this.options.dereference.circularReplacer)(t);return i.replaceWith(n,WF),!r&&n}}const y=Hm(h.refSet.rootRef.uri)!==h.uri,b=["error","replace"].includes(this.options.dereference.circular);if((l||y||Sk(d)||b)&&!o.includesCycle(d)){c.add(e);const t=new YF({reference:h,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o});d=await zF(d,t,{keyMap:ek,nodeTypeGetter:QT}),c.delete(e)}this.indirections.pop();const g=qj(d);return g.setMetaProperty("id",XF.generateId()),g.setMetaProperty("ref-fields",{$ref:oE(e.$ref),description:oE(e.description),summary:oE(e.summary)}),g.setMetaProperty("ref-origin",h.uri),g.setMetaProperty("ref-referencing-element-id",Cj(XF.identify(e))),uj(d)&&uj(g)&&(e.hasKey("description")&&"description"in d&&(g.remove("description"),g.set("description",e.get("description"))),e.hasKey("summary")&&"summary"in d&&(g.remove("summary"),g.set("summary",e.get("summary")))),i.replaceWith(g,WF),!r&&g}async PathItemElement(e,t,r,n,s,i){if(!ij(e.$ref))return;if(this.indirections.includes(e))return!1;const[o,c]=this.toAncestorLineage([...s,r]),a=this.toBaseURI(oE(e.$ref)),u=Hm(this.reference.uri)===a,l=!u;if(!this.options.resolve.internal&&u)return;if(!this.options.resolve.external&&l)return;const h=await this.toReference(oE(e.$ref)),f=Xm(a,oE(e.$ref));this.indirections.push(e);const p=eO(f);let d=rO(p,h.value.result);if(d.id=XF.identify(d),bj(d)){const e=`path-item-${oE(XF.identify(d))}`;this.refractCache.has(e)?d=this.refractCache.get(e):(d=MT.refract(d),this.refractCache.set(e,d))}if(e===d)throw new Fh("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new OE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(o.includes(d)){if(h.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Fh("Circular reference detected");if("replace"===this.options.dereference.circular){var m,v;const t=new Gx(d.id,{type:"path-item",uri:h.uri,$ref:oE(e.$ref)}),n=(null!==(m=null===(v=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===v?void 0:v.circularReplacer)&&void 0!==m?m:this.options.dereference.circularReplacer)(t);return i.replaceWith(n,WF),!r&&n}}const y=Hm(h.refSet.rootRef.uri)!==h.uri,b=["error","replace"].includes(this.options.dereference.circular);if((l||y||$k(d)&&ij(d.$ref)||b)&&!o.includesCycle(d)){c.add(e);const t=new YF({reference:h,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o});d=await zF(d,t,{keyMap:ek,nodeTypeGetter:QT}),c.delete(e)}if(this.indirections.pop(),$k(d)){const t=new MT([...d.content],Cj(d.meta),Cj(d.attributes));t.setMetaProperty("id",XF.generateId()),e.forEach(((e,r,n)=>{t.remove(oE(r)),t.content.push(n)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:oE(e.$ref)}),t.setMetaProperty("ref-origin",h.uri),t.setMetaProperty("ref-referencing-element-id",Cj(XF.identify(e))),d=t}return i.replaceWith(d,WF),r?void 0:d}async LinkElement(e,t,r,n,s,i){if(!ij(e.operationRef)&&!ij(e.operationId))return;if(ij(e.operationRef)&&ij(e.operationId))throw new Fh("LinkElement operationRef and operationId fields are mutually exclusive.");let o;if(ij(e.operationRef)){var c;const t=eO(oE(e.operationRef)),n=this.toBaseURI(oE(e.operationRef)),s=Hm(this.reference.uri)===n,a=!s;if(!this.options.resolve.internal&&s)return;if(!this.options.resolve.external&&a)return;const u=await this.toReference(oE(e.operationRef));if(o=rO(t,u.value.result),bj(o)){const e=`operation-${oE(XF.identify(o))}`;this.refractCache.has(e)?o=this.refractCache.get(e):(o=_T.refract(o),this.refractCache.set(e,o))}o=qj(o),o.setMetaProperty("ref-origin",u.uri);const l=qj(e);return null===(c=l.operationRef)||void 0===c||c.meta.set("operation",o),i.replaceWith(l,WF),r?void 0:l}if(ij(e.operationId)){var a;const t=oE(e.operationId),n=await this.toReference(Ym(this.reference.uri));if(o=eE((e=>jk(e)&&sj(e.operationId)&&e.operationId.equals(t)),n.value.result),Id(o))throw new Fh(`OperationElement(operationId=${t}) not found.`);const s=qj(e);return null===(a=s.operationId)||void 0===a||a.meta.set("operation",o),i.replaceWith(s,WF),r?void 0:s}}async ExampleElement(e,t,r,n,s,i){if(!ij(e.externalValue))return;if(e.hasKey("value")&&ij(e.externalValue))throw new Fh("ExampleElement value and externalValue fields are mutually exclusive.");const o=this.toBaseURI(oE(e.externalValue)),c=Hm(this.reference.uri)===o,a=!c;if(!this.options.resolve.internal&&c)return;if(!this.options.resolve.external&&a)return;const u=await this.toReference(oE(e.externalValue)),l=qj(u.value.result);l.setMetaProperty("ref-origin",u.uri);const h=qj(e);return h.value=l,i.replaceWith(h,WF),r?void 0:h}async SchemaElement(e,t,r,n,s,i){if(!ij(e.$ref))return;if(this.indirections.includes(e))return!1;const[o,c]=this.toAncestorLineage([...s,r]);let a=await this.toReference(Ym(this.reference.uri)),{uri:u}=a;const l=JF(u,e),h=Hm(l),f=new Km({uri:h}),p=ld((e=>e.canRead(f)),this.options.resolve.resolvers),d=!p;let m,v=Hm(this.reference.uri)===l,y=!v;this.indirections.push(e);try{if(p||d){u=this.toBaseURI(l);const e=l,t=GF(a.value.result);if(m=HF(e,t),m=GF(m),m.id=XF.identify(m),!this.options.resolve.internal&&v)return;if(!this.options.resolve.external&&y)return}else{if(u=this.toBaseURI(l),v=Hm(this.reference.uri)===u,y=!v,!this.options.resolve.internal&&v)return;if(!this.options.resolve.external&&y)return;a=await this.toReference(Ym(l));const e=eO(l),t=GF(a.value.result);m=rO(e,t),m=GF(m),m.id=XF.identify(m)}}catch(e){if(!(d&&e instanceof EE))throw e;if(BF(LF(l))){if(v=Hm(this.reference.uri)===u,y=!v,!this.options.resolve.internal&&v)return;if(!this.options.resolve.external&&y)return;a=await this.toReference(Ym(l));const e=LF(l),t=GF(a.value.result);m=UF(e,t),m=GF(m),m.id=XF.identify(m)}else{if(u=this.toBaseURI(l),v=Hm(this.reference.uri)===u,y=!v,!this.options.resolve.internal&&v)return;if(!this.options.resolve.external&&y)return;a=await this.toReference(Ym(l));const e=eO(l),t=GF(a.value.result);m=rO(e,t),m=GF(m),m.id=XF.identify(m)}}if(e===m)throw new Fh("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new OE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(o.includes(m)){if(a.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Fh("Circular reference detected");if("replace"===this.options.dereference.circular){var b,g;const t=new Gx(m.id,{type:"json-schema",uri:a.uri,$ref:oE(e.$ref)}),n=(null!==(b=null===(g=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===g?void 0:g.circularReplacer)&&void 0!==b?b:this.options.dereference.circularReplacer)(t);return i.replaceWith(n,WF),!r&&n}}const w=Hm(a.refSet.rootRef.uri)!==a.uri,x=["error","replace"].includes(this.options.dereference.circular);if((y||w||kk(m)&&ij(m.$ref)||x)&&!o.includesCycle(m)){c.add(e);const t=new YF({reference:a,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o});m=await zF(m,t,{keyMap:ek,nodeTypeGetter:QT}),c.delete(e)}if(this.indirections.pop(),Fk(m)){const t=Cj(m);return t.setMetaProperty("id",XF.generateId()),t.setMetaProperty("ref-fields",{$ref:oE(e.$ref)}),t.setMetaProperty("ref-origin",a.uri),t.setMetaProperty("ref-referencing-element-id",Cj(XF.identify(e))),i.replaceWith(t,WF),!r&&t}if(kk(m)){const t=new JT([...m.content],Cj(m.meta),Cj(m.attributes));t.setMetaProperty("id",XF.generateId()),e.forEach(((e,r,n)=>{t.remove(oE(r)),t.content.push(n)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:oE(e.$ref)}),t.setMetaProperty("ref-origin",a.uri),t.setMetaProperty("ref-referencing-element-id",Cj(XF.identify(e))),m=t}return i.replaceWith(m,WF),r?void 0:m}}const ZF=Gj[Symbol.for("nodejs.util.promisify.custom")];const KF=e=>{const t=(e=>e.slice(2))(e);return t.reduce(((e,r,n)=>{if(hj(r)){const t=String(oE(r.key));e.push(t)}else if(lj(t[n-2])){const s=t[n-2].content.indexOf(r);e.push(s)}return e}),[])};class QF{modelPropertyMacro;options;SchemaElement={leave:(e,t,r,n,s)=>{void 0!==e.properties&&uj(e.properties)&&e.properties.forEach((t=>{if(uj(t))try{const e=this.modelPropertyMacro(oE(t));t.set("default",e)}catch(t){var n,i;const o=new Error(t,{cause:t});o.fullPath=[...KF([...s,r,e]),"properties"],null===(n=this.options.dereference.dereferenceOpts)||void 0===n||null===(n=n.errors)||void 0===n||null===(i=n.push)||void 0===i||i.call(n,o)}}))}};constructor({modelPropertyMacro:e,options:t}){this.modelPropertyMacro=e,this.options=t}}class eI{options;SchemaElement={leave(e,t,r,n,s){if(void 0===e.allOf)return;if(!lj(e.allOf)){var i,o;const t=new TypeError("allOf must be an array");return t.fullPath=[...KF([...s,r,e]),"allOf"],void(null===(i=this.options.dereference.dereferenceOpts)||void 0===i||null===(i=i.errors)||void 0===i||null===(o=i.push)||void 0===o||o.call(i,t))}if(e.allOf.isEmpty)return void e.remove("allOf");if(!e.allOf.content.every(kk)){var c,a;const t=new TypeError("Elements in allOf must be objects");return t.fullPath=[...KF([...s,r,e]),"allOf"],void(null===(c=this.options.dereference.dereferenceOpts)||void 0===c||null===(c=c.errors)||void 0===c||null===(a=c.push)||void 0===a||a.call(c,t))}for(;e.hasKey("allOf");){const{allOf:t}=e;e.remove("allOf");const r=dE.all([...t.content,e]);if(e.hasKey("$$ref")||r.remove("$$ref"),e.hasKey("example")){const t=r.getMember("example");t&&(t.value=e.get("example"))}if(e.hasKey("examples")){const t=r.getMember("examples");t&&(t.value=e.get("examples"))}e.content=r.content}}};constructor({options:e}){this.options=e}}class tI{parameterMacro;options;#e;OperationElement={enter:e=>{this.#e=e},leave:()=>{this.#e=void 0}};ParameterElement={leave:(e,t,r,n,s)=>{const i=this.#e?oE(this.#e):null,o=oE(e);try{const t=this.parameterMacro(i,o);e.set("default",t)}catch(e){var c,a;const t=new Error(e,{cause:e});t.fullPath=KF([...s,r]),null===(c=this.options.dereference.dereferenceOpts)||void 0===c||null===(c=c.errors)||void 0===c||null===(a=c.push)||void 0===a||a.call(c,t)}}};constructor({parameterMacro:e,options:t}){this.parameterMacro=e,this.options=t}}const rI=e=>{if(null==e.cause)return e;let{cause:t}=e;for(;null!=t.cause;)t=t.cause;return t};class nI extends Ih{}const{wrapError:sI}=m$,iI=Gj[Symbol.for("nodejs.util.promisify.custom")],oI=new Zj,cI=(e,t,r,n)=>{hj(n)?n.value=e:Array.isArray(n)&&(n[r]=e)};class aI extends YF{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:e=!0,useCircularStructures:t=!1,basePath:r=null,...n}){super(n),this.allowMetaPatches=e,this.useCircularStructures=t,this.basePath=r}async ReferenceElement(e,t,r,n,s,i){try{if(this.indirections.includes(e))return!1;const[t,n]=this.toAncestorLineage([...s,r]),u=this.toBaseURI(oE(e.$ref)),l=Hm(this.reference.uri)===u,h=!l;if(!this.options.resolve.internal&&l)return!1;if(!this.options.resolve.external&&h)return!1;const f=await this.toReference(oE(e.$ref)),p=Xm(u,oE(e.$ref));this.indirections.push(e);const d=eO(p);let m=rO(d,f.value.result);if(m.id=oI.identify(m),bj(m)){const t=oE(e.meta.get("referenced-element")),r=`${t}-${oE(oI.identify(m))}`;if(this.refractCache.has(r))m=this.refractCache.get(r);else if(bA(m))m=qT.refract(m),m.setMetaProperty("referenced-element",t),this.refractCache.set(r,m);else{m=this.namespace.getElementClass(t).refract(m),this.refractCache.set(r,m)}}if(e===m)throw new Fh("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new OE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(t.includes(m)){if(f.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Fh("Circular reference detected");if("replace"===this.options.dereference.circular){var o,c;const t=new Gx(m.id,{type:"reference",uri:f.uri,$ref:oE(e.$ref),baseURI:p,referencingElement:e}),n=(null!==(o=null===(c=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===c?void 0:c.circularReplacer)&&void 0!==o?o:this.options.dereference.circularReplacer)(t);return i.replaceWith(t,cI),!r&&n}}const v=Hm(f.refSet.rootRef.uri)!==f.uri,y=["error","replace"].includes(this.options.dereference.circular);if((h||v||Sk(m)||y)&&!t.includesCycle(m)){var a;n.add(e);const i=new aI({reference:f,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:t,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(a=this.basePath)&&void 0!==a?a:[...KF([...s,r,e]),"$ref"]});m=await iI(m,i,{keyMap:ek,nodeTypeGetter:QT}),n.delete(e)}this.indirections.pop();const b=qj(m);if(b.setMetaProperty("ref-fields",{$ref:oE(e.$ref),description:oE(e.description),summary:oE(e.summary)}),b.setMetaProperty("ref-origin",f.uri),b.setMetaProperty("ref-referencing-element-id",Cj(oI.identify(e))),uj(m)&&(e.hasKey("description")&&"description"in m&&(b.remove("description"),b.set("description",e.get("description"))),e.hasKey("summary")&&"summary"in m&&(b.remove("summary"),b.set("summary",e.get("summary")))),this.allowMetaPatches&&uj(b)&&!b.hasKey("$$ref")){const e=Xm(u,p);b.set("$$ref",e)}return i.replaceWith(b,cI),!r&&b}catch(t){var u,l,h;const n=rI(t),i=sI(n,{baseDoc:this.reference.uri,$ref:oE(e.$ref),pointer:eO(oE(e.$ref)),fullPath:null!==(u=this.basePath)&&void 0!==u?u:[...KF([...s,r,e]),"$ref"]});return void(null===(l=this.options.dereference.dereferenceOpts)||void 0===l||null===(l=l.errors)||void 0===l||null===(h=l.push)||void 0===h||h.call(l,i))}}async PathItemElement(e,t,r,n,s,i){try{if(!ij(e.$ref))return;if(this.indirections.includes(e))return!1;if(wj(["cycle"],e.$ref))return!1;const[t,n]=this.toAncestorLineage([...s,r]),u=this.toBaseURI(oE(e.$ref)),l=Hm(this.reference.uri)===u,h=!l;if(!this.options.resolve.internal&&l)return;if(!this.options.resolve.external&&h)return;const f=await this.toReference(oE(e.$ref)),p=Xm(u,oE(e.$ref));this.indirections.push(e);const d=eO(p);let m=rO(d,f.value.result);if(m.id=oI.identify(m),bj(m)){const e=`path-item-${oE(oI.identify(m))}`;this.refractCache.has(e)?m=this.refractCache.get(e):(m=MT.refract(m),this.refractCache.set(e,m))}if(e===m)throw new Fh("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new OE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(t.includes(m)){if(f.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Fh("Circular reference detected");if("replace"===this.options.dereference.circular){var o,c;const t=new Gx(m.id,{type:"path-item",uri:f.uri,$ref:oE(e.$ref),baseURI:p,referencingElement:e}),n=(null!==(o=null===(c=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===c?void 0:c.circularReplacer)&&void 0!==o?o:this.options.dereference.circularReplacer)(t);return i.replaceWith(t,cI),!r&&n}}const v=Hm(f.refSet.rootRef.uri)!==f.uri,y=["error","replace"].includes(this.options.dereference.circular);if((h||v||$k(m)&&ij(m.$ref)||y)&&!t.includesCycle(m)){var a;n.add(e);const i=new aI({reference:f,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:t,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(a=this.basePath)&&void 0!==a?a:[...KF([...s,r,e]),"$ref"]});m=await iI(m,i,{keyMap:ek,nodeTypeGetter:QT}),n.delete(e)}if(this.indirections.pop(),$k(m)){const t=new MT([...m.content],Cj(m.meta),Cj(m.attributes));if(e.forEach(((e,r,n)=>{t.remove(oE(r)),t.content.push(n)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:oE(e.$ref)}),t.setMetaProperty("ref-origin",f.uri),t.setMetaProperty("ref-referencing-element-id",Cj(oI.identify(e))),this.allowMetaPatches&&void 0===t.get("$$ref")){const e=Xm(u,p);t.set("$$ref",e)}m=t}return i.replaceWith(m,cI),r?void 0:m}catch(t){var u,l,h;const n=rI(t),i=sI(n,{baseDoc:this.reference.uri,$ref:oE(e.$ref),pointer:eO(oE(e.$ref)),fullPath:null!==(u=this.basePath)&&void 0!==u?u:[...KF([...s,r,e]),"$ref"]});return void(null===(l=this.options.dereference.dereferenceOpts)||void 0===l||null===(l=l.errors)||void 0===l||null===(h=l.push)||void 0===h||h.call(l,i))}}async SchemaElement(e,t,r,n,s,i){try{if(!ij(e.$ref))return;if(this.indirections.includes(e))return!1;const[t,n]=this.toAncestorLineage([...s,r]);let u=await this.toReference(Ym(this.reference.uri)),{uri:l}=u;const h=JF(l,e),f=Hm(h),p=new Km({uri:f}),d=!this.options.resolve.resolvers.some((e=>e.canRead(p))),m=!d;let v,y=Hm(this.reference.uri)===h,b=!y;this.indirections.push(e);try{if(d||m){l=this.toBaseURI(h);const e=h,t=GF(u.value.result);if(v=HF(e,t),v=GF(v),v.id=oI.identify(v),!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&b)return}else{if(l=this.toBaseURI(h),y=Hm(this.reference.uri)===l,b=!y,!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&b)return;u=await this.toReference(Ym(h));const e=eO(h),t=GF(u.value.result);v=rO(e,t),v=GF(v),v.id=oI.identify(v)}}catch(e){if(!(m&&e instanceof EE))throw e;if(BF(LF(h))){if(y=Hm(this.reference.uri)===l,b=!y,!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&b)return;u=await this.toReference(Ym(h));const e=LF(h),t=GF(u.value.result);v=UF(e,t),v=GF(v),v.id=oI.identify(v)}else{if(l=this.toBaseURI(oE(h)),y=Hm(this.reference.uri)===l,b=!y,!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&b)return;u=await this.toReference(Ym(h));const e=eO(h),t=GF(u.value.result);v=rO(e,t),v=GF(v),v.id=oI.identify(v)}}if(e===v)throw new Fh("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new OE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(t.includes(v)){if(u.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Fh("Circular reference detected");if("replace"===this.options.dereference.circular){var o,c;const t=new Gx(v.id,{type:"json-schema",uri:u.uri,$ref:oE(e.$ref),baseURI:Xm(l,h),referencingElement:e}),n=(null!==(o=null===(c=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===c?void 0:c.circularReplacer)&&void 0!==o?o:this.options.dereference.circularReplacer)(t);return i.replaceWith(n,cI),!r&&n}}const g=Hm(u.refSet.rootRef.uri)!==u.uri,w=["error","replace"].includes(this.options.dereference.circular);if((b||g||kk(v)&&ij(v.$ref)||w)&&!t.includesCycle(v)){var a;n.add(e);const i=new aI({reference:u,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:t,basePath:null!==(a=this.basePath)&&void 0!==a?a:[...KF([...s,r,e]),"$ref"]});v=await iI(v,i,{keyMap:ek,nodeTypeGetter:QT}),n.delete(e)}if(this.indirections.pop(),Fk(v)){const t=Cj(v);return t.setMetaProperty("ref-fields",{$ref:oE(e.$ref)}),t.setMetaProperty("ref-origin",u.uri),t.setMetaProperty("ref-referencing-element-id",Cj(oI.identify(e))),i.replaceWith(t,cI),!r&&t}if(kk(v)){const t=new JT([...v.content],Cj(v.meta),Cj(v.attributes));if(e.forEach(((e,r,n)=>{t.remove(oE(r)),t.content.push(n)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:oE(e.$ref)}),t.setMetaProperty("ref-origin",u.uri),t.setMetaProperty("ref-referencing-element-id",Cj(oI.identify(e))),this.allowMetaPatches&&void 0===t.get("$$ref")){const e=Xm(l,h);t.set("$$ref",e)}v=t}return i.replaceWith(v,cI),r?void 0:v}catch(t){var u,l,h;const n=rI(t),i=new nI(`Could not resolve reference: ${n.message}`,{baseDoc:this.reference.uri,$ref:oE(e.$ref),fullPath:null!==(u=this.basePath)&&void 0!==u?u:[...KF([...s,r,e]),"$ref"],cause:n});return void(null===(l=this.options.dereference.dereferenceOpts)||void 0===l||null===(l=l.errors)||void 0===l||null===(h=l.push)||void 0===h||h.call(l,i))}}async LinkElement(){}async ExampleElement(e,t,r,n,s,i){try{return await super.ExampleElement(e,t,r,n,s,i)}catch(t){var o,c,a;const n=rI(t),i=sI(n,{baseDoc:this.reference.uri,externalValue:oE(e.externalValue),fullPath:null!==(o=this.basePath)&&void 0!==o?o:[...KF([...s,r,e]),"externalValue"]});return void(null===(c=this.options.dereference.dereferenceOpts)||void 0===c||null===(c=c.errors)||void 0===c||null===(a=c.push)||void 0===a||a.call(c,i))}}}const uI=Fj[Symbol.for("nodejs.util.promisify.custom")];class lI{constructor({parameterMacro:e,modelPropertyMacro:t,mode:r,options:n,...s}){const i=[];i.push(new aI({...s,options:n})),"function"==typeof t&&i.push(new QF({modelPropertyMacro:t,options:n})),"strict"!==r&&i.push(new eI({options:n})),"function"==typeof e&&i.push(new tI({parameterMacro:e,options:n}));const o=uI(i,{nodeTypeGetter:QT});Object.assign(this,o)}}const hI=Gj[Symbol.for("nodejs.util.promisify.custom")];class fI extends class extends class{name;constructor({name:e}){this.name=e}}{constructor(e){super({...null!=e?e:{},name:"openapi-3-1"})}canDereference(e){var t;return"text/plain"!==e.mediaType?sO.includes(e.mediaType):xk(null===(t=e.parseResult)||void 0===t?void 0:t.result)}async dereference(e,t){var r;const n=$j(YT),s=null!==(r=t.dereference.refSet)&&void 0!==r?r:new Qm,i=new Qm;let o,c=s;s.has(e.uri)?o=s.find(yd(e.uri,"uri")):(o=new gE({uri:e.uri,value:e.parseResult}),s.add(o)),t.dereference.immutable&&(s.refs.map((e=>new gE({...e,value:Cj(e.value)}))).forEach((e=>i.add(e))),o=i.find((t=>t.uri===e.uri)),c=i);const a=new YF({reference:o,namespace:n,options:t}),u=await ZF(c.rootRef.value,a,{keyMap:ek,nodeTypeGetter:QT});return t.dereference.immutable&&i.refs.filter((e=>e.uri.startsWith("immutable://"))).map((e=>new gE({...e,uri:e.uri.replace(/^immutable:\/\//,"")}))).forEach((e=>s.add(e))),null===t.dereference.refSet&&s.clean(),i.clean(),u}}{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:e=!1,parameterMacro:t=null,modelPropertyMacro:r=null,mode:n="non-strict",ancestors:s=[],...i}={}){super({...i}),this.name="openapi-3-1-swagger-client",this.allowMetaPatches=e,this.parameterMacro=t,this.modelPropertyMacro=r,this.mode=n,this.ancestors=[...s]}async dereference(e,t){var r;const n=$j(YT),s=null!==(r=t.dereference.refSet)&&void 0!==r?r:new Qm,i=new Qm;let o,c=s;s.has(e.uri)?o=s.find((t=>t.uri===e.uri)):(o=new gE({uri:e.uri,value:e.parseResult}),s.add(o)),t.dereference.immutable&&(s.refs.map((e=>new gE({...e,value:Cj(e.value)}))).forEach((e=>i.add(e))),o=i.find((t=>t.uri===e.uri)),c=i);const a=new lI({reference:o,namespace:n,options:t,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),u=await hI(c.rootRef.value,a,{keyMap:ek,nodeTypeGetter:QT});return t.dereference.immutable&&i.refs.filter((e=>e.uri.startsWith("immutable://"))).map((e=>new gE({...e,uri:e.uri.replace(/^immutable:\/\//,"")}))).forEach((e=>s.add(e))),null===t.dereference.refSet&&s.clean(),i.clean(),u}}const pI=e=>{const t=oE(e.meta.get("baseURI")),r=e.meta.get("referencingElement");return new Jx({$ref:t},Cj(r.meta),Cj(r.attributes))},dI=async e=>{const{spec:t,timeout:r,redirects:n,requestInterceptor:s,responseInterceptor:i,pathDiscriminator:o=[],allowMetaPatches:c=!1,useCircularStructures:a=!1,skipNormalization:u=!1,parameterMacro:l=null,modelPropertyMacro:h=null,mode:f="non-strict",strategies:p}=e;try{const{cache:d}=dI,m=p.find((e=>e.match(t))),v=Um(zm())?zm():"https://swagger.io",y=Mt(e),b=Xm(v,y);let g;d.has(t)?g=d.get(t):(g=DT.refract(t),g.classes.push("result"),d.set(t,g));const w=new Yx([g]),x=tO(o),j=""===x?"":`#${x}`,E=rO(x,g),$=new gE({uri:b,value:w}),O=new Qm({refs:[$]});""!==x&&(O.rootRef=void 0);const S=[new Set([E])],A=[],P=((e,t,r)=>new aE({element:r}).transclude(e,t))(E,await PE(E,{resolve:{baseURI:`${b}${j}`,resolvers:[new _F({timeout:r||1e4,redirects:n||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:s,responseInterceptor:i}},strategies:[new IF]},parse:{mediaType:sO.latest(),parsers:[new NF({allowEmpty:!1,sourceMap:!1}),new qF({allowEmpty:!1,sourceMap:!1}),new CF({allowEmpty:!1,sourceMap:!1}),new MF({allowEmpty:!1,sourceMap:!1}),new FF({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new fI({allowMetaPatches:c,useCircularStructures:a,parameterMacro:l,modelPropertyMacro:h,mode:f,ancestors:S})],refSet:O,dereferenceOpts:{errors:A},immutable:!1,circular:a?"ignore":"replace",circularReplacer:a?ev.dereference.circularReplacer:pI}}),g),T=u?P:m.normalize(P);return{spec:oE(T),errors:A}}catch(e){if(e instanceof W$||e instanceof Z$)return{spec:null,errors:[]};throw e}};dI.cache=new WeakMap;const mI=e=>{if(!uj(e))return e;const t=[ck({operationIdNormalizer:(e,t,r)=>M$({operationId:e},t,r,{v2OperationIdCompatibilityMode:!1})}),rk(),nk(),ak(),uk()];return zj(e,t,{toolboxCreator:qk,visitorOptions:{keyMap:ek,nodeTypeGetter:QT}})},vI={name:"openapi-3-1-apidom",match:e=>U$(e),normalize(e){if(!sj(e)&&em(e)&&!e.$$normalized){const r=(t=mI,e=>{const r=DT.refract(e);r.classes.push("result");const n=t(r),s=oE(n);return dI.cache.set(s,n),oE(n)})(e);return r.$$normalized=!0,r}var t;return sj(e)?mI(e):e},resolve:async e=>dI(e)};function yI(e,t,r){if(!e||"object"!=typeof e||!e.paths||"object"!=typeof e.paths)return null;const{paths:n}=e;for(const s in n)for(const i in n[s]){if("PARAMETERS"===i.toUpperCase())continue;const o=n[s][i];if(!o||"object"!=typeof o)continue;const c={spec:e,pathName:s,method:i.toUpperCase(),operation:o},a=t(c);if(r&&a)return c}}function bI(e,t){return`${t.toLowerCase()}-${e}`}function gI(e,t){return e&&e.paths?function(e,t){return yI(e,t,!0)||null}(e,(({pathName:e,method:r,operation:n})=>{if(!n||"object"!=typeof n)return!1;const s=n.operationId;return[M$(n,e,r),bI(e,r),s].some((e=>e&&e===t))})):null}const{isHttpUrl:wI}=Zm,xI=()=>null,jI={mapTagOperations:function({spec:e,cb:t=xI,defaultTag:r="default",v2OperationIdCompatibilityMode:n}){const s={},i={};return yI(e,(({pathName:o,method:c,operation:a})=>{var u;(a.tags?(u=a.tags,Array.isArray(u)?u:[u]):[r]).forEach((r=>{if("string"!=typeof r)return;i[r]=i[r]||{};const u=i[r],l=M$(a,o,c,{v2OperationIdCompatibilityMode:n}),h=t({spec:e,pathName:o,method:c,operation:a,operationId:l});if(s[l])s[l]+=1,u[`${l}${s[l]}`]=h;else if(void 0!==u[l]){const e=s[l]||1;s[l]=e+1,u[`${l}${s[l]}`]=h;const t=u[l];delete u[l],u[`${l}${e}`]=t}else u[l]=h}))})),i},makeExecute:function(e={}){return({pathName:t,method:r,operationId:n})=>(s,i={})=>{const{requestInterceptor:o,responseInterceptor:c,userFetch:a}=e;return e.execute({spec:e.spec,requestInterceptor:o,responseInterceptor:c,userFetch:a,pathName:t,method:r,parameters:s,operationId:n,...i})}}};var EI={ |
| 4277 | /*! |
| 4278 | * cookie |
no test coverage detected