@tsed/schema 7.10.0-rc.2 → 7.10.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ /*! For license information please see schema.umd.min.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.schema=t():e.schema=t()}(self,(()=>(()=>{var e={35:(e,t,r)=>{"use strict";const n=r(97),s=r(988),i=r(278),o=r(506),a=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let e=a.create(n,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(a.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};a.parse=(e,t={})=>o(e,t),a.stringify=(e,t={})=>n("string"==typeof e?a.parse(e,t):e,t),a.compile=(e,t={})=>("string"==typeof e&&(e=a.parse(e,t)),s(e,t)),a.expand=(e,t={})=>{"string"==typeof e&&(e=a.parse(e,t));let r=i(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},a.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?a.compile(e,t):a.expand(e,t),e.exports=a},988:(e,t,r)=>{"use strict";const n=r(641),s=r(371);e.exports=(e,t={})=>{let r=(e,i={})=>{let o=s.isInvalidBrace(i),a=!0===e.invalid&&!0===t.escapeInvalid,c=!0===o||!0===a,u=!0===t.escapeInvalid?"\\":"",p="";if(!0===e.isOpen)return u+e.value;if(!0===e.isClose)return u+e.value;if("open"===e.type)return c?u+e.value:"(";if("close"===e.type)return c?u+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":c?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let r=s.reduce(e.nodes),i=n(...r,{...t,wrap:!1,toRegex:!0});if(0!==i.length)return r.length>1&&i.length>1?`(${i})`:i}if(e.nodes)for(let t of e.nodes)p+=r(t,e);return p};return r(e)}},4:e=>{"use strict";e.exports={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},278:(e,t,r)=>{"use strict";const n=r(641),s=r(97),i=r(371),o=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?i.flatten(t).map((e=>`{${e}}`)):t;for(let s of e)if(Array.isArray(s))for(let e of s)n.push(o(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),n.push(Array.isArray(e)?o(s,e,r):s+e);return i.flatten(n)};e.exports=(e,t={})=>{let r=void 0===t.rangeLimit?1e3:t.rangeLimit,a=(e,c={})=>{e.queue=[];let u=c,p=c.queue;for(;"brace"!==u.type&&"root"!==u.type&&u.parent;)u=u.parent,p=u.queue;if(e.invalid||e.dollar)return void p.push(o(p.pop(),s(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void p.push(o(p.pop(),["{}"]));if(e.nodes&&e.ranges>0){let a=i.reduce(e.nodes);if(i.exceedsLimit(...a,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=n(...a,t);return 0===c.length&&(c=s(e,t)),p.push(o(p.pop(),c)),void(e.nodes=[])}let l=i.encloseBrace(e),h=e.queue,f=e;for(;"brace"!==f.type&&"root"!==f.type&&f.parent;)f=f.parent,h=f.queue;for(let t=0;t<e.nodes.length;t++){let r=e.nodes[t];"comma"!==r.type||"brace"!==e.type?"close"!==r.type?r.value&&"open"!==r.type?h.push(o(h.pop(),r.value)):r.nodes&&a(r,e):p.push(o(p.pop(),h,l)):(1===t&&h.push(""),h.push(""))}return h};return i.flatten(a(e))}},506:(e,t,r)=>{"use strict";const n=r(97),{MAX_LENGTH:s,CHAR_BACKSLASH:i,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:u,CHAR_RIGHT_PARENTHESES:p,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:y,CHAR_NO_BREAK_SPACE:g,CHAR_ZERO_WIDTH_NOBREAK_SPACE:b}=r(4);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let r=t||{},v="number"==typeof r.maxLength?Math.min(s,r.maxLength):s;if(e.length>v)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${v})`);let S,A={type:"root",input:e,nodes:[]},R=[A],O=A,E=A,_=0,w=e.length,T=0,x=0;const C=()=>e[T++],P=e=>{if("text"===e.type&&"dot"===E.type&&(E.type="text"),!E||"text"!==E.type||"text"!==e.type)return O.nodes.push(e),e.parent=O,e.prev=E,E=e,e;E.value+=e.value};for(P({type:"bos"});T<w;)if(O=R[R.length-1],S=C(),S!==b&&S!==g)if(S!==i)if(S!==d)if(S!==f)if(S!==u)if(S!==p)if(S!==m&&S!==y&&S!==o)if(S!==l)if(S!==h)if(S===a&&x>0){if(O.ranges>0){O.ranges=0;let e=O.nodes.shift();O.nodes=[e,{type:"text",value:n(O)}]}P({type:"comma",value:S}),O.commas++}else if(S===c&&x>0&&0===O.commas){let e=O.nodes;if(0===x||0===e.length){P({type:"text",value:S});continue}if("dot"===E.type){if(O.range=[],E.value+=S,E.type="range",3!==O.nodes.length&&5!==O.nodes.length){O.invalid=!0,O.ranges=0,E.type="text";continue}O.ranges++,O.args=[];continue}if("range"===E.type){e.pop();let t=e[e.length-1];t.value+=E.value+S,E=t,O.ranges--;continue}P({type:"dot",value:S})}else P({type:"text",value:S});else{if("brace"!==O.type){P({type:"text",value:S});continue}let e="close";O=R.pop(),O.close=!0,P({type:e,value:S}),x--,O=R[R.length-1]}else{x++;let e=E.value&&"$"===E.value.slice(-1)||!0===O.dollar;O=P({type:"brace",open:!0,close:!1,dollar:e,depth:x,commas:0,ranges:0,nodes:[]}),R.push(O),P({type:"open",value:S})}else{let e,r=S;for(!0!==t.keepQuotes&&(S="");T<w&&(e=C());)if(e!==i){if(e===r){!0===t.keepQuotes&&(S+=e);break}S+=e}else S+=e+C();P({type:"text",value:S})}else{if("paren"!==O.type){P({type:"text",value:S});continue}O=R.pop(),P({type:"text",value:S}),O=R[R.length-1]}else O=P({type:"paren",nodes:[]}),R.push(O),P({type:"text",value:S});else{let e;for(_++;T<w&&(e=C());)if(S+=e,e!==f)if(e!==i){if(e===d&&(_--,0===_))break}else S+=C();else _++;P({type:"text",value:S})}else P({type:"text",value:"\\"+S});else P({type:"text",value:(t.keepEscaping?S:"")+C()});do{if(O=R.pop(),"root"!==O.type){O.nodes.forEach((e=>{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)}));let e=R[R.length-1],t=e.nodes.indexOf(O);e.nodes.splice(t,1,...O.nodes)}}while(R.length>0);return P({type:"eos"}),A}},97:(e,t,r)=>{"use strict";const n=r(371);e.exports=(e,t={})=>{let r=(e,s={})=>{let i=t.escapeInvalid&&n.isInvalidBrace(s),o=!0===e.invalid&&!0===t.escapeInvalid,a="";if(e.value)return(i||o)&&n.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)a+=r(t);return a};return r(e)}},371:(e,t)=>{"use strict";t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find((e=>e.type===t)),t.exceedsLimit=(e,r,n=1,s)=>!1!==s&&!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(n)>=s,t.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||"open"===n.type||"close"===n.type)&&!0!==n.escaped&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0),t.isInvalidBrace=e=>!("brace"!==e.type||!0!==e.invalid&&!e.dollar&&(e.commas>>0+e.ranges>>0!=0&&!0===e.open&&!0===e.close||(e.invalid=!0,0))),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||!0===e.open||!0===e.close,t.reduce=e=>e.reduce(((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e)),[]),t.flatten=(...e)=>{const t=[],r=e=>{for(let n=0;n<e.length;n++){let s=e[n];Array.isArray(s)?r(s,t):void 0!==s&&t.push(s)}return t};return r(e),t}},641:(e,t,r)=>{"use strict";const n=r(19),s=r(374),i=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),o=e=>"number"==typeof e||"string"==typeof e&&""!==e,a=e=>Number.isInteger(+e),c=e=>{let t=`${e}`,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},u=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},p=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},l=(e,t,r,n)=>{if(r)return s(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);return e===t?i:`[${i}-${String.fromCharCode(t)}]`},h=(e,t,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return s(e,t,r)},f=(...e)=>new RangeError("Invalid range arguments: "+n.inspect(...e)),d=(e,t,r)=>{if(!0===r.strictRanges)throw f([e,t]);return[]},m=(e,t,r,n={})=>{if(null==t&&o(e))return[e];if(!o(e)||!o(t))return d(e,t,n);if("function"==typeof r)return m(e,t,1,{transform:r});if(i(r))return m(e,t,0,r);let s={...n};return!0===s.capture&&(s.wrap=!0),r=r||s.step||1,a(r)?a(e)&&a(t)?((e,t,r=1,n={})=>{let s=Number(e),i=Number(t);if(!Number.isInteger(s)||!Number.isInteger(i)){if(!0===n.strictRanges)throw f([e,t]);return[]}0===s&&(s=0),0===i&&(i=0);let o=s>i,a=String(e),d=String(t),m=String(r);r=Math.max(Math.abs(r),1);let y=c(a)||c(d)||c(m),g=y?Math.max(a.length,d.length,m.length):0,b=!1===y&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,n),v=n.transform||(e=>t=>!0===e?Number(t):String(t))(b);if(n.toRegex&&1===r)return l(p(e,g),p(t,g),!0,n);let S={negatives:[],positives:[]},A=[],R=0;for(;o?s>=i:s<=i;)!0===n.toRegex&&r>1?S[(O=s)<0?"negatives":"positives"].push(Math.abs(O)):A.push(u(v(s,R),g,b)),s=o?s-r:s+r,R++;var O;return!0===n.toRegex?r>1?((e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0)),e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let r,n=t.capture?"":"?:",s="",i="";return e.positives.length&&(s=e.positives.join("|")),e.negatives.length&&(i=`-(${n}${e.negatives.join("|")})`),r=s&&i?`${s}|${i}`:s||i,t.wrap?`(${n}${r})`:r})(S,n):h(A,null,{wrap:!1,...n}):A})(e,t,r,s):((e,t,r=1,n={})=>{if(!a(e)&&e.length>1||!a(t)&&t.length>1)return d(e,t,n);let s=n.transform||(e=>String.fromCharCode(e)),i=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),c=i>o,u=Math.min(i,o),p=Math.max(i,o);if(n.toRegex&&1===r)return l(u,p,!1,n);let f=[],m=0;for(;c?i>=o:i<=o;)f.push(s(i,m)),i=c?i-r:i+r,m++;return!0===n.toRegex?h(f,null,{wrap:!1,options:n}):f})(e,t,Math.max(Math.abs(r),1),s):null==r||i(r)?m(e,t,1,r):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(r,s)};e.exports=m},170:(e,t,r)=>{"use strict";const n=r(19),s=r(35),i=r(637),o=r(595),a=e=>""===e||"./"===e,c=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,s=new Set,o=new Set,a=0,c=e=>{o.add(e.output),r&&r.onResult&&r.onResult(e)};for(let o=0;o<t.length;o++){let u=i(String(t[o]),{...r,onResult:c},!0),p=u.state.negated||u.state.negatedExtglob;p&&a++;for(let t of e){let e=u(t,!0);(p?!e.isMatch:e.isMatch)&&(p?n.add(e.output):(n.delete(e.output),s.add(e.output)))}}let u=(a===t.length?[...o]:[...s]).filter((e=>!n.has(e)));if(r&&0===u.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map((e=>e.replace(/\\/g,""))):t}return u};c.match=c,c.matcher=(e,t)=>i(e,t),c.any=c.isMatch=(e,t,r)=>i(t,r)(e),c.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,s=[],i=new Set(c(e,t,{...r,onResult:e=>{r.onResult&&r.onResult(e),s.push(e.output)}}));for(let e of s)i.has(e)||n.add(e);return[...n]},c.contains=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${n.inspect(e)}"`);if(Array.isArray(t))return t.some((t=>c.contains(e,t,r)));if("string"==typeof t){if(a(e)||a(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return c.isMatch(e,t,{...r,contains:!0})},c.matchKeys=(e,t,r)=>{if(!o.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=c(Object.keys(e),t,r),s={};for(let t of n)s[t]=e[t];return s},c.some=(e,t,r)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(n.some((e=>t(e))))return!0}return!1},c.every=(e,t,r)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=i(String(e),r);if(!n.every((e=>t(e))))return!1}return!0},c.all=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${n.inspect(e)}"`);return[].concat(t).every((t=>i(t,r)(e)))},c.capture=(e,t,r)=>{let n=o.isWindows(r),s=i.makeRe(String(e),{...r,capture:!0}).exec(n?o.toPosixSlashes(t):t);if(s)return s.slice(1).map((e=>void 0===e?"":e))},c.makeRe=(...e)=>i.makeRe(...e),c.scan=(...e)=>i.scan(...e),c.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let e of s(String(n),t))r.push(i.parse(e,t));return r},c.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:s(e,t)},c.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return c.braces(e,{...t,expand:!0})},e.exports=c},565:(e,t,r)=>{"use strict";var n="win32"===process.platform,s=r(19);function i(e,t){for(var r=[],n=0;n<e.length;n++){var s=e[n];s&&"."!==s&&(".."===s?r.length&&".."!==r[r.length-1]?r.pop():t&&r.push(".."):r.push(s))}return r}function o(e){for(var t=e.length-1,r=0;r<=t&&!e[r];r++);for(var n=t;n>=0&&!e[n];n--);return 0===r&&n===t?e:r>n?[]:e.slice(r,n+1)}var a=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,c=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,u={};function p(e){var t=a.exec(e),r=(t[1]||"")+(t[2]||""),n=t[3]||"",s=c.exec(n);return[r,s[1],s[2],s[3]]}function l(e){var t=a.exec(e),r=t[1]||"",n=!!r&&":"!==r[1];return{device:r,isUnc:n,isAbsolute:n||!!t[2],tail:t[3]}}function h(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}u.resolve=function(){for(var e="",t="",r=!1,n=arguments.length-1;n>=-1;n--){var o;if(n>=0?o=arguments[n]:e?(o=process.env["="+e])&&o.substr(0,3).toLowerCase()===e.toLowerCase()+"\\"||(o=e+"\\"):o=process.cwd(),!s.isString(o))throw new TypeError("Arguments to path.resolve must be strings");if(o){var a=l(o),c=a.device,u=a.isUnc,p=a.isAbsolute,f=a.tail;if((!c||!e||c.toLowerCase()===e.toLowerCase())&&(e||(e=c),r||(t=f+"\\"+t,r=p),e&&r))break}}return u&&(e=h(e)),e+(r?"\\":"")+(t=i(t.split(/[\\\/]+/),!r).join("\\"))||"."},u.normalize=function(e){var t=l(e),r=t.device,n=t.isUnc,s=t.isAbsolute,o=t.tail,a=/[\\\/]$/.test(o);return(o=i(o.split(/[\\\/]+/),!s).join("\\"))||s||(o="."),o&&a&&(o+="\\"),n&&(r=h(r)),r+(s?"\\":"")+o},u.isAbsolute=function(e){return l(e).isAbsolute},u.join=function(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(!s.isString(r))throw new TypeError("Arguments to path.join must be strings");r&&e.push(r)}var n=e.join("\\");return/^[\\\/]{2}[^\\\/]/.test(e[0])||(n=n.replace(/^[\\\/]{2,}/,"\\")),u.normalize(n)},u.relative=function(e,t){e=u.resolve(e),t=u.resolve(t);for(var r=e.toLowerCase(),n=t.toLowerCase(),s=o(t.split("\\")),i=o(r.split("\\")),a=o(n.split("\\")),c=Math.min(i.length,a.length),p=c,l=0;l<c;l++)if(i[l]!==a[l]){p=l;break}if(0==p)return t;var h=[];for(l=p;l<i.length;l++)h.push("..");return(h=h.concat(s.slice(p))).join("\\")},u._makeLong=function(e){if(!s.isString(e))return e;if(!e)return"";var t=u.resolve(e);return/^[a-zA-Z]\:\\/.test(t)?"\\\\?\\"+t:/^\\\\[^?.]/.test(t)?"\\\\?\\UNC\\"+t.substring(2):e},u.dirname=function(e){var t=p(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},u.basename=function(e,t){var r=p(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},u.extname=function(e){return p(e)[3]},u.format=function(e){if(!s.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!s.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);var r=e.dir,n=e.base||"";return r?r[r.length-1]===u.sep?r+n:r+u.sep+n:n},u.parse=function(e){if(!s.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=p(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},u.sep="\\",u.delimiter=";";var f=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,d={};function m(e){return f.exec(e).slice(1)}d.resolve=function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:process.cwd();if(!s.isString(n))throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n[0])}return(t?"/":"")+(e=i(e.split("/"),!t).join("/"))||"."},d.normalize=function(e){var t=d.isAbsolute(e),r=e&&"/"===e[e.length-1];return(e=i(e.split("/"),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},d.isAbsolute=function(e){return"/"===e.charAt(0)},d.join=function(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];if(!s.isString(r))throw new TypeError("Arguments to path.join must be strings");r&&(e+=e?"/"+r:r)}return d.normalize(e)},d.relative=function(e,t){e=d.resolve(e).substr(1),t=d.resolve(t).substr(1);for(var r=o(e.split("/")),n=o(t.split("/")),s=Math.min(r.length,n.length),i=s,a=0;a<s;a++)if(r[a]!==n[a]){i=a;break}var c=[];for(a=i;a<r.length;a++)c.push("..");return(c=c.concat(n.slice(i))).join("/")},d._makeLong=function(e){return e},d.dirname=function(e){var t=m(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},d.basename=function(e,t){var r=m(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},d.extname=function(e){return m(e)[3]},d.format=function(e){if(!s.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!s.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+d.sep:"")+(e.base||"")},d.parse=function(e){if(!s.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=m(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},d.sep="/",d.delimiter=":",e.exports=n?u:d,e.exports.posix=d,e.exports.win32=u},637:(e,t,r)=>{"use strict";e.exports=r(135)},120:(e,t,r)=>{"use strict";const n=r(565),s="\\\\/",i=`[^${s}]`,o="\\.",a="\\/",c="[^/]",u=`(?:${a}|$)`,p=`(?:^|${a})`,l=`${o}{1,2}${u}`,h={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:a,ONE_CHAR:"(?=.)",QMARK:c,END_ANCHOR:u,DOTS_SLASH:l,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${p}${l})`,NO_DOT_SLASH:`(?!${o}{0,1}${u})`,NO_DOTS_SLASH:`(?!${l})`,QMARK_NO_DOT:`[^.${a}]`,STAR:`${c}*?`,START_ANCHOR:p},f={...h,SLASH_LITERAL:`[${s}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${s}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${s}])${o}{1,2}(?:[${s}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${s}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${s}]|$))`,QMARK_NO_DOT:`[^.${s}]`,START_ANCHOR:`(?:^|[${s}])`,END_ANCHOR:`(?:[${s}]|$)`};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:n.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?f:h}},142:(e,t,r)=>{"use strict";const n=r(120),s=r(595),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:u}=n,p=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map((e=>s.escapeRegex(e))).join("..")}return r},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,h=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=u[e]||e;const r={...t},f="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;let d=e.length;if(d>f)throw new SyntaxError(`Input length: ${d}, exceeds maximum allowed length: ${f}`);const m={type:"bos",value:"",output:r.prepend||""},y=[m],g=r.capture?"":"?:",b=s.isWindows(t),v=n.globChars(b),S=n.extglobChars(v),{DOT_LITERAL:A,PLUS_LITERAL:R,SLASH_LITERAL:O,ONE_CHAR:E,DOTS_SLASH:_,NO_DOT:w,NO_DOT_SLASH:T,NO_DOTS_SLASH:x,QMARK:C,QMARK_NO_DOT:P,STAR:M,START_ANCHOR:$}=v,N=e=>`(${g}(?:(?!${$}${e.dot?_:A}).)*?)`,L=r.dot?"":w,k=r.dot?C:P;let H=!0===r.bash?N(r):M;r.capture&&(H=`(${H})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const I={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};e=s.removePrefix(e,I),d=e.length;const j=[],D=[],G=[];let U,K=m;const q=()=>I.index===d-1,B=I.peek=(t=1)=>e[I.index+t],F=I.advance=()=>e[++I.index]||"",J=()=>e.slice(I.index+1),z=(e="",t=0)=>{I.consumed+=e,I.index+=t},W=e=>{I.output+=null!=e.output?e.output:e.value,z(e.value)},V=()=>{let e=1;for(;"!"===B()&&("("!==B(2)||"?"===B(3));)F(),I.start++,e++;return e%2!=0&&(I.negated=!0,I.start++,!0)},Q=e=>{I[e]++,G.push(e)},X=e=>{I[e]--,G.pop()},Z=e=>{if("globstar"===K.type){const t=I.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||j.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(I.output=I.output.slice(0,-K.output.length),K.type="star",K.value="*",K.output=H,I.output+=K.output)}if(j.length&&"paren"!==e.type&&(j[j.length-1].inner+=e.value),(e.value||e.output)&&W(e),K&&"text"===K.type&&"text"===e.type)return K.value+=e.value,void(K.output=(K.output||"")+e.value);e.prev=K,y.push(e),K=e},Y=(e,t)=>{const n={...S[t],conditions:1,inner:""};n.prev=K,n.parens=I.parens,n.output=I.output;const s=(r.capture?"(":"")+n.open;Q("parens"),Z({type:e,value:t,output:I.output?"":E}),Z({type:"paren",extglob:!0,value:F(),output:s}),j.push(n)},ee=e=>{let n,s=e.close+(r.capture?")":"");if("negate"===e.type){let i=H;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=N(r)),(i!==H||q()||/^\)+$/.test(J()))&&(s=e.close=`)$))${i}`),e.inner.includes("*")&&(n=J())&&/^\.[^\\/.]+$/.test(n)){const r=h(n,{...t,fastpaths:!1}).output;s=e.close=`)${r})${i})`}"bos"===e.prev.type&&(I.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:U,output:s}),X("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(c,((e,t,r,s,i,o)=>"\\"===s?(n=!0,e):"?"===s?t?t+s+(i?C.repeat(i.length):""):0===o?k+(i?C.repeat(i.length):""):C.repeat(r.length):"."===s?A.repeat(r.length):"*"===s?t?t+s+(i?H:""):H:t?e:`\\${e}`));return!0===n&&(i=!0===r.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===r.contains?(I.output=e,I):(I.output=s.wrapOutput(i,I,t),I)}for(;!q();){if(U=F(),"\0"===U)continue;if("\\"===U){const e=B();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){U+="\\",Z({type:"text",value:U});continue}const t=/^\\+/.exec(J());let n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(U+="\\")),!0===r.unescape?U=F():U+=F(),0===I.brackets){Z({type:"text",value:U});continue}}if(I.brackets>0&&("]"!==U||"["===K.value||"[^"===K.value)){if(!1!==r.posix&&":"===U){const e=K.value.slice(1);if(e.includes("[")&&(K.posix=!0,e.includes(":"))){const e=K.value.lastIndexOf("["),t=K.value.slice(0,e),r=K.value.slice(e+2),n=o[r];if(n){K.value=t+n,I.backtrack=!0,F(),m.output||1!==y.indexOf(K)||(m.output=E);continue}}}("["===U&&":"!==B()||"-"===U&&"]"===B())&&(U=`\\${U}`),"]"!==U||"["!==K.value&&"[^"!==K.value||(U=`\\${U}`),!0===r.posix&&"!"===U&&"["===K.value&&(U="^"),K.value+=U,W({value:U});continue}if(1===I.quotes&&'"'!==U){U=s.escapeRegex(U),K.value+=U,W({value:U});continue}if('"'===U){I.quotes=1===I.quotes?0:1,!0===r.keepQuotes&&Z({type:"text",value:U});continue}if("("===U){Q("parens"),Z({type:"paren",value:U});continue}if(")"===U){if(0===I.parens&&!0===r.strictBrackets)throw new SyntaxError(l("opening","("));const e=j[j.length-1];if(e&&I.parens===e.parens+1){ee(j.pop());continue}Z({type:"paren",value:U,output:I.parens?")":"\\)"}),X("parens");continue}if("["===U){if(!0!==r.nobracket&&J().includes("]"))Q("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(l("closing","]"));U=`\\${U}`}Z({type:"bracket",value:U});continue}if("]"===U){if(!0===r.nobracket||K&&"bracket"===K.type&&1===K.value.length){Z({type:"text",value:U,output:`\\${U}`});continue}if(0===I.brackets){if(!0===r.strictBrackets)throw new SyntaxError(l("opening","["));Z({type:"text",value:U,output:`\\${U}`});continue}X("brackets");const e=K.value.slice(1);if(!0===K.posix||"^"!==e[0]||e.includes("/")||(U=`/${U}`),K.value+=U,W({value:U}),!1===r.literalBrackets||s.hasRegexChars(e))continue;const t=s.escapeRegex(K.value);if(I.output=I.output.slice(0,-K.value.length),!0===r.literalBrackets){I.output+=t,K.value=t;continue}K.value=`(${g}${t}|${K.value})`,I.output+=K.value;continue}if("{"===U&&!0!==r.nobrace){Q("braces");const e={type:"brace",value:U,output:"(",outputIndex:I.output.length,tokensIndex:I.tokens.length};D.push(e),Z(e);continue}if("}"===U){const e=D[D.length-1];if(!0===r.nobrace||!e){Z({type:"text",value:U,output:U});continue}let t=")";if(!0===e.dots){const e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=p(n,r),I.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=I.output.slice(0,e.outputIndex),n=I.tokens.slice(e.tokensIndex);e.value=e.output="\\{",U=t="\\}",I.output=r;for(const e of n)I.output+=e.output||e.value}Z({type:"brace",value:U,output:t}),X("braces"),D.pop();continue}if("|"===U){j.length>0&&j[j.length-1].conditions++,Z({type:"text",value:U});continue}if(","===U){let e=U;const t=D[D.length-1];t&&"braces"===G[G.length-1]&&(t.comma=!0,e="|"),Z({type:"comma",value:U,output:e});continue}if("/"===U){if("dot"===K.type&&I.index===I.start+1){I.start=I.index+1,I.consumed="",I.output="",y.pop(),K=m;continue}Z({type:"slash",value:U,output:O});continue}if("."===U){if(I.braces>0&&"dot"===K.type){"."===K.value&&(K.output=A);const e=D[D.length-1];K.type="dots",K.output+=U,K.value+=U,e.dots=!0;continue}if(I.braces+I.parens===0&&"bos"!==K.type&&"slash"!==K.type){Z({type:"text",value:U,output:A});continue}Z({type:"dot",value:U,output:A});continue}if("?"===U){if((!K||"("!==K.value)&&!0!==r.noextglob&&"("===B()&&"?"!==B(2)){Y("qmark",U);continue}if(K&&"paren"===K.type){const e=B();let t=U;if("<"===e&&!s.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===K.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(J()))&&(t=`\\${U}`),Z({type:"text",value:U,output:t});continue}if(!0!==r.dot&&("slash"===K.type||"bos"===K.type)){Z({type:"qmark",value:U,output:P});continue}Z({type:"qmark",value:U,output:C});continue}if("!"===U){if(!0!==r.noextglob&&"("===B()&&("?"!==B(2)||!/[!=<:]/.test(B(3)))){Y("negate",U);continue}if(!0!==r.nonegate&&0===I.index){V();continue}}if("+"===U){if(!0!==r.noextglob&&"("===B()&&"?"!==B(2)){Y("plus",U);continue}if(K&&"("===K.value||!1===r.regex){Z({type:"plus",value:U,output:R});continue}if(K&&("bracket"===K.type||"paren"===K.type||"brace"===K.type)||I.parens>0){Z({type:"plus",value:U});continue}Z({type:"plus",value:R});continue}if("@"===U){if(!0!==r.noextglob&&"("===B()&&"?"!==B(2)){Z({type:"at",extglob:!0,value:U,output:""});continue}Z({type:"text",value:U});continue}if("*"!==U){"$"!==U&&"^"!==U||(U=`\\${U}`);const e=a.exec(J());e&&(U+=e[0],I.index+=e[0].length),Z({type:"text",value:U});continue}if(K&&("globstar"===K.type||!0===K.star)){K.type="star",K.star=!0,K.value+=U,K.output=H,I.backtrack=!0,I.globstar=!0,z(U);continue}let t=J();if(!0!==r.noextglob&&/^\([^?]/.test(t)){Y("star",U);continue}if("star"===K.type){if(!0===r.noglobstar){z(U);continue}const n=K.prev,s=n.prev,i="slash"===n.type||"bos"===n.type,o=s&&("star"===s.type||"globstar"===s.type);if(!0===r.bash&&(!i||t[0]&&"/"!==t[0])){Z({type:"star",value:U,output:""});continue}const a=I.braces>0&&("comma"===n.type||"brace"===n.type),c=j.length&&("pipe"===n.type||"paren"===n.type);if(!i&&"paren"!==n.type&&!a&&!c){Z({type:"star",value:U,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[I.index+4];if(r&&"/"!==r)break;t=t.slice(3),z("/**",3)}if("bos"===n.type&&q()){K.type="globstar",K.value+=U,K.output=N(r),I.output=K.output,I.globstar=!0,z(U);continue}if("slash"===n.type&&"bos"!==n.prev.type&&!o&&q()){I.output=I.output.slice(0,-(n.output+K.output).length),n.output=`(?:${n.output}`,K.type="globstar",K.output=N(r)+(r.strictSlashes?")":"|$)"),K.value+=U,I.globstar=!0,I.output+=n.output+K.output,z(U);continue}if("slash"===n.type&&"bos"!==n.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";I.output=I.output.slice(0,-(n.output+K.output).length),n.output=`(?:${n.output}`,K.type="globstar",K.output=`${N(r)}${O}|${O}${e})`,K.value+=U,I.output+=n.output+K.output,I.globstar=!0,z(U+F()),Z({type:"slash",value:"/",output:""});continue}if("bos"===n.type&&"/"===t[0]){K.type="globstar",K.value+=U,K.output=`(?:^|${O}|${N(r)}${O})`,I.output=K.output,I.globstar=!0,z(U+F()),Z({type:"slash",value:"/",output:""});continue}I.output=I.output.slice(0,-K.output.length),K.type="globstar",K.output=N(r),K.value+=U,I.output+=K.output,I.globstar=!0,z(U);continue}const n={type:"star",value:U,output:H};!0!==r.bash?!K||"bracket"!==K.type&&"paren"!==K.type||!0!==r.regex?(I.index!==I.start&&"slash"!==K.type&&"dot"!==K.type||("dot"===K.type?(I.output+=T,K.output+=T):!0===r.dot?(I.output+=x,K.output+=x):(I.output+=L,K.output+=L),"*"!==B()&&(I.output+=E,K.output+=E)),Z(n)):(n.output=U,Z(n)):(n.output=".*?","bos"!==K.type&&"slash"!==K.type||(n.output=L+n.output),Z(n))}for(;I.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing","]"));I.output=s.escapeLast(I.output,"["),X("brackets")}for(;I.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing",")"));I.output=s.escapeLast(I.output,"("),X("parens")}for(;I.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing","}"));I.output=s.escapeLast(I.output,"{"),X("braces")}if(!0===r.strictSlashes||"star"!==K.type&&"bracket"!==K.type||Z({type:"maybe_slash",value:"",output:`${O}?`}),!0===I.backtrack){I.output="";for(const e of I.tokens)I.output+=null!=e.output?e.output:e.value,e.suffix&&(I.output+=e.suffix)}return I};h.fastpaths=(e,t)=>{const r={...t},o="number"==typeof r.maxLength?Math.min(i,r.maxLength):i,a=e.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=u[e]||e;const c=s.isWindows(t),{DOT_LITERAL:p,SLASH_LITERAL:l,ONE_CHAR:h,DOTS_SLASH:f,NO_DOT:d,NO_DOTS:m,NO_DOTS_SLASH:y,STAR:g,START_ANCHOR:b}=n.globChars(c),v=r.dot?m:d,S=r.dot?y:d,A=r.capture?"":"?:";let R=!0===r.bash?".*?":g;r.capture&&(R=`(${R})`);const O=e=>!0===e.noglobstar?R:`(${A}(?:(?!${b}${e.dot?f:p}).)*?)`,E=e=>{switch(e){case"*":return`${v}${h}${R}`;case".*":return`${p}${h}${R}`;case"*.*":return`${v}${R}${p}${h}${R}`;case"*/*":return`${v}${R}${l}${h}${S}${R}`;case"**":return v+O(r);case"**/*":return`(?:${v}${O(r)}${l})?${S}${h}${R}`;case"**/*.*":return`(?:${v}${O(r)}${l})?${S}${R}${p}${h}${R}`;case"**/.*":return`(?:${v}${O(r)}${l})?${p}${h}${R}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=E(t[1]);if(!r)return;return r+p+t[2]}}},_=s.removePrefix(e,{negated:!1,prefix:""});let w=E(_);return w&&!0!==r.strictSlashes&&(w+=`${l}?`),w},e.exports=h},135:(e,t,r)=>{"use strict";const n=r(565),s=r(510),i=r(142),o=r(595),a=r(120),c=(e,t,r=!1)=>{if(Array.isArray(e)){const n=e.map((e=>c(e,t,r))),s=e=>{for(const t of n){const r=t(e);if(r)return r}return!1};return s}const n=(s=e)&&"object"==typeof s&&!Array.isArray(s)&&e.tokens&&e.input;var s;if(""===e||"string"!=typeof e&&!n)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},a=o.isWindows(t),u=n?c.compileRe(e,t):c.makeRe(e,t,!1,!0),p=u.state;delete u.state;let l=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=c(i.ignore,e,r)}const h=(r,n=!1)=>{const{isMatch:s,match:o,output:h}=c.test(r,u,t,{glob:e,posix:a}),f={glob:e,state:p,regex:u,posix:a,input:r,output:h,match:o,isMatch:s};return"function"==typeof i.onResult&&i.onResult(f),!1===s?(f.isMatch=!1,!!n&&f):l(r)?("function"==typeof i.onIgnore&&i.onIgnore(f),f.isMatch=!1,!!n&&f):("function"==typeof i.onMatch&&i.onMatch(f),!n||f)};return r&&(h.state=p),h};c.test=(e,t,r,{glob:n,posix:s}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=r||{},a=i.format||(s?o.toPosixSlashes:null);let u=e===n,p=u&&a?a(e):e;return!1===u&&(p=a?a(e):e,u=p===n),!1!==u&&!0!==i.capture||(u=!0===i.matchBase||!0===i.basename?c.matchBase(e,t,r,s):t.exec(p)),{isMatch:Boolean(u),match:u,output:p}},c.matchBase=(e,t,r,s=o.isWindows(r))=>(t instanceof RegExp?t:c.makeRe(t,r)).test(n.basename(e)),c.isMatch=(e,t,r)=>c(t,r)(e),c.parse=(e,t)=>Array.isArray(e)?e.map((e=>c.parse(e,t))):i(e,{...t,fastpaths:!1}),c.scan=(e,t)=>s(e,t),c.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;const s=t||{},i=s.contains?"":"^",o=s.contains?"":"$";let a=`${i}(?:${e.output})${o}`;e&&!0===e.negated&&(a=`^(?!${a}).*$`);const u=c.toRegex(a,t);return!0===n&&(u.state=e),u},c.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(s.output=i.fastpaths(e,t)),s.output||(s=i(e,t)),c.compileRe(s,t,r,n)},c.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},c.constants=a,e.exports=c},510:(e,t,r)=>{"use strict";const n=r(595),{CHAR_ASTERISK:s,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:p,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:d,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:b}=r(120),v=e=>e===p||e===o,S=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},A=e.length-1,R=!0===r.parts||!0===r.scanToEnd,O=[],E=[],_=[];let w,T,x=e,C=-1,P=0,M=0,$=!1,N=!1,L=!1,k=!1,H=!1,I=!1,j=!1,D=!1,G=!1,U=!1,K=0,q={value:"",depth:0,isGlob:!1};const B=()=>C>=A,F=()=>(w=T,x.charCodeAt(++C));for(;C<A;){let e;if(T=F(),T!==o){if(!0===I||T===l){for(K++;!0!==B()&&(T=F());)if(T!==o)if(T!==l){if(!0!==I&&T===c&&(T=F())===c){if($=q.isBrace=!0,L=q.isGlob=!0,U=!0,!0===R)continue;break}if(!0!==I&&T===a){if($=q.isBrace=!0,L=q.isGlob=!0,U=!0,!0===R)continue;break}if(T===y&&(K--,0===K)){I=!1,$=q.isBrace=!0,U=!0;break}}else K++;else j=q.backslashes=!0,F();if(!0===R)continue;break}if(T!==p){if(!0!==r.noext&&!0==(T===d||T===i||T===s||T===m||T===u)&&x.charCodeAt(C+1)===h){if(L=q.isGlob=!0,k=q.isExtglob=!0,U=!0,T===u&&C===P&&(G=!0),!0===R){for(;!0!==B()&&(T=F());)if(T!==o){if(T===g){L=q.isGlob=!0,U=!0;break}}else j=q.backslashes=!0,T=F();continue}break}if(T===s){if(w===s&&(H=q.isGlobstar=!0),L=q.isGlob=!0,U=!0,!0===R)continue;break}if(T===m){if(L=q.isGlob=!0,U=!0,!0===R)continue;break}if(T===f){for(;!0!==B()&&(e=F());)if(e!==o){if(e===b){N=q.isBracket=!0,L=q.isGlob=!0,U=!0;break}}else j=q.backslashes=!0,F();if(!0===R)continue;break}if(!0===r.nonegate||T!==u||C!==P){if(!0!==r.noparen&&T===h){if(L=q.isGlob=!0,!0===R){for(;!0!==B()&&(T=F());)if(T!==h){if(T===g){U=!0;break}}else j=q.backslashes=!0,T=F();continue}break}if(!0===L){if(U=!0,!0===R)continue;break}}else D=q.negated=!0,P++}else{if(O.push(C),E.push(q),q={value:"",depth:0,isGlob:!1},!0===U)continue;if(w===c&&C===P+1){P+=2;continue}M=C+1}}else j=q.backslashes=!0,T=F(),T===l&&(I=!0)}!0===r.noext&&(k=!1,L=!1);let J=x,z="",W="";P>0&&(z=x.slice(0,P),x=x.slice(P),M-=P),J&&!0===L&&M>0?(J=x.slice(0,M),W=x.slice(M)):!0===L?(J="",W=x):J=x,J&&""!==J&&"/"!==J&&J!==x&&v(J.charCodeAt(J.length-1))&&(J=J.slice(0,-1)),!0===r.unescape&&(W&&(W=n.removeBackslashes(W)),J&&!0===j&&(J=n.removeBackslashes(J)));const V={prefix:z,input:e,start:P,base:J,glob:W,isBrace:$,isBracket:N,isGlob:L,isExtglob:k,isGlobstar:H,negated:D,negatedExtglob:G};if(!0===r.tokens&&(V.maxDepth=0,v(T)||E.push(q),V.tokens=E),!0===r.parts||!0===r.tokens){let t;for(let n=0;n<O.length;n++){const s=t?t+1:P,i=O[n],o=e.slice(s,i);r.tokens&&(0===n&&0!==P?(E[n].isPrefix=!0,E[n].value=z):E[n].value=o,S(E[n]),V.maxDepth+=E[n].depth),0===n&&""===o||_.push(o),t=i}if(t&&t+1<e.length){const n=e.slice(t+1);_.push(n),r.tokens&&(E[E.length-1].value=n,S(E[E.length-1]),V.maxDepth+=E[E.length-1].depth)}V.slashes=O,V.parts=_}return V}},595:(e,t,r)=>{"use strict";const n=r(565),s="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=r(120);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>a.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(c,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(o,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===s||"\\"===n.sep,t.escapeLast=(e,r,n)=>{const s=e.lastIndexOf(r,n);return-1===s?e:"\\"===e[s-1]?t.escapeLast(e,r,s-1):`${e.slice(0,s)}\\${e.slice(s)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let n=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(n=`(?:^(?!${n}).*$)`),n}},60:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),s=i(e);function i(e,t){return function(r,n){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0===n.Reflect?n.Reflect=e:s=i(n.Reflect,s),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",s=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",i="function"==typeof Object.create,o={__proto__:[]}instanceof Array,a=!i&&!o,c={create:i?function(){return k(Object.create(null))}:o?function(){return k({__proto__:null})}:function(){return k({})},has:a?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:a?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),p="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,l=p||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[s]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,s=r+1;s<n;s++)this._keys[s-1]=this._keys[s],this._values[s-1]=this._values[s];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,i)},t.prototype.entries=function(){return new r(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[s]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function i(e,t){return t}function o(e,t){return[e,t]}}():Map,h=p||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new l}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[s]=function(){return this.keys()},e}():Set,f=new(p||"function"!=typeof WeakMap?function(){var e=c.create(),r=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=s(e,!1);return void 0!==t&&c.has(t,this._key)},e.prototype.get=function(e){var t=s(e,!1);return void 0!==t?c.get(t,this._key):void 0},e.prototype.set=function(e,t){return s(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=s(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+o()}while(c.has(e,t));return e[t]=!0,t}function s(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:c.create()})}return e[r]}function i(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function o(){var e,t=(e=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):i(new Uint8Array(e),e):i(new Array(e),e));t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<16;++n){var s=t[n];4!==n&&6!==n&&8!==n||(r+="-"),s<16&&(r+="0"),r+=s.toString(16).toLowerCase()}return r}}():WeakMap);function d(e,t,r){var n=f.get(e);if(O(n)){if(!r)return;n=new l,f.set(e,n)}var s=n.get(t);if(O(s)){if(!r)return;s=new l,n.set(t,s)}return s}function m(e,t,r){if(y(e,t,r))return!0;var n=L(t);return!E(n)&&m(e,n,r)}function y(e,t,r){var n=d(t,r,!1);return!O(n)&&!!n.has(e)}function g(e,t,r){if(y(e,t,r))return b(e,t,r);var n=L(t);return E(n)?void 0:g(e,n,r)}function b(e,t,r){var n=d(t,r,!1);if(!O(n))return n.get(e)}function v(e,t,r,n){d(r,n,!0).set(e,t)}function S(e,t){var r=A(e,t),n=L(e);if(null===n)return r;var s=S(n,t);if(s.length<=0)return r;if(r.length<=0)return s;for(var i=new h,o=[],a=0,c=r;a<c.length;a++){var u=c[a];i.has(u)||(i.add(u),o.push(u))}for(var p=0,l=s;p<l.length;p++)u=l[p],i.has(u)||(i.add(u),o.push(u));return o}function A(e,t){var r=[],n=d(e,t,!1);if(O(n))return r;for(var i=function(e){var t=M(e,s);if(!C(t))throw new TypeError;var r=t.call(e);if(!_(r))throw new TypeError;return r}(n.keys()),o=0;;){var a=$(i);if(!a)return r.length=o,r;var c=a.value;try{r[o]=c}catch(e){try{N(i)}finally{throw e}}o++}}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function O(e){return void 0===e}function E(e){return null===e}function _(e){return"object"==typeof e?null!==e:"function"==typeof e}function w(e,t){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",s=M(e,n);if(void 0!==s){var i=s.call(e,r);if(_(i))throw new TypeError;return i}return function(e,t){if("string"===t){var r=e.toString;if(C(r)&&!_(s=r.call(e)))return s;if(C(n=e.valueOf)&&!_(s=n.call(e)))return s}else{var n;if(C(n=e.valueOf)&&!_(s=n.call(e)))return s;var s,i=e.toString;if(C(i)&&!_(s=i.call(e)))return s}throw new TypeError}(e,"default"===r?"number":r)}function T(e){var t=w(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function x(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function C(e){return"function"==typeof e}function P(e){return"function"==typeof e}function M(e,t){var r=e[t];if(null!=r){if(!C(r))throw new TypeError;return r}}function $(e){var t=e.next();return!t.done&&t}function N(e){var t=e.return;t&&t.call(e)}function L(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u)return t;if(t!==u)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var s=n.constructor;return"function"!=typeof s||s===e?t:s}function k(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(O(r)){if(!x(e))throw new TypeError;if(!P(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!O(n)&&!E(n)){if(!P(n))throw new TypeError;t=n}}return t}(e,t)}if(!x(e))throw new TypeError;if(!_(t))throw new TypeError;if(!_(n)&&!O(n)&&!E(n))throw new TypeError;return E(n)&&(n=void 0),function(e,t,r,n){for(var s=e.length-1;s>=0;--s){var i=(0,e[s])(t,r,n);if(!O(i)&&!E(i)){if(!_(i))throw new TypeError;n=i}}return n}(e,t,r=T(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!_(r))throw new TypeError;if(!O(n)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;v(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!_(r))throw new TypeError;return O(n)||(n=T(n)),v(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!_(t))throw new TypeError;return O(r)||(r=T(r)),m(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!_(t))throw new TypeError;return O(r)||(r=T(r)),y(e,t,r)})),e("getMetadata",(function(e,t,r){if(!_(t))throw new TypeError;return O(r)||(r=T(r)),g(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!_(t))throw new TypeError;return O(r)||(r=T(r)),b(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!_(e))throw new TypeError;return O(t)||(t=T(t)),S(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!_(e))throw new TypeError;return O(t)||(t=T(t)),A(e,t)})),e("deleteMetadata",(function(e,t,r){if(!_(t))throw new TypeError;O(r)||(r=T(r));var n=d(t,r,!1);if(O(n))return!1;if(!n.delete(e))return!1;if(n.size>0)return!0;var s=f.get(t);return s.delete(r),s.size>0||f.delete(t),!0}))}(s)}()}(n||(n={}))},203:(e,t,r)=>{"use strict";var n=r(739);function s(e){if(!Object.prototype.hasOwnProperty.call(i.message,e))throw new Error("invalid status code: "+e);return i.message[e]}function i(e){if("number"==typeof e)return s(e);if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?function(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(i.code,t))throw new Error('invalid status message: "'+e+'"');return i.code[t]}(e):s(t)}e.exports=i,i.message=n,i.code=function(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r],s=Number(r);t[n.toLowerCase()]=s})),t}(n),i.codes=function(e){return Object.keys(e).map((function(e){return Number(e)}))}(n),i.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},i.empty={204:!0,205:!0,304:!0},i.retry={502:!0,503:!0,504:!0}},374:(e,t,r)=>{"use strict";const n=r(252),s=(e,t,r)=>{if(!1===n(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===n(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};"boolean"==typeof i.strictZeros&&(i.relaxZeros=!1===i.strictZeros);let c=e+":"+t+"="+String(i.relaxZeros)+String(i.shorthand)+String(i.capture)+String(i.wrap);if(s.cache.hasOwnProperty(c))return s.cache[c].result;let u=Math.min(e,t),p=Math.max(e,t);if(1===Math.abs(u-p)){let r=e+"|"+t;return i.capture?`(${r})`:!1===i.wrap?r:`(?:${r})`}let l=f(e)||f(t),h={min:e,max:t,a:u,b:p},d=[],m=[];return l&&(h.isPadded=l,h.maxLen=String(h.max).length),u<0&&(m=o(p<0?Math.abs(p):1,Math.abs(u),h,i),u=h.a=0),p>=0&&(d=o(u,p,h,i)),h.negatives=m,h.positives=d,h.result=function(e,t,r){let n=a(e,t,"-",!1)||[],s=a(t,e,"",!1)||[],i=a(e,t,"-?",!0)||[];return n.concat(i).concat(s).join("|")}(m,d),!0===i.capture?h.result=`(${h.result})`:!1!==i.wrap&&d.length+m.length>1&&(h.result=`(?:${h.result})`),s.cache[c]=h,h.result};function i(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=function(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}(e,t),s=n.length,i="",o=0;for(let e=0;e<s;e++){let[t,r]=n[e];t===r?i+=t:"0"!==t||"9"!==r?i+=`[${a=t}${(c=r)-a==1?"":"-"}${c}]`:o++}var a,c;return o&&(i+=!0===r.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:s}}function o(e,t,r,n){let s,o=function(e,t){let r=1,n=1,s=p(e,r),i=new Set([t]);for(;e<=s&&s<=t;)i.add(s),r+=1,s=p(e,r);for(s=l(t+1,n)-1;e<s&&s<=t;)i.add(s),n+=1,s=l(t+1,n)-1;return i=[...i],i.sort(c),i}(e,t),a=[],u=e;for(let e=0;e<o.length;e++){let t=o[e],c=i(String(u),String(t),n),p="";r.isPadded||!s||s.pattern!==c.pattern?(r.isPadded&&(p=d(t,r,n)),c.string=p+c.pattern+h(c.count),a.push(c),u=t+1,s=c):(s.count.length>1&&s.count.pop(),s.count.push(c.count[0]),s.string=s.pattern+h(s.count),u=t+1)}return a}function a(e,t,r,n,s){let i=[];for(let s of e){let{string:e}=s;n||u(t,"string",e)||i.push(r+e),n&&u(t,"string",e)&&i.push(r+e)}return i}function c(e,t){return e>t?1:t>e?-1:0}function u(e,t,r){return e.some((e=>e[t]===r))}function p(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function l(e,t){return e-e%Math.pow(10,t)}function h(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function f(e){return/^-?(0+)\d/.test(e)}function d(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=!1!==r.relaxZeros;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}s.cache={},s.clearCache=()=>s.cache={},e.exports=s},252:e=>{"use strict";e.exports=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},323:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},502:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},19:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(" ")}r=1;for(var s=arguments,i=s.length,a=String(e).replace(n,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(s[r++]);case"%d":return Number(s[r++]);case"%j":try{return JSON.stringify(s[r++])}catch(e){return"[Circular]"}default:return e}})),c=s[r];r<i;c=s[++r])d(c)||!v(c)?a+=" "+c:a+=" "+o(c);return a},t.deprecate=function(e,n){if(g(r.g.process))return function(){return t.deprecate(e,n).apply(this,arguments)};if(!0===process.noDeprecation)return e;var s=!1;return function(){if(!s){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),s=!0}return e.apply(this,arguments)}};var s,i={};function o(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&R(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var s=r.inspect(n,e);return y(s)||(s=u(e,s,n)),s}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return m(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var o=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),A(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(r);if(0===o.length){if(R(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return p(r)}var v,O="",E=!1,_=["{","}"];return h(r)&&(E=!0,_=["[","]"]),R(r)&&(O=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(O=" "+RegExp.prototype.toString.call(r)),S(r)&&(O=" "+Date.prototype.toUTCString.call(r)),A(r)&&(O=" "+p(r)),0!==o.length||E&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),v=E?function(e,t,r,n,s){for(var i=[],o=0,a=t.length;o<a;++o)T(t,String(o))?i.push(l(e,t,r,n,String(o),!0)):i.push("");return s.forEach((function(s){s.match(/^\d+$/)||i.push(l(e,t,r,n,s,!0))})),i}(e,r,n,a,o):o.map((function(t){return l(e,r,n,a,t,E)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(v,O,_)):_[0]+O+_[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,s,i){var o,a,c;if((c=Object.getOwnPropertyDescriptor(t,s)||{value:t[s]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),T(n,s)||(o="["+s+"]"),a||(e.seen.indexOf(c.value)<0?(a=d(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),g(o)){if(i&&s.match(/^\d+$/))return a;(o=JSON.stringify(""+s)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function d(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function g(e){return void 0===e}function b(e){return v(e)&&"[object RegExp]"===O(e)}function v(e){return"object"==typeof e&&null!==e}function S(e){return v(e)&&"[object Date]"===O(e)}function A(e){return v(e)&&("[object Error]"===O(e)||e instanceof Error)}function R(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(s)&&(s=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){var r=process.pid;i[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else i[e]=function(){};return i[e]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=f,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=b,t.isObject=v,t.isDate=S,t.isError=A,t.isFunction=R,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(502);var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function w(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),_[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",w(),t.format.apply(t,arguments))},t.inherits=r(323),t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},62:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=62,e.exports=t},739:e=>{"use strict";e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";var e;function t(e){return function(e){return e.prototype?e:e.constructor}(e)}function s(r){const[n,s,i]=r,o=e=>n!==t(n)?e:`${e}.static`;return"number"==typeof i?s?o("parameter"):"parameter.constructor":i&&i.value?o("method"):s&&void 0===i||i?o("property"):e.CLASS}function i(e){return Array.isArray(e)}function o(e){return e===Array||i(e)}function a(e){return e===Date||e instanceof Date&&!isNaN(+e)}function c(e){return"function"==typeof e}function u(e){return"boolean"==typeof e||e instanceof Boolean||e===Boolean}function p(e){return"number"==typeof e}function l(e){return"number"==typeof e||e instanceof Number||e===Number}function h(e){return"string"==typeof e}function f(e){return"string"==typeof e||e instanceof String||e===String}function d(e){return f(e)||l(e)||u(e)}function m(e){return h(e)||p(e)||function(e){return"boolean"==typeof e||e instanceof Boolean||e===Boolean}(e)}function y(e){return[String,Number,Boolean].includes(e)}function g(e){return"symbol"==typeof e}function b(e){return e===Buffer||e instanceof Buffer}function v(e,t=new WeakMap){let r;if((e=>null==e||m(e)||g(e)||c(e))(e))return e;if(b(e)){const t=Buffer.alloc(e.length);return e.copy(t),t}if(a(e))return new Date(e);if(e instanceof RegExp)return new RegExp(e);const n=t.get(e);if(n)return process.env.TSED_TRACK_CIRCULAR_REF&&console.trace("Circular ref detected on deepClone",n),n;i(e)?r=[]:(r={},t.set(e,r));for(const n in e){const s=Object.getOwnPropertyDescriptor(e,n);s&&(c(s.value)?Object.defineProperty(r,n,s):r[n]=v(s.value,t))}if(!i(e)){const t=Reflect.getPrototypeOf(e);Reflect.setPrototypeOf(r,t)}return r}function S(e){return["__proto__","constructor","prototype"].includes(e)}function A(e){return Object.keys(e).filter((e=>!S(e)))}function R(e){return(t,r,n)=>{const s=t.findIndex((t=>e(t,r)));return-1===s?[...t,r]:(t[s]=E(t[s],r,n),t)}}r.r(n),r.d(n,{AcceptMime:()=>vn,AdditionalProperties:()=>Qt,All:()=>Kn,AllOf:()=>Xt,Allow:()=>Yt,Any:()=>er,AnyOf:()=>tr,ArrayOf:()=>Kt,Children:()=>Dt,CollectionContains:()=>Bt,CollectionOf:()=>Ut,Const:()=>rr,Consumes:()=>Sn,ContentType:()=>xn,Converter:()=>Hs,CustomKey:()=>nr,CustomKeys:()=>sr,DateFormat:()=>Sr,DateTime:()=>vr,DecoratorContext:()=>An,Default:()=>ir,Delete:()=>Jn,Deprecated:()=>Cn,Description:()=>or,Discriminator:()=>Re,DiscriminatorKey:()=>ar,DiscriminatorValue:()=>Gt,Email:()=>br,EndpointMetadata:()=>ht,Enum:()=>cr,Example:()=>ur,Examples:()=>pr,ExclusiveMaximum:()=>fr,ExclusiveMinimum:()=>yr,For:()=>qr,Format:()=>gr,ForwardGroups:()=>Er,GenericOf:()=>yn,Generics:()=>gn,Get:()=>qn,Groups:()=>xr,HTTP_METHODS:()=>kt,HTTP_STATUS_MESSAGES:()=>et,Head:()=>zn,Header:()=>Pn,Hidden:()=>Cr,Ignore:()=>Mr,In:()=>Mn,InFile:()=>$n,Integer:()=>$r,JSON_TYPES:()=>ge,JsonClassStore:()=>Te,JsonEntitiesContainer:()=>le,JsonEntityComponent:()=>we,JsonEntityFn:()=>jt,JsonEntityStore:()=>he,JsonFormatTypes:()=>It,JsonLazyRef:()=>dt,JsonMap:()=>Ne,JsonMedia:()=>ct,JsonMethodStore:()=>lt,JsonOperation:()=>pt,JsonOperationPathsMap:()=>ts,JsonOperationRoute:()=>ns,JsonParameter:()=>We,JsonParameterStore:()=>Ve,JsonParameterTypes:()=>Le,JsonPropertyStore:()=>xe,JsonRequestBody:()=>ot,JsonResponse:()=>ut,JsonSchema:()=>_e,Location:()=>Nn,MapOf:()=>qt,Max:()=>hr,MaxItems:()=>Ft,MaxLength:()=>Nr,MaxProperties:()=>Jt,Maximum:()=>lr,Min:()=>mr,MinItems:()=>zt,MinLength:()=>Lr,MinProperties:()=>Wt,Minimum:()=>dr,MultipleOf:()=>kr,Name:()=>Hr,Nullable:()=>Ir,OneOf:()=>jr,OperationId:()=>Ln,OperationMethods:()=>Ht,OperationPath:()=>kn,Optional:()=>Dr,Options:()=>Vn,ParamMetadata:()=>Qe,Partial:()=>Hn,Patch:()=>Wn,Path:()=>In,Pattern:()=>Gr,Post:()=>Bn,Produces:()=>bn,Property:()=>Zt,PropertyMetadata:()=>Ce,Put:()=>Fn,ReadOnly:()=>Ur,RecordOf:()=>Br,Redirect:()=>jn,Required:()=>Fr,RequiredGroups:()=>Jr,Returns:()=>Tn,Route:()=>Un,Schema:()=>Kr,Security:()=>Qn,SpecTypes:()=>je,Status:()=>Xn,Summary:()=>Zn,Tags:()=>Yn,TimeFormat:()=>Ar,Title:()=>zr,UniqueItems:()=>Vt,Uri:()=>Rr,Url:()=>Or,View:()=>es,WriteOnly:()=>Wr,allOf:()=>dn,alterIgnore:()=>Ot,alterOneOf:()=>Mt,alterRequiredGroups:()=>Ct,any:()=>ln,anyMapper:()=>mt,anyOf:()=>hn,array:()=>an,boolean:()=>Yr,buildPath:()=>ss,classMapper:()=>yt,concatParameters:()=>is,concatPath:()=>rs,createRef:()=>Je,createRefName:()=>Fe,date:()=>en,datetime:()=>tn,defineStatusModel:()=>On,email:()=>nn,execMapper:()=>ue,formatParameterType:()=>ke,from:()=>Vr,generateSpec:()=>js,genericsMapper:()=>gt,getComputedType:()=>ye,getGenericsMap:()=>Pe,getInheritedStores:()=>bt,getJsonEntityStore:()=>ft,getJsonPathParameters:()=>as,getJsonSchema:()=>Gs,getJsonSchemaMapper:()=>ce,getJsonType:()=>be,getOperationsRoutes:()=>Us,getOperationsStores:()=>os,getProperties:()=>qs,getPropertiesStores:()=>Ks,getRequiredProperties:()=>Pt,getSpec:()=>vs,getSpecType:()=>Ss,getSpecTypeFromSpec:()=>As,getStatusConstant:()=>tt,getStatusMessage:()=>rt,getStatusModel:()=>En,hasMapper:()=>pe,inheritedClassMapper:()=>vt,integer:()=>Xr,isParameterType:()=>He,isRedirectionStatus:()=>st,isSuccessStatus:()=>nt,itemMapper:()=>St,lazyRef:()=>mn,lazyRefMapper:()=>At,map:()=>cn,mapAliasedProperties:()=>xt,mapGenericsOptions:()=>Me,mapHeaders:()=>at,mapMapper:()=>Rt,mapNullableType:()=>Et,mapOpenSpec:()=>_s,mapOpenSpec2:()=>Os,mapOpenSpec3:()=>Es,mapOpenSpecInfo:()=>Rs,mapRouteOptions:()=>Dn,matchGroups:()=>Tr,mergeOperation:()=>cs,mergeSpec:()=>gs,number:()=>Qr,object:()=>pn,objectMapper:()=>_t,ofMapper:()=>wt,oneOf:()=>fn,operationIdFormatter:()=>ls,parameters:()=>fs,popGenerics:()=>$e,propertiesMapper:()=>Tt,registerJsonSchemaMapper:()=>ae,schemaMapper:()=>Lt,schemesReducer:()=>hs,security:()=>ds,serializeEnum:()=>ve,serializeEnumValues:()=>Se,set:()=>un,string:()=>Zr,tagsReducer:()=>ms,time:()=>rn,toJsonMapCollection:()=>it,toJsonRegex:()=>Ae,toRef:()=>ze,transformInformation:()=>ks,transformSecurity:()=>Ls,transformToOS2:()=>Is,uri:()=>sn,url:()=>on}),r(19),function(e){e.PARAM="parameter",e.PARAM_CTOR="parameter.constructor",e.PARAM_STC="parameter.static",e.PROP="property",e.PROP_STC="property.static",e.METHOD="method",e.METHOD_STC="method.static",e.CLASS="class"}(e||(e={}));const O=R(((e,t)=>e===t));function E(e,r,n={}){if(function(e,t){return null==e||""===e&&""!==t}(r,e))return e;if(function(e,t){return m(e)||g(e)||c(e)||void 0===t}(r,e))return r;if(Array.isArray(e)){const t=function({reducers:e,parentKey:t}){return e?t&&e[t]?e[t]:e.default||O:O}(n);return[].concat(r).reduce(((e,r)=>t(e,r,n)),[...e])}return[...A(e),...A(r)].reduce(((t,s)=>{const i=E(e&&e[s],r&&r[s],{...n,parentKey:s});return n.cleanUndefinedProps&&void 0===i?t:{...t,[s]:i}}),function(e){return e&&t(e)!==Object?Object.create(e):{}}(e))}function _(e,t){return Object.getOwnPropertyDescriptor(e&&e.prototype||e,t)}function w(e){switch(typeof e){default:return""+e;case"symbol":return e.toString().replace("Symbol(","").replace(")","");case"function":return"function"==typeof(t=e)?t.name:t.constructor.name}var t}r(60);const T="design:paramtypes",x="design:type",C="design:returntype",P=new Map;class M{static get(e,r,n){return Reflect.getMetadata(e,t(r),n)}static getOwn(e,r,n){return Reflect.getOwnMetadata(e,t(r),n)}static getType(e,t){return Reflect.getMetadata(x,e,t)}static getOwnType(e,t){return Reflect.getMetadata(x,e,t)}static getReturnType(e,t){return Reflect.getMetadata(C,e,t)}static getOwnReturnType(e,t){return Reflect.getOwnMetadata(C,e,t)}static has(e,r,n){try{return Reflect.hasMetadata(e,t(r),n)}catch(e){}return!1}static hasOwn(e,r,n){return Reflect.hasOwnMetadata(e,t(r),n)}static delete(e,r,n){return Reflect.deleteMetadata(e,t(r),n)}static setParamTypes(e,t,r){return this.set(T,r,e.prototype,t)}static getTargetsFromPropertyKey=e=>P.has(e)&&P.get(e)||[];static set(e,r,n,s){const i=P.has(e)&&P.get(e)||[],o=t(n);-1===i.indexOf(o)&&(i.push(o),P.set(e,i)),Reflect.defineMetadata(e,r,t(n),s)}static getParamTypes(e,t){return Reflect.getMetadata(T,e,t)||[]}static getOwnParamTypes(e,t){return Reflect.getOwnMetadata(T,e,t)||[]}}const $=new Map;function N(e,...t){if(g(t[0]))return $.has(t[0])||$.set(t[0],new L),$.get(t[0]);{const r=M;return r.hasOwn(e,...t)||r.set(e,new L,...t),r.getOwn(e,...t)}}class L{_entries=new Map;static from(...t){return function(t){const[r,n,i]=t;switch(s(t)){case e.PARAM_CTOR:case e.PARAM_STC:case e.PARAM:const t=N("tsed:param:store",r,n);return t.has(""+i)||t.set(""+i,new L),t.get(""+i);case e.PROP:case e.PROP_STC:return N("tsed:property:store",r,n);case e.METHOD:case e.METHOD_STC:return N("tsed:method:store",r,n);case e.CLASS:return N("tsed:class:store",r)}}(t)}static fromMethod(e,t){return L.from(e,t,_(e,t))}static mergeStoreFrom(e,t,...r){const n=L.from(e,...r);return L.from(t,...r)._entries.forEach(((e,t)=>{n.merge(t,e)})),n}static mergeStoreMethodFrom(e,t,r){return this.mergeStoreFrom(e,t,r,_(e,r))}get(e,t){return this._entries.get(w(e))||t}has(e){return this._entries.has(w(e))}set(e,t){return this._entries.set(w(e),t),this}delete(e){return this._entries.delete(w(e))}merge(e,t,r=!1){let n=this.get(e);return n&&(t=v(t),n=v(n),t=r?E(t,n):E(n,t)),this.set(e,t),this}toJson(){return[...this._entries.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}}function k(e,t){return r=r=>{r.set(e,t)},(...e)=>{const t=L.from(...e),n=r(t);return"function"==typeof n&&n(...e),e[2]};var r}var H,I,j;!function(e){e.PENDING="PENDING",e.CANCELED="CANCELED",e.RESOLVED="RESOLVED",e.REJECTED="REJECTED"}(H||(H={})),function(e){e.STREAM="STREAM",e.BUFFER="BUFFER",e.DATA="DATA"}(I||(I={})),function(e){e.PROD="production",e.DEV="development",e.TEST="test"}(j||(j={}));class D{#e={};on(e,t){return this.#e[e]||(this.#e[e]=[]),this.#e[e].push(t),this}off(e,t){return this.#e[e]&&(this.#e[e]=this.#e[e].filter((e=>e===t))),this}emit(e,t=[],r=null){const n=this.#e[e];if(n?.length)for(const e of n)e.call(r,...t)}alter(e,t,r=[],n=null){const s=this.#e[e];if(s?.length)for(const e of s)t=e.call(n,t,...r);return t}async asyncEmit(e,t=[],r=null){const n=this.#e[e];if(n?.length){const e=n.map((e=>e.call(r,...t)));await Promise.all(e)}}async asyncAlter(e,t,r=[],n=null){const s=this.#e[e];if(s?.length)for(const e of s)t=await e.call(n,t,...r);return t}destroy(){this.#e={}}}const G=Function;r.g.Type=G;class U extends Error{name;constructor(e,t){super(U.buildMessage(e,t))}static buildMessage(e,r){const[n,i,o]=r,a=s(r),c=a.split("/")[0],u="parameter"===c?".["+o+"]":"",p=i?"."+i:"parameter"===c?".constructor":"",l=w(t(n))+p+u;return`${e.name} cannot be used as ${a} decorator on ${l}`}}function K(e){return Array.from(new Set(e).values())}function q(e,t="id"){const r=new Map;return e.forEach((e=>{r.set(e[t],e)})),Array.from(r.values())}function B(e){return function(e){return e&&Object.getPrototypeOf(e)}(e)}function F(e){const r=[];let n=t(e);for(;n&&""!==w(n);)r.unshift(n),n=B(n);return r}function J(e){return t(e)===e?e.prototype:e}function z(e,r){(function(e){const r=new Map;return F(e=t(e)).forEach((e=>{Reflect.ownKeys(J(e)).forEach((t=>{"constructor"!==t&&r.set(t,{target:e,propertyKey:t})}))})),Array.from(r.values())})(e).forEach((({target:n,propertyKey:s})=>{const i=J(e);n!==t(e)&&(Object.defineProperty(i,s,{writable:!0,configurable:!0,value(...e){return J(n)[s].apply(this,e)}}),L.mergeStoreMethodFrom(e,n,s));const o=r(i,s,_(e,s));o&&Object.defineProperty(i,s,o)}))}function W(...e){return(...t)=>{e.filter((e=>!!e)).forEach((e=>{e(...t)}))}}function V(e,t=[]){return Object.entries(e).reduce(((e,[r,n])=>S(r)||t.includes(r)||void 0===n?e:{...e,[r]:n}),{})}function Q(e){return"object"==typeof e}function X(...e){const t=(e=>{const[t,r,n,s="."]=e;return Q(r)||h(t)?{expression:t,scope:r,defaultValue:n,separator:s}:{expression:r,scope:t,defaultValue:n,separator:s}})(e);let r=t.scope;const{expression:n,defaultValue:s,separator:i}=t;if(!n)return r;if(!r)return s;const o=n.split(i),a=e=>{if(r){if(void 0!==r[e]||Q(r)&&e in r)return r[e];if(c(r.get))return r.get(e)}};for(;(r=a(o.shift()))&&o.length;);return void 0===r?s:r}function Z(e){return e&&c(e)&&!e.prototype}function Y(e){return e===Object}function ee(e){return Y(t(e))&&e!==Object}function te(e){return e===Promise||e instanceof Promise||!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}function re(e){return!!e&&!Z(e)&&!(g(e)||d(e)||Y(e)||a(e)||te(e)||o(e)||b(e))}function ne(e){return o(e)||e===Map||e instanceof Map||e===Set||e instanceof Set||e===WeakMap||e instanceof WeakMap||e===WeakSet||e instanceof WeakSet}function se(e,t,r,n="."){const s=t.split(n);for(;i=s.shift(),o=!s.length,!S(i)&&(o?("function"==typeof e.set?e.set(i,r):e[i]=r,0):("function"==typeof e.set?(e.has(i)||e.set(i,{}),e=e.get(i)):e=e[i]=e[i]||{},1)););var i,o}function ie(e){return e?h(e)?t=>t[e]:e:(e,t)=>String(t)}const oe=new Map;function ae(e,t){return oe.set(e,t)}function ce(e){if(!oe.has(e))throw new Error(`JsonSchema ${e} mapper doesn't exists`);return oe.get(e)}function ue(e,t,r,n){return ce(e)(t,r,n)}function pe(e){return oe.has(e)}const le=new Map;class he{propertyKey;propertyName;index;descriptor;decoratorType;collectionType;token;store;isStore=!0;parent;target;_type;_schema;constructor(e){const{target:t,propertyKey:r,descriptor:n,index:s,decoratorType:i}=e;this.target=t,this.propertyKey=r,this.propertyName=String(r),this.descriptor=n,this.index=s,this.decoratorType=i,this.token=t,this.store=e.store,this.parent=this}get targetName(){return w(this.token)}get isCollection(){return!!this.collectionType}get isArray(){return o(this.collectionType)}get discriminatorAncestor(){const e=F(this.target).find((e=>he.from(e).schema.isDiscriminator));return e&&he.from(e)}get isPrimitive(){return d(this._type)}get isDate(){return a(this.computedType)}get isObject(){return Q(this.computedType)}get isClass(){return re(this.computedType)}get schema(){return this._schema}get nestedGenerics(){return this.schema.nestedGenerics}set nestedGenerics(e){this.schema.nestedGenerics=e}get type(){return this._type}set type(e){this._type=e,this.build()}get computedType(){return this.itemSchema.getComputedType()}get itemSchema(){return this.isCollection?this.schema.itemSchema():this.schema}get parentSchema(){return this.parent.schema}get isDiscriminatorChild(){return this.schema.isDiscriminator&&this.discriminatorAncestor?.schema.discriminator().base!==this.target}static from(...e){if(e[0].isStore)return e[0];const r=e[0];e.length>1&&(e[0]=J(e[0]));const n=L.from(...e);if(!n.has("JsonEntityStore")){const i=s(e),o=le.get(i);if(!o)throw Error("Unsupported json entity type");const a=new o({store:n,decoratorType:i,target:t(r),propertyKey:e[1],index:"number"==typeof e[2]?e[2]:void 0,descriptor:"object"==typeof e[2]?e[2]:void 0});a.build(),n.set("JsonEntityStore",a)}return n.get("JsonEntityStore")}static fromMethod(e,t){return this.from(e,t,_(e,t))}static get(e,t,r){return he.from(J(e),t,r)}isGetterOnly(){return Q(this.descriptor)&&!this.descriptor.value&&this.descriptor.get&&!this.descriptor.set}get(e,t){return this.store.get(e,t)}set(e,t){return this.store.set(e,t)}toString(){return[this.targetName,this.propertyName,this.index].filter((e=>void 0!==e)).join(":")}buildType(e){ne(e)?this.collectionType=e:(this._type=e,this._type&&ee(this._type)&&(this._type=String))}}var fe=function(){return fe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},fe.apply(this,arguments)};function de(e,t,r,n){var s,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function me(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function ye(e){return te(e)?Object:re(e)||g(e)||d(e)||Y(e)||a(e)||ne(e)?t(e):Z(e)?e():e}Object.create,Object.create;const ge=["string","number","integer","boolean","object","array","null","any"];function be(e){return null===e?"null":d(e)?ge.indexOf(e)>-1?e:"string"==typeof e?"file"===e?"file":"generic":f(t=e)?"string":l(t)?"number":u(t)?"boolean":"any":e===Array?"array":i(e)?e.map(be):e===Set?"array":a(e)||b(e)?"string":"object";var t}const ve=e=>Q(e)&&null!==e?Object.entries(e).reduce(((e,[t,r])=>isNaN(+t)?e.concat(r):e),[]):e;function Se(e){const t=e.reduce(((e,t)=>e.concat(ve(t))),[]),r=t.reduce(((e,t)=>e.add((e=>null===e?"null":typeof e)(t))),new Set);return{values:K(t),types:r}}function Ae(e){return String(e).replace(/^(\/)(.*)(\/)$/,"$2")}class Re{propertyName;base;values=new Map;types=new Map;constructor({base:e,propertyName:t,types:r,values:n}={}){Object.assign(this,V({base:e,propertyName:t,types:r?new Map(r):void 0,values:n?new Map(n):void 0}))}add(e,t){return t.forEach((t=>{this.values.set(t,e)})),this.types.set(e,t),this}getType(e){return this.values.get(e)||this.base}getValues(e){return this.types.get(e)}getDefaultValue(e){const t=this.types.get(e);return t?t[0]:void 0}children(){return[...new Set([...this.types.keys()])]}}function Oe(e){return e instanceof _e?e:Object.entries(e).reduce(((e,[t,r])=>(e[Ae(t)]=Ee(r),e)),{})}function Ee(e){return i(e)?e.map(Ee):e.isStore||e.isJsonSchema||e.isLazyRef?e:t(e)!==Object&&re(e)?he.from(e).schema:Q(e)?_e.from(e):y(e)?_e.from({type:e}):e}class _e extends Map{isJsonSchema=!0;$hooks=new D;$required=new Set;$allow=[];$selfRequired;$forwardGroups=!1;isDiscriminatorKey=!1;isDiscriminator=!1;#t=!1;#r=null;#n;#s=[];#i=new Map;#o;#a;#c=!1;#u=!1;#p=!1;constructor(e={}){super(),e&&this.assign(e)}get alias(){return this.#i}get nestedGenerics(){return this.#s}set nestedGenerics(e){this.#s=e}get genericLabels(){return this.#n}set genericLabels(e){this.#n=e}get isClass(){return re(this.class)&&![Map,Array,Set,Object,Date,Boolean,Number,String].includes(this.#a)}get isCollection(){return this.#u}get isGeneric(){return this.#c}get discriminatorAncestor(){const e=F(this.#a).find((e=>he.from(e).schema.isDiscriminator));return e&&he.from(e).schema}get hasGenerics(){return!(!this.nestedGenerics||!this.nestedGenerics.length)}get genericType(){return this.get("$ref")}get class(){return this.getComputedType()}get canRef(){return this.#p}get isNullable(){return this.#t||this.$allow.includes(null)}get isReadOnly(){return this.get("readOnly")}get isWriteOnly(){return this.get("writeOnly")}static from(e={}){return new _e(e)}nullable(e){this.#t=e}itemSchema(e={}){return this.#o=this.#o||Ee(e),this.#o.assign(e),this.#o}getAliasOf(e){return this.#i.get(e)}addAlias(e,t){return this.#i.set(e,t),this.#i.set(t,e),this}removeAlias(e){const t=this.#i.get(e);return t&&this.#i.delete(t),this.#i.delete(e),this}$id(e){return super.set("$id",e),this}$ref(e){return super.set("$ref",e),this}$schema(e){return super.set("$schema",e),this}label(e){return this.#p=!0,super.set("name",e),this}name(e){return super.set("name",e),this}ignore(e){if("boolean"==typeof e){const t=e;e=()=>t}return this.$hooks.on("ignore",e),this}default(e){return super.set("default",e),this}const(e){return super.set("const",e),this}description(e){return super.set("description",e),this}discriminator(){return this.isDiscriminator=!0,this.#r=this.#r||new Re({base:this.#a})}discriminatorKey(e){return this.discriminator().propertyName=e,this.isDiscriminator=!0,this}discriminatorValue(...e){const t=this.discriminatorAncestor.discriminator();t.add(this.#a,e),this.isDiscriminator=!0;const r=this.get("properties"),n=r[t.propertyName]||new _e({type:"string"});return 1===e.length?(n.const(e[0]),n.examples([e[0]])):(n.enum(...e),n.examples(e)),r[t.propertyName]=n,this.set("properties",r),this}additionalItems(e){return super.set("additionalItems",Ee(e)),this}contains(e){return super.set("contains",Ee(e)),this}examples(e){return super.set("examples",e),this}example(...e){return this.examples(e)}items(e){return super.set("items",this.#o=Ee(e)),this}maxItems(e){return super.set("maxItems",e),this}minItems(e){return super.set("minItems",e),this}uniqueItems(e){return super.set("uniqueItems",e),this}maxProperties(e){return super.set("maxProperties",e),this}minProperties(e){return super.set("minProperties",e),this}allow(...e){return this.$allow.push(...e),this}required(e=!0){if(!i(e)){const t=this.clone();return t.$selfRequired=e,t}return this.$required.clear(),e.forEach((e=>this.$required.add(e))),this}addRequired(e){return this.$required.add(e),this}removeRequired(e){return this.$required.delete(e),this}isRequired(e){return this.$required.has(e)}properties(e){return super.set("properties",Oe(e)),this}addProperty(e,t){const r=this.get("properties")||{};return r[e]=t,super.set("properties",Oe(r)),this}patternProperties(e){return super.set("patternProperties",Oe(e)),this}additionalProperties(e){return super.set("additionalProperties",Ee(e)),this}unknown(e=!0){return this.additionalProperties(e)}dependencies(e){return super.set("dependencies",Oe(e)),this}propertyNames(e){return super.set("propertyNames",Ee(e)),this}enum(e,...t){const{values:r,types:n}=Se([e,t].flat());return super.set("enum",r).any(...n),this}definitions(e){return super.set("definitions",Oe(e)),this}allOf(e){return super.set("allOf",e.map(Ee)),this}anyOf(e){return super.set("anyOf",e.map(Ee)),this}oneOf(e){let t=e.map(Ee);if(1===t.length&&!(e[0]instanceof _e)){if(!t[0].#r)return this.type(e[0]);const r=t[0].discriminator().children();t=r.map(Ee)}super.set("oneOf",t);const r=t[0];if(r.isDiscriminator){const e=r.discriminatorAncestor.discriminator(),{propertyName:t}=e;super.set("discriminator",{propertyName:t}),this.isDiscriminator=!0,this.#r=e}return this}not(e){return super.set("not",Ee(e)),this}multipleOf(e){return super.set("multipleOf",e),this}maximum(e){return super.set("maximum",e),this}exclusiveMaximum(e){return super.set("exclusiveMaximum",e),this}minimum(e){return super.set("minimum",e),this}exclusiveMinimum(e){return super.set("exclusiveMinimum",e),this}maxLength(e){return super.set("maxLength",e),this}minLength(e){return super.set("minLength",e),this}pattern(e){return super.set("pattern",Ae(e)),this}format(e){return super.set("format",e),this}type(e){switch(e){case Map:super.set("type",be(e)),this.#a=e,this.#u=!0,this.has("additionalProperties")||super.set("additionalProperties",this.itemSchema({}));break;case Array:super.set("type",be(e)),this.#a=e,this.#u=!0,this.has("items")||super.set("items",this.itemSchema({}));break;case Set:super.set("type",be(e)),this.#a=e,this.#u=!0,this.uniqueItems(!0),this.has("items")||super.set("items",this.itemSchema({}));break;case"integer":super.set("type",be(e)),this.integer();break;case Object:case Date:case Boolean:case Number:case String:super.set("type",be(e)),this.#a=e,this.has("properties")||super.set("properties",{});break;default:if(re(e)||c(e))super.set("type",void 0),this.#a=e,this.has("properties")||super.set("properties",{});else{const t=be(e);"generic"===t?(this.#c=!0,super.set("$ref",e)):super.set("type",t)}}return this}any(...e){return e.filter((e=>re(e))).length>=2?this.oneOf(e.filter((e=>null!==e&&(this.nullable(!0),!0)))):(e.length?(e=K(e).map(be)).includes("null")&&(this.nullable(!0),e=e.filter((e=>"null"!==e))):(e=["integer","number","string","boolean","array","object"],this.nullable(!0)),this.type(1===e.length?e[0]:e)),this}integer(){return super.set("type","integer"),super.set("multipleOf",1),this}title(e){return super.set("title",e),this}readOnly(e){return super.set("readOnly",e),this}writeOnly(e){return super.set("writeOnly",e),this}customKey(e,t){return super.set(`#${e}`,t),this}toObject(e){return this.toJSON(e)}toJSON(e){let t=!1;e||(t=!0,e={schemas:{}});const r=ue("schema",this,e);return t&&e.schemas&&Object.keys(e.schemas).length&&(r.definitions=e.schemas),r}assign(e={}){return(e instanceof _e?[...e.entries()]:Object.entries(e)).forEach((([e,t])=>{this.set(e,t)})),e instanceof _e&&(this.$selfRequired=e.$selfRequired,this.$allow.push(...e.$allow),e.$required.forEach((e=>{this.$required.add(e)})),this.#r=this.#r?new Re(this.#r):null,this.isDiscriminator=e.isDiscriminator,this.isDiscriminatorKey=e.isDiscriminatorKey,this.#p=e.#p,this.#i=new Map(this.#i.entries()),e.#n&&(this.#n=[...e.#n]),this.#s=e.#s.map((e=>[...e])),this.#a=e.#a,this.#c=e.#c,this.#u=e.#u,this.#p=e.#p,super.set("type",e.get("type"))),this}set(e,t){return e in this?c(this[e])&&this[e](t):super.set(e,t),this}getComputedType(){return ye(this.#a)}getComputedItemType(){return this.#o?this.#o.getComputedType():this.getComputedType()}getJsonType(){return this.get("type")||be(this.getComputedType())}getTarget(){return this.#a}getName(){return this.get("name")||(this.#a?w(t(this.getComputedType())):"")}clone(){return new _e(this)}}function we(e){return t=>{le.set(e,t)}}let Te=class extends he{children=new Map;get path(){return this.store.get("path","/")}set path(e){this.store.set("path",e)}build(){this._type||this.buildType(this.target),this._type=this._type||Object,this._schema=_e.from({type:this.type})}};Te=de([we(e.CLASS)],Te);let xe=class extends he{parent=he.from(this.target);get required(){return this.parent.schema.isRequired(this.propertyKey)}set required(e){e?this.parent.schema.addRequired(this.propertyKey):this.parent.schema.removeRequired(this.propertyKey)}get allowedRequiredValues(){return this.schema.$allow}discriminatorKey(){return this.parent.schema.discriminatorKey(String(this.propertyKey)),this.itemSchema.isDiscriminatorKey=!0,this}isDiscriminatorKey(){return this.itemSchema.isDiscriminatorKey}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}build(){this._type||this.buildType(M.getType(J(this.target),this.propertyKey)),this._type=this._type||Object;let e=this.parent.schema.get("properties")[this.propertyName];e||(this.parent.children.set(this.propertyName,this),e=_e.from({type:this.collectionType||this.type}),this.collectionType&&e.itemSchema(this.type)),this.parent.schema.addProperty(this.propertyName,e),this._schema=e}static get(e,t){return he.from(J(e),t)}};xe=de([we(e.PROP)],xe);const Ce=xe;function Pe(e,t){return e.reduce(((e,r,n)=>e.set(r,t[n])),new Map)}function Me(e){if(e.genericLabels&&e.genericTypes){const{genericLabels:t,genericTypes:r,...n}=e;return{...n,generics:Pe(t,r)}}return e}function $e(e){const[t,...r]=e.nestedGenerics;return{genericTypes:t,nestedGenerics:r}}class Ne extends Map{constructor(e={}){super(),this.assign(e)}assign(e={}){return Object.entries(e).forEach((([e,t])=>{c(this[e])?this[e](t):this.set(e,t)})),this}toJSON(e={}){return ue("map",this,e)}}var Le;function ke(e){return String(e).toLowerCase().replace("raw_","").replace("cookies","cookie")}function He(e){return Object.values(Le).includes(ke(e))}function Ie(e){return e.toLowerCase()}!function(e){e.BODY="body",e.PATH="path",e.QUERY="query",e.HEADER="header",e.COOKIES="cookie",e.FILES="files"}(Le||(Le={}));var je,De=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Ge=/[^A-Z0-9]+/gi;function Ue(e,t){void 0===t&&(t={});for(var r=t.splitRegexp,n=void 0===r?De:r,s=t.stripRegexp,i=void 0===s?Ge:s,o=t.transform,a=void 0===o?Ie:o,c=t.delimiter,u=void 0===c?" ":c,p=Ke(Ke(e,n,"$1\0$2"),i,"\0"),l=0,h=p.length;"\0"===p.charAt(l);)l++;for(;"\0"===p.charAt(h-1);)h--;return p.slice(l,h).split("\0").map(a).join(u)}function Ke(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((function(e,t){return e.replace(t,r)}),e)}function qe(e,t){var r=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function Be(e,t){return void 0===t&&(t={}),Ue(e,fe({delimiter:"",transform:qe},t))}function Fe(e,t){return t.groups&&t.groups.length?Be(`${e} ${t.groups.join(" ")}`):e}function Je(e,t,r){const n=function(e){const{host:t="#/"+("openapi3"===e.specType?"components/schemas":"definitions")}=e;return t}(r),s={$ref:`${n}/${e}`},i=t.isNullable,o=t.isReadOnly,a=t.isWriteOnly;if(i||o||a)switch(r.specType){case je.OPENAPI:return V({nullable:!!i||void 0,readOnly:!!o||void 0,writeOnly:!!a||void 0,oneOf:[s]});case je.JSON:return V({readOnly:o,writeOnly:a,oneOf:[s]})}return s}function ze(e,t,r){const n=Fe(e.getName(),r);return r.schemas[e.getName()]=t,Je(n,e,r)}!function(e){e.JSON="jsonschema",e.SWAGGER="swagger2",e.OPENAPI="openapi3"}(je||(je={}));class We extends Ne{nestedGenerics=[];groups;$schema;expression;getName(){const e=this.get("name");return"files"===this.get("in")?e.split(".")[0]:e}name(e){return this.set("name",e),this}examples(e){return super.set("examples",e),this}description(e){return this.set("description",e),this}in(e,t=""){return this.set("in",ke(e)),this.expression=t,this}required(e){return this.set("required",e),this}schema(e){return this.$schema=e,this}toJSON(e={}){if(!He(this.get("in")))return null;const t=function(e,t){if(i(e)){const t=ie("id");return e.reduce(((e,r,n)=>([].concat(t(r,n)).forEach((t=>e.set(t,r))),e)),new Map)}const r=ie(t);return Object.entries(e).reduce(((e,[t,n])=>e.set(r(n,t),n)),new Map)}(e.schemas||{});return this.build({...e,groups:this.groups},t)}build(e,t){const{type:r,schema:n,...s}=super.toJSON(e),i=ue("item",this.$schema,{...e,...$e(this)});switch(s.required=s.required||this.get("in")===Le.PATH,this.get("in")){case Le.FILES:return this.getFileSchema(i,s);case Le.QUERY:if(i.$ref){if(!s.name)return this.refToParameters(s,e,t);s.style="deepObject"}}return s.schema=i,s}getFileSchema(e,t){const r={type:"string",format:"binary",oneOf:void 0};return"array"===e.type?(e.items=V({...e.items,...r}),t.schema=e):t.schema=V({...e,...r}),t}refToParameters(e,t,r){const n=Fe(this.$schema.getName(),t),s=t.schemas[n];return t.schemas[n]&&!r.has(n)&&delete t.schemas[this.$schema.getName()],Object.entries(s.properties||{}).reduce(((t,[r,{description:n,...i}])=>[...t,V({...e,name:r,required:(s.required||[]).includes(r),description:n,schema:i,style:i.$ref?"deepObject":void 0})]),[])}}let Ve=class extends he{paramType;expression;dataPath;pipes;parameter=new We;parent=he.fromMethod(this.target,this.propertyKey);constructor(e){super(e),this.pipes=e.pipes||[],this.paramType=e.paramType||this.paramType,this.expression=e.expression||this.expression,this.dataPath=e.dataPath||this.dataPath}get nestedGenerics(){return this.parameter.nestedGenerics}set nestedGenerics(e){this.parameter.nestedGenerics=e}get required(){return!!this.parameter.get("required")}set required(e){this.parameter.required(e)}get allowedRequiredValues(){return this.schema.$allow}static getParams(e,t){const r=[],n=F(e).reverse().find((e=>function(e,t){return _(e,t)?.value}(e,t)&&he.fromMethod(e,t).children.size));return n?(he.fromMethod(n,t).children.forEach(((e,t)=>{r[+t]=e})),r):[]}static get(e,t,r){return he.from(J(e),t,r)}isRequired(e){return this.required&&[void 0,null,""].includes(e)&&!this.allowedRequiredValues.includes(e)}getSchema(e){return ne(e)||!re(e)?_e.from({type:e}):he.from(e).schema}build(){if(!this._type){const e=M.getParamTypes(J(this.target),this.propertyKey)[this.index];this.buildType(e)}this._type=this._type||Object,this._schema||(this.parent.children.set(this.index,this),this._schema=this.getSchema(this.collectionType||this.type),this.parameter.schema(this._schema),this.collectionType&&this._schema.itemSchema(this.getSchema(this.type)),this.parent.operation.addParameter(this.index,this.parameter))}};Ve=de([we(e.PARAM),me("design:paramtypes",[Object])],Ve);const Qe=Ve;var Xe=r(203),Ze=r.n(Xe);function Ye(e){return e.toUpperCase()}const et=Ze().codes.reduce(((e,t)=>{const r=String(Ze()(t));return{...e,[String(t)]:{label:r,code:(n=r,void 0===s&&(s={}),Ue(n,fe({delimiter:"_",transform:Ye},s)))}};var n,s}),{});function tt(e){return et[e]?.code}function rt(e){return et[e]?.label}et[200].label="Success",et[200].code="SUCCESS";const nt=e=>Number(e)&&200<=Number(e)&&Number(e)<300,st=e=>Number(e)&&300<=Number(e)&&Number(e)<400;function it(e,t=Ne){return Object.entries(e).reduce(((e,[r,n])=>(e.set(r,new t(n)),e)),new Ne)}class ot extends Ne{constructor(e={}){super(e),this.content(e.content||{})}description(e){return this.set("description",e),this}content(e){return this.set("content",it(e)),this}addContent(e,t,r){const n=this.get("content"),s=new Ne;return s.set("schema",t),r&&s.set("examples",r),n.set(e,s),this}required(e){return this.set("required",e),this}}function at(e){return Object.keys(e).reduce(((t,r)=>{const n=e[r];let s=typeof n,i={example:n};return"object"===s&&(i=n,i.example=void 0===i.value?i.example:i.value,delete i.value,s=typeof i.example),i.type=i.type||s,t[r]=V(i),t}),{})}class ct extends Ne{groups=[];allowedGroups;schema(e){return this.set("schema",e),this}examples(e){return this.set("examples",e),this}toJSON(e={}){let t=[...this.groups||[]];return super.toJSON({...e,groups:t})}}class ut extends Ne{status;constructor(e={}){super(e),this.content(e.content||{})}description(e){return this.set("description",e),this}headers(e){return this.set("headers",at(e)),this}content(e){return this.set("content",it(e,ct)),this}getContent(){return this.get("content")}getMedia(e,t=!0){return t&&this.addMedia(e),this.getContent()?.get(e)}addMedia(e){const t=this.get("content");return t.has(e)||t.set(e,new ct),this}toJSON(e={}){const t=super.toJSON(e);return 204===this.status&&delete t.content,t.headers&&Object.entries(t.headers).forEach((([e,{type:r,...n}])=>{t.headers[e]={...n,schema:{type:r}}})),t}}class pt extends Ne{operationPaths=new Map;#l;#h=!1;constructor(e={}){super({parameters:[],responses:new Ne,...e})}get response(){return this.getResponses().get(this.getStatus().toString())}get status(){return this.#l}tags(e){return super.set("tags",e),this}addTags(e){return e=q([...this.get("tags")||[],...e],"name"),this.tags(e)}summary(e){return super.set("summary",e),this}operationId(e){return this.set("operationId",e),this}responses(e){return this.set("responses",e),this}defaultStatus(e){return this.#l=e,this}getStatus(){return this.#l||200}setRedirection(e=302){return this.#h=!0,this.#l=e,this}isRedirection(e){return this.#h&&e?st(e):this.#h}addResponse(e,t){if((nt(e)||st(e))&&!this.#l){const t=this.getResponseOf(200);this.getResponses().set(e.toString(),t).delete("200"),this.defaultStatus(Number(e))}const r="default"===e?this.getStatus().toString():e.toString(),n=this.getResponses().get(r);return n?(t.forEach(((e,t)=>{["content"].includes(t)||n.set(t,E(n.get(t),e))})),n.status=Number(r)):(t.status=Number(r),this.getResponses().set(r,t)),this}getResponses(){return this.get("responses")}getResponseOf(e){return("default"===e?this.response:this.getResponses().get(String(e)))||new ut}ensureResponseOf(e){return this.addResponse(e,this.getResponseOf(e)),this.getResponseOf(e)}getHeadersOf(e){return this.getResponseOf(e).get("headers")||{}}getContentTypeOf(e){return[...this.getResponseOf(e).get("content").keys()].slice(-1)[0]}security(e){return this.set("security",e),this}addSecurityScopes(e,t){const r=this.get("security")||{};return r[e]=K([...r[e]||[],...t]),this.security(r)}description(e){return super.set("description",e),this}deprecated(e){return super.set("deprecated",e),this}parameters(e){return super.set("parameters",e),this}addParameter(e,t){-1===e&&(e=this.get("parameters").length),this.get("parameters")[e]=t}consumes(e){return super.set("consumes",e),this}produces(e){return super.set("produces",e),this}addProduce(e){const t=K([].concat(this.get("produces"),e)).filter(Boolean);this.set("produces",t)}addOperationPath(e,t,r={}){return this.operationPaths.set(String(e)+String(t),{...r,method:e,path:t}),this}toJSON(e={}){const t=super.toJSON({...e,ignore:["parameters"]}),r=[],n=[];if(t.security&&(t.security=[].concat(t.security)),this.get("parameters").forEach((t=>{He(this.get("in"))||t.get("in")&&([Le.BODY,Le.FILES].includes(t.get("in"))?r.push(t):n.push(...[].concat(t.toJSON(e))))})),t.parameters=n.filter(Boolean),0===this.get("responses").size&&(t.responses={200:{description:rt(200)}}),r.length){const n=function(e,t){let r=new _e;const n={},s=[];let i=0;return e.forEach((e=>{const o=e.getName();Array.from(e.entries()).filter((([e])=>!["in","name"].includes(e))).forEach((([e,t])=>{void 0===n[e]&&(n[e]=t)}));const a=e.toJSON(t);o?(r.addProperty(o,a.schema||{type:a.type}),e.get("required")&&r.addRequired(o),i++):s.push(a)})),i||1!==s.length?(r.type("object"),{schema:r.toJSON(t),required:!1,...n}):s[0]}(r,e);t.requestBody=function(e,{schema:t,examples:r,in:n,...s}){const i=new ot(s);return(e.get("consumes")?.length?e.get("consumes"):["application/json"]).forEach((e=>{i.addContent(e,t,r)})),i}(this,n).toJSON(e)}return delete t.consumes,delete t.produces,t}}let lt=class extends he{parent=he.from(this.target);middlewares=[];beforeMiddlewares=[];afterMiddlewares=[];operation=new pt;children=new Map;constructor(e){super({store:L.fromMethod(e.target,e.propertyKey),descriptor:_(e.target,e.propertyKey),...e});const{beforeMiddlewares:t=[],middlewares:r=[],afterMiddlewares:n=[]}=e;this.after(n),this.before(t),this.use(r)}get params(){return this.parameters}get view(){return this.store.get("view")}set view(e){this.store.set("view",e)}get acceptMimes(){return this.store.get("acceptMimes",[])}set acceptMimes(e){this.store.set("acceptMimes",e)}get parameters(){return[...this.children.values()]}get operationPaths(){return this.operation.operationPaths}static get(e,t,r){return r=r||_(J(e),t),he.from(J(e),t,r)}getResponseOptions(e,{contentType:t="application/json",includes:r}={}){const n=this.operation.getResponseOf(e).getMedia(t,!1);if(n&&n.has("schema")){const e=n.get("schema");let t=n.groups;return r&&n.allowedGroups?.size&&(t=[...t||[],...r.filter((e=>n.allowedGroups.has(e)))]),{type:e.getComputedItemType(),groups:t}}return{type:this.type}}before(e){return this.beforeMiddlewares=this.beforeMiddlewares.concat(e).filter(c),this}after(e){return this.afterMiddlewares=this.afterMiddlewares.concat(e).filter(c),this}use(e){return this.middlewares=this.middlewares.concat(e).filter(c),this}get(e){return E(L.from(this.target).get(e),this.store.get(e))}getParamTypes(){return[...this.children.values()].reduce(((e,t)=>({...e,[t.paramType]:!0})),{})}build(){if(!this._type){let e=M.getReturnType(this.target,this.propertyKey);e=te(e)?void 0:e,this.buildType(e)}this._type=this._type||Object,this.parent.children.set(this.propertyName,this),ne(this._type)&&(this.collectionType=this._type,delete this._type),this._schema=_e.from({type:this.collectionType||this.type}),this.collectionType&&this._schema.itemSchema(this.type),this.parent.schema.addProperty(this.propertyName,this.schema)}};lt=de([we(e.METHOD),me("design:paramtypes",[Object])],lt);const ht=lt;function ft(...e){return he.from(...e)}le.set(e.CLASS,Te),le.set(e.PROP,xe),le.set(e.PARAM,Ve),le.set(e.METHOD,lt);class dt{getType;isLazyRef=!0;constructor(e){this.getType=e}get target(){return this.getType()}get schema(){return ft(this.getType()).schema}get name(){return w(this.getType())}toJSON(e){return this.getType()&&ue("schema",this.schema,e)}}function mt(e,t={}){if("object"!=typeof e||null===e)return e;if(e instanceof dt)return ue("lazyRef",e,t);if("toJSON"in e){const r=e.toJSON(Me(t));return e.canRef?ze(e,r,t):r}return ue("object",e,t)}function yt(e,t){const r=he.from(e.class),n=Fe(r.schema.getName()||e.getName(),t);if(e.hasGenerics){const{type:n,properties:s,additionalProperties:i,items:o,...a}=e.toJSON(t),c={...ue("any",r.schema,{...t,...$e(e),root:!1}),...a};if(c.title){const r=Fe(c.title,t);return t.schemas[r]=c,delete c.title,Je(r,e,t)}return c}return t.schemas&&!t.schemas[n]&&(t.schemas[n]={},t.schemas[n]=ue("any",r.schema,Me({...t,root:!1}))),Je(n,e,t)}function gt(e,t){const{generics:r}=t;if(r&&e.$ref&&r.has(e.$ref)){let n=r.get(e.$ref);if(y(n))return{type:be(n)};if(n===Date)return{type:"string",format:"date-time"};if(n.toJSON)return n.toJSON({...t,generics:void 0});if(n===Object)return{type:"object"};if(re(n)){const e={class:n};return 0===t.nestedGenerics.length?ue("class",e,{...t,generics:void 0}):ue("schema",he.from(e.class).schema,{...t,...$e(t),root:!1})}}return e}function bt(e){const t=e.isStore?e:ft(e);return t.$inherited||(t.$inherited=F(t.target).reverse().reduce(((e,t)=>e.set(t,ft(t))),new Map)),t.$inherited}function vt(e,{target:r,...n}){const s=Array.from(bt(r).entries()).filter((([e])=>t(e)!==t(r)));if(s.length){const t=s.reduce(((e,[,t])=>E(e,ue("schema",t.schema,n))),{});e=E(t,e)}return e}function St(e,t){return e&&e.isClass?ue("class",e,t):ue("any",e,t)}function At(e,t){const r=e.name;if(t.$refs?.find((t=>t===e.target)))return Je(r,e.schema,t);t.$refs=[...t.$refs||[],e.target];const n=e.toJSON(Me(t));return ze(e.schema,n,t)}function Rt(e,{ignore:t=[],...r}){return r=Me(r),Array.from(e.entries()).reduce(((e,[n,s])=>(t.includes(n)||(e[n]=ue("item",s,r)),e)),{})}function Ot(e,t){let r=e?.$hooks?.alter("ignore",!1,[t]);return r||(!1!==t.groups?e?.$hooks?.alter("groups",!1,[t.groups]):r)}function Et(e,t,r){if(!t?.isNullable)return e;let n=[].concat(e.type).filter(Boolean);switch(r.specType){default:case je.JSON:e.discriminator||(e.oneOf?function(e){return e.oneOf.find((e=>"null"===e.type))}(e)||e.oneOf.unshift({type:"null"}):e.type=K(["null",...n]));break;case je.OPENAPI:e.nullable=!0,e.oneOf||(n.length>1?(e.oneOf=n.map((e=>({type:e}))),delete e.type):e.type=n[0])}return e}function _t(e,t){const{specType:r,operationIdFormatter:n,root:s,schemas:o,genericTypes:a,nestedGenerics:c,useAlias:u,genericLabels:p,...l}=t;return Object.entries(e).reduce(((r,[n,s])=>{if(!1!==t.withIgnoredProps&&!Ot(s,l)){const i={...t,groups:e?.$forwardGroups||s?.$forwardGroups?t.groups:void 0};r[n]=ue("item",s,i),r[n]=Et(r[n],s,i)}return r}),i(e)?[]:{})}function wt(e,t,r){return e.map((e=>ue("item",e,{...t,genericLabels:r.genericLabels})))}function Tt(e,t,r){return e.isClass?ue("class",e,t):ue("any",e,{...t,genericLabels:r.genericLabels})}function xt(e,t){return Object.entries(e).reduce(((e,[r,n])=>(e[r=t.get(r)||r]=n,e)),{})}function Ct(e,t,r){return!1!==r.groups?t?.$hooks?.alter("requiredGroups",e,[r.groups]):e}function Pt(e,t,r){if(r.groups&&r.groups.includes("partial"))return e;let n=function(e,t,r){let n=e.required||[];return n=[...n,...t.$required],t.get("properties")&&(n=Object.entries(t.get("properties")).reduce(((e,[t,r])=>r&&void 0!==r.$selfRequired?r.$selfRequired?e.concat(t):e.filter((e=>e===t)):e),n)),Ct(K(n),t,r)}(e,t,r);return n=K(n).reduce(function(e,t,r={}){const{useAlias:n}=r,s=Object.keys(e.properties||{});return(r,i)=>{const o=n&&t.alias.get(i)||i;if(s.includes(o)){const n=t.get("properties")[i],s=e.properties[o];return e.properties[o]=function(e,t){if(!t?.$allow.includes("")&&[].concat(t?.get("type")).includes("string")){const t=e?.minLength;if(void 0===t)return{...e,minLength:1}}return e}(s,n),r.concat(o)}return r}}(e,t,r),[]),e.discriminator&&n.push(e.discriminator.propertyName),n.length?{...e,required:n}:e}function Mt(e,t,r){return e.oneOf&&!1!==r.groups&&(e={...e,oneOf:t.$hooks.alter("oneOf",e.oneOf,[r.groups])}),!(e.oneOf||e.allOf||e.anyOf)||e.items||e.properties||delete e.type,e}ae("any",mt),ae("class",yt),ae("generics",gt),ae("inheritedClass",vt),ae("item",St),ae("lazyRef",At),ae("map",Rt),ae("object",_t),ae("anyOf",wt),ae("allOf",wt),ae("oneOf",wt),ae("properties",Tt),ae("items",Tt),ae("additionalProperties",Tt),ae("propertyNames",Tt),ae("contains",Tt),ae("dependencies",Tt),ae("patternProperties",Tt),ae("additionalItems",Tt),ae("not",Tt),ae("definitions",Tt);const $t=["name","$required","$hooks","_nestedGenerics",je.OPENAPI,je.SWAGGER,je.JSON],Nt=["const"];function Lt(e,t){const{useAlias:r=!0,schemas:n={}}=t;t={...t,useAlias:r,schemas:n};let s=[...e.keys()].filter((e=>!function(e,{specType:t=je.JSON,customKeys:r=!1}){return $t.includes(e)||e.startsWith("#")&&(!1===r||t!==je.JSON)||t!==je.JSON&&Nt.includes(e)}(e,t))).reduce(((n,s)=>{let i=e.get(s);if("type"===(s=s.replace(/^#/,"")))return{...n,[s]:e.getJsonType()};if(function(e,t,r){return"examples"===e&&Q(t)&&je.OPENAPI===r.specType}(s,i,t)&&(s="example",i=Object.values(i)[0]),i&&"object"==typeof i&&pe(s)){if(i=ue(s,i,t,e),function(e,t){return"object"==typeof t&&["items","properties","additionalProperties"].includes(e)&&0===Object.keys(t).length}(s,i))return n;(function(e,t,r){return"object"==typeof t&&r&&["properties","additionalProperties"].includes(e)})(s,i,r)&&(i=xt(i,e.alias))}return{...n,[s]:i}}),{});return e.isClass&&(s=ue("inheritedClass",s,{...t,root:!1,schemas:n,target:e.getComputedType()})),s=ue("generics",s,{...t,root:!1,schemas:n}),e.has(t.specType)&&(s={...s,...e.get(t.specType).toJSON(t)}),s=Pt(s,e,{...t,useAlias:r}),s=Et(s,e,t),s=Mt(s,e,t),s}ae("schema",Lt);const kt=["all","checkout","connect","copy","delete","get","head","lock","merge","mkactivity","mkcol","move","m-search","notify","options","param","patch","post","propfind","propatch","purge","put","report","search","subscribe","trace","unlock","unsuscribe"];var Ht,It;function jt(e){return(...t)=>{const r=e(ft(...t),t);"function"==typeof r&&r(...t)}}function Dt(...e){return jt((t=>{t.store.set("childrenControllers",e),e.forEach((e=>{L.from(e).set("parentController",t.token)}))}))}function Gt(e,...t){return jt((r=>{var n,s;e=e||(n=r.targetName,void 0===s&&(s={}),function(e,t){return void 0===t&&(t={}),Ue(e,fe({delimiter:"."},t))}(n,fe({delimiter:"_"},s))),r.discriminatorAncestor&&r.schema.discriminatorValue(e,...t)}))}function Ut(e,t){if(!e)throw new Error("A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.");const r={};let n=!1;const s=(...s)=>{const i=he.from(...s);t&&(i.collectionType=t,i.schema.type(t)),i.type=e,i.itemSchema.type(e),i.schema.assign(r),i.isArray&&n&&(i.schema.set("contains",i.schema.get("items")),i.schema.delete("items"))};return s.MinItems=e=>(r.minItems=e,s),s.MaxItems=e=>(r.maxItems=e,s),s.MinProperties=e=>(r.minProperties=e,s),s.MaxProperties=e=>(r.maxProperties=e,s),s.Contains=()=>(n=!0,s),s.UniqueItems=(e=!0)=>(r.uniqueItems=e,s),s}function Kt(e){return Ut(e,Array)}function qt(e){return Ut(e,Map)}function Bt(e){return Ut(e).Contains()}function Ft(e){if(e<0)throw new Error("The value of maxItems MUST be a non-negative integer.");return jt((t=>{t.schema.maxItems(e)}))}function Jt(e){if(e<0)throw new Error("The value of maxProperties MUST be a non-negative integer.");return jt((t=>{t.isCollection?t.schema.maxProperties(e):t.itemSchema.maxProperties(e)}))}function zt(e){if(e<0)throw new Error("The value of minItems MUST be a non-negative integer.");return jt((t=>{t.schema.minItems(e)}))}function Wt(e){if(e<0)throw new Error("The value of minProperties MUST be a non-negative integer.");return jt((t=>{t.isCollection?t.schema.minProperties(e):t.itemSchema.minProperties(e)}))}function Vt(e=!0){return jt((t=>{t.schema.uniqueItems(e)}))}function Qt(e){return jt(((t,r)=>{t.itemSchema.additionalProperties(e)}))}function Xt(...e){return jt((t=>{t.itemSchema.allOf(e)}))}function Zt(e){return jt((t=>{e&&(re(e)&&(t.type=e),t.itemSchema.type(e))}))}function Yt(...t){const r=t.find((e=>re(e)));return W(r&&Zt(r),jt(((r,n)=>{r.schema.allow(...t),r.decoratorType===e.PARAM&&(r.required=!0),r.decoratorType===e.PROP&&r.parentSchema.addRequired(r.propertyName)})))}function er(...e){return jt((t=>{t.itemSchema.any(...e)}))}function tr(...e){return jt((t=>{t.itemSchema.anyOf(e)}))}function rr(e){return jt((t=>{t.itemSchema.const(e)}))}function nr(e,t){return jt((r=>{r.itemSchema.customKey(e,t)}))}function sr(e){return jt((t=>{Object.entries(e).forEach((([e,r])=>{t.itemSchema.customKey(e,r)}))}))}function ir(e){return jt((t=>{t.itemSchema.default(e)}))}function or(t){return jt(((r,n)=>{switch(s(n)){case e.PROP:case e.CLASS:r.schema.description(t);break;case e.PARAM:r.parameter.description(t);break;case e.METHOD:r.operation?.description(t)}}))}function ar(){return W(Zt(),jt((e=>{e.discriminatorKey()})))}function cr(e,...t){return jt((r=>{r.itemSchema.enum(e,...t)}))}function ur(...e){return jt((t=>{t.schema.examples(e)}))}function pr(e){return jt((t=>{t.parameter.examples(e)}))}function lr(e,t=!1){return jt((r=>{t?r.itemSchema.exclusiveMaximum(e):r.itemSchema.maximum(e)}))}function hr(e,t=!1){return lr(e,t)}function fr(e,t=!0){return lr(e,t)}function dr(e,t=!1){return jt((r=>{t?r.itemSchema.exclusiveMinimum(e):r.itemSchema.minimum(e)}))}function mr(e,t=!1){return dr(e,t)}function yr(e,t=!0){return dr(e,t)}function gr(e){return jt((t=>{t.itemSchema.format(e)}))}function br(){return gr(It.EMAIL)}function vr(){return gr(It.DATE_TIME)}function Sr(){return gr(It.DATE)}function Ar(){return gr(It.TIME)}function Rr(){return gr(It.URI)}function Or(){return gr(It.URL)}function Er(e=!0){return jt((t=>{t.schema.$forwardGroups=e}))}!function(e){e.ALL="ALL",e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.HEAD="HEAD",e.DELETE="DELETE",e.OPTIONS="OPTIONS",e.CUSTOM="CUSTOM"}(Ht||(Ht={})),function(e){e.DATE_TIME="date-time",e.DATE="date",e.TIME="time",e.EMAIL="email",e.HOSTNAME="hostname",e.IPV4="ipv4",e.IPV6="ipv6",e.URI="uri",e.URL="url",e.URI_REF="uri-reference",e.URI_TEMPLATE="uri-template",e.JSON_POINTER="json-pointer",e.RELATIVE_JSON_POINTER="relative-json-pointer",e.UUID="uuid",e.REGEX="regex"}(It||(It={}));var _r=r(170),wr=r.n(_r);function Tr(e,t=[]){const r=e.filter((e=>e.startsWith("!"))).map((e=>e.replace("!",""))),n=e.filter((e=>!e.startsWith("!")));return!!(r.length&&t.length&&wr()(r,t).length)||!!n.length&&!wr()(e.filter((e=>!e.startsWith("!"))),t).length}function xr(...t){return jt((r=>{switch(r.decoratorType){case e.CLASS:!function(e,t){const r=Object.entries(e[0]);t.children.forEach((e=>{xr(...r.filter((([,t])=>t.includes(e.propertyName))).map((([e])=>e)))(e.target,e.propertyKey)}))}(t,r);break;case e.PROP:r.schema.$hooks.on("groups",((e,r)=>!(e||!Tr(t,r))||e));break;case e.PARAM:r.parameter.groups=t}}))}function Cr(){return k("hidden",!0)}const Pr=(e,t)=>!0!==t.mongoose;function Mr(e=Pr){return jt((t=>{t.schema.ignore(e)}))}function $r(){return jt((e=>{e.itemSchema.type("integer")}))}function Nr(e){if(e<0)throw new Error("The value of maxLength MUST be a non-negative integer.");return jt((t=>{t.itemSchema.maxLength(e)}))}function Lr(e){if(e<0)throw new Error("The value of minLength MUST be a non-negative integer.");return jt((t=>{t.itemSchema.minLength(e)}))}function kr(e){if(e<=0)throw new Error("The value of multipleOf MUST be a number, strictly greater than 0.");return jt((t=>{t.itemSchema.multipleOf(e)}))}function Hr(t){return jt(((r,n)=>{switch(s(n)){case e.CLASS:r.schema.name(t);break;case e.PARAM:r.parameter.name(t);break;default:r.parent.schema.addAlias(n[1],t)}}))}function Ir(e,...t){return W(1===(t=[e,...t]).length&&Zt(t[0]),er(null,...t))}function jr(...e){return jt((t=>{t.itemSchema.oneOf(e),t.type=Object}))}function Dr(){return jt((t=>{switch(t.decoratorType){case e.PARAM:t.required=!1;break;case e.PROP:t.parentSchema.removeRequired(t.propertyName)}}))}function Gr(e){return jt((t=>{t.itemSchema.pattern(e)}))}function Ur(e=!0){return jt((t=>{t.itemSchema.readOnly(e)}))}function Kr(e){return jt((t=>{Object.entries(e).forEach((([e,r])=>{t.schema.set(e,r)}))}))}function qr(e,t){return jt((r=>{r.schema.set(e,t)}))}function Br(e,...t){return Kr({properties:{...t.reduce(((t,r)=>({...t,[r]:e})),{})}})}function Fr(e=!0,...t){return e?Yt(...t):Dr()}function Jr(...e){return jt((t=>{t.parent.schema.$hooks.on("requiredGroups",((r,n)=>Tr(e,n)?r.filter((e=>e!==t.propertyKey)):r))}))}function zr(e){return jt((t=>{t.schema.title(e)}))}function Wr(e=!0){return jt((t=>{t.itemSchema.writeOnly(e)}))}function Vr(e=Object){if(re(e)){const{schema:t}=ft(e);return t.properties=function(t){return Object.entries(t).forEach((([t,r])=>{ft(e.prototype,t).schema.assign(r)})),this},t}return _e.from({type:e})}function Qr(){return Vr(Number)}function Xr(){return Vr(Number).integer()}function Zr(){return Vr(String)}function Yr(){return Vr(Boolean)}function en(){return Vr(Date).format(It.DATE)}function tn(){return Vr(Date).format(It.DATE_TIME)}function rn(){return Vr(Date).format(It.TIME)}function nn(){return Vr(String).format(It.EMAIL)}function sn(){return Vr(String).format(It.URI)}function on(){return Vr(String).format(It.URL)}function an(){return Vr(Array)}function cn(){return Vr(Map).unknown(!0)}function un(){return Vr(Array).uniqueItems(!0)}function pn(e={}){return Vr(Object).properties(e)}function ln(...e){return Vr().any(...e)}function hn(...e){return Vr().anyOf(e)}function fn(...e){return Vr().oneOf(e)}function dn(...e){return Vr().allOf(e)}function mn(e){try{if(e())return he.from(e()).schema}catch(e){}return new dt(e)}function yn(...e){const t=[e.map((e=>function(e){return Q(e)&&!("toJSON"in e)}(e)?Zr().enum(Object.values(e)):e))],r=(...e)=>{he.from(...e).nestedGenerics=t};return r.Nested=(...e)=>(t.push(e),r),r}function gn(...e){return t=>{he.from(t).schema.genericLabels=e}}function bn(...t){return jt(((r,n)=>{switch(r.decoratorType){case e.METHOD:r.operation.produces(t);break;case e.CLASS:z(n[0],bn(...t));break;default:throw new U(bn,n)}}))}function vn(...e){return W(bn(...e),k("acceptMimes",e))}function Sn(...t){return jt(((r,n)=>{switch(r.decoratorType){case e.METHOD:r.operation.consumes(t);break;case e.CLASS:z(n[0],Sn(...t));break;default:throw new U(Sn,n)}}))}class An extends Map{methods;decoratorType;entity;actions=[];constructor(e={}){super(),Object.entries(e).forEach((([e,t])=>{this.set(e,t)}))}addAction(e){return this.actions.push(e),this}build(){const e=(...t)=>this.bind(t,e),t=t=>{return r=(...e)=>{t in this?this[t](...e):this.set(t,e[0])},(...t)=>(r(...t),e);var r};return this.methods.forEach((r=>{e[Be(r)]=t(r)})),e}toObject(){return[...this.entries()].reduce(((e,[t,r])=>({...e,[t]:r})),{})}getMergedKey(t,r){let n=this.get(t)||r;if(n)return this.decoratorType===e.CLASS&&(n={...n,...r||{}}),{...r||{},...n}}bind(e,t){this.entity=he.from(...e),this.beforeInit(),this.onInit(e,t),this.afterInit()}onInit(e,t){this.forEach(((e,t)=>{this.onMapKey(t,e)}))}onMapKey(e,t){this.entity.set(e,t)}runActions(){return this.actions.forEach((e=>{e(this)})),this}beforeInit(){}afterInit(){}}const Rn=new Map;function On(e,t){Rn.set(e,t)}function En(e){return Rn.get(e)}function _n(e){return e.map((e=>function(e){return Q(e)&&!("toJSON"in e)}(e)?Zr().enum(Object.values(e)):e))}class wn extends An{methods=["contentType","description","examples","type","status","of","ofInteger","oneOf","allOf","anyOf","nested","header","headers","schema","title","groups","allowedGroups","location"];constructor({status:e,model:t}){super(),this.model(t),this.status(e)}type(e){return this.model(e)}model(e){return e&&this.set("model",e),this}status(e){return this.set("status",e),e&&rt(e)&&!this.get("description")&&(this.set("description",rt(e)),this.get("model")||this.model(En(+e))),this}headers(e){return this.set("headers",{...this.get("headers")||{},...at(e)}),this}header(e,t){return this.headers({[e]:t})}location(e,t={}){return this.headers({Location:{...t,value:e}}),this}groups(...e){return this.set("groups",e),this}allowedGroups(...e){return this.set("allowedGroups",new Set(e)),this}nested(...e){const t=this.get("model");return this.checkPrimitive(t),this.checkCollection(t),this.addAction((t=>{this.get("schema").nestedGenerics.push(_n(e))})),this}of(...e){const t=this.get("model");return this.checkPrimitive(t),this.addAction((()=>{const r=this.get("schema");ne(t)?r?.itemSchema({type:e[0]}):r?.nestedGenerics.push(_n(e))})),this}ofInteger(){return this.of("integer")}oneOf(...e){return this.manyOf("oneOf",e)}allOf(...e){return this.manyOf("allOf",e)}anyOf(...e){return this.manyOf("anyOf",e)}schema(e){return this.addAction((()=>{this.get("schema").assign(e)})),this}examples(e){return this.set("examples",h(e)?[e]:e),this}title(e){return this.schema({title:e})}checkPrimitive(e){if(d(e))throw new Error("Returns.Of cannot be used with the following primitive classes: String, Number, Boolean")}checkCollection(e){if(ne(e))throw new Error("Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean")}getContentType(){const e=this.get("model");let t=this.get("contentType");return!e||ee(e)||d(e)||(t=t||"application/json"),t}getStatus(){return this.get("status")||"default"}onInit(t,r){switch(s(t)){case e.METHOD:this.entity=he.from(...t),this.entity.operation&&this.map();break;case e.CLASS:this.decoratorType=e.CLASS,z(t[0],r)}}map(){const t=this.get("model"),{entity:r,decoratorType:n}=this,s=this.entity.operation,i=this.getStatus(),o=s.ensureResponseOf(i),a=this.getContentType();let{description:c=o.get("description")}=this.toObject();c&&(c=n===e.CLASS&&o.get("description")||c,o.description(c));const u=this.getMergedKey("headers",o.get("headers"));return u&&o.headers(u),this.mapMedia(o),(nt(this.get("status"))||"default"===i)&&t&&(r.type=t),a&&s.addProduce(a),this.runActions()}mapMedia(e){const t=this.getContentType(),r=this.get("model"),n=e.getMedia(t||"*/*"),s=n.get("schema")||new _e({type:r}),o=this.get("groups"),a=this.get("allowedGroups"),c=this.entity.operation;if(r&&(i(r)?s.oneOf(r.map((e=>({type:e})))):s.type(r)),this.set("schema",s),n.schema(s),n.groups=o,a){n.allowedGroups=a;const e=new We;e.in("query").name("includes"),e.schema(_e.from({type:"array",items:{type:"string",enum:[...a]}})),c.addParameter(-1,e)}const u=this.get("examples");return u&&n.examples(u),n}manyOf(e,t){const r=this.get("model");return this.addAction((()=>{const n=this.get("schema");ne(r)?(n.type(r||Object),n.itemSchema().set(e,t)):n.set(e,t)})),this}}function Tn(e,t){return new wn({status:e,model:t}).build()}function xn(e){return Tn().ContentType(e)}function Cn(t=!0){return jt(((r,n)=>{switch(s(n)){case e.METHOD:r.operation.deprecated(t);break;case e.CLASS:z(n[0],Cn(t));break;case e.PARAM:r.parameter.set("deprecated",t);break;case e.PROP:r.schema.set("deprecated",t);break;default:throw new U(Cn,n)}}))}function Pn(e,t){return void 0!==t&&(e={[e]:t}),Tn().Headers(e)}function Mn(t){const r=new We,n={},s=(i,o,a)=>{const c=he.from(i,o,a);switch(c.decoratorType){case e.PARAM:c.parameter.in(t);break;case e.METHOD:r.in(t),c.operation.addParameter(-1,r),r.schema(_e.from(n));break;case e.CLASS:z(i,s);break;default:throw new U(Mn,[i,o,a])}};return s.Type=e=>(n.type=e,s),s.Name=e=>(r.name(e),s),s.Description=e=>(r.description(e),s),s.Required=(e=!0)=>(r.required(e),s),s.Pattern=e=>s.Schema({pattern:e.toString()}),s.Schema=e=>(Object.assign(n,e),s),s}function $n(e){return(...t)=>{const[r,n,s]=t,i=M.getParamTypes(r,n)[s]===Array,o=[e="object"==typeof e?void 0:e,!i&&"0"].filter(Boolean).join("."),a=W(Mn(Le.FILES),Hr(o),function(...e){return(t,r)=>{e.filter(Boolean).forEach((e=>e(t,r,_(t,r))))}}(Tn(400).Description("<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1"),Sn("multipart/form-data")));a(...t)}}function Nn(e,t){return Tn().Location(e,t)}function Ln(t){return jt(((r,n)=>{if(r.decoratorType!==e.METHOD)throw new U(Ln,n);r.operation.operationId(t)}))}function kn(t,r="/"){return jt(((n,s)=>{if(n.decoratorType!==e.METHOD)throw new U(kn,s);n.operation.addOperationPath(t.toUpperCase(),r)}))}function Hn(){return xr("partial")}function In(t){return jt(((r,n)=>{if(r.decoratorType!==e.CLASS)throw new U(In,n);r.path=t}))}function jn(...e){const{status:t,url:r,meta:n}=e.reduce(((e,t)=>p(t)?(e.status=t,e):h(t)?(e.url=t,e):(e.meta=t,e)),{status:302,url:"",meta:{}});return W(Tn(t).Location(r,n),jt((e=>{e.operation?.setRedirection(t)})))}function Dn(e){let t,r;const n=e.filter((e=>"string"==typeof e&&kt.includes(e.toLowerCase())?(t=e.toLocaleUpperCase(),!1):"string"==typeof e||e instanceof RegExp?(r=e||"/",!1):!!e));return{path:r,method:t,use:n}}class Gn extends An{methods=["name","description","summary","method","id","use","useAfter","useBefore"];beforeInit(){const e=this.get("path"),t=Ht[this.get("method")]||Ht.CUSTOM;e&&this.entity.operation.addOperationPath(t,e)}onMapKey(e,t){switch(e){case"name":case"id":return void this.entity.operation.operationId(t);case"summary":return void this.entity.operation.summary(t);case"description":return void this.entity.operation.description(t);case"use":return void this.entity.use(t);case"useAfter":return void this.entity.after(t);case"useBefore":return void this.entity.before(t)}return super.onMapKey(e,t)}}function Un(...e){const t=Dn(e);return new Gn(t).build()}function Kn(e="/",...t){return Un(...[Ht.ALL,e].concat(t))}function qn(e="/",...t){return Un(...[Ht.GET,e].concat(t))}function Bn(e="/",...t){return Un(...[Ht.POST,e].concat(t))}function Fn(e="/",...t){return Un(...[Ht.PUT,e].concat(t))}function Jn(e="/",...t){return Un(...[Ht.DELETE,e].concat(t))}function zn(e="/",...t){return Un(...[Ht.HEAD,e].concat(t))}function Wn(e="/",...t){return Un(...[Ht.PATCH,e].concat(t))}function Vn(e="/",...t){return Un(...[Ht.OPTIONS,e].concat(t))}function Qn(t,...r){return jt(((n,s)=>{switch(n.decoratorType){case e.METHOD:n.operation.addSecurityScopes(t,r);break;case e.CLASS:z(s[0],Qn(t,...r));break;default:throw new U(Qn,s)}}))}function Xn(e,t){return Tn(e,t)}function Zn(t){return jt(((r,n)=>{if(r.decoratorType!==e.METHOD)throw new U(Zn,n);r.operation.summary(t)}))}function Yn(...t){return jt(((r,n)=>{switch(r.decoratorType){case e.METHOD:r.operation.addTags(function(e){return e.map((e=>"string"==typeof e?{name:e}:e))}(t));break;case e.CLASS:z(n[0],Yn(...t));break;default:throw new U(Yn,n)}}))}function es(e,t){return k("view",{path:e,options:t})}class ts extends Map{setOperationPath(e){if(e.method!==Ht.CUSTOM){const t=this.getKey(e.method,e.path);this.set(t,e)}}getKey=(e,t)=>`${e}-${t}`}function rs(e,t){if(e instanceof RegExp||t instanceof RegExp){if(!e)return t;if(!t)return e;const r=e instanceof RegExp?e:new RegExp(e,"gi"),n=t instanceof RegExp?t:new RegExp(t,"gi");return new RegExp(r.source+n.source,(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":""))}e&&t&&e.endsWith("/")&&t.startsWith("/")&&(t=t.slice(1));const r=(e||"")+(t||"");return r.endsWith("/")&&r.length>1?r.slice(0,-1):r}class ns{token;endpoint;operationPath;basePath;paramsTypes;constructor(e){Object.assign(this,e),this.paramsTypes=this.endpoint.getParamTypes()}get url(){return this.fullPath}get path(){return this.operationPath?.path}get fullPath(){return rs(this.basePath,this.path)}get method(){return this.operationPath?.method||"USE"}get name(){return`${this.endpoint.targetName}.${this.methodClassName}()`}get className(){return this.endpoint.targetName}get methodClassName(){return this.propertyKey}get parameters(){return this.endpoint.parameters}get propertyKey(){return String(this.endpoint.propertyKey)}get propertyName(){return this.endpoint.propertyName}get store(){return this.endpoint.store}get operation(){return this.endpoint.operation}get operationId(){return this.operation.get("operationId")||this.endpoint.propertyKey}has(e){return this.paramsTypes[e]}}function ss(e){return e.split("/").filter(Boolean).join("/")}function is(e,t){return e.map((e=>t.parameters.find((t=>t.in===e.in&&t.name===e.name))||e)).concat(...t.parameters.filter((e=>"path"!==e.in)))}function os(e){const t=e.isStore?e:ft(e);if(!t.$operations){const e=new ts;t.$operations=new Map,bt(t).forEach((e=>{e.children.forEach((e=>{e instanceof lt&&!t.$operations.has(e.propertyKey)&&t.$operations.set(e.propertyKey,e)}))})),t.$operations.forEach((t=>{t.operation.operationPaths.forEach((t=>{e.setOperationPath(t)}))})),e.clear()}return t.$operations}function as(e,t=""){t instanceof RegExp&&(t=t.toString().replace(/^\//g,"").replace(/\/$/g,"").replace(/\\/g,""));const r=[],n=[];let s=!1,i="";return function(e){let t=0;return e.split("").filter((e=>{"("===e&&t++;const r=0===t;return")"===e&&t--,r})).join("").split("/").filter((e=>!!e))}(`${e}${t}`).map((e=>{const t=e.replace(":","").replace("?","");if(e.includes(":")){const o=e.includes("?");o&&!s&&(s=!0,n.push({path:i,parameters:[].concat(r)}));const{prefix:a,name:c,postfix:u}=function(e){const[t,r]=e.split("="),n=(r||t).split(".");return{prefix:r&&t?`${t}=`:"",name:n.splice(0,1)[0],postfix:n.length?`.${n.join(".")}`:""}}(t);i+=`/${a}{${c}}${u}`,r.push({in:"path",name:c,type:"string",required:!0}),o&&s&&n.push({path:i,parameters:[].concat(r)})}else i+=`/${e}`})),n.length?n:[{path:i,parameters:[].concat(r)}]}function cs(e,t,{rootPath:r,specType:n,operationId:s,defaultTags:i,tags:o,path:a,method:c}){const u=as(r,a).map((({path:e,parameters:t})=>(e=e||"/",n===je.OPENAPI&&(t=t.map((({type:e,...t})=>({...t,schema:{type:e}})))),{path:e,parameters:t})));return u.reduce(((e,{path:r,parameters:n})=>{n=is(n,t),r=r||"/";const a=t.tags?.length?t.tags:[i];return e.paths[r]={...e.paths[r],[c.toLowerCase()]:{operationId:t.operationId||s(r),...t,tags:a.map((({name:e})=>e)),parameters:n}},o.push(...a),e}),e)}function us(e,t){return 0===t?e.toLowerCase():qe(e,t)}function ps(e,t){return void 0===t&&(t={}),Be(e,fe({transform:us},t))}function ls(e=""){const t=new Map;return(r,n,s="")=>{const i=((t,r)=>{const n=(e||"%c.%m").replace(/%c/,t).replace(/%m/,r);return""===e?ps(n):n})(r,n),o=r+n;if(!t.has(o))return t.set(o,0),i;const a=s.match(/{(\w+)}/gi);if(a){const e=r+n+a[0];if(!t.has(e))return t.set(e,0),ps(`${i} By ${a}`)}const c=t.get(o)+1;return t.set(o,c),`${i}_${c}`}}const hs=R(((e,t)=>e.type&&e.type===t.type||e.$ref&&e.$ref===t.$ref)),fs=R(((e,t)=>e.in===t.in&&e.name===t.name)),ds=R(((e,t)=>!!Object.keys(t).find((t=>!!e[t])))),ms=R(((e,t)=>e.name===t.name)),ys={security:ds,parameters:fs,oneOf:hs,anyOf:hs,allOf:hs,tags:ms};function gs(e,t){return E(e,t,{reducers:ys,cleanUndefinedProps:!0})}const bs=new Map;function vs(e,t={}){if(t={...t,operationIdFormatter:t.operationIdFormatter||ls(t.operationIdPattern),root:!1},i(e)){let r={};return t={...t,specType:je.OPENAPI,paths:{},tags:[],schemas:{},append(e){r=gs(r,e)}},e.forEach((({token:e,...r})=>{const n=vs(e,{...t,...r});t.append(n)})),r}return function(e,t,r){bs.has(e)||bs.set(e,new Map);const n=bs.get(e),s=JSON.stringify(t);return n.has(s)||n.set(s,r()),n.get(s)}(e,t,(()=>function(e,t){const r=ft(e),{schemas:n={},paths:s={},rootPath:i="/",tags:o=[]}=t,a=je.OPENAPI,c=r.path,u=V({name:r.schema.getName(),description:r.schema.get("description")}),p={paths:s};return os(e).forEach((e=>{if(e.store.get("hidden"))return;const r=e.operation.toJSON({...t,specType:a,schemas:n});e.operation.operationPaths.forEach((({path:n,method:s})=>{s&&cs(p,r,{rootPath:ss(i+c),path:n,method:s,defaultTags:u,tags:o,specType:a,operationId:r=>t.operationIdFormatter(e.parent.schema.get("name")||e.parent.targetName,e.propertyName,r)})}))})),p.tags=q(o,"name"),Object.keys(n).length&&(p.components={schemas:n}),p}(e,t)))}function Ss(e){return e.startsWith("3.")?je.OPENAPI:je.SWAGGER}function As(e){return"openapi"in e?je.OPENAPI:je.SWAGGER}function Rs(e){const{title:t,description:r,version:n,termsOfService:s,contact:i,license:o}=e;return V({version:n,title:t,description:r,termsOfService:s,contact:i,license:o})}function Os(e,{version:t,specVersion:r,acceptMimes:n=["application/json"]}){const{paths:s,security:i,tags:o,host:a,basePath:c,schemes:u,consumes:p=[],produces:l=["application/json"],definitions:h,parameters:f,responses:d,securityDefinitions:m,externalDocs:y}=e;return{swagger:r,consumes:K([...n,...p]),produces:K([...l]),info:Rs(X(e,"info",{})),paths:s,host:a,basePath:c,schemes:u,definitions:h,parameters:f,responses:d,security:i,securityDefinitions:m,tags:o,externalDocs:y}}function Es(e,{specVersion:t}){const{servers:r,paths:n,components:s,security:i,tags:o,externalDocs:a}=e;return{openapi:t,info:Rs(X(e,"info",{})),servers:r,paths:n,components:s,security:i,tags:o,externalDocs:a}}function _s(e,{fileSpec:t,acceptMimes:r,specVersion:n,version:s}){const i={specVersion:n=n||X(e,"openapi",X(e,"swagger","2.0")),acceptMimes:r};switch(Ss(n)){case je.OPENAPI:e=Es(e,i),t=t?Es(t,i):t;break;default:case je.SWAGGER:e=Os(e,i),t=t?Os(t,i):t}return se(e=gs(e,t),"info.title",X(e,"info.title","Api documentation")),se(e,"info.version",X(e,"info.version",s)),e}const ws=["get","put","post","delete","options","head","patch","trace"],Ts=["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],xs=["type","items"],Cs=/^(application\/json|[^;\/ \t]+\/[^;\/ \t]+[+]json)[ \t]*(;.*)?$/,Ps={APPLICATION_X_WWW_URLENCODED:"application/x-www-form-urlencoded",MULTIPART_FORM_DATA:"multipart/form-data"};function Ms(e){if(Array.isArray(e))e.forEach(Ms);else if("object"==typeof e)for(let t in e)"$ref"===t?e.$ref=e.$ref.replace("#/components/schemas/","#/definitions/").replace("#/components/","#/x-components/"):Ms(e[t])}function $s(e){return new RegExp(Cs,"i").test(e)}function Ns(e){const t=Object.keys(Ps).map((e=>Ps[e]));return Object.keys(e).filter((e=>t.indexOf(e)>-1||$s(e)))}function Ls(e){function t(e){const{scheme:t,type:r,name:n,bearerFormat:s,flows:i,...o}=e;switch(r){case"http":if("basic"===t)return{...o,type:t};if("bearer"===t)return{...o,type:"apiKey",name:"Authorization",in:"header"};break;case"oauth2":const e=Object.keys(i)[0],n=i[e];let s=e;return"clientCredentials"===s?s="application":"authorizationCode"===s&&(s="accessCode"),{type:r,flow:s,authorizationUrl:n.authorizationUrl,tokenUrl:n.tokenUrl,scopes:n.scopes}}}return Object.entries(e).reduce(((e,[r,n])=>({...e,[r]:t(n)})),{})}function ks(e){let t=e.url;const r=e.variables||{};for(const e in r){const n=r[e]||{};if(n.default){const r=RegExp(`{${e}}`,"g");t=t.replace(r,n.default)}}const n=new URL(t);return{host:n.host?n.host:void 0,basePath:n.pathname,schemes:null!==n.protocol?[n.protocol.substring(0,n.protocol.length-1)]:void 0}}class Hs{spec;constructor(e){this.spec=JSON.parse(JSON.stringify(e))}convertInfos(){const e=this.spec.servers&&this.spec.servers[0];return e?ks(e):{}}resolveReference(e,t,r){if(!t||!t.$ref)return t;const n=t.$ref;if(n.startsWith("#")){const t=n.split("/").map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~")));t.shift();let s=e;return t.forEach((e=>{s=s[e]})),r?JSON.parse(JSON.stringify(s)):s}}convert(){const e={swagger:"2.0",...this.convertInfos(),paths:this.spec.paths?this.convertOperations(this.spec.paths,this.spec):void 0};return this.spec.components&&(this.convertSchemas(),this.convertSecurityDefinitions(),this.spec["x-components"]=this.spec.components,delete this.spec.components,Ms(this.spec)),delete this.spec.servers,delete this.spec.openapi,delete this.spec["x-components"],V({...e,...this.spec})}convertOperations(e,t){return Object.entries(e).reduce(((e,[r,n])=>{const s=e[r]=this.resolveReference({...t,paths:e},n,!0);return this.convertParameters(s),Object.keys(s).forEach((r=>{if(ws.indexOf(r)>=0){const n=s[r]=this.resolveReference({...t,paths:e},s[r],!0);this.convertOperationParameters(n),this.convertResponses(n)}})),e}),e)}convertOperationParameters(e){let t,r,n,s;if(e.parameters=e.parameters||[],e.requestBody){let i=this.resolveReference(this.spec,e.requestBody,!0);if(e.requestBody.content){const t=Ns(e.requestBody.content)[0],r={content:{}},n=e.requestBody.content[t];n&&n.schema&&n.schema.$ref&&!n.schema.$ref.startsWith("#")&&(i=this.resolveReference(this.spec,n.schema,!0),r.content[`${t}`]={schema:i},i=r)}if(i.name="body",t=i.content,t&&Object.keys(t).length){if(n=Object.keys(t).filter((e=>e.indexOf("/")>0)),s=n.filter((e=>e.indexOf("*")<0)),r=Ns(t)[0],delete i.content,[Ps.APPLICATION_X_WWW_URLENCODED,Ps.MULTIPART_FORM_DATA].includes(r))if(e.consumes=s,i.in="formData",i.schema=t[r].schema,i.schema=this.resolveReference(this.spec,i.schema,!0),"object"===i.schema.type&&i.schema.properties){const t=i.schema.required||[];Object.keys(i.schema.properties).forEach((r=>{const n=i.schema.properties[r];if(!n.readOnly){const s={name:r,in:"formData",schema:n};t.indexOf(r)>=0&&(s.required=!0),e.parameters?.push(s)}}))}else e.parameters.push(i);else r?(e.consumes=s,i.in="body",i.schema=t[r].schema,e.parameters.push(i)):n&&(e.consumes=s||["application/octet-stream"],i.in="body",i.name=i.name||"file",delete i.type,i.schema=t[n[0]].schema||{type:"string",format:"binary"},e.parameters.push(i));i.schema&&this.convertSchema(i.schema,"request")}delete e.requestBody}this.convertParameters(e)}convertParameters(e){void 0!==e.parameters&&(e.parameters=e.parameters||[],(e.parameters||[]).forEach(((t,r)=>{if("body"!==(t=e.parameters[r]=this.resolveReference(this.spec,t,!1)).in){if(this.copySchemaProperties(t,Ts),this.copySchemaProperties(t,xs),this.copySchemaXProperties(t),!t.description){const e=this.resolveReference(this.spec,t.schema,!1);e&&e.description&&(t.description=e.description)}void 0!==t.example&&(t["x-example"]=t.example),delete t.schema,delete t.allowReserved,delete t.example}if("array"===t.type)switch(t.style||("query"===t.in||"cookie"===t.in?"form":"simple")){case"matrix":t.collectionFormat=t.explode?void 0:"csv";break;case"label":t.collectionFormat=void 0;break;case"simple":t.collectionFormat="csv";break;case"spaceDelimited":t.collectionFormat="ssv";break;case"pipeDelimited":t.collectionFormat="pipes";break;case"deepOpbject":t.collectionFormat="multi";break;case"form":t.collectionFormat=!1===t.explode?"csv":"multi"}delete t.style,delete t.explode})))}copySchemaProperties(e,t){let r=this.resolveReference(this.spec,e.schema,!0);r&&t.forEach((t=>{const n=r[t];"additionalProperties"===t&&"boolean"==typeof n||void 0!==n&&(e[t]=n)}))}copySchemaXProperties(e){let t=this.resolveReference(this.spec,e.schema,!0);t&&Object.keys(t).forEach((r=>{Reflect.hasOwnProperty.call(t,r)&&!Reflect.hasOwnProperty.call(e,r)&&r.startsWith("x-")&&(e[r]=t[r])}))}convertResponses(e){Object.keys(e.responses||{}).forEach((t=>{const r=e.responses[t]=this.resolveReference(this.spec,e.responses[t],!0);if(r.content){let t=null,n=null;if(Object.keys(r.content).forEach((s=>{const i=s.indexOf("*")<0?s:"application/octet-stream";e.produces?e.produces.indexOf(i)<0&&e.produces.push(i):e.produces=[i];const o=r.content[s];t=t||o.schema,!n&&$s(i)&&(n=o.schema),o.example&&(r.examples=r.examples||{},r.examples[i]=o.example)})),t){r.schema=n||t;const e=this.resolveReference(this.spec,r.schema,!0);e&&r.schema.$ref&&!r.schema.$ref.startsWith("#")&&(r.schema=e),this.convertSchema(r.schema,"response")}}Object.keys(r.headers||{}).forEach((e=>{const t=this.resolveReference(this.spec,r.headers[e],!0);t.schema&&(t.type=t.schema.type,t.format=t.schema.format,delete t.schema),r.headers[e]=t})),delete r.content}))}convertSchema(e,t){if(e.oneOf&&(delete e.oneOf,e.discriminator&&delete e.discriminator),e.anyOf&&(delete e.anyOf,e.discriminator&&delete e.discriminator),e.allOf)for(const r in e.allOf)this.convertSchema(e.allOf[r],t);switch(e.discriminator&&(e.discriminator.mapping&&this.convertDiscriminatorMapping(e.discriminator.mapping),e.discriminator=e.discriminator.propertyName),e.type){case"object":e.properties&&Object.keys(e.properties).forEach((r=>{!0===e.properties[r].writeOnly&&"response"===t?delete e.properties[r]:(this.convertSchema(e.properties[r],t),delete e.properties[r].writeOnly)}));break;case"array":e.items&&this.convertSchema(e.items,t)}e.nullable&&(e["x-nullable"]=!0,delete e.nullable),void 0!==e.deprecated&&(void 0===e["x-deprecated"]&&(e["x-deprecated"]=e.deprecated),delete e.deprecated)}convertSchemas(){this.spec.definitions=this.spec.components.schemas,Object.keys(this.spec.definitions||{}).forEach((e=>{this.convertSchema(this.spec.definitions[e])})),delete this.spec.components.schemas}convertDiscriminatorMapping(e){Object.keys(e).forEach((t=>{const r=e[t];if("string"!=typeof r)return void console.warn(`Ignoring ${r} for ${t} in discriminator.mapping.`);let n;if(/^[a-zA-Z0-9._-]+$/.test(r))try{n=this.resolveReference(this.spec,{$ref:`#/components/schemas/${r}`},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} as schema name in discriminator.mapping: ${e}`)}if(!n)try{n=this.resolveReference(this.spec,{$ref:r},!1)}catch(e){console.debug(`Error resolving ${r} for ${t} in discriminator.mapping: ${e}`)}n?(n["x-discriminator-value"]=t,n["x-ms-discriminator-value"]=t):console.warn(`Unable to resolve ${r} for ${t} in discriminator.mapping.`)}))}convertSecurityDefinitions(){this.spec.components.securitySchemes&&(this.spec.securityDefinitions=Ls(this.spec.components.securitySchemes),delete this.spec.components.securitySchemes)}}function Is(e){return new Hs(e).convert()}async function js({tokens:e,...t}){const{version:r="1.0.0",acceptMimes:n,specPath:s,specVersion:i}=t,o=_s(X(t,"spec",{}),{fileSpec:{},version:r,specVersion:i,acceptMimes:n}),a=As(o),c=gs(o,vs(e,t));return a===je.SWAGGER?Is(c):c}const Ds="$cache:schemes";function Gs(e,t={}){const r=ft(e);return t={endpoint:!0,groups:[],...t,specType:t.specType||je.JSON,schemas:{}},"parameter"===r.decoratorType&&(t={...t,genericTypes:r.nestedGenerics[0],nestedGenerics:r.nestedGenerics,groups:r.parameter?.groups}),function(e,t){const r=e.store.get(Ds)||new Map,n=function(e){return JSON.stringify(e)}(t);if(!r.has(n)){const s=ue("schema",e.schema,t);Object.keys(t.schemas).length&&(s.definitions=t.schemas),r.set(n,s)}return e.store.set(Ds,r),r.get(n)}(r,t)}function Us(e,t={}){const r=e.isStore?e:ft(e),n=rs(t.basePath,r.path);let s=[];return t.withChildren&&(s=r.get("childrenControllers",[]).reduce(((e,r)=>e.concat(Us(r,{...t,basePath:n}))),s)),[...os(e).values()].reduce(((t,r)=>{const{operation:s}=r;return s&&s.operationPaths.forEach((s=>{t.push(new ns({basePath:n,token:e,endpoint:r,operationPath:s}))})),t}),s)}function Ks(e){const t=e.isStore?e:ft(e);if(!t.$properties){const e=bt(t);t.$properties=new Map,e.forEach((e=>{e.children.forEach((e=>{t.$properties.has(e.propertyKey)||t.$properties.set(e.propertyKey,e)}))}))}return t.$properties}function qs(e,t={}){const r=Ks(e),n=new Map;return r.forEach(((e,r)=>{!t.withIgnoredProps&&Ot(e.itemSchema,t)||n.set(r,e)})),n}})(),n})()));
3
+ //# sourceMappingURL=schema.umd.min.js.map
@@ -0,0 +1,42 @@
1
+ /*!
2
+ * fill-range <https://github.com/jonschlinkert/fill-range>
3
+ *
4
+ * Copyright (c) 2014-present, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */
7
+
8
+ /*!
9
+ * is-number <https://github.com/jonschlinkert/is-number>
10
+ *
11
+ * Copyright (c) 2014-present, Jon Schlinkert.
12
+ * Released under the MIT License.
13
+ */
14
+
15
+ /*!
16
+ * statuses
17
+ * Copyright(c) 2014 Jonathan Ong
18
+ * Copyright(c) 2016 Douglas Christopher Wilson
19
+ * MIT Licensed
20
+ */
21
+
22
+ /*!
23
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
24
+ *
25
+ * Copyright (c) 2015-present, Jon Schlinkert.
26
+ * Released under the MIT License.
27
+ */
28
+
29
+ /*! *****************************************************************************
30
+ Copyright (C) Microsoft. All rights reserved.
31
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
32
+ this file except in compliance with the License. You may obtain a copy of the
33
+ License at http://www.apache.org/licenses/LICENSE-2.0
34
+
35
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
36
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
37
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
38
+ MERCHANTABLITY OR NON-INFRINGEMENT.
39
+
40
+ See the Apache Version 2.0 License for specific language governing permissions
41
+ and limitations under the License.
42
+ ***************************************************************************** */