UNPKG

@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.48 MB
#!/usr/bin/env node "use strict";var XOt=Object.create;var Ioe=Object.defineProperty;var pGe=Object.getOwnPropertyDescriptor;var YOt=Object.getOwnPropertyNames;var KOt=Object.getPrototypeOf,e5t=Object.prototype.hasOwnProperty;var t=(l,u)=>Ioe(l,"name",{value:u,configurable:!0});var Pr=(l,u)=>()=>(u||l((u={exports:{}}).exports,u),u.exports);var t5t=(l,u,m,b)=>{if(u&&typeof u=="object"||typeof u=="function")for(let T of YOt(u))!e5t.call(l,T)&&T!==m&&Ioe(l,T,{get:()=>u[T],enumerable:!(b=pGe(u,T))||b.enumerable});return l};var Vd=(l,u,m)=>(m=l!=null?XOt(KOt(l)):{},t5t(u||!l||!l.__esModule?Ioe(m,"default",{value:l,enumerable:!0}):m,l));var Au=(l,u,m,b)=>{for(var T=b>1?void 0:b?pGe(u,m):u,I=l.length-1,L;I>=0;I--)(L=l[I])&&(T=(b?L(u,m,T):L(T))||T);return b&&T&&Ioe(u,m,T),T};var NQe=Pr(()=>{var IQe;(function(l){(function(u){var m=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:Q(),b=T(l);typeof m.Reflect<"u"&&(b=T(m.Reflect,b)),u(b,m),typeof m.Reflect>"u"&&(m.Reflect=l);function T(ae,ee){return function(pe,Te){Object.defineProperty(ae,pe,{configurable:!0,writable:!0,value:Te}),ee&&ee(pe,Te)}}t(T,"makeExporter");function I(){try{return Function("return this;")()}catch{}}t(I,"functionThis");function L(){try{return(0,eval)("(function() { return this; })()")}catch{}}t(L,"indirectEvalThis");function Q(){return I()||L()}t(Q,"sloppyModeThis")})(function(u,m){var b=Object.prototype.hasOwnProperty,T=typeof Symbol=="function",I=T&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",L=T&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",Q=typeof Object.create=="function",ae={__proto__:[]}instanceof Array,ee=!Q&&!ae,pe={create:Q?function(){return c3(Object.create(null))}:ae?function(){return c3({__proto__:null})}:function(){return c3({})},has:ee?function(Rt,ln){return b.call(Rt,ln)}:function(Rt,ln){return ln in Rt},get:ee?function(Rt,ln){return b.call(Rt,ln)?Rt[ln]:void 0}:function(Rt,ln){return Rt[ln]}},Te=Object.getPrototypeOf(Function),Ke=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:wR(),Pt=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:Dr(),rr=typeof WeakMap=="function"?WeakMap:dT(),or=T?Symbol.for("@reflect-metadata:registry"):void 0,Lt=z_(),Xt=ip(Lt);function Vt(Rt,ln,ci,Qs){if(bo(ci)){if(!ht(Rt))throw new TypeError;if(!Ki(ln))throw new TypeError;return xs(Rt,ln)}else{if(!ht(Rt))throw new TypeError;if(!Uf(ln))throw new TypeError;if(!Uf(Qs)&&!bo(Qs)&&!Ji(Qs))throw new TypeError;return Ji(Qs)&&(Qs=void 0),ci=ru(ci),Fs(Rt,ln,ci,Qs)}}t(Vt,"decorate"),u("decorate",Vt);function Ti(Rt,ln){function ci(Qs,no){if(!Uf(Qs))throw new TypeError;if(!bo(no)&&!_6(no))throw new TypeError;Es(Rt,ln,Qs,no)}return t(ci,"decorator"),ci}t(Ti,"metadata"),u("metadata",Ti);function zn(Rt,ln,ci,Qs){if(!Uf(ci))throw new TypeError;return bo(Qs)||(Qs=ru(Qs)),Es(Rt,ln,ci,Qs)}t(zn,"defineMetadata"),u("defineMetadata",zn);function _i(Rt,ln,ci){if(!Uf(ln))throw new TypeError;return bo(ci)||(ci=ru(ci)),Ht(Rt,ln,ci)}t(_i,"hasMetadata"),u("hasMetadata",_i);function vo(Rt,ln,ci){if(!Uf(ln))throw new TypeError;return bo(ci)||(ci=ru(ci)),Tc(Rt,ln,ci)}t(vo,"hasOwnMetadata"),u("hasOwnMetadata",vo);function Vn(Rt,ln,ci){if(!Uf(ln))throw new TypeError;return bo(ci)||(ci=ru(ci)),wa(Rt,ln,ci)}t(Vn,"getMetadata"),u("getMetadata",Vn);function ql(Rt,ln,ci){if(!Uf(ln))throw new TypeError;return bo(ci)||(ci=ru(ci)),Eo(Rt,ln,ci)}t(ql,"getOwnMetadata"),u("getOwnMetadata",ql);function zl(Rt,ln){if(!Uf(Rt))throw new TypeError;return bo(ln)||(ln=ru(ln)),Dh(Rt,ln)}t(zl,"getMetadataKeys"),u("getMetadataKeys",zl);function ia(Rt,ln){if(!Uf(Rt))throw new TypeError;return bo(ln)||(ln=ru(ln)),yf(Rt,ln)}t(ia,"getOwnMetadataKeys"),u("getOwnMetadataKeys",ia);function lr(Rt,ln,ci){if(!Uf(ln))throw new TypeError;if(bo(ci)||(ci=ru(ci)),!Uf(ln))throw new TypeError;bo(ci)||(ci=ru(ci));var Qs=Fb(ln,ci,!1);return bo(Qs)?!1:Qs.OrdinaryDeleteMetadata(Rt,ln,ci)}t(lr,"deleteMetadata"),u("deleteMetadata",lr);function xs(Rt,ln){for(var ci=Rt.length-1;ci>=0;--ci){var Qs=Rt[ci],no=Qs(ln);if(!bo(no)&&!Ji(no)){if(!Ki(no))throw new TypeError;ln=no}}return ln}t(xs,"DecorateConstructor");function Fs(Rt,ln,ci,Qs){for(var no=Rt.length-1;no>=0;--no){var V_=Rt[no],Nu=V_(ln,ci,Qs);if(!bo(Nu)&&!Ji(Nu)){if(!Uf(Nu))throw new TypeError;Qs=Nu}}return Qs}t(Fs,"DecorateProperty");function Ht(Rt,ln,ci){var Qs=Tc(Rt,ln,ci);if(Qs)return!0;var no=Hs(ln);return Ji(no)?!1:Ht(Rt,no,ci)}t(Ht,"OrdinaryHasMetadata");function Tc(Rt,ln,ci){var Qs=Fb(ln,ci,!1);return bo(Qs)?!1:Wf(Qs.OrdinaryHasOwnMetadata(Rt,ln,ci))}t(Tc,"OrdinaryHasOwnMetadata");function wa(Rt,ln,ci){var Qs=Tc(Rt,ln,ci);if(Qs)return Eo(Rt,ln,ci);var no=Hs(ln);if(!Ji(no))return wa(Rt,no,ci)}t(wa,"OrdinaryGetMetadata");function Eo(Rt,ln,ci){var Qs=Fb(ln,ci,!1);if(!bo(Qs))return Qs.OrdinaryGetOwnMetadata(Rt,ln,ci)}t(Eo,"OrdinaryGetOwnMetadata");function Es(Rt,ln,ci,Qs){var no=Fb(ci,Qs,!0);no.OrdinaryDefineOwnMetadata(Rt,ln,ci,Qs)}t(Es,"OrdinaryDefineOwnMetadata");function Dh(Rt,ln){var ci=yf(Rt,ln),Qs=Hs(Rt);if(Qs===null)return ci;var no=Dh(Qs,ln);if(no.length<=0)return ci;if(ci.length<=0)return no;for(var V_=new Pt,Nu=[],_l=0,es=ci;_l<es.length;_l++){var Aa=es[_l],yi=V_.has(Aa);yi||(V_.add(Aa),Nu.push(Aa))}for(var io=0,Ys=no;io<Ys.length;io++){var Aa=Ys[io],yi=V_.has(Aa);yi||(V_.add(Aa),Nu.push(Aa))}return Nu}t(Dh,"OrdinaryMetadataKeys");function yf(Rt,ln){var ci=Fb(Rt,ln,!1);return ci?ci.OrdinaryOwnMetadataKeys(Rt,ln):[]}t(yf,"OrdinaryOwnMetadataKeys");function cy(Rt){if(Rt===null)return 1;switch(typeof Rt){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return Rt===null?1:6;default:return 6}}t(cy,"Type");function bo(Rt){return Rt===void 0}t(bo,"IsUndefined");function Ji(Rt){return Rt===null}t(Ji,"IsNull");function Io(Rt){return typeof Rt=="symbol"}t(Io,"IsSymbol");function Uf(Rt){return typeof Rt=="object"?Rt!==null:typeof Rt=="function"}t(Uf,"IsObject");function To(Rt,ln){switch(cy(Rt)){case 0:return Rt;case 1:return Rt;case 2:return Rt;case 3:return Rt;case 4:return Rt;case 5:return Rt}var ci=ln===3?"string":ln===5?"number":"default",Qs=bn(Rt,I);if(Qs!==void 0){var no=Qs.call(Rt,ci);if(Uf(no))throw new TypeError;return no}return Il(Rt,ci==="default"?"number":ci)}t(To,"ToPrimitive");function Il(Rt,ln){if(ln==="string"){var ci=Rt.toString;if(Xp(ci)){var Qs=ci.call(Rt);if(!Uf(Qs))return Qs}var no=Rt.valueOf;if(Xp(no)){var Qs=no.call(Rt);if(!Uf(Qs))return Qs}}else{var no=Rt.valueOf;if(Xp(no)){var Qs=no.call(Rt);if(!Uf(Qs))return Qs}var V_=Rt.toString;if(Xp(V_)){var Qs=V_.call(Rt);if(!Uf(Qs))return Qs}}throw new TypeError}t(Il,"OrdinaryToPrimitive");function Wf(Rt){return!!Rt}t(Wf,"ToBoolean");function fl(Rt){return""+Rt}t(fl,"ToString");function ru(Rt){var ln=To(Rt,3);return Io(ln)?ln:fl(ln)}t(ru,"ToPropertyKey");function ht(Rt){return Array.isArray?Array.isArray(Rt):Rt instanceof Object?Rt instanceof Array:Object.prototype.toString.call(Rt)==="[object Array]"}t(ht,"IsArray");function Xp(Rt){return typeof Rt=="function"}t(Xp,"IsCallable");function Ki(Rt){return typeof Rt=="function"}t(Ki,"IsConstructor");function _6(Rt){switch(cy(Rt)){case 3:return!0;case 4:return!0;default:return!1}}t(_6,"IsPropertyKey");function Nr(Rt,ln){return Rt===ln||Rt!==Rt&&ln!==ln}t(Nr,"SameValueZero");function bn(Rt,ln){var ci=Rt[ln];if(ci!=null){if(!Xp(ci))throw new TypeError;return ci}}t(bn,"GetMethod");function Ws(Rt){var ln=bn(Rt,L);if(!Xp(ln))throw new TypeError;var ci=ln.call(Rt);if(!Uf(ci))throw new TypeError;return ci}t(Ws,"GetIterator");function oi(Rt){return Rt.value}t(oi,"IteratorValue");function dn(Rt){var ln=Rt.next();return ln.done?!1:ln}t(dn,"IteratorStep");function Ba(Rt){var ln=Rt.return;ln&&ln.call(Rt)}t(Ba,"IteratorClose");function Hs(Rt){var ln=Object.getPrototypeOf(Rt);if(typeof Rt!="function"||Rt===Te||ln!==Te)return ln;var ci=Rt.prototype,Qs=ci&&Object.getPrototypeOf(ci);if(Qs==null||Qs===Object.prototype)return ln;var no=Qs.constructor;return typeof no!="function"||no===Rt?ln:no}t(Hs,"OrdinaryGetPrototypeOf");function Ga(){var Rt;!bo(or)&&typeof m.Reflect<"u"&&!(or in m.Reflect)&&typeof m.Reflect.defineMetadata=="function"&&(Rt=Qd(m.Reflect));var ln,ci,Qs,no=new rr,V_={registerProvider:Nu,getProvider:es,setProvider:yi};return V_;function Nu(io){if(!Object.isExtensible(V_))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case Rt===io:break;case bo(ln):ln=io;break;case ln===io:break;case bo(ci):ci=io;break;case ci===io:break;default:Qs===void 0&&(Qs=new Pt),Qs.add(io);break}}function _l(io,Ys){if(!bo(ln)){if(ln.isProviderFor(io,Ys))return ln;if(!bo(ci)){if(ci.isProviderFor(io,Ys))return ln;if(!bo(Qs))for(var Bs=Ws(Qs);;){var Nl=dn(Bs);if(!Nl)return;var ly=oi(Nl);if(ly.isProviderFor(io,Ys))return Ba(Bs),ly}}}if(!bo(Rt)&&Rt.isProviderFor(io,Ys))return Rt}function es(io,Ys){var Bs=no.get(io),Nl;return bo(Bs)||(Nl=Bs.get(Ys)),bo(Nl)&&(Nl=_l(io,Ys),bo(Nl)||(bo(Bs)&&(Bs=new Ke,no.set(io,Bs)),Bs.set(Ys,Nl))),Nl}function Aa(io){if(bo(io))throw new TypeError;return ln===io||ci===io||!bo(Qs)&&Qs.has(io)}function yi(io,Ys,Bs){if(!Aa(Bs))throw new Error("Metadata provider not registered.");var Nl=es(io,Ys);if(Nl!==Bs){if(!bo(Nl))return!1;var ly=no.get(io);bo(ly)&&(ly=new Ke,no.set(io,ly)),ly.set(Ys,Bs)}return!0}}t(Ga,"CreateMetadataRegistry");function z_(){var Rt;return!bo(or)&&Uf(m.Reflect)&&Object.isExtensible(m.Reflect)&&(Rt=m.Reflect[or]),bo(Rt)&&(Rt=Ga()),!bo(or)&&Uf(m.Reflect)&&Object.isExtensible(m.Reflect)&&Object.defineProperty(m.Reflect,or,{enumerable:!1,configurable:!1,writable:!1,value:Rt}),Rt}t(z_,"GetOrCreateMetadataRegistry");function ip(Rt){var ln=new rr,ci={isProviderFor:t(function(Aa,yi){var io=ln.get(Aa);return bo(io)?!1:io.has(yi)},"isProviderFor"),OrdinaryDefineOwnMetadata:Nu,OrdinaryHasOwnMetadata:no,OrdinaryGetOwnMetadata:V_,OrdinaryOwnMetadataKeys:_l,OrdinaryDeleteMetadata:es};return Lt.registerProvider(ci),ci;function Qs(Aa,yi,io){var Ys=ln.get(Aa),Bs=!1;if(bo(Ys)){if(!io)return;Ys=new Ke,ln.set(Aa,Ys),Bs=!0}var Nl=Ys.get(yi);if(bo(Nl)){if(!io)return;if(Nl=new Ke,Ys.set(yi,Nl),!Rt.setProvider(Aa,yi,ci))throw Ys.delete(yi),Bs&&ln.delete(Aa),new Error("Wrong provider for target.")}return Nl}t(Qs,"GetOrCreateMetadataMap");function no(Aa,yi,io){var Ys=Qs(yi,io,!1);return bo(Ys)?!1:Wf(Ys.has(Aa))}t(no,"OrdinaryHasOwnMetadata");function V_(Aa,yi,io){var Ys=Qs(yi,io,!1);if(!bo(Ys))return Ys.get(Aa)}t(V_,"OrdinaryGetOwnMetadata");function Nu(Aa,yi,io,Ys){var Bs=Qs(io,Ys,!0);Bs.set(Aa,yi)}t(Nu,"OrdinaryDefineOwnMetadata");function _l(Aa,yi){var io=[],Ys=Qs(Aa,yi,!1);if(bo(Ys))return io;for(var Bs=Ys.keys(),Nl=Ws(Bs),ly=0;;){var xm=dn(Nl);if(!xm)return io.length=ly,io;var L8=oi(xm);try{io[ly]=L8}catch(uy){try{Ba(Nl)}finally{throw uy}}ly++}}t(_l,"OrdinaryOwnMetadataKeys");function es(Aa,yi,io){var Ys=Qs(yi,io,!1);if(bo(Ys)||!Ys.delete(Aa))return!1;if(Ys.size===0){var Bs=ln.get(yi);bo(Bs)||(Bs.delete(io),Bs.size===0&&ln.delete(Bs))}return!0}t(es,"OrdinaryDeleteMetadata")}t(ip,"CreateMetadataProvider");function Qd(Rt){var ln=Rt.defineMetadata,ci=Rt.hasOwnMetadata,Qs=Rt.getOwnMetadata,no=Rt.getOwnMetadataKeys,V_=Rt.deleteMetadata,Nu=new rr,_l={isProviderFor:t(function(es,Aa){var yi=Nu.get(es);return!bo(yi)&&yi.has(Aa)?!0:no(es,Aa).length?(bo(yi)&&(yi=new Pt,Nu.set(es,yi)),yi.add(Aa),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:ln,OrdinaryHasOwnMetadata:ci,OrdinaryGetOwnMetadata:Qs,OrdinaryOwnMetadataKeys:no,OrdinaryDeleteMetadata:V_};return _l}t(Qd,"CreateFallbackProvider");function Fb(Rt,ln,ci){var Qs=Lt.getProvider(Rt,ln);if(!bo(Qs))return Qs;if(ci){if(Lt.setProvider(Rt,ln,Xt))return Xt;throw new Error("Illegal state.")}}t(Fb,"GetMetadataProvider");function wR(){var Rt={},ln=[],ci=function(){function _l(es,Aa,yi){this._index=0,this._keys=es,this._values=Aa,this._selector=yi}return t(_l,"MapIterator"),_l.prototype["@@iterator"]=function(){return this},_l.prototype[L]=function(){return this},_l.prototype.next=function(){var es=this._index;if(es>=0&&es<this._keys.length){var Aa=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:Aa,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}(),Qs=function(){function _l(){this._keys=[],this._values=[],this._cacheKey=Rt,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 Aa=this._find(es,!1);return Aa>=0?this._values[Aa]:void 0},_l.prototype.set=function(es,Aa){var yi=this._find(es,!0);return this._values[yi]=Aa,this},_l.prototype.delete=function(es){var Aa=this._find(es,!1);if(Aa>=0){for(var yi=this._keys.length,io=Aa+1;io<yi;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=Rt,this._cacheIndex=-2),!0}return!1},_l.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=Rt,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,V_)},_l.prototype.entries=function(){return new ci(this._keys,this._values,Nu)},_l.prototype["@@iterator"]=function(){return this.entries()},_l.prototype[L]=function(){return this.entries()},_l.prototype._find=function(es,Aa){if(!Nr(this._cacheKey,es)){this._cacheIndex=-1;for(var yi=0;yi<this._keys.length;yi++)if(Nr(this._keys[yi],es)){this._cacheIndex=yi;break}}return this._cacheIndex<0&&Aa&&(this._cacheIndex=this._keys.length,this._keys.push(es),this._values.push(void 0)),this._cacheIndex},_l}();return Qs;function no(_l,es){return _l}function V_(_l,es){return es}function Nu(_l,es){return[_l,es]}}t(wR,"CreateMapPolyfill");function Dr(){var Rt=function(){function ln(){this._map=new Ke}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[L]=function(){return this.keys()},ln}();return Rt}t(Dr,"CreateSetPolyfill");function dT(){var Rt=16,ln=pe.create(),ci=Qs();return function(){function es(){this._key=Qs()}return t(es,"WeakMap"),es.prototype.has=function(Aa){var yi=no(Aa,!1);return yi!==void 0?pe.has(yi,this._key):!1},es.prototype.get=function(Aa){var yi=no(Aa,!1);return yi!==void 0?pe.get(yi,this._key):void 0},es.prototype.set=function(Aa,yi){var io=no(Aa,!0);return io[this._key]=yi,this},es.prototype.delete=function(Aa){var yi=no(Aa,!1);return yi!==void 0?delete yi[this._key]:!1},es.prototype.clear=function(){this._key=Qs()},es}();function Qs(){var es;do es="@@WeakMap@@"+_l();while(pe.has(ln,es));return ln[es]=!0,es}function no(es,Aa){if(!b.call(es,ci)){if(!Aa)return;Object.defineProperty(es,ci,{value:pe.create()})}return es[ci]}function V_(es,Aa){for(var yi=0;yi<Aa;++yi)es[yi]=Math.random()*255|0;return es}function Nu(es){if(typeof Uint8Array=="function"){var Aa=new Uint8Array(es);return typeof crypto<"u"?crypto.getRandomValues(Aa):typeof msCrypto<"u"?msCrypto.getRandomValues(Aa):V_(Aa,es),Aa}return V_(new Array(es),es)}function _l(){var es=Nu(Rt);es[6]=es[6]&79|64,es[8]=es[8]&191|128;for(var Aa="",yi=0;yi<Rt;++yi){var io=es[yi];(yi===4||yi===6||yi===8)&&(Aa+="-"),io<16&&(Aa+="0"),Aa+=io.toString(16).toLowerCase()}return Aa}}t(dT,"CreateWeakMapPolyfill");function c3(Rt){return Rt.__=void 0,delete Rt.__,Rt}t(c3,"MakeDictionary")})})(IQe||(IQe={}))});var Ab=Pr((wb,MQe)=>{"use strict";var sce=/^win/.test(process.platform),U5t=/\//g,W5t=/^(\w{2,}):\/\//i,FQe=MQe.exports,H5t=/~1/g,G5t=/~0/g,MEe=[/\?/g,"%3F",/\#/g,"%23"],REe=[/\%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=W5t.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=FQe.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=FQe.getProtocol(u);return m===void 0||m==="file"},"isFileSystemPath");wb.fromFileSystemPath=t(function(u){sce&&(u=u.replace(/\\/g,"/")),u=encodeURI(u);for(let m=0;m<MEe.length;m+=2)u=u.replace(MEe[m],MEe[m+1]);return u},"fromFileSystemPath");wb.toFileSystemPath=t(function(u,m){u=decodeURI(u);for(let T=0;T<REe.length;T+=2)u=u.replace(REe[T],REe[T+1]);let b=u.substr(0,7).toLowerCase()==="file://";return b&&(u=u[7]==="/"?u.substr(8):u.substr(7),sce&&u[1]==="/"&&(u=u[0]+":"+u.substr(1)),m?u="file:///"+u:(b=!1,u=sce?u:"/"+u)),sce&&!b&&(u=u.replace(U5t,"\\"),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(H5t,"/").replace(G5t,"~"))},"safePointerToPath")});var ace=Pr(RU=>{"use strict";var RQe=require("util"),Q5t=Ab();RU.format=RQe.format;RU.inherits=RQe.inherits;RU.swaggerParamRegExp=/\{([^/}]+)}/g;var Z5t=["get","post","put","delete","patch","options","head","trace"];function LEe(l,u){if(l.url&&l.url.startsWith("/")){let m=Q5t.parse(u),b=m.protocol+"//"+m.hostname+l.url;return l.url=b,l}}t(LEe,"fixServers");function X5t(l,u){l.openapi&&u&&(u.startsWith("http:")||u.startsWith("https:"))&&(l.servers&&l.servers.map(m=>LEe(m,u)),["paths","webhooks"].forEach(m=>{Object.keys(l[m]||[]).forEach(b=>{let T=l[m][b];Object.keys(T).forEach(I=>{I==="servers"?T[I].map(L=>LEe(L,u)):Z5t.includes(I)&&T[I].servers&&T[I].servers.map(L=>LEe(L,u))})})}))}t(X5t,"fixOasRelativeServers");RU.fixOasRelativeServers=X5t});var oce=Pr(SM=>{"use strict";Object.defineProperty(SM,"__esModule",{value:!0});SM.getDeepKeys=SM.toJSON=void 0;var Y5t=["function","symbol","undefined"],K5t=["constructor","prototype","__proto__"],eFt=Object.getPrototypeOf({});function tFt(){let l={},u=this;for(let m of LQe(u))if(typeof m=="string"){let b=u[m],T=typeof b;Y5t.includes(T)||(l[m]=b)}return l}t(tFt,"toJSON");SM.toJSON=tFt;function LQe(l,u=[]){let m=[];for(;l&&l!==eFt;)m=m.concat(Object.getOwnPropertyNames(l),Object.getOwnPropertySymbols(l)),l=Object.getPrototypeOf(l);let b=new Set(m);for(let T of u.concat(K5t))b.delete(T);return b}t(LQe,"getDeepKeys");SM.getDeepKeys=LQe});var jEe=Pr(xM=>{"use strict";Object.defineProperty(xM,"__esModule",{value:!0});xM.addInspectMethod=xM.format=void 0;var jQe=require("util"),rFt=oce(),BQe=jQe.inspect.custom||Symbol.for("nodejs.util.inspect.custom");xM.format=jQe.format;function nFt(l){l[BQe]=iFt}t(nFt,"addInspectMethod");xM.addInspectMethod=nFt;function iFt(){let l={},u=this;for(let m of rFt.getDeepKeys(u)){let b=u[m];l[m]=b}return delete l[BQe],l}t(iFt,"inspect")});var qQe=Pr(bC=>{"use strict";Object.defineProperty(bC,"__esModule",{value:!0});bC.lazyJoinStacks=bC.joinStacks=bC.isWritableStack=bC.isLazyStack=void 0;var sFt=/\r?\n/,aFt=/\bono[ @]/;function oFt(l){return!!(l&&l.configurable&&typeof l.get=="function")}t(oFt,"isLazyStack");bC.isLazyStack=oFt;function cFt(l){return!!(!l||l.writable||typeof l.set=="function")}t(cFt,"isWritableStack");bC.isWritableStack=cFt;function $Qe(l,u){let m=JQe(l.stack),b=u?u.stack:void 0;return m&&b?m+` `+b:m||b}t($Qe,"joinStacks");bC.joinStacks=$Qe;function lFt(l,u,m){m?Object.defineProperty(u,"stack",{get:t(()=>{let b=l.get.apply(u);return $Qe({stack:b},m)},"get"),enumerable:!1,configurable:!0}):uFt(u,l)}t(lFt,"lazyJoinStacks");bC.lazyJoinStacks=lFt;function JQe(l){if(l){let u=l.split(sFt),m;for(let b=0;b<u.length;b++){let T=u[b];if(aFt.test(T))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(JQe,"popStack");function uFt(l,u){Object.defineProperty(l,"stack",{get:t(()=>JQe(u.get.apply(l)),"get"),enumerable:!1,configurable:!0})}t(uFt,"lazyPopStack")});var UQe=Pr(lce=>{"use strict";Object.defineProperty(lce,"__esModule",{value:!0});lce.extendError=void 0;var zQe=jEe(),cce=qQe(),VQe=oce(),fFt=["name","message","stack"];function _Ft(l,u,m){let b=l;return pFt(b,u),u&&typeof u=="object"&&dFt(b,u),b.toJSON=VQe.toJSON,zQe.addInspectMethod&&zQe.addInspectMethod(b),m&&typeof m=="object"&&Object.assign(b,m),b}t(_Ft,"extendError");lce.extendError=_Ft;function pFt(l,u){let m=Object.getOwnPropertyDescriptor(l,"stack");cce.isLazyStack(m)?cce.lazyJoinStacks(m,l,u):cce.isWritableStack(m)&&(l.stack=cce.joinStacks(l,u))}t(pFt,"extendStack");function dFt(l,u){let m=VQe.getDeepKeys(u,fFt),b=l,T=u;for(let I of m)if(b[I]===void 0)try{b[I]=T[I]}catch{}}t(dFt,"mergeErrors")});var WQe=Pr(TM=>{"use strict";Object.defineProperty(TM,"__esModule",{value:!0});TM.normalizeArgs=TM.normalizeOptions=void 0;var mFt=jEe();function hFt(l){return l=l||{},{concatMessages:l.concatMessages===void 0?!0:!!l.concatMessages,format:l.format===void 0?mFt.format:typeof l.format=="function"?l.format:!1}}t(hFt,"normalizeOptions");TM.normalizeOptions=hFt;function gFt(l,u){let m,b,T,I="";return typeof l[0]=="string"?T=l:typeof l[1]=="string"?(l[0]instanceof Error?m=l[0]:b=l[0],T=l.slice(1)):(m=l[0],b=l[1],T=l.slice(2)),T.length>0&&(u.format?I=u.format.apply(void 0,T):I=T.join(" ")),u.concatMessages&&m&&m.message&&(I+=(I?` `:"")+m.message),{originalError:m,props:b,message:I}}t(gFt,"normalizeArgs");TM.normalizeArgs=gFt});var $Ee=Pr(fce=>{"use strict";Object.defineProperty(fce,"__esModule",{value:!0});fce.Ono=void 0;var uce=UQe(),HQe=WQe(),yFt=oce(),vFt=BEe;fce.Ono=vFt;function BEe(l,u){u=HQe.normalizeOptions(u);function m(...b){let{originalError:T,props:I,message:L}=HQe.normalizeArgs(b,u),Q=new l(L);return uce.extendError(Q,T,I)}return t(m,"ono"),m[Symbol.species]=l,m}t(BEe,"Ono");BEe.toJSON=t(function(u){return yFt.toJSON.call(u)},"toJSON");BEe.extend=t(function(u,m,b){return b||m instanceof Error?uce.extendError(u,m,b):m?uce.extendError(u,void 0,m):uce.extendError(u)},"extend")});var GQe=Pr(_ce=>{"use strict";Object.defineProperty(_ce,"__esModule",{value:!0});_ce.ono=void 0;var GN=$Ee(),bFt=SC;_ce.ono=bFt;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 SFt=SC;function SC(...l){let u=l[0];if(typeof u=="object"&&typeof u.name=="string"){for(let m of Object.values(SFt))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 ZQe=Pr(QQe=>{"use strict";Object.defineProperty(QQe,"__esModule",{value:!0});var EYt=require("util")});var eT=Pr((Kx,kM)=>{"use strict";var xFt=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]}),TFt=Kx&&Kx.__exportStar||function(l,u){for(var m in l)m!=="default"&&!u.hasOwnProperty(m)&&xFt(u,l,m)};Object.defineProperty(Kx,"__esModule",{value:!0});Kx.ono=void 0;var XQe=GQe();Object.defineProperty(Kx,"ono",{enumerable:!0,get:t(function(){return XQe.ono},"get")});var kFt=$Ee();Object.defineProperty(Kx,"Ono",{enumerable:!0,get:t(function(){return kFt.Ono},"get")});TFt(ZQe(),Kx);Kx.default=XQe.ono;typeof kM=="object"&&typeof kM.exports=="object"&&(kM.exports=Object.assign(kM.exports.default,kM.exports))});var BU=Pr(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.regexpCode=tf.getEsmExportName=tf.getProperty=tf.safeStringify=tf.stringify=tf.strConcat=tf.addCodeArg=tf.str=tf._=tf.nil=tf._Code=tf.Name=tf.IDENTIFIER=tf._CodeOrName=void 0;var zEe=class zEe{};t(zEe,"_CodeOrName");var LU=zEe;tf._CodeOrName=LU;tf.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var VEe=class VEe extends LU{constructor(u){if(super(),!tf.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(VEe,"Name");var QN=VEe;tf.Name=QN;var UEe=class UEe extends LU{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 QN&&(m[b.str]=(m[b.str]||0)+1),m),{})}};t(UEe,"_Code");var cS=UEe;tf._Code=cS;tf.nil=new cS("");function YQe(l,...u){let m=[l[0]],b=0;for(;b<u.length;)qEe(m,u[b]),m.push(l[++b]);return new cS(m)}t(YQe,"_");tf._=YQe;var JEe=new cS("+");function KQe(l,...u){let m=[jU(l[0])],b=0;for(;b<u.length;)m.push(JEe),qEe(m,u[b]),m.push(JEe,jU(l[++b]));return CFt(m),new cS(m)}t(KQe,"str");tf.str=KQe;function qEe(l,u){u instanceof cS?l.push(...u._items):u instanceof QN?l.push(u):l.push(wFt(u))}t(qEe,"addCodeArg");tf.addCodeArg=qEe;function CFt(l){let u=1;for(;u<l.length-1;){if(l[u]===JEe){let m=EFt(l[u-1],l[u+1]);if(m!==void 0){l.splice(u-1,3,m);continue}l[u++]="+"}u++}}t(CFt,"optimize");function EFt(l,u){if(u==='""')return l;if(l==='""')return u;if(typeof l=="string")return u instanceof QN||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 QN))return`"${l}${u.slice(1)}`}t(EFt,"mergeExprItems");function PFt(l,u){return u.emptyStr()?l:l.emptyStr()?u:KQe`${l}${u}`}t(PFt,"strConcat");tf.strConcat=PFt;function wFt(l){return typeof l=="number"||typeof l=="boolean"||l===null?l:jU(Array.isArray(l)?l.join(","):l)}t(wFt,"interpolate");function AFt(l){return new cS(jU(l))}t(AFt,"stringify");tf.stringify=AFt;function jU(l){return JSON.stringify(l).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t(jU,"safeStringify");tf.safeStringify=jU;function DFt(l){return typeof l=="string"&&tf.IDENTIFIER.test(l)?new cS(`.${l}`):YQe`[${l}]`}t(DFt,"getProperty");tf.getProperty=DFt;function IFt(l){if(typeof l=="string"&&tf.IDENTIFIER.test(l))return new cS(`${l}`);throw new Error(`CodeGen: invalid export name: ${l}, use explicit $id name mapping`)}t(IFt,"getEsmExportName");tf.getEsmExportName=IFt;function NFt(l){return new cS(l.toString())}t(NFt,"regexpCode");tf.regexpCode=NFt});var YEe=Pr(G1=>{"use strict";Object.defineProperty(G1,"__esModule",{value:!0});G1.ValueScope=G1.ValueScopeName=G1.Scope=G1.varKinds=G1.UsedValueState=void 0;var H1=BU(),GEe=class GEe extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}};t(GEe,"ValueError");var WEe=GEe,pce;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(pce||(G1.UsedValueState=pce={}));G1.varKinds={const:new H1.Name("const"),let:new H1.Name("let"),var:new H1.Name("var")};var QEe=class QEe{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(QEe,"Scope");var dce=QEe;G1.Scope=dce;var ZEe=class ZEe 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(ZEe,"ValueScopeName");var mce=ZEe;G1.ValueScopeName=mce;var OFt=(0,H1._)`\n`,XEe=class XEe extends dce{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?OFt:H1.nil}}get(){return this._scope}name(u){return new mce(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 T=this.toName(u),{prefix:I}=T,L=(b=m.key)!==null&&b!==void 0?b:m.ref,Q=this._values[I];if(Q){let pe=Q.get(L);if(pe)return pe}else Q=this._values[I]=new Map;Q.set(L,T);let ae=this._scope[I]||(this._scope[I]=[]),ee=ae.length;return ae[ee]=m.ref,T.setValue(m,{property:I,itemIndex:ee}),T}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,T=>{if(T.value===void 0)throw new Error(`CodeGen: name "${T}" has no value`);return T.value.code},m,b)}_reduceValues(u,m,b={},T){let I=H1.nil;for(let L in u){let Q=u[L];if(!Q)continue;let ae=b[L]=b[L]||new Map;Q.forEach(ee=>{if(ae.has(ee))return;ae.set(ee,pce.Started);let pe=m(ee);if(pe){let Te=this.opts.es5?G1.varKinds.var:G1.varKinds.const;I=(0,H1._)`${I}${Te} ${ee} = ${pe};${this.opts._n}`}else if(pe=T==null?void 0:T(ee))I=(0,H1._)`${I}${pe}${this.opts._n}`;else throw new WEe(ee);ae.set(ee,pce.Completed)})}return I}};t(XEe,"ValueScope");var HEe=XEe;G1.ValueScope=HEe});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 Iu=BU(),tT=YEe(),PA=BU();Object.defineProperty(Jl,"_",{enumerable:!0,get:t(function(){return PA._},"get")});Object.defineProperty(Jl,"str",{enumerable:!0,get:t(function(){return PA.str},"get")});Object.defineProperty(Jl,"strConcat",{enumerable:!0,get:t(function(){return PA.strConcat},"get")});Object.defineProperty(Jl,"nil",{enumerable:!0,get:t(function(){return PA.nil},"get")});Object.defineProperty(Jl,"getProperty",{enumerable:!0,get:t(function(){return PA.getProperty},"get")});Object.defineProperty(Jl,"stringify",{enumerable:!0,get:t(function(){return PA.stringify},"get")});Object.defineProperty(Jl,"regexpCode",{enumerable:!0,get:t(function(){return PA.regexpCode},"get")});Object.defineProperty(Jl,"Name",{enumerable:!0,get:t(function(){return PA.Name},"get")});var vce=YEe();Object.defineProperty(Jl,"Scope",{enumerable:!0,get:t(function(){return vce.Scope},"get")});Object.defineProperty(Jl,"ValueScope",{enumerable:!0,get:t(function(){return vce.ValueScope},"get")});Object.defineProperty(Jl,"ValueScopeName",{enumerable:!0,get:t(function(){return vce.ValueScopeName},"get")});Object.defineProperty(Jl,"varKinds",{enumerable:!0,get:t(function(){return vce.varKinds},"get")});Jl.operators={GT:new Iu._Code(">"),GTE:new Iu._Code(">="),LT:new Iu._Code("<"),LTE:new Iu._Code("<="),EQ:new Iu._Code("==="),NEQ:new Iu._Code("!=="),NOT:new Iu._Code("!"),OR:new Iu._Code("||"),AND:new Iu._Code("&&"),ADD:new Iu._Code("+")};var fPe=class fPe{optimizeNodes(){return this}optimizeNames(u,m){return this}};t(fPe,"Node");var XP=fPe,_Pe=class _Pe extends XP{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,T=this.rhs===void 0?"":` = ${this.rhs}`;return`${b} ${this.name}${T};`+m}optimizeNames(u,m){if(u[this.name.str])return this.rhs&&(this.rhs=PM(this.rhs,u,m)),this}get names(){return this.rhs instanceof Iu._CodeOrName?this.rhs.names:{}}};t(_Pe,"Def");var KEe=_Pe,pPe=class pPe extends XP{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 Iu.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=PM(this.rhs,u,m),this}get names(){let u=this.lhs instanceof Iu.Name?{}:{...this.lhs.names};return yce(u,this.rhs)}};t(pPe,"Assign");var hce=pPe,dPe=class dPe extends hce{constructor(u,m,b,T){super(u,b,T),this.op=m}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}};t(dPe,"AssignOp");var ePe=dPe,mPe=class mPe extends XP{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}};t(mPe,"Label");var tPe=mPe,hPe=class hPe extends XP{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}};t(hPe,"Break");var rPe=hPe,gPe=class gPe extends XP{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}};t(gPe,"Throw");var nPe=gPe,yPe=class yPe extends XP{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=PM(this.code,u,m),this}get names(){return this.code instanceof Iu._CodeOrName?this.code.names:{}}};t(yPe,"AnyCode");var iPe=yPe,vPe=class vPe extends XP{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,T=b.length;for(;T--;){let I=b[T];I.optimizeNames(u,m)||(FFt(u,I.names),b.splice(T,1))}return b.length>0?this:void 0}get names(){return this.nodes.reduce((u,m)=>YN(u,m.names),{})}};t(vPe,"ParentNode");var $U=vPe,bPe=class bPe extends $U{render(u){return"{"+u._n+super.render(u)+"}"+u._n}};t(bPe,"BlockNode");var YP=bPe,SPe=class SPe extends $U{};t(SPe,"Root");var sPe=SPe,xPe=class xPe extends YP{};t(xPe,"Else");var EM=xPe;EM.kind="else";var CM=class CM extends YP{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 EM(b):b}if(m)return u===!1?m instanceof CM?m:m.nodes:this.nodes.length?this:new CM(eZe(u),m instanceof CM?[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=PM(this.condition,u,m),this}get names(){let u=super.names;return yce(u,this.condition),this.else&&YN(u,this.else.names),u}};t(CM,"If");var ZN=CM;ZN.kind="if";var TPe=class TPe extends YP{};t(TPe,"For");var XN=TPe;XN.kind="for";var kPe=class kPe extends XN{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=PM(this.iteration,u,m),this}get names(){return YN(super.names,this.iteration.names)}};t(kPe,"ForLoop");var aPe=kPe,CPe=class CPe extends XN{constructor(u,m,b,T){super(),this.varKind=u,this.name=m,this.from=b,this.to=T}render(u){let m=u.es5?tT.varKinds.var:this.varKind,{name:b,from:T,to:I}=this;return`for(${m} ${b}=${T}; ${b}<${I}; ${b}++)`+super.render(u)}get names(){let u=yce(super.names,this.from);return yce(u,this.to)}};t(CPe,"ForRange");var oPe=CPe,EPe=class EPe extends XN{constructor(u,m,b,T){super(),this.loop=u,this.varKind=m,this.name=b,this.iterable=T}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=PM(this.iterable,u,m),this}get names(){return YN(super.names,this.iterable.names)}};t(EPe,"ForIter");var gce=EPe,PPe=class PPe extends YP{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(PPe,"Func");var JU=PPe;JU.kind="func";var wPe=class wPe extends $U{render(u){return"return "+super.render(u)}};t(wPe,"Return");var qU=wPe;qU.kind="return";var APe=class APe extends YP{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,T;return super.optimizeNames(u,m),(b=this.catch)===null||b===void 0||b.optimizeNames(u,m),(T=this.finally)===null||T===void 0||T.optimizeNames(u,m),this}get names(){let u=super.names;return this.catch&&YN(u,this.catch.names),this.finally&&YN(u,this.finally.names),u}};t(APe,"Try");var cPe=APe,DPe=class DPe extends YP{constructor(u){super(),this.error=u}render(u){return`catch(${this.error})`+super.render(u)}};t(DPe,"Catch");var zU=DPe;zU.kind="catch";var IPe=class IPe extends YP{render(u){return"finally"+super.render(u)}};t(IPe,"Finally");var VU=IPe;VU.kind="finally";var NPe=class NPe{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 sPe]}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,T){let I=this._scope.toName(m);return b!==void 0&&T&&(this._constants[I.str]=b),this._leafNode(new KEe(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 hce(u,m,b))}add(u,m){return this._leafNode(new ePe(u,Jl.operators.ADD,m))}code(u){return typeof u=="function"?u():u!==Iu.nil&&this._leafNode(new iPe(u)),this}object(...u){let m=["{"];for(let[b,T]of u)m.length>1&&m.push(","),m.push(b),(b!==T||this.opts.es5)&&(m.push(":"),(0,Iu.addCodeArg)(m,T));return m.push("}"),new Iu._Code(m)}if(u,m,b){if(this._blockNode(new ZN(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 ZN(u))}else(){return this._elseNode(new EM)}endIf(){return this._endBlockNode(ZN,EM)}_for(u,m){return this._blockNode(u),m&&this.code(m).endFor(),this}for(u,m){return this._for(new aPe(u),m)}forRange(u,m,b,T,I=this.opts.es5?tT.varKinds.var:tT.varKinds.let){let L=this._scope.toName(u);return this._for(new oPe(I,L,m,b),()=>T(L))}forOf(u,m,b,T=tT.varKinds.const){let I=this._scope.toName(u);if(this.opts.es5){let L=m instanceof Iu.Name?m:this.var("_arr",m);return this.forRange("_i",0,(0,Iu._)`${L}.length`,Q=>{this.var(I,(0,Iu._)`${L}[${Q}]`),b(I)})}return this._for(new gce("of",T,I,m),()=>b(I))}forIn(u,m,b,T=this.opts.es5?tT.varKinds.var:tT.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,Iu._)`Object.keys(${m})`,b);let I=this._scope.toName(u);return this._for(new gce("in",T,I,m),()=>b(I))}endFor(){return this._endBlockNode(XN)}label(u){return this._leafNode(new tPe(u))}break(u){return this._leafNode(new rPe(u))}return(u){let m=new qU;if(this._blockNode(m),this.code(u),m.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(qU)}try(u,m,b){if(!m&&!b)throw new Error('CodeGen: "try" without "catch" and "finally"');let T=new cPe;if(this._blockNode(T),this.code(u),m){let I=this.name("e");this._currNode=T.catch=new zU(I),m(I)}return b&&(this._currNode=T.finally=new VU,this.code(b)),this._endBlockNode(zU,VU)}throw(u){return this._leafNode(new nPe(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=Iu.nil,b,T){return this._blockNode(new JU(u,m,b)),T&&this.code(T).endFunc(),this}endFunc(){return this._endBlockNode(JU)}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 ZN))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(NPe,"CodeGen");var lPe=NPe;Jl.CodeGen=lPe;function YN(l,u){for(let m in u)l[m]=(l[m]||0)+(u[m]||0);return l}t(YN,"addNames");function yce(l,u){return u instanceof Iu._CodeOrName?YN(l,u.names):l}t(yce,"addExprNames");function PM(l,u,m){if(l instanceof Iu.Name)return b(l);if(!T(l))return l;return new Iu._Code(l._items.reduce((I,L)=>(L instanceof Iu.Name&&(L=b(L)),L instanceof Iu._Code?I.push(...L._items):I.push(L),I),[]));function b(I){let L=m[I.str];return L===void 0||u[I.str]!==1?I:(delete u[I.str],L)}function T(I){return I instanceof Iu._Code&&I._items.some(L=>L instanceof Iu.Name&&u[L.str]===1&&m[L.str]!==void 0)}}t(PM,"optimizeExpr");function FFt(l,u){for(let m in u)l[m]=(l[m]||0)-(u[m]||0)}t(FFt,"subtractNames");function eZe(l){return typeof l=="boolean"||typeof l=="number"||l===null?!l:(0,Iu._)`!${uPe(l)}`}t(eZe,"not");Jl.not=eZe;var MFt=tZe(Jl.operators.AND);function RFt(...l){return l.reduce(MFt)}t(RFt,"and");Jl.and=RFt;var LFt=tZe(Jl.operators.OR);function jFt(...l){return l.reduce(LFt)}t(jFt,"or");Jl.or=jFt;function tZe(l){return(u,m)=>u===Iu.nil?m:m===Iu.nil?u:(0,Iu._)`${uPe(u)} ${l} ${uPe(m)}`}t(tZe,"mappend");function uPe(l){return l instanceof Iu.Name?l:(0,Iu._)`(${l})`}t(uPe,"par")});var pu=Pr(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.checkStrictMode=tu.getErrorPath=tu.Type=tu.useFunc=tu.setEvaluated=tu.evaluatedPropsToName=tu.mergeEvaluated=tu.eachItem=tu.unescapeJsonPointer=tu.escapeJsonPointer=tu.escapeFragment=tu.unescapeFragment=tu.schemaRefOrVal=tu.schemaHasRulesButRef=tu.schemaHasRules=tu.checkUnknownRules=tu.alwaysValidSchema=tu.toHash=void 0;var q_=ul(),BFt=BU();function $Ft(l){let u={};for(let m of l)u[m]=!0;return u}t($Ft,"toHash");tu.toHash=$Ft;function JFt(l,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(iZe(l,u),!sZe(u,l.self.RULES.all))}t(JFt,"alwaysValidSchema");tu.alwaysValidSchema=JFt;function iZe(l,u=l.schema){let{opts:m,self:b}=l;if(!m.strictSchema||typeof u=="boolean")return;let T=b.RULES.keywords;for(let I in u)T[I]||cZe(l,`unknown keyword: "${I}"`)}t(iZe,"checkUnknownRules");tu.checkUnknownRules=iZe;function sZe(l,u){if(typeof l=="boolean")return!l;for(let m in l)if(u[m])return!0;return!1}t(sZe,"schemaHasRules");tu.schemaHasRules=sZe;function qFt(l,u){if(typeof l=="boolean")return!l;for(let m in l)if(m!=="$ref"&&u.all[m])return!0;return!1}t(qFt,"schemaHasRulesButRef");tu.schemaHasRulesButRef=qFt;function zFt({topSchemaRef:l,schemaPath:u},m,b,T){if(!T){if(typeof m=="number"||typeof m=="boolean")return m;if(typeof m=="string")return(0,q_._)`${m}`}return(0,q_._)`${l}${u}${(0,q_.getProperty)(b)}`}t(zFt,"schemaRefOrVal");tu.schemaRefOrVal=zFt;function VFt(l){return aZe(decodeURIComponent(l))}t(VFt,"unescapeFragment");tu.unescapeFragment=VFt;function UFt(l){return encodeURIComponent(FPe(l))}t(UFt,"escapeFragment");tu.escapeFragment=UFt;function FPe(l){return typeof l=="number"?`${l}`:l.replace(/~/g,"~0").replace(/\//g,"~1")}t(FPe,"escapeJsonPointer");tu.escapeJsonPointer=FPe;function aZe(l){return l.replace(/~1/g,"/").replace(/~0/g,"~")}t(aZe,"unescapeJsonPointer");tu.unescapeJsonPointer=aZe;function WFt(l,u){if(Array.isArray(l))for(let m of l)u(m);else u(l)}t(WFt,"eachItem");tu.eachItem=WFt;function rZe({mergeNames:l,mergeToName:u,mergeValues:m,resultToName:b}){return(T,I,L,Q)=>{let ae=L===void 0?I:L instanceof q_.Name?(I instanceof q_.Name?l(T,I,L):u(T,I,L),L):I instanceof q_.Name?(u(T,L,I),I):m(I,L);return Q===q_.Name&&!(ae instanceof q_.Name)?b(T,ae):ae}}t(rZe,"makeMergeEvaluated");tu.mergeEvaluated={props:rZe({mergeNames:t((l,u,m)=>l.if((0,q_._)`${m} !== true && ${u} !== undefined`,()=>{l.if((0,q_._)`${u} === true`,()=>l.assign(m,!0),()=>l.assign(m,(0,q_._)`${m} || {}`).code((0,q_._)`Object.assign(${m}, ${u})`))}),"mergeNames"),mergeToName:t((l,u,m)=>l.if((0,q_._)`${m} !== true`,()=>{u===!0?l.assign(m,!0):(l.assign(m,(0,q_._)`${m} || {}`),MPe(l,m,u))}),"mergeToName"),mergeValues:t((l,u)=>l===!0?!0:{...l,...u},"mergeValues"),resultToName:oZe}),items:rZe({mergeNames:t((l,u,m)=>l.if((0,q_._)`${m} !== true && ${u} !== undefined`,()=>l.assign(m,(0,q_._)`${u} === true ? true : ${m} > ${u} ? ${m} : ${u}`)),"mergeNames"),mergeToName:t((l,u,m)=>l.if((0,q_._)`${m} !== true`,()=>l.assign(m,u===!0?!0:(0,q_._)`${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 oZe(l,u){if(u===!0)return l.var("props",!0);let m=l.var("props",(0,q_._)`{}`);return u!==void 0&&MPe(l,m,u),m}t(oZe,"evaluatedPropsToName");tu.evaluatedPropsToName=oZe;function MPe(l,u,m){Object.keys(m).forEach(b=>l.assign((0,q_._)`${u}${(0,q_.getProperty)(b)}`,!0))}t(MPe,"setEvaluated");tu.setEvaluated=MPe;var nZe={};function HFt(l,u){return l.scopeValue("func",{ref:u,code:nZe[u.code]||(nZe[u.code]=new BFt._Code(u.code))})}t(HFt,"useFunc");tu.useFunc=HFt;var OPe;(function(l){l[l.Num=0]="Num",l[l.Str=1]="Str"})(OPe||(tu.Type=OPe={}));function GFt(l,u,m){if(l instanceof q_.Name){let b=u===OPe.Num;return m?b?(0,q_._)`"[" + ${l} + "]"`:(0,q_._)`"['" + ${l} + "']"`:b?(0,q_._)`"/" + ${l}`:(0,q_._)`"/" + ${l}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return m?(0,q_.getProperty)(l).toString():"/"+FPe(l)}t(GFt,"getErrorPath");tu.getErrorPath=GFt;function cZe(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(cZe,"checkStrictMode");tu.checkStrictMode=cZe});var lS=Pr(RPe=>{"use strict";Object.defineProperty(RPe,"__esModule",{value:!0});var Wy=ul(),QFt={data:new Wy.Name("data"),valCxt:new Wy.Name("valCxt"),instancePath:new Wy.Name("instancePath"),parentData:new Wy.Name("parentData"),parentDataProperty:new Wy.Name("parentDataProperty"),rootData:new Wy.Name("rootData"),dynamicAnchors:new Wy.Name("dynamicAnchors"),vErrors:new Wy.Name("vErrors"),errors:new Wy.Name("errors"),this:new Wy.Name("this"),self:new Wy.Name("self"),scope:new Wy.Name("scope"),json:new Wy.Name("json"),jsonPos:new Wy.Name("jsonPos"),jsonLen:new Wy.Name("jsonLen"),jsonPart:new Wy.Name("jsonPart")};RPe.default=QFt});var UU=Pr(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.extendErrors=Hy.resetErrorsCount=Hy.reportExtraError=Hy.reportError=Hy.keyword$DataError=Hy.keywordError=void 0;var Vu=ul(),bce=pu(),G0=lS();Hy.keywordError={message:t(({keyword:l})=>(0,Vu.str)`must pass "${l}" keyword validation`,"message")};Hy.keyword$DataError={message:t(({keyword:l,schemaType:u})=>u?(0,Vu.str)`"${l}" keyword must be ${u} ($data)`:(0,Vu.str)`"${l}" keyword is invalid ($data)`,"message")};function ZFt(l,u=Hy.keywordError,m,b){let{it:T}=l,{gen:I,compositeRule:L,allErrors:Q}=T,ae=fZe(l,u,m);b??(L||Q)?lZe(I,ae):uZe(T,(0,Vu._)`[${ae}]`)}t(ZFt,"reportError");Hy.reportError=ZFt;function XFt(l,u=Hy.keywordError,m){let{it:b}=l,{gen:T,compositeRule:I,allErrors:L}=b,Q=fZe(l,u,m);lZe(T,Q),I||L||uZe(b,G0.default.vErrors)}t(XFt,"reportExtraError");Hy.reportExtraError=XFt;function YFt(l,u){l.assign(G0.default.errors,u),l.if((0,Vu._)`${G0.default.vErrors} !== null`,()=>l.if(u,()=>l.assign((0,Vu._)`${G0.default.vErrors}.length`,u),()=>l.assign(G0.default.vErrors,null)))}t(YFt,"resetErrorsCount");Hy.resetErrorsCount=YFt;function KFt({gen:l,keyword:u,schemaValue:m,data:b,errsCount:T,it:I}){if(T===void 0)throw new Error("ajv implementation error");let L=l.name("err");l.forRange("i",T,G0.default.errors,Q=>{l.const(L,(0,Vu._)`${G0.default.vErrors}[${Q}]`),l.if((0,Vu._)`${L}.instancePath === undefined`,()=>l.assign((0,Vu._)`${L}.instancePath`,(0,Vu.strConcat)(G0.default.instancePath,I.errorPath))),l.assign((0,Vu._)`${L}.schemaPath`,(0,Vu.str)`${I.errSchemaPath}/${u}`),I.opts.verbose&&(l.assign((0,Vu._)`${L}.schema`,m),l.assign((0,Vu._)`${L}.data`,b))})}t(KFt,"extendErrors");Hy.extendErrors=KFt;function lZe(l,u){let m=l.const("err",u);l.if((0,Vu._)`${G0.default.vErrors} === null`,()=>l.assign(G0.default.vErrors,(0,Vu._)`[${m}]`),(0,Vu._)`${G0.default.vErrors}.push(${m})`),l.code((0,Vu._)`$