Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swagger-client

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-client - npm Package Compare versions

Comparing version 3.3.1 to 3.3.2

2

dist/index.js

@@ -1,1 +0,1 @@

module.exports=function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=53)}([function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t){e.exports=require("babel-runtime/core-js/object/assign")},function(e,t){e.exports=require("babel-runtime/helpers/typeof")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.openapi;return!!t&&(0,k.default)(t,"3")}function u(e){var t=e.swagger;return!!t&&(0,k.default)(t,"2")}function o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(e.operationId||"").replace(/\s/g,"").length?_(e.operationId):i(t,r)}function i(e,t){return""+q(t)+_(e)}function s(e,t){return q(t)+"-"+e}function l(e,t){return e&&e.paths?c(e,function(e){var r=e.pathName,n=e.method,a=e.operation;if(!a||"object"!==(void 0===a?"undefined":(0,g.default)(a)))return!1;var u=a.operationId;return[o(a,r,n),s(r,n),u].some(function(e){return e&&e===t})}):null}function c(e,t){return f(e,t,!0)||null}function f(e,t,r){if(!e||"object"!==(void 0===e?"undefined":(0,g.default)(e))||!e.paths||"object"!==(0,g.default)(e.paths))return null;var n=e.paths;for(var a in n)for(var u in n[a])if("PARAMETERS"!==u.toUpperCase()){var o=n[a][u];if(o&&"object"===(void 0===o?"undefined":(0,g.default)(o))){var i={spec:e,pathName:a,method:u.toUpperCase(),operation:o},s=t(i);if(r&&s)return i}}}function d(e){var t=e.spec,r=t.paths,n={};if(!r)return e;for(var a in r){var u=r[a];if((0,x.default)(u)){var i=u.parameters;for(var s in u){(function(e){var r=u[e];if(!(0,x.default)(r))return"continue";var s=o(r,a,e);if(s&&(n[s]?n[s].push(r):n[s]=[r],(0,y.default)(n).forEach(function(e){if(n[e].length>1)n[e].forEach(function(t,r){t.__originalOperationId=t.__originalOperationId||t.operationId,t.operationId=""+e+(r+1)});else if(void 0!==r.operationId){var t=n[e][0];t.__originalOperationId=t.__originalOperationId||r.operationId,t.operationId=e}})),"parameters"!==e){var l=[],c={};for(var f in t)"produces"!==f&&"consumes"!==f&&"security"!==f||(c[f]=t[f],l.push(c));if(i&&(c.parameters=i,l.push(c)),l.length){var d=!0,p=!1,v=void 0;try{for(var m,g=(0,h.default)(l);!(d=(m=g.next()).done);d=!0){var b=m.value;for(var P in b)if(r[P]){if("parameters"===P){var k=!0,q=!1,_=void 0;try{for(var w,O=(0,h.default)(b[P]);!(k=(w=O.next()).done);k=!0)!function(){var e=w.value;r[P].some(function(t){return t.name===e.name})||r[P].push(e)}()}catch(e){q=!0,_=e}finally{try{!k&&O.return&&O.return()}finally{if(q)throw _}}}}else r[P]=b[P]}}catch(e){p=!0,v=e}finally{try{!d&&g.return&&g.return()}finally{if(p)throw v}}}}})(s)}}}return e}Object.defineProperty(t,"__esModule",{value:!0});var p=r(12),h=n(p),v=r(0),y=n(v),m=r(2),g=n(m);t.isOAS3=a,t.isSwagger2=u,t.opId=o,t.idFromPathMethod=i,t.legacyIdFromPathMethod=s,t.getOperationRaw=l,t.findOperation=c,t.eachOperation=f,t.normalizeSwagger=d;var b=r(48),x=n(b),P=r(19),k=n(P),q=function(e){return String.prototype.toLowerCase.call(e)},_=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,b.default)(e))&&(t=e,e=t.url),t.headers=t.headers||{},O.mergeInQueryOrForm(t),t.requestInterceptor&&(t=t.requestInterceptor(t)||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]),(t.userFetch||fetch)(t.url,t).then(function(r){var n=O.serializeRes(r,e,t).then(function(e){return t.responseInterceptor&&(e=t.responseInterceptor(e)||e),e});if(!r.ok){var a=new Error(r.statusText);return a.statusCode=a.status=r.status,n.then(function(e){throw a.response=e,a},function(e){throw a.responseError=e,a})}return n})}function u(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.loadSpec,a=void 0!==n&&n,u={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:o(e.headers)},i=a||A(u.headers["content-type"]);return(i?e.text:e.blob||e.buffer).call(e).then(function(e){if(u.text=e,u.data=e,i)try{var t=q.default.safeLoad(e);u.body=t,u.obj=t}catch(e){u.parseError=e}return u})}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,r){void 0!==t[r]?(t[r]=Array.isArray(t[r])?t[r]:[t[r]],t[r].push(e)):t[r]=e}),t):t}function i(e){return"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,b.default)(e))&&"function"==typeof e.pipe}function s(e,t){var r=e.value,n=e.collectionFormat,a=e.allowEmptyValue,u={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};if(void 0===r&&a)return"";if(i(r)||"boolean"==typeof r)return r;var o=encodeURIComponent;return t&&(o=(0,w.default)(r)?function(e){return e}:function(e){return(0,m.default)(e)}),r&&!Array.isArray(r)?o(r):Array.isArray(r)&&!n?r.map(o).join(","):"multi"===n?r.map(o):r.map(o).join(u[n])}function l(e){var t=(0,v.default)(e).reduce(function(t,r){var n=e[r],a=!!n.skipEncoding,u=a?r:encodeURIComponent(r),o=function(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}(n)&&!Array.isArray(n);return t[u]=s(o?n:{value:n},a),t},{});return P.default.stringify(t,{encode:!1,indices:!1})||""}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,a=e.query,u=e.form;if(u){var o=(0,v.default)(u).some(function(e){return i(u[e].value)}),c=e.headers["content-type"]||e.headers["Content-Type"];if(o||/multipart\/form-data/i.test(c)){var f=r(43);e.body=new f,(0,v.default)(u).forEach(function(t){e.body.append(t,s(u[t],!0))})}else e.body=l(u);delete e.form}if(a){var d=n.split("?"),h=(0,p.default)(d,2),y=h[0],m=h[1],g="";if(m){var b=P.default.parse(m);(0,v.default)(a).forEach(function(e){return delete b[e]}),g=P.default.stringify(b,{encode:!0})}var x=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(function(e){return e}).join("&");return n?"?"+n:""}(g,l(a));e.url=y+x,delete e.query}return e}function f(e,t,r){return r=r||function(e){return e},t=t||function(e){return e},function(n){return"string"==typeof n&&(n={url:n}),O.mergeInQueryOrForm(n),n=t(n),r(e(n))}}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldDownloadAsText=t.self=void 0;var d=r(38),p=n(d),h=r(0),v=n(h),y=r(8),m=n(y),g=r(2),b=n(g);t.default=a,t.serializeRes=u,t.serializeHeaders=o,t.encodeFormOrQuery=l,t.mergeInQueryOrForm=c,t.makeHttp=f,r(17);var x=r(52),P=n(x),k=r(44),q=n(k),_=r(50),w=n(_),O=t.self={serializeRes:u,mergeInQueryOrForm:c},A=t.shouldDownloadAsText=function(){return/json|xml|yaml|text/.test(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r){if(r=r||{},t=(0,V.default)({},t,{path:t.path&&u(t.path)}),"merge"===t.op){var n=i(t.path);$.default.apply(e,[n]),(0,V.default)(n.value,t.value)}else if("mergeDeep"===t.op){var a=i(t.path);$.default.apply(e,[a]);var o=(0,V.default)({},a.value);(0,G.default)(a.value,t.value);for(var s in t.value)if(Object.prototype.hasOwnProperty.call(t.value,s)){var l=t.value[s];if(Array.isArray(l)){var c=o[s]||[];a.value[s]=c.concat(l)}}}else if($.default.apply(e,[t]),r.allowMetaPatches&&t.meta&&I(t)&&(Array.isArray(t.value)||_(t.value))){var f=i(t.path);$.default.apply(e,[f]),(0,V.default)(f.value,t.meta)}return e}function u(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function o(e,t){return{op:"add",path:e,value:t}}function i(e){return{op:"_get",path:e}}function s(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function l(e,t){return{op:"remove",path:e}}function c(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function f(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function d(e,t){return{type:"context",path:e,value:t}}function p(e,t){try{return v(e,m,t)}catch(e){return e}}function h(e,t){try{return v(e,y,t)}catch(e){return e}}function v(e,t,r){return q(k(e.filter(I).map(function(e){return t(e.value,r,e.path)})||[]))}function y(e,t,r){return r=r||[],Array.isArray(e)?e.map(function(e,n){return y(e,t,r.concat(n))}):_(e)?(0,N.default)(e).map(function(n){return y(e[n],t,r.concat(n))}):t(e,r[r.length-1],r)}function m(e,t,r){r=r||[];var n=[];if(r.length>0){var a=t(e,r[r.length-1],r);a&&(n=n.concat(a))}if(Array.isArray(e)){var u=e.map(function(e,n){return m(e,t,r.concat(n))});u&&(n=n.concat(u))}else if(_(e)){var o=(0,N.default)(e).map(function(n){return m(e[n],t,r.concat(n))});o&&(n=n.concat(o))}return n=k(n)}function g(e,t){if(!Array.isArray(t))return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function b(e,t){return t.reduce(function(e,t){return void 0!==t&&e?e[t]:e},e)}function x(e){return q(k(P(e)))}function P(e){return Array.isArray(e)?e:[e]}function k(e){var t;return(t=[]).concat.apply(t,(0,S.default)(e.map(function(e){return Array.isArray(e)?k(e):e})))}function q(e){return e.filter(function(e){return void 0!==e})}function _(e){return e&&"object"===(void 0===e?"undefined":(0,F.default)(e))}function w(e){return _(e)&&O(e.then)}function O(e){return e&&"function"==typeof e}function A(e){return e instanceof Error}function j(e){if(T(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function M(e){return B.default.isGeneratorFunction(e)}function E(e){return j(e)||T(e)&&"mutation"===e.type}function I(e){return E(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function C(e){return T(e)&&"context"===e.type}function T(e){return e&&"object"===(void 0===e?"undefined":(0,F.default)(e))}Object.defineProperty(t,"__esModule",{value:!0});var R=r(2),F=n(R),D=r(39),S=n(D),z=r(0),N=n(z),H=r(1),V=n(H),U=r(42),$=n(U),L=r(16),B=n(L),J=r(41),G=n(J);t.default={add:o,replace:s,remove:l,merge:c,mergeDeep:f,context:d,getIn:b,applyPatch:a,parentPathMatch:g,flatten:k,fullyNormalizeArray:x,normalizeArray:P,isPromise:w,forEachNew:p,forEachNewPrimitive:h,isJsonPatch:j,isContextPatch:C,isPatch:T,isMutation:E,isAdditiveMutation:I,isGenerator:M,isFunction:O,isObject:_,isError:A}},function(e,t){e.exports=require("babel-runtime/helpers/extends")},function(e,t){e.exports=require("lodash/assign")},function(e,t){e.exports=require("babel-runtime/core-js/json/stringify")},function(e,t){e.exports=require("btoa")},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";function n(e,t){function r(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];this.message=r[0],t&&t.apply(this,r)}return r.prototype=new Error,r.prototype.name=e,r.prototype.constructor=r,r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){e.exports=require("babel-runtime/core-js/get-iterator")},function(e,t){e.exports=require("babel-runtime/core-js/promise")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/regenerator")},function(e,t){e.exports=require("isomorphic-fetch")},function(e,t){e.exports=require("lodash/get")},function(e,t){e.exports=require("lodash/startsWith")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?r.url=e:r=e,!(this instanceof a))return new a(r);(0,l.default)(this,r);var n=this.resolve().then(function(){return t.disableInterfaces||(0,l.default)(t,a.makeApisTagOperation(t)),t});return n.client=this,n}var u=r(6),o=n(u),i=r(45),s=(n(i),r(7)),l=n(s),c=r(19),f=n(c),d=r(10),p=n(d),h=r(4),v=n(h),y=r(28),m=n(y),g=r(27),b=r(21),x=r(3);a.http=v.default,a.makeHttp=h.makeHttp.bind(null,a.http),a.resolve=m.default,a.execute=b.execute,a.serializeRes=h.serializeRes,a.serializeHeaders=h.serializeHeaders,a.clearCache=y.clearCache,a.parameterBuilders=b.PARAMETER_BUILDERS,a.makeApisTagOperation=g.makeApisTagOperation,a.buildRequest=b.buildRequest,a.helpers={opId:x.opId},e.exports=a,a.prototype={http:v.default,execute:function(e){return this.applyDefaults(),a.execute((0,o.default)({spec:this.spec,http:this.http.bind(this),securities:{authorized:this.authorizations}},e))},resolve:function(){var e=this;return a.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},a.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&(0,f.default)(t,"http")){var r=p.default.parse(t);e.host||(e.host=r.host),e.schemes||(e.schemes=[r.protocol.replace(":","")]),e.basePath||(e.basePath="/")}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.http,r=e.fetch,n=e.spec,a=e.operationId,u=e.pathName,o=e.method,i=e.parameters,s=e.securities,l=(0,g.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]);t=t||r||T.default,u&&o&&!a&&(a=(0,L.legacyIdFromPathMethod)(u,o));var c=Q.buildRequest((0,y.default)({spec:n,operationId:a,parameters:i,securities:s},l));return c.body&&((0,_.default)(c.body)||(0,O.default)(c.body))&&(c.body=(0,h.default)(c.body)),t(c)}function u(e){var t=e.spec,r=e.operationId,n=(e.securities,e.requestContentType,e.responseContentType),a=e.scheme,u=e.requestInterceptor,i=e.responseInterceptor,s=e.contextUrl,l=e.userFetch,c=(e.requestBody,e.server),f=e.serverVariables,p=e.parameters,h=e.parameterBuilders,v=(0,L.isOAS3)(t);h||(h=v?N.default:S.default);var m={url:o({spec:t,scheme:a,contextUrl:s,server:c,serverVariables:f}),credentials:"same-origin",headers:{},cookies:{}};if(u&&(m.requestInterceptor=u),i&&(m.responseInterceptor=i),l&&(m.userFetch=l),!r)return delete m.cookies,m;var g=(0,L.getOperationRaw)(t,r);if(!g)throw new J("Operation "+r+" not found");var b=g.operation,x=void 0===b?{}:b,P=g.method,k=g.pathName;m.url+=k,m.method=(""+P).toUpperCase(),p=p||{};var q=t.paths[k]||{};n&&(m.headers.accept=n);var _=[].concat(B(x.parameters)).concat(B(q.parameters));_.forEach(function(e){var r=h[e.in],n=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(n=p),n=e&&e.name&&p[e.name],void 0===n?n=e&&e.name&&p[e.in+"."+e.name]:G(e.name,_).length>1&&console.warn("Parameter '"+e.name+"' is ambiguous because the defined spec has more than one parameter with the name: '"+e.name+"' and the passed-in parameter values did not define an 'in' value."),void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");r&&r({req:m,parameter:e,value:n,operation:x,spec:t})});var w=(0,y.default)({},e,{operation:x});if(m=v?(0,V.default)(w,m):(0,$.default)(w,m),m.cookies&&(0,d.default)(m.cookies).length){var O=(0,d.default)(m.cookies).reduce(function(e,t){var r=m.cookies[t];return e+(e?"&":"")+I.default.serialize(t,r)},"");m.headers.Cookie=O}return m.cookies&&delete m.cookies,(0,C.mergeInQueryOrForm)(m),m}function o(e){return(0,L.isOAS3)(e.spec)?i(e):c(e)}function i(e){var t=e.spec,r=e.server,n=e.contextUrl,a=e.serverVariables,u=void 0===a?{}:a,o=t.servers,i="",c=null;if(r&&o){var f=o.map(function(e){return e.url});f.indexOf(r)>-1&&(i=r,c=o[f.indexOf(r)])}if(!i&&o&&(i=o[0].url,c=o[0]),i.indexOf("{")>-1){l(i).forEach(function(e){if(c.variables&&c.variables[e]){var t=c.variables[e],r=u[e]||t.default,n=new RegExp("{"+e+"}","g");i=i.replace(n,r)}})}return s(i,n)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=M.default.parse(e),n=M.default.parse(t),a=W(r.protocol)||W(n.protocol)||"",u=r.host||n.host,o=r.pathname||"",i=void 0;return i=a&&u?a+"://"+(u+o):o,"/"===i[i.length-1]?i.slice(0,-1):i}function l(e){for(var t=[],r=/{([^}]+)}/g,n=void 0;n=r.exec(e);)t.push(n[1]);return t}function c(e){var t=e.spec,r=e.scheme,n=e.contextUrl,a=void 0===n?"":n,u=M.default.parse(a),o=Array.isArray(t.schemes)?t.schemes[0]:null,i=r||o||W(u.protocol)||"http",s=t.host||u.host||"",l=t.basePath||"",c=void 0;return c=i&&s?i+"://"+(s+l):l,"/"===c[c.length-1]?c.slice(0,-1):c}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var f=r(0),d=n(f),p=r(8),h=n(p),v=r(6),y=n(v),m=r(37),g=n(m),b=r(1),x=n(b);t.execute=a,t.buildRequest=u,t.baseUrl=o;var P=r(7),k=(n(P),r(18)),q=(n(k),r(49)),_=n(q),w=r(47),O=n(w),A=r(9),j=(n(A),r(10)),M=n(j),E=r(40),I=n(E),C=r(4),T=n(C),R=r(11),F=n(R),D=r(26),S=n(D),z=r(23),N=n(z),H=r(22),V=n(H),U=r(25),$=n(U),L=r(3),B=function(e){return Array.isArray(e)?e:[]},J=(0,F.default)("OperationNotFoundError",function(e,t,r){this.originalError=r,(0,x.default)(this,t||{})}),G=function(e,t){return t.filter(function(t){return t.name===e})},Q=t.self={buildRequest:u},W=function(e){return e?e.replace(/\W/g,""):null}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,o=e.spec,i=(0,c.default)({},t),l=n.authorized,f=void 0===l?{}:l,p=u.security||o.security||[],v=f&&!!(0,s.default)(f).length,y=(0,d.default)(o,["components","securitySchemes"])||{};return i.headers=i.headers||{},i.query=i.query||{},(0,s.default)(n).length&&v&&p&&(!Array.isArray(u.security)||u.security.length)?(p.forEach(function(e,t){for(var r in e){var n=f[r],a=y[r];if(n){var u=n.value||n,o=a.type;if(n)if("apiKey"===o)"query"===a.in&&(i.query[a.name]=u),"header"===a.in&&(i.headers[a.name]=u),"cookie"===a.in&&(i.cookies[a.name]=u);else if("http"===o){if("basic"===a.scheme){var s=u.username,l=u.password,c=(0,h.default)(s+":"+l);i.headers.Authorization="Basic "+c}"bearer"===a.scheme&&(i.headers.Authorization="Bearer "+u)}else if("oauth2"===o){var d=n.token||{},p=d.access_token,v=d.token_type;v&&"bearer"!==v.toLowerCase()||(v="Bearer"),i.headers.Authorization=v+" "+p}}}}),i):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(2),o=n(u),i=r(0),s=n(i);t.default=function(e,t){var r=e.operation,n=e.requestBody,u=e.securities,i=e.spec,l=e.requestContentType;t=a({request:t,securities:u,operation:r,spec:i});var c=r.requestBody||{},f=(0,s.default)(c.content||{});if(n){var d=l&&f.indexOf(l)>-1;if(l&&d)t.headers["Content-Type"]=l;else if(!l){var p=f[0];p&&(t.headers["Content-Type"]=p,l=p)}}return n&&(l?f.indexOf(l)>-1&&("application/x-www-form-urlencoded"===l?"object"===(void 0===n?"undefined":(0,o.default)(n))?(t.form={},(0,s.default)(n).forEach(function(e){var r=n[e];t.form[e]={value:r}})):t.form=n:t.body=n):t.body=n),t},t.applySecurities=a;var l=r(7),c=n(l),f=r(18),d=n(f),p=r(9),h=n(p)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.req,r=e.value,n=e.parameter,a=n.name,u=n.style,o=n.explode,i=(0,p.default)({key:n.name,value:r,style:u||"simple",explode:o||!1,escape:!n.allowReserved});t.url=t.url.replace("{"+a+"}",i)}function u(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&(r="false"),0===r&&(r="0"),r){var a=void 0===r?"undefined":(0,f.default)(r);if("deepObject"===n.style){(0,l.default)(r).forEach(function(e){var a=r[e];t.query[n.name+"["+e+"]"]={value:(0,p.default)({key:e,value:a,style:"deepObject",escape:!n.allowReserved}),skipEncoding:!0}})}else if("object"!==a||Array.isArray(r)||"form"!==n.style&&n.style||!n.explode&&void 0!==n.explode)t.query[n.name]={value:(0,p.default)({key:n.name,value:r,style:n.style||"form",explode:void 0===n.explode||n.explode,escape:!n.allowReserved}),skipEncoding:!0};else{var u=(0,l.default)(r);u.forEach(function(e){var a=r[e];t.query[e]={value:(0,p.default)({key:e,value:a,style:n.style||"form",escape:!n.allowReserved})}})}}else if(n.allowEmptyValue){var o=n.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}}function o(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},h.indexOf(r.name.toLowerCase())>-1||void 0!==n&&(t.headers[r.name]=(0,p.default)({key:r.name,value:n,style:r.style||"simple",explode:void 0!==r.explode&&r.explode,escape:!r.allowReserved}))}function i(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{};var a=void 0===n?"undefined":(0,f.default)(n);if("undefined"!==a){var u="object"===a&&!Array.isArray(n)&&r.explode?"":r.name+"=";t.headers.Cookie=u+(0,p.default)({key:r.name,value:n,escape:!1,style:r.style||"form",explode:void 0!==r.explode&&r.explode})}}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),l=n(s),c=r(2),f=n(c),d=r(24),p=n(d);t.default={path:a,query:u,header:o,cookie:i};var h=["accept","authorization","content-type"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.key,r=e.value,n=e.style,a=e.explode,u=e.escape;if("simple"===n)return r.join(",");if("label"===n)return"."+r.join(".");if("matrix"===n)return r.reduce(function(e,r){return!e||a?(e||"")+";"+t+"="+r:e+","+r},"");if("form"===n){var o=u?f(","):",",i=a?"&"+t+"=":o;return r.join(i)}if("spaceDelimited"===n){var s=a?t+"=":"";return r.join(""+f(" ")+s)}if("pipeDelimited"===n){var l=a?t+"=":"",c=u?f("|"):"|";return r.join(""+c+l)}}function u(e){var t=e.key,r=e.value,n=e.style,a=e.explode,u=(0,s.default)(r);return"simple"===n?u.reduce(function(e,t){var n=r[t],u=a?"=":",";return(e?e+",":"")+t+u+n},""):"label"===n?u.reduce(function(e,t){var n=r[t],u=a?"=":".";return(e?e+".":".")+t+u+n},""):"matrix"===n&&a?u.reduce(function(e,t){var n=r[t];return(e?e+";":";")+t+"="+n},""):"matrix"===n?u.reduce(function(e,n){var a=r[n];return(e?e+",":";"+t+"=")+n+","+a},""):"form"===n?u.reduce(function(e,t){var n=r[t];return(e?e+(a?"&":","):"")+t+(a?"=":",")+n},""):void 0}function o(e){var t=e.key,r=e.value,n=e.style;e.explode;return"simple"===n?r:"label"===n?"."+r:"matrix"===n?";"+t+"="+r:"form"===n?r:"deepObject"===n?r:void 0}Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),s=n(i),l=r(2),c=n(l);t.default=function(e){var t=e.value;return Array.isArray(t)?a(e):"object"===(void 0===t?"undefined":(0,c.default)(t))?u(e):o(e)};var f=function(e){return encodeURIComponent(e)}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,i=e.spec,l=(0,c.default)({},t),f=n.authorized,d=void 0===f?{}:f,p=n.specSecurity,h=void 0===p?[]:p,v=u.security||h,y=d&&!!(0,o.default)(d).length,m=i.securityDefinitions;return l.headers=l.headers||{},l.query=l.query||{},(0,o.default)(n).length&&y&&v&&(!Array.isArray(u.security)||u.security.length)?(v.forEach(function(e,t){for(var r in e){var n=d[r];if(n){var a=n.token,u=n.value||n,o=m[r],i=o.type,c=a&&a.access_token,f=a&&a.token_type;if(n)if("apiKey"===i){var p="query"===o.in?"query":"headers";l[p]=l[p]||{},l[p][o.name]=u}else"basic"===i?u.header?l.headers.authorization=u.header:(u.base64=(0,s.default)(u.username+":"+u.password),l.headers.authorization="Basic "+u.base64):"oauth2"===i&&c&&(f=f&&"bearer"!==f.toLowerCase()?f:"Bearer",l.headers.authorization=f+" "+c)}}}),l):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(0),o=n(u);t.default=function(e,t){var r=e.spec,n=e.operation,u=e.securities,o=e.requestContentType;return t=a({request:t,securities:u,operation:n,spec:r}),(t.body||t.form)&&(o?t.headers["Content-Type"]=o:Array.isArray(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:Array.isArray(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:n.parameters&&n.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded")),t},t.applySecurities=a;var i=r(9),s=n(i),l=r(7),c=n(l),f=r(4);n(f)},function(e,t,r){"use strict";function n(e){var t=e.req,r=e.value;t.body=r}function a(e){var t=e.req,r=e.value,n=e.parameter;t.form=t.form||{},(r||n.allowEmptyValue)&&(t.form[n.name]={value:r,allowEmptyValue:n.allowEmptyValue,collectionFormat:n.collectionFormat})}function u(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},void 0!==n&&(t.headers[r.name]=n)}function o(e){var t=e.req,r=e.value,n=e.parameter;t.url=t.url.replace("{"+n.name+"}",encodeURIComponent(r))}function i(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&"boolean"===n.type&&(r="false"),0===r&&["number","integer"].indexOf(n.type)>-1&&(r="0"),r)t.query[n.name]={collectionFormat:n.collectionFormat,value:r};else if(n.allowEmptyValue){var a=n.name;t.query[a]=t.query[a]||{},t.query[a].allowEmptyValue=!0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default={body:n,header:u,query:i,path:o,formData:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.pathName,n=t.method,a=t.operationId;return function(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,l.default)({spec:e.spec},(0,f.default)(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:r,method:n,parameters:t,operationId:a},u))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e),r=v.mapTagOperations({spec:e.spec,cb:t}),n={};for(var a in r){n[a]={operations:{}};for(var u in r[a])n[a].operations[u]={execute:r[a][u]}}return{apis:n}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e);return{apis:v.mapTagOperations({spec:e.spec,cb:t})}}function i(e){var t=e.spec,r=e.cb,n=void 0===r?p:r,a=e.defaultTag,u=void 0===a?"default":a,o={},i={};return(0,d.eachOperation)(t,function(e){var r=e.pathName,a=e.method,s=e.operation;(s.tags?h(s.tags):[u]).forEach(function(e){if("string"==typeof e){var u=i[e]=i[e]||{},l=(0,d.opId)(s,r,a),c=n({spec:t,pathName:r,method:a,operation:s,operationId:l});if(o[l])o[l]++,u[""+l+o[l]]=c;else if(void 0!==u[l]){var f=o[l]||1;o[l]=f+1,u[""+l+o[l]]=c;var p=u[l];delete u[l],u[""+l+f]=p}else u[l]=c}})}),i}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var s=r(6),l=n(s);t.makeExecute=a,t.makeApisTagOperationsOperationExecute=u,t.makeApisTagOperation=o,t.mapTagOperations=i;var c=r(51),f=n(c),d=r(3),p=function(){return null},h=function(e){return Array.isArray(e)?e:[e]},v=t.self={mapTagOperations:i,makeExecute:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requestInterceptor,n=t.responseInterceptor;return function(t){return e({url:t,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.body})}}function u(){l.plugins.refs.clearCache()}function o(e){function t(e){g&&(l.plugins.refs.docCache[g]=e),l.plugins.refs.fetchJSON=a(m,{requestInterceptor:v,responseInterceptor:y});var t=[l.plugins.refs];return"function"==typeof h&&t.push(l.plugins.parameters),"function"==typeof p&&t.push(l.plugins.properties),"strict"!==o&&t.push(l.plugins.allOf),(0,c.default)({spec:e,context:{baseDoc:g},plugins:t,allowMetaPatches:d,parameterMacro:h,modelPropertyMacro:p}).then(f.normalizeSwagger)}var r=e.fetch,n=e.spec,u=e.url,o=e.mode,i=e.allowMetaPatches,d=void 0===i||i,p=e.modelPropertyMacro,h=e.parameterMacro,v=e.requestInterceptor,y=e.responseInterceptor,m=e.http,g=e.baseDoc;return g=g||u,m=r||m||s.default,n?t(n):a(m,{requestInterceptor:v,responseInterceptor:y})(g).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.makeFetchJSON=a,t.clearCache=u,t.default=o;var i=r(4),s=n(i),l=r(29),c=n(l),f=r(3)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return new S(e).dispatch()}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var u=r(8),o=n(u),i=r(13),s=n(i),l=r(16),c=n(l),f=r(0),d=n(f),p=r(12),h=n(p),v=r(35),y=n(v),m=r(1),g=n(m),b=r(14),x=n(b),P=r(15),k=n(P);t.default=a;var q=r(46),_=n(q),w=r(5),O=n(w),A=r(34),j=n(A),M=r(30),E=n(M),I=r(32),C=n(I),T=r(33),R=n(T),F=r(31),D=n(F),S=function(){function e(t){(0,x.default)(this,e),(0,g.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new D.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,g.default)((0,y.default)(this),O.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(O.default.isFunction),this.patches.push(O.default.add([],this.spec)),this.patches.push(O.default.context([],this.context)),this.updatePatches(this.patches)}return(0,k.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,n)}}},{key:"verbose",value:function(e){if("verbose"===this.debugLevel){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,["["+e+"] "].concat(n))}}},{key:"wrapPlugin",value:function(e,t){var r=null,n=void 0;return e[this.pluginProp]?(r=e,n=e[this.pluginProp]):O.default.isFunction(e)?n=e:O.default.isObject(e)&&(n=function(e){return c.default.mark(function t(r,n){var a,u,o,i,s,l,f,p;return c.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:p=function t(r,u,o){var i,s,l,f,p,v,y,m,g,b,x,P;return c.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(O.default.isObject(r)){a.next=6;break}if(e.key!==u[u.length-1]){a.next=4;break}return a.next=4,e.plugin(r,e.key,u,n);case 4:a.next=41;break;case 6:i=u.length-1,s=u[i],l=u.indexOf("properties"),f="properties"===s&&i===l,p=!0,v=!1,y=void 0,a.prev=13,m=(0,h.default)((0,d.default)(r));case 15:if(p=(g=m.next()).done){a.next=27;break}if(b=g.value,x=r[b],P=u.concat(b),!O.default.isObject(x)){a.next=21;break}return a.delegateYield(t(x,P,o),"t0",21);case 21:if(f||b!==e.key){a.next=24;break}return a.next=24,e.plugin(x,b,P,n,o);case 24:p=!0,a.next=15;break;case 27:a.next=33;break;case 29:a.prev=29,a.t1=a.catch(13),v=!0,y=a.t1;case 33:a.prev=33,a.prev=34,!p&&m.return&&m.return();case 36:if(a.prev=36,!v){a.next=39;break}throw y;case 39:return a.finish(36);case 40:return a.finish(33);case 41:case"end":return a.stop()}},a,this,[[13,29,33,41],[34,,36,40]])},a=c.default.mark(p),u=!0,o=!1,i=void 0,t.prev=5,s=(0,h.default)(r.filter(O.default.isAdditiveMutation));case 7:if(u=(l=s.next()).done){t.next=13;break}return f=l.value,t.delegateYield(p(f.value,f.path,f),"t0",10);case 10:u=!0,t.next=7;break;case 13:t.next=19;break;case 15:t.prev=15,t.t1=t.catch(5),o=!0,i=t.t1;case 19:t.prev=19,t.prev=20,!u&&s.return&&s.return();case 22:if(t.prev=22,!o){t.next=25;break}throw i;case 25:return t.finish(22);case 26:return t.finish(19);case 27:case"end":return t.stop()}},t,this,[[5,15,19,27],[20,,22,26]])})}(e)),(0,g.default)(n.bind(r),{pluginName:e.name||t,isGenerator:O.default.isGenerator(n)})}},{key:"nextPlugin",value:function(){var e=this;return(0,_.default)(this.wrappedPlugins,function(t){return e.getMutationsForPlugin(t).length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return s.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var r=this.getPluginName(e);(this.pluginHistory[r]=this.pluginHistory[r]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var r=this;O.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)return void r.errors.push(e);try{if(!O.default.isObject(e))return void r.debug("updatePatches","Got a non-object patch",e);if(r.showDebug&&r.allPatches.push(e),O.default.isPromise(e.value))return r.promisedPatches.push(e),void r.promisedPatchThen(e);if(O.default.isContextPatch(e))return void r.setContext(e.path,e.value);if(O.default.isMutation(e))return void r.updateMutations(e)}catch(e){r.errors.push(e)}})}},{key:"updateMutations",value:function(e){O.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches})&&this.mutations.push(e)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);if(t<0)return void this.debug("Tried to remove a promisedPatch that isn't there!");this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(r){var n=(0,g.default)({},e,{value:r});t.removePromisedPatch(e),t.updatePatches(n)}).catch(function(r){t.removePromisedPatch(e),t.updatePatches(r)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return O.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,o.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=O.default.fullyNormalizeArray(e),r.updatePatches(e,n))}var t=this,r=this,n=this.nextPlugin();if(!n){var a=this.nextPromisedPatch();if(a)return a.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var u={spec:this.state,errors:this.errors};return this.showDebug&&(u.patches=this.allPatches),s.default.resolve(u)}if(r.pluginCount=r.pluginCount||{},r.pluginCount[n]=(r.pluginCount[n]||0)+1,r.pluginCount[n]>100)return s.default.resolve({spec:r.state,errors:r.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(n!==this.currentPlugin&&this.promisedPatches.length){var o=this.promisedPatches.map(function(e){return e.value});return s.default.all(o.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){r.currentPlugin=n;var t=r.getCurrentMutations(),a=r.mutations.length-1;try{if(n.isGenerator){var u=!0,o=!1,i=void 0;try{for(var s,l=(0,h.default)(n(t,r.getLib()));!(u=(s=l.next()).done);u=!0){e(s.value)}}catch(e){o=!0,i=e}finally{try{!u&&l.return&&l.return()}finally{if(o)throw i}}}else{e(n(t,r.getLib()))}}catch(t){e([(0,g.default)((0,y.default)(t),{plugin:n})])}finally{r.updatePluginHistory(n,{mutationIndex:a})}return r.dispatch()}()}}]),e}(),z={refs:j.default,allOf:E.default,parameters:C.default,properties:R.default};t.SpecMap=S,t.plugins=z},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),a=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={key:"allOf",plugin:function(e,t,r,n,u){if(!u.meta||!u.meta.$$ref){if(!Array.isArray(e)){var o=new TypeError("allOf must be an array");return o.fullPath=r,o}var i=r.slice(0,-1),s=!1,l=u.value;i.forEach(function(e){l=l[e]}),l=(0,a.default)({},l),delete l.allOf;var c=[n.replace(i,{})].concat(e.map(function(e,t){if(!n.isObject(e)){if(s)return null;s=!0;var a=new TypeError("Elements in allOf must be objects");return a.fullPath=r,a}return n.mergeDeep(i,e)}));return c.push(n.mergeDeep(i,l)),l.$$ref||c.push(n.remove([].concat(i,"$$ref"))),c}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return u({children:{}},e,t)}function u(e,t,r){return e.value=t||{},e.protoValue=r?(0,l.default)({},r.protoValue,e.value):e.value,(0,i.default)(e.children).forEach(function(t){var r=e.children[t];e.children[t]=u(r,r.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=n(o),s=r(6),l=n(s),c=r(14),f=n(c),d=r(15),p=n(d),h=function(){function e(t){(0,f.default)(this,e),this.root=a(t||{})}return(0,p.default)(e,[{key:"set",value:function(e,t){var r=this.getParent(e,!0);if(!r)return void u(this.root,t,null);var n=e[e.length-1],o=r.children;if(o[n])return void u(o[n],t,r);o[n]=a(t,r)}},{key:"get",value:function(e){if(e=e||[],e.length<1)return this.root.value;for(var t=this.root,r=void 0,n=void 0,a=0;a<e.length&&(n=e[a],r=t.children,r[n]);a++)t=r[n];return t&&t.protoValue}},{key:"getParent",value:function(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(function(e,r){if(!e)return e;var n=e.children;return!n[r]&&t&&(n[r]=a(null,e)),n[r]},this.root)}}]),e}();t.default=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"parameters",plugin:function(e,t,r,n,a){if(Array.isArray(e)&&e.length){var o=(0,u.default)([],e),s=r.slice(0,-1),l=(0,u.default)({},i.default.getIn(n.spec,s));return e.forEach(function(e,t){try{o[t].default=n.parameterMacro(l,e)}catch(e){var a=new Error(e);return a.fullPath=r,a}}),i.default.replace(r,o)}return i.default.replace(r,e)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"properties",plugin:function(e,t,r,n){var a=(0,u.default)({},e);for(var o in e)try{a[o].default=n.modelPropertyMacro(a[o])}catch(e){var s=new Error(e);return s.fullPath=r,s}return i.default.replace(r,a)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!S.test(e)){if(!t)throw new z("Tried to resolve a relative URL, without having a basePath. path: '"+e+"' basePath: '"+t+"'");return C.default.resolve(t,e)}return e}function u(e,t){return new z("Could not resolve reference because of: "+e.message,t,e)}function o(e){return(e+"").split("#")}function i(e,t){var r=N[e];if(r&&!R.default.isPromise(r))try{var n=f(t,r);return(0,j.default)(_.default.resolve(n),{__value:n})}catch(e){return _.default.reject(e)}return l(e).then(function(e){return f(t,e)})}function s(e){void 0!==e?delete N[e]:(0,k.default)(N).forEach(function(e){delete N[e]})}function l(e){var t=N[e];return t?R.default.isPromise(t)?t:_.default.resolve(t):(N[e]=U.fetchJSON(e).then(function(t){return N[e]=t,t}),N[e])}function c(e){return(0,E.default)(e,{headers:{Accept:"application/json"},loadSpec:!0}).then(function(e){return e.json()})}function f(e,t){var r=d(e);if(r.length<1)return t;var n=R.default.getIn(t,r);if(void 0===n)throw new z("Could not resolve pointer: "+e+" does not exist in document",{pointer:e});return n}function d(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+(void 0===e?"undefined":(0,x.default)(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(p)}function p(e){return"string"!=typeof e?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}function h(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function v(e){return 0===e.length?"":"/"+e.map(h).join("/")}function y(e,t){if($(t))return!0;var r=e.charAt(t.length);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)}function m(e,t,r,n){var a=H.get(n);a||(a={},H.set(n,a));var u=v(r),o=(t||"<specmap-base>")+"#"+e;if(t==n.contextTree.get([]).baseDoc&&y(u,e))return!0;var i="";if(r.some(function(e){return i=i+"/"+h(e),a[i]&&a[i].some(function(e){return y(e,o)||y(o,e)})}))return!0;a[u]=(a[u]||[]).concat(o)}function g(e,t){function r(e){return R.default.isObject(e)&&(n.indexOf(e)>=0||(0,k.default)(e).some(function(t){return r(e[t])}))}var n=[e];return t.path.reduce(function(e,t){return n.push(e[t]),e[t]},e),r(t.value)}Object.defineProperty(t,"__esModule",{value:!0});var b=r(2),x=n(b),P=r(0),k=n(P),q=r(13),_=n(q),w=r(36),O=n(w),A=r(1),j=n(A),M=r(17),E=n(M),I=r(10),C=n(I),T=r(5),R=n(T),F=r(11),D=n(F),S=new RegExp("^([a-z]+://|//)","i"),z=(0,D.default)("JSONRefError",function(e,t,r){this.originalError=r,(0,j.default)(this,t||{})}),N={},H=new O.default,V={key:"$ref",plugin:function(e,t,r,n){var s=r.slice(0,-1),l=n.getContext(r).baseDoc;if("string"!=typeof e)return new z("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:l,fullPath:r});var c=o(e),f=c[0],p=c[1]||"",h=void 0;try{h=l||f?a(f,l):null}catch(t){return u(t,{pointer:p,$ref:e,basePath:h,fullPath:r})}var v=void 0,y=void 0;if(!m(p,h,s,n)){if(null==h?(y=d(p),void 0===(v=n.get(y))&&(v=new z("Could not resolve reference: "+e,{pointer:p,$ref:e,baseDoc:l,fullPath:r}))):(v=i(h,p),v=null!=v.__value?v.__value:v.catch(function(t){throw u(t,{pointer:p,$ref:e,baseDoc:l,fullPath:r})})),v instanceof Error)return[R.default.remove(r),v];var b=R.default.replace(s,v,{$$ref:e});return h&&h!==l?[b,R.default.context(s,{baseDoc:h})]:g(n.state,b)?void 0:b}}},U=(0,j.default)(V,{docCache:N,absoluteify:a,clearCache:s,JSONRefError:z,wrapError:u,getDoc:l,split:o,extractFromDoc:i,fetchJSON:c,extract:f,jsonPointerToArray:d,unescapeJsonPointerToken:p});t.default=U;var $=function(e){return!e||"/"===e||"#"===e}},function(e,t){e.exports=require("babel-runtime/core-js/object/create")},function(e,t){e.exports=require("babel-runtime/core-js/weak-map")},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t){e.exports=require("babel-runtime/helpers/slicedToArray")},function(e,t){e.exports=require("babel-runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("cookie")},function(e,t){e.exports=require("deep-extend")},function(e,t){e.exports=require("fast-json-patch")},function(e,t){e.exports=require("isomorphic-form-data")},function(e,t){e.exports=require("js-yaml")},function(e,t){e.exports=require("lodash/cloneDeep")},function(e,t){e.exports=require("lodash/find")},function(e,t){e.exports=require("lodash/isArray")},function(e,t){e.exports=require("lodash/isObject")},function(e,t){e.exports=require("lodash/isPlainObject")},function(e,t){e.exports=require("lodash/isString")},function(e,t){e.exports=require("lodash/pick")},function(e,t){e.exports=require("qs")},function(e,t,r){e.exports=r(20)}]);
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=54)}([function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t){e.exports=require("babel-runtime/core-js/object/assign")},function(e,t){e.exports=require("babel-runtime/helpers/typeof")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.openapi;return!!t&&(0,k.default)(t,"3")}function u(e){var t=e.swagger;return!!t&&(0,k.default)(t,"2")}function o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e&&"object"===(void 0===e?"undefined":(0,g.default)(e))?(e.operationId||"").replace(/\s/g,"").length?_(e.operationId):i(t,r):null}function i(e,t){return""+q(t)+_(e)}function s(e,t){return q(t)+"-"+e}function l(e,t){return e&&e.paths?c(e,function(e){var r=e.pathName,n=e.method,a=e.operation;if(!a||"object"!==(void 0===a?"undefined":(0,g.default)(a)))return!1;var u=a.operationId;return[o(a,r,n),s(r,n),u].some(function(e){return e&&e===t})}):null}function c(e,t){return f(e,t,!0)||null}function f(e,t,r){if(!e||"object"!==(void 0===e?"undefined":(0,g.default)(e))||!e.paths||"object"!==(0,g.default)(e.paths))return null;var n=e.paths;for(var a in n)for(var u in n[a])if("PARAMETERS"!==u.toUpperCase()){var o=n[a][u];if(o&&"object"===(void 0===o?"undefined":(0,g.default)(o))){var i={spec:e,pathName:a,method:u.toUpperCase(),operation:o},s=t(i);if(r&&s)return i}}}function d(e){var t=e.spec,r=t.paths,n={};if(!r)return e;for(var a in r){var u=r[a];if((0,x.default)(u)){var i=u.parameters;for(var s in u){(function(e){var r=u[e];if(!(0,x.default)(r))return"continue";var s=o(r,a,e);if(s&&(n[s]?n[s].push(r):n[s]=[r],(0,y.default)(n).forEach(function(e){if(n[e].length>1)n[e].forEach(function(t,r){t.__originalOperationId=t.__originalOperationId||t.operationId,t.operationId=""+e+(r+1)});else if(void 0!==r.operationId){var t=n[e][0];t.__originalOperationId=t.__originalOperationId||r.operationId,t.operationId=e}})),"parameters"!==e){var l=[],c={};for(var f in t)"produces"!==f&&"consumes"!==f&&"security"!==f||(c[f]=t[f],l.push(c));if(i&&(c.parameters=i,l.push(c)),l.length){var d=!0,p=!1,v=void 0;try{for(var m,g=(0,h.default)(l);!(d=(m=g.next()).done);d=!0){var b=m.value;for(var P in b)if(r[P]){if("parameters"===P){var k=!0,q=!1,_=void 0;try{for(var w,O=(0,h.default)(b[P]);!(k=(w=O.next()).done);k=!0)!function(){var e=w.value;r[P].some(function(t){return t.name===e.name})||r[P].push(e)}()}catch(e){q=!0,_=e}finally{try{!k&&O.return&&O.return()}finally{if(q)throw _}}}}else r[P]=b[P]}}catch(e){p=!0,v=e}finally{try{!d&&g.return&&g.return()}finally{if(p)throw v}}}}})(s)}}}return e}Object.defineProperty(t,"__esModule",{value:!0});var p=r(12),h=n(p),v=r(0),y=n(v),m=r(2),g=n(m);t.isOAS3=a,t.isSwagger2=u,t.opId=o,t.idFromPathMethod=i,t.legacyIdFromPathMethod=s,t.getOperationRaw=l,t.findOperation=c,t.eachOperation=f,t.normalizeSwagger=d;var b=r(49),x=n(b),P=r(18),k=n(P),q=function(e){return String.prototype.toLowerCase.call(e)},_=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,b.default)(e))&&(t=e,e=t.url),t.headers=t.headers||{},O.mergeInQueryOrForm(t),t.requestInterceptor&&(t=t.requestInterceptor(t)||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]),(t.userFetch||fetch)(t.url,t).then(function(r){var n=O.serializeRes(r,e,t).then(function(e){return t.responseInterceptor&&(e=t.responseInterceptor(e)||e),e});if(!r.ok){var a=new Error(r.statusText);return a.statusCode=a.status=r.status,n.then(function(e){throw a.response=e,a},function(e){throw a.responseError=e,a})}return n})}function u(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.loadSpec,a=void 0!==n&&n,u={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:o(e.headers)},i=a||A(u.headers["content-type"]);return(i?e.text:e.blob||e.buffer).call(e).then(function(e){if(u.text=e,u.data=e,i)try{var t=q.default.safeLoad(e);u.body=t,u.obj=t}catch(e){u.parseError=e}return u})}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,r){void 0!==t[r]?(t[r]=Array.isArray(t[r])?t[r]:[t[r]],t[r].push(e)):t[r]=e}),t):t}function i(e){return"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,b.default)(e))&&"function"==typeof e.pipe}function s(e,t){var r=e.value,n=e.collectionFormat,a=e.allowEmptyValue,u={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};if(void 0===r&&a)return"";if(i(r)||"boolean"==typeof r)return r;var o=encodeURIComponent;return t&&(o=(0,w.default)(r)?function(e){return e}:function(e){return(0,m.default)(e)}),r&&!Array.isArray(r)?o(r):Array.isArray(r)&&!n?r.map(o).join(","):"multi"===n?r.map(o):r.map(o).join(u[n])}function l(e){var t=(0,v.default)(e).reduce(function(t,r){var n=e[r],a=!!n.skipEncoding,u=a?r:encodeURIComponent(r),o=function(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}(n)&&!Array.isArray(n);return t[u]=s(o?n:{value:n},a),t},{});return P.default.stringify(t,{encode:!1,indices:!1})||""}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,a=e.query,u=e.form;if(u){var o=(0,v.default)(u).some(function(e){return i(u[e].value)}),c=e.headers["content-type"]||e.headers["Content-Type"];if(o||/multipart\/form-data/i.test(c)){var f=r(44);e.body=new f,(0,v.default)(u).forEach(function(t){e.body.append(t,s(u[t],!0))})}else e.body=l(u);delete e.form}if(a){var d=n.split("?"),h=(0,p.default)(d,2),y=h[0],m=h[1],g="";if(m){var b=P.default.parse(m);(0,v.default)(a).forEach(function(e){return delete b[e]}),g=P.default.stringify(b,{encode:!0})}var x=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(function(e){return e}).join("&");return n?"?"+n:""}(g,l(a));e.url=y+x,delete e.query}return e}function f(e,t,r){return r=r||function(e){return e},t=t||function(e){return e},function(n){return"string"==typeof n&&(n={url:n}),O.mergeInQueryOrForm(n),n=t(n),r(e(n))}}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldDownloadAsText=t.self=void 0;var d=r(37),p=n(d),h=r(0),v=n(h),y=r(8),m=n(y),g=r(2),b=n(g);t.default=a,t.serializeRes=u,t.serializeHeaders=o,t.encodeFormOrQuery=l,t.mergeInQueryOrForm=c,t.makeHttp=f,r(41);var x=r(53),P=n(x),k=r(45),q=n(k),_=r(51),w=n(_),O=t.self={serializeRes:u,mergeInQueryOrForm:c},A=t.shouldDownloadAsText=function(){return/json|xml|yaml|text/.test(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r){if(r=r||{},t=(0,V.default)({},t,{path:t.path&&u(t.path)}),"merge"===t.op){var n=i(t.path);$.default.apply(e,[n]),(0,V.default)(n.value,t.value)}else if("mergeDeep"===t.op){var a=i(t.path);$.default.apply(e,[a]);var o=(0,V.default)({},a.value);(0,G.default)(a.value,t.value);for(var s in t.value)if(Object.prototype.hasOwnProperty.call(t.value,s)){var l=t.value[s];if(Array.isArray(l)){var c=o[s]||[];a.value[s]=c.concat(l)}}}else if($.default.apply(e,[t]),r.allowMetaPatches&&t.meta&&I(t)&&(Array.isArray(t.value)||_(t.value))){var f=i(t.path);$.default.apply(e,[f]),(0,V.default)(f.value,t.meta)}return e}function u(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function o(e,t){return{op:"add",path:e,value:t}}function i(e){return{op:"_get",path:e}}function s(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function l(e,t){return{op:"remove",path:e}}function c(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function f(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function d(e,t){return{type:"context",path:e,value:t}}function p(e,t){try{return v(e,m,t)}catch(e){return e}}function h(e,t){try{return v(e,y,t)}catch(e){return e}}function v(e,t,r){return q(k(e.filter(I).map(function(e){return t(e.value,r,e.path)})||[]))}function y(e,t,r){return r=r||[],Array.isArray(e)?e.map(function(e,n){return y(e,t,r.concat(n))}):_(e)?(0,N.default)(e).map(function(n){return y(e[n],t,r.concat(n))}):t(e,r[r.length-1],r)}function m(e,t,r){r=r||[];var n=[];if(r.length>0){var a=t(e,r[r.length-1],r);a&&(n=n.concat(a))}if(Array.isArray(e)){var u=e.map(function(e,n){return m(e,t,r.concat(n))});u&&(n=n.concat(u))}else if(_(e)){var o=(0,N.default)(e).map(function(n){return m(e[n],t,r.concat(n))});o&&(n=n.concat(o))}return n=k(n)}function g(e,t){if(!Array.isArray(t))return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function b(e,t){return t.reduce(function(e,t){return void 0!==t&&e?e[t]:e},e)}function x(e){return q(k(P(e)))}function P(e){return Array.isArray(e)?e:[e]}function k(e){var t;return(t=[]).concat.apply(t,(0,S.default)(e.map(function(e){return Array.isArray(e)?k(e):e})))}function q(e){return e.filter(function(e){return void 0!==e})}function _(e){return e&&"object"===(void 0===e?"undefined":(0,F.default)(e))}function w(e){return _(e)&&O(e.then)}function O(e){return e&&"function"==typeof e}function A(e){return e instanceof Error}function j(e){if(T(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function M(e){return B.default.isGeneratorFunction(e)}function E(e){return j(e)||T(e)&&"mutation"===e.type}function I(e){return E(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function C(e){return T(e)&&"context"===e.type}function T(e){return e&&"object"===(void 0===e?"undefined":(0,F.default)(e))}Object.defineProperty(t,"__esModule",{value:!0});var R=r(2),F=n(R),D=r(38),S=n(D),z=r(0),N=n(z),H=r(1),V=n(H),U=r(43),$=n(U),L=r(16),B=n(L),J=r(42),G=n(J);t.default={add:o,replace:s,remove:l,merge:c,mergeDeep:f,context:d,getIn:b,applyPatch:a,parentPathMatch:g,flatten:k,fullyNormalizeArray:x,normalizeArray:P,isPromise:w,forEachNew:p,forEachNewPrimitive:h,isJsonPatch:j,isContextPatch:C,isPatch:T,isMutation:E,isAdditiveMutation:I,isGenerator:M,isFunction:O,isObject:_,isError:A}},function(e,t){e.exports=require("babel-runtime/helpers/extends")},function(e,t){e.exports=require("lodash/assign")},function(e,t){e.exports=require("babel-runtime/core-js/json/stringify")},function(e,t){e.exports=require("btoa")},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";function n(e,t){function r(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];this.message=r[0],t&&t.apply(this,r)}return r.prototype=new Error,r.prototype.name=e,r.prototype.constructor=r,r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){e.exports=require("babel-runtime/core-js/get-iterator")},function(e,t){e.exports=require("babel-runtime/core-js/promise")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/regenerator")},function(e,t){e.exports=require("lodash/get")},function(e,t){e.exports=require("lodash/startsWith")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?r.url=e:r=e,!(this instanceof a))return new a(r);(0,l.default)(this,r);var n=this.resolve().then(function(){return t.disableInterfaces||(0,l.default)(t,a.makeApisTagOperation(t)),t});return n.client=this,n}var u=r(6),o=n(u),i=r(46),s=(n(i),r(7)),l=n(s),c=r(18),f=n(c),d=r(10),p=n(d),h=r(4),v=n(h),y=r(27),m=n(y),g=r(26),b=r(20),x=r(3);a.http=v.default,a.makeHttp=h.makeHttp.bind(null,a.http),a.resolve=m.default,a.execute=b.execute,a.serializeRes=h.serializeRes,a.serializeHeaders=h.serializeHeaders,a.clearCache=y.clearCache,a.parameterBuilders=b.PARAMETER_BUILDERS,a.makeApisTagOperation=g.makeApisTagOperation,a.buildRequest=b.buildRequest,a.helpers={opId:x.opId},e.exports=a,a.prototype={http:v.default,execute:function(e){return this.applyDefaults(),a.execute((0,o.default)({spec:this.spec,http:this.http.bind(this),securities:{authorized:this.authorizations}},e))},resolve:function(){var e=this;return a.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},a.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&(0,f.default)(t,"http")){var r=p.default.parse(t);e.host||(e.host=r.host),e.schemes||(e.schemes=[r.protocol.replace(":","")]),e.basePath||(e.basePath="/")}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.http,r=e.fetch,n=e.spec,a=e.operationId,u=e.pathName,o=e.method,i=e.parameters,s=e.securities,l=(0,g.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]);t=t||r||T.default,u&&o&&!a&&(a=(0,L.legacyIdFromPathMethod)(u,o));var c=Q.buildRequest((0,y.default)({spec:n,operationId:a,parameters:i,securities:s},l));return c.body&&((0,_.default)(c.body)||(0,O.default)(c.body))&&(c.body=(0,h.default)(c.body)),t(c)}function u(e){var t=e.spec,r=e.operationId,n=(e.securities,e.requestContentType,e.responseContentType),a=e.scheme,u=e.requestInterceptor,i=e.responseInterceptor,s=e.contextUrl,l=e.userFetch,c=(e.requestBody,e.server),f=e.serverVariables,p=e.parameters,h=e.parameterBuilders,v=(0,L.isOAS3)(t);h||(h=v?N.default:S.default);var m={url:o({spec:t,scheme:a,contextUrl:s,server:c,serverVariables:f}),credentials:"same-origin",headers:{},cookies:{}};if(u&&(m.requestInterceptor=u),i&&(m.responseInterceptor=i),l&&(m.userFetch=l),!r)return delete m.cookies,m;var g=(0,L.getOperationRaw)(t,r);if(!g)throw new J("Operation "+r+" not found");var b=g.operation,x=void 0===b?{}:b,P=g.method,k=g.pathName;m.url+=k,m.method=(""+P).toUpperCase(),p=p||{};var q=t.paths[k]||{};n&&(m.headers.accept=n);var _=[].concat(B(x.parameters)).concat(B(q.parameters));_.forEach(function(e){var r=h[e.in],n=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(n=p),n=e&&e.name&&p[e.name],void 0===n?n=e&&e.name&&p[e.in+"."+e.name]:G(e.name,_).length>1&&console.warn("Parameter '"+e.name+"' is ambiguous because the defined spec has more than one parameter with the name: '"+e.name+"' and the passed-in parameter values did not define an 'in' value."),void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");r&&r({req:m,parameter:e,value:n,operation:x,spec:t})});var w=(0,y.default)({},e,{operation:x});if(m=v?(0,V.default)(w,m):(0,$.default)(w,m),m.cookies&&(0,d.default)(m.cookies).length){var O=(0,d.default)(m.cookies).reduce(function(e,t){var r=m.cookies[t];return e+(e?"&":"")+I.default.serialize(t,r)},"");m.headers.Cookie=O}return m.cookies&&delete m.cookies,(0,C.mergeInQueryOrForm)(m),m}function o(e){return(0,L.isOAS3)(e.spec)?i(e):c(e)}function i(e){var t=e.spec,r=e.server,n=e.contextUrl,a=e.serverVariables,u=void 0===a?{}:a,o=t.servers,i="",c=null;if(r&&o){var f=o.map(function(e){return e.url});f.indexOf(r)>-1&&(i=r,c=o[f.indexOf(r)])}if(!i&&o&&(i=o[0].url,c=o[0]),i.indexOf("{")>-1){l(i).forEach(function(e){if(c.variables&&c.variables[e]){var t=c.variables[e],r=u[e]||t.default,n=new RegExp("{"+e+"}","g");i=i.replace(n,r)}})}return s(i,n)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=M.default.parse(e),n=M.default.parse(t),a=W(r.protocol)||W(n.protocol)||"",u=r.host||n.host,o=r.pathname||"",i=void 0;return i=a&&u?a+"://"+(u+o):o,"/"===i[i.length-1]?i.slice(0,-1):i}function l(e){for(var t=[],r=/{([^}]+)}/g,n=void 0;n=r.exec(e);)t.push(n[1]);return t}function c(e){var t=e.spec,r=e.scheme,n=e.contextUrl,a=void 0===n?"":n,u=M.default.parse(a),o=Array.isArray(t.schemes)?t.schemes[0]:null,i=r||o||W(u.protocol)||"http",s=t.host||u.host||"",l=t.basePath||"",c=void 0;return c=i&&s?i+"://"+(s+l):l,"/"===c[c.length-1]?c.slice(0,-1):c}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var f=r(0),d=n(f),p=r(8),h=n(p),v=r(6),y=n(v),m=r(36),g=n(m),b=r(1),x=n(b);t.execute=a,t.buildRequest=u,t.baseUrl=o;var P=r(7),k=(n(P),r(17)),q=(n(k),r(50)),_=n(q),w=r(48),O=n(w),A=r(9),j=(n(A),r(10)),M=n(j),E=r(39),I=n(E),C=r(4),T=n(C),R=r(11),F=n(R),D=r(25),S=n(D),z=r(22),N=n(z),H=r(21),V=n(H),U=r(24),$=n(U),L=r(3),B=function(e){return Array.isArray(e)?e:[]},J=(0,F.default)("OperationNotFoundError",function(e,t,r){this.originalError=r,(0,x.default)(this,t||{})}),G=function(e,t){return t.filter(function(t){return t.name===e})},Q=t.self={buildRequest:u},W=function(e){return e?e.replace(/\W/g,""):null}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,o=e.spec,i=(0,c.default)({},t),l=n.authorized,f=void 0===l?{}:l,p=u.security||o.security||[],v=f&&!!(0,s.default)(f).length,y=(0,d.default)(o,["components","securitySchemes"])||{};return i.headers=i.headers||{},i.query=i.query||{},(0,s.default)(n).length&&v&&p&&(!Array.isArray(u.security)||u.security.length)?(p.forEach(function(e,t){for(var r in e){var n=f[r],a=y[r];if(n){var u=n.value||n,o=a.type;if(n)if("apiKey"===o)"query"===a.in&&(i.query[a.name]=u),"header"===a.in&&(i.headers[a.name]=u),"cookie"===a.in&&(i.cookies[a.name]=u);else if("http"===o){if("basic"===a.scheme){var s=u.username,l=u.password,c=(0,h.default)(s+":"+l);i.headers.Authorization="Basic "+c}"bearer"===a.scheme&&(i.headers.Authorization="Bearer "+u)}else if("oauth2"===o){var d=n.token||{},p=d.access_token,v=d.token_type;v&&"bearer"!==v.toLowerCase()||(v="Bearer"),i.headers.Authorization=v+" "+p}}}}),i):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(2),o=n(u),i=r(0),s=n(i);t.default=function(e,t){var r=e.operation,n=e.requestBody,u=e.securities,i=e.spec,l=e.requestContentType;t=a({request:t,securities:u,operation:r,spec:i});var c=r.requestBody||{},f=(0,s.default)(c.content||{});if(n){var d=l&&f.indexOf(l)>-1;if(l&&d)t.headers["Content-Type"]=l;else if(!l){var p=f[0];p&&(t.headers["Content-Type"]=p,l=p)}}return n&&(l?f.indexOf(l)>-1&&("application/x-www-form-urlencoded"===l?"object"===(void 0===n?"undefined":(0,o.default)(n))?(t.form={},(0,s.default)(n).forEach(function(e){var r=n[e];t.form[e]={value:r}})):t.form=n:t.body=n):t.body=n),t},t.applySecurities=a;var l=r(7),c=n(l),f=r(17),d=n(f),p=r(9),h=n(p)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.req,r=e.value,n=e.parameter,a=n.name,u=n.style,o=n.explode,i=(0,p.default)({key:n.name,value:r,style:u||"simple",explode:o||!1,escape:!n.allowReserved});t.url=t.url.replace("{"+a+"}",i)}function u(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&(r="false"),0===r&&(r="0"),r){var a=void 0===r?"undefined":(0,f.default)(r);if("deepObject"===n.style){(0,l.default)(r).forEach(function(e){var a=r[e];t.query[n.name+"["+e+"]"]={value:(0,p.default)({key:e,value:a,style:"deepObject",escape:!n.allowReserved}),skipEncoding:!0}})}else if("object"!==a||Array.isArray(r)||"form"!==n.style&&n.style||!n.explode&&void 0!==n.explode)t.query[n.name]={value:(0,p.default)({key:n.name,value:r,style:n.style||"form",explode:void 0===n.explode||n.explode,escape:!n.allowReserved}),skipEncoding:!0};else{var u=(0,l.default)(r);u.forEach(function(e){var a=r[e];t.query[e]={value:(0,p.default)({key:e,value:a,style:n.style||"form",escape:!n.allowReserved})}})}}else if(n.allowEmptyValue){var o=n.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}}function o(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},h.indexOf(r.name.toLowerCase())>-1||void 0!==n&&(t.headers[r.name]=(0,p.default)({key:r.name,value:n,style:r.style||"simple",explode:void 0!==r.explode&&r.explode,escape:!r.allowReserved}))}function i(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{};var a=void 0===n?"undefined":(0,f.default)(n);if("undefined"!==a){var u="object"===a&&!Array.isArray(n)&&r.explode?"":r.name+"=";t.headers.Cookie=u+(0,p.default)({key:r.name,value:n,escape:!1,style:r.style||"form",explode:void 0!==r.explode&&r.explode})}}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),l=n(s),c=r(2),f=n(c),d=r(23),p=n(d);t.default={path:a,query:u,header:o,cookie:i};var h=["accept","authorization","content-type"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.key,r=e.value,n=e.style,a=e.explode,u=e.escape;if("simple"===n)return r.join(",");if("label"===n)return"."+r.join(".");if("matrix"===n)return r.reduce(function(e,r){return!e||a?(e||"")+";"+t+"="+r:e+","+r},"");if("form"===n){var o=u?f(","):",",i=a?"&"+t+"=":o;return r.join(i)}if("spaceDelimited"===n){var s=a?t+"=":"";return r.join(""+f(" ")+s)}if("pipeDelimited"===n){var l=a?t+"=":"",c=u?f("|"):"|";return r.join(""+c+l)}}function u(e){var t=e.key,r=e.value,n=e.style,a=e.explode,u=(0,s.default)(r);return"simple"===n?u.reduce(function(e,t){var n=r[t],u=a?"=":",";return(e?e+",":"")+t+u+n},""):"label"===n?u.reduce(function(e,t){var n=r[t],u=a?"=":".";return(e?e+".":".")+t+u+n},""):"matrix"===n&&a?u.reduce(function(e,t){var n=r[t];return(e?e+";":";")+t+"="+n},""):"matrix"===n?u.reduce(function(e,n){var a=r[n];return(e?e+",":";"+t+"=")+n+","+a},""):"form"===n?u.reduce(function(e,t){var n=r[t];return(e?e+(a?"&":","):"")+t+(a?"=":",")+n},""):void 0}function o(e){var t=e.key,r=e.value,n=e.style;e.explode;return"simple"===n?r:"label"===n?"."+r:"matrix"===n?";"+t+"="+r:"form"===n?r:"deepObject"===n?r:void 0}Object.defineProperty(t,"__esModule",{value:!0});var i=r(0),s=n(i),l=r(2),c=n(l);t.default=function(e){var t=e.value;return Array.isArray(t)?a(e):"object"===(void 0===t?"undefined":(0,c.default)(t))?u(e):o(e)};var f=function(e){return encodeURIComponent(e)}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,i=e.spec,l=(0,c.default)({},t),f=n.authorized,d=void 0===f?{}:f,p=n.specSecurity,h=void 0===p?[]:p,v=u.security||h,y=d&&!!(0,o.default)(d).length,m=i.securityDefinitions;return l.headers=l.headers||{},l.query=l.query||{},(0,o.default)(n).length&&y&&v&&(!Array.isArray(u.security)||u.security.length)?(v.forEach(function(e,t){for(var r in e){var n=d[r];if(n){var a=n.token,u=n.value||n,o=m[r],i=o.type,c=a&&a.access_token,f=a&&a.token_type;if(n)if("apiKey"===i){var p="query"===o.in?"query":"headers";l[p]=l[p]||{},l[p][o.name]=u}else"basic"===i?u.header?l.headers.authorization=u.header:(u.base64=(0,s.default)(u.username+":"+u.password),l.headers.authorization="Basic "+u.base64):"oauth2"===i&&c&&(f=f&&"bearer"!==f.toLowerCase()?f:"Bearer",l.headers.authorization=f+" "+c)}}}),l):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(0),o=n(u);t.default=function(e,t){var r=e.spec,n=e.operation,u=e.securities,o=e.requestContentType;return t=a({request:t,securities:u,operation:n,spec:r}),(t.body||t.form)&&(o?t.headers["Content-Type"]=o:Array.isArray(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:Array.isArray(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:n.parameters&&n.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded")),t},t.applySecurities=a;var i=r(9),s=n(i),l=r(7),c=n(l),f=r(4);n(f)},function(e,t,r){"use strict";function n(e){var t=e.req,r=e.value;t.body=r}function a(e){var t=e.req,r=e.value,n=e.parameter;t.form=t.form||{},(r||n.allowEmptyValue)&&(t.form[n.name]={value:r,allowEmptyValue:n.allowEmptyValue,collectionFormat:n.collectionFormat})}function u(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},void 0!==n&&(t.headers[r.name]=n)}function o(e){var t=e.req,r=e.value,n=e.parameter;t.url=t.url.replace("{"+n.name+"}",encodeURIComponent(r))}function i(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&"boolean"===n.type&&(r="false"),0===r&&["number","integer"].indexOf(n.type)>-1&&(r="0"),r)t.query[n.name]={collectionFormat:n.collectionFormat,value:r};else if(n.allowEmptyValue){var a=n.name;t.query[a]=t.query[a]||{},t.query[a].allowEmptyValue=!0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default={body:n,header:u,query:i,path:o,formData:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.pathName,n=t.method,a=t.operationId;return function(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,l.default)({spec:e.spec},(0,f.default)(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:r,method:n,parameters:t,operationId:a},u))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e),r=v.mapTagOperations({spec:e.spec,cb:t}),n={};for(var a in r){n[a]={operations:{}};for(var u in r[a])n[a].operations[u]={execute:r[a][u]}}return{apis:n}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e);return{apis:v.mapTagOperations({spec:e.spec,cb:t})}}function i(e){var t=e.spec,r=e.cb,n=void 0===r?p:r,a=e.defaultTag,u=void 0===a?"default":a,o={},i={};return(0,d.eachOperation)(t,function(e){var r=e.pathName,a=e.method,s=e.operation;(s.tags?h(s.tags):[u]).forEach(function(e){if("string"==typeof e){var u=i[e]=i[e]||{},l=(0,d.opId)(s,r,a),c=n({spec:t,pathName:r,method:a,operation:s,operationId:l});if(o[l])o[l]++,u[""+l+o[l]]=c;else if(void 0!==u[l]){var f=o[l]||1;o[l]=f+1,u[""+l+o[l]]=c;var p=u[l];delete u[l],u[""+l+f]=p}else u[l]=c}})}),i}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var s=r(6),l=n(s);t.makeExecute=a,t.makeApisTagOperationsOperationExecute=u,t.makeApisTagOperation=o,t.mapTagOperations=i;var c=r(52),f=n(c),d=r(3),p=function(){return null},h=function(e){return Array.isArray(e)?e:[e]},v=t.self={mapTagOperations:i,makeExecute:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requestInterceptor,n=t.responseInterceptor;return function(t){return e({url:t,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.body})}}function u(){l.plugins.refs.clearCache()}function o(e){function t(e){g&&(l.plugins.refs.docCache[g]=e),l.plugins.refs.fetchJSON=a(m,{requestInterceptor:v,responseInterceptor:y});var t=[l.plugins.refs];return"function"==typeof h&&t.push(l.plugins.parameters),"function"==typeof p&&t.push(l.plugins.properties),"strict"!==o&&t.push(l.plugins.allOf),(0,c.default)({spec:e,context:{baseDoc:g},plugins:t,allowMetaPatches:d,parameterMacro:h,modelPropertyMacro:p}).then(f.normalizeSwagger)}var r=e.fetch,n=e.spec,u=e.url,o=e.mode,i=e.allowMetaPatches,d=void 0===i||i,p=e.modelPropertyMacro,h=e.parameterMacro,v=e.requestInterceptor,y=e.responseInterceptor,m=e.http,g=e.baseDoc;return g=g||u,m=r||m||s.default,n?t(n):a(m,{requestInterceptor:v,responseInterceptor:y})(g).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.makeFetchJSON=a,t.clearCache=u,t.default=o;var i=r(4),s=n(i),l=r(28),c=n(l),f=r(3)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return new S(e).dispatch()}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var u=r(8),o=n(u),i=r(13),s=n(i),l=r(16),c=n(l),f=r(0),d=n(f),p=r(12),h=n(p),v=r(34),y=n(v),m=r(1),g=n(m),b=r(14),x=n(b),P=r(15),k=n(P);t.default=a;var q=r(47),_=n(q),w=r(5),O=n(w),A=r(33),j=n(A),M=r(29),E=n(M),I=r(31),C=n(I),T=r(32),R=n(T),F=r(30),D=n(F),S=function(){function e(t){(0,x.default)(this,e),(0,g.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new D.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,g.default)((0,y.default)(this),O.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(O.default.isFunction),this.patches.push(O.default.add([],this.spec)),this.patches.push(O.default.context([],this.context)),this.updatePatches(this.patches)}return(0,k.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,n)}}},{key:"verbose",value:function(e){if("verbose"===this.debugLevel){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,["["+e+"] "].concat(n))}}},{key:"wrapPlugin",value:function(e,t){var r=null,n=void 0;return e[this.pluginProp]?(r=e,n=e[this.pluginProp]):O.default.isFunction(e)?n=e:O.default.isObject(e)&&(n=function(e){return c.default.mark(function t(r,n){var a,u,o,i,s,l,f,p;return c.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:p=function t(r,u,o){var i,s,l,f,p,v,y,m,g,b,x,P;return c.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(O.default.isObject(r)){a.next=6;break}if(e.key!==u[u.length-1]){a.next=4;break}return a.next=4,e.plugin(r,e.key,u,n);case 4:a.next=41;break;case 6:i=u.length-1,s=u[i],l=u.indexOf("properties"),f="properties"===s&&i===l,p=!0,v=!1,y=void 0,a.prev=13,m=(0,h.default)((0,d.default)(r));case 15:if(p=(g=m.next()).done){a.next=27;break}if(b=g.value,x=r[b],P=u.concat(b),!O.default.isObject(x)){a.next=21;break}return a.delegateYield(t(x,P,o),"t0",21);case 21:if(f||b!==e.key){a.next=24;break}return a.next=24,e.plugin(x,b,P,n,o);case 24:p=!0,a.next=15;break;case 27:a.next=33;break;case 29:a.prev=29,a.t1=a.catch(13),v=!0,y=a.t1;case 33:a.prev=33,a.prev=34,!p&&m.return&&m.return();case 36:if(a.prev=36,!v){a.next=39;break}throw y;case 39:return a.finish(36);case 40:return a.finish(33);case 41:case"end":return a.stop()}},a,this,[[13,29,33,41],[34,,36,40]])},a=c.default.mark(p),u=!0,o=!1,i=void 0,t.prev=5,s=(0,h.default)(r.filter(O.default.isAdditiveMutation));case 7:if(u=(l=s.next()).done){t.next=13;break}return f=l.value,t.delegateYield(p(f.value,f.path,f),"t0",10);case 10:u=!0,t.next=7;break;case 13:t.next=19;break;case 15:t.prev=15,t.t1=t.catch(5),o=!0,i=t.t1;case 19:t.prev=19,t.prev=20,!u&&s.return&&s.return();case 22:if(t.prev=22,!o){t.next=25;break}throw i;case 25:return t.finish(22);case 26:return t.finish(19);case 27:case"end":return t.stop()}},t,this,[[5,15,19,27],[20,,22,26]])})}(e)),(0,g.default)(n.bind(r),{pluginName:e.name||t,isGenerator:O.default.isGenerator(n)})}},{key:"nextPlugin",value:function(){var e=this;return(0,_.default)(this.wrappedPlugins,function(t){return e.getMutationsForPlugin(t).length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return s.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var r=this.getPluginName(e);(this.pluginHistory[r]=this.pluginHistory[r]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var r=this;O.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)return void r.errors.push(e);try{if(!O.default.isObject(e))return void r.debug("updatePatches","Got a non-object patch",e);if(r.showDebug&&r.allPatches.push(e),O.default.isPromise(e.value))return r.promisedPatches.push(e),void r.promisedPatchThen(e);if(O.default.isContextPatch(e))return void r.setContext(e.path,e.value);if(O.default.isMutation(e))return void r.updateMutations(e)}catch(e){r.errors.push(e)}})}},{key:"updateMutations",value:function(e){O.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches})&&this.mutations.push(e)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);if(t<0)return void this.debug("Tried to remove a promisedPatch that isn't there!");this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(r){var n=(0,g.default)({},e,{value:r});t.removePromisedPatch(e),t.updatePatches(n)}).catch(function(r){t.removePromisedPatch(e),t.updatePatches(r)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return O.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,o.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=O.default.fullyNormalizeArray(e),r.updatePatches(e,n))}var t=this,r=this,n=this.nextPlugin();if(!n){var a=this.nextPromisedPatch();if(a)return a.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var u={spec:this.state,errors:this.errors};return this.showDebug&&(u.patches=this.allPatches),s.default.resolve(u)}if(r.pluginCount=r.pluginCount||{},r.pluginCount[n]=(r.pluginCount[n]||0)+1,r.pluginCount[n]>100)return s.default.resolve({spec:r.state,errors:r.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(n!==this.currentPlugin&&this.promisedPatches.length){var o=this.promisedPatches.map(function(e){return e.value});return s.default.all(o.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){r.currentPlugin=n;var t=r.getCurrentMutations(),a=r.mutations.length-1;try{if(n.isGenerator){var u=!0,o=!1,i=void 0;try{for(var s,l=(0,h.default)(n(t,r.getLib()));!(u=(s=l.next()).done);u=!0){e(s.value)}}catch(e){o=!0,i=e}finally{try{!u&&l.return&&l.return()}finally{if(o)throw i}}}else{e(n(t,r.getLib()))}}catch(t){e([(0,g.default)((0,y.default)(t),{plugin:n})])}finally{r.updatePluginHistory(n,{mutationIndex:a})}return r.dispatch()}()}}]),e}(),z={refs:j.default,allOf:E.default,parameters:C.default,properties:R.default};t.SpecMap=S,t.plugins=z},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),a=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={key:"allOf",plugin:function(e,t,r,n,u){if(!u.meta||!u.meta.$$ref){if(!Array.isArray(e)){var o=new TypeError("allOf must be an array");return o.fullPath=r,o}var i=r.slice(0,-1),s=!1,l=u.value;i.forEach(function(e){l=l[e]}),l=(0,a.default)({},l),delete l.allOf;var c=[n.replace(i,{})].concat(e.map(function(e,t){if(!n.isObject(e)){if(s)return null;s=!0;var a=new TypeError("Elements in allOf must be objects");return a.fullPath=r,a}return n.mergeDeep(i,e)}));return c.push(n.mergeDeep(i,l)),l.$$ref||c.push(n.remove([].concat(i,"$$ref"))),c}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return u({children:{}},e,t)}function u(e,t,r){return e.value=t||{},e.protoValue=r?(0,l.default)({},r.protoValue,e.value):e.value,(0,i.default)(e.children).forEach(function(t){var r=e.children[t];e.children[t]=u(r,r.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=n(o),s=r(6),l=n(s),c=r(14),f=n(c),d=r(15),p=n(d),h=function(){function e(t){(0,f.default)(this,e),this.root=a(t||{})}return(0,p.default)(e,[{key:"set",value:function(e,t){var r=this.getParent(e,!0);if(!r)return void u(this.root,t,null);var n=e[e.length-1],o=r.children;if(o[n])return void u(o[n],t,r);o[n]=a(t,r)}},{key:"get",value:function(e){if(e=e||[],e.length<1)return this.root.value;for(var t=this.root,r=void 0,n=void 0,a=0;a<e.length&&(n=e[a],r=t.children,r[n]);a++)t=r[n];return t&&t.protoValue}},{key:"getParent",value:function(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(function(e,r){if(!e)return e;var n=e.children;return!n[r]&&t&&(n[r]=a(null,e)),n[r]},this.root)}}]),e}();t.default=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"parameters",plugin:function(e,t,r,n,a){if(Array.isArray(e)&&e.length){var o=(0,u.default)([],e),s=r.slice(0,-1),l=(0,u.default)({},i.default.getIn(n.spec,s));return e.forEach(function(e,t){try{o[t].default=n.parameterMacro(l,e)}catch(e){var a=new Error(e);return a.fullPath=r,a}}),i.default.replace(r,o)}return i.default.replace(r,e)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"properties",plugin:function(e,t,r,n){var a=(0,u.default)({},e);for(var o in e)try{a[o].default=n.modelPropertyMacro(a[o])}catch(e){var s=new Error(e);return s.fullPath=r,s}return i.default.replace(r,a)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!D.test(e)){if(!t)throw new S("Tried to resolve a relative URL, without having a basePath. path: '"+e+"' basePath: '"+t+"'");return I.default.resolve(t,e)}return e}function u(e,t){return new S("Could not resolve reference because of: "+e.message,t,e)}function o(e){return(e+"").split("#")}function i(e,t){var r=z[e];if(r&&!T.default.isPromise(r))try{var n=f(t,r);return(0,j.default)(_.default.resolve(n),{__value:n})}catch(e){return _.default.reject(e)}return l(e).then(function(e){return f(t,e)})}function s(e){void 0!==e?delete z[e]:(0,k.default)(z).forEach(function(e){delete z[e]})}function l(e){var t=z[e];return t?T.default.isPromise(t)?t:_.default.resolve(t):(z[e]=V.fetchJSON(e).then(function(t){return z[e]=t,t}),z[e])}function c(e){return(0,M.fetch)(e,{headers:{Accept:"application/json"},loadSpec:!0}).then(function(e){return e.json()})}function f(e,t){var r=d(e);if(r.length<1)return t;var n=T.default.getIn(t,r);if(void 0===n)throw new S("Could not resolve pointer: "+e+" does not exist in document",{pointer:e});return n}function d(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+(void 0===e?"undefined":(0,x.default)(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(p)}function p(e){return"string"!=typeof e?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}function h(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function v(e){return 0===e.length?"":"/"+e.map(h).join("/")}function y(e,t){if(U(t))return!0;var r=e.charAt(t.length);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)}function m(e,t,r,n){var a=N.get(n);a||(a={},N.set(n,a));var u=v(r),o=(t||"<specmap-base>")+"#"+e;if(t==n.contextTree.get([]).baseDoc&&y(u,e))return!0;var i="";if(r.some(function(e){return i=i+"/"+h(e),a[i]&&a[i].some(function(e){return y(e,o)||y(o,e)})}))return!0;a[u]=(a[u]||[]).concat(o)}function g(e,t){function r(e){return T.default.isObject(e)&&(n.indexOf(e)>=0||(0,k.default)(e).some(function(t){return r(e[t])}))}var n=[e];return t.path.reduce(function(e,t){return n.push(e[t]),e[t]},e),r(t.value)}Object.defineProperty(t,"__esModule",{value:!0});var b=r(2),x=n(b),P=r(0),k=n(P),q=r(13),_=n(q),w=r(35),O=n(w),A=r(1),j=n(A),M=r(40),E=r(10),I=n(E),C=r(5),T=n(C),R=r(11),F=n(R),D=new RegExp("^([a-z]+://|//)","i"),S=(0,F.default)("JSONRefError",function(e,t,r){this.originalError=r,(0,j.default)(this,t||{})}),z={},N=new O.default,H={key:"$ref",plugin:function(e,t,r,n){var s=r.slice(0,-1),l=n.getContext(r).baseDoc;if("string"!=typeof e)return new S("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:l,fullPath:r});var c=o(e),f=c[0],p=c[1]||"",h=void 0;try{h=l||f?a(f,l):null}catch(t){return u(t,{pointer:p,$ref:e,basePath:h,fullPath:r})}var v=void 0,y=void 0;if(!m(p,h,s,n)){if(null==h?(y=d(p),void 0===(v=n.get(y))&&(v=new S("Could not resolve reference: "+e,{pointer:p,$ref:e,baseDoc:l,fullPath:r}))):(v=i(h,p),v=null!=v.__value?v.__value:v.catch(function(t){throw u(t,{pointer:p,$ref:e,baseDoc:l,fullPath:r})})),v instanceof Error)return[T.default.remove(r),v];var b=T.default.replace(s,v,{$$ref:e});return h&&h!==l?[b,T.default.context(s,{baseDoc:h})]:g(n.state,b)?void 0:b}}},V=(0,j.default)(H,{docCache:z,absoluteify:a,clearCache:s,JSONRefError:S,wrapError:u,getDoc:l,split:o,extractFromDoc:i,fetchJSON:c,extract:f,jsonPointerToArray:d,unescapeJsonPointerToken:p});t.default=V;var U=function(e){return!e||"/"===e||"#"===e}},function(e,t){e.exports=require("babel-runtime/core-js/object/create")},function(e,t){e.exports=require("babel-runtime/core-js/weak-map")},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t){e.exports=require("babel-runtime/helpers/slicedToArray")},function(e,t){e.exports=require("babel-runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("cookie")},function(e,t){e.exports=require("cross-fetch")},function(e,t){e.exports=require("cross-fetch/polyfill")},function(e,t){e.exports=require("deep-extend")},function(e,t){e.exports=require("fast-json-patch")},function(e,t){e.exports=require("isomorphic-form-data")},function(e,t){e.exports=require("js-yaml")},function(e,t){e.exports=require("lodash/cloneDeep")},function(e,t){e.exports=require("lodash/find")},function(e,t){e.exports=require("lodash/isArray")},function(e,t){e.exports=require("lodash/isObject")},function(e,t){e.exports=require("lodash/isPlainObject")},function(e,t){e.exports=require("lodash/isString")},function(e,t){e.exports=require("lodash/pick")},function(e,t){e.exports=require("qs")},function(e,t,r){e.exports=r(19)}]);
{
"name": "swagger-client",
"version": "3.3.1",
"version": "3.3.2",
"description": "SwaggerJS - a collection of interfaces for OAI specs",

@@ -20,2 +20,3 @@ "main": "dist/index.js",

"build": "cross-env NODE_ENV=production webpack -p --config ./webpack.config.js",
"build-dev": "cross-env NODE_ENV=development webpack --config ./webpack.config.js",
"build-bundle": "cross-env NODE_ENV=production webpack -p --config ./webpack.bundle.config.js",

@@ -68,8 +69,8 @@ "watch": "webpack --config webpack.config.js --watch --progress",

"cookie": "^0.3.1",
"cross-fetch": "0.0.8",
"deep-extend": "^0.4.1",
"fast-json-patch": "1.1.8",
"isomorphic-fetch": "2.2.1",
"isomorphic-form-data": "0.0.1",
"js-yaml": "^3.8.1",
"lodash": "4.16.2",
"lodash": "^4.16.2",
"qs": "^6.3.0",

@@ -76,0 +77,0 @@ "url": "^0.11.0"

@@ -67,3 +67,3 @@ Swagger-JS

`Swagger.http(req)` exposes a [Fetch-like interface](https://github.com/matthew-andrews/isomorphic-fetch) with a twist: allowing `url` in the request object so that it can be passed around and mutated. It extends Fetch to support request and response interceptors and performs response & header serialization. This method could be overridden to change how SwaggerJS performs HTTP requests.
`Swagger.http(req)` exposes a [Fetch-like interface](https://github.com/lquixada/cross-fetch) with a twist: allowing `url` in the request object so that it can be passed around and mutated. It extends Fetch to support request and response interceptors and performs response & header serialization. This method could be overridden to change how SwaggerJS performs HTTP requests.

@@ -283,2 +283,3 @@ ```js

npm run build # package to release
npm run build-dev # package with non-minified dist/index.js (for debugging)
npm run build-bundle # build browser version available at .../browser

@@ -285,0 +286,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc