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Q,EAAU,MAE/B,KAAK,OAAO,YAAY,WAAW,IAE/B,KAAK,MAAM,MAEb,KAAK,OAAO,YAAY,UAAU,KAAK,MAAM,KAE7C,KAAK,OAAO,YAAY,SAAS,KAAK,MAAM,OAI5C,KAAK,MAAM,OAAS,EAAU,MAAQ,KAAK,MAAM,OACJ,YAA3C,EAAI,SAAS,SAAS,KAAK,MAAM,MACnC,KAAK,OAAO,YAAY,YAAW,EAAI,YAAY,SAAS,KAAK,MAAM,OAEvE,KAAK,OAAO,YAAY,WAAW,KAAK,MAAM,MAGpD,KAEK,CACT,CA7GgB,CA6Gd,QAAQ,QAAQ,WAElB,QAAQ,QAAU","file":"/npm/swagger-ui-react-enhanced@3.21.4/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/swagger-ui-react-enhanced@3.21.4/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _stringify = require(\"babel-runtime/core-js/json/stringify\");\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _typeof2 = require(\"babel-runtime/helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nvar _getPrototypeOf = require(\"babel-runtime/core-js/object/get-prototype-of\");\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _classCallCheck2 = require(\"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = require(\"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = require(\"babel-runtime/helpers/possibleConstructorReturn\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = require(\"babel-runtime/helpers/inherits\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _swaggerUi = require(\"./swagger-ui\");\n\nvar _swaggerUi2 = _interopRequireDefault(_swaggerUi);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction disableInfoPlugin() {\n  return {\n    wrapComponents: {\n      InfoContainer: function InfoContainer() {\n        return function () {\n          return null;\n        };\n      }\n    }\n  };\n}\n\nfunction disableSchemesPlugin() {\n  return {\n    wrapComponents: {\n      SchemesContainer: function SchemesContainer() {\n        return function () {\n          return null;\n        };\n      }\n    }\n  };\n}\n\nfunction disableAuthorizePlugin() {\n  return {\n    wrapComponents: {\n      authorizeBtn: function authorizeBtn() {\n        return function () {\n          return null;\n        };\n      },\n      authorizeOperationBtn: function authorizeOperationBtn() {\n        return function () {\n          return null;\n        };\n      }\n    }\n  };\n};\n\nfunction disableTryItOutPlugin() {\n  return {\n    statePlugins: {\n      spec: {\n        wrapSelectors: {\n          allowTryItOutFor: function allowTryItOutFor() {\n            return function () {\n              return false;\n            };\n          }\n        }\n      }\n    }\n  };\n}\n\nvar SwaggerUI = function (_React$Component) {\n  (0, _inherits3.default)(SwaggerUI, _React$Component);\n\n  function SwaggerUI(props) {\n    (0, _classCallCheck3.default)(this, SwaggerUI);\n\n    var _this = (0, _possibleConstructorReturn3.default)(this, (SwaggerUI.__proto__ || (0, _getPrototypeOf2.default)(SwaggerUI)).call(this, props));\n\n    _this.requestInterceptor = function (req) {\n      if (typeof _this.props.requestInterceptor === \"function\") {\n        return _this.props.requestInterceptor(req);\n      }\n      return req;\n    };\n\n    _this.responseInterceptor = function (res) {\n      if (typeof _this.props.responseInterceptor === \"function\") {\n        return _this.props.responseInterceptor(res);\n      }\n      return res;\n    };\n\n    _this.onComplete = function () {\n      if (typeof _this.props.onComplete === \"function\") {\n        return _this.props.onComplete();\n      }\n    };\n\n    _this.SwaggerUIComponent = null;\n    _this.system = null;\n    return _this;\n  }\n\n  (0, _createClass3.default)(SwaggerUI, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var plugins = [];\n      var _props = this.props,\n          showInfo = _props.showInfo,\n          showSchemes = _props.showSchemes,\n          allowTryItOut = _props.allowTryItOut,\n          allowAuthorize = _props.allowAuthorize,\n          allowFilter = _props.allowFilter,\n          allowSwitchContentType = _props.allowSwitchContentType,\n          localization = _props.localization;\n\n\n      if (showInfo === false) {\n        plugins.push(disableInfoPlugin);\n      }\n      if (showSchemes === false) {\n        plugins.push(disableSchemesPlugin);\n      }\n      if (allowTryItOut === false) {\n        plugins.push(disableTryItOutPlugin);\n      }\n      if (allowAuthorize === false) {\n        plugins.push(disableAuthorizePlugin);\n      }\n\n      var ui = (0, _swaggerUi2.default)({\n        spec: this.props.spec,\n        url: this.props.url,\n        requestInterceptor: this.requestInterceptor,\n        responseInterceptor: this.responseInterceptor,\n        onComplete: this.onComplete,\n        localization: localization || {},\n        filter: allowFilter,\n        allowSwitchContentType: allowSwitchContentType,\n        showInfo: showInfo,\n        showSchemes: showSchemes,\n        plugins: plugins\n      });\n\n      this.system = ui;\n      this.SwaggerUIComponent = ui.getComponent(\"App\", \"root\");\n\n      this.forceUpdate();\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return this.SwaggerUIComponent ? _react2.default.createElement(this.SwaggerUIComponent, null) : null;\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps) {\n      if (this.props.url !== prevProps.url) {\n        // flush current content\n        this.system.specActions.updateSpec(\"\");\n\n        if (this.props.url) {\n          // update the internal URL\n          this.system.specActions.updateUrl(this.props.url);\n          // trigger remote definition fetch\n          this.system.specActions.download(this.props.url);\n        }\n      }\n\n      if (this.props.spec !== prevProps.spec && this.props.spec) {\n        if ((0, _typeof3.default)(this.props.spec) === \"object\") {\n          this.system.specActions.updateSpec((0, _stringify2.default)(this.props.spec));\n        } else {\n          this.system.specActions.updateSpec(this.props.spec);\n        }\n      }\n    }\n  }]);\n  return SwaggerUI;\n}(_react2.default.Component);\n\nexports.default = SwaggerUI;\n\n"]}