@povio/openapi-codegen-cli
Version:
**NOTE:** This CLI tool is primarily designed for use within our organization. The generated code output aligns with our internal template. If you are using this tool without our internal template, make sure to use it in **standalone** mode.
7 lines (6 loc) • 4.47 MB
JavaScript
#!/usr/bin/env node
"use strict";var POt=Object.create;var boe=Object.defineProperty;var ZHe=Object.getOwnPropertyDescriptor;var wOt=Object.getOwnPropertyNames;var AOt=Object.getPrototypeOf,DOt=Object.prototype.hasOwnProperty;var t=(l,u)=>boe(l,"name",{value:u,configurable:!0});var Pr=(l,u)=>()=>(u||l((u={exports:{}}).exports,u),u.exports);var IOt=(l,u,m,b)=>{if(u&&typeof u=="object"||typeof u=="function")for(let k of wOt(u))!DOt.call(l,k)&&k!==m&&boe(l,k,{get:()=>u[k],enumerable:!(b=ZHe(u,k))||b.enumerable});return l};var Zm=(l,u,m)=>(m=l!=null?POt(AOt(l)):{},IOt(u||!l||!l.__esModule?boe(m,"default",{value:l,enumerable:!0}):m,l));var wu=(l,u,m,b)=>{for(var k=b>1?void 0:b?ZHe(u,m):u,I=l.length-1,R;I>=0;I--)(R=l[I])&&(k=(b?R(u,m,k):R(k))||k);return b&&k&&boe(u,m,k),k};var dZe=Pr(()=>{var pZe;(function(l){(function(u){var m=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:Z(),b=k(l);typeof m.Reflect<"u"&&(b=k(m.Reflect,b)),u(b,m),typeof m.Reflect>"u"&&(m.Reflect=l);function k(ce,re){return function(pe,ke){Object.defineProperty(ce,pe,{configurable:!0,writable:!0,value:ke}),re&&re(pe,ke)}}t(k,"makeExporter");function I(){try{return Function("return this;")()}catch{}}t(I,"functionThis");function R(){try{return(0,eval)("(function() { return this; })()")}catch{}}t(R,"indirectEvalThis");function Z(){return I()||R()}t(Z,"sloppyModeThis")})(function(u,m){var b=Object.prototype.hasOwnProperty,k=typeof Symbol=="function",I=k&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",R=k&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",Z=typeof Object.create=="function",ce={__proto__:[]}instanceof Array,re=!Z&&!ce,pe={create:Z?function(){return c3(Object.create(null))}:ce?function(){return c3({__proto__:null})}:function(){return c3({})},has:re?function(Lt,ln){return b.call(Lt,ln)}:function(Lt,ln){return ln in Lt},get:re?function(Lt,ln){return b.call(Lt,ln)?Lt[ln]:void 0}:function(Lt,ln){return Lt[ln]}},ke=Object.getPrototypeOf(Function),et=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:bL(),At=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Dr(),cr=typeof WeakMap=="function"?WeakMap:dT(),sr=k?Symbol.for("@reflect-metadata:registry"):void 0,Bt=q_(),ar=np(Bt);function Zt(Lt,ln,ci,Zs){if(vo(ci)){if(!ht(Lt))throw new TypeError;if(!Ki(ln))throw new TypeError;return xs(Lt,ln)}else{if(!ht(Lt))throw new TypeError;if(!Vf(ln))throw new TypeError;if(!Vf(Zs)&&!vo(Zs)&&!Ji(Zs))throw new TypeError;return Ji(Zs)&&(Zs=void 0),ci=tu(ci),Fs(Lt,ln,ci,Zs)}}t(Zt,"decorate"),u("decorate",Zt);function Ai(Lt,ln){function ci(Zs,no){if(!Vf(Zs))throw new TypeError;if(!vo(no)&&!f6(no))throw new TypeError;Es(Lt,ln,Zs,no)}return t(ci,"decorator"),ci}t(Ai,"metadata"),u("metadata",Ai);function zn(Lt,ln,ci,Zs){if(!Vf(ci))throw new TypeError;return vo(Zs)||(Zs=tu(Zs)),Es(Lt,ln,ci,Zs)}t(zn,"defineMetadata"),u("defineMetadata",zn);function vi(Lt,ln,ci){if(!Vf(ln))throw new TypeError;return vo(ci)||(ci=tu(ci)),Ht(Lt,ln,ci)}t(vi,"hasMetadata"),u("hasMetadata",vi);function Zo(Lt,ln,ci){if(!Vf(ln))throw new TypeError;return vo(ci)||(ci=tu(ci)),Mc(Lt,ln,ci)}t(Zo,"hasOwnMetadata"),u("hasOwnMetadata",Zo);function ai(Lt,ln,ci){if(!Vf(ln))throw new TypeError;return vo(ci)||(ci=tu(ci)),La(Lt,ln,ci)}t(ai,"getMetadata"),u("getMetadata",ai);function eu(Lt,ln,ci){if(!Vf(ln))throw new TypeError;return vo(ci)||(ci=tu(ci)),Jo(Lt,ln,ci)}t(eu,"getOwnMetadata"),u("getOwnMetadata",eu);function tf(Lt,ln){if(!Vf(Lt))throw new TypeError;return vo(ln)||(ln=tu(ln)),Ah(Lt,ln)}t(tf,"getMetadataKeys"),u("getMetadataKeys",tf);function ma(Lt,ln){if(!Vf(Lt))throw new TypeError;return vo(ln)||(ln=tu(ln)),gf(Lt,ln)}t(ma,"getOwnMetadataKeys"),u("getOwnMetadataKeys",ma);function Sr(Lt,ln,ci){if(!Vf(ln))throw new TypeError;if(vo(ci)||(ci=tu(ci)),!Vf(ln))throw new TypeError;vo(ci)||(ci=tu(ci));var Zs=Mb(ln,ci,!1);return vo(Zs)?!1:Zs.OrdinaryDeleteMetadata(Lt,ln,ci)}t(Sr,"deleteMetadata"),u("deleteMetadata",Sr);function xs(Lt,ln){for(var ci=Lt.length-1;ci>=0;--ci){var Zs=Lt[ci],no=Zs(ln);if(!vo(no)&&!Ji(no)){if(!Ki(no))throw new TypeError;ln=no}}return ln}t(xs,"DecorateConstructor");function Fs(Lt,ln,ci,Zs){for(var no=Lt.length-1;no>=0;--no){var z_=Lt[no],Iu=z_(ln,ci,Zs);if(!vo(Iu)&&!Ji(Iu)){if(!Vf(Iu))throw new TypeError;Zs=Iu}}return Zs}t(Fs,"DecorateProperty");function Ht(Lt,ln,ci){var Zs=Mc(Lt,ln,ci);if(Zs)return!0;var no=Hs(ln);return Ji(no)?!1:Ht(Lt,no,ci)}t(Ht,"OrdinaryHasMetadata");function Mc(Lt,ln,ci){var Zs=Mb(ln,ci,!1);return vo(Zs)?!1:Uf(Zs.OrdinaryHasOwnMetadata(Lt,ln,ci))}t(Mc,"OrdinaryHasOwnMetadata");function La(Lt,ln,ci){var Zs=Mc(Lt,ln,ci);if(Zs)return Jo(Lt,ln,ci);var no=Hs(ln);if(!Ji(no))return La(Lt,no,ci)}t(La,"OrdinaryGetMetadata");function Jo(Lt,ln,ci){var Zs=Mb(ln,ci,!1);if(!vo(Zs))return Zs.OrdinaryGetOwnMetadata(Lt,ln,ci)}t(Jo,"OrdinaryGetOwnMetadata");function Es(Lt,ln,ci,Zs){var no=Mb(ci,Zs,!0);no.OrdinaryDefineOwnMetadata(Lt,ln,ci,Zs)}t(Es,"OrdinaryDefineOwnMetadata");function Ah(Lt,ln){var ci=gf(Lt,ln),Zs=Hs(Lt);if(Zs===null)return ci;var no=Ah(Zs,ln);if(no.length<=0)return ci;if(ci.length<=0)return no;for(var z_=new At,Iu=[],_l=0,es=ci;_l<es.length;_l++){var wa=es[_l],gi=z_.has(wa);gi||(z_.add(wa),Iu.push(wa))}for(var io=0,Xs=no;io<Xs.length;io++){var wa=Xs[io],gi=z_.has(wa);gi||(z_.add(wa),Iu.push(wa))}return Iu}t(Ah,"OrdinaryMetadataKeys");function gf(Lt,ln){var ci=Mb(Lt,ln,!1);return ci?ci.OrdinaryOwnMetadataKeys(Lt,ln):[]}t(gf,"OrdinaryOwnMetadataKeys");function ay(Lt){if(Lt===null)return 1;switch(typeof Lt){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return Lt===null?1:6;default:return 6}}t(ay,"Type");function vo(Lt){return Lt===void 0}t(vo,"IsUndefined");function Ji(Lt){return Lt===null}t(Ji,"IsNull");function Ao(Lt){return typeof Lt=="symbol"}t(Ao,"IsSymbol");function Vf(Lt){return typeof Lt=="object"?Lt!==null:typeof Lt=="function"}t(Vf,"IsObject");function xo(Lt,ln){switch(ay(Lt)){case 0:return Lt;case 1:return Lt;case 2:return Lt;case 3:return Lt;case 4:return Lt;case 5:return Lt}var ci=ln===3?"string":ln===5?"number":"default",Zs=bn(Lt,I);if(Zs!==void 0){var no=Zs.call(Lt,ci);if(Vf(no))throw new TypeError;return no}return Il(Lt,ci==="default"?"number":ci)}t(xo,"ToPrimitive");function Il(Lt,ln){if(ln==="string"){var ci=Lt.toString;if(Yp(ci)){var Zs=ci.call(Lt);if(!Vf(Zs))return Zs}var no=Lt.valueOf;if(Yp(no)){var Zs=no.call(Lt);if(!Vf(Zs))return Zs}}else{var no=Lt.valueOf;if(Yp(no)){var Zs=no.call(Lt);if(!Vf(Zs))return Zs}var z_=Lt.toString;if(Yp(z_)){var Zs=z_.call(Lt);if(!Vf(Zs))return Zs}}throw new TypeError}t(Il,"OrdinaryToPrimitive");function Uf(Lt){return!!Lt}t(Uf,"ToBoolean");function fl(Lt){return""+Lt}t(fl,"ToString");function tu(Lt){var ln=xo(Lt,3);return Ao(ln)?ln:fl(ln)}t(tu,"ToPropertyKey");function ht(Lt){return Array.isArray?Array.isArray(Lt):Lt instanceof Object?Lt instanceof Array:Object.prototype.toString.call(Lt)==="[object Array]"}t(ht,"IsArray");function Yp(Lt){return typeof Lt=="function"}t(Yp,"IsCallable");function Ki(Lt){return typeof Lt=="function"}t(Ki,"IsConstructor");function f6(Lt){switch(ay(Lt)){case 3:return!0;case 4:return!0;default:return!1}}t(f6,"IsPropertyKey");function Nr(Lt,ln){return Lt===ln||Lt!==Lt&&ln!==ln}t(Nr,"SameValueZero");function bn(Lt,ln){var ci=Lt[ln];if(ci!=null){if(!Yp(ci))throw new TypeError;return ci}}t(bn,"GetMethod");function Ws(Lt){var ln=bn(Lt,R);if(!Yp(ln))throw new TypeError;var ci=ln.call(Lt);if(!Vf(ci))throw new TypeError;return ci}t(Ws,"GetIterator");function oi(Lt){return Lt.value}t(oi,"IteratorValue");function dn(Lt){var ln=Lt.next();return ln.done?!1:ln}t(dn,"IteratorStep");function Ba(Lt){var ln=Lt.return;ln&&ln.call(Lt)}t(Ba,"IteratorClose");function Hs(Lt){var ln=Object.getPrototypeOf(Lt);if(typeof Lt!="function"||Lt===ke||ln!==ke)return ln;var ci=Lt.prototype,Zs=ci&&Object.getPrototypeOf(ci);if(Zs==null||Zs===Object.prototype)return ln;var no=Zs.constructor;return typeof no!="function"||no===Lt?ln:no}t(Hs,"OrdinaryGetPrototypeOf");function Ga(){var Lt;!vo(sr)&&typeof m.Reflect<"u"&&!(sr in m.Reflect)&&typeof m.Reflect.defineMetadata=="function"&&(Lt=Gd(m.Reflect));var ln,ci,Zs,no=new cr,z_={registerProvider:Iu,getProvider:es,setProvider:gi};return z_;function Iu(io){if(!Object.isExtensible(z_))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case Lt===io:break;case vo(ln):ln=io;break;case ln===io:break;case vo(ci):ci=io;break;case ci===io:break;default:Zs===void 0&&(Zs=new At),Zs.add(io);break}}function _l(io,Xs){if(!vo(ln)){if(ln.isProviderFor(io,Xs))return ln;if(!vo(ci)){if(ci.isProviderFor(io,Xs))return ln;if(!vo(Zs))for(var Bs=Ws(Zs);;){var Nl=dn(Bs);if(!Nl)return;var oy=oi(Nl);if(oy.isProviderFor(io,Xs))return Ba(Bs),oy}}}if(!vo(Lt)&&Lt.isProviderFor(io,Xs))return Lt}function es(io,Xs){var Bs=no.get(io),Nl;return vo(Bs)||(Nl=Bs.get(Xs)),vo(Nl)&&(Nl=_l(io,Xs),vo(Nl)||(vo(Bs)&&(Bs=new et,no.set(io,Bs)),Bs.set(Xs,Nl))),Nl}function wa(io){if(vo(io))throw new TypeError;return ln===io||ci===io||!vo(Zs)&&Zs.has(io)}function gi(io,Xs,Bs){if(!wa(Bs))throw new Error("Metadata provider not registered.");var Nl=es(io,Xs);if(Nl!==Bs){if(!vo(Nl))return!1;var oy=no.get(io);vo(oy)&&(oy=new et,no.set(io,oy)),oy.set(Xs,Bs)}return!0}}t(Ga,"CreateMetadataRegistry");function q_(){var Lt;return!vo(sr)&&Vf(m.Reflect)&&Object.isExtensible(m.Reflect)&&(Lt=m.Reflect[sr]),vo(Lt)&&(Lt=Ga()),!vo(sr)&&Vf(m.Reflect)&&Object.isExtensible(m.Reflect)&&Object.defineProperty(m.Reflect,sr,{enumerable:!1,configurable:!1,writable:!1,value:Lt}),Lt}t(q_,"GetOrCreateMetadataRegistry");function np(Lt){var ln=new cr,ci={isProviderFor:t(function(wa,gi){var io=ln.get(wa);return vo(io)?!1:io.has(gi)},"isProviderFor"),OrdinaryDefineOwnMetadata:Iu,OrdinaryHasOwnMetadata:no,OrdinaryGetOwnMetadata:z_,OrdinaryOwnMetadataKeys:_l,OrdinaryDeleteMetadata:es};return Bt.registerProvider(ci),ci;function Zs(wa,gi,io){var Xs=ln.get(wa),Bs=!1;if(vo(Xs)){if(!io)return;Xs=new et,ln.set(wa,Xs),Bs=!0}var Nl=Xs.get(gi);if(vo(Nl)){if(!io)return;if(Nl=new et,Xs.set(gi,Nl),!Lt.setProvider(wa,gi,ci))throw Xs.delete(gi),Bs&&ln.delete(wa),new Error("Wrong provider for target.")}return Nl}t(Zs,"GetOrCreateMetadataMap");function no(wa,gi,io){var Xs=Zs(gi,io,!1);return vo(Xs)?!1:Uf(Xs.has(wa))}t(no,"OrdinaryHasOwnMetadata");function z_(wa,gi,io){var Xs=Zs(gi,io,!1);if(!vo(Xs))return Xs.get(wa)}t(z_,"OrdinaryGetOwnMetadata");function Iu(wa,gi,io,Xs){var Bs=Zs(io,Xs,!0);Bs.set(wa,gi)}t(Iu,"OrdinaryDefineOwnMetadata");function _l(wa,gi){var io=[],Xs=Zs(wa,gi,!1);if(vo(Xs))return io;for(var Bs=Xs.keys(),Nl=Ws(Bs),oy=0;;){var Sm=dn(Nl);if(!Sm)return io.length=oy,io;var D8=oi(Sm);try{io[oy]=D8}catch(cy){try{Ba(Nl)}finally{throw cy}}oy++}}t(_l,"OrdinaryOwnMetadataKeys");function es(wa,gi,io){var Xs=Zs(gi,io,!1);if(vo(Xs)||!Xs.delete(wa))return!1;if(Xs.size===0){var Bs=ln.get(gi);vo(Bs)||(Bs.delete(io),Bs.size===0&&ln.delete(Bs))}return!0}t(es,"OrdinaryDeleteMetadata")}t(np,"CreateMetadataProvider");function Gd(Lt){var ln=Lt.defineMetadata,ci=Lt.hasOwnMetadata,Zs=Lt.getOwnMetadata,no=Lt.getOwnMetadataKeys,z_=Lt.deleteMetadata,Iu=new cr,_l={isProviderFor:t(function(es,wa){var gi=Iu.get(es);return!vo(gi)&&gi.has(wa)?!0:no(es,wa).length?(vo(gi)&&(gi=new At,Iu.set(es,gi)),gi.add(wa),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:ln,OrdinaryHasOwnMetadata:ci,OrdinaryGetOwnMetadata:Zs,OrdinaryOwnMetadataKeys:no,OrdinaryDeleteMetadata:z_};return _l}t(Gd,"CreateFallbackProvider");function Mb(Lt,ln,ci){var Zs=Bt.getProvider(Lt,ln);if(!vo(Zs))return Zs;if(ci){if(Bt.setProvider(Lt,ln,ar))return ar;throw new Error("Illegal state.")}}t(Mb,"GetMetadataProvider");function bL(){var Lt={},ln=[],ci=function(){function _l(es,wa,gi){this._index=0,this._keys=es,this._values=wa,this._selector=gi}return t(_l,"MapIterator"),_l.prototype["@@iterator"]=function(){return this},_l.prototype[R]=function(){return this},_l.prototype.next=function(){var es=this._index;if(es>=0&&es<this._keys.length){var wa=this._selector(this._keys[es],this._values[es]);return es+1>=this._keys.length?(this._index=-1,this._keys=ln,this._values=ln):this._index++,{value:wa,done:!1}}return{value:void 0,done:!0}},_l.prototype.throw=function(es){throw this._index>=0&&(this._index=-1,this._keys=ln,this._values=ln),es},_l.prototype.return=function(es){return this._index>=0&&(this._index=-1,this._keys=ln,this._values=ln),{value:es,done:!0}},_l}(),Zs=function(){function _l(){this._keys=[],this._values=[],this._cacheKey=Lt,this._cacheIndex=-2}return t(_l,"Map"),Object.defineProperty(_l.prototype,"size",{get:t(function(){return this._keys.length},"get"),enumerable:!0,configurable:!0}),_l.prototype.has=function(es){return this._find(es,!1)>=0},_l.prototype.get=function(es){var wa=this._find(es,!1);return wa>=0?this._values[wa]:void 0},_l.prototype.set=function(es,wa){var gi=this._find(es,!0);return this._values[gi]=wa,this},_l.prototype.delete=function(es){var wa=this._find(es,!1);if(wa>=0){for(var gi=this._keys.length,io=wa+1;io<gi;io++)this._keys[io-1]=this._keys[io],this._values[io-1]=this._values[io];return this._keys.length--,this._values.length--,Nr(es,this._cacheKey)&&(this._cacheKey=Lt,this._cacheIndex=-2),!0}return!1},_l.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=Lt,this._cacheIndex=-2},_l.prototype.keys=function(){return new ci(this._keys,this._values,no)},_l.prototype.values=function(){return new ci(this._keys,this._values,z_)},_l.prototype.entries=function(){return new ci(this._keys,this._values,Iu)},_l.prototype["@@iterator"]=function(){return this.entries()},_l.prototype[R]=function(){return this.entries()},_l.prototype._find=function(es,wa){if(!Nr(this._cacheKey,es)){this._cacheIndex=-1;for(var gi=0;gi<this._keys.length;gi++)if(Nr(this._keys[gi],es)){this._cacheIndex=gi;break}}return this._cacheIndex<0&&wa&&(this._cacheIndex=this._keys.length,this._keys.push(es),this._values.push(void 0)),this._cacheIndex},_l}();return Zs;function no(_l,es){return _l}function z_(_l,es){return es}function Iu(_l,es){return[_l,es]}}t(bL,"CreateMapPolyfill");function Dr(){var Lt=function(){function ln(){this._map=new et}return t(ln,"Set"),Object.defineProperty(ln.prototype,"size",{get:t(function(){return this._map.size},"get"),enumerable:!0,configurable:!0}),ln.prototype.has=function(ci){return this._map.has(ci)},ln.prototype.add=function(ci){return this._map.set(ci,ci),this},ln.prototype.delete=function(ci){return this._map.delete(ci)},ln.prototype.clear=function(){this._map.clear()},ln.prototype.keys=function(){return this._map.keys()},ln.prototype.values=function(){return this._map.keys()},ln.prototype.entries=function(){return this._map.entries()},ln.prototype["@@iterator"]=function(){return this.keys()},ln.prototype[R]=function(){return this.keys()},ln}();return Lt}t(Dr,"CreateSetPolyfill");function dT(){var Lt=16,ln=pe.create(),ci=Zs();return function(){function es(){this._key=Zs()}return t(es,"WeakMap"),es.prototype.has=function(wa){var gi=no(wa,!1);return gi!==void 0?pe.has(gi,this._key):!1},es.prototype.get=function(wa){var gi=no(wa,!1);return gi!==void 0?pe.get(gi,this._key):void 0},es.prototype.set=function(wa,gi){var io=no(wa,!0);return io[this._key]=gi,this},es.prototype.delete=function(wa){var gi=no(wa,!1);return gi!==void 0?delete gi[this._key]:!1},es.prototype.clear=function(){this._key=Zs()},es}();function Zs(){var es;do es="@@WeakMap@@"+_l();while(pe.has(ln,es));return ln[es]=!0,es}function no(es,wa){if(!b.call(es,ci)){if(!wa)return;Object.defineProperty(es,ci,{value:pe.create()})}return es[ci]}function z_(es,wa){for(var gi=0;gi<wa;++gi)es[gi]=Math.random()*255|0;return es}function Iu(es){if(typeof Uint8Array=="function"){var wa=new Uint8Array(es);return typeof crypto<"u"?crypto.getRandomValues(wa):typeof msCrypto<"u"?msCrypto.getRandomValues(wa):z_(wa,es),wa}return z_(new Array(es),es)}function _l(){var es=Iu(Lt);es[6]=es[6]&79|64,es[8]=es[8]&191|128;for(var wa="",gi=0;gi<Lt;++gi){var io=es[gi];(gi===4||gi===6||gi===8)&&(wa+="-"),io<16&&(wa+="0"),wa+=io.toString(16).toLowerCase()}return wa}}t(dT,"CreateWeakMapPolyfill");function c3(Lt){return Lt.__=void 0,delete Lt.__,Lt}t(c3,"MakeDictionary")})})(pZe||(pZe={}))});var Ab=Pr((wb,gZe)=>{"use strict";var Goe=/^win/.test(process.platform),S5t=/\//g,x5t=/^(\w{2,}):\/\//i,hZe=gZe.exports,T5t=/~1/g,k5t=/~0/g,CEe=[/\?/g,"%3F",/\#/g,"%23"],EEe=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];wb.parse=require("url").parse;wb.resolve=require("url").resolve;wb.cwd=t(function(){if(process.browser)return location.href;let u=process.cwd(),m=u.slice(-1);return m==="/"||m==="\\"?u:u+"/"},"cwd");wb.getProtocol=t(function(u){let m=x5t.exec(u);if(m)return m[1].toLowerCase()},"getProtocol");wb.getExtension=t(function(u){let m=u.lastIndexOf(".");return m>=0?u.substr(m).toLowerCase():""},"getExtension");wb.getHash=t(function(u){let m=u.indexOf("#");return m>=0?u.substr(m):"#"},"getHash");wb.stripHash=t(function(u){let m=u.indexOf("#");return m>=0&&(u=u.substr(0,m)),u},"stripHash");wb.isHttp=t(function(u){let m=hZe.getProtocol(u);return m==="http"||m==="https"?!0:m===void 0?process.browser:!1},"isHttp");wb.isFileSystemPath=t(function(u){if(process.browser)return!1;let m=hZe.getProtocol(u);return m===void 0||m==="file"},"isFileSystemPath");wb.fromFileSystemPath=t(function(u){Goe&&(u=u.replace(/\\/g,"/")),u=encodeURI(u);for(let m=0;m<CEe.length;m+=2)u=u.replace(CEe[m],CEe[m+1]);return u},"fromFileSystemPath");wb.toFileSystemPath=t(function(u,m){u=decodeURI(u);for(let k=0;k<EEe.length;k+=2)u=u.replace(EEe[k],EEe[k+1]);let b=u.substr(0,7).toLowerCase()==="file://";return b&&(u=u[7]==="/"?u.substr(8):u.substr(7),Goe&&u[1]==="/"&&(u=u[0]+":"+u.substr(1)),m?u="file:///"+u:(b=!1,u=Goe?u:"/"+u)),Goe&&!b&&(u=u.replace(S5t,"\\"),u.substr(1,2)===":\\"&&(u=u[0].toUpperCase()+u.substr(1))),u},"toFileSystemPath");wb.safePointerToPath=t(function(u){return u.length<=1||u[0]!=="#"||u[1]!=="/"?[]:u.slice(2).split("/").map(m=>decodeURIComponent(m).replace(T5t,"/").replace(k5t,"~"))},"safePointerToPath")});var Zoe=Pr(wU=>{"use strict";var yZe=require("util"),C5t=Ab();wU.format=yZe.format;wU.inherits=yZe.inherits;wU.swaggerParamRegExp=/\{([^/}]+)}/g;var E5t=["get","post","put","delete","patch","options","head","trace"];function PEe(l,u){if(l.url&&l.url.startsWith("/")){let m=C5t.parse(u),b=m.protocol+"//"+m.hostname+l.url;return l.url=b,l}}t(PEe,"fixServers");function P5t(l,u){l.openapi&&u&&(u.startsWith("http:")||u.startsWith("https:"))&&(l.servers&&l.servers.map(m=>PEe(m,u)),["paths","webhooks"].forEach(m=>{Object.keys(l[m]||[]).forEach(b=>{let k=l[m][b];Object.keys(k).forEach(I=>{I==="servers"?k[I].map(R=>PEe(R,u)):E5t.includes(I)&&k[I].servers&&k[I].servers.map(R=>PEe(R,u))})})}))}t(P5t,"fixOasRelativeServers");wU.fixOasRelativeServers=P5t});var Qoe=Pr(dM=>{"use strict";Object.defineProperty(dM,"__esModule",{value:!0});dM.getDeepKeys=dM.toJSON=void 0;var w5t=["function","symbol","undefined"],A5t=["constructor","prototype","__proto__"],D5t=Object.getPrototypeOf({});function I5t(){let l={},u=this;for(let m of vZe(u))if(typeof m=="string"){let b=u[m],k=typeof b;w5t.includes(k)||(l[m]=b)}return l}t(I5t,"toJSON");dM.toJSON=I5t;function vZe(l,u=[]){let m=[];for(;l&&l!==D5t;)m=m.concat(Object.getOwnPropertyNames(l),Object.getOwnPropertySymbols(l)),l=Object.getPrototypeOf(l);let b=new Set(m);for(let k of u.concat(A5t))b.delete(k);return b}t(vZe,"getDeepKeys");dM.getDeepKeys=vZe});var wEe=Pr(mM=>{"use strict";Object.defineProperty(mM,"__esModule",{value:!0});mM.addInspectMethod=mM.format=void 0;var bZe=require("util"),N5t=Qoe(),SZe=bZe.inspect.custom||Symbol.for("nodejs.util.inspect.custom");mM.format=bZe.format;function O5t(l){l[SZe]=F5t}t(O5t,"addInspectMethod");mM.addInspectMethod=O5t;function F5t(){let l={},u=this;for(let m of N5t.getDeepKeys(u)){let b=u[m];l[m]=b}return delete l[SZe],l}t(F5t,"inspect")});var kZe=Pr(bC=>{"use strict";Object.defineProperty(bC,"__esModule",{value:!0});bC.lazyJoinStacks=bC.joinStacks=bC.isWritableStack=bC.isLazyStack=void 0;var M5t=/\r?\n/,L5t=/\bono[ @]/;function R5t(l){return!!(l&&l.configurable&&typeof l.get=="function")}t(R5t,"isLazyStack");bC.isLazyStack=R5t;function j5t(l){return!!(!l||l.writable||typeof l.set=="function")}t(j5t,"isWritableStack");bC.isWritableStack=j5t;function xZe(l,u){let m=TZe(l.stack),b=u?u.stack:void 0;return m&&b?m+`
`+b:m||b}t(xZe,"joinStacks");bC.joinStacks=xZe;function B5t(l,u,m){m?Object.defineProperty(u,"stack",{get:t(()=>{let b=l.get.apply(u);return xZe({stack:b},m)},"get"),enumerable:!1,configurable:!0}):$5t(u,l)}t(B5t,"lazyJoinStacks");bC.lazyJoinStacks=B5t;function TZe(l){if(l){let u=l.split(M5t),m;for(let b=0;b<u.length;b++){let k=u[b];if(L5t.test(k))m===void 0&&(m=b);else if(m!==void 0){u.splice(m,b-m);break}}if(u.length>0)return u.join(`
`)}return l}t(TZe,"popStack");function $5t(l,u){Object.defineProperty(l,"stack",{get:t(()=>TZe(u.get.apply(l)),"get"),enumerable:!1,configurable:!0})}t($5t,"lazyPopStack")});var PZe=Pr(Xoe=>{"use strict";Object.defineProperty(Xoe,"__esModule",{value:!0});Xoe.extendError=void 0;var CZe=wEe(),Yoe=kZe(),EZe=Qoe(),J5t=["name","message","stack"];function q5t(l,u,m){let b=l;return z5t(b,u),u&&typeof u=="object"&&V5t(b,u),b.toJSON=EZe.toJSON,CZe.addInspectMethod&&CZe.addInspectMethod(b),m&&typeof m=="object"&&Object.assign(b,m),b}t(q5t,"extendError");Xoe.extendError=q5t;function z5t(l,u){let m=Object.getOwnPropertyDescriptor(l,"stack");Yoe.isLazyStack(m)?Yoe.lazyJoinStacks(m,l,u):Yoe.isWritableStack(m)&&(l.stack=Yoe.joinStacks(l,u))}t(z5t,"extendStack");function V5t(l,u){let m=EZe.getDeepKeys(u,J5t),b=l,k=u;for(let I of m)if(b[I]===void 0)try{b[I]=k[I]}catch{}}t(V5t,"mergeErrors")});var wZe=Pr(hM=>{"use strict";Object.defineProperty(hM,"__esModule",{value:!0});hM.normalizeArgs=hM.normalizeOptions=void 0;var U5t=wEe();function W5t(l){return l=l||{},{concatMessages:l.concatMessages===void 0?!0:!!l.concatMessages,format:l.format===void 0?U5t.format:typeof l.format=="function"?l.format:!1}}t(W5t,"normalizeOptions");hM.normalizeOptions=W5t;function H5t(l,u){let m,b,k,I="";return typeof l[0]=="string"?k=l:typeof l[1]=="string"?(l[0]instanceof Error?m=l[0]:b=l[0],k=l.slice(1)):(m=l[0],b=l[1],k=l.slice(2)),k.length>0&&(u.format?I=u.format.apply(void 0,k):I=k.join(" ")),u.concatMessages&&m&&m.message&&(I+=(I?`
`:"")+m.message),{originalError:m,props:b,message:I}}t(H5t,"normalizeArgs");hM.normalizeArgs=H5t});var DEe=Pr(ece=>{"use strict";Object.defineProperty(ece,"__esModule",{value:!0});ece.Ono=void 0;var Koe=PZe(),AZe=wZe(),G5t=Qoe(),Z5t=AEe;ece.Ono=Z5t;function AEe(l,u){u=AZe.normalizeOptions(u);function m(...b){let{originalError:k,props:I,message:R}=AZe.normalizeArgs(b,u),Z=new l(R);return Koe.extendError(Z,k,I)}return t(m,"ono"),m[Symbol.species]=l,m}t(AEe,"Ono");AEe.toJSON=t(function(u){return G5t.toJSON.call(u)},"toJSON");AEe.extend=t(function(u,m,b){return b||m instanceof Error?Koe.extendError(u,m,b):m?Koe.extendError(u,void 0,m):Koe.extendError(u)},"extend")});var DZe=Pr(tce=>{"use strict";Object.defineProperty(tce,"__esModule",{value:!0});tce.ono=void 0;var GN=DEe(),Q5t=SC;tce.ono=Q5t;SC.error=new GN.Ono(Error);SC.eval=new GN.Ono(EvalError);SC.range=new GN.Ono(RangeError);SC.reference=new GN.Ono(ReferenceError);SC.syntax=new GN.Ono(SyntaxError);SC.type=new GN.Ono(TypeError);SC.uri=new GN.Ono(URIError);var Y5t=SC;function SC(...l){let u=l[0];if(typeof u=="object"&&typeof u.name=="string"){for(let m of Object.values(Y5t))if(typeof m=="function"&&m.name==="ono"){let b=m[Symbol.species];if(b&&b!==Error&&(u instanceof b||u.name===b.name))return m.apply(void 0,l)}}return SC.error.apply(void 0,l)}t(SC,"ono")});var NZe=Pr(IZe=>{"use strict";Object.defineProperty(IZe,"__esModule",{value:!0});var nXt=require("util")});var eT=Pr((Kx,gM)=>{"use strict";var X5t=Kx&&Kx.__createBinding||(Object.create?function(l,u,m,b){b===void 0&&(b=m),Object.defineProperty(l,b,{enumerable:!0,get:t(function(){return u[m]},"get")})}:function(l,u,m,b){b===void 0&&(b=m),l[b]=u[m]}),K5t=Kx&&Kx.__exportStar||function(l,u){for(var m in l)m!=="default"&&!u.hasOwnProperty(m)&&X5t(u,l,m)};Object.defineProperty(Kx,"__esModule",{value:!0});Kx.ono=void 0;var OZe=DZe();Object.defineProperty(Kx,"ono",{enumerable:!0,get:t(function(){return OZe.ono},"get")});var eFt=DEe();Object.defineProperty(Kx,"Ono",{enumerable:!0,get:t(function(){return eFt.Ono},"get")});K5t(NZe(),Kx);Kx.default=OZe.ono;typeof gM=="object"&&typeof gM.exports=="object"&&(gM.exports=Object.assign(gM.exports.default,gM.exports))});var IU=Pr(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.regexpCode=ef.getEsmExportName=ef.getProperty=ef.safeStringify=ef.stringify=ef.strConcat=ef.addCodeArg=ef.str=ef._=ef.nil=ef._Code=ef.Name=ef.IDENTIFIER=ef._CodeOrName=void 0;var OEe=class OEe{};t(OEe,"_CodeOrName");var AU=OEe;ef._CodeOrName=AU;ef.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var FEe=class FEe extends AU{constructor(u){if(super(),!ef.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};t(FEe,"Name");var ZN=FEe;ef.Name=ZN;var MEe=class MEe extends AU{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((m,b)=>`${m}${b}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((m,b)=>(b instanceof ZN&&(m[b.str]=(m[b.str]||0)+1),m),{})}};t(MEe,"_Code");var lS=MEe;ef._Code=lS;ef.nil=new lS("");function FZe(l,...u){let m=[l[0]],b=0;for(;b<u.length;)NEe(m,u[b]),m.push(l[++b]);return new lS(m)}t(FZe,"_");ef._=FZe;var IEe=new lS("+");function MZe(l,...u){let m=[DU(l[0])],b=0;for(;b<u.length;)m.push(IEe),NEe(m,u[b]),m.push(IEe,DU(l[++b]));return tFt(m),new lS(m)}t(MZe,"str");ef.str=MZe;function NEe(l,u){u instanceof lS?l.push(...u._items):u instanceof ZN?l.push(u):l.push(iFt(u))}t(NEe,"addCodeArg");ef.addCodeArg=NEe;function tFt(l){let u=1;for(;u<l.length-1;){if(l[u]===IEe){let m=rFt(l[u-1],l[u+1]);if(m!==void 0){l.splice(u-1,3,m);continue}l[u++]="+"}u++}}t(tFt,"optimize");function rFt(l,u){if(u==='""')return l;if(l==='""')return u;if(typeof l=="string")return u instanceof ZN||l[l.length-1]!=='"'?void 0:typeof u!="string"?`${l.slice(0,-1)}${u}"`:u[0]==='"'?l.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(l instanceof ZN))return`"${l}${u.slice(1)}`}t(rFt,"mergeExprItems");function nFt(l,u){return u.emptyStr()?l:l.emptyStr()?u:MZe`${l}${u}`}t(nFt,"strConcat");ef.strConcat=nFt;function iFt(l){return typeof l=="number"||typeof l=="boolean"||l===null?l:DU(Array.isArray(l)?l.join(","):l)}t(iFt,"interpolate");function sFt(l){return new lS(DU(l))}t(sFt,"stringify");ef.stringify=sFt;function DU(l){return JSON.stringify(l).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t(DU,"safeStringify");ef.safeStringify=DU;function aFt(l){return typeof l=="string"&&ef.IDENTIFIER.test(l)?new lS(`.${l}`):FZe`[${l}]`}t(aFt,"getProperty");ef.getProperty=aFt;function oFt(l){if(typeof l=="string"&&ef.IDENTIFIER.test(l))return new lS(`${l}`);throw new Error(`CodeGen: invalid export name: ${l}, use explicit $id name mapping`)}t(oFt,"getEsmExportName");ef.getEsmExportName=oFt;function cFt(l){return new lS(l.toString())}t(cFt,"regexpCode");ef.regexpCode=cFt});var qEe=Pr(G1=>{"use strict";Object.defineProperty(G1,"__esModule",{value:!0});G1.ValueScope=G1.ValueScopeName=G1.Scope=G1.varKinds=G1.UsedValueState=void 0;var H1=IU(),jEe=class jEe extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}};t(jEe,"ValueError");var LEe=jEe,rce;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(rce||(G1.UsedValueState=rce={}));G1.varKinds={const:new H1.Name("const"),let:new H1.Name("let"),var:new H1.Name("var")};var BEe=class BEe{constructor({prefixes:u,parent:m}={}){this._names={},this._prefixes=u,this._parent=m}toName(u){return u instanceof H1.Name?u:this.name(u)}name(u){return new H1.Name(this._newName(u))}_newName(u){let m=this._names[u]||this._nameGroup(u);return`${u}${m.index++}`}_nameGroup(u){var m,b;if(!((b=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||b===void 0)&&b.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};t(BEe,"Scope");var nce=BEe;G1.Scope=nce;var $Ee=class $Ee extends H1.Name{constructor(u,m){super(m),this.prefix=u}setValue(u,{property:m,itemIndex:b}){this.value=u,this.scopePath=(0,H1._)`.${new H1.Name(m)}[${b}]`}};t($Ee,"ValueScopeName");var ice=$Ee;G1.ValueScopeName=ice;var lFt=(0,H1._)`\n`,JEe=class JEe extends nce{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?lFt:H1.nil}}get(){return this._scope}name(u){return new ice(u,this._newName(u))}value(u,m){var b;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let k=this.toName(u),{prefix:I}=k,R=(b=m.key)!==null&&b!==void 0?b:m.ref,Z=this._values[I];if(Z){let pe=Z.get(R);if(pe)return pe}else Z=this._values[I]=new Map;Z.set(R,k);let ce=this._scope[I]||(this._scope[I]=[]),re=ce.length;return ce[re]=m.ref,k.setValue(m,{property:I,itemIndex:re}),k}getValue(u,m){let b=this._values[u];if(b)return b.get(m)}scopeRefs(u,m=this._values){return this._reduceValues(m,b=>{if(b.scopePath===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return(0,H1._)`${u}${b.scopePath}`})}scopeCode(u=this._values,m,b){return this._reduceValues(u,k=>{if(k.value===void 0)throw new Error(`CodeGen: name "${k}" has no value`);return k.value.code},m,b)}_reduceValues(u,m,b={},k){let I=H1.nil;for(let R in u){let Z=u[R];if(!Z)continue;let ce=b[R]=b[R]||new Map;Z.forEach(re=>{if(ce.has(re))return;ce.set(re,rce.Started);let pe=m(re);if(pe){let ke=this.opts.es5?G1.varKinds.var:G1.varKinds.const;I=(0,H1._)`${I}${ke} ${re} = ${pe};${this.opts._n}`}else if(pe=k==null?void 0:k(re))I=(0,H1._)`${I}${pe}${this.opts._n}`;else throw new LEe(re);ce.set(re,rce.Completed)})}return I}};t(JEe,"ValueScope");var REe=JEe;G1.ValueScope=REe});var ul=Pr(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.or=Jl.and=Jl.not=Jl.CodeGen=Jl.operators=Jl.varKinds=Jl.ValueScopeName=Jl.ValueScope=Jl.Scope=Jl.Name=Jl.regexpCode=Jl.stringify=Jl.getProperty=Jl.nil=Jl.strConcat=Jl.str=Jl._=void 0;var Du=IU(),tT=qEe(),EA=IU();Object.defineProperty(Jl,"_",{enumerable:!0,get:t(function(){return EA._},"get")});Object.defineProperty(Jl,"str",{enumerable:!0,get:t(function(){return EA.str},"get")});Object.defineProperty(Jl,"strConcat",{enumerable:!0,get:t(function(){return EA.strConcat},"get")});Object.defineProperty(Jl,"nil",{enumerable:!0,get:t(function(){return EA.nil},"get")});Object.defineProperty(Jl,"getProperty",{enumerable:!0,get:t(function(){return EA.getProperty},"get")});Object.defineProperty(Jl,"stringify",{enumerable:!0,get:t(function(){return EA.stringify},"get")});Object.defineProperty(Jl,"regexpCode",{enumerable:!0,get:t(function(){return EA.regexpCode},"get")});Object.defineProperty(Jl,"Name",{enumerable:!0,get:t(function(){return EA.Name},"get")});var cce=qEe();Object.defineProperty(Jl,"Scope",{enumerable:!0,get:t(function(){return cce.Scope},"get")});Object.defineProperty(Jl,"ValueScope",{enumerable:!0,get:t(function(){return cce.ValueScope},"get")});Object.defineProperty(Jl,"ValueScopeName",{enumerable:!0,get:t(function(){return cce.ValueScopeName},"get")});Object.defineProperty(Jl,"varKinds",{enumerable:!0,get:t(function(){return cce.varKinds},"get")});Jl.operators={GT:new Du._Code(">"),GTE:new Du._Code(">="),LT:new Du._Code("<"),LTE:new Du._Code("<="),EQ:new Du._Code("==="),NEQ:new Du._Code("!=="),NOT:new Du._Code("!"),OR:new Du._Code("||"),AND:new Du._Code("&&"),ADD:new Du._Code("+")};var tPe=class tPe{optimizeNodes(){return this}optimizeNames(u,m){return this}};t(tPe,"Node");var e6=tPe,rPe=class rPe extends e6{constructor(u,m,b){super(),this.varKind=u,this.name=m,this.rhs=b}render({es5:u,_n:m}){let b=u?tT.varKinds.var:this.varKind,k=this.rhs===void 0?"":` = ${this.rhs}`;return`${b} ${this.name}${k};`+m}optimizeNames(u,m){if(u[this.name.str])return this.rhs&&(this.rhs=bM(this.rhs,u,m)),this}get names(){return this.rhs instanceof Du._CodeOrName?this.rhs.names:{}}};t(rPe,"Def");var zEe=rPe,nPe=class nPe extends e6{constructor(u,m,b){super(),this.lhs=u,this.rhs=m,this.sideEffects=b}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,m){if(!(this.lhs instanceof Du.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=bM(this.rhs,u,m),this}get names(){let u=this.lhs instanceof Du.Name?{}:{...this.lhs.names};return oce(u,this.rhs)}};t(nPe,"Assign");var sce=nPe,iPe=class iPe extends sce{constructor(u,m,b,k){super(u,b,k),this.op=m}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}};t(iPe,"AssignOp");var VEe=iPe,sPe=class sPe extends e6{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}};t(sPe,"Label");var UEe=sPe,aPe=class aPe extends e6{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}};t(aPe,"Break");var WEe=aPe,oPe=class oPe extends e6{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}};t(oPe,"Throw");var HEe=oPe,cPe=class cPe extends e6{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,m){return this.code=bM(this.code,u,m),this}get names(){return this.code instanceof Du._CodeOrName?this.code.names:{}}};t(cPe,"AnyCode");var GEe=cPe,lPe=class lPe extends e6{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((m,b)=>m+b.render(u),"")}optimizeNodes(){let{nodes:u}=this,m=u.length;for(;m--;){let b=u[m].optimizeNodes();Array.isArray(b)?u.splice(m,1,...b):b?u[m]=b:u.splice(m,1)}return u.length>0?this:void 0}optimizeNames(u,m){let{nodes:b}=this,k=b.length;for(;k--;){let I=b[k];I.optimizeNames(u,m)||(uFt(u,I.names),b.splice(k,1))}return b.length>0?this:void 0}get names(){return this.nodes.reduce((u,m)=>XN(u,m.names),{})}};t(lPe,"ParentNode");var NU=lPe,uPe=class uPe extends NU{render(u){return"{"+u._n+super.render(u)+"}"+u._n}};t(uPe,"BlockNode");var t6=uPe,fPe=class fPe extends NU{};t(fPe,"Root");var ZEe=fPe,_Pe=class _Pe extends t6{};t(_Pe,"Else");var vM=_Pe;vM.kind="else";var yM=class yM extends t6{constructor(u,m){super(m),this.condition=u}render(u){let m=`if(${this.condition})`+super.render(u);return this.else&&(m+="else "+this.else.render(u)),m}optimizeNodes(){super.optimizeNodes();let u=this.condition;if(u===!0)return this.nodes;let m=this.else;if(m){let b=m.optimizeNodes();m=this.else=Array.isArray(b)?new vM(b):b}if(m)return u===!1?m instanceof yM?m:m.nodes:this.nodes.length?this:new yM(LZe(u),m instanceof yM?[m]:m.nodes);if(!(u===!1||!this.nodes.length))return this}optimizeNames(u,m){var b;if(this.else=(b=this.else)===null||b===void 0?void 0:b.optimizeNames(u,m),!!(super.optimizeNames(u,m)||this.else))return this.condition=bM(this.condition,u,m),this}get names(){let u=super.names;return oce(u,this.condition),this.else&&XN(u,this.else.names),u}};t(yM,"If");var QN=yM;QN.kind="if";var pPe=class pPe extends t6{};t(pPe,"For");var YN=pPe;YN.kind="for";var dPe=class dPe extends YN{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,m){if(super.optimizeNames(u,m))return this.iteration=bM(this.iteration,u,m),this}get names(){return XN(super.names,this.iteration.names)}};t(dPe,"ForLoop");var QEe=dPe,mPe=class mPe extends YN{constructor(u,m,b,k){super(),this.varKind=u,this.name=m,this.from=b,this.to=k}render(u){let m=u.es5?tT.varKinds.var:this.varKind,{name:b,from:k,to:I}=this;return`for(${m} ${b}=${k}; ${b}<${I}; ${b}++)`+super.render(u)}get names(){let u=oce(super.names,this.from);return oce(u,this.to)}};t(mPe,"ForRange");var YEe=mPe,hPe=class hPe extends YN{constructor(u,m,b,k){super(),this.loop=u,this.varKind=m,this.name=b,this.iterable=k}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,m){if(super.optimizeNames(u,m))return this.iterable=bM(this.iterable,u,m),this}get names(){return XN(super.names,this.iterable.names)}};t(hPe,"ForIter");var ace=hPe,gPe=class gPe extends t6{constructor(u,m,b){super(),this.name=u,this.args=m,this.async=b}render(u){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(u)}};t(gPe,"Func");var OU=gPe;OU.kind="func";var yPe=class yPe extends NU{render(u){return"return "+super.render(u)}};t(yPe,"Return");var FU=yPe;FU.kind="return";var vPe=class vPe extends t6{render(u){let m="try"+super.render(u);return this.catch&&(m+=this.catch.render(u)),this.finally&&(m+=this.finally.render(u)),m}optimizeNodes(){var u,m;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(m=this.finally)===null||m===void 0||m.optimizeNodes(),this}optimizeNames(u,m){var b,k;return super.optimizeNames(u,m),(b=this.catch)===null||b===void 0||b.optimizeNames(u,m),(k=this.finally)===null||k===void 0||k.optimizeNames(u,m),this}get names(){let u=super.names;return this.catch&&XN(u,this.catch.names),this.finally&&XN(u,this.finally.names),u}};t(vPe,"Try");var XEe=vPe,bPe=class bPe extends t6{constructor(u){super(),this.error=u}render(u){return`catch(${this.error})`+super.render(u)}};t(bPe,"Catch");var MU=bPe;MU.kind="catch";var SPe=class SPe extends t6{render(u){return"finally"+super.render(u)}};t(SPe,"Finally");var LU=SPe;LU.kind="finally";var xPe=class xPe{constructor(u,m={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...m,_n:m.lines?`
`:""},this._extScope=u,this._scope=new tT.Scope({parent:u}),this._nodes=[new ZEe]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,m){let b=this._extScope.value(u,m);return(this._values[b.prefix]||(this._values[b.prefix]=new Set)).add(b),b}getScopeValue(u,m){return this._extScope.getValue(u,m)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,m,b,k){let I=this._scope.toName(m);return b!==void 0&&k&&(this._constants[I.str]=b),this._leafNode(new zEe(u,I,b)),I}const(u,m,b){return this._def(tT.varKinds.const,u,m,b)}let(u,m,b){return this._def(tT.varKinds.let,u,m,b)}var(u,m,b){return this._def(tT.varKinds.var,u,m,b)}assign(u,m,b){return this._leafNode(new sce(u,m,b))}add(u,m){return this._leafNode(new VEe(u,Jl.operators.ADD,m))}code(u){return typeof u=="function"?u():u!==Du.nil&&this._leafNode(new GEe(u)),this}object(...u){let m=["{"];for(let[b,k]of u)m.length>1&&m.push(","),m.push(b),(b!==k||this.opts.es5)&&(m.push(":"),(0,Du.addCodeArg)(m,k));return m.push("}"),new Du._Code(m)}if(u,m,b){if(this._blockNode(new QN(u)),m&&b)this.code(m).else().code(b).endIf();else if(m)this.code(m).endIf();else if(b)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new QN(u))}else(){return this._elseNode(new vM)}endIf(){return this._endBlockNode(QN,vM)}_for(u,m){return this._blockNode(u),m&&this.code(m).endFor(),this}for(u,m){return this._for(new QEe(u),m)}forRange(u,m,b,k,I=this.opts.es5?tT.varKinds.var:tT.varKinds.let){let R=this._scope.toName(u);return this._for(new YEe(I,R,m,b),()=>k(R))}forOf(u,m,b,k=tT.varKinds.const){let I=this._scope.toName(u);if(this.opts.es5){let R=m instanceof Du.Name?m:this.var("_arr",m);return this.forRange("_i",0,(0,Du._)`${R}.length`,Z=>{this.var(I,(0,Du._)`${R}[${Z}]`),b(I)})}return this._for(new ace("of",k,I,m),()=>b(I))}forIn(u,m,b,k=this.opts.es5?tT.varKinds.var:tT.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,Du._)`Object.keys(${m})`,b);let I=this._scope.toName(u);return this._for(new ace("in",k,I,m),()=>b(I))}endFor(){return this._endBlockNode(YN)}label(u){return this._leafNode(new UEe(u))}break(u){return this._leafNode(new WEe(u))}return(u){let m=new FU;if(this._blockNode(m),this.code(u),m.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(FU)}try(u,m,b){if(!m&&!b)throw new Error('CodeGen: "try" without "catch" and "finally"');let k=new XEe;if(this._blockNode(k),this.code(u),m){let I=this.name("e");this._currNode=k.catch=new MU(I),m(I)}return b&&(this._currNode=k.finally=new LU,this.code(b)),this._endBlockNode(MU,LU)}throw(u){return this._leafNode(new HEe(u))}block(u,m){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(m),this}endBlock(u){let m=this._blockStarts.pop();if(m===void 0)throw new Error("CodeGen: not in self-balancing block");let b=this._nodes.length-m;if(b<0||u!==void 0&&b!==u)throw new Error(`CodeGen: wrong number of nodes: ${b} vs ${u} expected`);return this._nodes.length=m,this}func(u,m=Du.nil,b,k){return this._blockNode(new OU(u,m,b)),k&&this.code(k).endFunc(),this}endFunc(){return this._endBlockNode(OU)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,m){let b=this._currNode;if(b instanceof u||m&&b instanceof m)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${m?`${u.kind}/${m.kind}`:u.kind}"`)}_elseNode(u){let m=this._currNode;if(!(m instanceof QN))throw new Error('CodeGen: "else" without "if"');return this._currNode=m.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let m=this._nodes;m[m.length-1]=u}};t(xPe,"CodeGen");var KEe=xPe;Jl.CodeGen=KEe;function XN(l,u){for(let m in u)l[m]=(l[m]||0)+(u[m]||0);return l}t(XN,"addNames");function oce(l,u){return u instanceof Du._CodeOrName?XN(l,u.names):l}t(oce,"addExprNames");function bM(l,u,m){if(l instanceof Du.Name)return b(l);if(!k(l))return l;return new Du._Code(l._items.reduce((I,R)=>(R instanceof Du.Name&&(R=b(R)),R instanceof Du._Code?I.push(...R._items):I.push(R),I),[]));function b(I){let R=m[I.str];return R===void 0||u[I.str]!==1?I:(delete u[I.str],R)}function k(I){return I instanceof Du._Code&&I._items.some(R=>R instanceof Du.Name&&u[R.str]===1&&m[R.str]!==void 0)}}t(bM,"optimizeExpr");function uFt(l,u){for(let m in u)l[m]=(l[m]||0)-(u[m]||0)}t(uFt,"subtractNames");function LZe(l){return typeof l=="boolean"||typeof l=="number"||l===null?!l:(0,Du._)`!${ePe(l)}`}t(LZe,"not");Jl.not=LZe;var fFt=RZe(Jl.operators.AND);function _Ft(...l){return l.reduce(fFt)}t(_Ft,"and");Jl.and=_Ft;var pFt=RZe(Jl.operators.OR);function dFt(...l){return l.reduce(pFt)}t(dFt,"or");Jl.or=dFt;function RZe(l){return(u,m)=>u===Du.nil?m:m===Du.nil?u:(0,Du._)`${ePe(u)} ${l} ${ePe(m)}`}t(RZe,"mappend");function ePe(l){return l instanceof Du.Name?l:(0,Du._)`(${l})`}t(ePe,"par")});var _u=Pr(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.checkStrictMode=Kl.getErrorPath=Kl.Type=Kl.useFunc=Kl.setEvaluated=Kl.evaluatedPropsToName=Kl.mergeEvaluated=Kl.eachItem=Kl.unescapeJsonPointer=Kl.escapeJsonPointer=Kl.escapeFragment=Kl.unescapeFragment=Kl.schemaRefOrVal=Kl.schemaHasRulesButRef=Kl.schemaHasRules=Kl.checkUnknownRules=Kl.alwaysValidSchema=Kl.toHash=void 0;var $_=ul(),mFt=IU();function hFt(l){let u={};for(let m of l)u[m]=!0;return u}t(hFt,"toHash");Kl.toHash=hFt;function gFt(l,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:($Ze(l,u),!JZe(u,l.self.RULES.all))}t(gFt,"alwaysValidSchema");Kl.alwaysValidSchema=gFt;function $Ze(l,u=l.schema){let{opts:m,self:b}=l;if(!m.strictSchema||typeof u=="boolean")return;let k=b.RULES.keywords;for(let I in u)k[I]||VZe(l,`unknown keyword: "${I}"`)}t($Ze,"checkUnknownRules");Kl.checkUnknownRules=$Ze;function JZe(l,u){if(typeof l=="boolean")return!l;for(let m in l)if(u[m])return!0;return!1}t(JZe,"schemaHasRules");Kl.schemaHasRules=JZe;function yFt(l,u){if(typeof l=="boolean")return!l;for(let m in l)if(m!=="$ref"&&u.all[m])return!0;return!1}t(yFt,"schemaHasRulesButRef");Kl.schemaHasRulesButRef=yFt;function vFt({topSchemaRef:l,schemaPath:u},m,b,k){if(!k){if(typeof m=="number"||typeof m=="boolean")return m;if(typeof m=="string")return(0,$_._)`${m}`}return(0,$_._)`${l}${u}${(0,$_.getProperty)(b)}`}t(vFt,"schemaRefOrVal");Kl.schemaRefOrVal=vFt;function bFt(l){return qZe(decodeURIComponent(l))}t(bFt,"unescapeFragment");Kl.unescapeFragment=bFt;function SFt(l){return encodeURIComponent(kPe(l))}t(SFt,"escapeFragment");Kl.escapeFragment=SFt;function kPe(l){return typeof l=="number"?`${l}`:l.replace(/~/g,"~0").replace(/\//g,"~1")}t(kPe,"escapeJsonPointer");Kl.escapeJsonPointer=kPe;function qZe(l){return l.replace(/~1/g,"/").replace(/~0/g,"~")}t(qZe,"unescapeJsonPointer");Kl.unescapeJsonPointer=qZe;function xFt(l,u){if(Array.isArray(l))for(let m of l)u(m);else u(l)}t(xFt,"eachItem");Kl.eachItem=xFt;function jZe({mergeNames:l,mergeToName:u,mergeValues:m,resultToName:b}){return(k,I,R,Z)=>{let ce=R===void 0?I:R instanceof $_.Name?(I instanceof $_.Name?l(k,I,R):u(k,I,R),R):I instanceof $_.Name?(u(k,R,I),I):m(I,R);return Z===$_.Name&&!(ce instanceof $_.Name)?b(k,ce):ce}}t(jZe,"makeMergeEvaluated");Kl.mergeEvaluated={props:jZe({mergeNames:t((l,u,m)=>l.if((0,$_._)`${m} !== true && ${u} !== undefined`,()=>{l.if((0,$_._)`${u} === true`,()=>l.assign(m,!0),()=>l.assign(m,(0,$_._)`${m} || {}`).code((0,$_._)`Object.assign(${m}, ${u})`))}),"mergeNames"),mergeToName:t((l,u,m)=>l.if((0,$_._)`${m} !== true`,()=>{u===!0?l.assign(m,!0):(l.assign(m,(0,$_._)`${m} || {}`),CPe(l,m,u))}),"mergeToName"),mergeValues:t((l,u)=>l===!0?!0:{...l,...u},"mergeValues"),resultToName:zZe}),items:jZe({mergeNames:t((l,u,m)=>l.if((0,$_._)`${m} !== true && ${u} !== undefined`,()=>l.assign(m,(0,$_._)`${u} === true ? true : ${m} > ${u} ? ${m} : ${u}`)),"mergeNames"),mergeToName:t((l,u,m)=>l.if((0,$_._)`${m} !== true`,()=>l.assign(m,u===!0?!0:(0,$_._)`${m} > ${u} ? ${m} : ${u}`)),"mergeToName"),mergeValues:t((l,u)=>l===!0?!0:Math.max(l,u),"mergeValues"),resultToName:t((l,u)=>l.var("items",u),"resultToName")})};function zZe(l,u){if(u===!0)return l.var("props",!0);let m=l.var("props",(0,$_._)`{}`);return u!==void 0&&CPe(l,m,u),m}t(zZe,"evaluatedPropsToName");Kl.evaluatedPropsToName=zZe;function CPe(l,u,m){Object.keys(m).forEach(b=>l.assign((0,$_._)`${u}${(0,$_.getProperty)(b)}`,!0))}t(CPe,"setEvaluated");Kl.setEvaluated=CPe;var BZe={};function TFt(l,u){return l.scopeValue("func",{ref:u,code:BZe[u.code]||(BZe[u.code]=new mFt._Code(u.code))})}t(TFt,"useFunc");Kl.useFunc=TFt;var TPe;(function(l){l[l.Num=0]="Num",l[l.Str=1]="Str"})(TPe||(Kl.Type=TPe={}));function kFt(l,u,m){if(l instanceof $_.Name){let b=u===TPe.Num;return m?b?(0,$_._)`"[" + ${l} + "]"`:(0,$_._)`"['" + ${l} + "']"`:b?(0,$_._)`"/" + ${l}`:(0,$_._)`"/" + ${l}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return m?(0,$_.getProperty)(l).toString():"/"+kPe(l)}t(kFt,"getErrorPath");Kl.getErrorPath=kFt;function VZe(l,u,m=l.opts.strictSchema){if(m){if(u=`strict mode: ${u}`,m===!0)throw new Error(u);l.self.logger.warn(u)}}t(VZe,"checkStrictMode");Kl.checkStrictMode=VZe});var uS=Pr(EPe=>{"use strict";Object.defineProperty(EPe,"__esModule",{value:!0});var Vy=ul(),CFt={data:new Vy.Name("data"),valCxt:new Vy.Name("valCxt"),instancePath:new Vy.Name("instancePath"),parentData:new Vy.Name("parentData"),parentDataProperty:new Vy.Name("parentDataProperty"),rootData:new Vy.Name("rootData"),dynamicAnchors:new Vy.Name("dynamicAnchors"),vErrors:new Vy.Name("vErrors"),errors:new Vy.Name("errors"),this:new Vy.Name("this"),self:new Vy.Name("self"),scope:new Vy.Name("scope"),json:new Vy.Name("json"),jsonPos:new Vy.Name("jsonPos"),jsonLen:new Vy.Name("jsonLen"),jsonPart:new Vy.Name("jsonPart")};EPe.default=CFt});var RU=Pr(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});Uy.extendErrors=Uy.resetErrorsCount=Uy.reportExtraError=Uy.reportError=Uy.keyword$DataError=Uy.keywordError=void 0;var zu=ul(),lce=_u(),G0=uS();Uy.keywordError={message:t(({keyword:l})=>(0,zu.str)`must pass "${l}" keyword validation`,"message")};Uy.keyword$DataError={message:t(({keyword:l,schemaType:u})=>u?(0,zu.str)`"${l}" keyword must be ${u} ($data)`:(0,zu.str)`"${l}" keyword is invalid ($data)`,"message")};function EFt(l,u=Uy.keywordError,m,b){let{it:k}=l,{gen:I,compositeRule:R,allErrors:Z}=k,ce=HZe(l,u,m);b??(R||Z)?UZe(I,ce):WZe(k,(0,zu._)`[${ce}]`)}t(EFt,"reportError");Uy.reportError=EFt;function PFt(l,u=Uy.keywordError,m){let{it:b}=l,{gen:k,compositeRule:I,allErrors:R}=b,Z=HZe(l,u,m);UZe(k,Z),I||R||WZe(b,G0.default.vErrors)}t(PFt,"reportExtraError");Uy.reportExtraError=PFt;function wFt(l,u){l.assign(G0.default.errors,u),l.if((0,zu._)`${G0.default.vErrors} !== null`,()=>l.if(u,()=>l.assign((0,zu._)`${G0.default.vErrors}.length`,u),()=>l.assign(G0.default.vErrors,null)))}t(wFt,"resetErrorsCount");Uy.resetErrorsCount=wFt;function AFt({gen:l,keyword:u,schemaValue:m,data:b,errsCount:k,it:I}){if(k===void 0)throw new Error("ajv implementation error");let R=l.name("err");l.forRange("i",k,G0.default.errors,Z=>{l.const(R,(0,zu._)`${G0.default.vErrors}[${Z}]`),l.if((0,zu._)`${R}.instancePath === undefined`,()=>l.assign((0,zu._)`${R}.instancePath`,(0,zu.strConcat)(G0.default.instancePath,I.errorPath))),l.assign((0,zu._)`${R}.schemaPath`,(0,zu.str)`${I.errSchemaPath}/${u}`),I.opts.verbose&&(l.assign((0,zu._)`${R}.schema`,m),l.assign((0,zu._)`${R}.data`,b))})}t(AFt,"extendErrors");Uy.extendErrors=AFt;function UZe(l,u){let m=l.const("err",u);l.if((0,zu._)`${G0.default.vErrors} === null`,()=>l.assign(G0.default.vErrors,(0,zu._)`[${m}]`),(0,zu._)`${G0.default.vErrors}.push(${m})`),l.code((0,zu._)`$