ts-openapi-codegen 0.1.22 → 0.1.23

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.
package/README.md CHANGED
@@ -53,8 +53,8 @@ $ openapi --help
53
53
  -i, --input <value> OpenAPI specification, can be a path, url or string content (required)
54
54
  -o, --output <value> Output directory (required)
55
55
  -c, --client <value> HTTP client to generate [fetch, xhr, node] (default: "fetch")
56
- --useOptions Use options instead of arguments
57
- --useUnionTypes Use union types instead of enums
56
+ --useOptions <value> Use options instead of arguments (default: false)
57
+ --useUnionTypes <value> Use union types instead of enums (default: false)
58
58
  --exportCore <value> Write core files to disk (default: true)
59
59
  --exportServices <value> Write services to disk (default: true)
60
60
  --exportModels <value> Write models to disk (default: true)
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),n=require("os"),t=require("camelcase"),r=require("json-schema-ref-parser"),a=require("fs"),o=require("mkdirp"),l=require("rimraf"),i=require("util"),s=require("handlebars/runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var c,m=u(e),d=u(t),f=u(r),h=u(o),y=u(l),v=p(s);function g(n){const t=e.extname(n),r=e.basename(n);return t?r.substr(0,r.length-t.length):r}function b(e){return"string"==typeof e}class P{constructor(n){this._refs={},b(n)?this._root={path:e.dirname(n),fileName:g(n)}:this._root={path:""}}addRefs(e){return this._refs=e,this}values(...e){return this._refs.values(...e)}get(e){return this._refs.get(e)}paths(...e){return this._refs.paths(...e)}exists(e){return this._refs.exists(e)}fileName(){return this._root.fileName?this._root.fileName:""}}exports.HttpClient=void 0,(c=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",c.XHR="xhr",c.NODE="node";var O,x=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){if(n.constructor!==t.constructor)return!1;var r,a,o;if(Array.isArray(n)){if((r=n.length)!=t.length)return!1;for(a=r;0!=a--;)if(!e(n[a],t[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if((r=(o=Object.keys(n)).length)!==Object.keys(t).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,o[a]))return!1;for(a=r;0!=a--;){var l=o[a];if(!e(n[l],t[l]))return!1}return!0}return n!=n&&t!=t};function k(n,t,r=[],a="",o=!1){if(t.$ref){const l=t.$ref.match(/^(http:\/\/|https:\/\/)/g)?t.$ref:t.$ref.match(/^(#\/)/g)?e.join(a,t.$ref):e.join(e.dirname(a),t.$ref);if(function(e,n){return-1!==e.findIndex((e=>x(e.value,n)))}(r,l))return r;o?r.push({value:l,type:O.SCHEMA}):r.push({value:l,type:O.OTHERS});const i=n.get(l),s=t.$ref.match(/^(http:\/\/|https:\/\/)/g)?"":t.$ref.match(/^(#\/)/g)?a:e.join(e.dirname(a),t.$ref);return k(n,i,r,s,o)}return t.schema?Object.values(t).forEach(((e,t)=>{e instanceof Object&&k(n,e,r,a,!0)})):Object.values(t).forEach(((e,t)=>{e instanceof Object&&k(n,e,r,a,o)})),r}function w(e,n){return k(e,n).filter((e=>e.type===O.SCHEMA)).map((e=>e.value))}function R(e,n,t){return function(e,n,t){for(let r=0;r<t.length;++r)if(x(e,t[r]))return n===r;return!1}(e,n,t)}function q(e){return null==e?void 0:e.replace(/\\/g,"\\\\")}function j(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}function C(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function A(e){return null!=e&&""!==e}function $(e){return Array.isArray(e)?e.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]}function I(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}function D(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}!function(e){e[e.SCHEMA=0]="SCHEMA",e[e.OTHERS=1]="OTHERS"}(O||(O={}));const S=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function E(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function H(e,n){const t={type:"any",base:"any",template:null,imports:[],path:""},r=function(e){return e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,"")}(e||"");if(t.path=function(e){if(!e)return"";const n=e.lastIndexOf("/");return-1===n?"":e.substring(0,n+1)}(r),/\[.*\]$/g.test(r)){const e=r.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=H(e[1]),r=H(e[2]);"any[]"===n.type?(t.type=`${r.type}[]`,t.base=r.type,n.imports=[]):r.type?(t.type=`${n.type}<${r.type}>`,t.base=n.type,t.template=r.type):(t.type=n.type,t.base=n.type,t.template=n.type),t.imports.push(...n.imports),t.imports.push(...r.imports)}}else if(a=r,S.has(a)){const e=function(e){return S.get(e)}(r);e&&(t.type=e,t.base=e)}else if(r){const e=function(e){const n=e.lastIndexOf("/");return E(-1===n?e:e.substring(n,e.length))}(r);t.type=e,t.base=e,t.imports.push({name:e,alias:"",path:r})}var a;return t.type===n&&(t.type="T",t.base="T",t.imports=[]),t}function N(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=H(l.$ref);a.push({name:D(o),alias:"",path:"",export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:C(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=t({openApi:e,definition:l});a.push({name:D(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:C(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function T(e){var n;const{openApi:t,definition:r,isDefinition:a=!1,name:o="",path:l=""}=e,i={name:o,path:l,alias:"",export:"interface",type:"any",base:"any",template:null,link:null,description:C(r.description),isDefinition:a,isReadOnly:!0===r.readOnly,isNullable:!0===r["x-nullable"],isRequired:void 0!==r.default,format:r.format,maximum:r.maximum,exclusiveMaximum:r.exclusiveMaximum,minimum:r.minimum,exclusiveMinimum:r.exclusiveMinimum,multipleOf:r.multipleOf,maxLength:r.maxLength,minLength:r.minLength,maxItems:r.maxItems,minItems:r.minItems,uniqueItems:r.uniqueItems,maxProperties:r.maxProperties,minProperties:r.minProperties,pattern:q(r.pattern),imports:[],enum:[],enums:[],properties:[]};if(r.$ref){const e=H(r.$ref);return i.export="reference",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}if(r.enum&&"boolean"!==r.type){const e=j($(r.enum),r);if(e.length)return i.export="enum",i.type="string",i.base="string",i.enum.push(...e),i}if(("int"===r.type||"integer"===r.type)&&r.description){const e=I(r.description);if(e.length)return i.export="enum",i.type="number",i.base="number",i.enum.push(...e),i}if("array"===r.type&&r.items){if(r.items.$ref){const e=H(r.items.$ref);return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=T({openApi:t,definition:r.items});return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if("object"===r.type&&"object"==typeof r.additionalProperties){if(r.additionalProperties.$ref){const e=H(r.additionalProperties.$ref);return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=T({openApi:t,definition:r.additionalProperties});return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if(null===(n=r.allOf)||void 0===n?void 0:n.length){const e=function(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>a({openApi:e,definition:n})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=N(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o}(t,r,r.allOf,"all-of",T);return i.export=e.type,i.imports.push(...e.imports),i.properties.push(...e.properties),i.enums.push(...e.enums),i}if("object"===r.type){if(i.export="interface",i.type="any",i.base="any",r.properties){N(t,r,T).forEach((e=>{i.imports.push(...e.imports),i.enums.push(...e.enums),i.properties.push(e),"enum"===e.export&&i.enums.push(e)}))}return i}if(r.type){const e=H(r.type);return i.export="generic",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}return i}function B(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===n.export&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}const L=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function M(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n).replace(L,"_$1")}function _(e,n){if(n.$ref){const t=n.$ref.replace(/^#/g,"").split("/").filter((e=>e));let r=e;return t.forEach((e=>{if(!r.hasOwnProperty(e))throw new Error(`Could not find reference: "${n.$ref}"`);r=r[e]})),r}return n}function F(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function U(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=_(e,n),a=function(e,n){const t={path:"",in:n.in,prop:n.name,export:"interface",name:M(n.name),alias:"",type:"any",base:"any",template:null,link:null,description:C(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n["x-nullable"],format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,pattern:q(n.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=H(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t.path=e.path,t}if(n.enum){const e=j($(n.enum),n);if(e.length)return t.export="enum",t.type="string",t.base="string",t.enum.push(...e),t.default=B(n,t),t}if(("int"===n.type||"integer"===n.type)&&n.description){const e=I(n.description);if(e.length)return t.export="enum",t.type="number",t.base="number",t.enum.push(...e),t.default=B(n,t),t}if("array"===n.type&&n.items){const e=H(n.items.type);return t.export="array",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}if("object"===n.type&&n.items){const e=H(n.items.type);return t.export="dictionary",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}if(n.schema){if(n.schema.$ref){const e=H(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}{const r=T({openApi:e,definition:n.schema});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t.default=B(n,t),t}}if(n.type){const e=H(n.type);return t.export="generic",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}return t}(e,r);if("api-version"!==a.prop)switch(a.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"body":t.parametersBody=a,t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(F),t.parametersPath=t.parametersPath.sort(F),t.parametersQuery=t.parametersQuery.sort(F),t.parametersForm=t.parametersForm.sort(F),t.parametersCookie=t.parametersCookie.sort(F),t.parametersHeader=t.parametersHeader.sort(F),t}function W(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:C(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.schema){if(n.schema.$ref){const e=H(n.schema.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const t=T({openApi:e,definition:n.schema});return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=t.isRequired,r.isNullable=t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=q(t.pattern),r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function V(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function Q(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?Q(e.link,n.link):t}function z(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>Q(n,e)))===n))}function J(e,n,t,r,a){var o;const l=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=d.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(o=r.tags)||void 0===o?void 0:o[0])||"Service"),i=`${t}${l}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n)}(r.operationId||i),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${M(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),p={service:l,name:s,summary:C(r.summary),description:C(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:u,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=U(e,r.parameters);p.imports.push(...n.imports),p.parameters.push(...n.parameters),p.parametersPath.push(...n.parametersPath),p.parametersQuery.push(...n.parametersQuery),p.parametersForm.push(...n.parametersForm),p.parametersHeader.push(...n.parametersHeader),p.parametersCookie.push(...n.parametersCookie),p.parametersBody=n.parametersBody}if(r.responses){const n=function(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=_(e,n[r]),o=V(r);if(o){const n=W(e,a,o);t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,r.responses),t=z(n);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p}function Z(e,n){const t=function(e="1.0"){return e.replace(/^v/gi,"")}(n.info.version),r=function(e){var n;const t=(null===(n=e.schemes)||void 0===n?void 0:n[0])||"http",r=e.host,a=e.basePath||"";return r?`${t}://${r}${a}`:a}(n),a=function(e,n){const t=[],r=w(e,n);if(r)for(const a of r){const r=e.get(a),o=H(a),l=T({openApi:n,definition:r,isDefinition:!0,name:o.base,path:o.path});t.push(l)}return t.filter(R)}(e,n),o=function(e){const n=new Map;for(const t in e.paths)if(e.paths.hasOwnProperty(t)){const r=e.paths[t],a=U(e,r.parameters||[]);for(const o in r)if(r.hasOwnProperty(o))switch(o){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const l=J(e,t,o,r[o],a),i=n.get(l.service)||{name:l.service,operations:[],imports:[]};i.operations.push(l),i.imports.push(...l.imports),n.set(l.service,i)}}return Array.from(n.values())}(n);return{version:t,server:r,models:a,services:o}}function G(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function X(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function K(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}const Y=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function ee(e){return Y.has(e)}function ne(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n).replace(/^./,(e=>e.toUpperCase()))}function te(n,t){const r={type:"any",base:"any",template:null,imports:[],path:""},a=function(n){if(!n.match(/^(http:\/\/|https:\/\/|#\/)/g)&&!ee(n)&&!n.match(/^array\[[a-z]+\]$/g)){const t=e.dirname(n),r=e.extname(n),a=r.toLowerCase().match(/(\.json|\.yaml|\/yml)$/g)?ne(e.basename(n,r)):ne(e.basename(n));return t?e.join(t,a):a}return n.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,"")}(n||"");if(r.path=function(e){if(!e)return"";const n=e.lastIndexOf("/");return-1===n?"":e.substring(0,n+1)}(a),/\[.*\]$/g.test(a)){const e=a.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=te(e[1]),t=te(e[2]);"any[]"===n.type?(r.type=`${t.type}[]`,r.base=`${t.type}`,n.imports=[]):t.type?(r.type=`${n.type}<${t.type}>`,r.base=n.type,r.template=t.type):(r.type=n.type,r.base=n.type,r.template=n.type),r.imports.push(...n.imports),r.imports.push(...t.imports)}}else if(ee(a)){const e=(o=a,Y.get(o));e&&(r.type=e,r.base=e)}else if(a){const e=function(e){const n=e.lastIndexOf("/");return K(-1===n?e:e.substring(n,e.length))}(a);r.type=e,r.base=e,r.imports.push({name:e,alias:"",path:a})}var o;return r.type===t&&(r.type="T",r.base="T",r.imports=[]),r}function re(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=te(l.$ref);a.push({name:X(o),alias:"",path:e.path,export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:G(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=t({openApi:e,definition:l});a.push({name:X(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:G(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function ae(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>a({openApi:e,definition:n})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=re(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o.imports=o.imports.filter(R),o}function oe(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==n?void 0:n.export)&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function le(e){var n,t,r;const{openApi:a,definition:o,isDefinition:l=!1,name:i="",path:s=""}=e,u={name:i,alias:"",path:s,export:"interface",type:"any",base:"any",template:null,link:null,description:G(o.description),isDefinition:l,isReadOnly:!0===o.readOnly,isNullable:!0===o.nullable,isRequired:void 0!==o.default,format:o.format,maximum:o.maximum,exclusiveMaximum:o.exclusiveMaximum,minimum:o.minimum,exclusiveMinimum:o.exclusiveMinimum,multipleOf:o.multipleOf,maxLength:o.maxLength,minLength:o.minLength,maxItems:o.maxItems,minItems:o.minItems,uniqueItems:o.uniqueItems,maxProperties:o.maxProperties,minProperties:o.minProperties,pattern:q(o.pattern),imports:[],enum:[],enums:[],properties:[]};if(o.$ref){const e=te(o.$ref);return u.export="reference",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}if(o.enum&&"boolean"!==o.type){const e=function(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}((p=o.enum,Array.isArray(p)?p.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]),o);if(e.length)return u.export="enum",u.type="string",u.base="string",u.enum.push(...e),u.default=oe(o,u),u}var p;if(("int"===o.type||"integer"===o.type)&&o.description){const e=function(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}(o.description);if(e.length)return u.export="enum",u.type="number",u.base="number",u.enum.push(...e),u.default=oe(o,u),u}if("array"===o.type&&o.items){if(o.items.$ref){const e=te(o.items.$ref);return u.export="array",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}{const e=le({openApi:a,definition:o.items});return u.export="array",u.type=e.type,u.base=e.base,u.template=e.template,u.link=e,u.imports.push(...e.imports),u.default=oe(o,u),u}}if("object"===o.type&&"object"==typeof o.additionalProperties){if(o.additionalProperties.$ref){const e=te(o.additionalProperties.$ref);return u.export="dictionary",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}{const e=le({openApi:a,definition:o.additionalProperties});return u.export="dictionary",u.type=e.type,u.base=e.base,u.template=e.template,u.link=e,u.imports.push(...e.imports),u.default=oe(o,u),u}}if(null===(n=o.oneOf)||void 0===n?void 0:n.length){const e=ae(a,o,o.oneOf,"one-of",le);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if(null===(t=o.anyOf)||void 0===t?void 0:t.length){const e=ae(a,o,o.anyOf,"any-of",le);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if(null===(r=o.allOf)||void 0===r?void 0:r.length){const e=ae(a,o,o.allOf,"all-of",le);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if("object"===o.type){if(u.export="interface",u.type="any",u.base="any",u.default=oe(o,u),o.properties){re(a,o,le).forEach((e=>{u.imports.push(...e.imports),u.enums.push(...e.enums),u.properties.push(e),"enum"===e.export&&u.enums.push(e)}))}return u}if(o.type){const e=te(o.type);return u.export="generic",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}return u}const ie=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function se(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n).replace(ie,"_$1")}function ue(e,n){if(n.$ref){const t=n.$ref.replace(/^#/g,"").split("/").filter((e=>e));let r=e;return t.forEach((e=>{if(!r.hasOwnProperty(e))throw new Error(`Could not find reference: "${n.$ref}"`);r=r[e]})),r}return n}function pe(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function ce(e,n){const t={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const r=ue(e,n),a=function(e,n){const t={in:n.in,prop:n.name,export:"interface",name:se(n.name),alias:"",path:"",type:"any",base:"any",template:null,link:null,description:G(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=te(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}if(n.schema){if(n.schema.$ref){const e=te(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=oe(n.schema),t}{const r=le({openApi:e,definition:n.schema});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.isReadOnly=r.isReadOnly,t.isRequired=t.isRequired||r.isRequired,t.isNullable=t.isNullable||r.isNullable,t.format=r.format,t.maximum=r.maximum,t.exclusiveMaximum=r.exclusiveMaximum,t.minimum=r.minimum,t.exclusiveMinimum=r.exclusiveMinimum,t.multipleOf=r.multipleOf,t.maxLength=r.maxLength,t.minLength=r.minLength,t.maxItems=r.maxItems,t.minItems=r.minItems,t.uniqueItems=r.uniqueItems,t.maxProperties=r.maxProperties,t.minProperties=r.minProperties,t.pattern=q(r.pattern),t.default=r.default,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t}}return t}(e,r);if("api-version"!==a.prop)switch(r.in){case"path":t.parametersPath.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"query":t.parametersQuery.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"formData":t.parametersForm.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"cookie":t.parametersCookie.push(a),t.parameters.push(a),t.imports.push(...a.imports);break;case"header":t.parametersHeader.push(a),t.parameters.push(a),t.imports.push(...a.imports)}})),t.parameters=t.parameters.sort(pe),t.parametersPath=t.parametersPath.sort(pe),t.parametersQuery=t.parametersQuery.sort(pe),t.parametersForm=t.parametersForm.sort(pe),t.parametersCookie=t.parametersCookie.sort(pe),t.parametersHeader=t.parametersHeader.sort(pe),t}function me(e,n){return n["application/json-patch+json"]&&n["application/json-patch+json"].schema||n["application/json"]&&n["application/json"].schema||n["text/json"]&&n["text/json"].schema||n["text/plain"]&&n["text/plain"].schema||n["multipart/mixed"]&&n["multipart/mixed"].schema||n["multipart/related"]&&n["multipart/related"].schema||n["multipart/batch"]&&n["multipart/batch"].schema||null}function de(e,n){const t={in:"body",prop:"body",export:"interface",name:"requestBody",alias:"",path:"",type:"any",base:"any",template:null,link:null,description:G(n.description),default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.content){const a=me(0,n.content);if(a){if(t.mediaType=(r=n.content,Object.keys(r).find((e=>["application/json-patch+json","application/json","text/json","text/plain","multipart/mixed","multipart/related","multipart/batch"].includes(e)))||null),null==a?void 0:a.$ref){const e=te(a.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}{const n=le({openApi:e,definition:a});return t.export=n.export,t.type=n.type,t.base=n.base,t.template=n.template,t.link=n.link,t.isReadOnly=n.isReadOnly,t.isRequired=t.isRequired||n.isRequired,t.isNullable=t.isNullable||n.isNullable,t.format=n.format,t.maximum=n.maximum,t.exclusiveMaximum=n.exclusiveMaximum,t.minimum=n.minimum,t.exclusiveMinimum=n.exclusiveMinimum,t.multipleOf=n.multipleOf,t.maxLength=n.maxLength,t.minLength=n.minLength,t.maxItems=n.maxItems,t.minItems=n.minItems,t.uniqueItems=n.uniqueItems,t.maxProperties=n.maxProperties,t.minProperties=n.minProperties,t.pattern=q(n.pattern),t.imports.push(...n.imports),t.enum.push(...n.enum),t.enums.push(...n.enums),t.properties.push(...n.properties),t}}}var r;return t}function fe(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:G(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.content){const t=me(0,n.content);if(t){if(null==t?void 0:t.$ref){const e=te(t.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const n=le({openApi:e,definition:t});return r.export=n.export,r.type=n.type,r.base=n.base,r.template=n.template,r.link=n.link,r.isReadOnly=n.isReadOnly,r.isRequired=n.isRequired,r.isNullable=n.isNullable,r.format=n.format,r.maximum=n.maximum,r.exclusiveMaximum=n.exclusiveMaximum,r.minimum=n.minimum,r.exclusiveMinimum=n.exclusiveMinimum,r.multipleOf=n.multipleOf,r.maxLength=n.maxLength,r.minLength=n.minLength,r.maxItems=n.maxItems,r.minItems=n.minItems,r.uniqueItems=n.uniqueItems,r.maxProperties=n.maxProperties,r.minProperties=n.minProperties,r.pattern=q(n.pattern),r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r}}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function he(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function ye(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?ye(e.link,n.link):t}function ve(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>ye(n,e)))===n))}function ge(e,n,t,r,a,o){const l=function(e,n){var t;return(null===(t=e.tags)||void 0===t?void 0:t[0])||`${ne(n)}Service`}(r,o),i=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=d.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}(l),s=`${t}${i}`,u=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n)}(r.operationId||s),p=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${se(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),c={service:i,name:u,summary:G(r.summary),description:G(r.description),deprecated:!0===r.deprecated,method:t.toUpperCase(),path:p,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(r.parameters){const n=ce(e,r.parameters);c.imports.push(...n.imports),c.parameters.push(...n.parameters),c.parametersPath.push(...n.parametersPath),c.parametersQuery.push(...n.parametersQuery),c.parametersForm.push(...n.parametersForm),c.parametersHeader.push(...n.parametersHeader),c.parametersCookie.push(...n.parametersCookie),c.parametersBody=n.parametersBody}if(r.requestBody){const n=de(e,ue(e,r.requestBody));c.imports.push(...n.imports),c.parameters.push(n),c.parameters=c.parameters.sort(pe),c.parametersBody=n}if(r.responses){const n=function(e,n){const t=[];for(const r in n)if(n.hasOwnProperty(r)){const a=ue(e,n[r]),o=he(r);if(o){const n=fe(e,a,o);t.push(n)}}return t.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,r.responses),t=ve(n);c.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),c.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(t),t.forEach((e=>{c.results.push(e),c.imports.push(...e.imports)}))}return c}function be(e,n){const t=function(e="1.0"){return e.replace(/^v/gi,"")}(n.info.version),r=function(e){var n;const t=null===(n=e.servers)||void 0===n?void 0:n[0],r=(null==t?void 0:t.variables)||{};let a=(null==t?void 0:t.url)||"";for(const e in r)r.hasOwnProperty(e)&&(a=a.replace(`{${e}}`,r[e].default));return a}(n),a=function(e,n){const t=[],r=w(e,n);if(r)for(const a of r){const r=e.get(a),o=te(a),l=le({openApi:n,definition:r,isDefinition:!0,name:o.base,path:o.path});t.push(l)}return t.filter(R)}(e,n),o=function(e,n){const t=new Map;for(const r in e.paths)if(e.paths.hasOwnProperty(r)){const a=e.paths[r],o=ce(e,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=ge(e,r,l,a[l],o,n),s=t.get(i.service)||{name:i.service,operations:[],imports:[]};s.operations.push(i),s.imports.push(...i.imports),t.set(i.service,s)}}return Array.from(t.values())}(n,e.fileName());return{version:t,server:r,models:a,services:o}}i.promisify(a.readFile);const Pe=i.promisify(a.writeFile),Oe=i.promisify(a.copyFile),xe=i.promisify(a.exists),ke=h.default,we=e=>new Promise(((n,t)=>{y.default(e,(e=>{e?t(e):n()}))}));function Re(n,t,r){if(!n.$ref||e.isAbsolute(n.$ref)||n.$ref.match(/^(http:\/\/|https:\/\/|#\/)/g))for(const e of Object.keys(n))n[e]instanceof Object&&Re(n[e],t,r);else n.$ref=m.default.join(r,n.$ref);return n}var qe;function je(e){var n;return null===(n=null==e?void 0:e.enum)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function Ce(e){var n;return null===(n=null==e?void 0:e.enums)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function Ae(e,n){return e instanceof Object&&"name"in e&&"alias"in e&&"path"in e?function(e,n){const t=`${e.path}${e.name}`.toLowerCase(),r=`${n.path}${n.name}`.toLowerCase();return t.localeCompare(r,"en")}(e,n):function(e,n){const t=e.toLowerCase(),r=n.toLowerCase();return t.localeCompare(r,"en")}(e,n)}function $e(e){var n,t,r;return null===(r=null===(t=null===(n=null==e?void 0:e.imports)||void 0===n?void 0:n.filter(R))||void 0===t?void 0:t.sort(Ae))||void 0===r?void 0:r.filter((n=>e.name!==n.name))}function Ie(e,n){const t=[];return e.map(n).forEach((e=>{t.push(...e)})),t}function De(e){const n=Object.assign({},e);return n.operations=function(e){const n=new Map;return e.operations.map((e=>{const t=Object.assign({},e);t.imports.push(...Ie(t.parameters,(e=>e.imports))),t.imports.push(...Ie(t.results,(e=>e.imports)));const r=t.name,a=n.get(r)||0;return a>0&&(t.name=`${r}${a}`),n.set(r,a+1),t}))}(n),n.operations.forEach((e=>{n.imports.push(...e.imports)})),n.imports=function(e){return e.imports.filter(R).sort(Ae).filter((n=>e.name!==n.name))}(n),n}function Se(e){return Object.assign(Object.assign({},e),{models:e.models.map((e=>function(e){return Object.assign(Object.assign({},e),{imports:$e(e),enums:Ce(e),enum:je(e)})}(e))),services:e.services.map((e=>De(e)))})}!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(qe||(qe={}));var Ee={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n\n constructor(response: ApiResult, message: string) {\n super(message);\n\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n }\n}"},usePartial:!0,useData:!0},He={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiRequestOptions = {\n readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n readonly path: string;\n readonly cookies?: Record<string, any>;\n readonly headers?: Record<string, any>;\n readonly query?: Record<string, any>;\n readonly formData?: Record<string, any>;\n readonly body?: any;\n readonly mediaType?: string;\n readonly responseHeader?: string;\n readonly errors?: Record<number, string>;\n}"},usePartial:!0,useData:!0},Ne={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n}"},usePartial:!0,useData:!0},Te={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Be={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},Le={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},Me={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},_e={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getRequestBody"),n,{name:"fetch/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/sendRequest"),n,{name:"fetch/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseHeader"),n,{name:"fetch/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseBody"),n,{name:"fetch/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},Fe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n if (OpenAPI.WITH_CREDENTIALS) {\n request.credentials = 'include';\n }\n return await fetch(url, request);\n}"},useData:!0},Ue={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function catchErrors(options: ApiRequestOptions, result: ApiResult): void {\n const errors: Record<number, string> = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n ...options.errors,\n }\n\n const error = errors[result.status];\n if (error) {\n throw new ApiError(result, error);\n }\n\n if (!result.ok) {\n throw new ApiError(result, 'Generic Error');\n }\n}"},useData:!0},We={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getFormData(params: Record<string, any>): FormData {\n const formData = new FormData();\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n formData.append(key, value);\n }\n });\n return formData;\n}"},useData:!0},Ve={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getQueryString(params: Record<string, any>): string {\n const qs: string[] = [];\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n if (Array.isArray(value)) {\n value.forEach(value => {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n });\n } else {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n }\n }\n });\n if (qs.length > 0) {\n return `?${qs.join('&')}`;\n }\n return '';\n}"},useData:!0},Qe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getUrl(options: ApiRequestOptions): string {\n const path = options.path.replace(/[:]/g, '_');\n const url = `${OpenAPI.BASE}${path}`;\n\n if (options.query) {\n return `${url}${getQueryString(options.query)}`;\n }\n return url;\n}"},useData:!0},ze={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBinary(value: any): value is Buffer | ArrayBuffer | ArrayBufferView {\n const isBuffer = Buffer.isBuffer(value);\n const isArrayBuffer = types.isArrayBuffer(value);\n const isArrayBufferView = types.isArrayBufferView(value);\n return isBuffer || isArrayBuffer || isArrayBufferView;\n}"},useData:!0},Je={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBlob(value: any): value is Blob {\n return value instanceof Blob;\n}"},useData:!0},Ze={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {\n return value !== undefined && value !== null;\n}"},useData:!0},Ge={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isString(value: any): value is string {\n return typeof value === 'string';\n}"},useData:!0},Xe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isStringWithValue(value: any): value is string {\n return isString(value) && value !== '';\n}"},useData:!0},Ke={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isSuccess(status: number): boolean {\n return status >= 200 && status < 300;\n}"},useData:!0},Ye={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nasync function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {\n if (typeof resolver === 'function') {\n return (resolver as Resolver<T>)(options);\n }\n return resolver;\n}"},useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBinary(options.body)) {\n headers.append('Content-Type', 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport FormData from 'form-data';\nimport fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getHeaders"),n,{name:"node/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getRequestBody"),n,{name:"node/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/sendRequest"),n,{name:"node/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseHeader"),n,{name:"node/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseBody"),n,{name:"node/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using node-fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n return await fetch(url, request);\n}"},useData:!0},ln={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\ntype Config = {\n BASE: string;\n VERSION: string;\n WITH_CREDENTIALS: boolean;\n TOKEN?: string | Resolver<string>;\n USERNAME?: string | Resolver<string>;\n PASSWORD?: string | Resolver<string>;\n HEADERS?: Headers | Resolver<Headers>;\n}\n\nexport const OpenAPI: Config = {\n BASE: '"+(null!=(o=i(l(n,"server",{start:{line:19,column:14},end:{line:19,column:20}}),n))?o:"")+"',\n VERSION: '"+(null!=(o=i(l(n,"version",{start:{line:20,column:17},end:{line:20,column:24}}),n))?o:"")+"',\n WITH_CREDENTIALS: false,\n TOKEN: undefined,\n USERNAME: undefined,\n PASSWORD: undefined,\n HEADERS: undefined,\n};"},usePartial:!0,useData:!0},sn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"fetch/request"),n,{name:"fetch/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"xhr/request"),n,{name:"xhr/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"node/request"),n,{name:"node/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:65}}}))?o:"")},usePartial:!0,useData:!0},un={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(xhr: XMLHttpRequest): any {\n try {\n const contentType = xhr.getResponseHeader('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return JSON.parse(xhr.responseText);\n } else {\n return xhr.responseText;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(xhr: XMLHttpRequest, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = xhr.getResponseHeader(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getRequestBody"),n,{name:"xhr/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/sendRequest"),n,{name:"xhr/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseHeader"),n,{name:"xhr/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseBody"),n,{name:"xhr/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using XHR client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},fn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<XMLHttpRequest> {\n\n const xhr = new XMLHttpRequest();\n xhr.open(options.method, url, true);\n xhr.withCredentials = OpenAPI.WITH_CREDENTIALS;\n\n const headers = await getHeaders(options);\n headers.forEach((value: string, key: string) => {\n xhr.setRequestHeader(key, value);\n });\n\n return new Promise<XMLHttpRequest>(resolve => {\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n resolve(xhr);\n }\n };\n xhr.send(getRequestBody(options));\n });\n}"},useData:!0},hn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?o:"")},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=i(l(n,"name",{start:{line:6,column:17},end:{line:6,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:24},end:{line:6,column:59}}}))?o:"")+" } from './"+(null!=(o=i(l(n,"path",{start:{line:6,column:73},end:{line:6,column:77}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:6,column:44},end:{line:6,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportInterface"),n,{name:"exportInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:12,column:0},end:{line:22,column:0}}}))?o:""},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportComposition"),n,{name:"exportComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:14,column:0},end:{line:22,column:0}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:16,column:0},end:{line:22,column:0}}}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:18,column:0},end:{line:22,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportEnum"),n,{name:"exportEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportType"),n,{name:"exportType",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=i(t,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?o:"")+"\n"+(null!=(o=i(t,"equals").call(l,i(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:10,column:0},end:{line:22,column:11}}}))?o:"")},usePartial:!0,useData:!0},yn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport const $"+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:3,column:17},end:{line:3,column:21}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},vn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return"import type { "+(null!=(o=i(l(n,"name",{start:{line:5,column:17},end:{line:5,column:21}}),n))?o:"")+" } from '../models/"+(null!=(o=i(l(n,"path",{start:{line:5,column:46},end:{line:5,column:50}}),n))?o:"")+"';\n"},4:function(e,n,t,r,a){return"import { OpenAPI } from '../core/OpenAPI';\n"},6:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.strict,s=e.lambda,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" /**\n"+(null!=(o=u(t,"if").call(l,u(n,"deprecated"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:4},end:{line:19,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"summary"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:4},end:{line:22,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"description"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:4},end:{line:25,column:11}}}))?o:"")+(null!=(o=u(t,"unless").call(l,u(u(a,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:32,column:15}}}))?o:"")+(null!=(o=u(t,"each").call(l,u(n,"results"),{name:"each",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:33,column:4},end:{line:35,column:13}}}))?o:"")+" * @throws ApiError\n */\n public static async "+(null!=(o=s(i(n,"name",{start:{line:38,column:27},end:{line:38,column:31}}),n))?o:"")+"("+(null!=(o=e.invokePartial(u(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): Promise<"+(null!=(o=e.invokePartial(u(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"> {\n const result = await __request({\n method: '"+(null!=(o=s(i(n,"method",{start:{line:40,column:24},end:{line:40,column:30}}),n))?o:"")+"',\n path: `"+(null!=(o=s(i(n,"path",{start:{line:41,column:22},end:{line:41,column:26}}),n))?o:"")+"`,\n"+(null!=(o=u(t,"if").call(l,u(n,"parametersCookie"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:42,column:12},end:{line:48,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersHeader"),{name:"if",hash:{},fn:e.program(22,a,0),inverse:e.noop,data:a,loc:{start:{line:49,column:12},end:{line:55,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersQuery"),{name:"if",hash:{},fn:e.program(24,a,0),inverse:e.noop,data:a,loc:{start:{line:56,column:12},end:{line:62,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersForm"),{name:"if",hash:{},fn:e.program(26,a,0),inverse:e.noop,data:a,loc:{start:{line:63,column:12},end:{line:69,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersBody"),{name:"if",hash:{},fn:e.program(28,a,0),inverse:e.noop,data:a,loc:{start:{line:70,column:12},end:{line:75,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"responseHeader"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:76,column:12},end:{line:78,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"errors"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:79,column:12},end:{line:85,column:19}}}))?o:"")+" });\n return result.body;\n }\n\n"},7:function(e,n,t,r,a){return" * @deprecated\n"},9:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"summary",{start:{line:21,column:10},end:{line:21,column:17}}),n))?o:"")+"\n"},11:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:24,column:10},end:{line:24,column:21}}),n))?o:"")+"\n"},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:4},end:{line:31,column:11}}}))?o:""},14:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:28,column:4},end:{line:30,column:13}}}))?o:""},15:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @param "+(null!=(o=i(l(n,"name",{start:{line:29,column:17},end:{line:29,column:21}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:29,column:28},end:{line:29,column:39}}),n))?o:"")+"\n"},17:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @returns "+(null!=(o=i(l(n,"type",{start:{line:34,column:19},end:{line:34,column:23}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:34,column:30},end:{line:34,column:41}}),n))?o:"")+"\n"},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" cookies: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersCookie"),{name:"each",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:16},end:{line:46,column:25}}}))?o:"")+" },\n"},20:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" '"+(null!=(o=i(l(n,"prop",{start:{line:45,column:20},end:{line:45,column:24}}),n))?o:"")+"': "+(null!=(o=i(l(n,"name",{start:{line:45,column:33},end:{line:45,column:37}}),n))?o:"")+",\n"},22:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" headers: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersHeader"),{name:"each",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:51,column:16},end:{line:53,column:25}}}))?o:"")+" },\n"},24:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" query: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersQuery"),{name:"each",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:58,column:16},end:{line:60,column:25}}}))?o:"")+" },\n"},26:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" formData: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersForm"),{name:"each",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:65,column:16},end:{line:67,column:25}}}))?o:"")+" },\n"},28:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" body: "+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"name",{start:{line:71,column:21},end:{line:71,column:40}}),n))?o:"")+",\n"+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(n,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:72,column:12},end:{line:74,column:19}}}))?o:"")},29:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" mediaType: '"+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"mediaType",{start:{line:73,column:27},end:{line:73,column:51}}),n))?o:"")+"',\n"},31:function(e,n,t,r,a){var o;return" responseHeader: '"+(null!=(o=e.lambda(e.strict(n,"responseHeader",{start:{line:77,column:32},end:{line:77,column:46}}),n))?o:"")+"',\n"},33:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" errors: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"errors"),{name:"each",hash:{},fn:e.program(34,a,0),inverse:e.noop,data:a,loc:{start:{line:81,column:16},end:{line:83,column:25}}}))?o:"")+" },\n"},34:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"code",{start:{line:82,column:19},end:{line:82,column:23}}),n))?o:"")+": `"+(null!=(o=i(l(n,"description",{start:{line:82,column:32},end:{line:82,column:43}}),n))?o:"")+"`,\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=i(t,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+"import { request as __request } from '../core/request';\n"+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"useVersion"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"\nexport class "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:13,column:16},end:{line:13,column:20}}),n))?o:"")+" {\n\n"+(null!=(o=i(t,"each").call(l,i(n,"operations"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:4},end:{line:90,column:13}}}))?o:"")+"}"},usePartial:!0,useData:!0},gn={1:function(e,n,t,r,a){return"\nexport { ApiError } from './core/ApiError';\nexport { OpenAPI } from './core/OpenAPI';\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:21,column:7}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:20,column:9}}}))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enum"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:7}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:12,column:12},end:{line:12,column:16}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:19},end:{line:12,column:55}}}))?o:"")+" } from './models/"+(null!=(o=i(l(n,"path",{start:{line:12,column:76},end:{line:12,column:80}}),n))?o:"")+(null!=(o=i(l(n,"name",{start:{line:12,column:86},end:{line:12,column:90}}),n))?o:"")+"';\n"},7:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:12,column:40},end:{line:12,column:45}}),n))?o:"")},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export type { "+(null!=(o=i(l(n,"name",{start:{line:14,column:17},end:{line:14,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:24},end:{line:14,column:60}}}))?o:"")+" } from './models/"+(null!=(o=i(l(n,"path",{start:{line:14,column:81},end:{line:14,column:85}}),n))?o:"")+(null!=(o=i(l(n,"name",{start:{line:14,column:91},end:{line:14,column:95}}),n))?o:"")+"';\n"},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},14:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:24,column:0},end:{line:29,column:7}}}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:9}}}))?o:"")},16:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { $"+(null!=(o=i(l(n,"name",{start:{line:27,column:13},end:{line:27,column:17}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:20},end:{line:27,column:57}}}))?o:"")+" } from './schemas/"+(null!=(o=i(l(n,"path",{start:{line:27,column:79},end:{line:27,column:83}}),n))?o:"")+"$"+(null!=(o=i(l(n,"name",{start:{line:27,column:90},end:{line:27,column:94}}),n))?o:"")+"';\n"},17:function(e,n,t,r,a){var o;return" as $"+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:27,column:42},end:{line:27,column:47}}),n))?o:"")},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"if",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:37,column:7}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:34,column:0},end:{line:36,column:9}}}))?o:"")},21:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return"export { "+(null!=(o=i(l(n,"name",{start:{line:35,column:12},end:{line:35,column:16}}),n))?o:"")+" } from './services/"+(null!=(o=i(l(n,"name",{start:{line:35,column:42},end:{line:35,column:46}}),n))?o:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportCore"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportModels"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportSchemas"),{name:"if",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:30,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportServices"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:31,column:0},end:{line:38,column:7}}}))?o:"")},usePartial:!0,useData:!0},bn={1:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:86}}}))?o:"")},2:function(e,n,t,r,a){return"Blob"},4:function(e,n,t,r,a){return"Buffer | ArrayBuffer | ArrayBufferView"},6:function(e,n,t,r,a){var o;return null!=(o=e.lambda(e.strict(n,"base",{start:{line:6,column:3},end:{line:6,column:7}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"base"),"File",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:7,column:13}}}))?o:""},useData:!0},Pn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:27,column:11}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:10,column:20},end:{line:10,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:24,column:13}}}))?o:"")+"\n}\n"},5:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:19},end:{line:18,column:23}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:8},end:{line:21,column:17}}}))?o:"")+" }\n\n"},6:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:15,column:10},end:{line:15,column:21}}),n))?o:"")+"\n */\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:20,column:11},end:{line:20,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:20,column:24},end:{line:20,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",hash:{parent:i(n,"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";\n"+(null!=(o=i(t,"if").call(l,i(n,"enums"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:28,column:7}}}))?o:"")},usePartial:!0,useData:!0},On={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?o:"")+(null!=(o=i(t,"containsSpaces").call(l,i(n,"name"),{name:"containsSpaces",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:13,column:4},end:{line:17,column:23}}}))?o:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return' "'+(null!=(o=i(l(n,"name",{start:{line:14,column:8},end:{line:14,column:12}}),n))?o:"")+'" = '+(null!=(o=i(l(n,"value",{start:{line:14,column:22},end:{line:14,column:27}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:16,column:20},end:{line:16,column:25}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?o:"")+"}"},useData:!0},xn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(n,"alias"),{name:"if",hash:{},fn:e.program(6,a,0,o,l),inverse:e.program(8,a,0,o,l),data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?i:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(l(n,"name",{start:{line:14,column:22},end:{line:14,column:26}}),n))?o:"")+(null!=(o=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=i(l(n,"alias",{start:{line:14,column:49},end:{line:14,column:54}}),n))?o:"")+";\n"},8:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:16,column:22},end:{line:16,column:26}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+";\n"},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:0},end:{line:40,column:11}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:23,column:20},end:{line:23,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:25,column:4},end:{line:37,column:13}}}))?o:"")+"\n}\n"},12:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:30,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:31,column:19},end:{line:31,column:23}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:8},end:{line:34,column:17}}}))?o:"")+" }\n\n"},13:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:33,column:11},end:{line:33,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:33,column:24},end:{line:33,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:"")+"export interface "+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:6,column:20},end:{line:6,column:24}}),n))?i:"")+" {\n"+(null!=(i=u(t,"each").call(s,u(n,"properties"),{name:"each",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?i:"")+"}\n"+(null!=(i=u(t,"if").call(s,u(n,"enums"),{name:"if",hash:{},fn:e.program(10,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:41,column:7}}}))?i:"")},usePartial:!0,useData:!0,useDepths:!0},kn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},wn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},Rn={1:function(e,n,t,r,a){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isNullable"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?o:""},useData:!0},qn={1:function(e,n,t,r,a){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?o:""},useData:!0},jn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?o:""},2:function(e,n,t,r,a){return"?"},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},useData:!0},Cn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:2,column:0},end:{line:20,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:13,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:5,column:31},end:{line:5,column:38}}),n))?o:"")},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:3},end:{line:12,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return"/** "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:7},end:{line:10,column:18}}),n))?o:"")+" **/\n"},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:9}}}))?o:"")},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:3},end:{line:18,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:36},end:{line:18,column:74}}}))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:21,column:7}}}))?o:""},usePartial:!0,useData:!0},An={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?o:"")},3:function(e,n,t,r,a){return" | "},5:function(e,n,t,r,a){return"void"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},$n={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaInterface"),n,{name:"schemaInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaEnum"),n,{name:"schemaEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaArray"),n,{name:"schemaArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaDictionary"),n,{name:"schemaDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaComposition"),n,{name:"schemaComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(16,a,0),data:a,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaGeneric"),n,{name:"schemaGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?o:""},usePartial:!0,useData:!0},In={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'array',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Dn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:46},end:{line:3,column:76}}}))?o:"")},2:function(e,n,t,r,a){return", "},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:5,column:19},end:{line:5,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:8,column:19},end:{line:8,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: '"+(null!=(o=e.lambda(e.strict(n,"export",{start:{line:2,column:13},end:{line:2,column:19}}),n))?o:"")+"',\n contains: ["+(null!=(o=i(t,"each").call(l,i(n,"properties"),{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:15},end:{line:3,column:85}}}))?o:"")+"],\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Sn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'dictionary',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},En={1:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:4,column:19},end:{line:4,column:29}}),n))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:7,column:19},end:{line:7,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'Enum',\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"}"},useData:!0},Hn={1:function(e,n,t,r,a){var o;return" type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:3,column:14},end:{line:3,column:18}}),n))?o:"")+"',\n"},3:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:6,column:19},end:{line:6,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:9,column:19},end:{line:9,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:12,column:19},end:{line:12,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" format: '"+(null!=(o=e.lambda(e.strict(n,"format",{start:{line:15,column:16},end:{line:15,column:22}}),n))?o:"")+"',\n"},11:function(e,n,t,r,a){var o;return" maximum: "+(null!=(o=e.lambda(e.strict(n,"maximum",{start:{line:18,column:16},end:{line:18,column:23}}),n))?o:"")+",\n"},13:function(e,n,t,r,a){var o;return" exclusiveMaximum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMaximum",{start:{line:21,column:25},end:{line:21,column:41}}),n))?o:"")+",\n"},15:function(e,n,t,r,a){var o;return" minimum: "+(null!=(o=e.lambda(e.strict(n,"minimum",{start:{line:24,column:16},end:{line:24,column:23}}),n))?o:"")+",\n"},17:function(e,n,t,r,a){var o;return" exclusiveMinimum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMinimum",{start:{line:27,column:25},end:{line:27,column:41}}),n))?o:"")+",\n"},19:function(e,n,t,r,a){var o;return" multipleOf: "+(null!=(o=e.lambda(e.strict(n,"multipleOf",{start:{line:30,column:19},end:{line:30,column:29}}),n))?o:"")+",\n"},21:function(e,n,t,r,a){var o;return" maxLength: "+(null!=(o=e.lambda(e.strict(n,"maxLength",{start:{line:33,column:18},end:{line:33,column:27}}),n))?o:"")+",\n"},23:function(e,n,t,r,a){var o;return" minLength: "+(null!=(o=e.lambda(e.strict(n,"minLength",{start:{line:36,column:18},end:{line:36,column:27}}),n))?o:"")+",\n"},25:function(e,n,t,r,a){var o;return" pattern: '"+(null!=(o=e.lambda(e.strict(n,"pattern",{start:{line:39,column:17},end:{line:39,column:24}}),n))?o:"")+"',\n"},27:function(e,n,t,r,a){var o;return" maxItems: "+(null!=(o=e.lambda(e.strict(n,"maxItems",{start:{line:42,column:17},end:{line:42,column:25}}),n))?o:"")+",\n"},29:function(e,n,t,r,a){var o;return" minItems: "+(null!=(o=e.lambda(e.strict(n,"minItems",{start:{line:45,column:17},end:{line:45,column:25}}),n))?o:"")+",\n"},31:function(e,n,t,r,a){var o;return" uniqueItems: "+(null!=(o=e.lambda(e.strict(n,"uniqueItems",{start:{line:48,column:20},end:{line:48,column:31}}),n))?o:"")+",\n"},33:function(e,n,t,r,a){var o;return" maxProperties: "+(null!=(o=e.lambda(e.strict(n,"maxProperties",{start:{line:51,column:22},end:{line:51,column:35}}),n))?o:"")+",\n"},35:function(e,n,t,r,a){var o;return" minProperties: "+(null!=(o=e.lambda(e.strict(n,"minProperties",{start:{line:54,column:22},end:{line:54,column:35}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"if").call(l,i(n,"type"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"format"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maximum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minimum"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"multipleOf"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxLength"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minLength"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"pattern"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxItems"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minItems"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"uniqueItems"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxProperties"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minProperties"),{name:"if",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?o:"")+"}"},useData:!0},Nn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:13,column:19},end:{line:13,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:16,column:19},end:{line:16,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n properties: {\n"+(null!=(o=i(t,"if").call(l,i(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+" },\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Tn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeInterface"),n,{name:"typeInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeReference"),n,{name:"typeReference",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeEnum"),n,{name:"typeEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeArray"),n,{name:"typeArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeDictionary"),n,{name:"typeDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(18,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeUnion"),n,{name:"typeUnion",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},18:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(19,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeIntersection"),n,{name:"typeIntersection",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},22:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeGeneric"),n,{name:"typeGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?o:""},usePartial:!0,useData:!0},Bn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Ln={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Mn={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"name"),{name:"enumerator",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:55}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},_n={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Fn={1:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(i=s(t,"each").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:14,column:9}}}))?i:"")+"}"+(null!=(i=e.invokePartial(s(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")},2:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:7}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.program(7,a,0,o,l),data:a,loc:{start:{line:9,column:0},end:{line:13,column:7}}}))?i:"")},3:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:6,column:6},end:{line:6,column:17}}),n))?o:"")+"\n */\n"},5:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:10,column:18},end:{line:10,column:22}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"parent")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+",\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:18},end:{line:12,column:22}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},9:function(e,n,t,r,a){return"any"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(i=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.program(9,a,0,o,l),data:a,loc:{start:{line:1,column:0},end:{line:18,column:9}}}))?i:""},usePartial:!0,useData:!0,useDepths:!0},Un={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"intersection").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"intersection",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Wn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Vn={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"union").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"union",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0};function Qn(e){!function(e){v.registerHelper("equals",(function(e,n,t){return e===n?t.fn(this):t.inverse(this)})),v.registerHelper("notEquals",(function(e,n,t){return e!==n?t.fn(this):t.inverse(this)})),v.registerHelper("containsSpaces",(function(e,n){return/\s+/.test(e)?n.fn(this):n.inverse(this)})),v.registerHelper("union",(function(n,t,r){const a=v.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(R);let l=o.join(" | ");return o.length>1&&(l=`(${l})`),r.fn(l)})),v.registerHelper("intersection",(function(n,t,r){const a=v.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(R);let l=o.join(" & ");return o.length>1&&(l=`(${l})`),r.fn(l)})),v.registerHelper("enumerator",(function(n,t,r,a){return!e.useUnionTypes&&t&&r?`${t}.${r}`:a.fn(n.map((e=>e.value)).filter(R).join(" | "))}))}(e);const n={index:v.template(gn),exports:{model:v.template(hn),schema:v.template(yn),service:v.template(vn)},core:{settings:v.template(ln),apiError:v.template(Ee),apiRequestOptions:v.template(He),apiResult:v.template(Ne),request:v.template(sn)}};return v.registerPartial("exportEnum",v.template(On)),v.registerPartial("exportInterface",v.template(xn)),v.registerPartial("exportComposition",v.template(Pn)),v.registerPartial("exportType",v.template(kn)),v.registerPartial("header",v.template(wn)),v.registerPartial("isNullable",v.template(Rn)),v.registerPartial("isReadOnly",v.template(qn)),v.registerPartial("isRequired",v.template(jn)),v.registerPartial("parameters",v.template(Cn)),v.registerPartial("result",v.template(An)),v.registerPartial("schema",v.template($n)),v.registerPartial("schemaArray",v.template(In)),v.registerPartial("schemaDictionary",v.template(Sn)),v.registerPartial("schemaEnum",v.template(En)),v.registerPartial("schemaGeneric",v.template(Hn)),v.registerPartial("schemaInterface",v.template(Nn)),v.registerPartial("schemaComposition",v.template(Dn)),v.registerPartial("type",v.template(Tn)),v.registerPartial("typeArray",v.template(Bn)),v.registerPartial("typeDictionary",v.template(Ln)),v.registerPartial("typeEnum",v.template(Mn)),v.registerPartial("typeGeneric",v.template(_n)),v.registerPartial("typeInterface",v.template(Fn)),v.registerPartial("typeReference",v.template(Wn)),v.registerPartial("typeUnion",v.template(Vn)),v.registerPartial("typeIntersection",v.template(Un)),v.registerPartial("base",v.template(bn)),v.registerPartial("functions/catchErrors",v.template(Ue)),v.registerPartial("functions/getFormData",v.template(We)),v.registerPartial("functions/getQueryString",v.template(Ve)),v.registerPartial("functions/getUrl",v.template(Qe)),v.registerPartial("functions/isBinary",v.template(ze)),v.registerPartial("functions/isBlob",v.template(Je)),v.registerPartial("functions/isDefined",v.template(Ze)),v.registerPartial("functions/isString",v.template(Ge)),v.registerPartial("functions/isStringWithValue",v.template(Xe)),v.registerPartial("functions/isSuccess",v.template(Ke)),v.registerPartial("functions/resolve",v.template(Ye)),v.registerPartial("fetch/getHeaders",v.template(Te)),v.registerPartial("fetch/getRequestBody",v.template(Be)),v.registerPartial("fetch/getResponseBody",v.template(Le)),v.registerPartial("fetch/getResponseHeader",v.template(Me)),v.registerPartial("fetch/sendRequest",v.template(Fe)),v.registerPartial("fetch/request",v.template(_e)),v.registerPartial("xhr/getHeaders",v.template(un)),v.registerPartial("xhr/getRequestBody",v.template(pn)),v.registerPartial("xhr/getResponseBody",v.template(cn)),v.registerPartial("xhr/getResponseHeader",v.template(mn)),v.registerPartial("xhr/sendRequest",v.template(fn)),v.registerPartial("xhr/request",v.template(dn)),v.registerPartial("node/getHeaders",v.template(en)),v.registerPartial("node/getRequestBody",v.template(nn)),v.registerPartial("node/getResponseBody",v.template(tn)),v.registerPartial("node/getResponseHeader",v.template(rn)),v.registerPartial("node/sendRequest",v.template(on)),v.registerPartial("node/request",v.template(an)),n}function zn(e){let t=0,r=e.split(n.EOL);return r=r.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${" ".repeat(n)}${e}`;return""===r.trim()?"":r})),r.join(n.EOL)}async function Jn(n,t,r,o,l,i,s,u,p,c,m,d){const f=e.resolve(process.cwd(),r),h=e.resolve(f,"core"),y=e.resolve(f,"models"),v=e.resolve(f,"schemas"),g=e.resolve(f,"services");if(b=process.cwd(),P=r,!e.relative(P,b).startsWith(".."))throw new Error("Output folder is not a subdirectory of the current working directory");var b,P;s&&(m&&await we(h),await ke(h),await async function(n,t,r,a,o){const l={httpClient:a,server:n.server,version:n.version};if(await Pe(e.resolve(r,"OpenAPI.ts"),t.core.settings(l)),await Pe(e.resolve(r,"ApiError.ts"),t.core.apiError({})),await Pe(e.resolve(r,"ApiRequestOptions.ts"),t.core.apiRequestOptions({})),await Pe(e.resolve(r,"ApiResult.ts"),t.core.apiResult({})),await Pe(e.resolve(r,"request.ts"),t.core.request(l)),o){const n=e.resolve(process.cwd(),o);if(!await xe(n))throw new Error(`Custom request file "${n}" does not exists`);await Oe(n,e.resolve(r,"request.ts"))}}(n,t,h,o,d)),u&&(m&&await we(g),await ke(g),await async function(n,t,r,a,o,l){for(const i of n){const n=e.resolve(r,`${i.name}.ts`),s=i.operations.some((e=>e.path.includes("OpenAPI.VERSION"))),u=t.exports.service(Object.assign(Object.assign({},i),{httpClient:a,useUnionTypes:o,useVersion:s,useOptions:l}));await Pe(n,zn(u))}}(n.services,t,g,o,i,l)),c&&(m&&await we(v),await ke(v),await async function(n,t,r,o,l){for(const i of n){if(i.path){const n=e.resolve(r,`${i.path}`);a.mkdirSync(n,{recursive:!0})}const n=e.resolve(r,`${i.path}`,`$${i.name}.ts`),s=t.exports.schema(Object.assign(Object.assign({},i),{httpClient:o,useUnionTypes:l}));await Pe(n,zn(s))}}(n.models,t,v,o,i)),p&&(m&&await we(y),await ke(y),await async function(n,t,r,o,l){for(const i of n){if(i.path){const n=e.resolve(r,`${i.path}`);a.mkdirSync(n,{recursive:!0})}const n=e.resolve(r,`${i.path}`,`${i.name}.ts`),s=t.exports.model(Object.assign(Object.assign({},i),{httpClient:o,useUnionTypes:l}));await Pe(n,zn(s))}}(n.models,t,y,o,i)),(s||u||c||p)&&(await ke(f),await async function(n,t,r,a,o,l,i,s){var u,p;await Pe(e.resolve(r,"index.ts"),t.index({exportCore:o,exportServices:l,exportModels:i,exportSchemas:s,useUnionTypes:a,server:n.server,version:n.version,models:(p=n.models,p.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}))),services:(u=n.services,u.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")})))}))}(n,t,f,i,s,u,p,c))}exports.generate=async function({input:e,output:n,httpClient:t=exports.HttpClient.FETCH,useOptions:r=!1,useUnionTypes:a=!1,exportCore:o=!0,exportServices:l=!0,exportModels:i=!0,exportSchemas:s=!1,clean:u=!0,request:p,write:c=!0}){const d=new P(e),h=b(e)?await async function(e,n){const t=m.default.resolve(process.cwd(),e);if(!e)throw new Error(`Could not find OpenApi spec: "${t}"`);if(!await xe(t))throw new Error(`Could not read OpenApi spec: "${t}"`);const r=new f.default;n.addRefs(await r.resolve(e));const a=Object.assign({},r.schema);let o={};for(const e of Object.entries(a.paths)){const t=e[0],r=e[1];if(r.$ref){let e=n.get(r.$ref);e=Re(e,n,m.default.dirname(r.$ref)),o=Object.assign(o,{[t]:e})}else Object.assign(o,{[t]:r})}return r.schema=Object.assign(r.schema,{paths:o}),new Promise((e=>e(r.schema)))}(e,d):e,y=function(e){const n=e.swagger||e.openapi;if("string"==typeof n){const e=n.charAt(0),t=Number.parseInt(e);if(t===qe.V2||t===qe.V3)return t}throw new Error(`Unsupported Open API version: "${String(n)}"`)}(h),v=Qn({httpClient:t,useUnionTypes:a,useOptions:r});switch(y){case qe.V2:{const e=Se(Z(d,h));if(!c)break;await Jn(e,v,n,t,r,a,o,l,i,s,u,p);break}case qe.V3:{const e=Se(be(d,h));if(!c)break;await Jn(e,v,n,t,r,a,o,l,i,s,u,p);break}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),n=require("os"),t=require("camelcase"),r=require("json-schema-ref-parser"),a=require("fs"),o=require("mkdirp"),l=require("rimraf"),i=require("util"),s=require("handlebars/runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var c,m=u(e),f=u(t),d=u(r),h=u(o),y=u(l),v=p(s);function g(n){const t=e.extname(n),r=e.basename(n);return t?r.substr(0,r.length-t.length):r}function b(e){return"string"==typeof e}class P{constructor(n){this._refs={},b(n)?this._root={path:e.dirname(n),fileName:g(n)}:this._root={path:""}}addRefs(e){return this._refs=e,this}values(...e){return this._refs.values(...e)}get(e){return this._refs.get(e)}paths(...e){return this._refs.paths(...e)}exists(e){return this._refs.exists(e)}fileName(){return this._root.fileName?this._root.fileName:""}}exports.HttpClient=void 0,(c=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",c.XHR="xhr",c.NODE="node";var O,x=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){if(n.constructor!==t.constructor)return!1;var r,a,o;if(Array.isArray(n)){if((r=n.length)!=t.length)return!1;for(a=r;0!=a--;)if(!e(n[a],t[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if((r=(o=Object.keys(n)).length)!==Object.keys(t).length)return!1;for(a=r;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,o[a]))return!1;for(a=r;0!=a--;){var l=o[a];if(!e(n[l],t[l]))return!1}return!0}return n!=n&&t!=t};function k(n,t,r=[],a="",o=!1){if(t.$ref){const l=t.$ref.match(/^(http:\/\/|https:\/\/)/g)?t.$ref:t.$ref.match(/^(#\/)/g)?e.join(a,t.$ref):e.join(e.dirname(a),t.$ref);if(function(e,n){return-1!==e.findIndex((e=>x(e.value,n)))}(r,l))return r;o?r.push({value:l,type:O.SCHEMA}):r.push({value:l,type:O.OTHERS});const i=n.get(l),s=t.$ref.match(/^(http:\/\/|https:\/\/)/g)?"":t.$ref.match(/^(#\/)/g)?a:e.join(e.dirname(a),t.$ref);return k(n,i,r,s,o)}return t.schema?Object.values(t).forEach(((e,t)=>{e instanceof Object&&k(n,e,r,a,!0)})):Object.values(t).forEach(((e,t)=>{e instanceof Object&&k(n,e,r,a,o)})),r}function w(e,n){return k(e,n).filter((e=>e.type===O.SCHEMA)).map((e=>e.value))}function R(e,n,t){return function(e,n,t){for(let r=0;r<t.length;++r)if(x(e,t[r]))return n===r;return!1}(e,n,t)}function q(e){return null==e?void 0:e.replace(/\\/g,"\\\\")}function j(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}function C(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function A(e){return null!=e&&""!==e}function $(e){return Array.isArray(e)?e.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]}function I(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}function D(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}!function(e){e[e.SCHEMA=0]="SCHEMA",e[e.OTHERS=1]="OTHERS"}(O||(O={}));const S=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function E(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function H(e,n){const t={type:"any",base:"any",template:null,imports:[],path:""},r=function(e){return e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,"")}(e||"");if(t.path=function(e){if(!e)return"";const n=e.lastIndexOf("/");return-1===n?"":e.substring(0,n+1)}(r),/\[.*\]$/g.test(r)){const e=r.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=H(e[1]);t.path=n.path;const r=H(e[2]);"any[]"===n.type?(t.type=`${r.type}[]`,t.base=r.type,n.imports=[]):r.type?(t.type=`${n.type}<${r.type}>`,t.base=n.type,t.template=r.type):(t.type=n.type,t.base=n.type,t.template=n.type),t.imports.push(...n.imports),t.imports.push(...r.imports)}}else if(a=r,S.has(a)){const e=function(e){return S.get(e)}(r);t.path=r,e&&(t.type=e,t.base=e)}else if(r){const e=function(e){const n=e.lastIndexOf("/");return E(-1===n?e:e.substring(n,e.length))}(r);t.path=r,t.type=e,t.base=e,t.imports.push({name:e,alias:"",path:r})}var a;return t.type===n&&(t.type="T",t.base="T",t.imports=[]),t}function N(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=H(l.$ref);a.push({name:D(o),alias:"",path:"",export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:C(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=t({openApi:e,definition:l});a.push({name:D(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:C(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function T(e){var n;const{openApi:t,definition:r,isDefinition:a=!1,name:o="",path:l=""}=e,i={name:o,path:l,alias:"",export:"interface",type:"any",base:"any",template:null,link:null,description:C(r.description),isDefinition:a,isReadOnly:!0===r.readOnly,isNullable:!0===r["x-nullable"],isRequired:void 0!==r.default,format:r.format,maximum:r.maximum,exclusiveMaximum:r.exclusiveMaximum,minimum:r.minimum,exclusiveMinimum:r.exclusiveMinimum,multipleOf:r.multipleOf,maxLength:r.maxLength,minLength:r.minLength,maxItems:r.maxItems,minItems:r.minItems,uniqueItems:r.uniqueItems,maxProperties:r.maxProperties,minProperties:r.minProperties,pattern:q(r.pattern),imports:[],enum:[],enums:[],properties:[]};if(r.$ref){const e=H(r.$ref);return i.export="reference",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}if(r.enum&&"boolean"!==r.type){const e=j($(r.enum),r);if(e.length)return i.export="enum",i.type="string",i.base="string",i.enum.push(...e),i}if(("int"===r.type||"integer"===r.type)&&r.description){const e=I(r.description);if(e.length)return i.export="enum",i.type="number",i.base="number",i.enum.push(...e),i}if("array"===r.type&&r.items){if(r.items.$ref){const e=H(r.items.$ref);return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=T({openApi:t,definition:r.items});return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if("object"===r.type&&"object"==typeof r.additionalProperties){if(r.additionalProperties.$ref){const e=H(r.additionalProperties.$ref);return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}{const e=T({openApi:t,definition:r.additionalProperties});return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.link=e,i.imports.push(...e.imports),i}}if(null===(n=r.allOf)||void 0===n?void 0:n.length){const e=function(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>a({openApi:e,definition:n})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=N(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o}(t,r,r.allOf,"all-of",T);return i.export=e.type,i.imports.push(...e.imports),i.properties.push(...e.properties),i.enums.push(...e.enums),i}if("object"===r.type){if(i.export="interface",i.type="any",i.base="any",r.properties){N(t,r,T).forEach((e=>{i.imports.push(...e.imports),i.enums.push(...e.enums),i.properties.push(e),"enum"===e.export&&i.enums.push(e)}))}return i}if(r.type){const e=H(r.type);return i.export="generic",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i}return i}function B(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===n.export&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}const L=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function M(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return f.default(n).replace(L,"_$1")}function _(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function F(e,n,t){const r={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const a=t.$ref?e.get(t.$ref):t,o=function(e,n){const t={path:"",in:n.in,prop:n.name,export:"interface",name:M(n.name),alias:"",type:"any",base:"any",template:null,link:null,description:C(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n["x-nullable"],format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,pattern:q(n.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=H(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t.path=e.path,t}if(n.enum){const e=j($(n.enum),n);if(e.length)return t.export="enum",t.type="string",t.base="string",t.enum.push(...e),t.default=B(n,t),t}if(("int"===n.type||"integer"===n.type)&&n.description){const e=I(n.description);if(e.length)return t.export="enum",t.type="number",t.base="number",t.enum.push(...e),t.default=B(n,t),t}if("array"===n.type&&n.items){const e=H(n.items.type);return t.export="array",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}if("object"===n.type&&n.items){const e=H(n.items.type);return t.export="dictionary",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}if(n.schema){if(n.schema.$ref){const e=H(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}{const r=T({openApi:e,definition:n.schema});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t.default=B(n,t),t}}if(n.type){const e=H(n.type);return t.export="generic",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=B(n,t),t}return t}(n,a);if("api-version"!==o.prop)switch(o.in){case"path":r.parametersPath.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"query":r.parametersQuery.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"header":r.parametersHeader.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"formData":r.parametersForm.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"body":r.parametersBody=o,r.parameters.push(o),r.imports.push(...o.imports)}})),r.parameters=r.parameters.sort(_),r.parametersPath=r.parametersPath.sort(_),r.parametersQuery=r.parametersQuery.sort(_),r.parametersForm=r.parametersForm.sort(_),r.parametersCookie=r.parametersCookie.sort(_),r.parametersHeader=r.parametersHeader.sort(_),r}function U(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:C(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.schema){if(n.schema.$ref){const e=H(n.schema.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const t=T({openApi:e,definition:n.schema});return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=t.isRequired,r.isNullable=t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=q(t.pattern),r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function W(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function V(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?V(e.link,n.link):t}function Q(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>V(n,e)))===n))}function z(e,n,t,r,a,o){var l;const i=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=f.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(l=a.tags)||void 0===l?void 0:l[0])||"Service"),s=`${r}${i}`,u=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return f.default(n)}(a.operationId||s),p=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${M(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(t),c={service:i,name:u,summary:C(a.summary),description:C(a.description),deprecated:!0===a.deprecated,method:r.toUpperCase(),path:p,parameters:[...o.parameters],parametersPath:[...o.parametersPath],parametersQuery:[...o.parametersQuery],parametersForm:[...o.parametersForm],parametersHeader:[...o.parametersHeader],parametersCookie:[...o.parametersCookie],parametersBody:o.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const t=F(e,n,a.parameters);c.imports.push(...t.imports),c.parameters.push(...t.parameters),c.parametersPath.push(...t.parametersPath),c.parametersQuery.push(...t.parametersQuery),c.parametersForm.push(...t.parametersForm),c.parametersHeader.push(...t.parametersHeader),c.parametersCookie.push(...t.parametersCookie),c.parametersBody=t.parametersBody}if(a.responses){const t=function(e,n,t){const r=[];for(const a in t)if(t.hasOwnProperty(a)){const o=t[a],l=o.$ref?e.get(o.$ref):o,i=W(a);if(i){const e=U(n,l,i);r.push(e)}}return r.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,n,a.responses),r=Q(t);c.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(t),c.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(r),r.forEach((e=>{c.results.push(e),c.imports.push(...e.imports)}))}return c}function J(e,n){const t=function(e="1.0"){return e.replace(/^v/gi,"")}(n.info.version),r=function(e){var n;const t=(null===(n=e.schemes)||void 0===n?void 0:n[0])||"http",r=e.host,a=e.basePath||"";return r?`${t}://${r}${a}`:a}(n),a=function(e,n){const t=[],r=w(e,n);if(r)for(const a of r){const r=e.get(a),o=H(a),l=T({openApi:n,definition:r,isDefinition:!0,name:o.base,path:o.path});t.push(l)}return t.filter(R)}(e,n),o=function(e,n){const t=new Map;for(const r in n.paths)if(n.paths.hasOwnProperty(r)){const a=n.paths[r],o=F(e,n,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=z(e,n,r,l,a[l],o),s=t.get(i.service)||{name:i.service,operations:[],imports:[]};s.operations.push(i),s.imports.push(...i.imports),t.set(i.service,s)}}return Array.from(t.values())}(e,n);return{version:t,server:r,models:a,services:o}}function Z(e){return e.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}))}function G(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`)):null}function X(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}function K(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}const Y=new Map([["File","File"],["file","File"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function ee(e){return Y.has(e)}function ne(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return f.default(n).replace(/^./,(e=>e.toUpperCase()))}function te(n,t){const r={type:"any",base:"any",template:null,imports:[],path:""},a=function(n){if(!n.match(/^(http:\/\/|https:\/\/|#\/)/g)&&!ee(n)&&!n.match(/^array\[[a-z]+\]$/g)){const t=e.dirname(n),r=e.extname(n),a=r.toLowerCase().match(/(\.json|\.yaml|\/yml)$/g)?ne(e.basename(n,r)):ne(e.basename(n));return t?e.join(t,a):a}return n.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,"")}(n||"");if(/\[.*\]$/g.test(a)){const e=a.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=te(e[1]);r.path=n.path;const t=te(e[2]);"any[]"===n.type?(r.type=`${t.type}[]`,r.base=`${t.type}`,n.imports=[]):t.type?(r.type=`${n.type}<${t.type}>`,r.base=n.type,r.template=t.type):(r.type=n.type,r.base=n.type,r.template=n.type),r.imports.push(...n.imports),r.imports.push(...t.imports)}}else if(ee(a)){const e=(o=a,Y.get(o));r.path=a,e&&(r.type=e,r.base=e)}else if(a){const e=function(e){const n=e.lastIndexOf("/");return K(-1===n?e:e.substring(n,e.length))}(a);r.path=a,r.type=e,r.base=e,r.imports.push({name:e,alias:"",path:a})}var o;return r.type===t&&(r.type="T",r.base="T",r.imports=[]),r}function re(e,n,t){var r;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=(null===(r=n.required)||void 0===r?void 0:r.includes(o))||void 0!==l.default;if(l.$ref){const e=te(l.$ref);a.push({name:X(o),alias:"",path:e.path,export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:G(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=t({openApi:e,definition:l});a.push({name:X(o),alias:"",path:n.path,export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:G(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:q(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}function ae(e,n,t,r,a){const o={type:r,imports:[],enums:[],properties:[]},l=t.map((n=>a({openApi:e,definition:n})));if(l.filter((e=>{const n=e.properties.length,t=e.enums.length;return!("any"===e.type&&!n&&!t)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.properties){const t=re(e,n,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),o.properties.push({name:"properties",alias:"",path:"",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:t})}return o.imports=o.imports.filter(R),o}function oe(e,n){var t;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==n?void 0:n.export)&&(null===(t=n.enum)||void 0===t?void 0:t[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function le(e){var n,t,r;const{openApi:a,definition:o,isDefinition:l=!1,name:i="",path:s=""}=e,u={name:i,alias:"",path:s,export:"interface",type:"any",base:"any",template:null,link:null,description:G(o.description),isDefinition:l,isReadOnly:!0===o.readOnly,isNullable:!0===o.nullable,isRequired:void 0!==o.default,format:o.format,maximum:o.maximum,exclusiveMaximum:o.exclusiveMaximum,minimum:o.minimum,exclusiveMinimum:o.exclusiveMinimum,multipleOf:o.multipleOf,maxLength:o.maxLength,minLength:o.minLength,maxItems:o.maxItems,minItems:o.minItems,uniqueItems:o.uniqueItems,maxProperties:o.maxProperties,minProperties:o.minProperties,pattern:q(o.pattern),imports:[],enum:[],enums:[],properties:[]};if(o.$ref){const e=te(o.$ref);return u.export="reference",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}if(o.enum&&"boolean"!==o.type){const e=function(e,n){const t=n["x-enum-varnames"],r=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==t?void 0:t[n])||e.name,description:(null==r?void 0:r[n])||e.description,value:e.value,type:e.type})))}((p=o.enum,Array.isArray(p)?p.filter(((e,n,t)=>t.indexOf(e)===n)).filter(A).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]),o);if(e.length)return u.export="enum",u.type="string",u.base="string",u.enum.push(...e),u.default=oe(o,u),u}var p;if(("int"===o.type||"integer"===o.type)&&o.description){const e=function(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const t=n.split("=")[0],r=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));t&&Number.isInteger(r)&&e.push({name:t.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(r),type:"number",description:null})})),e.filter(((e,n,t)=>t.map((e=>e.name)).indexOf(e.name)===n))}}return[]}(o.description);if(e.length)return u.export="enum",u.type="number",u.base="number",u.enum.push(...e),u.default=oe(o,u),u}if("array"===o.type&&o.items){if(o.items.$ref){const e=te(o.items.$ref);return u.export="array",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}{const e=le({openApi:a,definition:o.items});return u.export="array",u.type=e.type,u.base=e.base,u.template=e.template,u.link=e,u.imports.push(...e.imports),u.default=oe(o,u),u}}if("object"===o.type&&"object"==typeof o.additionalProperties){if(o.additionalProperties.$ref){const e=te(o.additionalProperties.$ref);return u.export="dictionary",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}{const e=le({openApi:a,definition:o.additionalProperties});return u.export="dictionary",u.type=e.type,u.base=e.base,u.template=e.template,u.link=e,u.imports.push(...e.imports),u.default=oe(o,u),u}}if(null===(n=o.oneOf)||void 0===n?void 0:n.length){const e=ae(a,o,o.oneOf,"one-of",le);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if(null===(t=o.anyOf)||void 0===t?void 0:t.length){const e=ae(a,o,o.anyOf,"any-of",le);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if(null===(r=o.allOf)||void 0===r?void 0:r.length){const e=ae(a,o,o.allOf,"all-of",le);return u.export=e.type,u.imports.push(...e.imports),u.properties.push(...e.properties),u.enums.push(...e.enums),u}if("object"===o.type){if(u.export="interface",u.type="any",u.base="any",u.default=oe(o,u),o.properties){re(a,o,le).forEach((e=>{u.imports.push(...e.imports),u.enums.push(...e.enums),u.properties.push(e),"enum"===e.export&&u.enums.push(e)}))}return u}if(o.type){const e=te(o.type);return u.export="generic",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=oe(o,u),u}return u}const ie=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function se(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return f.default(n).replace(ie,"_$1")}function ue(e,n){const t=e.isRequired&&void 0===e.default,r=n.isRequired&&void 0===n.default;return t&&!r?-1:!t&&r?1:0}function pe(e,n,t){const r={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const a=t.$ref?e.get(t.$ref):t,o=function(e,n){const t={in:n.in,prop:n.name,export:"interface",name:se(n.name),alias:"",path:"",type:"any",base:"any",template:null,link:null,description:G(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=te(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}if(n.schema){if(n.schema.$ref){const e=te(n.schema.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=oe(n.schema),t}{const r=le({openApi:e,definition:n.schema});return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.isReadOnly=r.isReadOnly,t.isRequired=t.isRequired||r.isRequired,t.isNullable=t.isNullable||r.isNullable,t.format=r.format,t.maximum=r.maximum,t.exclusiveMaximum=r.exclusiveMaximum,t.minimum=r.minimum,t.exclusiveMinimum=r.exclusiveMinimum,t.multipleOf=r.multipleOf,t.maxLength=r.maxLength,t.minLength=r.minLength,t.maxItems=r.maxItems,t.minItems=r.minItems,t.uniqueItems=r.uniqueItems,t.maxProperties=r.maxProperties,t.minProperties=r.minProperties,t.pattern=q(r.pattern),t.default=r.default,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t}}return t}(n,a);if("api-version"!==o.prop)switch(a.in){case"path":r.parametersPath.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"query":r.parametersQuery.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"formData":r.parametersForm.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"cookie":r.parametersCookie.push(o),r.parameters.push(o),r.imports.push(...o.imports);break;case"header":r.parametersHeader.push(o),r.parameters.push(o),r.imports.push(...o.imports)}})),r.parameters=r.parameters.sort(ue),r.parametersPath=r.parametersPath.sort(ue),r.parametersQuery=r.parametersQuery.sort(ue),r.parametersForm=r.parametersForm.sort(ue),r.parametersCookie=r.parametersCookie.sort(ue),r.parametersHeader=r.parametersHeader.sort(ue),r}function ce(e,n){return n["application/json-patch+json"]&&n["application/json-patch+json"].schema||n["application/json"]&&n["application/json"].schema||n["text/json"]&&n["text/json"].schema||n["text/plain"]&&n["text/plain"].schema||n["multipart/mixed"]&&n["multipart/mixed"].schema||n["multipart/related"]&&n["multipart/related"].schema||n["multipart/batch"]&&n["multipart/batch"].schema||null}function me(e,n){const t={in:"body",prop:"body",export:"interface",name:"requestBody",alias:"",path:"",type:"any",base:"any",template:null,link:null,description:G(n.description),default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.content){const a=ce(0,n.content);if(a){if(t.mediaType=(r=n.content,Object.keys(r).find((e=>["application/json-patch+json","application/json","text/json","text/plain","multipart/mixed","multipart/related","multipart/batch"].includes(e)))||null),null==a?void 0:a.$ref){const e=te(a.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.path=e.path,t.template=e.template,t.imports.push(...e.imports),t}{const n=le({openApi:e,definition:a});return t.export=n.export,t.type=n.type,t.base=n.base,t.path=n.path,t.template=n.template,t.link=n.link,t.isReadOnly=n.isReadOnly,t.isRequired=t.isRequired||n.isRequired,t.isNullable=t.isNullable||n.isNullable,t.format=n.format,t.maximum=n.maximum,t.exclusiveMaximum=n.exclusiveMaximum,t.minimum=n.minimum,t.exclusiveMinimum=n.exclusiveMinimum,t.multipleOf=n.multipleOf,t.maxLength=n.maxLength,t.minLength=n.minLength,t.maxItems=n.maxItems,t.minItems=n.minItems,t.uniqueItems=n.uniqueItems,t.maxProperties=n.maxProperties,t.minProperties=n.minProperties,t.pattern=q(n.pattern),t.imports.push(...n.imports),t.enum.push(...n.enum),t.enums.push(...n.enums),t.properties.push(...n.properties),t}}}var r;return t}function fe(e,n,t){const r={in:"response",name:"",alias:"",path:"",code:t,description:G(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.content){const t=ce(0,n.content);if(t){if(null==t?void 0:t.$ref){const e=te(t.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.path=e.path,r.template=e.template,r.imports.push(...e.imports),r}{const n=le({openApi:e,definition:t});return r.export=n.export,r.type=n.type,r.base=n.base,r.path=n.path,r.template=n.template,r.link=n.link,r.isReadOnly=n.isReadOnly,r.isRequired=n.isRequired,r.isNullable=n.isNullable,r.format=n.format,r.maximum=n.maximum,r.exclusiveMaximum=n.exclusiveMaximum,r.minimum=n.minimum,r.exclusiveMinimum=n.exclusiveMinimum,r.multipleOf=n.multipleOf,r.maxLength=n.maxLength,r.minLength=n.minLength,r.maxItems=n.maxItems,r.minItems=n.minItems,r.uniqueItems=n.uniqueItems,r.maxProperties=n.maxProperties,r.minProperties=n.minProperties,r.pattern=q(n.pattern),r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r}}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return r.in="header",r.name=e,r.type="string",r.base="string",r;return r}function de(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function he(e,n){const t=e.type===n.type&&e.base===n.base&&e.template===n.template;return t&&e.link&&n.link?he(e.link,n.link):t}function ye(e){const n=[];return e.forEach((e=>{const{code:t}=e;t&&204!==t&&t>=200&&t<300&&n.push(e)})),n.length||n.push({in:"response",name:"",alias:"",path:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,t)=>t.findIndex((n=>he(n,e)))===n))}function ve(e,n,t,r,a,o,l){const i=`${r}${l}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return f.default(n)}(a.operationId||i),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${se(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(t),p={service:l,name:s,summary:G(a.summary),description:G(a.description),deprecated:!0===a.deprecated,method:r.toUpperCase(),path:u,parameters:[...o.parameters],parametersPath:[...o.parametersPath],parametersQuery:[...o.parametersQuery],parametersForm:[...o.parametersForm],parametersHeader:[...o.parametersHeader],parametersCookie:[...o.parametersCookie],parametersBody:o.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const t=pe(e,n,a.parameters);p.imports.push(...t.imports),p.parameters.push(...t.parameters),p.parametersPath.push(...t.parametersPath),p.parametersQuery.push(...t.parametersQuery),p.parametersForm.push(...t.parametersForm),p.parametersHeader.push(...t.parametersHeader),p.parametersCookie.push(...t.parametersCookie),p.parametersBody=t.parametersBody}if(a.requestBody){const t=me(n,a.requestBody.$ref?e.get(a.requestBody.$ref):a.requestBody);p.imports.push(...t.imports),p.parameters.push(t),p.parameters=p.parameters.sort(ue),p.parametersBody=t}if(a.responses){const t=function(e,n,t){const r=[];for(const a in t)if(t.hasOwnProperty(a)){const o=t[a],l=o.$ref?e.get(o.$ref):o,i=de(a);if(i){const e=fe(n,l,i);r.push(e)}}return r.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,n,a.responses),r=ye(t);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(t),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(r),r.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p}function ge(e,n){var t;return function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim(),t=f.default(n,{pascalCase:!0});return t&&!t.endsWith("Service")?`${t}Service`:t}((null===(t=e.tags)||void 0===t?void 0:t[0])||`${ne(n)}Service`)}function be(e,n){e.filter((e=>e.path===n.path&&e.type===n.name&&n.alias)).forEach((e=>{e.alias=n.alias,e.base=n.alias}))}function Pe(n,t){const r=function(e="1.0"){return e.replace(/^v/gi,"")}(t.info.version),a=function(e){var n;const t=null===(n=e.servers)||void 0===n?void 0:n[0],r=(null==t?void 0:t.variables)||{};let a=(null==t?void 0:t.url)||"";for(const e in r)r.hasOwnProperty(e)&&(a=a.replace(`{${e}}`,r[e].default));return a}(t),o=function(n,t){let r=[];const a=w(n,t);if(a){for(const e of a){const a=n.get(e),o=te(e),l=le({openApi:t,definition:a,isDefinition:!0,name:o.base,path:o.path});r.push(l)}let o;r=Z(r.filter(R));let l=1;r.forEach((e=>{o&&o.name===e.name?(1===l&&(o.alias=`${e.name}$${l}`,l++),e.alias=`${e.name}$${l}`,l++):(e.alias="",l=1),o=e})),r.forEach((n=>{n.imports=n.imports.map((t=>{const a=r.filter((e=>`${e.path}${e.name}`===t.path&&e.name===t.name));return a.length>0?Object.assign(t,{alias:a[0].alias,path:e.join(e.relative(n.path,a[0].path),t.name)}):t}))}))}return r.filter(R)}(n,t),l=function(e,n){const t=new Map;for(const r in n.paths)if(n.paths.hasOwnProperty(r)){const a=n.paths[r],o=pe(e,n,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=a[l],s=ge(i,e.fileName()),u=t.get(s)||{name:s,operations:[],imports:[]},p=ve(e,n,r,l,i,o,s);u.operations.push(p),p.imports=p.imports.map((e=>u.imports.find((n=>n.path===e.path))||e)),u.imports.push(...p.imports),t.set(p.service,u)}}return t.forEach((e=>{let n;e.imports=e.imports.filter(R).sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")}));let t=1;e.imports=e.imports.map((e=>(n&&n.name===e.name?(1===t&&(n.alias=`${e.name}$${t}`,t++),e.alias=`${e.name}$${t}`,t++):(e.alias="",t=1),n=e,e))),e.imports.forEach((n=>{for(const t of e.operations)be(t.results,n),be(t.parameters,n)}))})),Array.from(t.values())}(n,t);return{version:r,server:a,models:o,services:l}}i.promisify(a.readFile);const Oe=i.promisify(a.writeFile),xe=i.promisify(a.copyFile),ke=i.promisify(a.exists),we=h.default,Re=e=>new Promise(((n,t)=>{y.default(e,(e=>{e?t(e):n()}))}));function qe(n,t,r){if(!n.$ref||e.isAbsolute(n.$ref)||n.$ref.match(/^(http:\/\/|https:\/\/|#\/)/g))for(const e of Object.keys(n))n[e]instanceof Object&&qe(n[e],t,r);else n.$ref=m.default.join(r,n.$ref);return n}var je;function Ce(e){var n;return null===(n=null==e?void 0:e.enum)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function Ae(e){var n;return null===(n=null==e?void 0:e.enums)||void 0===n?void 0:n.filter(((e,n,t)=>t.findIndex((n=>n.name===e.name))===n))}function $e(e,n){return e instanceof Object&&"name"in e&&"alias"in e&&"path"in e?function(e,n){const t=`${e.path}${e.name}`.toLowerCase(),r=`${n.path}${n.name}`.toLowerCase();return t.localeCompare(r,"en")}(e,n):function(e,n){const t=e.toLowerCase(),r=n.toLowerCase();return t.localeCompare(r,"en")}(e,n)}function Ie(e){var n,t,r;return null===(r=null===(t=null===(n=null==e?void 0:e.imports)||void 0===n?void 0:n.filter(R))||void 0===t?void 0:t.sort($e))||void 0===r?void 0:r.filter((n=>e.name!==n.name))}function De(e,n){const t=[];return e.map(n).forEach((e=>{t.push(...e)})),t}function Se(e){const n=Object.assign({},e);return n.operations=function(e){const n=new Map;return e.operations.map((t=>{const r=Object.assign({},t);r.imports.push(...De(r.parameters,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0]))))),r.imports.push(...De(r.results,(n=>n.imports.map((n=>e.imports.filter((e=>e.path===n.path))[0])))));const a=r.name,o=n.get(a)||0;return o>0&&(r.name=`${a}${o}`),n.set(a,o+1),r}))}(n),n.operations.forEach((e=>{n.imports.push(...e.imports)})),n.imports=n.imports.filter(R),n.imports=function(e){return e.imports.filter(R).sort($e).filter((n=>e.name!==n.name))}(n),n}function Ee(e){return Object.assign(Object.assign({},e),{models:e.models.map((e=>function(e){return Object.assign(Object.assign({},e),{imports:Ie(e),enums:Ae(e),enum:Ce(e)})}(e))),services:e.services.map((e=>Se(e)))})}!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(je||(je={}));var He={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n public readonly url: string;\n public readonly status: number;\n public readonly statusText: string;\n public readonly body: any;\n\n constructor(response: ApiResult, message: string) {\n super(message);\n\n this.url = response.url;\n this.status = response.status;\n this.statusText = response.statusText;\n this.body = response.body;\n }\n}"},usePartial:!0,useData:!0},Ne={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiRequestOptions = {\n readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n readonly path: string;\n readonly cookies?: Record<string, any>;\n readonly headers?: Record<string, any>;\n readonly query?: Record<string, any>;\n readonly formData?: Record<string, any>;\n readonly body?: any;\n readonly mediaType?: string;\n readonly responseHeader?: string;\n readonly errors?: Record<number, string>;\n}"},usePartial:!0,useData:!0},Te={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport type ApiResult = {\n readonly url: string;\n readonly ok: boolean;\n readonly status: number;\n readonly statusText: string;\n readonly body: any;\n}"},usePartial:!0,useData:!0},Be={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},Le={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},Me={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},_e={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},Fe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getRequestBody"),n,{name:"fetch/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/sendRequest"),n,{name:"fetch/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseHeader"),n,{name:"fetch/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getResponseBody"),n,{name:"fetch/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},Ue={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n if (OpenAPI.WITH_CREDENTIALS) {\n request.credentials = 'include';\n }\n return await fetch(url, request);\n}"},useData:!0},We={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function catchErrors(options: ApiRequestOptions, result: ApiResult): void {\n const errors: Record<number, string> = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n ...options.errors,\n }\n\n const error = errors[result.status];\n if (error) {\n throw new ApiError(result, error);\n }\n\n if (!result.ok) {\n throw new ApiError(result, 'Generic Error');\n }\n}"},useData:!0},Ve={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getFormData(params: Record<string, any>): FormData {\n const formData = new FormData();\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n formData.append(key, value);\n }\n });\n return formData;\n}"},useData:!0},Qe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getQueryString(params: Record<string, any>): string {\n const qs: string[] = [];\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (isDefined(value)) {\n if (Array.isArray(value)) {\n value.forEach(value => {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n });\n } else {\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n }\n }\n });\n if (qs.length > 0) {\n return `?${qs.join('&')}`;\n }\n return '';\n}"},useData:!0},ze={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getUrl(options: ApiRequestOptions): string {\n const path = options.path.replace(/[:]/g, '_');\n const url = `${OpenAPI.BASE}${path}`;\n\n if (options.query) {\n return `${url}${getQueryString(options.query)}`;\n }\n return url;\n}"},useData:!0},Je={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBinary(value: any): value is Buffer | ArrayBuffer | ArrayBufferView {\n const isBuffer = Buffer.isBuffer(value);\n const isArrayBuffer = types.isArrayBuffer(value);\n const isArrayBufferView = types.isArrayBufferView(value);\n return isBuffer || isArrayBuffer || isArrayBufferView;\n}"},useData:!0},Ze={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isBlob(value: any): value is Blob {\n return value instanceof Blob;\n}"},useData:!0},Ge={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {\n return value !== undefined && value !== null;\n}"},useData:!0},Xe={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isString(value: any): value is string {\n return typeof value === 'string';\n}"},useData:!0},Ke={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isStringWithValue(value: any): value is string {\n return isString(value) && value !== '';\n}"},useData:!0},Ye={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function isSuccess(status: number): boolean {\n return status >= 200 && status < 300;\n}"},useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nasync function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {\n if (typeof resolver === 'function') {\n return (resolver as Resolver<T>)(options);\n }\n return resolver;\n}"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = Buffer.from(`${username}:${password}`).toString('base64');\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBinary(options.body)) {\n headers.append('Content-Type', 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBinary(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getResponseBody(response: Response): Promise<any> {\n try {\n const contentType = response.headers.get('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return await response.json();\n } else {\n return await response.text();\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = response.headers.get(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport FormData from 'form-data';\nimport fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';\nimport { types } from 'util';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBinary"),n,{name:"functions/isBinary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getHeaders"),n,{name:"node/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getRequestBody"),n,{name:"node/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/sendRequest"),n,{name:"node/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseHeader"),n,{name:"node/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"node/getResponseBody"),n,{name:"node/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using node-fetch client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = await getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: response.ok,\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},ln={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<Response> {\n const request: RequestInit = {\n method: options.method,\n headers: await getHeaders(options),\n body: getRequestBody(options),\n };\n return await fetch(url, request);\n}"},useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\ntype Config = {\n BASE: string;\n VERSION: string;\n WITH_CREDENTIALS: boolean;\n TOKEN?: string | Resolver<string>;\n USERNAME?: string | Resolver<string>;\n PASSWORD?: string | Resolver<string>;\n HEADERS?: Headers | Resolver<Headers>;\n}\n\nexport const OpenAPI: Config = {\n BASE: '"+(null!=(o=i(l(n,"server",{start:{line:19,column:14},end:{line:19,column:20}}),n))?o:"")+"',\n VERSION: '"+(null!=(o=i(l(n,"version",{start:{line:20,column:17},end:{line:20,column:24}}),n))?o:"")+"',\n WITH_CREDENTIALS: false,\n TOKEN: undefined,\n USERNAME: undefined,\n PASSWORD: undefined,\n HEADERS: undefined,\n};"},usePartial:!0,useData:!0},un={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"fetch/request"),n,{name:"fetch/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"xhr/request"),n,{name:"xhr/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"node/request"),n,{name:"node/request",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:65}}}))?o:"")},usePartial:!0,useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\n const token = await resolve(options, OpenAPI.TOKEN);\n const username = await resolve(options, OpenAPI.USERNAME);\n const password = await resolve(options, OpenAPI.PASSWORD);\n const defaultHeaders = await resolve(options, OpenAPI.HEADERS);\n\n const headers = new Headers({\n Accept: 'application/json',\n ...defaultHeaders,\n ...options.headers,\n });\n\n if (isStringWithValue(token)) {\n headers.append('Authorization', `Bearer ${token}`);\n }\n\n if (isStringWithValue(username) && isStringWithValue(password)) {\n const credentials = btoa(`${username}:${password}`);\n headers.append('Authorization', `Basic ${credentials}`);\n }\n\n if (options.body) {\n if (options.mediaType) {\n headers.append('Content-Type', options.mediaType);\n } else if (isBlob(options.body)) {\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\n } else if (isString(options.body)) {\n headers.append('Content-Type', 'text/plain');\n } else {\n headers.append('Content-Type', 'application/json');\n }\n }\n return headers;\n}"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getRequestBody(options: ApiRequestOptions): any {\n if (options.formData) {\n return getFormData(options.formData);\n }\n if (options.body) {\n if (options.mediaType?.includes('/json')) {\n return JSON.stringify(options.body)\n } else if (isString(options.body) || isBlob(options.body)) {\n return options.body;\n } else {\n return JSON.stringify(options.body);\n }\n }\n return undefined;\n}"},useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseBody(xhr: XMLHttpRequest): any {\n try {\n const contentType = xhr.getResponseHeader('Content-Type');\n if (contentType) {\n const isJSON = contentType.toLowerCase().startsWith('application/json');\n if (isJSON) {\n return JSON.parse(xhr.responseText);\n } else {\n return xhr.responseText;\n }\n }\n } catch (error) {\n console.error(error);\n }\n return null;\n}"},useData:!0},fn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"function getResponseHeader(xhr: XMLHttpRequest, responseHeader?: string): string | null {\n if (responseHeader) {\n const content = xhr.getResponseHeader(responseHeader);\n if (isString(content)) {\n return content;\n }\n }\n return null;\n}"},useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { OpenAPI } from './OpenAPI';\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isString"),n,{name:"functions/isString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getRequestBody"),n,{name:"xhr/getRequestBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/sendRequest"),n,{name:"xhr/sendRequest",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseHeader"),n,{name:"xhr/getResponseHeader",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"xhr/getResponseBody"),n,{name:"xhr/getResponseBody",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n"+(null!=(o=e.invokePartial(l(r,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n\n/**\n * Request using XHR client\n * @param options The request options from the the service\n * @returns ApiResult\n * @throws ApiError\n */\nexport async function request(options: ApiRequestOptions): Promise<ApiResult> {\n const url = getUrl(options);\n const response = await sendRequest(options, url);\n const responseBody = getResponseBody(response);\n const responseHeader = getResponseHeader(response, options.responseHeader);\n\n const result: ApiResult = {\n url,\n ok: isSuccess(response.status),\n status: response.status,\n statusText: response.statusText,\n body: responseHeader || responseBody,\n };\n\n catchErrors(options, result);\n return result;\n}"},usePartial:!0,useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"async function sendRequest(options: ApiRequestOptions, url: string): Promise<XMLHttpRequest> {\n\n const xhr = new XMLHttpRequest();\n xhr.open(options.method, url, true);\n xhr.withCredentials = OpenAPI.WITH_CREDENTIALS;\n\n const headers = await getHeaders(options);\n headers.forEach((value: string, key: string) => {\n xhr.setRequestHeader(key, value);\n });\n\n return new Promise<XMLHttpRequest>(resolve => {\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n resolve(xhr);\n }\n };\n xhr.send(getRequestBody(options));\n });\n}"},useData:!0},yn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?o:"")},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=i(l(n,"name",{start:{line:6,column:17},end:{line:6,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:24},end:{line:6,column:59}}}))?o:"")+" } from './"+(null!=(o=i(l(n,"path",{start:{line:6,column:73},end:{line:6,column:77}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:6,column:44},end:{line:6,column:49}}),n))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportInterface"),n,{name:"exportInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:12,column:0},end:{line:22,column:0}}}))?o:""},8:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportComposition"),n,{name:"exportComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:14,column:0},end:{line:22,column:0}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:16,column:0},end:{line:22,column:0}}}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:18,column:0},end:{line:22,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportEnum"),n,{name:"exportEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"exportType"),n,{name:"exportType",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=i(t,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?o:"")+"\n"+(null!=(o=i(t,"equals").call(l,i(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a,loc:{start:{line:10,column:0},end:{line:22,column:11}}}))?o:"")},usePartial:!0,useData:!0},vn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\nexport const "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:3,column:16},end:{line:3,column:20}}),n))?o:"")+"Schema = "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},gn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"import type { "+(null!=(o=i(l(n,"name",{start:{line:5,column:17},end:{line:5,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:24},end:{line:5,column:59}}}))?o:"")+" } from '../models/"+(null!=(o=i(l(n,"path",{start:{line:5,column:81},end:{line:5,column:85}}),n))?o:"")+"';\n"},3:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:5,column:44},end:{line:5,column:49}}),n))?o:"")},5:function(e,n,t,r,a){return"import { OpenAPI } from '../core/OpenAPI';\n"},7:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.strict,s=e.lambda,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" /**\n"+(null!=(o=u(t,"if").call(l,u(n,"deprecated"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:4},end:{line:19,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"summary"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:4},end:{line:22,column:11}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"description"),{name:"if",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:4},end:{line:25,column:11}}}))?o:"")+(null!=(o=u(t,"unless").call(l,u(u(a,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:32,column:15}}}))?o:"")+(null!=(o=u(t,"each").call(l,u(n,"results"),{name:"each",hash:{},fn:e.program(18,a,0),inverse:e.noop,data:a,loc:{start:{line:33,column:4},end:{line:35,column:13}}}))?o:"")+" * @throws ApiError\n */\n public static async "+(null!=(o=s(i(n,"name",{start:{line:38,column:27},end:{line:38,column:31}}),n))?o:"")+"("+(null!=(o=e.invokePartial(u(r,"parameters"),n,{name:"parameters",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"): Promise<"+(null!=(o=e.invokePartial(u(r,"result"),n,{name:"result",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"> {\n const result = await __request({\n method: '"+(null!=(o=s(i(n,"method",{start:{line:40,column:24},end:{line:40,column:30}}),n))?o:"")+"',\n path: `"+(null!=(o=s(i(n,"path",{start:{line:41,column:22},end:{line:41,column:26}}),n))?o:"")+"`,\n"+(null!=(o=u(t,"if").call(l,u(n,"parametersCookie"),{name:"if",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:42,column:12},end:{line:48,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersHeader"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:49,column:12},end:{line:55,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersQuery"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:56,column:12},end:{line:62,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersForm"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:63,column:12},end:{line:69,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"parametersBody"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:70,column:12},end:{line:75,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"responseHeader"),{name:"if",hash:{},fn:e.program(32,a,0),inverse:e.noop,data:a,loc:{start:{line:76,column:12},end:{line:78,column:19}}}))?o:"")+(null!=(o=u(t,"if").call(l,u(n,"errors"),{name:"if",hash:{},fn:e.program(34,a,0),inverse:e.noop,data:a,loc:{start:{line:79,column:12},end:{line:85,column:19}}}))?o:"")+" });\n return result.body;\n }\n\n"},8:function(e,n,t,r,a){return" * @deprecated\n"},10:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"summary",{start:{line:21,column:10},end:{line:21,column:17}}),n))?o:"")+"\n"},12:function(e,n,t,r,a){var o;return" * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:24,column:10},end:{line:24,column:21}}),n))?o:"")+"\n"},14:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:4},end:{line:31,column:11}}}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:28,column:4},end:{line:30,column:13}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @param "+(null!=(o=i(l(n,"name",{start:{line:29,column:17},end:{line:29,column:21}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:29,column:28},end:{line:29,column:39}}),n))?o:"")+"\n"},18:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" * @returns "+(null!=(o=i(l(n,"type",{start:{line:34,column:19},end:{line:34,column:23}}),n))?o:"")+" "+(null!=(o=i(l(n,"description",{start:{line:34,column:30},end:{line:34,column:41}}),n))?o:"")+"\n"},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" cookies: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersCookie"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:16},end:{line:46,column:25}}}))?o:"")+" },\n"},21:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" '"+(null!=(o=i(l(n,"prop",{start:{line:45,column:20},end:{line:45,column:24}}),n))?o:"")+"': "+(null!=(o=i(l(n,"name",{start:{line:45,column:33},end:{line:45,column:37}}),n))?o:"")+",\n"},23:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" headers: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersHeader"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:51,column:16},end:{line:53,column:25}}}))?o:"")+" },\n"},25:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" query: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersQuery"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:58,column:16},end:{line:60,column:25}}}))?o:"")+" },\n"},27:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" formData: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parametersForm"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:65,column:16},end:{line:67,column:25}}}))?o:"")+" },\n"},29:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" body: "+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"name",{start:{line:71,column:21},end:{line:71,column:40}}),n))?o:"")+",\n"+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(n,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(30,a,0),inverse:e.noop,data:a,loc:{start:{line:72,column:12},end:{line:74,column:19}}}))?o:"")},30:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" mediaType: '"+(null!=(o=e.lambda(e.strict(l(n,"parametersBody"),"mediaType",{start:{line:73,column:27},end:{line:73,column:51}}),n))?o:"")+"',\n"},32:function(e,n,t,r,a){var o;return" responseHeader: '"+(null!=(o=e.lambda(e.strict(n,"responseHeader",{start:{line:77,column:32},end:{line:77,column:46}}),n))?o:"")+"',\n"},34:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" errors: {\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"errors"),{name:"each",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:81,column:16},end:{line:83,column:25}}}))?o:"")+" },\n"},35:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"code",{start:{line:82,column:19},end:{line:82,column:23}}),n))?o:"")+": `"+(null!=(o=i(l(n,"description",{start:{line:82,column:32},end:{line:82,column:43}}),n))?o:"")+"`,\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+"\n"+(null!=(o=i(t,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+"import { request as __request } from '../core/request';\n"+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"useVersion"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"\nexport class "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:13,column:16},end:{line:13,column:20}}),n))?o:"")+" {\n\n"+(null!=(o=i(t,"each").call(l,i(n,"operations"),{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:4},end:{line:90,column:13}}}))?o:"")+"}"},usePartial:!0,useData:!0},bn={1:function(e,n,t,r,a){return"\nexport { ApiError } from './core/ApiError';\nexport { OpenAPI } from './core/OpenAPI';\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:21,column:7}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:20,column:9}}}))?o:"")},5:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enum"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:7}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:12,column:12},end:{line:12,column:16}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:19},end:{line:12,column:55}}}))?o:"")+" } from './models/"+(null!=(o=i(l(n,"path",{start:{line:12,column:76},end:{line:12,column:80}}),n))?o:"")+"';\n"},7:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:12,column:40},end:{line:12,column:45}}),n))?o:"")},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export type { "+(null!=(o=i(l(n,"name",{start:{line:14,column:17},end:{line:14,column:21}}),n))?o:"")+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:24},end:{line:14,column:60}}}))?o:"")+" } from './models/"+(null!=(o=i(l(n,"path",{start:{line:14,column:81},end:{line:14,column:85}}),n))?o:"")+"';\n"},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},14:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:24,column:0},end:{line:29,column:7}}}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:9}}}))?o:"")},16:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:27,column:12},end:{line:27,column:16}}),n))?o:"")+"Schema"+(null!=(o=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"alias"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:25},end:{line:27,column:67}}}))?o:"")+" } from './schemas/"+(null!=(o=i(l(n,"path",{start:{line:27,column:89},end:{line:27,column:93}}),n))?o:"")+"Schema';\n"},17:function(e,n,t,r,a){var o;return" as "+(null!=(o=e.lambda(e.strict(n,"alias",{start:{line:27,column:46},end:{line:27,column:51}}),n))?o:"")+"Schema"},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"if",hash:{},fn:e.program(20,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:37,column:7}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:34,column:0},end:{line:36,column:9}}}))?o:"")},21:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return"export { "+(null!=(o=i(l(n,"name",{start:{line:35,column:12},end:{line:35,column:16}}),n))?o:"")+" } from './services/"+(null!=(o=i(l(n,"name",{start:{line:35,column:42},end:{line:35,column:46}}),n))?o:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(r,"header"),n,{name:"header",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportCore"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportModels"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportSchemas"),{name:"if",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:30,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(i(a,"root"),"exportServices"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:31,column:0},end:{line:38,column:7}}}))?o:"")},usePartial:!0,useData:!0},Pn={1:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?o:"")+(null!=(o=i(t,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:86}}}))?o:"")},2:function(e,n,t,r,a){return"Blob"},4:function(e,n,t,r,a){return"Buffer | ArrayBuffer | ArrayBufferView"},6:function(e,n,t,r,a){var o;return null!=(o=e.lambda(e.strict(n,"base",{start:{line:6,column:3},end:{line:6,column:7}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"base"),"File",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:7,column:13}}}))?o:""},useData:!0},On={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:27,column:11}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:10,column:20},end:{line:10,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:24,column:13}}}))?o:"")+"\n}\n"},5:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:19},end:{line:18,column:23}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:8},end:{line:21,column:17}}}))?o:"")+" }\n\n"},6:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:15,column:10},end:{line:15,column:21}}),n))?o:"")+"\n */\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:20,column:11},end:{line:20,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:20,column:24},end:{line:20,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(i(r,"type"),n,{name:"type",hash:{parent:i(n,"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";\n"+(null!=(o=i(t,"if").call(l,i(n,"enums"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:28,column:7}}}))?o:"")},usePartial:!0,useData:!0},xn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?o:"")+(null!=(o=i(t,"containsSpaces").call(l,i(n,"name"),{name:"containsSpaces",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:13,column:4},end:{line:17,column:23}}}))?o:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return' "'+(null!=(o=i(l(n,"name",{start:{line:14,column:8},end:{line:14,column:12}}),n))?o:"")+'" = '+(null!=(o=i(l(n,"value",{start:{line:14,column:22},end:{line:14,column:27}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:16,column:20},end:{line:16,column:25}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?o:"")+"}"},useData:!0},kn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},3:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(n,"alias"),{name:"if",hash:{},fn:e.program(6,a,0,o,l),inverse:e.program(8,a,0,o,l),data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?i:"")},4:function(e,n,t,r,a){var o;return" /**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\n */\n"},6:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=i(l(n,"name",{start:{line:14,column:22},end:{line:14,column:26}}),n))?o:"")+(null!=(o=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=i(l(n,"alias",{start:{line:14,column:49},end:{line:14,column:54}}),n))?o:"")+";\n"},8:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:16,column:22},end:{line:16,column:26}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"name")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+";\n"},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:0},end:{line:40,column:11}}}))?o:""},11:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:23,column:20},end:{line:23,column:24}}),n))?o:"")+" {\n\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:25,column:4},end:{line:37,column:13}}}))?o:"")+"\n}\n"},12:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(t,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:4},end:{line:30,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:31,column:19},end:{line:31,column:23}}),n))?o:"")+" {\n"+(null!=(o=i(t,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:8},end:{line:34,column:17}}}))?o:"")+" }\n\n"},13:function(e,n,t,r,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:33,column:11},end:{line:33,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:33,column:24},end:{line:33,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:"")+"export interface "+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:6,column:20},end:{line:6,column:24}}),n))?i:"")+" {\n"+(null!=(i=u(t,"each").call(s,u(n,"properties"),{name:"each",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?i:"")+"}\n"+(null!=(i=u(t,"if").call(s,u(n,"enums"),{name:"if",hash:{},fn:e.program(10,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:41,column:7}}}))?i:"")},usePartial:!0,useData:!0,useDepths:!0},wn={1:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\n */\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},Rn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},qn={1:function(e,n,t,r,a){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isNullable"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?o:""},useData:!0},jn={1:function(e,n,t,r,a){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?o:""},useData:!0},Cn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?o:""},2:function(e,n,t,r,a){return"?"},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},useData:!0},An={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:2,column:0},end:{line:20,column:7}}}))?o:""},2:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\n"+(null!=(o=i(t,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:13,column:9}}}))?o:"")+"}"},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:5,column:31},end:{line:5,column:38}}),n))?o:"")},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:3},end:{line:12,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return"/** "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:7},end:{line:10,column:18}}),n))?o:"")+" **/\n"},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\n"+(null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:9}}}))?o:"")},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:3},end:{line:18,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:36},end:{line:18,column:74}}}))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:21,column:7}}}))?o:""},usePartial:!0,useData:!0},$n={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?o:"")},3:function(e,n,t,r,a){return" | "},5:function(e,n,t,r,a){return"void"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},In={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaInterface"),n,{name:"schemaInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaEnum"),n,{name:"schemaEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaArray"),n,{name:"schemaArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaDictionary"),n,{name:"schemaDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaComposition"),n,{name:"schemaComposition",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(16,a,0),data:a,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?o:""},17:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"schemaGeneric"),n,{name:"schemaGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?o:""},usePartial:!0,useData:!0},Dn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'array',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Sn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=l(t,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:46},end:{line:3,column:76}}}))?o:"")},2:function(e,n,t,r,a){return", "},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:5,column:19},end:{line:5,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:8,column:19},end:{line:8,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: '"+(null!=(o=e.lambda(e.strict(n,"export",{start:{line:2,column:13},end:{line:2,column:19}}),n))?o:"")+"',\n contains: ["+(null!=(o=i(t,"each").call(l,i(n,"properties"),{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:15},end:{line:3,column:85}}}))?o:"")+"],\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},En={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(r,"schema"),l(n,"link"),{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" contains: {\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\n },\n"},5:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'dictionary',\n"+(null!=(o=i(t,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Hn={1:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:4,column:19},end:{line:4,column:29}}),n))?o:"")+",\n"},3:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:7,column:19},end:{line:7,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n type: 'Enum',\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"}"},useData:!0},Nn={1:function(e,n,t,r,a){var o;return" type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:3,column:14},end:{line:3,column:18}}),n))?o:"")+"',\n"},3:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:6,column:19},end:{line:6,column:29}}),n))?o:"")+",\n"},5:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:9,column:19},end:{line:9,column:29}}),n))?o:"")+",\n"},7:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:12,column:19},end:{line:12,column:29}}),n))?o:"")+",\n"},9:function(e,n,t,r,a){var o;return" format: '"+(null!=(o=e.lambda(e.strict(n,"format",{start:{line:15,column:16},end:{line:15,column:22}}),n))?o:"")+"',\n"},11:function(e,n,t,r,a){var o;return" maximum: "+(null!=(o=e.lambda(e.strict(n,"maximum",{start:{line:18,column:16},end:{line:18,column:23}}),n))?o:"")+",\n"},13:function(e,n,t,r,a){var o;return" exclusiveMaximum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMaximum",{start:{line:21,column:25},end:{line:21,column:41}}),n))?o:"")+",\n"},15:function(e,n,t,r,a){var o;return" minimum: "+(null!=(o=e.lambda(e.strict(n,"minimum",{start:{line:24,column:16},end:{line:24,column:23}}),n))?o:"")+",\n"},17:function(e,n,t,r,a){var o;return" exclusiveMinimum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMinimum",{start:{line:27,column:25},end:{line:27,column:41}}),n))?o:"")+",\n"},19:function(e,n,t,r,a){var o;return" multipleOf: "+(null!=(o=e.lambda(e.strict(n,"multipleOf",{start:{line:30,column:19},end:{line:30,column:29}}),n))?o:"")+",\n"},21:function(e,n,t,r,a){var o;return" maxLength: "+(null!=(o=e.lambda(e.strict(n,"maxLength",{start:{line:33,column:18},end:{line:33,column:27}}),n))?o:"")+",\n"},23:function(e,n,t,r,a){var o;return" minLength: "+(null!=(o=e.lambda(e.strict(n,"minLength",{start:{line:36,column:18},end:{line:36,column:27}}),n))?o:"")+",\n"},25:function(e,n,t,r,a){var o;return" pattern: '"+(null!=(o=e.lambda(e.strict(n,"pattern",{start:{line:39,column:17},end:{line:39,column:24}}),n))?o:"")+"',\n"},27:function(e,n,t,r,a){var o;return" maxItems: "+(null!=(o=e.lambda(e.strict(n,"maxItems",{start:{line:42,column:17},end:{line:42,column:25}}),n))?o:"")+",\n"},29:function(e,n,t,r,a){var o;return" minItems: "+(null!=(o=e.lambda(e.strict(n,"minItems",{start:{line:45,column:17},end:{line:45,column:25}}),n))?o:"")+",\n"},31:function(e,n,t,r,a){var o;return" uniqueItems: "+(null!=(o=e.lambda(e.strict(n,"uniqueItems",{start:{line:48,column:20},end:{line:48,column:31}}),n))?o:"")+",\n"},33:function(e,n,t,r,a){var o;return" maxProperties: "+(null!=(o=e.lambda(e.strict(n,"maxProperties",{start:{line:51,column:22},end:{line:51,column:35}}),n))?o:"")+",\n"},35:function(e,n,t,r,a){var o;return" minProperties: "+(null!=(o=e.lambda(e.strict(n,"minProperties",{start:{line:54,column:22},end:{line:54,column:35}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(o=i(t,"if").call(l,i(n,"type"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"format"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maximum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minimum"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"multipleOf"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxLength"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minLength"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"pattern"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxItems"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minItems"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"uniqueItems"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"maxProperties"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"minProperties"),{name:"if",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?o:"")+"}"},useData:!0},Tn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"each").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:""},2:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"schema"),n,{name:"schema",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},4:function(e,n,t,r,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\n"},6:function(e,n,t,r,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:13,column:19},end:{line:13,column:29}}),n))?o:"")+",\n"},8:function(e,n,t,r,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:16,column:19},end:{line:16,column:29}}),n))?o:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n properties: {\n"+(null!=(o=i(t,"if").call(l,i(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+" },\n"+(null!=(o=i(t,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?o:"")+(null!=(o=i(t,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Bn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeInterface"),n,{name:"typeInterface",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?o:""},4:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeReference"),n,{name:"typeReference",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},6:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?o:""},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeEnum"),n,{name:"typeEnum",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},9:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeArray"),n,{name:"typeArray",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},12:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?o:""},13:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeDictionary"),n,{name:"typeDictionary",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},15:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(18,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?o:""},16:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeUnion"),n,{name:"typeUnion",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},18:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(19,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},19:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},20:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeIntersection"),n,{name:"typeIntersection",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},22:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(r,"typeGeneric"),n,{name:"typeGeneric",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?o:""},usePartial:!0,useData:!0},Ln={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Mn={1:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"type"),l(n,"link"),{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},3:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(t,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},_n={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"name"),{name:"enumerator",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:55}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Fn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Un={1:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\n"+(null!=(i=s(t,"each").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:14,column:9}}}))?i:"")+"}"+(null!=(i=e.invokePartial(s(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")},2:function(e,n,t,r,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(t,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:7}}}))?i:"")+(null!=(i=u(t,"if").call(s,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.program(7,a,0,o,l),data:a,loc:{start:{line:9,column:0},end:{line:13,column:7}}}))?i:"")},3:function(e,n,t,r,a){var o;return"/**\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:6,column:6},end:{line:6,column:17}}),n))?o:"")+"\n */\n"},5:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=e.invokePartial(s(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:10,column:18},end:{line:10,column:22}}),n))?i:"")+(null!=(i=e.invokePartial(s(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(r,"type"),n,{name:"type",hash:{parent:s(l[1],"parent")},data:a,helpers:t,partials:r,decorators:e.decorators}))?i:"")+",\n"},7:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:18},end:{line:12,column:22}}),n))?o:"")+(null!=(o=e.invokePartial(l(r,"isRequired"),n,{name:"isRequired",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(r,"type"),n,{name:"type",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+",\n"},9:function(e,n,t,r,a){return"any"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(i=s(t,"if").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.program(9,a,0,o,l),data:a,loc:{start:{line:1,column:0},end:{line:18,column:9}}}))?i:""},usePartial:!0,useData:!0,useDepths:!0},Wn={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"intersection").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"intersection",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Vn={compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(r,"base"),n,{name:"base",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Qn={1:function(e,n,t,r,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(t,"union").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"union",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?o:"")+(null!=(o=e.invokePartial(l(r,"isNullable"),n,{name:"isNullable",data:a,helpers:t,partials:r,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0};function zn(e){!function(e){v.registerHelper("equals",(function(e,n,t){return e===n?t.fn(this):t.inverse(this)})),v.registerHelper("notEquals",(function(e,n,t){return e!==n?t.fn(this):t.inverse(this)})),v.registerHelper("containsSpaces",(function(e,n){return/\s+/.test(e)?n.fn(this):n.inverse(this)})),v.registerHelper("union",(function(n,t,r){const a=v.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(R);let l=o.join(" | ");return o.length>1&&(l=`(${l})`),r.fn(l)})),v.registerHelper("intersection",(function(n,t,r){const a=v.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:t})))).filter(R);let l=o.join(" & ");return o.length>1&&(l=`(${l})`),r.fn(l)})),v.registerHelper("enumerator",(function(n,t,r,a){return!e.useUnionTypes&&t&&r?`${t}.${r}`:a.fn(n.map((e=>e.value)).filter(R).join(" | "))}))}(e);const n={index:v.template(bn),exports:{model:v.template(yn),schema:v.template(vn),service:v.template(gn)},core:{settings:v.template(sn),apiError:v.template(He),apiRequestOptions:v.template(Ne),apiResult:v.template(Te),request:v.template(un)}};return v.registerPartial("exportEnum",v.template(xn)),v.registerPartial("exportInterface",v.template(kn)),v.registerPartial("exportComposition",v.template(On)),v.registerPartial("exportType",v.template(wn)),v.registerPartial("header",v.template(Rn)),v.registerPartial("isNullable",v.template(qn)),v.registerPartial("isReadOnly",v.template(jn)),v.registerPartial("isRequired",v.template(Cn)),v.registerPartial("parameters",v.template(An)),v.registerPartial("result",v.template($n)),v.registerPartial("schema",v.template(In)),v.registerPartial("schemaArray",v.template(Dn)),v.registerPartial("schemaDictionary",v.template(En)),v.registerPartial("schemaEnum",v.template(Hn)),v.registerPartial("schemaGeneric",v.template(Nn)),v.registerPartial("schemaInterface",v.template(Tn)),v.registerPartial("schemaComposition",v.template(Sn)),v.registerPartial("type",v.template(Bn)),v.registerPartial("typeArray",v.template(Ln)),v.registerPartial("typeDictionary",v.template(Mn)),v.registerPartial("typeEnum",v.template(_n)),v.registerPartial("typeGeneric",v.template(Fn)),v.registerPartial("typeInterface",v.template(Un)),v.registerPartial("typeReference",v.template(Vn)),v.registerPartial("typeUnion",v.template(Qn)),v.registerPartial("typeIntersection",v.template(Wn)),v.registerPartial("base",v.template(Pn)),v.registerPartial("functions/catchErrors",v.template(We)),v.registerPartial("functions/getFormData",v.template(Ve)),v.registerPartial("functions/getQueryString",v.template(Qe)),v.registerPartial("functions/getUrl",v.template(ze)),v.registerPartial("functions/isBinary",v.template(Je)),v.registerPartial("functions/isBlob",v.template(Ze)),v.registerPartial("functions/isDefined",v.template(Ge)),v.registerPartial("functions/isString",v.template(Xe)),v.registerPartial("functions/isStringWithValue",v.template(Ke)),v.registerPartial("functions/isSuccess",v.template(Ye)),v.registerPartial("functions/resolve",v.template(en)),v.registerPartial("fetch/getHeaders",v.template(Be)),v.registerPartial("fetch/getRequestBody",v.template(Le)),v.registerPartial("fetch/getResponseBody",v.template(Me)),v.registerPartial("fetch/getResponseHeader",v.template(_e)),v.registerPartial("fetch/sendRequest",v.template(Ue)),v.registerPartial("fetch/request",v.template(Fe)),v.registerPartial("xhr/getHeaders",v.template(pn)),v.registerPartial("xhr/getRequestBody",v.template(cn)),v.registerPartial("xhr/getResponseBody",v.template(mn)),v.registerPartial("xhr/getResponseHeader",v.template(fn)),v.registerPartial("xhr/sendRequest",v.template(hn)),v.registerPartial("xhr/request",v.template(dn)),v.registerPartial("node/getHeaders",v.template(nn)),v.registerPartial("node/getRequestBody",v.template(tn)),v.registerPartial("node/getResponseBody",v.template(rn)),v.registerPartial("node/getResponseHeader",v.template(an)),v.registerPartial("node/sendRequest",v.template(ln)),v.registerPartial("node/request",v.template(on)),n}function Jn(e){let t=0,r=e.split(n.EOL);return r=r.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${" ".repeat(n)}${e}`;return""===r.trim()?"":r})),r.join(n.EOL)}async function Zn(n,t,r,o,l,i,s,u,p,c,m,f){const d=e.resolve(process.cwd(),r),h=e.resolve(d,"core"),y=e.resolve(d,"models"),v=e.resolve(d,"schemas"),g=e.resolve(d,"services");if(b=process.cwd(),P=r,!e.relative(P,b).startsWith(".."))throw new Error("Output folder is not a subdirectory of the current working directory");var b,P;s&&(m&&await Re(h),await we(h),await async function(n,t,r,a,o){const l={httpClient:a,server:n.server,version:n.version};if(await Oe(e.resolve(r,"OpenAPI.ts"),t.core.settings(l)),await Oe(e.resolve(r,"ApiError.ts"),t.core.apiError({})),await Oe(e.resolve(r,"ApiRequestOptions.ts"),t.core.apiRequestOptions({})),await Oe(e.resolve(r,"ApiResult.ts"),t.core.apiResult({})),await Oe(e.resolve(r,"request.ts"),t.core.request(l)),o){const n=e.resolve(process.cwd(),o);if(!await ke(n))throw new Error(`Custom request file "${n}" does not exists`);await xe(n,e.resolve(r,"request.ts"))}}(n,t,h,o,f)),u&&(m&&await Re(g),await we(g),await async function(n,t,r,a,o,l){for(const i of n){const n=e.resolve(r,`${i.name}.ts`),s=i.operations.some((e=>e.path.includes("OpenAPI.VERSION"))),u=t.exports.service(Object.assign(Object.assign({},i),{httpClient:a,useUnionTypes:o,useVersion:s,useOptions:l}));await Oe(n,Jn(u))}}(n.services,t,g,o,i,l)),c&&(m&&await Re(v),await we(v),await async function(n,t,r,o,l){for(const i of n){const n=e.dirname(i.path);if(n){const t=e.resolve(r,n);a.mkdirSync(t,{recursive:!0})}const s=e.resolve(r,`${i.path}Schema.ts`),u=t.exports.schema(Object.assign(Object.assign({},i),{httpClient:o,useUnionTypes:l}));await Oe(s,Jn(u))}}(n.models,t,v,o,i)),p&&(m&&await Re(y),await we(y),await async function(n,t,r,o,l){for(const i of n){const n=e.dirname(i.path);if(n){const t=e.resolve(r,n);a.mkdirSync(t,{recursive:!0})}const s=e.resolve(r,`${i.path}.ts`),u=t.exports.model(Object.assign(Object.assign({},i),{httpClient:o,useUnionTypes:l}));await Oe(s,Jn(u))}}(n.models,t,y,o,i)),(s||u||c||p)&&(await we(d),await async function(n,t,r,a,o,l,i,s){var u;await Oe(e.resolve(r,"index.ts"),t.index({exportCore:o,exportServices:l,exportModels:i,exportSchemas:s,useUnionTypes:a,server:n.server,version:n.version,models:Z(n.models),services:(u=n.services,u.sort(((e,n)=>{const t=e.name.toLowerCase(),r=n.name.toLowerCase();return t.localeCompare(r,"en")})))}))}(n,t,d,i,s,u,p,c))}exports.generate=async function({input:e,output:n,httpClient:t=exports.HttpClient.FETCH,useOptions:r=!1,useUnionTypes:a=!1,exportCore:o=!0,exportServices:l=!0,exportModels:i=!0,exportSchemas:s=!1,clean:u=!0,request:p,write:c=!0}){const f=new P(e),h=b(e)?await async function(e,n){const t=m.default.resolve(process.cwd(),e);if(!e)throw new Error(`Could not find OpenApi spec: "${t}"`);if(!await ke(t))throw new Error(`Could not read OpenApi spec: "${t}"`);const r=new d.default;n.addRefs(await r.resolve(e));const a=Object.assign({},r.schema);let o={};for(const e of Object.entries(a.paths)){const t=e[0],r=e[1];if(r.$ref){let e=n.get(r.$ref);e=qe(e,n,m.default.dirname(r.$ref)),o=Object.assign(o,{[t]:e})}else Object.assign(o,{[t]:r})}return r.schema=Object.assign(r.schema,{paths:o}),new Promise((e=>e(r.schema)))}(e,f):e,y=function(e){const n=e.swagger||e.openapi;if("string"==typeof n){const e=n.charAt(0),t=Number.parseInt(e);if(t===je.V2||t===je.V3)return t}throw new Error(`Unsupported Open API version: "${String(n)}"`)}(h),v=zn({httpClient:t,useUnionTypes:a,useOptions:r});switch(y){case je.V2:{const e=Ee(J(f,h));if(!c)break;await Zn(e,v,n,t,r,a,o,l,i,s,u,p);break}case je.V3:{const e=Ee(Pe(f,h));if(!c)break;await Zn(e,v,n,t,r,a,o,l,i,s,u,p);break}}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-openapi-codegen",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Library that generates Typescript clients based on the OpenAPI specification. It bases on openapi-typescript-codegen",
5
5
  "author": "Alexey Zverev",
6
6
  "homepage": "https://github.com/ozonophore/openapi-codegen.git",