forgejo-federation/public/assets/swagger-ui/swagger-ui.js

15 lines
249 KiB
JavaScript
Raw Normal View History

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("object-assign"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable")):"function"==typeof define&&define.amd?define(["babel-polyfill","deep-extend","redux","immutable","redux-immutable","object-assign","serialize-error","base64-js","ieee754","isarray","shallowequal","xml","memoizee","reselect","js-yaml","url-parse","react","react-dom","react-redux","yaml-js","swagger-client","react-split-pane","react-immutable-proptypes","react-addons-shallow-compare","react-collapse","react-remarkable"],t):"object"==typeof exports?exports.SwaggerUICore=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("object-assign"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable")):e.SwaggerUICore=t(e["babel-polyfill"],e["deep-extend"],e.redux,e.immutable,e["redux-immutable"],e["object-assign"],e["serialize-error"],e["base64-js"],e.ieee754,e.isarray,e.shallowequal,e.xml,e.memoizee,e.reselect,e["js-yaml"],e["url-parse"],e.react,e["react-dom"],e["react-redux"],e["yaml-js"],e["swagger-client"],e["react-split-pane"],e["react-immutable-proptypes"],e["react-addons-shallow-compare"],e["react-collapse"],e["react-remarkable"])}(this,function(e,t,r,n,o,a,u,i,s,l,c,f,p,d,h,y,m,v,b,g,_,E,w,j,P,O){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,o){n.apply(this,[e,t,o].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){r(1),r(2),e.exports=r(3)},function(e,t){e.exports=require("babel-polyfill")},function(e,t){},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=r(4),i=o(u),s=r(5),l=o(s),c=r(158),f=o(c),p=r(315),d=n(p),h=r(317),y=r(13);e.exports=function(e){var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",validatorUrl:"https://online.swagger.io/validator",configs:{},presets:[],plugins:[],fn:{},components:{},state:{},store:{}},r=(0,i.default)({},t,e),n=(0,i.default)({},r.store,{system:{configs:r.configs},plugins:r.presets,state:{layout:{layout:r.layout},spec:{spec:"",url:r.url}}}),o=function(){return{fn:r.fn,components:r.components,state:r.state}},u=new l.default(n);u.register([r.plugins,o]);var s=u.getSystem(),c=(0,y.parseSeach)(),f=function(e){if("object"!==("undefined"==typeof r?"undefined":a(r)))return s;var t=s.specSelectors.getLocalConfig?s.specSelectors.getLocalConfig():{},n=(0,i.default)({},r,t,e||{},c);retur
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
"use strict";function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=u.prototype):(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return i(this,e,t,r)}function i(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?d(e,t,r,n):"string"==typeof t?f(e,t,r):h(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t,r,n){return s(t),t<=0?a(e,t):void 0!==r?"string"==typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}function c(e,t){if(s(t),e=a(e,t<0?0:0|y(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(t,r);e=a(e,n);var o=e.write(t,r);return o!==n&&(e=e.slice(0,o)),e}function p(e,t){var r=t.length<0?0:0|y(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),u.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=u.prototype):e=p(e,t),e}function h(e,t){if(u.isBuffer(t)){var r=0|y(t.length);return e=a(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||X(t.length)?a(e,0):p(e,t);if("Buffer"===t.type&&Q(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),u.alloc(+e)}function v(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return W(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return q(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,o);if("number"==ty
n(e,a(t,3))}var o=r(84),a=r(85),u=r(148),i=r(27),s=r(154);e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}e.exports=r},function(e,t,r){function n(e){return"function"==typeof e?e:null==e?u:"object"==typeof e?i(e)?a(e[0],e[1]):o(e):s(e)}var o=r(86),a=r(133),u=r(144),i=r(27),s=r(145);e.exports=n},function(e,t,r){function n(e){var t=a(e);return 1==t.length&&t[0][2]?u(t[0][0],t[0][1]):function(r){return r===e||o(r,e,t)}}var o=r(87),a=r(130),u=r(132);e.exports=n},function(e,t,r){function n(e,t,r,n){var s=r.length,l=s,c=!n;if(null==e)return!l;for(e=Object(e);s--;){var f=r[s];if(c&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++s<l;){f=r[s];var p=f[0],d=e[p],h=f[1];if(c&&f[2]){if(void 0===d&&!(p in e))return!1}else{var y=new o;if(n)var m=n(d,h,p,e,t,y);if(!(void 0===m?a(h,d,u|i,n,y):m))return!1}}return!0}var o=r(88),a=r(94),u=1,i=2;e.exports=n},function(e,t,r){function n(e){var t=this.__data__=new o(e);this.size=t.size}var o=r(68),a=r(89),u=r(90),i=r(91),s=r(92),l=r(93);n.prototype.clear=a,n.prototype.delete=u,n.prototype.get=i,n.prototype.has=s,n.prototype.set=l,e.exports=n},function(e,t,r){function n(){this.__data__=new o,this.size=0}var o=r(68);e.exports=n},function(e,t){function r(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}e.exports=r},function(e,t){function r(e){return this.__data__.get(e)}e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof o){var n=r.__data__;if(!a||n.length<i-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new u(n)}return r.set(e,t),this.size=r.size,this}var o=r(68),a=r(76),u=r(51),i=200;e.exports=n},function(e,t,r){function n(e,t,r,i,s){return e===t||(null==e||null==t||!a(e)&&!u(t)?e!==e&&t!==t:o(e,t,r,i,n,s))}var o=r(95),a=r(59),u=r(32);e.exports=n},function(e,t,r){function n(e,t,r,n,m,b){var g=l(e),_=l(t),E=h,w=h;g||(E=s(e),E=E==d?y:E),_||(w=s(t),w=w==d?y:w);var j=E==y,P=w==y,O=E==w;if(O&&c(e)){if(!c(t))return!1;g=!0,j=!1}if(O&&!j)return b||(b=new o),g||f(e)?a(e,t,r,n,m,b):u(e,t,E,r,n,m,b);if(!(r&p)){var T=j&&v.call(e,"__wrapped__"),S=P&&v.call(t,"__wrapped__");if(T||S){var x=T?e.value():e,C=S?t.value():t;return b||(b=new o),m(x,C,r,n,b)}}return!!O&&(b||(b=new o),i(e,t,r,n,m,b))}var o=r(88),a=r(96),u=r(101),i=r(105),s=r(125),l=r(27),c=r(111),f=r(115),p=1,d="[object Arguments]",h="[object Array]",y="[object Object]",m=Object.prototype,v=m.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t,r,n,l,c){var f=r&i,p=e.length,d=t.length;if(p!=d&&!(f&&d>p))return!1;var h=c.get(e);if(h&&c.get(t))return h==t;var y=-1,m=!0,v=r&s?new o:void 0;for(c.set(e,t),c.set(t,e);++y<p;){var b=e[y],g=t[y];if(n)var _=f?n(g,b,y,t,e,c):n(b,g,y,e,t,c);if(void 0!==_){if(_)continue;m=!1;break}if(v){if(!a(t,function(e,t){if(!u(v,t)&&(b===e||l(b,e,r,n,c)))return v.push(t)})){m=!1;break}}else if(b!==g&&!l(b,g,r,n,c)){m=!1;break}}return c.delete(e),c.delete(t),m}var o=r(97),a=r(84),u=r(100),i=1,s=2;e.exports=n},function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new o;++t<r;)this.add(e[t])}var o=r(51),a=r(98),u=r(99);n.prototype.add=n.prototype.push=a,n.prototype.has=u,e.exports=n},function(e,t){function r(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=r},function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},function(e,t){function r(e,t){return e.has(t)}e.exports=r},function(e,t,r){function n(e,t,r,n,o,j,O){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!j(new a(e),new a(t)));case p:case d:case m:return u(+e,+t);case h:return e.name==t.name&&e.message==t.message;case v:case g:return e==t+"";case y:var T=s;case b:var S=n&c;if(T||(T=l),e.size!=t.size&&!S)return!1;var x=O.get(e);if(x)return x==t;n|=f,O.set(e,t);var C=i(T(e),T(t),n,o,j,O);return O.delete(e),C;case _:if(P)return P.call(e)==P.call(t)}return!1}var o=r(23),a=r(102),u=r(72),i=r(96),s=r(103),l=r(10
return function(t){var r=t.specActions,n=t.specSelectors,o=t.errActions,a=n.specStr,u=null;try{e=e||a(),o.clear({source:"parser"}),u=_.default.safeLoad(e)}catch(e){return console.error(e),o.newSpecErr({source:"parser",level:"error",message:e.reason,line:e.mark&&e.mark.line?e.mark.line+1:void 0})}return r.updateJsonSpec(u)}},t.resolveSpec=function(e,t){return function(r){var n=r.specActions,o=r.specSelectors,a=r.errActions,u=r.fn,i=u.fetch,s=u.resolve,l=u.AST;"undefined"==typeof e&&(e=o.specJson()),"undefined"==typeof t&&(t=o.url());var c=l.getLineNumberForPath,f=o.specStr();return s({fetch:i,spec:e,baseDoc:t}).then(function(e){var t=e.spec,r=e.errors;if(a.clear({type:"thrown"}),r.length>0){var o=r.map(function(e){return console.error(e),e.line=e.fullPath?c(f,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e});a.newThrownErrBatch(o)}return n.updateResolved(t)})}},t.formatIntoYaml=function(){return function(e){var t=e.specActions,r=e.specSelectors,n=r.specStr,o=t.updateSpec;try{var a=_.default.safeDump(_.default.safeLoad(n()),{indent:2});o(a)}catch(e){o(e)}}},t.setResponse=function(e,t,r){return{payload:{path:e,method:t,res:r},type:A}},t.setRequest=function(e,t,r){return{payload:{path:e,method:t,req:r},type:R}},t.logRequest=function(e){return{payload:e,type:k}},t.executeRequest=function(e){return function(t){var r=t.fn,n=t.specActions,o=t.specSelectors,a=e.pathName,u=e.method;e.contextUrl=(0,w.default)(o.url()).toString();var i=Object.assign({},e);return a&&u&&(i.operationId=u.toLowerCase()+"-"+a),i=r.buildRequest(i),n.setRequest(e.pathName,e.method,i),r.execute(e).then(function(t){return n.setResponse(e.pathName,e.method,t)}).catch(function(t){return n.setResponse(e.pathName,e.method,{error:!0,err:(0,P.default)(t)})})}},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,r=e.method,n=o(e,["path","method"]);return function(e){var o=e.fn.fetch,a=e.specSelectors,u=e.specActions,i=a.spec().toJS(),s=a.operationScheme(t,r),l=a.contentTypeValues([t,r]).toJS(),c=l.requestContentType,f=l.responseContentType,p=/xml/i.test(c),d=a.parameterValues([t,r],p).toJS();return u.executeRequest(v({fetch:o,spec:i,pathName:t,method:r,parameters:d,requestContentType:c,scheme:s,responseContentType:f},n))}});t.execute=L},function(e,t){e.exports=require("js-yaml")},function(e,t){e.exports=require("url-parse")},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t,r){var o=g(e).getIn(["paths"].concat(n(t),["parameters"]),(0,d.fromJS)([]));return o.filter(function(e){return d.Map.isMap(e)&&e.get("name")===r}).first()}function a(e,t,r){var o=g(e).getIn(["paths"].concat(n(t),["parameters"]),(0,d.fromJS)([]));return o.reduce(function(e,t){var n=r&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(t.get("name"),n)},(0,d.fromJS)({}))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(e))return e.some(function(e){return d.Map.isMap(e)&&e.get("in")===t})}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(e))return e.some(function(e){return d.Map.isMap(e)&&e.get("type")===t})}function s(e,t){var r=g(e).getIn(["paths"].concat(n(t)),(0,d.fromJS)({})),o=r.get("parameters")||new d.List,a=i(o,"file")?"multipart/form-data":u(o,"formData")?"application/x-www-form-urlencoded":r.get("consumes_value");return(0,d.fromJS)({requestContentType:a,responseContentType:r.get("produces_value")})}function l(e,t){return g(e).getIn(["paths"].concat(n(t),["consumes"]),(0,d.fromJS)({}))}function c(e){return d.Map.isMap(e)?e:new d.Map}Object.defineProperty(t,"__esModule",{value:!0}),t.validateBeforeExecute=t.canExecuteScheme=t.operationScheme=t.hasHost=t.allowTryItOutFor=t.requestFor=t.responseFor=t.requests=t.responses=t.taggedOperations=t.operationsWithTags=t.tagDetails=t.tags=t.operationsWithRootInherited=
t.showDefinitions=o,t.authorize=a,t.logout=u,t.authorizeOauth2=i;var s=r(12),l=n(s),c=r(13),f=t.SHOW_AUTH_POPUP="show_popup",p=t.AUTHORIZE="authorize",d=t.LOGOUT="logout",h=(t.PRE_AUTHORIZE_OAUTH2="pre_authorize_oauth2",t.AUTHORIZE_OAUTH2="authorize_oauth2"),y=(t.VALIDATE="validate"," ");t.preAuthorizeOauth2=function(e){return function(t){var r=t.authActions,n=t.errActions,o=e.auth,a=e.token,u=e.isValid,i=o.schema,s=o.name,c=i.get("flow");return delete l.default.swaggerUIRedirectOauth2,"accessCode"===c||u||n.newAuthErr({authId:s,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?void n.newAuthErr({authId:s,source:"auth",level:"error",message:JSON.stringify(a)}):void r.authorizeOauth2({auth:o,token:a})}},t.authorizePassword=function(e){return function(t){var r=t.fn,n=t.authActions,o=t.errActions,a=e.schema,u=e.name,i=e.username,s=e.password,l=e.passwordType,f=e.clientId,p=e.clientSecret,d={url:a.get("tokenUrl"),method:"post",headers:{"content-type":"application/x-www-form-urlencoded"},query:{grant_type:"password",username:i,password:s,scopes:encodeURIComponent(e.scopes.join(y))}};return"basic"===l?d.headers.authorization="Basic "+(0,c.btoa)(f+":"+p):"request"===l&&(d.query=Object.assign(d.query,{client_id:f,client_secret:p})),r.fetch(d).then(function(t){var r=JSON.parse(t.data),a=r&&(r.error||""),i=r&&(r.parseError||"");return t.ok?a||i?void o.newAuthErr({authId:u,level:"error",source:"auth",message:JSON.stringify(r)}):void n.authorizeOauth2({auth:e,token:r}):void o.newAuthErr({authId:u,level:"error",source:"auth",message:t.statusText})}).catch(function(e){o.newAuthErr(e)})}},t.authorizeOauth2Application=function(e){return function(t){var r=t.fn,n=t.authActions,o=t.errActions,a=e.schema,u=e.scopes,i=e.name,s=e.clientId,l=e.clientSecret;r.fetch(a.get("tokenUrl"),{method:"post",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded"},body:"grant_type=client_credentials&client_id="+encodeURIComponent(s)+"&client_secret="+encodeURIComponent(l)+"&scope="+encodeURIComponent(u.join(y))}).then(function(t){return t.ok?void t.json().then(function(t){n.authorizeOauth2({auth:e,token:t})}):void o.newAuthErr({authId:i,level:"error",source:"auth",message:t.statusText})}).catch(function(e){o.newAuthErr(e)})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAuthorized=t.authorized=t.getDefinitionsByNames=t.definitionsToAuthorize=t.shownDefinitions=void 0;var n=function(){function e(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var u,i=e[Symbol.iterator]();!(n=(u=i.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{!n&&i.return&&i.return()}finally{if(o)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=r(174),a=r(7),u=function(e){return e};t.shownDefinitions=(0,o.createSelector)(u,function(e){return e.get("showDefinitions")}),t.definitionsToAuthorize=(0,o.createSelector)(u,function(){return function(e){var t=e.specSelectors,r=t.securityDefinitions(),o=(0,a.List)();return r.entrySeq().forEach(function(e){var t=n(e,2),r=t[0],u=t[1],i=(0,a.Map)();i=i.set(r,u),o=o.push(i)}),o}}),t.getDefinitionsByNames=function(e,t){return function(e){var r=e.specSelectors,o=r.securityDefinitions(),u=(0,a.List)();return t.valueSeq().forEach(function(e){var t=(0,a.Map)();e.entrySeq().forEach(function(e){var r=n(e,2),a=r[0],u=r[1],i=o.get(a),s=void 0;"oauth2"===i.get("type")&&u.size&&(s=i.get("scopes"),s.keySeq().forEach(function(e){u.contains(e)||(s=s.delete(e))}),i=i.set("allowedScopes",s)),t=t.set(a,i)}),u=u.push(t)}),u}},t.authorized=(0,o.createSelector)(u,function(e){return e.get("authorized")||(0,a.Map)()}),t.isAuthorized=function(e,t){return function(e){var r=e.authSelectors,n=r.authorized();return a.List.isList(t)?!!t.toJS().filter(function(e){var t=!0;return Object.keys(e).map(function(e){ret
path:["securityDefinitions",u]})),c.default.createElement(b,{options:{html:!0,typographer:!0,linkify:!0,linkTarget:"_blank"},source:r.get("description")}),w&&c.default.createElement("h6",null,"Authorized"),(g===d||g===h)&&c.default.createElement("p",null,"Authorization URL: ",c.default.createElement("code",null,r.get("authorizationUrl"))),(g===y||g===h||g===m)&&c.default.createElement("p",null,"Token URL:",c.default.createElement("code",null," ",r.get("tokenUrl"))),c.default.createElement("p",{className:"flow"},"Flow: ",c.default.createElement("code",null,r.get("flow"))),g===y&&(!w||w&&this.state.username)&&c.default.createElement(s,null,c.default.createElement(l,{tablet:2,desktop:2},"username:"),c.default.createElement(l,{tablet:10,desktop:10},w?c.default.createElement("span",null,this.state.username):c.default.createElement("input",{type:"text","data-name":"username",onChange:this.onInputChange}))),g===y&&!w&&c.default.createElement(s,null,c.default.createElement(l,{tablet:2,desktop:2},"password:"),c.default.createElement(l,{tablet:10,desktop:10},c.default.createElement("input",{type:"password","data-name":"password",onChange:this.onInputChange}))),g===y&&c.default.createElement(s,null,c.default.createElement(l,{tablet:2,desktop:2},"type:"),c.default.createElement(l,{tablet:10,desktop:10},w?c.default.createElement("span",null,this.state.passwordType):c.default.createElement("select",{"data-name":"passwordType",onChange:this.onInputChange},c.default.createElement("option",{value:"none"},"None or other"),c.default.createElement("option",{value:"basic"},"Basic auth"),c.default.createElement("option",{value:"request"},"Request body")))),(g===m||g===d||g===h||g===y&&"none"!==this.state.passwordType)&&(!w||w&&this.state.clientId)&&c.default.createElement(s,null,c.default.createElement("label",{htmlFor:"client_id"},"client_id:"),w?c.default.createElement("code",null," ****** "):c.default.createElement(l,{tablet:10,desktop:10},c.default.createElement("input",{id:"client_id",type:"text",required:g===y,"data-name":"clientId",onChange:this.onInputChange}))),(g===m||g===h||g===y&&"none"!==this.state.passwordType)&&c.default.createElement(s,null,c.default.createElement("label",{htmlFor:"client_secret"},"client_secret:"),w?c.default.createElement("code",null," ****** "):c.default.createElement(l,{tablet:10,desktop:10},c.default.createElement("input",{id:"client_secret",type:"text","data-name":"clientSecret",onChange:this.onInputChange}))),!w&&_&&_.size?c.default.createElement("div",{className:"scopes"},c.default.createElement("h2",null,"Scopes:"),_.map(function(t,r){return c.default.createElement(s,{key:r},c.default.createElement("div",{className:"checkbox"},c.default.createElement(i,{"data-value":r,id:r+"-checkbox",disabled:w,type:"checkbox",onChange:e.onScopeChange}),c.default.createElement("label",{htmlFor:r+"-checkbox"},c.default.createElement("span",{className:"item"}),c.default.createElement("div",{className:"text"},c.default.createElement("p",{className:"name"},r),c.default.createElement("p",{className:"description"},t)))))}).toArray()):null,j.valueSeq().map(function(e,t){return c.default.createElement(p,{error:e,key:t})}),c.default.createElement("div",{className:"auth-btn-wrapper"},P&&(w?c.default.createElement(f,{className:"btn modal-btn auth authorize",onClick:this.logout},"Logout"):c.default.createElement(f,{className:"btn modal-btn auth authorize",onClick:this.authorize},"Authorize"))))}}]),t}(c.default.Component);v.propTypes={name:l.PropTypes.string,authorized:l.PropTypes.object,getComponent:l.PropTypes.func.isRequired,schema:l.PropTypes.object.isRequired,authSelectors:l.PropTypes.object.isRequired,authActions:l.PropTypes.object.isRequired,errSelectors:l.PropTypes.object.isRequired,errActions:l.PropTypes.object.isRequired,getConfigs:l.PropTypes.any};var b=function(){var e=this;this.authorize=function(){var t=e.props,r=t.authActions,n=t.errActions,o=t.getConfigs,a=o();n.clear({authId:name,type:"auth",source:"auth"}),(0,p.default)(e.state,r,n,a)},this.onScopeChange=function(t){var r=t.target,n=r.checked,o=r.dataset.value
html:!0,typographer:!0,linkify:!0,linkTarget:"_blank"},source:r.get("description")})),E?c.default.createElement(b,{getComponent:a,specSelectors:u,schema:(0,f.fromJS)(l),example:E}):null,h?c.default.createElement(m,{headers:h}):null))}}]),t}(c.default.Component);h.propTypes={code:l.PropTypes.string.isRequired,response:l.PropTypes.object,className:l.PropTypes.string,getComponent:l.PropTypes.func.isRequired,specSelectors:l.PropTypes.object.isRequired,fn:l.PropTypes.object.isRequired,contentType:l.PropTypes.string},h.defaultProps={response:(0,f.fromJS)({})},t.default=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(188),l=n(s),c=r(13),f=r(292),p=n(f),d=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.content,r=e.contentType,n=e.url,o=e.headers,a=void 0===o?{}:o,u=e.getComponent,i=u("highlightCode"),s=void 0,f=void 0;if(n=n||"",/json/i.test(r)){try{s=JSON.stringify(JSON.parse(t),null," ")}catch(e){s="can't parse JSON. Raw result:\n\n"+t}f=l.default.createElement(i,{value:s})}else if(/xml/i.test(r))s=(0,c.formatXml)(t),f=l.default.createElement(i,{value:s});else if("text/html"===(0,p.default)(r)||/text\/plain/.test(r))f=l.default.createElement(i,{value:t});else if(/^image\//i.test(r))f=l.default.createElement("img",{src:n});else if(/^audio\//i.test(r))f=l.default.createElement("pre",null,l.default.createElement("audio",{controls:!0},l.default.createElement("source",{src:n,type:r})));else if(/^application\/octet-stream/i.test(r)||a["Content-Disposition"]&&/attachment/i.test(a["Content-Disposition"])||a["content-disposition"]&&/attachment/i.test(a["content-disposition"])||a["Content-Description"]&&/File Transfer/i.test(a["Content-Description"])||a["content-description"]&&/File Transfer/i.test(a["content-description"])){var d=a["content-length"]||a["Content-Length"];if(!+d)return null;var h=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(!h&&"Blob"in window){var y=r||"text/html",m=t instanceof Blob?t:new Blob([t],{type:y}),v=window.URL.createObjectURL(m),b=n.substr(n.lastIndexOf("/")+1),g=[y,b,v].join(":"),_=a["content-disposition"]||a["Content-Disposition"];if("undefined"!=typeof _){var E=/filename=([^;]*);?/i.exec(_);null!==E&&E.length>1&&(g=E[1])}f=l.default.createElement("div",null,l.default.createElement("a",{href:v,download:g},"Download file"))}else f=l.default.createElement("pre",null,"Download headers detected but your browser does not support downloading binary via XHR (Blob).")}else f="string"==typeof t?l.default.createElement(i,{value:t}):l.default.createElement("div",null,"Unknown response type");return f?l.default.createElement("div",null,l.default.createElement("h5",null,"Response body"),f):null}}]),t}(l.default.Component);d.propTypes={content:s.PropTypes.any.isRequired,contentType:s.PropTypes.string.isRequired,getComponent:s.PropTypes.func.isRequired,headers:s.PropTypes.object,url:s.PropTypes.string},t.default=d},function(e,t,r){var n=r(41),o=n(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()});e.exports=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(188),l=n(s),c=r(7),f=r(274),p=n(f),d=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.host,r=e.basePath;return l.default.createElement("pre",{className:"base-url"},"[ Base url: ",t,r,"]")}}]),t}(l.default.Component);d.propTypes={host:s.PropTypes.string,basePath:s.PropTypes.string};var h=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),i(t,[{key:"render",value:function(){var e=this.props.data,t=e.get("name")||"the developer",r=e.get("url"),n=e.get("email");return l.default.createElement("div",null,r&&l.default.createElement("div",null,l.default.createElement("a",{href:r,target:"_blank"},t," - Website")),n&&l.default.createElement("a",{href:"mailto:"+n},r?"Send email to "+t:"Contact "+t))}}]),t}(l.default.Component);h.propTypes={data:s.PropTypes.object};var y=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),i(t,[{key:"render",value:function(){var e=this.props.license,t=e.get("name")||"License",r=e.get("url");return l.default.createElement("div",null,r?l.default.createElement("a",{target:"_blank",href:r},t):l.default.createElement("span",null,t))}}]),t}(l.default.Component);y.propTypes={license:s.PropTypes.object};var m=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.info,r=e.url,n=e.host,o=e.basePath,a=e.getComponent,u=e.externalDocs,i=t.get("version"),s=t.get("description"),f=t.get("title"),p=t.get("termsOfService"),m=t.get("contact"),v=t.get("license"),b=(u||(0,c.fromJS)({})).toJS(),g=b.url,_=b.description,E=a("Markdown");return l.default.createElement("div",{className:"info"},l.default.createElement("hgroup",{className:"main"},l.default.createElement("h2",{className:"title"},f,i&&l.default.createElement("small",null,l.default.createElement("pre",{className:"version"}," ",i," "))),n||o?l.default.createElement(d,{host:n,basePath:o}):null,r&&l.default.createElement("a",{target:"_blank",href:r},l.default.createElement("span",{className:"url"}," ",r," "))),l.default.createElement("div",{className:"description"},l.default.createElement(E,{options:{html:!0,typographer:!0,linkify:!0,linkTarget:"_blank"},source:s})),p&&l.default.createElement("div",null,l.default.createElement("a",{target:"_blank",href:p},"Terms of service")),m&&m.size?l.default.createElement(h,{data:m}):null,v&&v.size?l.default.createElement(y,{license:v}):null,g?l.default.createElement("a",{target:"_blank",href:g},_||g):null)}}]),t}(l.default.Component);m.propTypes={info:s.PropTypes.object,url:s.PropTypes.string,host:s.PropTypes.string,basePath:s.PropTypes.string,externalDocs:p.default.map,getComponent:s.PropTypes.func.isRequired},t.default=m,m.propTypes={title:s.PropTypes.any,description:s.PropTypes.any,version:s.PropTypes.any,url:s.PropTypes.string}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{va
getComponent:n}):null)),f&&f.size||s?l.default.createElement("div",{className:"scheme-container"},l.default.createElement(v,{className:"schemes wrapper",mobile:12},f&&f.size?l.default.createElement(g,{schemes:f,specActions:r}):null,s?l.default.createElement(y,null):null)):null,l.default.createElement(m,null,l.default.createElement(v,{mobile:12,desktop:12},l.default.createElement(d,null))),l.default.createElement(m,null,l.default.createElement(v,{mobile:12,desktop:12},l.default.createElement(h,null)))))}}]),t}(l.default.Component);c.propTypes={errSelectors:s.PropTypes.object.isRequired,errActions:s.PropTypes.object.isRequired,specActions:s.PropTypes.object.isRequired,specSelectors:s.PropTypes.object.isRequired,layoutSelectors:s.PropTypes.object.isRequired,layoutActions:s.PropTypes.object.isRequired,getComponent:s.PropTypes.func.isRequired},t.default=c},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema_boolean=t.JsonSchema_array=t.JsonSchema_string=t.JsonSchemaForm=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(188),c=n(l),f=r(286),p=n(f),d=r(7),h=function(){},y={getComponent:l.PropTypes.func.isRequired,value:l.PropTypes.any,onChange:l.PropTypes.func,keyName:l.PropTypes.any,fn:l.PropTypes.object.isRequired,schema:l.PropTypes.object,required:l.PropTypes.bool,description:l.PropTypes.any},m={value:"",onChange:h,schema:{},keyName:"",required:!1},v=t.JsonSchemaForm=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.schema,r=e.value,n=e.onChange,o=e.getComponent,a=e.fn;t.toJS&&(t=t.toJS());var u=t,s=u.type,l=u.format,f=void 0===l?"":l,p=o("JsonSchema_"+s+"_"+f)||o("JsonSchema_"+s)||o("JsonSchema_string");return c.default.createElement(p,i({},this.props,{fn:a,getComponent:o,value:r,onChange:n,schema:t}))}}]),t}(l.Component);v.propTypes=y,v.defaultProps=m;var b=t.JsonSchema_string=function(e){function t(){var e,r,n,u;o(this,t);for(var i=arguments.length,s=Array(i),l=0;l<i;l++)s[l]=arguments[l];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),n.onChange=function(e){var t="file"===n.props.schema.type?e.target.files[0]:e.target.value;n.props.onChange(t,n.props.keyName)},n.onEnumChange=function(e){return n.props.onChange(e)},u=r,a(n,u)}return u(t,e),s(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,r=e.value,n=e.schema,o=e.required,a=e.description,u=n.enum,i=n.errors||[];if(u){var s=t("Select");return c.default.createElement(s,{allowedValues:u,value:r,allowEmptyValue:!o,onChange:this.onEnumChange})}var l="formData"===n.in&&!("FormData"in window),f=t("Input");return"file"===n.type?c.default.createElement(f,{type:"file",className:i.length?"invalid":"",onChange:this.onChange,disabled:l}):c.default.createElement(f,{type:"text",className:i.length?"invalid":"",value:r,placeholder:a,onChange:this.onChange,disabled:l})}}]),t}(l.Component);b.propTypes=y,b.defaultProps=m;var g=t.JsonSchema_array=function(e){function t(e,r){o(this,t
//# sourceMappingURL=swagger-ui.js.map