@nocobase/plugin-api-doc 0.16.0-alpha.4 → 0.16.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,7 +139,7 @@ new Remarkable().use(linkify)
139
139
  `+D.slice(sr+1):_r+=D.slice(er),_r.slice(1)}function Es(D,De,Ze,vt){var st,er,sr,or="",_r=D.tag;for(st=0,er=Ze.length;st<er;st+=1)sr=Ze[st],D.replacer&&(sr=D.replacer.call(Ze,String(st),sr)),(Oo(D,De+1,sr,!0,!0,!1,!0)||sr===void 0&&Oo(D,De+1,null,!0,!0,!1,!0))&&(vt&&or===""||(or+=qr(D,De)),D.dump&&mt===D.dump.charCodeAt(0)?or+="-":or+="- ",or+=D.dump);D.tag=_r,D.dump=or||"[]"}function Rs(D,De,Ze){var vt,st,er,sr,or,_r;for(er=0,sr=(st=Ze?D.explicitTypes:D.implicitTypes).length;er<sr;er+=1)if(((or=st[er]).instanceOf||or.predicate)&&(!or.instanceOf||typeof De=="object"&&De instanceof or.instanceOf)&&(!or.predicate||or.predicate(De))){if(Ze?or.multi&&or.representName?D.tag=or.representName(De):D.tag=or.tag:D.tag="?",or.represent){if(_r=D.styleMap[or.tag]||or.defaultStyle,pe.call(or.represent)==="[object Function]")vt=or.represent(De,_r);else{if(!ae.call(or.represent,_r))throw new c("!<"+or.tag+'> tag resolver accepts not "'+_r+'" style');vt=or.represent[_r](De,_r)}D.dump=vt}return!0}return!1}function Oo(D,De,Ze,vt,st,er,sr){D.tag=null,D.dump=Ze,Rs(D,Ze,!1)||Rs(D,Ze,!0);var or,_r=pe.call(D.dump),Nr=vt;vt&&(vt=D.flowLevel<0||D.flowLevel>De);var $r,mn,Xn=_r==="[object Object]"||_r==="[object Array]";if(Xn&&(mn=($r=D.duplicates.indexOf(Ze))!==-1),(D.tag!==null&&D.tag!=="?"||mn||D.indent!==2&&De>0)&&(st=!1),mn&&D.usedDuplicates[$r])D.dump="*ref_"+$r;else{if(Xn&&mn&&!D.usedDuplicates[$r]&&(D.usedDuplicates[$r]=!0),_r==="[object Object]")vt&&Object.keys(D.dump).length!==0?(function(Ir,lo,zn,an){var Ve,Nn,On,Hr,Fn,Gr,ao="",wn=Ir.tag,En=Object.keys(zn);if(Ir.sortKeys===!0)En.sort();else if(typeof Ir.sortKeys=="function")En.sort(Ir.sortKeys);else if(Ir.sortKeys)throw new c("sortKeys must be a boolean or a function");for(Ve=0,Nn=En.length;Ve<Nn;Ve+=1)Gr="",an&&ao===""||(Gr+=qr(Ir,lo)),Hr=zn[On=En[Ve]],Ir.replacer&&(Hr=Ir.replacer.call(zn,On,Hr)),Oo(Ir,lo+1,On,!0,!0,!0)&&((Fn=Ir.tag!==null&&Ir.tag!=="?"||Ir.dump&&Ir.dump.length>1024)&&(Ir.dump&&mt===Ir.dump.charCodeAt(0)?Gr+="?":Gr+="? "),Gr+=Ir.dump,Fn&&(Gr+=qr(Ir,lo)),Oo(Ir,lo+1,Hr,!0,Fn)&&(Ir.dump&&mt===Ir.dump.charCodeAt(0)?Gr+=":":Gr+=": ",ao+=Gr+=Ir.dump));Ir.tag=wn,Ir.dump=ao||"{}"}(D,De,D.dump,st),mn&&(D.dump="&ref_"+$r+D.dump)):(function(Ir,lo,zn){var an,Ve,Nn,On,Hr,Fn="",Gr=Ir.tag,ao=Object.keys(zn);for(an=0,Ve=ao.length;an<Ve;an+=1)Hr="",Fn!==""&&(Hr+=", "),Ir.condenseFlow&&(Hr+='"'),On=zn[Nn=ao[an]],Ir.replacer&&(On=Ir.replacer.call(zn,Nn,On)),Oo(Ir,lo,Nn,!1,!1)&&(Ir.dump.length>1024&&(Hr+="? "),Hr+=Ir.dump+(Ir.condenseFlow?'"':"")+":"+(Ir.condenseFlow?"":" "),Oo(Ir,lo,On,!1,!1)&&(Fn+=Hr+=Ir.dump));Ir.tag=Gr,Ir.dump="{"+Fn+"}"}(D,De,D.dump),mn&&(D.dump="&ref_"+$r+" "+D.dump));else if(_r==="[object Array]")vt&&D.dump.length!==0?(D.noArrayIndent&&!sr&&De>0?Es(D,De-1,D.dump,st):Es(D,De,D.dump,st),mn&&(D.dump="&ref_"+$r+D.dump)):(function(Ir,lo,zn){var an,Ve,Nn,On="",Hr=Ir.tag;for(an=0,Ve=zn.length;an<Ve;an+=1)Nn=zn[an],Ir.replacer&&(Nn=Ir.replacer.call(zn,String(an),Nn)),(Oo(Ir,lo,Nn,!1,!1)||Nn===void 0&&Oo(Ir,lo,null,!1,!1))&&(On!==""&&(On+=","+(Ir.condenseFlow?"":" ")),On+=Ir.dump);Ir.tag=Hr,Ir.dump="["+On+"]"}(D,De,D.dump),mn&&(D.dump="&ref_"+$r+" "+D.dump));else{if(_r!=="[object String]"){if(_r==="[object Undefined]"||D.skipInvalid)return!1;throw new c("unacceptable kind of an object to dump "+_r)}D.tag!=="?"&&Mo(D,D.dump,De,er,Nr)}D.tag!==null&&D.tag!=="?"&&(or=encodeURI(D.tag[0]==="!"?D.tag.slice(1):D.tag).replace(/!/g,"%21"),or=D.tag[0]==="!"?"!"+or:or.slice(0,18)==="tag:yaml.org,2002:"?"!!"+or.slice(18):"!<"+or+">",D.dump=or+" "+D.dump)}return!0}function Tn(D,De){var Ze,vt,st=[],er=[];for(us(D,st,er),Ze=0,vt=er.length;Ze<vt;Ze+=1)De.duplicates.push(st[er[Ze]]);De.usedDuplicates=new Array(vt)}function us(D,De,Ze){var vt,st,er;if(D!==null&&typeof D=="object")if((st=De.indexOf(D))!==-1)Ze.indexOf(st)===-1&&Ze.push(st);else if(De.push(D),Array.isArray(D))for(st=0,er=D.length;st<er;st+=1)us(D[st],De,Ze);else for(st=0,er=(vt=Object.keys(D)).length;st<er;st+=1)us(D[vt[st]],De,Ze)}function Do(D,De){return function(){throw new Error("Function yaml."+D+" is removed in js-yaml 4. Use yaml."+De+" instead, which is now safe by default.")}}var to=w,Yn=O,Kr=N,lt=te,gr=xe,mr=Ie,Rn=Te.load,mo=Te.loadAll,oo=function(D,De){var Ze=new rs(De=De||{});Ze.noRefs||Tn(D,Ze);var vt=D;return Ze.replacer&&(vt=Ze.replacer.call({"":vt},"",vt)),Oo(Ze,0,vt,!0,!0)?Ze.dump+`
140
140
  `:""},ps=c,Kn={binary:ie,float:X,map:x,null:k,pairs:Ke,set:ge,timestamp:W,bool:q,int:M,merge:Q,omap:_e,seq:C,str:P},Co=Do("safeLoad","load"),xs=Do("safeLoadAll","loadAll"),Un=Do("safeDump","dump");const wa={Type:to,Schema:Yn,FAILSAFE_SCHEMA:Kr,JSON_SCHEMA:lt,CORE_SCHEMA:gr,DEFAULT_SCHEMA:mr,load:Rn,loadAll:mo,dump:oo,YAMLException:ps,types:Kn,safeLoad:Co,safeLoadAll:xs,safeDump:Un}}},la={};function cr(p){var i=la[p];if(i!==void 0)return i.exports;var e=la[p]={id:p,loaded:!1,exports:{}};return Vc[p].call(e.exports,e,e.exports,cr),e.loaded=!0,e.exports}cr.n=p=>{var i=p&&p.__esModule?()=>p.default:()=>p;return cr.d(i,{a:i}),i},cr.d=(p,i)=>{for(var e in i)cr.o(i,e)&&!cr.o(p,e)&&Object.defineProperty(p,e,{enumerable:!0,get:i[e]})},cr.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(p){if(typeof window=="object")return window}}(),cr.o=(p,i)=>Object.prototype.hasOwnProperty.call(p,i),cr.r=p=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},cr.nmd=p=>(p.paths=[],p.children||(p.children=[]),p);var ba={};return(()=>{cr.d(ba,{default:()=>ar});var p={};cr.r(p),cr.d(p,{Button:()=>De,Col:()=>wa,Collapse:()=>or,Container:()=>xs,Input:()=>vt,Link:()=>er,Row:()=>D,Select:()=>st,TextArea:()=>Ze});var i={};cr.r(i),cr.d(i,{JsonSchemaArrayItemFile:()=>Va,JsonSchemaArrayItemText:()=>xa,JsonSchemaForm:()=>Ra,JsonSchema_array:()=>si,JsonSchema_boolean:()=>ca,JsonSchema_object:()=>Wa,JsonSchema_string:()=>oi});var e=cr(57269),r=cr.n(e),o=cr(14418),s=cr.n(o),a=cr(28222),c=cr.n(a),l=cr(35627),h=cr.n(l),m=cr(27698),y=cr.n(m),E=cr(11189),w=cr.n(E),S=cr(76986),A=cr.n(S),O=cr(24278),P=cr.n(O),C=cr(58309),x=cr.n(C),N=cr(24282),k=cr.n(N),q=cr(97606),$=cr.n(q),R=cr(39022),M=cr.n(R),b=cr(67294),J=cr(97779),X=cr(43393),te=cr.n(X),xe=cr(72739),ee=cr(7710),G=cr(82492),W=cr.n(G),Q=cr(34966),fe=cr(27504),ie=cr(90242);const Ne=Ge=>Ge;class Y{constructor(){var K;let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var le,he,Ce;y()(this,{state:{},plugins:[],pluginsOptions:{},system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},Z),this.getSystem=w()(K=this._getSystem).call(K,this),this.store=(le=Ne,he=(0,X.fromJS)(this.state),Ce=this.getSystem,function(et,Ye,bt){let tt=[(0,ie._5)(bt)];const ht=fe.Z.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||J.qC;return(0,J.MT)(et,Ye,ht((0,J.md)(...tt)))}(le,he,Ce)),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(K){let Z=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];var le=_e(K,this.getSystem(),this.pluginsOptions);Ke(this.system,le),Z&&this.buildSystem(),Ae.call(this.system,K,this.getSystem())&&this.buildSystem()}buildSystem(){let K=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],Z=this.getStore().dispatch,le=this.getStore().getState;this.boundSystem=A()({},this.getRootInjects(),this.getWrappedAndBoundActions(Z),this.getWrappedAndBoundSelectors(le,this.getSystem),this.getStateThunks(le),this.getFn(),this.getConfigs()),K&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){var K,Z,le;return A()({getSystem:this.getSystem,getStore:w()(K=this.getStore).call(K,this),getComponents:w()(Z=this.getComponents).call(Z,this),getState:this.getStore().getState,getConfigs:w()(le=this._getConfigs).call(le,this),Im:te(),React:b},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(K){this.system.configs=K}rebuildReducer(){var K;this.store.replaceReducer((K=this.system.statePlugins,function(Z){var le;let he=k()(le=c()(Z)).call(le,(Ce,et)=>(Ce[et]=function(Ye){return function(){let bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new X.Map,tt=arguments.length>1?arguments[1]:void 0;if(!Ye)return bt;let ht=Ye[tt.type];if(ht){const Ht=ce(ht)(bt,tt);return Ht===null?bt:Ht}return bt}}(Z[et]),Ce),{});return c()(he).length?(0,xe.U)(he):Ne}((0,ie.Ay)(K,Z=>Z.reducers))))}getType(K){let Z=K[0].toUpperCase()+P()(K).call(K,1);return(0,ie.Q2)(this.system.statePlugins,(le,he)=>{let Ce=le[K];if(Ce)return{[he+Z]:Ce}})}getSelectors(){return this.getType("selectors")}getActions(){let K=this.getType("actions");return(0,ie.Ay)(K,Z=>(0,ie.Q2)(Z,(le,he)=>{if((0,ie.LQ)(le))return{[he]:le}}))}getWrappedAndBoundActions(K){var Z=this;let le=this.getBoundActions(K);return(0,ie.Ay)(le,(he,Ce)=>{let et=this.system.statePlugins[P()(Ce).call(Ce,0,-7)].wrapActions;return et?(0,ie.Ay)(he,(Ye,bt)=>{let tt=et[bt];return tt?(x()(tt)||(tt=[tt]),k()(tt).call(tt,(ht,Ht)=>{let ur=function(){return Ht(ht,Z.getSystem())(...arguments)};if(!(0,ie.LQ)(ur))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return ce(ur)},Ye||Function.prototype)):Ye}):he})}getWrappedAndBoundSelectors(K,Z){var le=this;let he=this.getBoundSelectors(K,Z);return(0,ie.Ay)(he,(Ce,et)=>{let Ye=[P()(et).call(et,0,-9)],bt=this.system.statePlugins[Ye].wrapSelectors;return bt?(0,ie.Ay)(Ce,(tt,ht)=>{let Ht=bt[ht];return Ht?(x()(Ht)||(Ht=[Ht]),k()(Ht).call(Ht,(ur,Gt)=>{let tr=function(){for(var yr=arguments.length,jr=new Array(yr),Tr=0;Tr<yr;Tr++)jr[Tr]=arguments[Tr];return Gt(ur,le.getSystem())(K().getIn(Ye),...jr)};if(!(0,ie.LQ)(tr))throw new TypeError("wrapSelector needs to return a function that returns a new function (ie the wrapped action)");return tr},tt||Function.prototype)):tt}):Ce})}getStates(K){var Z;return k()(Z=c()(this.system.statePlugins)).call(Z,(le,he)=>(le[he]=K.get(he),le),{})}getStateThunks(K){var Z;return k()(Z=c()(this.system.statePlugins)).call(Z,(le,he)=>(le[he]=()=>K().get(he),le),{})}getFn(){return{fn:this.system.fn}}getComponents(K){const Z=this.system.components[K];return x()(Z)?k()(Z).call(Z,(le,he)=>he(le,this.getSystem())):K!==void 0?this.system.components[K]:this.system.components}getBoundSelectors(K,Z){return(0,ie.Ay)(this.getSelectors(),(le,he)=>{let Ce=[P()(he).call(he,0,-9)];return(0,ie.Ay)(le,et=>function(){for(var Ye=arguments.length,bt=new Array(Ye),tt=0;tt<Ye;tt++)bt[tt]=arguments[tt];let ht=ce(et).apply(null,[K().getIn(Ce),...bt]);return typeof ht=="function"&&(ht=ce(ht)(Z())),ht})})}getBoundActions(K){K=K||this.getStore().dispatch;const Z=this.getActions(),le=he=>typeof he!="function"?(0,ie.Ay)(he,Ce=>le(Ce)):function(){var Ce=null;try{Ce=he(...arguments)}catch(et){Ce={type:Q.NEW_THROWN_ERR,error:!0,payload:(0,ee.serializeError)(et)}}finally{return Ce}};return(0,ie.Ay)(Z,he=>(0,J.DE)(le(he),K))}getMapStateToProps(){return()=>A()({},this.getSystem())}getMapDispatchToProps(K){return Z=>y()({},this.getWrappedAndBoundActions(Z),this.getFn(),K)}}function _e(Ge,K,Z){if((0,ie.Kn)(Ge)&&!(0,ie.kJ)(Ge))return W()({},Ge);if((0,ie.Wl)(Ge))return _e(Ge(K),K,Z);if((0,ie.kJ)(Ge)){var le;const he=Z.pluginLoadType==="chain"?K.getComponents():{};return k()(le=$()(Ge).call(Ge,Ce=>_e(Ce,K,Z))).call(le,Ke,he)}return{}}function Ae(Ge,K){let{hasLoaded:Z}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},le=Z;return(0,ie.Kn)(Ge)&&!(0,ie.kJ)(Ge)&&typeof Ge.afterLoad=="function"&&(le=!0,ce(Ge.afterLoad).call(this,K)),(0,ie.Wl)(Ge)?Ae.call(this,Ge(K),K,{hasLoaded:le}):(0,ie.kJ)(Ge)?$()(Ge).call(Ge,he=>Ae.call(this,he,K,{hasLoaded:le})):le}function Ke(){let Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,ie.Kn)(Ge))return{};if(!(0,ie.Kn)(K))return Ge;K.wrapComponents&&((0,ie.Ay)(K.wrapComponents,(Ce,et)=>{const Ye=Ge.components&&Ge.components[et];Ye&&x()(Ye)?(Ge.components[et]=M()(Ye).call(Ye,[Ce]),delete K.wrapComponents[et]):Ye&&(Ge.components[et]=[Ye,Ce],delete K.wrapComponents[et])}),c()(K.wrapComponents).length||delete K.wrapComponents);const{statePlugins:Z}=Ge;if((0,ie.Kn)(Z))for(let Ce in Z){const et=Z[Ce];if(!(0,ie.Kn)(et))continue;const{wrapActions:Ye,wrapSelectors:bt}=et;if((0,ie.Kn)(Ye))for(let tt in Ye){let ht=Ye[tt];var le;x()(ht)||(ht=[ht],Ye[tt]=ht),K&&K.statePlugins&&K.statePlugins[Ce]&&K.statePlugins[Ce].wrapActions&&K.statePlugins[Ce].wrapActions[tt]&&(K.statePlugins[Ce].wrapActions[tt]=M()(le=Ye[tt]).call(le,K.statePlugins[Ce].wrapActions[tt]))}if((0,ie.Kn)(bt))for(let tt in bt){let ht=bt[tt];var he;x()(ht)||(ht=[ht],bt[tt]=ht),K&&K.statePlugins&&K.statePlugins[Ce]&&K.statePlugins[Ce].wrapSelectors&&K.statePlugins[Ce].wrapSelectors[tt]&&(K.statePlugins[Ce].wrapSelectors[tt]=M()(he=bt[tt]).call(he,K.statePlugins[Ce].wrapSelectors[tt]))}}return y()(Ge,K)}function ce(Ge){let{logErrors:K=!0}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof Ge!="function"?Ge:function(){try{for(var Z=arguments.length,le=new Array(Z),he=0;he<Z;he++)le[he]=arguments[he];return Ge.call(this,...le)}catch(Ce){return K&&console.error(Ce),null}}}var ge=cr(77793),Ie=cr(26821),$e=cr(37038),je=cr(73420),Je=cr(8883),Be=cr(86575),Qe=cr(9150),Et=cr(94001),Ct=cr(93705),dt=cr(98525),jt=cr(48011),T=cr(46709),I=cr(34980),z=cr(49978),ue=cr(28560),ne=cr(27621),V=cr(10070),Re=cr(61125),Me=cr.n(Re),gt=cr(11882),xt=cr.n(gt),ut=(cr(23930),cr(32454));class Mt extends b.PureComponent{constructor(K,Z){super(K,Z),Me()(this,"toggleShown",()=>{let{layoutActions:he,tag:Ce,operationId:et,isShown:Ye}=this.props;const bt=this.getResolvedSubtree();Ye||bt!==void 0||this.requestResolvedSubtree(),he.show(["operations",Ce,et],!Ye)}),Me()(this,"onCancelClick",()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})}),Me()(this,"onTryoutClick",()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})}),Me()(this,"onResetClick",he=>{const Ce=this.props.oas3Selectors.selectDefaultRequestBodyValue(...he);this.props.oas3Actions.setRequestBodyValue({value:Ce,pathMethod:he})}),Me()(this,"onExecute",()=>{this.setState({executeInProgress:!0})}),Me()(this,"getResolvedSubtree",()=>{const{specSelectors:he,path:Ce,method:et,specPath:Ye}=this.props;return Ye?he.specResolvedSubtree(Ye.toJS()):he.specResolvedSubtree(["paths",Ce,et])}),Me()(this,"requestResolvedSubtree",()=>{const{specActions:he,path:Ce,method:et,specPath:Ye}=this.props;return Ye?he.requestResolvedSubtree(Ye.toJS()):he.requestResolvedSubtree(["paths",Ce,et])});const{tryItOutEnabled:le}=K.getConfigs();this.state={tryItOutEnabled:le===!0||le==="true",executeInProgress:!1}}mapStateToProps(K,Z){const{op:le,layoutSelectors:he,getConfigs:Ce}=Z,{docExpansion:et,deepLinking:Ye,displayOperationId:bt,displayRequestDuration:tt,supportedSubmitMethods:ht}=Ce(),Ht=he.showSummary(),ur=le.getIn(["operation","__originalOperationId"])||le.getIn(["operation","operationId"])||(0,ut.Z)(le.get("operation"),Z.path,Z.method)||le.get("id"),Gt=["operations",Z.tag,ur],tr=Ye&&Ye!=="false",yr=xt()(ht).call(ht,Z.method)>=0&&(Z.allowTryItOut===void 0?Z.specSelectors.allowTryItOutFor(Z.path,Z.method):Z.allowTryItOut),jr=le.getIn(["operation","security"])||Z.specSelectors.security();return{operationId:ur,isDeepLinkingEnabled:tr,showSummary:Ht,displayOperationId:bt,displayRequestDuration:tt,allowTryItOut:yr,security:jr,isAuthorized:Z.authSelectors.isAuthorized(jr),isShown:he.isShown(Gt,et==="full"),jumpToKey:`paths.${Z.path}.${Z.method}`,response:Z.specSelectors.responseFor(Z.path,Z.method),request:Z.specSelectors.requestFor(Z.path,Z.method)}}componentDidMount(){const{isShown:K}=this.props,Z=this.getResolvedSubtree();K&&Z===void 0&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(K){const{response:Z,isShown:le}=K,he=this.getResolvedSubtree();Z!==this.props.response&&this.setState({executeInProgress:!1}),le&&he===void 0&&this.requestResolvedSubtree()}render(){let{op:K,tag:Z,path:le,method:he,security:Ce,isAuthorized:et,operationId:Ye,showSummary:bt,isShown:tt,jumpToKey:ht,allowTryItOut:Ht,response:ur,request:Gt,displayOperationId:tr,displayRequestDuration:yr,isDeepLinkingEnabled:jr,specPath:Tr,specSelectors:ln,specActions:vn,getComponent:Fr,getConfigs:Lr,layoutSelectors:Dr,layoutActions:cn,authActions:Cr,authSelectors:Qn,oas3Actions:Br,oas3Selectors:un,fn:Sn}=this.props;const hn=Fr("operation"),Vn=this.getResolvedSubtree()||(0,X.Map)(),Mn=(0,X.fromJS)({op:Vn,tag:Z,path:le,summary:K.getIn(["operation","summary"])||"",deprecated:Vn.get("deprecated")||K.getIn(["operation","deprecated"])||!1,method:he,security:Ce,isAuthorized:et,operationId:Ye,originalOperationId:Vn.getIn(["operation","__originalOperationId"]),showSummary:bt,isShown:tt,jumpToKey:ht,allowTryItOut:Ht,request:Gt,displayOperationId:tr,displayRequestDuration:yr,isDeepLinkingEnabled:jr,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return b.createElement(hn,{operation:Mn,response:ur,request:Gt,isShown:tt,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:Tr,specActions:vn,specSelectors:ln,oas3Actions:Br,oas3Selectors:un,layoutActions:cn,layoutSelectors:Dr,authActions:Cr,authSelectors:Qn,getComponent:Fr,getConfigs:Lr,fn:Sn})}}Me()(Mt,"defaultProps",{showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1});class Vt extends b.Component{getLayout(){let{getComponent:K,layoutSelectors:Z}=this.props;const le=Z.current();return K(le,!0)||(()=>b.createElement("h1",null,' No layout defined for "',le,'" '))}render(){const K=this.getLayout();return b.createElement(K,null)}}Vt.defaultProps={};class Rt extends b.Component{constructor(){super(...arguments),Me()(this,"close",()=>{let{authActions:K}=this.props;K.showDefinitions(!1)})}render(){var K;let{authSelectors:Z,authActions:le,getComponent:he,errSelectors:Ce,specSelectors:et,fn:{AST:Ye={}}}=this.props,bt=Z.shownDefinitions();const tt=he("auths"),ht=he("CloseIcon");return b.createElement("div",{className:"dialog-ux"},b.createElement("div",{className:"backdrop-ux"}),b.createElement("div",{className:"modal-ux"},b.createElement("div",{className:"modal-dialog-ux"},b.createElement("div",{className:"modal-ux-inner"},b.createElement("div",{className:"modal-ux-header"},b.createElement("h3",null,"Available authorizations"),b.createElement("button",{type:"button",className:"close-modal",onClick:this.close},b.createElement(ht,null))),b.createElement("div",{className:"modal-ux-content"},$()(K=bt.valueSeq()).call(K,(Ht,ur)=>b.createElement(tt,{key:ur,AST:Ye,definitions:Ht,getComponent:he,errSelectors:Ce,authSelectors:Z,authActions:le,specSelectors:et})))))))}}class Jt extends b.Component{render(){let{isAuthorized:K,showPopup:Z,onClick:le,getComponent:he}=this.props;const Ce=he("authorizationPopup",!0),et=he("LockAuthIcon",!0),Ye=he("UnlockAuthIcon",!0);return b.createElement("div",{className:"auth-wrapper"},b.createElement("button",{className:K?"btn authorize locked":"btn authorize unlocked",onClick:le},b.createElement("span",null,"Authorize"),K?b.createElement(et,null):b.createElement(Ye,null)),Z&&b.createElement(Ce,null))}}class Wt extends b.Component{render(){const{authActions:K,authSelectors:Z,specSelectors:le,getComponent:he}=this.props,Ce=le.securityDefinitions(),et=Z.definitionsToAuthorize(),Ye=he("authorizeBtn");return Ce?b.createElement(Ye,{onClick:()=>K.showDefinitions(et),isAuthorized:!!Z.authorized().size,showPopup:!!Z.shownDefinitions(),getComponent:he}):null}}class zt extends b.Component{constructor(){super(...arguments),Me()(this,"onClick",K=>{K.stopPropagation();let{onClick:Z}=this.props;Z&&Z()})}render(){let{isAuthorized:K,getComponent:Z}=this.props;const le=Z("LockAuthOperationIcon",!0),he=Z("UnlockAuthOperationIcon",!0);return b.createElement("button",{className:"authorization__btn","aria-label":K?"authorization button locked":"authorization button unlocked",onClick:this.onClick},K?b.createElement(le,{className:"locked"}):b.createElement(he,{className:"unlocked"}))}}class Yt extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"onAuthChange",le=>{let{name:he}=le;this.setState({[he]:le})}),Me()(this,"submitAuth",le=>{le.preventDefault();let{authActions:he}=this.props;he.authorizeWithPersistOption(this.state)}),Me()(this,"logoutClick",le=>{le.preventDefault();let{authActions:he,definitions:Ce}=this.props,et=$()(Ce).call(Ce,(Ye,bt)=>bt).toArray();this.setState(k()(et).call(et,(Ye,bt)=>(Ye[bt]="",Ye),{})),he.logoutWithPersistOption(et)}),Me()(this,"close",le=>{le.preventDefault();let{authActions:he}=this.props;he.showDefinitions(!1)}),this.state={}}render(){var K;let{definitions:Z,getComponent:le,authSelectors:he,errSelectors:Ce}=this.props;const et=le("AuthItem"),Ye=le("oauth2",!0),bt=le("Button");let tt=he.authorized(),ht=s()(Z).call(Z,(Gt,tr)=>!!tt.get(tr)),Ht=s()(Z).call(Z,Gt=>Gt.get("type")!=="oauth2"),ur=s()(Z).call(Z,Gt=>Gt.get("type")==="oauth2");return b.createElement("div",{className:"auth-container"},!!Ht.size&&b.createElement("form",{onSubmit:this.submitAuth},$()(Ht).call(Ht,(Gt,tr)=>b.createElement(et,{key:tr,schema:Gt,name:tr,getComponent:le,onAuthChange:this.onAuthChange,authorized:tt,errSelectors:Ce})).toArray(),b.createElement("div",{className:"auth-btn-wrapper"},Ht.size===ht.size?b.createElement(bt,{className:"btn modal-btn auth",onClick:this.logoutClick},"Logout"):b.createElement(bt,{type:"submit",className:"btn modal-btn auth authorize"},"Authorize"),b.createElement(bt,{className:"btn modal-btn auth btn-done",onClick:this.close},"Close"))),ur&&ur.size?b.createElement("div",null,b.createElement("div",{className:"scope-def"},b.createElement("p",null,"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes."),b.createElement("p",null,"API requires the following scopes. Select which ones you want to grant to Swagger UI.")),$()(K=s()(Z).call(Z,Gt=>Gt.get("type")==="oauth2")).call(K,(Gt,tr)=>b.createElement("div",{key:tr},b.createElement(Ye,{authorized:tt,schema:Gt,name:tr}))).toArray()):null)}}class Pt extends b.Component{render(){let{schema:K,name:Z,getComponent:le,onAuthChange:he,authorized:Ce,errSelectors:et}=this.props;const Ye=le("apiKeyAuth"),bt=le("basicAuth");let tt;const ht=K.get("type");switch(ht){case"apiKey":tt=b.createElement(Ye,{key:Z,schema:K,name:Z,errSelectors:et,authorized:Ce,getComponent:le,onChange:he});break;case"basic":tt=b.createElement(bt,{key:Z,schema:K,name:Z,errSelectors:et,authorized:Ce,getComponent:le,onChange:he});break;default:tt=b.createElement("div",{key:Z},"Unknown security definition type ",ht)}return b.createElement("div",{key:`${Z}-jump`},tt)}}class qe extends b.Component{render(){let{error:K}=this.props,Z=K.get("level"),le=K.get("message"),he=K.get("source");return b.createElement("div",{className:"errors"},b.createElement("b",null,he," ",Z),b.createElement("span",null,le))}}class ve extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"onChange",et=>{let{onChange:Ye}=this.props,bt=et.target.value,tt=A()({},this.state,{value:bt});this.setState(tt),Ye(tt)});let{name:le,schema:he}=this.props,Ce=this.getValue();this.state={name:le,schema:he,value:Ce}}getValue(){let{name:K,authorized:Z}=this.props;return Z&&Z.getIn([K,"value"])}render(){var K,Z;let{schema:le,getComponent:he,errSelectors:Ce,name:et}=this.props;const Ye=he("Input"),bt=he("Row"),tt=he("Col"),ht=he("authError"),Ht=he("Markdown",!0),ur=he("JumpToPath",!0);let Gt=this.getValue(),tr=s()(K=Ce.allErrors()).call(K,yr=>yr.get("authId")===et);return b.createElement("div",null,b.createElement("h4",null,b.createElement("code",null,et||le.get("name"))," (apiKey)",b.createElement(ur,{path:["securityDefinitions",et]})),Gt&&b.createElement("h6",null,"Authorized"),b.createElement(bt,null,b.createElement(Ht,{source:le.get("description")})),b.createElement(bt,null,b.createElement("p",null,"Name: ",b.createElement("code",null,le.get("name")))),b.createElement(bt,null,b.createElement("p",null,"In: ",b.createElement("code",null,le.get("in")))),b.createElement(bt,null,b.createElement("label",null,"Value:"),Gt?b.createElement("code",null," ****** "):b.createElement(tt,null,b.createElement(Ye,{type:"text",onChange:this.onChange,autoFocus:!0}))),$()(Z=tr.valueSeq()).call(Z,(yr,jr)=>b.createElement(ht,{error:yr,key:jr})))}}class ke extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"onChange",et=>{let{onChange:Ye}=this.props,{value:bt,name:tt}=et.target,ht=this.state.value;ht[tt]=bt,this.setState({value:ht}),Ye(this.state)});let{schema:le,name:he}=this.props,Ce=this.getValue().username;this.state={name:he,schema:le,value:Ce?{username:Ce}:{}}}getValue(){let{authorized:K,name:Z}=this.props;return K&&K.getIn([Z,"value"])||{}}render(){var K,Z;let{schema:le,getComponent:he,name:Ce,errSelectors:et}=this.props;const Ye=he("Input"),bt=he("Row"),tt=he("Col"),ht=he("authError"),Ht=he("JumpToPath",!0),ur=he("Markdown",!0);let Gt=this.getValue().username,tr=s()(K=et.allErrors()).call(K,yr=>yr.get("authId")===Ce);return b.createElement("div",null,b.createElement("h4",null,"Basic authorization",b.createElement(Ht,{path:["securityDefinitions",Ce]})),Gt&&b.createElement("h6",null,"Authorized"),b.createElement(bt,null,b.createElement(ur,{source:le.get("description")})),b.createElement(bt,null,b.createElement("label",null,"Username:"),Gt?b.createElement("code",null," ",Gt," "):b.createElement(tt,null,b.createElement(Ye,{type:"text",required:"required",name:"username",onChange:this.onChange,autoFocus:!0}))),b.createElement(bt,null,b.createElement("label",null,"Password:"),Gt?b.createElement("code",null," ****** "):b.createElement(tt,null,b.createElement(Ye,{autoComplete:"new-password",name:"password",type:"password",onChange:this.onChange}))),$()(Z=tr.valueSeq()).call(Z,(yr,jr)=>b.createElement(ht,{error:yr,key:jr})))}}function ze(Ge){const{example:K,showValue:Z,getComponent:le,getConfigs:he}=Ge,Ce=le("Markdown",!0),et=le("highlightCode");return K?b.createElement("div",{className:"example"},K.get("description")?b.createElement("section",{className:"example__section"},b.createElement("div",{className:"example__section-header"},"Example Description"),b.createElement("p",null,b.createElement(Ce,{source:K.get("description")}))):null,Z&&K.has("value")?b.createElement("section",{className:"example__section"},b.createElement("div",{className:"example__section-header"},"Example Value"),b.createElement(et,{getConfigs:he,value:(0,ie.Pz)(K.get("value"))})):null):null}var Tt=cr(18492),_t=cr.n(Tt);class nt extends b.PureComponent{constructor(){var K;super(...arguments),K=this,Me()(this,"_onSelect",function(Z){let{isSyntheticChange:le=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof K.props.onSelect=="function"&&K.props.onSelect(Z,{isSyntheticChange:le})}),Me()(this,"_onDomSelect",Z=>{if(typeof this.props.onSelect=="function"){const le=Z.target.selectedOptions[0].getAttribute("value");this._onSelect(le,{isSyntheticChange:!1})}}),Me()(this,"getCurrentExample",()=>{const{examples:Z,currentExampleKey:le}=this.props,he=Z.get(le),Ce=Z.keySeq().first(),et=Z.get(Ce);return he||et||_t()({})})}componentDidMount(){const{onSelect:K,examples:Z}=this.props;if(typeof K=="function"){const le=Z.first(),he=Z.keyOf(le);this._onSelect(he,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(K){const{currentExampleKey:Z,examples:le}=K;if(le!==this.props.examples&&!le.has(Z)){const he=le.first(),Ce=le.keyOf(he);this._onSelect(Ce,{isSyntheticChange:!0})}}render(){const{examples:K,currentExampleKey:Z,isValueModified:le,isModifiedValueAvailable:he,showLabels:Ce}=this.props;return b.createElement("div",{className:"examples-select"},Ce?b.createElement("span",{className:"examples-select__section-label"},"Examples: "):null,b.createElement("select",{className:"examples-select-element",onChange:this._onDomSelect,value:he&&le?"__MODIFIED__VALUE__":Z||""},he?b.createElement("option",{value:"__MODIFIED__VALUE__"},"[Modified value]"):null,$()(K).call(K,(et,Ye)=>b.createElement("option",{key:Ye,value:Ye},et.get("summary")||Ye)).valueSeq()))}}Me()(nt,"defaultProps",{examples:te().Map({}),onSelect:function(){for(var Ge=arguments.length,K=new Array(Ge),Z=0;Z<Ge;Z++)K[Z]=arguments[Z];return console.log("DEBUG: ExamplesSelect was not given an onSelect callback",...K)},currentExampleKey:null,showLabels:!0});const Ot=Ge=>X.List.isList(Ge)?Ge:(0,ie.Pz)(Ge);class rt extends b.PureComponent{constructor(K){var Z;super(K),Z=this,Me()(this,"_getStateForCurrentNamespace",()=>{const{currentNamespace:he}=this.props;return(this.state[he]||(0,X.Map)()).toObject()}),Me()(this,"_setStateForCurrentNamespace",he=>{const{currentNamespace:Ce}=this.props;return this._setStateForNamespace(Ce,he)}),Me()(this,"_setStateForNamespace",(he,Ce)=>{const et=(this.state[he]||(0,X.Map)()).mergeDeep(Ce);return this.setState({[he]:et})}),Me()(this,"_isCurrentUserInputSameAsExampleValue",()=>{const{currentUserInputValue:he}=this.props;return this._getCurrentExampleValue()===he}),Me()(this,"_getValueForExample",(he,Ce)=>{const{examples:et}=Ce||this.props;return Ot((et||(0,X.Map)({})).getIn([he,"value"]))}),Me()(this,"_getCurrentExampleValue",he=>{const{currentKey:Ce}=he||this.props;return this._getValueForExample(Ce,he||this.props)}),Me()(this,"_onExamplesSelect",function(he){let{isSyntheticChange:Ce}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{onSelect:et,updateValue:Ye,currentUserInputValue:bt,userHasEditedBody:tt}=Z.props,{lastUserEditedValue:ht}=Z._getStateForCurrentNamespace(),Ht=Z._getValueForExample(he);if(he==="__MODIFIED__VALUE__")return Ye(Ot(ht)),Z._setStateForCurrentNamespace({isModifiedValueSelected:!0});if(typeof et=="function"){for(var ur=arguments.length,Gt=new Array(ur>2?ur-2:0),tr=2;tr<ur;tr++)Gt[tr-2]=arguments[tr];et(he,{isSyntheticChange:Ce},...Gt)}Z._setStateForCurrentNamespace({lastDownstreamValue:Ht,isModifiedValueSelected:Ce&&tt||!!bt&&bt!==Ht}),Ce||typeof Ye=="function"&&Ye(Ot(Ht))});const le=this._getCurrentExampleValue();this.state={[K.currentNamespace]:(0,X.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:le,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==le})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}UNSAFE_componentWillReceiveProps(K){const{currentUserInputValue:Z,examples:le,onSelect:he,userHasEditedBody:Ce}=K,{lastUserEditedValue:et,lastDownstreamValue:Ye}=this._getStateForCurrentNamespace(),bt=this._getValueForExample(K.currentKey,K),tt=s()(le).call(le,ht=>ht.get("value")===Z||(0,ie.Pz)(ht.get("value"))===Z);if(tt.size){let ht;ht=tt.has(K.currentKey)?K.currentKey:tt.keySeq().first(),he(ht,{isSyntheticChange:!0})}else Z!==this.props.currentUserInputValue&&Z!==et&&Z!==Ye&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(K.currentNamespace,{lastUserEditedValue:K.currentUserInputValue,isModifiedValueSelected:Ce||Z!==bt}))}render(){const{currentUserInputValue:K,examples:Z,currentKey:le,getComponent:he,userHasEditedBody:Ce}=this.props,{lastDownstreamValue:et,lastUserEditedValue:Ye,isModifiedValueSelected:bt}=this._getStateForCurrentNamespace(),tt=he("ExamplesSelect");return b.createElement(tt,{examples:Z,currentExampleKey:le,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!Ye&&Ye!==et,isValueModified:K!==void 0&&bt&&K!==this._getCurrentExampleValue()||Ce})}}Me()(rt,"defaultProps",{userHasEditedBody:!1,examples:(0,X.Map)({}),currentNamespace:"__DEFAULT__NAMESPACE__",setRetainRequestBodyValueFlag:()=>{},onSelect:function(){for(var Ge=arguments.length,K=new Array(Ge),Z=0;Z<Ge;Z++)K[Z]=arguments[Z];return console.log("ExamplesSelectValueRetainer: no `onSelect` function was provided",...K)},updateValue:function(){for(var Ge=arguments.length,K=new Array(Ge),Z=0;Z<Ge;Z++)K[Z]=arguments[Z];return console.log("ExamplesSelectValueRetainer: no `updateValue` function was provided",...K)}});var v=cr(25110),U=cr.n(v),oe=cr(8712),we=cr.n(oe),me=cr(58118),Te=cr.n(me),pe=cr(84564),ae=cr.n(pe);class Oe extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"close",tr=>{tr.preventDefault();let{authActions:yr}=this.props;yr.showDefinitions(!1)}),Me()(this,"authorize",()=>{let{authActions:tr,errActions:yr,getConfigs:jr,authSelectors:Tr,oas3Selectors:ln}=this.props,vn=jr(),Fr=Tr.getConfigs();yr.clear({authId:name,type:"auth",source:"auth"}),function(Lr){let{auth:Dr,authActions:cn,errActions:Cr,configs:Qn,authConfigs:Br={},currentServer:un}=Lr,{schema:Sn,scopes:hn,name:Vn,clientId:Mn}=Dr,po=Sn.get("flow"),Bn=[];switch(po){case"password":return void cn.authorizePassword(Dr);case"application":case"clientCredentials":case"client_credentials":return void cn.authorizeApplication(Dr);case"accessCode":case"authorizationCode":case"authorization_code":Bn.push("response_type=code");break;case"implicit":Bn.push("response_type=token")}typeof Mn=="string"&&Bn.push("client_id="+encodeURIComponent(Mn));let Po=Qn.oauth2RedirectUrl;if(Po===void 0)return void Cr.newAuthErr({authId:Vn,source:"validation",level:"error",message:"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed."});Bn.push("redirect_uri="+encodeURIComponent(Po));let So=[];if(x()(hn)?So=hn:te().List.isList(hn)&&(So=hn.toArray()),So.length>0){let nn=Br.scopeSeparator||" ";Bn.push("scope="+encodeURIComponent(So.join(nn)))}let Lo=(0,ie.r3)(new Date);if(Bn.push("state="+encodeURIComponent(Lo)),Br.realm!==void 0&&Bn.push("realm="+encodeURIComponent(Br.realm)),(po==="authorizationCode"||po==="authorization_code"||po==="accessCode")&&Br.usePkceWithAuthorizationCodeGrant){const nn=(0,ie.Uj)(),gn=(0,ie.Xb)(nn);Bn.push("code_challenge="+gn),Bn.push("code_challenge_method=S256"),Dr.codeVerifier=nn}let{additionalQueryStringParams:Uo}=Br;for(let nn in Uo){var fs;Uo[nn]!==void 0&&Bn.push($()(fs=[nn,Uo[nn]]).call(fs,encodeURIComponent).join("="))}const Bo=Sn.get("authorizationUrl");let Zo;Zo=un?ae()((0,ie.Nm)(Bo),un,!0).toString():(0,ie.Nm)(Bo);let ts,zo=[Zo,Bn.join("&")].join(xt()(Bo).call(Bo,"?")===-1?"?":"&");ts=po==="implicit"?cn.preAuthorizeImplicit:Br.useBasicAuthenticationWithAccessCodeGrant?cn.authorizeAccessCodeWithBasicAuthentication:cn.authorizeAccessCodeWithFormParams,cn.authPopup(zo,{auth:Dr,state:Lo,redirectUrl:Po,callback:ts,errCb:Cr.newAuthErr})}({auth:this.state,currentServer:ln.serverEffectiveValue(ln.selectedServer()),authActions:tr,errActions:yr,configs:vn,authConfigs:Fr})}),Me()(this,"onScopeChange",tr=>{var yr,jr;let{target:Tr}=tr,{checked:ln}=Tr,vn=Tr.dataset.value;if(ln&&xt()(yr=this.state.scopes).call(yr,vn)===-1){var Fr;let Dr=M()(Fr=this.state.scopes).call(Fr,[vn]);this.setState({scopes:Dr})}else if(!ln&&xt()(jr=this.state.scopes).call(jr,vn)>-1){var Lr;this.setState({scopes:s()(Lr=this.state.scopes).call(Lr,Dr=>Dr!==vn)})}}),Me()(this,"onInputChange",tr=>{let{target:{dataset:{name:yr},value:jr}}=tr,Tr={[yr]:jr};this.setState(Tr)}),Me()(this,"selectScopes",tr=>{var yr;tr.target.dataset.all?this.setState({scopes:U()(we()(yr=this.props.schema.get("allowedScopes")||this.props.schema.get("scopes")).call(yr))}):this.setState({scopes:[]})}),Me()(this,"logout",tr=>{tr.preventDefault();let{authActions:yr,errActions:jr,name:Tr}=this.props;jr.clear({authId:Tr,type:"auth",source:"auth"}),yr.logoutWithPersistOption([Tr])});let{name:le,schema:he,authorized:Ce,authSelectors:et}=this.props,Ye=Ce&&Ce.get(le),bt=et.getConfigs()||{},tt=Ye&&Ye.get("username")||"",ht=Ye&&Ye.get("clientId")||bt.clientId||"",Ht=Ye&&Ye.get("clientSecret")||bt.clientSecret||"",ur=Ye&&Ye.get("passwordType")||"basic",Gt=Ye&&Ye.get("scopes")||bt.scopes||[];typeof Gt=="string"&&(Gt=Gt.split(bt.scopeSeparator||" ")),this.state={appName:bt.appName,name:le,schema:he,scopes:Gt,clientId:ht,clientSecret:Ht,username:tt,password:"",passwordType:ur}}render(){var K,Z;let{schema:le,getComponent:he,authSelectors:Ce,errSelectors:et,name:Ye,specSelectors:bt}=this.props;const tt=he("Input"),ht=he("Row"),Ht=he("Col"),ur=he("Button"),Gt=he("authError"),tr=he("JumpToPath",!0),yr=he("Markdown",!0),jr=he("InitializedInput"),{isOAS3:Tr}=bt;let ln=Tr()?le.get("openIdConnectUrl"):null;const vn="implicit",Fr="password",Lr=Tr()?ln?"authorization_code":"authorizationCode":"accessCode",Dr=Tr()?ln?"client_credentials":"clientCredentials":"application";let cn=!!(Ce.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,Cr=le.get("flow"),Qn=Cr===Lr&&cn?Cr+" with PKCE":Cr,Br=le.get("allowedScopes")||le.get("scopes"),un=!!Ce.authorized().get(Ye),Sn=s()(K=et.allErrors()).call(K,Mn=>Mn.get("authId")===Ye),hn=!s()(Sn).call(Sn,Mn=>Mn.get("source")==="validation").size,Vn=le.get("description");return b.createElement("div",null,b.createElement("h4",null,Ye," (OAuth2, ",Qn,") ",b.createElement(tr,{path:["securityDefinitions",Ye]})),this.state.appName?b.createElement("h5",null,"Application: ",this.state.appName," "):null,Vn&&b.createElement(yr,{source:le.get("description")}),un&&b.createElement("h6",null,"Authorized"),ln&&b.createElement("p",null,"OpenID Connect URL: ",b.createElement("code",null,ln)),(Cr===vn||Cr===Lr)&&b.createElement("p",null,"Authorization URL: ",b.createElement("code",null,le.get("authorizationUrl"))),(Cr===Fr||Cr===Lr||Cr===Dr)&&b.createElement("p",null,"Token URL:",b.createElement("code",null," ",le.get("tokenUrl"))),b.createElement("p",{className:"flow"},"Flow: ",b.createElement("code",null,Qn)),Cr!==Fr?null:b.createElement(ht,null,b.createElement(ht,null,b.createElement("label",{htmlFor:"oauth_username"},"username:"),un?b.createElement("code",null," ",this.state.username," "):b.createElement(Ht,{tablet:10,desktop:10},b.createElement("input",{id:"oauth_username",type:"text","data-name":"username",onChange:this.onInputChange,autoFocus:!0}))),b.createElement(ht,null,b.createElement("label",{htmlFor:"oauth_password"},"password:"),un?b.createElement("code",null," ****** "):b.createElement(Ht,{tablet:10,desktop:10},b.createElement("input",{id:"oauth_password",type:"password","data-name":"password",onChange:this.onInputChange}))),b.createElement(ht,null,b.createElement("label",{htmlFor:"password_type"},"Client credentials location:"),un?b.createElement("code",null," ",this.state.passwordType," "):b.createElement(Ht,{tablet:10,desktop:10},b.createElement("select",{id:"password_type","data-name":"passwordType",onChange:this.onInputChange},b.createElement("option",{value:"basic"},"Authorization header"),b.createElement("option",{value:"request-body"},"Request body"))))),(Cr===Dr||Cr===vn||Cr===Lr||Cr===Fr)&&(!un||un&&this.state.clientId)&&b.createElement(ht,null,b.createElement("label",{htmlFor:"client_id"},"client_id:"),un?b.createElement("code",null," ****** "):b.createElement(Ht,{tablet:10,desktop:10},b.createElement(jr,{id:"client_id",type:"text",required:Cr===Fr,initialValue:this.state.clientId,"data-name":"clientId",onChange:this.onInputChange}))),(Cr===Dr||Cr===Lr||Cr===Fr)&&b.createElement(ht,null,b.createElement("label",{htmlFor:"client_secret"},"client_secret:"),un?b.createElement("code",null," ****** "):b.createElement(Ht,{tablet:10,desktop:10},b.createElement(jr,{id:"client_secret",initialValue:this.state.clientSecret,type:"password","data-name":"clientSecret",onChange:this.onInputChange}))),!un&&Br&&Br.size?b.createElement("div",{className:"scopes"},b.createElement("h2",null,"Scopes:",b.createElement("a",{onClick:this.selectScopes,"data-all":!0},"select all"),b.createElement("a",{onClick:this.selectScopes},"select none")),$()(Br).call(Br,(Mn,po)=>{var Bn;return b.createElement(ht,{key:po},b.createElement("div",{className:"checkbox"},b.createElement(tt,{"data-value":po,id:`${po}-${Cr}-checkbox-${this.state.name}`,disabled:un,checked:Te()(Bn=this.state.scopes).call(Bn,po),type:"checkbox",onChange:this.onScopeChange}),b.createElement("label",{htmlFor:`${po}-${Cr}-checkbox-${this.state.name}`},b.createElement("span",{className:"item"}),b.createElement("div",{className:"text"},b.createElement("p",{className:"name"},po),b.createElement("p",{className:"description"},Mn)))))}).toArray()):null,$()(Z=Sn.valueSeq()).call(Z,(Mn,po)=>b.createElement(Gt,{error:Mn,key:po})),b.createElement("div",{className:"auth-btn-wrapper"},hn&&(un?b.createElement(ur,{className:"btn modal-btn auth authorize",onClick:this.logout},"Logout"):b.createElement(ur,{className:"btn modal-btn auth authorize",onClick:this.authorize},"Authorize")),b.createElement(ur,{className:"btn modal-btn auth btn-done",onClick:this.close},"Close")))}}class it extends b.Component{constructor(){super(...arguments),Me()(this,"onClick",()=>{let{specActions:K,path:Z,method:le}=this.props;K.clearResponse(Z,le),K.clearRequest(Z,le)})}render(){return b.createElement("button",{className:"btn btn-clear opblock-control__btn",onClick:this.onClick},"Clear")}}const mt=Ge=>{let{headers:K}=Ge;return b.createElement("div",null,b.createElement("h5",null,"Response headers"),b.createElement("pre",{className:"microlight"},K))},wt=Ge=>{let{duration:K}=Ge;return b.createElement("div",null,b.createElement("h5",null,"Request duration"),b.createElement("pre",{className:"microlight"},K," ms"))};class qt extends b.Component{shouldComponentUpdate(K){return this.props.response!==K.response||this.props.path!==K.path||this.props.method!==K.method||this.props.displayRequestDuration!==K.displayRequestDuration}render(){const{response:K,getComponent:Z,getConfigs:le,displayRequestDuration:he,specSelectors:Ce,path:et,method:Ye}=this.props,{showMutatedRequest:bt,requestSnippetsEnabled:tt}=le(),ht=bt?Ce.mutatedRequestFor(et,Ye):Ce.requestFor(et,Ye),Ht=K.get("status"),ur=ht.get("url"),Gt=K.get("headers").toJS(),tr=K.get("notDocumented"),yr=K.get("error"),jr=K.get("text"),Tr=K.get("duration"),ln=c()(Gt),vn=Gt["content-type"]||Gt["Content-Type"],Fr=Z("responseBody"),Lr=$()(ln).call(ln,Br=>{var un=x()(Gt[Br])?Gt[Br].join():Gt[Br];return b.createElement("span",{className:"headerline",key:Br}," ",Br,": ",un," ")}),Dr=Lr.length!==0,cn=Z("Markdown",!0),Cr=Z("RequestSnippets",!0),Qn=Z("curl");return b.createElement("div",null,ht&&(tt===!0||tt==="true"?b.createElement(Cr,{request:ht}):b.createElement(Qn,{request:ht,getConfigs:le})),ur&&b.createElement("div",null,b.createElement("div",{className:"request-url"},b.createElement("h4",null,"Request URL"),b.createElement("pre",{className:"microlight"},ur))),b.createElement("h4",null,"Server response"),b.createElement("table",{className:"responses-table live-responses-table"},b.createElement("thead",null,b.createElement("tr",{className:"responses-header"},b.createElement("td",{className:"col_header response-col_status"},"Code"),b.createElement("td",{className:"col_header response-col_description"},"Details"))),b.createElement("tbody",null,b.createElement("tr",{className:"response"},b.createElement("td",{className:"response-col_status"},Ht,tr?b.createElement("div",{className:"response-undocumented"},b.createElement("i",null," Undocumented ")):null),b.createElement("td",{className:"response-col_description"},yr?b.createElement(cn,{source:`${K.get("name")!==""?`${K.get("name")}: `:""}${K.get("message")}`}):null,jr?b.createElement(Fr,{content:jr,contentType:vn,url:ur,headers:Gt,getConfigs:le,getComponent:Z}):null,Dr?b.createElement(mt,{headers:Lr}):null,he&&Tr?b.createElement(wt,{duration:Tr}):null)))))}}var Xt=cr(5623);class fr extends b.Component{constructor(){super(...arguments),Me()(this,"renderOperationTag",(K,Z)=>{const{specSelectors:le,getComponent:he,oas3Selectors:Ce,layoutSelectors:et,layoutActions:Ye,getConfigs:bt}=this.props,tt=le.validOperationMethods(),ht=he("OperationContainer",!0),Ht=he("OperationTag"),ur=K.get("operations");return b.createElement(Ht,{key:"operation-"+Z,tagObj:K,tag:Z,oas3Selectors:Ce,layoutSelectors:et,layoutActions:Ye,getConfigs:bt,getComponent:he,specUrl:le.url()},b.createElement("div",{className:"operation-tag-content"},$()(ur).call(ur,Gt=>{const tr=Gt.get("path"),yr=Gt.get("method"),jr=te().List(["paths",tr,yr]);return xt()(tt).call(tt,yr)===-1?null:b.createElement(ht,{key:`${tr}-${yr}`,specPath:jr,op:Gt,path:tr,method:yr,tag:Z})}).toArray()))})}render(){let{specSelectors:K}=this.props;const Z=K.taggedOperations();return Z.size===0?b.createElement("h3",null," No operations defined in spec!"):b.createElement("div",null,$()(Z).call(Z,this.renderOperationTag).toArray(),Z.size<1?b.createElement("h3",null," No operations defined in spec! "):null)}}var Ee=cr(63543);class Le extends b.Component{render(){const{tagObj:K,tag:Z,children:le,oas3Selectors:he,layoutSelectors:Ce,layoutActions:et,getConfigs:Ye,getComponent:bt,specUrl:tt}=this.props;let{docExpansion:ht,deepLinking:Ht}=Ye();const ur=Ht&&Ht!=="false",Gt=bt("Collapse"),tr=bt("Markdown",!0),yr=bt("DeepLink"),jr=bt("Link"),Tr=bt("ArrowUpIcon"),ln=bt("ArrowDownIcon");let vn,Fr=K.getIn(["tagDetails","description"],null),Lr=K.getIn(["tagDetails","externalDocs","description"]),Dr=K.getIn(["tagDetails","externalDocs","url"]);vn=(0,ie.Wl)(he)&&(0,ie.Wl)(he.selectedServer)?(0,Ee.mn)(Dr,tt,{selectedServer:he.selectedServer()}):Dr;let cn=["operations-tag",Z],Cr=Ce.isShown(cn,ht==="full"||ht==="list");return b.createElement("div",{className:Cr?"opblock-tag-section is-open":"opblock-tag-section"},b.createElement("h3",{onClick:()=>et.show(cn,!Cr),className:Fr?"opblock-tag":"opblock-tag no-desc",id:$()(cn).call(cn,Qn=>(0,ie.J6)(Qn)).join("-"),"data-tag":Z,"data-is-open":Cr},b.createElement(yr,{enabled:ur,isShown:Cr,path:(0,ie.oJ)(Z),text:Z}),Fr?b.createElement("small",null,b.createElement(tr,{source:Fr})):b.createElement("small",null),vn?b.createElement("div",{className:"info__externaldocs"},b.createElement("small",null,b.createElement(jr,{href:(0,ie.Nm)(vn),onClick:Qn=>Qn.stopPropagation(),target:"_blank"},Lr||vn))):null,b.createElement("button",{"aria-expanded":Cr,className:"expand-operation",title:Cr?"Collapse operation":"Expand operation",onClick:()=>et.show(cn,!Cr)},Cr?b.createElement(Tr,{className:"arrow"}):b.createElement(ln,{className:"arrow"}))),b.createElement(Gt,{isOpened:Cr},le))}}Me()(Le,"defaultProps",{tagObj:te().fromJS({}),tag:""});class ot extends b.PureComponent{render(){let{specPath:K,response:Z,request:le,toggleShown:he,onTryoutClick:Ce,onResetClick:et,onCancelClick:Ye,onExecute:bt,fn:tt,getComponent:ht,getConfigs:Ht,specActions:ur,specSelectors:Gt,authActions:tr,authSelectors:yr,oas3Actions:jr,oas3Selectors:Tr}=this.props,ln=this.props.operation,{deprecated:vn,isShown:Fr,path:Lr,method:Dr,op:cn,tag:Cr,operationId:Qn,allowTryItOut:Br,displayRequestDuration:un,tryItOutEnabled:Sn,executeInProgress:hn}=ln.toJS(),{description:Vn,externalDocs:Mn,schemes:po}=cn;const Bn=Mn?(0,Ee.mn)(Mn.url,Gt.url(),{selectedServer:Tr.selectedServer()}):"";let Po=ln.getIn(["op"]),So=Po.get("responses"),Lo=(0,ie.gp)(Po,["parameters"]),Uo=Gt.operationScheme(Lr,Dr),fs=["operations",Cr,Qn],Bo=(0,ie.nX)(Po);const Zo=ht("responses"),ts=ht("parameters"),zo=ht("execute"),nn=ht("clear"),gn=ht("Collapse"),on=ht("Markdown",!0),ho=ht("schemes"),is=ht("OperationServers"),Js=ht("OperationExt"),ua=ht("OperationSummary"),_s=ht("Link"),{showExtensions:Ki}=Ht();if(So&&Z&&Z.size>0){let Ks=!So.get(String(Z.get("status")))&&!So.get("default");Z=Z.set("notDocumented",Ks)}let rc=[Lr,Dr];const Ci=Gt.validationErrors([Lr,Dr]);return b.createElement("div",{className:vn?"opblock opblock-deprecated":Fr?`opblock opblock-${Dr} is-open`:`opblock opblock-${Dr}`,id:(0,ie.J6)(fs.join("-"))},b.createElement(ua,{operationProps:ln,isShown:Fr,toggleShown:he,getComponent:ht,authActions:tr,authSelectors:yr,specPath:K}),b.createElement(gn,{isOpened:Fr},b.createElement("div",{className:"opblock-body"},Po&&Po.size||Po===null?null:b.createElement("img",{height:"32px",width:"32px",src:cr(2517),className:"opblock-loading-animation"}),vn&&b.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),Vn&&b.createElement("div",{className:"opblock-description-wrapper"},b.createElement("div",{className:"opblock-description"},b.createElement(on,{source:Vn}))),Bn?b.createElement("div",{className:"opblock-external-docs-wrapper"},b.createElement("h4",{className:"opblock-title_normal"},"Find more details"),b.createElement("div",{className:"opblock-external-docs"},Mn.description&&b.createElement("span",{className:"opblock-external-docs__description"},b.createElement(on,{source:Mn.description})),b.createElement(_s,{target:"_blank",className:"opblock-external-docs__link",href:(0,ie.Nm)(Bn)},Bn))):null,Po&&Po.size?b.createElement(ts,{parameters:Lo,specPath:K.push("parameters"),operation:Po,onChangeKey:rc,onTryoutClick:Ce,onResetClick:et,onCancelClick:Ye,tryItOutEnabled:Sn,allowTryItOut:Br,fn:tt,getComponent:ht,specActions:ur,specSelectors:Gt,pathMethod:[Lr,Dr],getConfigs:Ht,oas3Actions:jr,oas3Selectors:Tr}):null,Sn?b.createElement(is,{getComponent:ht,path:Lr,method:Dr,operationServers:Po.get("servers"),pathServers:Gt.paths().getIn([Lr,"servers"]),getSelectedServer:Tr.selectedServer,setSelectedServer:jr.setSelectedServer,setServerVariableValue:jr.setServerVariableValue,getServerVariable:Tr.serverVariableValue,getEffectiveServerValue:Tr.serverEffectiveValue}):null,Sn&&Br&&po&&po.size?b.createElement("div",{className:"opblock-schemes"},b.createElement(ho,{schemes:po,path:Lr,method:Dr,specActions:ur,currentScheme:Uo})):null,!Sn||!Br||Ci.length<=0?null:b.createElement("div",{className:"validation-errors errors-wrapper"},"Please correct the following validation errors and try again.",b.createElement("ul",null,$()(Ci).call(Ci,(Ks,Al)=>b.createElement("li",{key:Al}," ",Ks," ")))),b.createElement("div",{className:Sn&&Z&&Br?"btn-group":"execute-wrapper"},Sn&&Br?b.createElement(zo,{operation:Po,specActions:ur,specSelectors:Gt,oas3Selectors:Tr,oas3Actions:jr,path:Lr,method:Dr,onExecute:bt,disabled:hn}):null,Sn&&Z&&Br?b.createElement(nn,{specActions:ur,path:Lr,method:Dr}):null),hn?b.createElement("div",{className:"loading-container"},b.createElement("div",{className:"loading"})):null,So?b.createElement(Zo,{responses:So,request:le,tryItOutResponse:Z,getComponent:ht,getConfigs:Ht,specSelectors:Gt,oas3Actions:jr,oas3Selectors:Tr,specActions:ur,produces:Gt.producesOptionsFor([Lr,Dr]),producesValue:Gt.currentProducesFor([Lr,Dr]),specPath:K.push("responses"),path:Lr,method:Dr,displayRequestDuration:un,fn:tt}):null,Ki&&Bo.size?b.createElement(Js,{extensions:Bo,getComponent:ht}):null)))}}Me()(ot,"defaultProps",{operation:null,response:null,request:null,specPath:(0,X.List)(),summary:""});var Zt=cr(79833),ct=cr.n(Zt);class Qt extends b.PureComponent{render(){let{isShown:K,toggleShown:Z,getComponent:le,authActions:he,authSelectors:Ce,operationProps:et,specPath:Ye}=this.props,{summary:bt,isAuthorized:tt,method:ht,op:Ht,showSummary:ur,path:Gt,operationId:tr,originalOperationId:yr,displayOperationId:jr}=et.toJS(),{summary:Tr}=Ht,ln=et.get("security");const vn=le("authorizeOperationBtn",!0),Fr=le("OperationSummaryMethod"),Lr=le("OperationSummaryPath"),Dr=le("JumpToPath",!0),cn=le("CopyToClipboardBtn",!0),Cr=le("ArrowUpIcon"),Qn=le("ArrowDownIcon"),Br=ln&&!!ln.count(),un=Br&&ln.size===1&&ln.first().isEmpty(),Sn=!Br||un;return b.createElement("div",{className:`opblock-summary opblock-summary-${ht}`},b.createElement("button",{"aria-label":`${ht} ${Gt.replace(/\//g,"​/")}`,"aria-expanded":K,className:"opblock-summary-control",onClick:Z},b.createElement(Fr,{method:ht}),b.createElement(Lr,{getComponent:le,operationProps:et,specPath:Ye}),ur?b.createElement("div",{className:"opblock-summary-description"},ct()(Tr||bt)):null,jr&&(yr||tr)?b.createElement("span",{className:"opblock-summary-operation-id"},yr||tr):null,K?b.createElement(Cr,{className:"arrow"}):b.createElement(Qn,{className:"arrow"})),Sn?null:b.createElement(vn,{isAuthorized:tt,onClick:()=>{const hn=Ce.definitionsForRequirements(ln);he.showDefinitions(hn)}}),b.createElement(cn,{textToCopy:`${Ye.get(1)}`}),b.createElement(Dr,{path:Ye}))}}Me()(Qt,"defaultProps",{operationProps:null,specPath:(0,X.List)(),summary:""});class lr extends b.PureComponent{render(){let{method:K}=this.props;return b.createElement("span",{className:"opblock-summary-method"},K.toUpperCase())}}Me()(lr,"defaultProps",{operationProps:null});var Pr=cr(39940),yt=cr.n(Pr);class Nt extends b.PureComponent{render(){let{getComponent:K,operationProps:Z}=this.props,{deprecated:le,isShown:he,path:Ce,tag:et,operationId:Ye,isDeepLinkingEnabled:bt}=Z.toJS();const tt=Ce.split(/(?=\/)/g);for(let Ht=1;Ht<tt.length;Ht+=2)yt()(tt).call(tt,Ht,0,b.createElement("wbr",{key:Ht}));const ht=K("DeepLink");return b.createElement("span",{className:le?"opblock-summary-path__deprecated":"opblock-summary-path","data-path":Ce},b.createElement(ht,{enabled:bt,isShown:he,path:(0,ie.oJ)(`${et}/${Ye}`),text:tt}))}}const Bt=Ge=>{var K;let{extensions:Z,getComponent:le}=Ge,he=le("OperationExtRow");return b.createElement("div",{className:"opblock-section"},b.createElement("div",{className:"opblock-section-header"},b.createElement("h4",null,"Extensions")),b.createElement("div",{className:"table-container"},b.createElement("table",null,b.createElement("thead",null,b.createElement("tr",null,b.createElement("td",{className:"col_header"},"Field"),b.createElement("td",{className:"col_header"},"Value"))),b.createElement("tbody",null,$()(K=Z.entrySeq()).call(K,Ce=>{let[et,Ye]=Ce;return b.createElement(he,{key:`${et}-${Ye}`,xKey:et,xVal:Ye})})))))},nr=Ge=>{let{xKey:K,xVal:Z}=Ge;const le=Z?Z.toJS?Z.toJS():Z:null;return b.createElement("tr",null,b.createElement("td",null,K),b.createElement("td",null,h()(le)))};var dr=cr(86),Or=cr.n(dr),yn=cr(94184),Jr=cr.n(yn),Ft=cr(33424),eo=cr(27361),no=cr.n(eo),jo=cr(23560),To=cr.n(jo),Eo=cr(35823),Ro=cr.n(Eo),$o=cr(74855);const rs=Ge=>{let{value:K,fileName:Z,className:le,downloadable:he,getConfigs:Ce,canCopy:et,language:Ye}=Ge;const bt=To()(Ce)?Ce():null,tt=no()(bt,"syntaxHighlight")!==!1&&no()(bt,"syntaxHighlight.activated",!0),ht=(0,b.useRef)(null);(0,b.useEffect)(()=>{var ur;const Gt=s()(ur=U()(ht.current.childNodes)).call(ur,tr=>!!tr.nodeType&&tr.classList.contains("microlight"));return Or()(Gt).call(Gt,tr=>tr.addEventListener("mousewheel",Ht,{passive:!1})),()=>{Or()(Gt).call(Gt,tr=>tr.removeEventListener("mousewheel",Ht))}},[K,le,Ye]);const Ht=ur=>{const{target:Gt,deltaY:tr}=ur,{scrollHeight:yr,offsetHeight:jr,scrollTop:Tr}=Gt;yr>jr&&(Tr===0&&tr<0||jr+Tr>=yr&&tr>0)&&ur.preventDefault()};return b.createElement("div",{className:"highlight-code",ref:ht},he?b.createElement("div",{className:"download-contents",onClick:()=>{Ro()(K,Z)}},"Download"):null,et&&b.createElement("div",{className:"copy-to-clipboard"},b.createElement($o.CopyToClipboard,{text:K},b.createElement("button",null))),tt?b.createElement(Ft.d3,{language:Ye,className:Jr()(le,"microlight"),style:(0,Ft.C2)(no()(bt,"syntaxHighlight.theme","agate"))},K):b.createElement("pre",{className:Jr()(le,"microlight")},K))};rs.defaultProps={fileName:"response.txt"};const As=rs;class qr extends b.Component{constructor(){super(...arguments),Me()(this,"onChangeProducesWrapper",K=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],K)),Me()(this,"onResponseContentTypeChange",K=>{let{controlsAcceptHeader:Z,value:le}=K;const{oas3Actions:he,path:Ce,method:et}=this.props;Z&&he.setResponseContentType({value:le,path:Ce,method:et})})}render(){var K;let{responses:Z,tryItOutResponse:le,getComponent:he,getConfigs:Ce,specSelectors:et,fn:Ye,producesValue:bt,displayRequestDuration:tt,specPath:ht,path:Ht,method:ur,oas3Selectors:Gt,oas3Actions:tr}=this.props,yr=(0,ie.iQ)(Z);const jr=he("contentType"),Tr=he("liveResponse"),ln=he("response");let vn=this.props.produces&&this.props.produces.size?this.props.produces:qr.defaultProps.produces;const Fr=et.isOAS3()?(0,ie.QG)(Z):null,Lr=function(cn){let Cr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"_";return cn.replace(/[^\w-]/g,Cr)}(`${ur}${Ht}_responses`),Dr=`${Lr}_select`;return b.createElement("div",{className:"responses-wrapper"},b.createElement("div",{className:"opblock-section-header"},b.createElement("h4",null,"Responses"),et.isOAS3()?null:b.createElement("label",{htmlFor:Dr},b.createElement("span",null,"Response content type"),b.createElement(jr,{value:bt,ariaControls:Lr,ariaLabel:"Response content type",className:"execute-content-type",contentTypes:vn,controlId:Dr,onChange:this.onChangeProducesWrapper}))),b.createElement("div",{className:"responses-inner"},le?b.createElement("div",null,b.createElement(Tr,{response:le,getComponent:he,getConfigs:Ce,specSelectors:et,path:this.props.path,method:this.props.method,displayRequestDuration:tt}),b.createElement("h4",null,"Responses")):null,b.createElement("table",{"aria-live":"polite",className:"responses-table",id:Lr,role:"region"},b.createElement("thead",null,b.createElement("tr",{className:"responses-header"},b.createElement("td",{className:"col_header response-col_status"},"Code"),b.createElement("td",{className:"col_header response-col_description"},"Description"),et.isOAS3()?b.createElement("td",{className:"col col_header response-col_links"},"Links"):null)),b.createElement("tbody",null,$()(K=Z.entrySeq()).call(K,cn=>{let[Cr,Qn]=cn,Br=le&&le.get("status")==Cr?"response_current":"";return b.createElement(ln,{key:Cr,path:Ht,method:ur,specPath:ht.push(Cr),isDefault:yr===Cr,fn:Ye,className:Br,code:Cr,response:Qn,specSelectors:et,controlsAcceptHeader:Qn===Fr,onContentTypeChange:this.onResponseContentTypeChange,contentType:bt,getConfigs:Ce,activeExamplesKey:Gt.activeExamplesMember(Ht,ur,"responses",Cr),oas3Actions:tr,getComponent:he})}).toArray()))))}}Me()(qr,"defaultProps",{tryItOutResponse:null,produces:(0,X.fromJS)(["application/json"]),displayRequestDuration:!1});var tn=cr(47273),bn=cr.n(tn),qn=cr(2518);class Qo extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"_onContentTypeChange",le=>{const{onContentTypeChange:he,controlsAcceptHeader:Ce}=this.props;this.setState({responseContentType:le}),he({value:le,controlsAcceptHeader:Ce})}),Me()(this,"getTargetExamplesKey",()=>{const{response:le,contentType:he,activeExamplesKey:Ce}=this.props,et=this.state.responseContentType||he,Ye=le.getIn(["content",et],(0,X.Map)({})).get("examples",null).keySeq().first();return Ce||Ye}),this.state={responseContentType:""}}render(){var K,Z;let{path:le,method:he,code:Ce,response:et,className:Ye,specPath:bt,fn:tt,getComponent:ht,getConfigs:Ht,specSelectors:ur,contentType:Gt,controlsAcceptHeader:tr,oas3Actions:yr}=this.props,{inferSchema:jr,getSampleSchema:Tr}=tt,ln=ur.isOAS3();const{showExtensions:vn}=Ht();let Fr=vn?(0,ie.nX)(et):null,Lr=et.get("headers"),Dr=et.get("links");const cn=ht("ResponseExtension"),Cr=ht("headers"),Qn=ht("highlightCode"),Br=ht("modelExample"),un=ht("Markdown",!0),Sn=ht("operationLink"),hn=ht("contentType"),Vn=ht("ExamplesSelect"),Mn=ht("Example");var po,Bn;const Po=this.state.responseContentType||Gt,So=et.getIn(["content",Po],(0,X.Map)({})),Lo=So.get("examples",null);if(ln){const nn=So.get("schema");po=nn?jr(nn.toJS()):null,Bn=nn?(0,X.List)(["content",this.state.responseContentType,"schema"]):bt}else po=et.get("schema"),Bn=et.has("schema")?bt.push("schema"):bt;let Uo,fs,Bo=!1,Zo={includeReadOnly:!0};if(ln){var ts;if(fs=(ts=So.get("schema"))===null||ts===void 0?void 0:ts.toJS(),Lo){const nn=this.getTargetExamplesKey(),gn=on=>on.get("value");Uo=gn(Lo.get(nn,(0,X.Map)({}))),Uo===void 0&&(Uo=gn(bn()(Lo).call(Lo).next().value)),Bo=!0}else So.get("example")!==void 0&&(Uo=So.get("example"),Bo=!0)}else{fs=po,Zo=Wh(gs({},Zo),{includeWriteOnly:!0});const nn=et.getIn(["examples",Po]);nn&&(Uo=nn,Bo=!0)}let zo=((nn,gn,on)=>{if(nn!=null){let ho=null;return(0,qn.O)(nn)&&(ho="json"),b.createElement("div",null,b.createElement(gn,{className:"example",getConfigs:on,language:ho,value:(0,ie.Pz)(nn)}))}return null})(Tr(fs,Po,Zo,Bo?Uo:void 0),Qn,Ht);return b.createElement("tr",{className:"response "+(Ye||""),"data-code":Ce},b.createElement("td",{className:"response-col_status"},Ce),b.createElement("td",{className:"response-col_description"},b.createElement("div",{className:"response-col_description__inner"},b.createElement(un,{source:et.get("description")})),vn&&Fr.size?$()(K=Fr.entrySeq()).call(K,nn=>{let[gn,on]=nn;return b.createElement(cn,{key:`${gn}-${on}`,xKey:gn,xVal:on})}):null,ln&&et.get("content")?b.createElement("section",{className:"response-controls"},b.createElement("div",{className:Jr()("response-control-media-type",{"response-control-media-type--accept-controller":tr})},b.createElement("small",{className:"response-control-media-type__title"},"Media type"),b.createElement(hn,{value:this.state.responseContentType,contentTypes:et.get("content")?et.get("content").keySeq():(0,X.Seq)(),onChange:this._onContentTypeChange,ariaLabel:"Media Type"}),tr?b.createElement("small",{className:"response-control-media-type__accept-message"},"Controls ",b.createElement("code",null,"Accept")," header."):null),Lo?b.createElement("div",{className:"response-control-examples"},b.createElement("small",{className:"response-control-examples__title"},"Examples"),b.createElement(Vn,{examples:Lo,currentExampleKey:this.getTargetExamplesKey(),onSelect:nn=>yr.setActiveExamplesMember({name:nn,pathMethod:[le,he],contextType:"responses",contextName:Ce}),showLabels:!1})):null):null,zo||po?b.createElement(Br,{specPath:Bn,getComponent:ht,getConfigs:Ht,specSelectors:ur,schema:(0,ie.oG)(po),example:zo,includeReadOnly:!0}):null,ln&&Lo?b.createElement(Mn,{example:Lo.get(this.getTargetExamplesKey(),(0,X.Map)({})),getComponent:ht,getConfigs:Ht,omitValue:!0}):null,Lr?b.createElement(Cr,{headers:Lr,getComponent:ht}):null),ln?b.createElement("td",{className:"response-col_links"},Dr?$()(Z=Dr.toSeq().entrySeq()).call(Z,nn=>{let[gn,on]=nn;return b.createElement(Sn,{key:gn,name:gn,link:on,getComponent:ht})}):b.createElement("i",null,"No links")):null)}}Me()(Qo,"defaultProps",{response:(0,X.fromJS)({}),onContentTypeChange:()=>{}});const qo=Ge=>{let{xKey:K,xVal:Z}=Ge;return b.createElement("div",{className:"response__extension"},K,": ",String(Z))};var ys=cr(63460),as=cr.n(ys),es=cr(3131),Ts=cr.n(es),io=cr(7334),Jo=cr.n(io);class Us extends b.PureComponent{constructor(){super(...arguments),Me()(this,"state",{parsedContent:null}),Me()(this,"updateParsedContent",K=>{const{content:Z}=this.props;if(K!==Z)if(Z&&Z instanceof Blob){var le=new FileReader;le.onload=()=>{this.setState({parsedContent:le.result})},le.readAsText(Z)}else this.setState({parsedContent:Z.toString()})})}componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(K){this.updateParsedContent(K.content)}render(){let{content:K,contentType:Z,url:le,headers:he={},getConfigs:Ce,getComponent:et}=this.props;const{parsedContent:Ye}=this.state,bt=et("highlightCode"),tt="response_"+new Date().getTime();let ht,Ht;if(le=le||"",(/^application\/octet-stream/i.test(Z)||he["Content-Disposition"]&&/attachment/i.test(he["Content-Disposition"])||he["content-disposition"]&&/attachment/i.test(he["content-disposition"])||he["Content-Description"]&&/File Transfer/i.test(he["Content-Description"])||he["content-description"]&&/File Transfer/i.test(he["content-description"]))&&K.size>0)if("Blob"in window){let ur=Z||"text/html",Gt=K instanceof Blob?K:new Blob([K],{type:ur}),tr=as().createObjectURL(Gt),yr=[ur,le.substr(r()(le).call(le,"/")+1),tr].join(":"),jr=he["content-disposition"]||he["Content-Disposition"];if(jr!==void 0){let Tr=(0,ie.DR)(jr);Tr!==null&&(yr=Tr)}Ht=fe.Z.navigator&&fe.Z.navigator.msSaveOrOpenBlob?b.createElement("div",null,b.createElement("a",{href:tr,onClick:()=>fe.Z.navigator.msSaveOrOpenBlob(Gt,yr)},"Download file")):b.createElement("div",null,b.createElement("a",{href:tr,download:yr},"Download file"))}else Ht=b.createElement("pre",{className:"microlight"},"Download headers detected but your browser does not support downloading binary via XHR (Blob).");else if(/json/i.test(Z)){let ur=null;(0,qn.O)(K)&&(ur="json");try{ht=h()(JSON.parse(K),null," ")}catch(Gt){ht=`can't parse JSON. Raw result:
141
141
 
142
- `+K}Ht=b.createElement(bt,{language:ur,downloadable:!0,fileName:`${tt}.json`,value:ht,getConfigs:Ce,canCopy:!0})}else/xml/i.test(Z)?(ht=Ts()(K,{textNodesOnSameLine:!0,indentor:" "}),Ht=b.createElement(bt,{downloadable:!0,fileName:`${tt}.xml`,value:ht,getConfigs:Ce,canCopy:!0})):Ht=Jo()(Z)==="text/html"||/text\/plain/.test(Z)?b.createElement(bt,{downloadable:!0,fileName:`${tt}.html`,value:K,getConfigs:Ce,canCopy:!0}):Jo()(Z)==="text/csv"||/text\/csv/.test(Z)?b.createElement(bt,{downloadable:!0,fileName:`${tt}.csv`,value:K,getConfigs:Ce,canCopy:!0}):/^image\//i.test(Z)?Te()(Z).call(Z,"svg")?b.createElement("div",null," ",K," "):b.createElement("img",{src:as().createObjectURL(K)}):/^audio\//i.test(Z)?b.createElement("pre",{className:"microlight"},b.createElement("audio",{controls:!0,key:le},b.createElement("source",{src:le,type:Z}))):typeof K=="string"?b.createElement(bt,{downloadable:!0,fileName:`${tt}.txt`,value:K,getConfigs:Ce,canCopy:!0}):K.size>0?Ye?b.createElement("div",null,b.createElement("p",{className:"i"},"Unrecognized response type; displaying content as text."),b.createElement(bt,{downloadable:!0,fileName:`${tt}.txt`,value:Ye,getConfigs:Ce,canCopy:!0})):b.createElement("p",{className:"i"},"Unrecognized response type; unable to display."):null;return Ht?b.createElement("div",null,b.createElement("h5",null,"Response body"),Ht):null}}var Mo=cr(3665),Ao=cr.n(Mo);class ws extends b.Component{constructor(K){super(K),Me()(this,"onChange",(Z,le,he)=>{let{specActions:{changeParamByIdentity:Ce},onChangeKey:et}=this.props;Ce(et,Z,le,he)}),Me()(this,"onChangeConsumesWrapper",Z=>{let{specActions:{changeConsumesValue:le},onChangeKey:he}=this.props;le(he,Z)}),Me()(this,"toggleTab",Z=>Z==="parameters"?this.setState({parametersVisible:!0,callbackVisible:!1}):Z==="callbacks"?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0),Me()(this,"onChangeMediaType",Z=>{let{value:le,pathMethod:he}=Z,{specActions:Ce,oas3Selectors:et,oas3Actions:Ye}=this.props;const bt=et.hasUserEditedBody(...he),tt=et.shouldRetainRequestBodyValue(...he);Ye.setRequestContentType({value:le,pathMethod:he}),Ye.initRequestBodyValidateError({pathMethod:he}),bt||(tt||Ye.setRequestBodyValue({value:void 0,pathMethod:he}),Ce.clearResponse(...he),Ce.clearRequest(...he),Ce.clearValidateParams(he))}),this.state={callbackVisible:!1,parametersVisible:!0}}render(){var K;let{onTryoutClick:Z,onResetClick:le,parameters:he,allowTryItOut:Ce,tryItOutEnabled:et,specPath:Ye,fn:bt,getComponent:tt,getConfigs:ht,specSelectors:Ht,specActions:ur,pathMethod:Gt,oas3Actions:tr,oas3Selectors:yr,operation:jr}=this.props;const Tr=tt("parameterRow"),ln=tt("TryItOutButton"),vn=tt("contentType"),Fr=tt("Callbacks",!0),Lr=tt("RequestBody",!0),Dr=et&&Ce,cn=Ht.isOAS3(),Cr=jr.get("requestBody"),Qn=k()(K=Ao()(k()(he).call(he,(Br,un)=>{var hn;const Sn=un.get("in");return(hn=Br[Sn])!=null||(Br[Sn]=[]),Br[Sn].push(un),Br},{}))).call(K,(Br,un)=>M()(Br).call(Br,un),[]);return b.createElement("div",{className:"opblock-section"},b.createElement("div",{className:"opblock-section-header"},cn?b.createElement("div",{className:"tab-header"},b.createElement("div",{onClick:()=>this.toggleTab("parameters"),className:`tab-item ${this.state.parametersVisible&&"active"}`},b.createElement("h4",{className:"opblock-title"},b.createElement("span",null,"Parameters"))),jr.get("callbacks")?b.createElement("div",{onClick:()=>this.toggleTab("callbacks"),className:`tab-item ${this.state.callbackVisible&&"active"}`},b.createElement("h4",{className:"opblock-title"},b.createElement("span",null,"Callbacks"))):null):b.createElement("div",{className:"tab-header"},b.createElement("h4",{className:"opblock-title"},"Parameters")),Ce?b.createElement(ln,{isOAS3:Ht.isOAS3(),hasUserEditedBody:yr.hasUserEditedBody(...Gt),enabled:et,onCancelClick:this.props.onCancelClick,onTryoutClick:Z,onResetClick:()=>le(Gt)}):null),this.state.parametersVisible?b.createElement("div",{className:"parameters-container"},Qn.length?b.createElement("div",{className:"table-container"},b.createElement("table",{className:"parameters"},b.createElement("thead",null,b.createElement("tr",null,b.createElement("th",{className:"col_header parameters-col_name"},"Name"),b.createElement("th",{className:"col_header parameters-col_description"},"Description"))),b.createElement("tbody",null,$()(Qn).call(Qn,(Br,un)=>b.createElement(Tr,{fn:bt,specPath:Ye.push(un.toString()),getComponent:tt,getConfigs:ht,rawParam:Br,param:Ht.parameterWithMetaByIdentity(Gt,Br),key:`${Br.get("in")}.${Br.get("name")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:Ht,specActions:ur,oas3Actions:tr,oas3Selectors:yr,pathMethod:Gt,isExecute:Dr}))))):b.createElement("div",{className:"opblock-description-wrapper"},b.createElement("p",null,"No parameters"))):null,this.state.callbackVisible?b.createElement("div",{className:"callbacks-container opblock-description-wrapper"},b.createElement(Fr,{callbacks:(0,X.Map)(jr.get("callbacks")),specPath:P()(Ye).call(Ye,0,-1).push("callbacks")})):null,cn&&Cr&&this.state.parametersVisible&&b.createElement("div",{className:"opblock-section opblock-section-request-body"},b.createElement("div",{className:"opblock-section-header"},b.createElement("h4",{className:`opblock-title parameter__name ${Cr.get("required")&&"required"}`},"Request body"),b.createElement("label",null,b.createElement(vn,{value:yr.requestContentType(...Gt),contentTypes:Cr.get("content",(0,X.List)()).keySeq(),onChange:Br=>{this.onChangeMediaType({value:Br,pathMethod:Gt})},className:"body-param-content-type",ariaLabel:"Request content type"}))),b.createElement("div",{className:"opblock-description-wrapper"},b.createElement(Lr,{setRetainRequestBodyValueFlag:Br=>tr.setRetainRequestBodyValueFlag({value:Br,pathMethod:Gt}),userHasEditedBody:yr.hasUserEditedBody(...Gt),specPath:P()(Ye).call(Ye,0,-1).push("requestBody"),requestBody:Cr,requestBodyValue:yr.requestBodyValue(...Gt),requestBodyInclusionSetting:yr.requestBodyInclusionSetting(...Gt),requestBodyErrors:yr.requestBodyErrors(...Gt),isExecute:Dr,getConfigs:ht,activeExamplesKey:yr.activeExamplesMember(...Gt,"requestBody","requestBody"),updateActiveExamplesKey:Br=>{this.props.oas3Actions.setActiveExamplesMember({name:Br,pathMethod:this.props.pathMethod,contextType:"requestBody",contextName:"requestBody"})},onChange:(Br,un)=>{if(un){const Sn=yr.requestBodyValue(...Gt),hn=X.Map.isMap(Sn)?Sn:(0,X.Map)();return tr.setRequestBodyValue({pathMethod:Gt,value:hn.setIn(un,Br)})}tr.setRequestBodyValue({value:Br,pathMethod:Gt})},onChangeIncludeEmpty:(Br,un)=>{tr.setRequestBodyInclusion({pathMethod:Gt,value:un,name:Br})},contentType:yr.requestContentType(...Gt)}))))}}Me()(ws,"defaultProps",{onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]});const Kt=Ge=>{let{xKey:K,xVal:Z}=Ge;return b.createElement("div",{className:"parameter__extension"},K,": ",String(Z))},Es={onChange:()=>{},isIncludedOptions:{}};class Rs extends b.Component{constructor(){super(...arguments),Me()(this,"onCheckboxChange",K=>{const{onChange:Z}=this.props;Z(K.target.checked)})}componentDidMount(){const{isIncludedOptions:K,onChange:Z}=this.props,{shouldDispatchInit:le,defaultValue:he}=K;le&&Z(he)}render(){let{isIncluded:K,isDisabled:Z}=this.props;return b.createElement("div",null,b.createElement("label",{className:Jr()("parameter__empty_value_toggle",{disabled:Z})},b.createElement("input",{type:"checkbox",disabled:Z,checked:!Z&&K,onChange:this.onCheckboxChange}),"Send empty value"))}}Me()(Rs,"defaultProps",Es);var Oo=cr(19069);class Tn extends b.Component{constructor(K,Z){var le;super(K,Z),le=this,Me()(this,"onChangeWrapper",function(he){let Ce,et=arguments.length>1&&arguments[1]!==void 0&&arguments[1],{onChange:Ye,rawParam:bt}=le.props;return Ce=he===""||he&&he.size===0?null:he,Ye(bt,Ce,et)}),Me()(this,"_onExampleSelect",he=>{this.props.oas3Actions.setActiveExamplesMember({name:he,pathMethod:this.props.pathMethod,contextType:"parameters",contextName:this.getParamKey()})}),Me()(this,"onChangeIncludeEmpty",he=>{let{specActions:Ce,param:et,pathMethod:Ye}=this.props;const bt=et.get("name"),tt=et.get("in");return Ce.updateEmptyParamInclusion(Ye,bt,tt,he)}),Me()(this,"setDefaultValue",()=>{let{specSelectors:he,pathMethod:Ce,rawParam:et,oas3Selectors:Ye,fn:bt}=this.props;const tt=he.parameterWithMetaByIdentity(Ce,et)||(0,X.Map)(),{schema:ht}=(0,Oo.Z)(tt,{isOAS3:he.isOAS3()}),Ht=tt.get("content",(0,X.Map)()).keySeq().first(),ur=ht?bt.getSampleSchema(ht.toJS(),Ht,{includeWriteOnly:!0}):null;if(tt&&tt.get("value")===void 0&&tt.get("in")!=="body"){let Gt;if(he.isSwagger2())Gt=tt.get("x-example")!==void 0?tt.get("x-example"):tt.getIn(["schema","example"])!==void 0?tt.getIn(["schema","example"]):ht&&ht.getIn(["default"]);else if(he.isOAS3()){const tr=Ye.activeExamplesMember(...Ce,"parameters",this.getParamKey());Gt=tt.getIn(["examples",tr,"value"])!==void 0?tt.getIn(["examples",tr,"value"]):tt.getIn(["content",Ht,"example"])!==void 0?tt.getIn(["content",Ht,"example"]):tt.get("example")!==void 0?tt.get("example"):(ht&&ht.get("example"))!==void 0?ht&&ht.get("example"):(ht&&ht.get("default"))!==void 0?ht&&ht.get("default"):tt.get("default")}Gt===void 0||X.List.isList(Gt)||(Gt=(0,ie.Pz)(Gt)),Gt!==void 0?this.onChangeWrapper(Gt):ht&&ht.get("type")==="object"&&ur&&!tt.get("examples")&&this.onChangeWrapper(X.List.isList(ur)?ur:(0,ie.Pz)(ur))}}),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(K){let Z,{specSelectors:le,pathMethod:he,rawParam:Ce}=K,et=le.isOAS3(),Ye=le.parameterWithMetaByIdentity(he,Ce)||new X.Map;if(Ye=Ye.isEmpty()?Ce:Ye,et){let{schema:ht}=(0,Oo.Z)(Ye,{isOAS3:et});Z=ht?ht.get("enum"):void 0}else Z=Ye?Ye.get("enum"):void 0;let bt,tt=Ye?Ye.get("value"):void 0;tt!==void 0?bt=tt:Ce.get("required")&&Z&&Z.size&&(bt=Z.first()),bt!==void 0&&bt!==tt&&this.onChangeWrapper((0,ie.D$)(bt)),this.setDefaultValue()}getParamKey(){const{param:K}=this.props;return K?`${K.get("name")}-${K.get("in")}`:null}render(){var K,Z;let{param:le,rawParam:he,getComponent:Ce,getConfigs:et,isExecute:Ye,fn:bt,onChangeConsumes:tt,specSelectors:ht,pathMethod:Ht,specPath:ur,oas3Selectors:Gt}=this.props,tr=ht.isOAS3();const{showExtensions:yr,showCommonExtensions:jr}=et();if(le||(le=he),!he)return null;const Tr=Ce("JsonSchemaForm"),ln=Ce("ParamBody");let vn=le.get("in"),Fr=vn!=="body"?null:b.createElement(ln,{getComponent:Ce,getConfigs:et,fn:bt,param:le,consumes:ht.consumesOptionsFor(Ht),consumesValue:ht.contentTypeValues(Ht).get("requestContentType"),onChange:this.onChangeWrapper,onChangeConsumes:tt,isExecute:Ye,specSelectors:ht,pathMethod:Ht});const Lr=Ce("modelExample"),Dr=Ce("Markdown",!0),cn=Ce("ParameterExt"),Cr=Ce("ParameterIncludeEmpty"),Qn=Ce("ExamplesSelectValueRetainer"),Br=Ce("Example");let un,Sn,hn,Vn,{schema:Mn}=(0,Oo.Z)(le,{isOAS3:tr}),po=ht.parameterWithMetaByIdentity(Ht,he)||(0,X.Map)(),Bn=Mn?Mn.get("format"):null,Po=Mn?Mn.get("type"):null,So=Mn?Mn.getIn(["items","type"]):null,Lo=vn==="formData",Uo="FormData"in fe.Z,fs=le.get("required"),Bo=po?po.get("value"):"",Zo=jr?(0,ie.po)(Mn):null,ts=yr?(0,ie.nX)(le):null,zo=!1;return le!==void 0&&Mn&&(un=Mn.get("items")),un!==void 0?(Sn=un.get("enum"),hn=un.get("default")):Mn&&(Sn=Mn.get("enum")),Sn&&Sn.size&&Sn.size>0&&(zo=!0),le!==void 0&&(Mn&&(hn=Mn.get("default")),hn===void 0&&(hn=le.get("default")),Vn=le.get("example"),Vn===void 0&&(Vn=le.get("x-example"))),b.createElement("tr",{"data-param-name":le.get("name"),"data-param-in":le.get("in")},b.createElement("td",{className:"parameters-col_name"},b.createElement("div",{className:fs?"parameter__name required":"parameter__name"},le.get("name"),fs?b.createElement("span",null," *"):null),b.createElement("div",{className:"parameter__type"},Po,So&&`[${So}]`,Bn&&b.createElement("span",{className:"prop-format"},"($",Bn,")")),b.createElement("div",{className:"parameter__deprecated"},tr&&le.get("deprecated")?"deprecated":null),b.createElement("div",{className:"parameter__in"},"(",le.get("in"),")"),jr&&Zo.size?$()(K=Zo.entrySeq()).call(K,nn=>{let[gn,on]=nn;return b.createElement(cn,{key:`${gn}-${on}`,xKey:gn,xVal:on})}):null,yr&&ts.size?$()(Z=ts.entrySeq()).call(Z,nn=>{let[gn,on]=nn;return b.createElement(cn,{key:`${gn}-${on}`,xKey:gn,xVal:on})}):null),b.createElement("td",{className:"parameters-col_description"},le.get("description")?b.createElement(Dr,{source:le.get("description")}):null,!Fr&&Ye||!zo?null:b.createElement(Dr,{className:"parameter__enum",source:"<i>Available values</i> : "+$()(Sn).call(Sn,function(nn){return nn}).toArray().join(", ")}),!Fr&&Ye||hn===void 0?null:b.createElement(Dr,{className:"parameter__default",source:"<i>Default value</i> : "+hn}),!Fr&&Ye||Vn===void 0?null:b.createElement(Dr,{source:"<i>Example</i> : "+Vn}),Lo&&!Uo&&b.createElement("div",null,"Error: your browser does not support FormData"),tr&&le.get("examples")?b.createElement("section",{className:"parameter-controls"},b.createElement(Qn,{examples:le.get("examples"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:Ce,defaultToFirstExample:!0,currentKey:Gt.activeExamplesMember(...Ht,"parameters",this.getParamKey()),currentUserInputValue:Bo})):null,Fr?null:b.createElement(Tr,{fn:bt,getComponent:Ce,value:Bo,required:fs,disabled:!Ye,description:le.get("name"),onChange:this.onChangeWrapper,errors:po.get("errors"),schema:Mn}),Fr&&Mn?b.createElement(Lr,{getComponent:Ce,specPath:ur.push("schema"),getConfigs:et,isExecute:Ye,specSelectors:ht,schema:Mn,example:Fr,includeWriteOnly:!0}):null,!Fr&&Ye&&le.get("allowEmptyValue")?b.createElement(Cr,{onChange:this.onChangeIncludeEmpty,isIncluded:ht.parameterInclusionSettingFor(Ht,le.get("name"),le.get("in")),isDisabled:!(0,ie.O2)(Bo)}):null,tr&&le.get("examples")?b.createElement(Br,{example:le.getIn(["examples",Gt.activeExamplesMember(...Ht,"parameters",this.getParamKey())]),getComponent:Ce,getConfigs:et}):null))}}var us=cr(87198),Do=cr.n(us);class to extends b.Component{constructor(){super(...arguments),Me()(this,"handleValidateParameters",()=>{let{specSelectors:K,specActions:Z,path:le,method:he}=this.props;return Z.validateParams([le,he]),K.validateBeforeExecute([le,he])}),Me()(this,"handleValidateRequestBody",()=>{let{path:K,method:Z,specSelectors:le,oas3Selectors:he,oas3Actions:Ce}=this.props,et={missingBodyValue:!1,missingRequiredKeys:[]};Ce.clearRequestBodyValidateError({path:K,method:Z});let Ye=le.getOAS3RequiredRequestBodyContentType([K,Z]),bt=he.requestBodyValue(K,Z),tt=he.validateBeforeExecute([K,Z]),ht=he.requestContentType(K,Z);if(!tt)return et.missingBodyValue=!0,Ce.setRequestBodyValidateError({path:K,method:Z,validationErrors:et}),!1;if(!Ye)return!0;let Ht=he.validateShallowRequired({oas3RequiredRequestBodyContentType:Ye,oas3RequestContentType:ht,oas3RequestBodyValue:bt});return!Ht||Ht.length<1||(Or()(Ht).call(Ht,ur=>{et.missingRequiredKeys.push(ur)}),Ce.setRequestBodyValidateError({path:K,method:Z,validationErrors:et}),!1)}),Me()(this,"handleValidationResultPass",()=>{let{specActions:K,operation:Z,path:le,method:he}=this.props;this.props.onExecute&&this.props.onExecute(),K.execute({operation:Z,path:le,method:he})}),Me()(this,"handleValidationResultFail",()=>{let{specActions:K,path:Z,method:le}=this.props;K.clearValidateParams([Z,le]),Do()(()=>{K.validateParams([Z,le])},40)}),Me()(this,"handleValidationResult",K=>{K?this.handleValidationResultPass():this.handleValidationResultFail()}),Me()(this,"onClick",()=>{let K=this.handleValidateParameters(),Z=this.handleValidateRequestBody(),le=K&&Z;this.handleValidationResult(le)}),Me()(this,"onChangeProducesWrapper",K=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],K))}render(){const{disabled:K}=this.props;return b.createElement("button",{className:"btn execute opblock-control__btn",onClick:this.onClick,disabled:K},"Execute")}}class Yn extends b.Component{render(){var K;let{headers:Z,getComponent:le}=this.props;const he=le("Property"),Ce=le("Markdown",!0);return Z&&Z.size?b.createElement("div",{className:"headers-wrapper"},b.createElement("h4",{className:"headers__title"},"Headers:"),b.createElement("table",{className:"headers"},b.createElement("thead",null,b.createElement("tr",{className:"header-row"},b.createElement("th",{className:"header-col"},"Name"),b.createElement("th",{className:"header-col"},"Description"),b.createElement("th",{className:"header-col"},"Type"))),b.createElement("tbody",null,$()(K=Z.entrySeq()).call(K,et=>{let[Ye,bt]=et;if(!te().Map.isMap(bt))return null;const tt=bt.get("description"),ht=bt.getIn(["schema"])?bt.getIn(["schema","type"]):bt.getIn(["type"]),Ht=bt.getIn(["schema","example"]);return b.createElement("tr",{key:Ye},b.createElement("td",{className:"header-col"},Ye),b.createElement("td",{className:"header-col"},tt?b.createElement(Ce,{source:tt}):null),b.createElement("td",{className:"header-col"},ht," ",Ht?b.createElement(he,{propKey:"Example",propVal:Ht,propClass:"header-example"}):null))}).toArray()))):null}}class Kr extends b.Component{render(){let{editorActions:K,errSelectors:Z,layoutSelectors:le,layoutActions:he,getComponent:Ce}=this.props;const et=Ce("Collapse");if(K&&K.jumpToLine)var Ye=K.jumpToLine;let bt=Z.allErrors(),tt=s()(bt).call(bt,ur=>ur.get("type")==="thrown"||ur.get("level")==="error");if(!tt||tt.count()<1)return null;let ht=le.isShown(["errorPane"],!0),Ht=tt.sortBy(ur=>ur.get("line"));return b.createElement("pre",{className:"errors-wrapper"},b.createElement("hgroup",{className:"error"},b.createElement("h4",{className:"errors__title"},"Errors"),b.createElement("button",{className:"btn errors__clear-btn",onClick:()=>he.show(["errorPane"],!ht)},ht?"Hide":"Show")),b.createElement(et,{isOpened:ht,animated:!0},b.createElement("div",{className:"errors"},$()(Ht).call(Ht,(ur,Gt)=>{let tr=ur.get("type");return tr==="thrown"||tr==="auth"?b.createElement(lt,{key:Gt,error:ur.get("error")||ur,jumpToLine:Ye}):tr==="spec"?b.createElement(gr,{key:Gt,error:ur,jumpToLine:Ye}):void 0}))))}}const lt=Ge=>{let{error:K,jumpToLine:Z}=Ge;if(!K)return null;let le=K.get("line");return b.createElement("div",{className:"error-wrapper"},K?b.createElement("div",null,b.createElement("h4",null,K.get("source")&&K.get("level")?mr(K.get("source"))+" "+K.get("level"):"",K.get("path")?b.createElement("small",null," at ",K.get("path")):null),b.createElement("span",{className:"message thrown"},K.get("message")),b.createElement("div",{className:"error-line"},le&&Z?b.createElement("a",{onClick:w()(Z).call(Z,null,le)},"Jump to line ",le):null)):null)},gr=Ge=>{let{error:K,jumpToLine:Z}=Ge,le=null;return K.get("path")?le=X.List.isList(K.get("path"))?b.createElement("small",null,"at ",K.get("path").join(".")):b.createElement("small",null,"at ",K.get("path")):K.get("line")&&!Z&&(le=b.createElement("small",null,"on line ",K.get("line"))),b.createElement("div",{className:"error-wrapper"},K?b.createElement("div",null,b.createElement("h4",null,mr(K.get("source"))+" "+K.get("level")," ",le),b.createElement("span",{className:"message"},K.get("message")),b.createElement("div",{className:"error-line"},Z?b.createElement("a",{onClick:w()(Z).call(Z,null,K.get("line"))},"Jump to line ",K.get("line")):null)):null)};function mr(Ge){var K;return $()(K=(Ge||"").split(" ")).call(K,Z=>Z[0].toUpperCase()+P()(Z).call(Z,1)).join(" ")}lt.defaultProps={jumpToLine:null};class Rn extends b.Component{constructor(){super(...arguments),Me()(this,"onChangeWrapper",K=>this.props.onChange(K.target.value))}componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(K){var Z;K.contentTypes&&K.contentTypes.size&&(Te()(Z=K.contentTypes).call(Z,K.value)||K.onChange(K.contentTypes.first()))}render(){let{ariaControls:K,ariaLabel:Z,className:le,contentTypes:he,controlId:Ce,value:et}=this.props;return he&&he.size?b.createElement("div",{className:"content-type-wrapper "+(le||"")},b.createElement("select",{"aria-controls":K,"aria-label":Z,className:"content-type",id:Ce,onChange:this.onChangeWrapper,value:et||""},$()(he).call(he,Ye=>b.createElement("option",{key:Ye,value:Ye},Ye)).toArray())):null}}Me()(Rn,"defaultProps",{onChange:()=>{},value:null,contentTypes:(0,X.fromJS)(["application/json"])});var mo=cr(23101),oo=cr.n(mo),ps=cr(81607),Kn=cr.n(ps);function Co(){for(var Ge,K=arguments.length,Z=new Array(K),le=0;le<K;le++)Z[le]=arguments[le];return Kn()(Ge=s()(Z).call(Z,he=>!!he).join(" ")).call(Ge)}class xs extends b.Component{render(){let Ce=this.props,{fullscreen:K,full:Z}=Ce,le=$s(Ce,["fullscreen","full"]);if(K)return b.createElement("section",le);let he="swagger-container"+(Z?"-full":"");return b.createElement("section",oo()({},le,{className:Co(le.className,he)}))}}const Un={mobile:"",tablet:"-tablet",desktop:"-desktop",large:"-hd"};class wa extends b.Component{render(){const ht=this.props,{hide:K,keepContents:Z,mobile:le,tablet:he,desktop:Ce,large:et}=ht,Ye=$s(ht,["hide","keepContents","mobile","tablet","desktop","large"]);if(K&&!Z)return b.createElement("span",null);let bt=[];for(let Ht in Un){if(!Object.prototype.hasOwnProperty.call(Un,Ht))continue;let ur=Un[Ht];if(Ht in this.props){let Gt=this.props[Ht];if(Gt<1){bt.push("none"+ur);continue}bt.push("block"+ur),bt.push("col-"+Gt+ur)}}K&&bt.push("hidden");let tt=Co(Ye.className,...bt);return b.createElement("section",oo()({},Ye,{className:tt}))}}class D extends b.Component{render(){return b.createElement("div",oo()({},this.props,{className:Co(this.props.className,"wrapper")}))}}class De extends b.Component{render(){return b.createElement("button",oo()({},this.props,{className:Co(this.props.className,"button")}))}}Me()(De,"defaultProps",{className:""});const Ze=Ge=>b.createElement("textarea",Ge),vt=Ge=>b.createElement("input",Ge);class st extends b.Component{constructor(K,Z){let le;super(K,Z),Me()(this,"onChange",he=>{let Ce,{onChange:et,multiple:Ye}=this.props,bt=P()([]).call(he.target.options);var tt;Ye?Ce=$()(tt=s()(bt).call(bt,function(ht){return ht.selected})).call(tt,function(ht){return ht.value}):Ce=he.target.value,this.setState({value:Ce}),et&&et(Ce)}),le=K.value?K.value:K.multiple?[""]:"",this.state={value:le}}UNSAFE_componentWillReceiveProps(K){K.value!==this.props.value&&this.setState({value:K.value})}render(){var K,Z;let{allowedValues:le,multiple:he,allowEmptyValue:Ce,disabled:et}=this.props,Ye=((K=this.state.value)===null||K===void 0||(Z=K.toJS)===null||Z===void 0?void 0:Z.call(K))||this.state.value;return b.createElement("select",{className:this.props.className,multiple:he,value:Ye,onChange:this.onChange,disabled:et},Ce?b.createElement("option",{value:""},"--"):null,$()(le).call(le,function(bt,tt){return b.createElement("option",{key:tt,value:String(bt)},String(bt))}))}}Me()(st,"defaultProps",{multiple:!1,allowEmptyValue:!0});class er extends b.Component{render(){return b.createElement("a",oo()({},this.props,{rel:"noopener noreferrer",className:Co(this.props.className,"link")}))}}const sr=Ge=>{let{children:K}=Ge;return b.createElement("div",{className:"no-margin"}," ",K," ")};class or extends b.Component{renderNotAnimated(){return this.props.isOpened?b.createElement(sr,null,this.props.children):b.createElement("noscript",null)}render(){let{animated:K,isOpened:Z,children:le}=this.props;return K?(le=Z?le:null,b.createElement(sr,null,le)):this.renderNotAnimated()}}Me()(or,"defaultProps",{isOpened:!1,animated:!1});class _r extends b.Component{constructor(){var K;super(...arguments),this.setTagShown=w()(K=this._setTagShown).call(K,this)}_setTagShown(K,Z){this.props.layoutActions.show(K,Z)}showOp(K,Z){let{layoutActions:le}=this.props;le.show(K,Z)}render(){let{specSelectors:K,layoutSelectors:Z,layoutActions:le,getComponent:he}=this.props,Ce=K.taggedOperations();const et=he("Collapse");return b.createElement("div",null,b.createElement("h4",{className:"overview-title"},"Overview"),$()(Ce).call(Ce,(Ye,bt)=>{let tt=Ye.get("operations"),ht=["overview-tags",bt],Ht=Z.isShown(ht,!0);return b.createElement("div",{key:"overview-"+bt},b.createElement("h4",{onClick:()=>le.show(ht,!Ht),className:"link overview-tag"}," ",Ht?"-":"+",bt),b.createElement(et,{isOpened:Ht,animated:!0},$()(tt).call(tt,ur=>{let{path:Gt,method:tr,id:yr}=ur.toObject(),jr="operations",Tr=yr,ln=Z.isShown([jr,Tr]);return b.createElement(Nr,{key:yr,path:Gt,method:tr,id:Gt+"-"+tr,shown:ln,showOpId:Tr,showOpIdPrefix:jr,href:`#operation-${Tr}`,onClick:le.show})}).toArray()))}).toArray(),Ce.size<1&&b.createElement("h3",null," No operations defined in spec! "))}}class Nr extends b.Component{constructor(K){var Z;super(K),this.onClick=w()(Z=this._onClick).call(Z,this)}_onClick(){let{showOpId:K,showOpIdPrefix:Z,onClick:le,shown:he}=this.props;le([Z,K],!he)}render(){let{id:K,method:Z,shown:le,href:he}=this.props;return b.createElement(er,{href:he,onClick:this.onClick,className:"block opblock-link "+(le?"shown":"")},b.createElement("div",null,b.createElement("small",{className:`bold-label-${Z}`},Z.toUpperCase()),b.createElement("span",{className:"bold-label"},K)))}}class $r extends b.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const Ce=this.props,{value:K,defaultValue:Z,initialValue:le}=Ce,he=$s(Ce,["value","defaultValue","initialValue"]);return b.createElement("input",oo()({},he,{ref:et=>this.inputRef=et}))}}class mn extends b.Component{render(){const{host:K,basePath:Z}=this.props;return b.createElement("pre",{className:"base-url"},"[ Base URL: ",K,Z," ]")}}class Xn extends b.PureComponent{render(){const{url:K,getComponent:Z}=this.props,le=Z("Link");return b.createElement(le,{target:"_blank",href:(0,ie.Nm)(K)},b.createElement("span",{className:"url"}," ",K))}}class Ir extends b.Component{render(){const{info:K,url:Z,host:le,basePath:he,getComponent:Ce,externalDocs:et,selectedServer:Ye,url:bt}=this.props,tt=K.get("version"),ht=K.get("description"),Ht=K.get("title"),ur=(0,Ee.mn)(K.get("termsOfService"),bt,{selectedServer:Ye}),Gt=K.get("contact"),tr=K.get("license"),yr=et&&et.get("url"),jr=(0,Ee.mn)(yr,bt,{selectedServer:Ye}),Tr=et&&et.get("description"),ln=Ce("Markdown",!0),vn=Ce("Link"),Fr=Ce("VersionStamp"),Lr=Ce("InfoUrl"),Dr=Ce("InfoBasePath"),cn=Ce("License"),Cr=Ce("Contact");return b.createElement("div",{className:"info"},b.createElement("hgroup",{className:"main"},b.createElement("h2",{className:"title"},Ht,tt&&b.createElement(Fr,{version:tt})),le||he?b.createElement(Dr,{host:le,basePath:he}):null,Z&&b.createElement(Lr,{getComponent:Ce,url:Z})),b.createElement("div",{className:"description"},b.createElement(ln,{source:ht})),ur&&b.createElement("div",{className:"info__tos"},b.createElement(vn,{target:"_blank",href:(0,ie.Nm)(ur)},"Terms of service")),(Gt==null?void 0:Gt.size)>0&&b.createElement(Cr,{getComponent:Ce,data:Gt,selectedServer:Ye,url:Z}),(tr==null?void 0:tr.size)>0&&b.createElement(cn,{getComponent:Ce,license:tr,selectedServer:Ye,url:Z}),jr?b.createElement(vn,{className:"info__extdocs",target:"_blank",href:(0,ie.Nm)(jr)},Tr||jr):null)}}const lo=Ir;class zn extends b.Component{render(){const{specSelectors:K,getComponent:Z,oas3Selectors:le}=this.props,he=K.info(),Ce=K.url(),et=K.basePath(),Ye=K.host(),bt=K.externalDocs(),tt=le.selectedServer(),ht=Z("info");return b.createElement("div",null,he&&he.count()?b.createElement(ht,{info:he,url:Ce,host:Ye,basePath:et,externalDocs:bt,getComponent:Z,selectedServer:tt}):null)}}class an extends b.Component{render(){const{data:K,getComponent:Z,selectedServer:le,url:he}=this.props,Ce=K.get("name","the developer"),et=(0,Ee.mn)(K.get("url"),he,{selectedServer:le}),Ye=K.get("email"),bt=Z("Link");return b.createElement("div",{className:"info__contact"},et&&b.createElement("div",null,b.createElement(bt,{href:(0,ie.Nm)(et),target:"_blank"},Ce," - Website")),Ye&&b.createElement(bt,{href:(0,ie.Nm)(`mailto:${Ye}`)},et?`Send email to ${Ce}`:`Contact ${Ce}`))}}const Ve=an;class Nn extends b.Component{render(){const{license:K,getComponent:Z,selectedServer:le,url:he}=this.props,Ce=K.get("name","License"),et=(0,Ee.mn)(K.get("url"),he,{selectedServer:le}),Ye=Z("Link");return b.createElement("div",{className:"info__license"},et?b.createElement("div",{className:"info__license__url"},b.createElement(Ye,{target:"_blank",href:(0,ie.Nm)(et)},Ce)):b.createElement("span",null,Ce))}}const On=Nn;class Hr extends b.Component{render(){return null}}class Fn extends b.Component{render(){let{getComponent:K}=this.props;const Z=K("CopyIcon");return b.createElement("div",{className:"view-line-link copy-to-clipboard",title:"Copy to clipboard"},b.createElement($o.CopyToClipboard,{text:this.props.textToCopy},b.createElement(Z,null)))}}class Gr extends b.Component{render(){return b.createElement("div",{className:"footer"})}}class ao extends b.Component{constructor(){super(...arguments),Me()(this,"onFilterChange",K=>{const{target:{value:Z}}=K;this.props.layoutActions.updateFilter(Z)})}render(){const{specSelectors:K,layoutSelectors:Z,getComponent:le}=this.props,he=le("Col"),Ce=K.loadingStatus()==="loading",et=K.loadingStatus()==="failed",Ye=Z.currentFilter(),bt=["operation-filter-input"];return et&&bt.push("failed"),Ce&&bt.push("loading"),b.createElement("div",null,Ye===null||Ye===!1||Ye==="false"?null:b.createElement("div",{className:"filter-container"},b.createElement(he,{className:"filter wrapper",mobile:12},b.createElement("input",{className:bt.join(" "),placeholder:"Filter by tag",type:"text",onChange:this.onFilterChange,value:Ye===!0||Ye==="true"?"":Ye,disabled:Ce}))))}}const wn=Function.prototype;class En extends b.PureComponent{constructor(K,Z){super(K,Z),Me()(this,"updateValues",le=>{let{param:he,isExecute:Ce,consumesValue:et=""}=le,Ye=/xml/i.test(et),bt=/json/i.test(et),tt=Ye?he.get("value_xml"):he.get("value");if(tt!==void 0){let ht=!tt&&bt?"{}":tt;this.setState({value:ht}),this.onChange(ht,{isXml:Ye,isEditBox:Ce})}else Ye?this.onChange(this.sample("xml"),{isXml:Ye,isEditBox:Ce}):this.onChange(this.sample(),{isEditBox:Ce})}),Me()(this,"sample",le=>{let{param:he,fn:Ce}=this.props,et=Ce.inferSchema(he.toJS());return Ce.getSampleSchema(et,le,{includeWriteOnly:!0})}),Me()(this,"onChange",(le,he)=>{let{isEditBox:Ce,isXml:et}=he;this.setState({value:le,isEditBox:Ce}),this._onChange(le,et)}),Me()(this,"_onChange",(le,he)=>{(this.props.onChange||wn)(le,he)}),Me()(this,"handleOnChange",le=>{const{consumesValue:he}=this.props,Ce=/xml/i.test(he),et=le.target.value;this.onChange(et,{isXml:Ce,isEditBox:this.state.isEditBox})}),Me()(this,"toggleIsEditBox",()=>this.setState(le=>({isEditBox:!le.isEditBox}))),this.state={isEditBox:!1,value:""}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(K){this.updateValues.call(this,K)}render(){let{onChangeConsumes:K,param:Z,isExecute:le,specSelectors:he,pathMethod:Ce,getConfigs:et,getComponent:Ye}=this.props;const bt=Ye("Button"),tt=Ye("TextArea"),ht=Ye("highlightCode"),Ht=Ye("contentType");let ur=(he?he.parameterWithMetaByIdentity(Ce,Z):Z).get("errors",(0,X.List)()),Gt=he.contentTypeValues(Ce).get("requestContentType"),tr=this.props.consumes&&this.props.consumes.size?this.props.consumes:En.defaultProp.consumes,{value:yr,isEditBox:jr}=this.state,Tr=null;return(0,qn.O)(yr)&&(Tr="json"),b.createElement("div",{className:"body-param","data-param-name":Z.get("name"),"data-param-in":Z.get("in")},jr&&le?b.createElement(tt,{className:"body-param__text"+(ur.count()?" invalid":""),value:yr,onChange:this.handleOnChange}):yr&&b.createElement(ht,{className:"body-param__example",language:Tr,getConfigs:et,value:yr}),b.createElement("div",{className:"body-param-options"},le?b.createElement("div",{className:"body-param-edit"},b.createElement(bt,{className:jr?"btn cancel body-param__example-edit":"btn edit body-param__example-edit",onClick:this.toggleIsEditBox},jr?"Cancel":"Edit")):null,b.createElement("label",{htmlFor:""},b.createElement("span",null,"Parameter content type"),b.createElement(Ht,{value:Gt,contentTypes:tr,onChange:K,className:"body-param-content-type",ariaLabel:"Parameter content type"}))))}}Me()(En,"defaultProp",{consumes:(0,X.fromJS)(["application/json"]),param:(0,X.fromJS)({}),onChange:wn,onChangeConsumes:wn});var co=cr(92135);class kn extends b.Component{render(){let{request:K,getConfigs:Z}=this.props,le=(0,co.requestSnippetGenerator_curl_bash)(K);const he=Z(),Ce=no()(he,"syntaxHighlight.activated")?b.createElement(Ft.d3,{language:"bash",className:"curl microlight",style:(0,Ft.C2)(no()(he,"syntaxHighlight.theme"))},le):b.createElement("textarea",{readOnly:!0,className:"curl",value:le});return b.createElement("div",{className:"curl-command"},b.createElement("h4",null,"Curl"),b.createElement("div",{className:"copy-to-clipboard"},b.createElement($o.CopyToClipboard,{text:le},b.createElement("button",null))),b.createElement("div",null,Ce))}}class xo extends b.Component{constructor(){super(...arguments),Me()(this,"onChange",K=>{this.setScheme(K.target.value)}),Me()(this,"setScheme",K=>{let{path:Z,method:le,specActions:he}=this.props;he.setScheme(K,Z,le)})}UNSAFE_componentWillMount(){let{schemes:K}=this.props;this.setScheme(K.first())}UNSAFE_componentWillReceiveProps(K){var Z;this.props.currentScheme&&Te()(Z=K.schemes).call(Z,this.props.currentScheme)||this.setScheme(K.schemes.first())}render(){var K;let{schemes:Z,currentScheme:le}=this.props;return b.createElement("label",{htmlFor:"schemes"},b.createElement("span",{className:"schemes-title"},"Schemes"),b.createElement("select",{onChange:this.onChange,value:le},$()(K=Z.valueSeq()).call(K,he=>b.createElement("option",{value:he,key:he},he)).toArray()))}}class Ko extends b.Component{render(){const{specActions:K,specSelectors:Z,getComponent:le}=this.props,he=Z.operationScheme(),Ce=Z.schemes(),et=le("schemes");return Ce&&Ce.size?b.createElement(et,{currentScheme:he,schemes:Ce,specActions:K}):null}}class xn extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"toggleCollapsed",()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})}),Me()(this,"onLoad",Ce=>{if(Ce&&this.props.layoutSelectors){const et=this.props.layoutSelectors.getScrollToKey();te().is(et,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,Ce.parentElement)}});let{expanded:le,collapsedContent:he}=this.props;this.state={expanded:le,collapsedContent:he||xn.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:K,expanded:Z,modelName:le}=this.props;K&&Z&&this.props.onToggle(le,Z)}UNSAFE_componentWillReceiveProps(K){this.props.expanded!==K.expanded&&this.setState({expanded:K.expanded})}render(){const{title:K,classes:Z}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?b.createElement("span",{className:Z||""},this.props.children):b.createElement("span",{className:Z||"",ref:this.onLoad},b.createElement("button",{"aria-expanded":this.state.expanded,className:"model-box-control",onClick:this.toggleCollapsed},K&&b.createElement("span",{className:"pointer"},K),b.createElement("span",{className:"model-toggle"+(this.state.expanded?"":" collapsed")}),!this.state.expanded&&b.createElement("span",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}Me()(xn,"defaultProps",{collapsedContent:"{...}",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:te().List([])});var Ho=cr(92282),Go=cr.n(Ho);class Ss extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"activeTab",Ye=>{let{target:{dataset:{name:bt}}}=Ye;this.setState({activeTab:bt})});let{getConfigs:le,isExecute:he}=this.props,{defaultModelRendering:Ce}=le(),et=Ce;Ce!=="example"&&Ce!=="model"&&(et="example"),he&&(et="example"),this.state={activeTab:et}}UNSAFE_componentWillReceiveProps(K){K.isExecute&&!this.props.isExecute&&this.props.example&&this.setState({activeTab:"example"})}render(){let{getComponent:K,specSelectors:Z,schema:le,example:he,isExecute:Ce,getConfigs:et,specPath:Ye,includeReadOnly:bt,includeWriteOnly:tt}=this.props,{defaultModelExpandDepth:ht}=et();const Ht=K("ModelWrapper"),ur=K("highlightCode"),Gt=Go()(5).toString("base64"),tr=Go()(5).toString("base64"),yr=Go()(5).toString("base64"),jr=Go()(5).toString("base64");let Tr=Z.isOAS3();return b.createElement("div",{className:"model-example"},b.createElement("ul",{className:"tab",role:"tablist"},b.createElement("li",{className:Jr()("tabitem",{active:this.state.activeTab==="example"}),role:"presentation"},b.createElement("button",{"aria-controls":tr,"aria-selected":this.state.activeTab==="example",className:"tablinks","data-name":"example",id:Gt,onClick:this.activeTab,role:"tab"},Ce?"Edit Value":"Example Value")),le&&b.createElement("li",{className:Jr()("tabitem",{active:this.state.activeTab==="model"}),role:"presentation"},b.createElement("button",{"aria-controls":jr,"aria-selected":this.state.activeTab==="model",className:Jr()("tablinks",{inactive:Ce}),"data-name":"model",id:yr,onClick:this.activeTab,role:"tab"},Tr?"Schema":"Model"))),this.state.activeTab==="example"&&b.createElement("div",{"aria-hidden":this.state.activeTab!=="example","aria-labelledby":Gt,"data-name":"examplePanel",id:tr,role:"tabpanel",tabIndex:"0"},he||b.createElement(ur,{value:"(no example available)",getConfigs:et})),this.state.activeTab==="model"&&b.createElement("div",{"aria-hidden":this.state.activeTab==="example","aria-labelledby":yr,"data-name":"modelPanel",id:jr,role:"tabpanel",tabIndex:"0"},b.createElement(Ht,{schema:le,getComponent:K,getConfigs:et,specSelectors:Z,expandDepth:ht,specPath:Ye,includeReadOnly:bt,includeWriteOnly:tt})))}}class uo extends b.Component{constructor(){super(...arguments),Me()(this,"onToggle",(K,Z)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,Z)})}render(){let{getComponent:K,getConfigs:Z}=this.props;const le=K("Model");let he;return this.props.layoutSelectors&&(he=this.props.layoutSelectors.isShown(this.props.fullPath)),b.createElement("div",{className:"model-box"},b.createElement(le,oo()({},this.props,{getConfigs:Z,expanded:he,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}var Cs=cr(53795);class ns extends b.Component{constructor(){super(...arguments),Me()(this,"getSchemaBasePath",()=>this.props.specSelectors.isOAS3()?["components","schemas"]:["definitions"]),Me()(this,"getCollapsedContent",()=>" "),Me()(this,"handleToggle",(K,Z)=>{const{layoutActions:le}=this.props;le.show([...this.getSchemaBasePath(),K],Z),Z&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),K])}),Me()(this,"onLoadModels",K=>{K&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),K)}),Me()(this,"onLoadModel",K=>{if(K){const Z=K.getAttribute("data-name");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),Z],K)}})}render(){var K;let{specSelectors:Z,getComponent:le,layoutSelectors:he,layoutActions:Ce,getConfigs:et}=this.props,Ye=Z.definitions(),{docExpansion:bt,defaultModelsExpandDepth:tt}=et();if(!Ye.size||tt<0)return null;const ht=this.getSchemaBasePath();let Ht=he.isShown(ht,tt>0&&bt!=="none");const ur=Z.isOAS3(),Gt=le("ModelWrapper"),tr=le("Collapse"),yr=le("ModelCollapse"),jr=le("JumpToPath",!0),Tr=le("ArrowUpIcon"),ln=le("ArrowDownIcon");return b.createElement("section",{className:Ht?"models is-open":"models",ref:this.onLoadModels},b.createElement("h4",null,b.createElement("button",{"aria-expanded":Ht,className:"models-control",onClick:()=>Ce.show(ht,!Ht)},b.createElement("span",null,ur?"Schemas":"Models"),Ht?b.createElement(Tr,null):b.createElement(ln,null))),b.createElement(tr,{isOpened:Ht},$()(K=Ye.entrySeq()).call(K,vn=>{let[Fr]=vn;const Lr=[...ht,Fr],Dr=te().List(Lr),cn=Z.specResolvedSubtree(Lr),Cr=Z.specJson().getIn(Lr),Qn=X.Map.isMap(cn)?cn:te().Map(),Br=X.Map.isMap(Cr)?Cr:te().Map(),un=Qn.get("title")||Br.get("title")||Fr,Sn=he.isShown(Lr,!1);Sn&&Qn.size===0&&Br.size>0&&this.props.specActions.requestResolvedSubtree(Lr);const hn=b.createElement(Gt,{name:Fr,expandDepth:tt,schema:Qn||te().Map(),displayName:un,fullPath:Lr,specPath:Dr,getComponent:le,specSelectors:Z,getConfigs:et,layoutSelectors:he,layoutActions:Ce,includeReadOnly:!0,includeWriteOnly:!0}),Vn=b.createElement("span",{className:"model-box"},b.createElement("span",{className:"model model-title"},un));return b.createElement("div",{id:`model-${Fr}`,className:"model-container",key:`models-section-${Fr}`,"data-name":Fr,ref:this.onLoadModel},b.createElement("span",{className:"models-jump-to-path"},b.createElement(jr,{specPath:Dr})),b.createElement(yr,{classes:"model-box",collapsedContent:this.getCollapsedContent(Fr),onToggle:this.handleToggle,title:Vn,displayName:un,modelName:Fr,specPath:Dr,layoutSelectors:he,layoutActions:Ce,hideSelfOnExpand:!0,expanded:tt>0&&Sn},hn))}).toArray()))}}const Ea=Ge=>{let{value:K,getComponent:Z}=Ge,le=Z("ModelCollapse"),he=b.createElement("span",null,"Array [ ",K.count()," ]");return b.createElement("span",{className:"prop-enum"},"Enum:",b.createElement("br",null),b.createElement(le,{collapsedContent:he},"[ ",K.join(", ")," ]"))};class Ms extends b.Component{render(){var K,Z,le,he;let nn=this.props,{schema:Ce,name:et,displayName:Ye,isRef:bt,getComponent:tt,getConfigs:ht,depth:Ht,onToggle:ur,expanded:Gt,specPath:tr}=nn,yr=$s(nn,["schema","name","displayName","isRef","getComponent","getConfigs","depth","onToggle","expanded","specPath"]),{specSelectors:jr,expandDepth:Tr,includeReadOnly:ln,includeWriteOnly:vn}=yr;const{isOAS3:Fr}=jr;if(!Ce)return null;const{showExtensions:Lr}=ht();let Dr=Ce.get("description"),cn=Ce.get("properties"),Cr=Ce.get("additionalProperties"),Qn=Ce.get("title")||Ye||et,Br=Ce.get("required"),un=s()(Ce).call(Ce,(gn,on)=>{var ho;return xt()(ho=["maxProperties","minProperties","nullable","example"]).call(ho,on)!==-1}),Sn=Ce.get("deprecated"),hn=Ce.getIn(["externalDocs","url"]),Vn=Ce.getIn(["externalDocs","description"]);const Mn=tt("JumpToPath",!0),po=tt("Markdown",!0),Bn=tt("Model"),Po=tt("ModelCollapse"),So=tt("Property"),Lo=tt("Link"),Uo=()=>b.createElement("span",{className:"model-jump-to-path"},b.createElement(Mn,{specPath:tr})),fs=b.createElement("span",null,b.createElement("span",null,"{"),"...",b.createElement("span",null,"}"),bt?b.createElement(Uo,null):""),Bo=jr.isOAS3()?Ce.get("anyOf"):null,Zo=jr.isOAS3()?Ce.get("oneOf"):null,ts=jr.isOAS3()?Ce.get("not"):null,zo=Qn&&b.createElement("span",{className:"model-title"},bt&&Ce.get("$$ref")&&b.createElement("span",{className:"model-hint"},Ce.get("$$ref")),b.createElement("span",{className:"model-title__text"},Qn));return b.createElement("span",{className:"model"},b.createElement(Po,{modelName:et,title:zo,onToggle:ur,expanded:!!Gt||Ht<=Tr,collapsedContent:fs},b.createElement("span",{className:"brace-open object"},"{"),bt?b.createElement(Uo,null):null,b.createElement("span",{className:"inner-object"},b.createElement("table",{className:"model"},b.createElement("tbody",null,Dr?b.createElement("tr",{className:"description"},b.createElement("td",null,"description:"),b.createElement("td",null,b.createElement(po,{source:Dr}))):null,hn&&b.createElement("tr",{className:"external-docs"},b.createElement("td",null,"externalDocs:"),b.createElement("td",null,b.createElement(Lo,{target:"_blank",href:(0,ie.Nm)(hn)},Vn||hn))),Sn?b.createElement("tr",{className:"property"},b.createElement("td",null,"deprecated:"),b.createElement("td",null,"true")):null,cn&&cn.size?$()(K=s()(Z=cn.entrySeq()).call(Z,gn=>{let[,on]=gn;return(!on.get("readOnly")||ln)&&(!on.get("writeOnly")||vn)})).call(K,gn=>{let[on,ho]=gn,is=Fr()&&ho.get("deprecated"),Js=X.List.isList(Br)&&Br.contains(on),ua=["property-row"];return is&&ua.push("deprecated"),Js&&ua.push("required"),b.createElement("tr",{key:on,className:ua.join(" ")},b.createElement("td",null,on,Js&&b.createElement("span",{className:"star"},"*")),b.createElement("td",null,b.createElement(Bn,oo()({key:`object-${et}-${on}_${ho}`},yr,{required:Js,getComponent:tt,specPath:tr.push("properties",on),getConfigs:ht,schema:ho,depth:Ht+1}))))}).toArray():null,Lr?b.createElement("tr",null,b.createElement("td",null," ")):null,Lr?$()(le=Ce.entrySeq()).call(le,gn=>{let[on,ho]=gn;if(P()(on).call(on,0,2)!=="x-")return;const is=ho?ho.toJS?ho.toJS():ho:null;return b.createElement("tr",{key:on,className:"extension"},b.createElement("td",null,on),b.createElement("td",null,h()(is)))}).toArray():null,Cr&&Cr.size?b.createElement("tr",null,b.createElement("td",null,"< * >:"),b.createElement("td",null,b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("additionalProperties"),getConfigs:ht,schema:Cr,depth:Ht+1})))):null,Bo?b.createElement("tr",null,b.createElement("td",null,"anyOf ->"),b.createElement("td",null,$()(Bo).call(Bo,(gn,on)=>b.createElement("div",{key:on},b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("anyOf",on),getConfigs:ht,schema:gn,depth:Ht+1})))))):null,Zo?b.createElement("tr",null,b.createElement("td",null,"oneOf ->"),b.createElement("td",null,$()(Zo).call(Zo,(gn,on)=>b.createElement("div",{key:on},b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("oneOf",on),getConfigs:ht,schema:gn,depth:Ht+1})))))):null,ts?b.createElement("tr",null,b.createElement("td",null,"not ->"),b.createElement("td",null,b.createElement("div",null,b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("not"),getConfigs:ht,schema:ts,depth:Ht+1}))))):null))),b.createElement("span",{className:"brace-close"},"}")),un.size?$()(he=un.entrySeq()).call(he,gn=>{let[on,ho]=gn;return b.createElement(So,{key:`${on}-${ho}`,propKey:on,propVal:ho,propClass:"property"})}):null)}}class ri extends b.Component{render(){var K;let{getComponent:Z,getConfigs:le,schema:he,depth:Ce,expandDepth:et,name:Ye,displayName:bt,specPath:tt}=this.props,ht=he.get("description"),Ht=he.get("items"),ur=he.get("title")||bt||Ye,Gt=s()(he).call(he,(Dr,cn)=>{var Cr;return xt()(Cr=["type","items","description","$$ref","externalDocs"]).call(Cr,cn)===-1}),tr=he.getIn(["externalDocs","url"]),yr=he.getIn(["externalDocs","description"]);const jr=Z("Markdown",!0),Tr=Z("ModelCollapse"),ln=Z("Model"),vn=Z("Property"),Fr=Z("Link"),Lr=ur&&b.createElement("span",{className:"model-title"},b.createElement("span",{className:"model-title__text"},ur));return b.createElement("span",{className:"model"},b.createElement(Tr,{title:Lr,expanded:Ce<=et,collapsedContent:"[...]"},"[",Gt.size?$()(K=Gt.entrySeq()).call(K,Dr=>{let[cn,Cr]=Dr;return b.createElement(vn,{key:`${cn}-${Cr}`,propKey:cn,propVal:Cr,propClass:"property"})}):null,ht?b.createElement(jr,{source:ht}):Gt.size?b.createElement("div",{className:"markdown"}):null,tr&&b.createElement("div",{className:"external-docs"},b.createElement(Fr,{target:"_blank",href:(0,ie.Nm)(tr)},yr||tr)),b.createElement("span",null,b.createElement(ln,oo()({},this.props,{getConfigs:le,specPath:tt.push("items"),name:null,schema:Ht,required:!1,depth:Ce+1}))),"]"))}}const Ta="property primitive";class zs extends b.Component{render(){var K,Z,le;let{schema:he,getComponent:Ce,getConfigs:et,name:Ye,displayName:bt,depth:tt,expandDepth:ht}=this.props;const{showExtensions:Ht}=et();if(!he||!he.get)return b.createElement("div",null);let ur=he.get("type"),Gt=he.get("format"),tr=he.get("xml"),yr=he.get("enum"),jr=he.get("title")||bt||Ye,Tr=he.get("description"),ln=(0,ie.nX)(he),vn=s()(he).call(he,(Sn,hn)=>{var Vn;return xt()(Vn=["enum","type","format","description","$$ref","externalDocs"]).call(Vn,hn)===-1}).filterNot((Sn,hn)=>ln.has(hn)),Fr=he.getIn(["externalDocs","url"]),Lr=he.getIn(["externalDocs","description"]);const Dr=Ce("Markdown",!0),cn=Ce("EnumModel"),Cr=Ce("Property"),Qn=Ce("ModelCollapse"),Br=Ce("Link"),un=jr&&b.createElement("span",{className:"model-title"},b.createElement("span",{className:"model-title__text"},jr));return b.createElement("span",{className:"model"},b.createElement(Qn,{title:un,expanded:tt<=ht,collapsedContent:"[...]",hideSelfOnExpand:ht!==tt},b.createElement("span",{className:"prop"},Ye&&tt>1&&b.createElement("span",{className:"prop-name"},jr),b.createElement("span",{className:"prop-type"},ur),Gt&&b.createElement("span",{className:"prop-format"},"($",Gt,")"),vn.size?$()(K=vn.entrySeq()).call(K,Sn=>{let[hn,Vn]=Sn;return b.createElement(Cr,{key:`${hn}-${Vn}`,propKey:hn,propVal:Vn,propClass:Ta})}):null,Ht&&ln.size?$()(Z=ln.entrySeq()).call(Z,Sn=>{let[hn,Vn]=Sn;return b.createElement(Cr,{key:`${hn}-${Vn}`,propKey:hn,propVal:Vn,propClass:Ta})}):null,Tr?b.createElement(Dr,{source:Tr}):null,Fr&&b.createElement("div",{className:"external-docs"},b.createElement(Br,{target:"_blank",href:(0,ie.Nm)(Fr)},Lr||Fr)),tr&&tr.size?b.createElement("span",null,b.createElement("br",null),b.createElement("span",{className:Ta},"xml:"),$()(le=tr.entrySeq()).call(le,Sn=>{let[hn,Vn]=Sn;return b.createElement("span",{key:`${hn}-${Vn}`,className:Ta},b.createElement("br",null),"   ",hn,": ",String(Vn))}).toArray()):null,yr&&b.createElement(cn,{value:yr,getComponent:Ce}))))}}const Oi=Ge=>{let{propKey:K,propVal:Z,propClass:le}=Ge;return b.createElement("span",{className:le},b.createElement("br",null),K,": ",String(Z))};class za extends b.Component{render(){const{onTryoutClick:K,onCancelClick:Z,onResetClick:le,enabled:he,hasUserEditedBody:Ce,isOAS3:et}=this.props,Ye=et&&Ce;return b.createElement("div",{className:Ye?"try-out btn-group":"try-out"},he?b.createElement("button",{className:"btn try-out__btn cancel",onClick:Z},"Cancel"):b.createElement("button",{className:"btn try-out__btn",onClick:K},"Try it out "),Ye&&b.createElement("button",{className:"btn try-out__btn reset",onClick:le},"Reset"))}}Me()(za,"defaultProps",{onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1});class yo extends b.PureComponent{render(){const{bypass:K,isSwagger2:Z,isOAS3:le,alsoShow:he}=this.props;return K?b.createElement("div",null,this.props.children):Z&&le?b.createElement("div",{className:"version-pragma"},he,b.createElement("div",{className:"version-pragma__message version-pragma__message--ambiguous"},b.createElement("div",null,b.createElement("h3",null,"Unable to render this definition"),b.createElement("p",null,b.createElement("code",null,"swagger")," and ",b.createElement("code",null,"openapi")," fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields."),b.createElement("p",null,"Supported version fields are ",b.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",b.createElement("code",null,"openapi: 3.0.n")," (for example, ",b.createElement("code",null,"openapi: 3.0.0"),").")))):Z||le?b.createElement("div",null,this.props.children):b.createElement("div",{className:"version-pragma"},he,b.createElement("div",{className:"version-pragma__message version-pragma__message--missing"},b.createElement("div",null,b.createElement("h3",null,"Unable to render this definition"),b.createElement("p",null,"The provided definition does not specify a valid version field."),b.createElement("p",null,"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are ",b.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",b.createElement("code",null,"openapi: 3.0.n")," (for example, ",b.createElement("code",null,"openapi: 3.0.0"),")."))))}}Me()(yo,"defaultProps",{alsoShow:null,children:null,bypass:!1});const Ji=Ge=>{let{version:K}=Ge;return b.createElement("small",null,b.createElement("pre",{className:"version"}," ",K," "))},ni=Ge=>{let{enabled:K,path:Z,text:le}=Ge;return b.createElement("a",{className:"nostyle",onClick:K?he=>he.preventDefault():null,href:K?`#/${Z}`:null},b.createElement("span",null,le))},Vs=()=>b.createElement("div",null,b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"svg-assets"},b.createElement("defs",null,b.createElement("symbol",{viewBox:"0 0 20 20",id:"unlocked"},b.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"locked"},b.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"close"},b.createElement("path",{d:"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow"},b.createElement("path",{d:"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow-down"},b.createElement("path",{d:"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow-up"},b.createElement("path",{d:"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z"})),b.createElement("symbol",{viewBox:"0 0 24 24",id:"jump-to"},b.createElement("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"})),b.createElement("symbol",{viewBox:"0 0 24 24",id:"expand"},b.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),b.createElement("symbol",{viewBox:"0 0 15 16",id:"copy"},b.createElement("g",{transform:"translate(2, -1)"},b.createElement("path",{fill:"#ffffff",fillRule:"evenodd",d:"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"}))))));var Ws=cr(4599);class rn extends b.Component{render(){const{errSelectors:K,specSelectors:Z,getComponent:le}=this.props,he=le("SvgAssets"),Ce=le("InfoContainer",!0),et=le("VersionPragmaFilter"),Ye=le("operations",!0),bt=le("Models",!0),tt=le("Webhooks",!0),ht=le("Row"),Ht=le("Col"),ur=le("errors",!0),Gt=le("ServersContainer",!0),tr=le("SchemesContainer",!0),yr=le("AuthorizeBtnContainer",!0),jr=le("FilterContainer",!0),Tr=Z.isSwagger2(),ln=Z.isOAS3(),vn=Z.isOAS31(),Fr=!Z.specStr(),Lr=Z.loadingStatus();let Dr=null;if(Lr==="loading"&&(Dr=b.createElement("div",{className:"info"},b.createElement("div",{className:"loading-container"},b.createElement("div",{className:"loading"})))),Lr==="failed"&&(Dr=b.createElement("div",{className:"info"},b.createElement("div",{className:"loading-container"},b.createElement("h4",{className:"title"},"Failed to load API definition."),b.createElement(ur,null)))),Lr==="failedConfig"){const Sn=K.lastError(),hn=Sn?Sn.get("message"):"";Dr=b.createElement("div",{className:"info failed-config"},b.createElement("div",{className:"loading-container"},b.createElement("h4",{className:"title"},"Failed to load remote configuration."),b.createElement("p",null,hn)))}if(!Dr&&Fr&&(Dr=b.createElement("h4",null,"No API definition provided.")),Dr)return b.createElement("div",{className:"swagger-ui"},b.createElement("div",{className:"loading-container"},Dr));const cn=Z.servers(),Cr=Z.schemes(),Qn=cn&&cn.size,Br=Cr&&Cr.size,un=!!Z.securityDefinitions();return b.createElement("div",{className:"swagger-ui"},b.createElement(he,null),b.createElement(et,{isSwagger2:Tr,isOAS3:ln,alsoShow:b.createElement(ur,null)},b.createElement(ur,null),b.createElement(ht,{className:"information-container"},b.createElement(Ht,{mobile:12},b.createElement(Ce,null))),Qn||Br||un?b.createElement("div",{className:"scheme-container"},b.createElement(Ht,{className:"schemes wrapper",mobile:12},Qn?b.createElement(Gt,null):null,Br?b.createElement(tr,null):null,un?b.createElement(yr,null):null)):null,b.createElement(jr,null),b.createElement(ht,null,b.createElement(Ht,{mobile:12,desktop:12},b.createElement(Ye,null))),vn&&b.createElement(ht,{className:"webhooks-container"},b.createElement(Ht,{mobile:12,desktop:12},b.createElement(tt,null))),b.createElement(ht,null,b.createElement(Ht,{mobile:12,desktop:12},b.createElement(bt,null)))))}}var ki=cr(775),vs=cr.n(ki);const Fo={value:"",onChange:()=>{},schema:{},keyName:"",required:!1,errors:(0,X.List)()};class Ra extends b.Component{componentDidMount(){const{dispatchInitialValue:K,value:Z,onChange:le}=this.props;K?le(Z):K===!1&&le("")}render(){let{schema:K,errors:Z,value:le,onChange:he,getComponent:Ce,fn:et,disabled:Ye}=this.props;const bt=K&&K.get?K.get("format"):null,tt=K&&K.get?K.get("type"):null;let ht=ur=>Ce(ur,!1,{failSilently:!0}),Ht=tt?ht(bt?`JsonSchema_${tt}_${bt}`:`JsonSchema_${tt}`):Ce("JsonSchema_string");return Ht||(Ht=Ce("JsonSchema_string")),b.createElement(Ht,oo()({},this.props,{errors:Z,fn:et,getComponent:Ce,value:le,onChange:he,schema:K,disabled:Ye}))}}Me()(Ra,"defaultProps",Fo);class oi extends b.Component{constructor(){super(...arguments),Me()(this,"onChange",K=>{const Z=this.props.schema&&this.props.schema.get("type")==="file"?K.target.files[0]:K.target.value;this.props.onChange(Z,this.props.keyName)}),Me()(this,"onEnumChange",K=>this.props.onChange(K))}render(){let{getComponent:K,value:Z,schema:le,errors:he,required:Ce,description:et,disabled:Ye}=this.props;const bt=le&&le.get?le.get("enum"):null,tt=le&&le.get?le.get("format"):null,ht=le&&le.get?le.get("type"):null,Ht=le&&le.get?le.get("in"):null;if(Z||(Z=""),he=he.toJS?he.toJS():[],bt){const tr=K("Select");return b.createElement(tr,{className:he.length?"invalid":"",title:he.length?he:"",allowedValues:[...bt],value:Z,allowEmptyValue:!Ce,disabled:Ye,onChange:this.onEnumChange})}const ur=Ye||Ht&&Ht==="formData"&&!("FormData"in window),Gt=K("Input");return ht&&ht==="file"?b.createElement(Gt,{type:"file",className:he.length?"invalid":"",title:he.length?he:"",onChange:this.onChange,disabled:ur}):b.createElement(vs(),{type:tt&&tt==="password"?"password":"text",className:he.length?"invalid":"",title:he.length?he:"",value:Z,minLength:0,debounceTimeout:350,placeholder:et,onChange:this.onChange,disabled:ur})}}Me()(oi,"defaultProps",Fo);class si extends b.PureComponent{constructor(K,Z){super(K,Z),Me()(this,"onChange",()=>{this.props.onChange(this.state.value)}),Me()(this,"onItemChange",(le,he)=>{this.setState(Ce=>{let{value:et}=Ce;return{value:et.set(he,le)}},this.onChange)}),Me()(this,"removeItem",le=>{this.setState(he=>{let{value:Ce}=he;return{value:Ce.delete(le)}},this.onChange)}),Me()(this,"addItem",()=>{const{fn:le}=this.props;let he=Ai(this.state.value);this.setState(()=>({value:he.push(le.getSampleSchema(this.state.schema.get("items"),!1,{includeWriteOnly:!0}))}),this.onChange)}),Me()(this,"onEnumChange",le=>{this.setState(()=>({value:le}),this.onChange)}),this.state={value:Ai(K.value),schema:K.schema}}UNSAFE_componentWillReceiveProps(K){const Z=Ai(K.value);Z!==this.state.value&&this.setState({value:Z}),K.schema!==this.state.schema&&this.setState({schema:K.schema})}render(){var K;let{getComponent:Z,required:le,schema:he,errors:Ce,fn:et,disabled:Ye}=this.props;Ce=Ce.toJS?Ce.toJS():x()(Ce)?Ce:[];const bt=s()(Ce).call(Ce,Fr=>typeof Fr=="string"),tt=$()(K=s()(Ce).call(Ce,Fr=>Fr.needRemove!==void 0)).call(K,Fr=>Fr.error),ht=this.state.value,Ht=!!(ht&&ht.count&&ht.count()>0),ur=he.getIn(["items","enum"]),Gt=he.getIn(["items","type"]),tr=he.getIn(["items","format"]),yr=he.get("items");let jr,Tr=!1,ln=Gt==="file"||Gt==="string"&&tr==="binary";if(Gt&&tr?jr=Z(`JsonSchema_${Gt}_${tr}`):Gt!=="boolean"&&Gt!=="array"&&Gt!=="object"||(jr=Z(`JsonSchema_${Gt}`)),jr||ln||(Tr=!0),ur){const Fr=Z("Select");return b.createElement(Fr,{className:Ce.length?"invalid":"",title:Ce.length?Ce:"",multiple:!0,value:ht,disabled:Ye,allowedValues:ur,allowEmptyValue:!le,onChange:this.onEnumChange})}const vn=Z("Button");return b.createElement("div",{className:"json-schema-array"},Ht?$()(ht).call(ht,(Fr,Lr)=>{var Dr;const cn=(0,X.fromJS)([...$()(Dr=s()(Ce).call(Ce,Cr=>Cr.index===Lr)).call(Dr,Cr=>Cr.error)]);return b.createElement("div",{key:Lr,className:"json-schema-form-item"},ln?b.createElement(Va,{value:Fr,onChange:Cr=>this.onItemChange(Cr,Lr),disabled:Ye,errors:cn,getComponent:Z}):Tr?b.createElement(xa,{value:Fr,onChange:Cr=>this.onItemChange(Cr,Lr),disabled:Ye,errors:cn}):b.createElement(jr,oo()({},this.props,{value:Fr,onChange:Cr=>this.onItemChange(Cr,Lr),disabled:Ye,errors:cn,schema:yr,getComponent:Z,fn:et})),Ye?null:b.createElement(vn,{className:`btn btn-sm json-schema-form-item-remove ${tt.length?"invalid":null}`,title:tt.length?tt:"",onClick:()=>this.removeItem(Lr)}," - "))}):null,Ye?null:b.createElement(vn,{className:`btn btn-sm json-schema-form-item-add ${bt.length?"invalid":null}`,title:bt.length?bt:"",onClick:this.addItem},"Add ",Gt?`${Gt} `:"","item"))}}Me()(si,"defaultProps",Fo);class xa extends b.Component{constructor(){super(...arguments),Me()(this,"onChange",K=>{const Z=K.target.value;this.props.onChange(Z,this.props.keyName)})}render(){let{value:K,errors:Z,description:le,disabled:he}=this.props;return K||(K=""),Z=Z.toJS?Z.toJS():[],b.createElement(vs(),{type:"text",className:Z.length?"invalid":"",title:Z.length?Z:"",value:K,minLength:0,debounceTimeout:350,placeholder:le,onChange:this.onChange,disabled:he})}}Me()(xa,"defaultProps",Fo);class Va extends b.Component{constructor(){super(...arguments),Me()(this,"onFileChange",K=>{const Z=K.target.files[0];this.props.onChange(Z,this.props.keyName)})}render(){let{getComponent:K,errors:Z,disabled:le}=this.props;const he=K("Input"),Ce=le||!("FormData"in window);return b.createElement(he,{type:"file",className:Z.length?"invalid":"",title:Z.length?Z:"",onChange:this.onFileChange,disabled:Ce})}}Me()(Va,"defaultProps",Fo);class ca extends b.Component{constructor(){super(...arguments),Me()(this,"onEnumChange",K=>this.props.onChange(K))}render(){let{getComponent:K,value:Z,errors:le,schema:he,required:Ce,disabled:et}=this.props;le=le.toJS?le.toJS():[];let Ye=he&&he.get?he.get("enum"):null,bt=!Ye||!Ce,tt=!Ye&&["true","false"];const ht=K("Select");return b.createElement(ht,{className:le.length?"invalid":"",title:le.length?le:"",value:String(Z),disabled:et,allowedValues:Ye?[...Ye]:tt,allowEmptyValue:bt,onChange:this.onEnumChange})}}Me()(ca,"defaultProps",Fo);const Ol=Ge=>$()(Ge).call(Ge,K=>{const Z=K.propKey!==void 0?K.propKey:K.index;let le=typeof K=="string"?K:typeof K.error=="string"?K.error:null;if(!Z&&le)return le;let he=K.error,Ce=`/${K.propKey}`;for(;typeof he=="object";){const et=he.propKey!==void 0?he.propKey:he.index;if(et===void 0||(Ce+=`/${et}`,!he.error))break;he=he.error}return`${Ce}: ${he}`});class Wa extends b.PureComponent{constructor(){super(),Me()(this,"onChange",K=>{this.props.onChange(K)}),Me()(this,"handleOnChange",K=>{const Z=K.target.value;this.onChange(Z)})}render(){let{getComponent:K,value:Z,errors:le,disabled:he}=this.props;const Ce=K("TextArea");return le=le.toJS?le.toJS():x()(le)?le:[],b.createElement("div",null,b.createElement(Ce,{className:Jr()({invalid:le.length}),title:le.length?Ol(le).join(", "):"",value:(0,ie.Pz)(Z),disabled:he,onChange:this.handleOnChange}))}}function Ai(Ge){return X.List.isList(Ge)?Ge:x()(Ge)?(0,X.fromJS)(Ge):(0,X.List)()}function kl(){let Ge={components:{App:Vt,authorizationPopup:Rt,authorizeBtn:Jt,AuthorizeBtnContainer:Wt,authorizeOperationBtn:zt,auths:Yt,AuthItem:Pt,authError:qe,oauth2:Oe,apiKeyAuth:ve,basicAuth:ke,clear:it,liveResponse:qt,InitializedInput:$r,info:lo,InfoContainer:zn,InfoUrl:Xn,InfoBasePath:mn,Contact:Ve,License:On,JumpToPath:Hr,CopyToClipboardBtn:Fn,onlineValidatorBadge:Xt.Z,operations:fr,operation:ot,OperationSummary:Qt,OperationSummaryMethod:lr,OperationSummaryPath:Nt,highlightCode:As,responses:qr,response:Qo,ResponseExtension:qo,responseBody:Us,parameters:ws,parameterRow:Tn,execute:to,headers:Yn,errors:Kr,contentType:Rn,overview:_r,footer:Gr,FilterContainer:ao,ParamBody:En,curl:kn,schemes:xo,SchemesContainer:Ko,modelExample:Ss,ModelWrapper:uo,ModelCollapse:xn,Model:Cs.Z,Models:ns,EnumModel:Ea,ObjectModel:Ms,ArrayModel:ri,PrimitiveModel:zs,Property:Oi,TryItOutButton:za,Markdown:Ws.Z,BaseLayout:rn,VersionPragmaFilter:yo,VersionStamp:Ji,OperationExt:Bt,OperationExtRow:nr,ParameterExt:Kt,ParameterIncludeEmpty:Rs,OperationTag:Le,OperationContainer:Mt,DeepLink:ni,SvgAssets:Vs,Example:ze,ExamplesSelect:nt,ExamplesSelectValueRetainer:rt}},K={components:p},Z={components:i};return[T.default,dt.default,Qe.default,je.default,$e.default,ge.default,Ie.default,Je.default,Ge,K,Et.default,Z,Ct.default,jt.default,I.default,z.default,ue.default,Be.default,V.default,(0,ne.default)()]}Me()(Wa,"defaultProps",Fo);var hs=cr(97451),_=cr(29806),F=cr(97139);function re(){return[kl,hs.default,F.default,_.default]}var de=cr(45308);const{GIT_DIRTY:Se,GIT_COMMIT:He,PACKAGE_VERSION:at,BUILD_TIME:St}={PACKAGE_VERSION:"5.3.1",GIT_COMMIT:"g733e51a",GIT_DIRTY:!0,BUILD_TIME:"Wed, 02 Aug 2023 13:12:32 GMT"};function pr(Ge){var K;fe.Z.versions=fe.Z.versions||{},fe.Z.versions.swaggerUi={version:at,gitRevision:He,gitDirty:Se,buildTimestamp:St};const Z={dom_id:null,domNode:null,spec:{},url:"",urls:null,layout:"BaseLayout",docExpansion:"list",maxDisplayedTags:null,filter:null,validatorUrl:"https://validator.swagger.io/validator",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,r()(K=window.location.pathname).call(K,"/"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:ur=>ur,responseInterceptor:ur=>ur,showMutatedRequest:!0,defaultModelRendering:"example",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:"cURL (bash)",syntax:"bash"},curl_powershell:{title:"cURL (PowerShell)",syntax:"powershell"},curl_cmd:{title:"cURL (CMD)",syntax:"bash"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:["get","put","post","delete","options","head","patch","trace"],queryConfigEnabled:!1,presets:[re],plugins:[],pluginsOptions:{pluginLoadType:"legacy"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:"agate"}};let le=Ge.queryConfigEnabled?(0,ie.UG)():{};const he=Ge.domNode;delete Ge.domNode;const Ce=y()({},Z,Ge,le),et={system:{configs:Ce.configs},plugins:Ce.presets,pluginsOptions:Ce.pluginsOptions,state:y()({layout:{layout:Ce.layout,filter:s()(Ce)},spec:{spec:"",url:Ce.url},requestSnippets:Ce.requestSnippets},Ce.initialState)};if(Ce.initialState)for(var Ye in Ce.initialState)Object.prototype.hasOwnProperty.call(Ce.initialState,Ye)&&Ce.initialState[Ye]===void 0&&delete et.state[Ye];var bt=new Y(et);bt.register([Ce.plugins,()=>({fn:Ce.fn,components:Ce.components,state:Ce.state})]);var tt=bt.getSystem();const ht=ur=>{let Gt=tt.specSelectors.getLocalConfig?tt.specSelectors.getLocalConfig():{},tr=y()({},Gt,Ce,ur||{},le);if(he&&(tr.domNode=he),bt.setConfigs(tr),tt.configsActions.loaded(),ur!==null&&(!le.url&&typeof tr.spec=="object"&&c()(tr.spec).length?(tt.specActions.updateUrl(""),tt.specActions.updateLoadingStatus("success"),tt.specActions.updateSpec(h()(tr.spec))):tt.specActions.download&&tr.url&&!tr.urls&&(tt.specActions.updateUrl(tr.url),tt.specActions.download(tr.url))),tr.domNode)tt.render(tr.domNode,"App");else if(tr.dom_id){let yr=document.querySelector(tr.dom_id);tt.render(yr,"App")}else tr.dom_id===null||tr.domNode===null||console.error("Skipped rendering: no `dom_id` or `domNode` was specified");return tt},Ht=le.config||Ce.configUrl;return Ht&&tt.specActions&&tt.specActions.getConfigByUrl?(tt.specActions.getConfigByUrl({url:Ht,loadRemoteConfig:!0,requestInterceptor:Ce.requestInterceptor,responseInterceptor:Ce.responseInterceptor},ht),tt):ht()}pr.presets={apis:re},pr.plugins=de.default;const ar=pr})(),ba=ba.default})())})(Xf);var mm=Xf.exports;const gm=dm(mm),Tw="",Qf="API_DOC:DESTINATION_URL_KEY",ed=()=>localStorage.getItem(Qf),ym=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const ia=ss.useAPIClient(),{t:zc}=Uc(),Vc=sa.useRef(),{data:la}=ss.useRequest({url:"swagger:getUrls"}),cr=i=>(i.headers.Authorization||(i.headers.Authorization=`Bearer ${ia.auth.getToken()}`),i),[ba,p]=sa.useState(ed());return sa.useEffect(()=>{ba&&localStorage.setItem(Qf,ba)},[ba]),sa.useEffect(()=>{var i;(i=la==null?void 0:la.data)!=null&&i.length&&(!ba||!la.data.find(e=>e.url===ed()))&&p(la.data[0].url)},[ba,la]),sa.useEffect(()=>{gm({requestInterceptor:cr,url:ba,domNode:Vc.current})},[ba]),ba?Pn.jsxs(qs.Space,{direction:"vertical",style:{width:"100%"},children:[Pn.jsx("div",{style:{display:"flex",justifyContent:"center",width:"100%"},children:Pn.jsxs("div",{className:ss.css`
142
+ `+K}Ht=b.createElement(bt,{language:ur,downloadable:!0,fileName:`${tt}.json`,value:ht,getConfigs:Ce,canCopy:!0})}else/xml/i.test(Z)?(ht=Ts()(K,{textNodesOnSameLine:!0,indentor:" "}),Ht=b.createElement(bt,{downloadable:!0,fileName:`${tt}.xml`,value:ht,getConfigs:Ce,canCopy:!0})):Ht=Jo()(Z)==="text/html"||/text\/plain/.test(Z)?b.createElement(bt,{downloadable:!0,fileName:`${tt}.html`,value:K,getConfigs:Ce,canCopy:!0}):Jo()(Z)==="text/csv"||/text\/csv/.test(Z)?b.createElement(bt,{downloadable:!0,fileName:`${tt}.csv`,value:K,getConfigs:Ce,canCopy:!0}):/^image\//i.test(Z)?Te()(Z).call(Z,"svg")?b.createElement("div",null," ",K," "):b.createElement("img",{src:as().createObjectURL(K)}):/^audio\//i.test(Z)?b.createElement("pre",{className:"microlight"},b.createElement("audio",{controls:!0,key:le},b.createElement("source",{src:le,type:Z}))):typeof K=="string"?b.createElement(bt,{downloadable:!0,fileName:`${tt}.txt`,value:K,getConfigs:Ce,canCopy:!0}):K.size>0?Ye?b.createElement("div",null,b.createElement("p",{className:"i"},"Unrecognized response type; displaying content as text."),b.createElement(bt,{downloadable:!0,fileName:`${tt}.txt`,value:Ye,getConfigs:Ce,canCopy:!0})):b.createElement("p",{className:"i"},"Unrecognized response type; unable to display."):null;return Ht?b.createElement("div",null,b.createElement("h5",null,"Response body"),Ht):null}}var Mo=cr(3665),Ao=cr.n(Mo);class ws extends b.Component{constructor(K){super(K),Me()(this,"onChange",(Z,le,he)=>{let{specActions:{changeParamByIdentity:Ce},onChangeKey:et}=this.props;Ce(et,Z,le,he)}),Me()(this,"onChangeConsumesWrapper",Z=>{let{specActions:{changeConsumesValue:le},onChangeKey:he}=this.props;le(he,Z)}),Me()(this,"toggleTab",Z=>Z==="parameters"?this.setState({parametersVisible:!0,callbackVisible:!1}):Z==="callbacks"?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0),Me()(this,"onChangeMediaType",Z=>{let{value:le,pathMethod:he}=Z,{specActions:Ce,oas3Selectors:et,oas3Actions:Ye}=this.props;const bt=et.hasUserEditedBody(...he),tt=et.shouldRetainRequestBodyValue(...he);Ye.setRequestContentType({value:le,pathMethod:he}),Ye.initRequestBodyValidateError({pathMethod:he}),bt||(tt||Ye.setRequestBodyValue({value:void 0,pathMethod:he}),Ce.clearResponse(...he),Ce.clearRequest(...he),Ce.clearValidateParams(he))}),this.state={callbackVisible:!1,parametersVisible:!0}}render(){var K;let{onTryoutClick:Z,onResetClick:le,parameters:he,allowTryItOut:Ce,tryItOutEnabled:et,specPath:Ye,fn:bt,getComponent:tt,getConfigs:ht,specSelectors:Ht,specActions:ur,pathMethod:Gt,oas3Actions:tr,oas3Selectors:yr,operation:jr}=this.props;const Tr=tt("parameterRow"),ln=tt("TryItOutButton"),vn=tt("contentType"),Fr=tt("Callbacks",!0),Lr=tt("RequestBody",!0),Dr=et&&Ce,cn=Ht.isOAS3(),Cr=jr.get("requestBody"),Qn=k()(K=Ao()(k()(he).call(he,(Br,un)=>{var hn;const Sn=un.get("in");return(hn=Br[Sn])!=null||(Br[Sn]=[]),Br[Sn].push(un),Br},{}))).call(K,(Br,un)=>M()(Br).call(Br,un),[]);return b.createElement("div",{className:"opblock-section"},b.createElement("div",{className:"opblock-section-header"},cn?b.createElement("div",{className:"tab-header"},b.createElement("div",{onClick:()=>this.toggleTab("parameters"),className:`tab-item ${this.state.parametersVisible&&"active"}`},b.createElement("h4",{className:"opblock-title"},b.createElement("span",null,"Parameters"))),jr.get("callbacks")?b.createElement("div",{onClick:()=>this.toggleTab("callbacks"),className:`tab-item ${this.state.callbackVisible&&"active"}`},b.createElement("h4",{className:"opblock-title"},b.createElement("span",null,"Callbacks"))):null):b.createElement("div",{className:"tab-header"},b.createElement("h4",{className:"opblock-title"},"Parameters")),Ce?b.createElement(ln,{isOAS3:Ht.isOAS3(),hasUserEditedBody:yr.hasUserEditedBody(...Gt),enabled:et,onCancelClick:this.props.onCancelClick,onTryoutClick:Z,onResetClick:()=>le(Gt)}):null),this.state.parametersVisible?b.createElement("div",{className:"parameters-container"},Qn.length?b.createElement("div",{className:"table-container"},b.createElement("table",{className:"parameters"},b.createElement("thead",null,b.createElement("tr",null,b.createElement("th",{className:"col_header parameters-col_name"},"Name"),b.createElement("th",{className:"col_header parameters-col_description"},"Description"))),b.createElement("tbody",null,$()(Qn).call(Qn,(Br,un)=>b.createElement(Tr,{fn:bt,specPath:Ye.push(un.toString()),getComponent:tt,getConfigs:ht,rawParam:Br,param:Ht.parameterWithMetaByIdentity(Gt,Br),key:`${Br.get("in")}.${Br.get("name")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:Ht,specActions:ur,oas3Actions:tr,oas3Selectors:yr,pathMethod:Gt,isExecute:Dr}))))):b.createElement("div",{className:"opblock-description-wrapper"},b.createElement("p",null,"No parameters"))):null,this.state.callbackVisible?b.createElement("div",{className:"callbacks-container opblock-description-wrapper"},b.createElement(Fr,{callbacks:(0,X.Map)(jr.get("callbacks")),specPath:P()(Ye).call(Ye,0,-1).push("callbacks")})):null,cn&&Cr&&this.state.parametersVisible&&b.createElement("div",{className:"opblock-section opblock-section-request-body"},b.createElement("div",{className:"opblock-section-header"},b.createElement("h4",{className:`opblock-title parameter__name ${Cr.get("required")&&"required"}`},"Request body"),b.createElement("label",null,b.createElement(vn,{value:yr.requestContentType(...Gt),contentTypes:Cr.get("content",(0,X.List)()).keySeq(),onChange:Br=>{this.onChangeMediaType({value:Br,pathMethod:Gt})},className:"body-param-content-type",ariaLabel:"Request content type"}))),b.createElement("div",{className:"opblock-description-wrapper"},b.createElement(Lr,{setRetainRequestBodyValueFlag:Br=>tr.setRetainRequestBodyValueFlag({value:Br,pathMethod:Gt}),userHasEditedBody:yr.hasUserEditedBody(...Gt),specPath:P()(Ye).call(Ye,0,-1).push("requestBody"),requestBody:Cr,requestBodyValue:yr.requestBodyValue(...Gt),requestBodyInclusionSetting:yr.requestBodyInclusionSetting(...Gt),requestBodyErrors:yr.requestBodyErrors(...Gt),isExecute:Dr,getConfigs:ht,activeExamplesKey:yr.activeExamplesMember(...Gt,"requestBody","requestBody"),updateActiveExamplesKey:Br=>{this.props.oas3Actions.setActiveExamplesMember({name:Br,pathMethod:this.props.pathMethod,contextType:"requestBody",contextName:"requestBody"})},onChange:(Br,un)=>{if(un){const Sn=yr.requestBodyValue(...Gt),hn=X.Map.isMap(Sn)?Sn:(0,X.Map)();return tr.setRequestBodyValue({pathMethod:Gt,value:hn.setIn(un,Br)})}tr.setRequestBodyValue({value:Br,pathMethod:Gt})},onChangeIncludeEmpty:(Br,un)=>{tr.setRequestBodyInclusion({pathMethod:Gt,value:un,name:Br})},contentType:yr.requestContentType(...Gt)}))))}}Me()(ws,"defaultProps",{onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]});const Kt=Ge=>{let{xKey:K,xVal:Z}=Ge;return b.createElement("div",{className:"parameter__extension"},K,": ",String(Z))},Es={onChange:()=>{},isIncludedOptions:{}};class Rs extends b.Component{constructor(){super(...arguments),Me()(this,"onCheckboxChange",K=>{const{onChange:Z}=this.props;Z(K.target.checked)})}componentDidMount(){const{isIncludedOptions:K,onChange:Z}=this.props,{shouldDispatchInit:le,defaultValue:he}=K;le&&Z(he)}render(){let{isIncluded:K,isDisabled:Z}=this.props;return b.createElement("div",null,b.createElement("label",{className:Jr()("parameter__empty_value_toggle",{disabled:Z})},b.createElement("input",{type:"checkbox",disabled:Z,checked:!Z&&K,onChange:this.onCheckboxChange}),"Send empty value"))}}Me()(Rs,"defaultProps",Es);var Oo=cr(19069);class Tn extends b.Component{constructor(K,Z){var le;super(K,Z),le=this,Me()(this,"onChangeWrapper",function(he){let Ce,et=arguments.length>1&&arguments[1]!==void 0&&arguments[1],{onChange:Ye,rawParam:bt}=le.props;return Ce=he===""||he&&he.size===0?null:he,Ye(bt,Ce,et)}),Me()(this,"_onExampleSelect",he=>{this.props.oas3Actions.setActiveExamplesMember({name:he,pathMethod:this.props.pathMethod,contextType:"parameters",contextName:this.getParamKey()})}),Me()(this,"onChangeIncludeEmpty",he=>{let{specActions:Ce,param:et,pathMethod:Ye}=this.props;const bt=et.get("name"),tt=et.get("in");return Ce.updateEmptyParamInclusion(Ye,bt,tt,he)}),Me()(this,"setDefaultValue",()=>{let{specSelectors:he,pathMethod:Ce,rawParam:et,oas3Selectors:Ye,fn:bt}=this.props;const tt=he.parameterWithMetaByIdentity(Ce,et)||(0,X.Map)(),{schema:ht}=(0,Oo.Z)(tt,{isOAS3:he.isOAS3()}),Ht=tt.get("content",(0,X.Map)()).keySeq().first(),ur=ht?bt.getSampleSchema(ht.toJS(),Ht,{includeWriteOnly:!0}):null;if(tt&&tt.get("value")===void 0&&tt.get("in")!=="body"){let Gt;if(he.isSwagger2())Gt=tt.get("x-example")!==void 0?tt.get("x-example"):tt.getIn(["schema","example"])!==void 0?tt.getIn(["schema","example"]):ht&&ht.getIn(["default"]);else if(he.isOAS3()){const tr=Ye.activeExamplesMember(...Ce,"parameters",this.getParamKey());Gt=tt.getIn(["examples",tr,"value"])!==void 0?tt.getIn(["examples",tr,"value"]):tt.getIn(["content",Ht,"example"])!==void 0?tt.getIn(["content",Ht,"example"]):tt.get("example")!==void 0?tt.get("example"):(ht&&ht.get("example"))!==void 0?ht&&ht.get("example"):(ht&&ht.get("default"))!==void 0?ht&&ht.get("default"):tt.get("default")}Gt===void 0||X.List.isList(Gt)||(Gt=(0,ie.Pz)(Gt)),Gt!==void 0?this.onChangeWrapper(Gt):ht&&ht.get("type")==="object"&&ur&&!tt.get("examples")&&this.onChangeWrapper(X.List.isList(ur)?ur:(0,ie.Pz)(ur))}}),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(K){let Z,{specSelectors:le,pathMethod:he,rawParam:Ce}=K,et=le.isOAS3(),Ye=le.parameterWithMetaByIdentity(he,Ce)||new X.Map;if(Ye=Ye.isEmpty()?Ce:Ye,et){let{schema:ht}=(0,Oo.Z)(Ye,{isOAS3:et});Z=ht?ht.get("enum"):void 0}else Z=Ye?Ye.get("enum"):void 0;let bt,tt=Ye?Ye.get("value"):void 0;tt!==void 0?bt=tt:Ce.get("required")&&Z&&Z.size&&(bt=Z.first()),bt!==void 0&&bt!==tt&&this.onChangeWrapper((0,ie.D$)(bt)),this.setDefaultValue()}getParamKey(){const{param:K}=this.props;return K?`${K.get("name")}-${K.get("in")}`:null}render(){var K,Z;let{param:le,rawParam:he,getComponent:Ce,getConfigs:et,isExecute:Ye,fn:bt,onChangeConsumes:tt,specSelectors:ht,pathMethod:Ht,specPath:ur,oas3Selectors:Gt}=this.props,tr=ht.isOAS3();const{showExtensions:yr,showCommonExtensions:jr}=et();if(le||(le=he),!he)return null;const Tr=Ce("JsonSchemaForm"),ln=Ce("ParamBody");let vn=le.get("in"),Fr=vn!=="body"?null:b.createElement(ln,{getComponent:Ce,getConfigs:et,fn:bt,param:le,consumes:ht.consumesOptionsFor(Ht),consumesValue:ht.contentTypeValues(Ht).get("requestContentType"),onChange:this.onChangeWrapper,onChangeConsumes:tt,isExecute:Ye,specSelectors:ht,pathMethod:Ht});const Lr=Ce("modelExample"),Dr=Ce("Markdown",!0),cn=Ce("ParameterExt"),Cr=Ce("ParameterIncludeEmpty"),Qn=Ce("ExamplesSelectValueRetainer"),Br=Ce("Example");let un,Sn,hn,Vn,{schema:Mn}=(0,Oo.Z)(le,{isOAS3:tr}),po=ht.parameterWithMetaByIdentity(Ht,he)||(0,X.Map)(),Bn=Mn?Mn.get("format"):null,Po=Mn?Mn.get("type"):null,So=Mn?Mn.getIn(["items","type"]):null,Lo=vn==="formData",Uo="FormData"in fe.Z,fs=le.get("required"),Bo=po?po.get("value"):"",Zo=jr?(0,ie.po)(Mn):null,ts=yr?(0,ie.nX)(le):null,zo=!1;return le!==void 0&&Mn&&(un=Mn.get("items")),un!==void 0?(Sn=un.get("enum"),hn=un.get("default")):Mn&&(Sn=Mn.get("enum")),Sn&&Sn.size&&Sn.size>0&&(zo=!0),le!==void 0&&(Mn&&(hn=Mn.get("default")),hn===void 0&&(hn=le.get("default")),Vn=le.get("example"),Vn===void 0&&(Vn=le.get("x-example"))),b.createElement("tr",{"data-param-name":le.get("name"),"data-param-in":le.get("in")},b.createElement("td",{className:"parameters-col_name"},b.createElement("div",{className:fs?"parameter__name required":"parameter__name"},le.get("name"),fs?b.createElement("span",null," *"):null),b.createElement("div",{className:"parameter__type"},Po,So&&`[${So}]`,Bn&&b.createElement("span",{className:"prop-format"},"($",Bn,")")),b.createElement("div",{className:"parameter__deprecated"},tr&&le.get("deprecated")?"deprecated":null),b.createElement("div",{className:"parameter__in"},"(",le.get("in"),")"),jr&&Zo.size?$()(K=Zo.entrySeq()).call(K,nn=>{let[gn,on]=nn;return b.createElement(cn,{key:`${gn}-${on}`,xKey:gn,xVal:on})}):null,yr&&ts.size?$()(Z=ts.entrySeq()).call(Z,nn=>{let[gn,on]=nn;return b.createElement(cn,{key:`${gn}-${on}`,xKey:gn,xVal:on})}):null),b.createElement("td",{className:"parameters-col_description"},le.get("description")?b.createElement(Dr,{source:le.get("description")}):null,!Fr&&Ye||!zo?null:b.createElement(Dr,{className:"parameter__enum",source:"<i>Available values</i> : "+$()(Sn).call(Sn,function(nn){return nn}).toArray().join(", ")}),!Fr&&Ye||hn===void 0?null:b.createElement(Dr,{className:"parameter__default",source:"<i>Default value</i> : "+hn}),!Fr&&Ye||Vn===void 0?null:b.createElement(Dr,{source:"<i>Example</i> : "+Vn}),Lo&&!Uo&&b.createElement("div",null,"Error: your browser does not support FormData"),tr&&le.get("examples")?b.createElement("section",{className:"parameter-controls"},b.createElement(Qn,{examples:le.get("examples"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:Ce,defaultToFirstExample:!0,currentKey:Gt.activeExamplesMember(...Ht,"parameters",this.getParamKey()),currentUserInputValue:Bo})):null,Fr?null:b.createElement(Tr,{fn:bt,getComponent:Ce,value:Bo,required:fs,disabled:!Ye,description:le.get("name"),onChange:this.onChangeWrapper,errors:po.get("errors"),schema:Mn}),Fr&&Mn?b.createElement(Lr,{getComponent:Ce,specPath:ur.push("schema"),getConfigs:et,isExecute:Ye,specSelectors:ht,schema:Mn,example:Fr,includeWriteOnly:!0}):null,!Fr&&Ye&&le.get("allowEmptyValue")?b.createElement(Cr,{onChange:this.onChangeIncludeEmpty,isIncluded:ht.parameterInclusionSettingFor(Ht,le.get("name"),le.get("in")),isDisabled:!(0,ie.O2)(Bo)}):null,tr&&le.get("examples")?b.createElement(Br,{example:le.getIn(["examples",Gt.activeExamplesMember(...Ht,"parameters",this.getParamKey())]),getComponent:Ce,getConfigs:et}):null))}}var us=cr(87198),Do=cr.n(us);class to extends b.Component{constructor(){super(...arguments),Me()(this,"handleValidateParameters",()=>{let{specSelectors:K,specActions:Z,path:le,method:he}=this.props;return Z.validateParams([le,he]),K.validateBeforeExecute([le,he])}),Me()(this,"handleValidateRequestBody",()=>{let{path:K,method:Z,specSelectors:le,oas3Selectors:he,oas3Actions:Ce}=this.props,et={missingBodyValue:!1,missingRequiredKeys:[]};Ce.clearRequestBodyValidateError({path:K,method:Z});let Ye=le.getOAS3RequiredRequestBodyContentType([K,Z]),bt=he.requestBodyValue(K,Z),tt=he.validateBeforeExecute([K,Z]),ht=he.requestContentType(K,Z);if(!tt)return et.missingBodyValue=!0,Ce.setRequestBodyValidateError({path:K,method:Z,validationErrors:et}),!1;if(!Ye)return!0;let Ht=he.validateShallowRequired({oas3RequiredRequestBodyContentType:Ye,oas3RequestContentType:ht,oas3RequestBodyValue:bt});return!Ht||Ht.length<1||(Or()(Ht).call(Ht,ur=>{et.missingRequiredKeys.push(ur)}),Ce.setRequestBodyValidateError({path:K,method:Z,validationErrors:et}),!1)}),Me()(this,"handleValidationResultPass",()=>{let{specActions:K,operation:Z,path:le,method:he}=this.props;this.props.onExecute&&this.props.onExecute(),K.execute({operation:Z,path:le,method:he})}),Me()(this,"handleValidationResultFail",()=>{let{specActions:K,path:Z,method:le}=this.props;K.clearValidateParams([Z,le]),Do()(()=>{K.validateParams([Z,le])},40)}),Me()(this,"handleValidationResult",K=>{K?this.handleValidationResultPass():this.handleValidationResultFail()}),Me()(this,"onClick",()=>{let K=this.handleValidateParameters(),Z=this.handleValidateRequestBody(),le=K&&Z;this.handleValidationResult(le)}),Me()(this,"onChangeProducesWrapper",K=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],K))}render(){const{disabled:K}=this.props;return b.createElement("button",{className:"btn execute opblock-control__btn",onClick:this.onClick,disabled:K},"Execute")}}class Yn extends b.Component{render(){var K;let{headers:Z,getComponent:le}=this.props;const he=le("Property"),Ce=le("Markdown",!0);return Z&&Z.size?b.createElement("div",{className:"headers-wrapper"},b.createElement("h4",{className:"headers__title"},"Headers:"),b.createElement("table",{className:"headers"},b.createElement("thead",null,b.createElement("tr",{className:"header-row"},b.createElement("th",{className:"header-col"},"Name"),b.createElement("th",{className:"header-col"},"Description"),b.createElement("th",{className:"header-col"},"Type"))),b.createElement("tbody",null,$()(K=Z.entrySeq()).call(K,et=>{let[Ye,bt]=et;if(!te().Map.isMap(bt))return null;const tt=bt.get("description"),ht=bt.getIn(["schema"])?bt.getIn(["schema","type"]):bt.getIn(["type"]),Ht=bt.getIn(["schema","example"]);return b.createElement("tr",{key:Ye},b.createElement("td",{className:"header-col"},Ye),b.createElement("td",{className:"header-col"},tt?b.createElement(Ce,{source:tt}):null),b.createElement("td",{className:"header-col"},ht," ",Ht?b.createElement(he,{propKey:"Example",propVal:Ht,propClass:"header-example"}):null))}).toArray()))):null}}class Kr extends b.Component{render(){let{editorActions:K,errSelectors:Z,layoutSelectors:le,layoutActions:he,getComponent:Ce}=this.props;const et=Ce("Collapse");if(K&&K.jumpToLine)var Ye=K.jumpToLine;let bt=Z.allErrors(),tt=s()(bt).call(bt,ur=>ur.get("type")==="thrown"||ur.get("level")==="error");if(!tt||tt.count()<1)return null;let ht=le.isShown(["errorPane"],!0),Ht=tt.sortBy(ur=>ur.get("line"));return b.createElement("pre",{className:"errors-wrapper"},b.createElement("hgroup",{className:"error"},b.createElement("h4",{className:"errors__title"},"Errors"),b.createElement("button",{className:"btn errors__clear-btn",onClick:()=>he.show(["errorPane"],!ht)},ht?"Hide":"Show")),b.createElement(et,{isOpened:ht,animated:!0},b.createElement("div",{className:"errors"},$()(Ht).call(Ht,(ur,Gt)=>{let tr=ur.get("type");return tr==="thrown"||tr==="auth"?b.createElement(lt,{key:Gt,error:ur.get("error")||ur,jumpToLine:Ye}):tr==="spec"?b.createElement(gr,{key:Gt,error:ur,jumpToLine:Ye}):void 0}))))}}const lt=Ge=>{let{error:K,jumpToLine:Z}=Ge;if(!K)return null;let le=K.get("line");return b.createElement("div",{className:"error-wrapper"},K?b.createElement("div",null,b.createElement("h4",null,K.get("source")&&K.get("level")?mr(K.get("source"))+" "+K.get("level"):"",K.get("path")?b.createElement("small",null," at ",K.get("path")):null),b.createElement("span",{className:"message thrown"},K.get("message")),b.createElement("div",{className:"error-line"},le&&Z?b.createElement("a",{onClick:w()(Z).call(Z,null,le)},"Jump to line ",le):null)):null)},gr=Ge=>{let{error:K,jumpToLine:Z}=Ge,le=null;return K.get("path")?le=X.List.isList(K.get("path"))?b.createElement("small",null,"at ",K.get("path").join(".")):b.createElement("small",null,"at ",K.get("path")):K.get("line")&&!Z&&(le=b.createElement("small",null,"on line ",K.get("line"))),b.createElement("div",{className:"error-wrapper"},K?b.createElement("div",null,b.createElement("h4",null,mr(K.get("source"))+" "+K.get("level")," ",le),b.createElement("span",{className:"message"},K.get("message")),b.createElement("div",{className:"error-line"},Z?b.createElement("a",{onClick:w()(Z).call(Z,null,K.get("line"))},"Jump to line ",K.get("line")):null)):null)};function mr(Ge){var K;return $()(K=(Ge||"").split(" ")).call(K,Z=>Z[0].toUpperCase()+P()(Z).call(Z,1)).join(" ")}lt.defaultProps={jumpToLine:null};class Rn extends b.Component{constructor(){super(...arguments),Me()(this,"onChangeWrapper",K=>this.props.onChange(K.target.value))}componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(K){var Z;K.contentTypes&&K.contentTypes.size&&(Te()(Z=K.contentTypes).call(Z,K.value)||K.onChange(K.contentTypes.first()))}render(){let{ariaControls:K,ariaLabel:Z,className:le,contentTypes:he,controlId:Ce,value:et}=this.props;return he&&he.size?b.createElement("div",{className:"content-type-wrapper "+(le||"")},b.createElement("select",{"aria-controls":K,"aria-label":Z,className:"content-type",id:Ce,onChange:this.onChangeWrapper,value:et||""},$()(he).call(he,Ye=>b.createElement("option",{key:Ye,value:Ye},Ye)).toArray())):null}}Me()(Rn,"defaultProps",{onChange:()=>{},value:null,contentTypes:(0,X.fromJS)(["application/json"])});var mo=cr(23101),oo=cr.n(mo),ps=cr(81607),Kn=cr.n(ps);function Co(){for(var Ge,K=arguments.length,Z=new Array(K),le=0;le<K;le++)Z[le]=arguments[le];return Kn()(Ge=s()(Z).call(Z,he=>!!he).join(" ")).call(Ge)}class xs extends b.Component{render(){let Ce=this.props,{fullscreen:K,full:Z}=Ce,le=$s(Ce,["fullscreen","full"]);if(K)return b.createElement("section",le);let he="swagger-container"+(Z?"-full":"");return b.createElement("section",oo()({},le,{className:Co(le.className,he)}))}}const Un={mobile:"",tablet:"-tablet",desktop:"-desktop",large:"-hd"};class wa extends b.Component{render(){const ht=this.props,{hide:K,keepContents:Z,mobile:le,tablet:he,desktop:Ce,large:et}=ht,Ye=$s(ht,["hide","keepContents","mobile","tablet","desktop","large"]);if(K&&!Z)return b.createElement("span",null);let bt=[];for(let Ht in Un){if(!Object.prototype.hasOwnProperty.call(Un,Ht))continue;let ur=Un[Ht];if(Ht in this.props){let Gt=this.props[Ht];if(Gt<1){bt.push("none"+ur);continue}bt.push("block"+ur),bt.push("col-"+Gt+ur)}}K&&bt.push("hidden");let tt=Co(Ye.className,...bt);return b.createElement("section",oo()({},Ye,{className:tt}))}}class D extends b.Component{render(){return b.createElement("div",oo()({},this.props,{className:Co(this.props.className,"wrapper")}))}}class De extends b.Component{render(){return b.createElement("button",oo()({},this.props,{className:Co(this.props.className,"button")}))}}Me()(De,"defaultProps",{className:""});const Ze=Ge=>b.createElement("textarea",Ge),vt=Ge=>b.createElement("input",Ge);class st extends b.Component{constructor(K,Z){let le;super(K,Z),Me()(this,"onChange",he=>{let Ce,{onChange:et,multiple:Ye}=this.props,bt=P()([]).call(he.target.options);var tt;Ye?Ce=$()(tt=s()(bt).call(bt,function(ht){return ht.selected})).call(tt,function(ht){return ht.value}):Ce=he.target.value,this.setState({value:Ce}),et&&et(Ce)}),le=K.value?K.value:K.multiple?[""]:"",this.state={value:le}}UNSAFE_componentWillReceiveProps(K){K.value!==this.props.value&&this.setState({value:K.value})}render(){var K,Z;let{allowedValues:le,multiple:he,allowEmptyValue:Ce,disabled:et}=this.props,Ye=((K=this.state.value)===null||K===void 0||(Z=K.toJS)===null||Z===void 0?void 0:Z.call(K))||this.state.value;return b.createElement("select",{className:this.props.className,multiple:he,value:Ye,onChange:this.onChange,disabled:et},Ce?b.createElement("option",{value:""},"--"):null,$()(le).call(le,function(bt,tt){return b.createElement("option",{key:tt,value:String(bt)},String(bt))}))}}Me()(st,"defaultProps",{multiple:!1,allowEmptyValue:!0});class er extends b.Component{render(){return b.createElement("a",oo()({},this.props,{rel:"noopener noreferrer",className:Co(this.props.className,"link")}))}}const sr=Ge=>{let{children:K}=Ge;return b.createElement("div",{className:"no-margin"}," ",K," ")};class or extends b.Component{renderNotAnimated(){return this.props.isOpened?b.createElement(sr,null,this.props.children):b.createElement("noscript",null)}render(){let{animated:K,isOpened:Z,children:le}=this.props;return K?(le=Z?le:null,b.createElement(sr,null,le)):this.renderNotAnimated()}}Me()(or,"defaultProps",{isOpened:!1,animated:!1});class _r extends b.Component{constructor(){var K;super(...arguments),this.setTagShown=w()(K=this._setTagShown).call(K,this)}_setTagShown(K,Z){this.props.layoutActions.show(K,Z)}showOp(K,Z){let{layoutActions:le}=this.props;le.show(K,Z)}render(){let{specSelectors:K,layoutSelectors:Z,layoutActions:le,getComponent:he}=this.props,Ce=K.taggedOperations();const et=he("Collapse");return b.createElement("div",null,b.createElement("h4",{className:"overview-title"},"Overview"),$()(Ce).call(Ce,(Ye,bt)=>{let tt=Ye.get("operations"),ht=["overview-tags",bt],Ht=Z.isShown(ht,!0);return b.createElement("div",{key:"overview-"+bt},b.createElement("h4",{onClick:()=>le.show(ht,!Ht),className:"link overview-tag"}," ",Ht?"-":"+",bt),b.createElement(et,{isOpened:Ht,animated:!0},$()(tt).call(tt,ur=>{let{path:Gt,method:tr,id:yr}=ur.toObject(),jr="operations",Tr=yr,ln=Z.isShown([jr,Tr]);return b.createElement(Nr,{key:yr,path:Gt,method:tr,id:Gt+"-"+tr,shown:ln,showOpId:Tr,showOpIdPrefix:jr,href:`#operation-${Tr}`,onClick:le.show})}).toArray()))}).toArray(),Ce.size<1&&b.createElement("h3",null," No operations defined in spec! "))}}class Nr extends b.Component{constructor(K){var Z;super(K),this.onClick=w()(Z=this._onClick).call(Z,this)}_onClick(){let{showOpId:K,showOpIdPrefix:Z,onClick:le,shown:he}=this.props;le([Z,K],!he)}render(){let{id:K,method:Z,shown:le,href:he}=this.props;return b.createElement(er,{href:he,onClick:this.onClick,className:"block opblock-link "+(le?"shown":"")},b.createElement("div",null,b.createElement("small",{className:`bold-label-${Z}`},Z.toUpperCase()),b.createElement("span",{className:"bold-label"},K)))}}class $r extends b.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const Ce=this.props,{value:K,defaultValue:Z,initialValue:le}=Ce,he=$s(Ce,["value","defaultValue","initialValue"]);return b.createElement("input",oo()({},he,{ref:et=>this.inputRef=et}))}}class mn extends b.Component{render(){const{host:K,basePath:Z}=this.props;return b.createElement("pre",{className:"base-url"},"[ Base URL: ",K,Z," ]")}}class Xn extends b.PureComponent{render(){const{url:K,getComponent:Z}=this.props,le=Z("Link");return b.createElement(le,{target:"_blank",href:(0,ie.Nm)(K)},b.createElement("span",{className:"url"}," ",K))}}class Ir extends b.Component{render(){const{info:K,url:Z,host:le,basePath:he,getComponent:Ce,externalDocs:et,selectedServer:Ye,url:bt}=this.props,tt=K.get("version"),ht=K.get("description"),Ht=K.get("title"),ur=(0,Ee.mn)(K.get("termsOfService"),bt,{selectedServer:Ye}),Gt=K.get("contact"),tr=K.get("license"),yr=et&&et.get("url"),jr=(0,Ee.mn)(yr,bt,{selectedServer:Ye}),Tr=et&&et.get("description"),ln=Ce("Markdown",!0),vn=Ce("Link"),Fr=Ce("VersionStamp"),Lr=Ce("InfoUrl"),Dr=Ce("InfoBasePath"),cn=Ce("License"),Cr=Ce("Contact");return b.createElement("div",{className:"info"},b.createElement("hgroup",{className:"main"},b.createElement("h2",{className:"title"},Ht,tt&&b.createElement(Fr,{version:tt})),le||he?b.createElement(Dr,{host:le,basePath:he}):null,Z&&b.createElement(Lr,{getComponent:Ce,url:Z})),b.createElement("div",{className:"description"},b.createElement(ln,{source:ht})),ur&&b.createElement("div",{className:"info__tos"},b.createElement(vn,{target:"_blank",href:(0,ie.Nm)(ur)},"Terms of service")),(Gt==null?void 0:Gt.size)>0&&b.createElement(Cr,{getComponent:Ce,data:Gt,selectedServer:Ye,url:Z}),(tr==null?void 0:tr.size)>0&&b.createElement(cn,{getComponent:Ce,license:tr,selectedServer:Ye,url:Z}),jr?b.createElement(vn,{className:"info__extdocs",target:"_blank",href:(0,ie.Nm)(jr)},Tr||jr):null)}}const lo=Ir;class zn extends b.Component{render(){const{specSelectors:K,getComponent:Z,oas3Selectors:le}=this.props,he=K.info(),Ce=K.url(),et=K.basePath(),Ye=K.host(),bt=K.externalDocs(),tt=le.selectedServer(),ht=Z("info");return b.createElement("div",null,he&&he.count()?b.createElement(ht,{info:he,url:Ce,host:Ye,basePath:et,externalDocs:bt,getComponent:Z,selectedServer:tt}):null)}}class an extends b.Component{render(){const{data:K,getComponent:Z,selectedServer:le,url:he}=this.props,Ce=K.get("name","the developer"),et=(0,Ee.mn)(K.get("url"),he,{selectedServer:le}),Ye=K.get("email"),bt=Z("Link");return b.createElement("div",{className:"info__contact"},et&&b.createElement("div",null,b.createElement(bt,{href:(0,ie.Nm)(et),target:"_blank"},Ce," - Website")),Ye&&b.createElement(bt,{href:(0,ie.Nm)(`mailto:${Ye}`)},et?`Send email to ${Ce}`:`Contact ${Ce}`))}}const Ve=an;class Nn extends b.Component{render(){const{license:K,getComponent:Z,selectedServer:le,url:he}=this.props,Ce=K.get("name","License"),et=(0,Ee.mn)(K.get("url"),he,{selectedServer:le}),Ye=Z("Link");return b.createElement("div",{className:"info__license"},et?b.createElement("div",{className:"info__license__url"},b.createElement(Ye,{target:"_blank",href:(0,ie.Nm)(et)},Ce)):b.createElement("span",null,Ce))}}const On=Nn;class Hr extends b.Component{render(){return null}}class Fn extends b.Component{render(){let{getComponent:K}=this.props;const Z=K("CopyIcon");return b.createElement("div",{className:"view-line-link copy-to-clipboard",title:"Copy to clipboard"},b.createElement($o.CopyToClipboard,{text:this.props.textToCopy},b.createElement(Z,null)))}}class Gr extends b.Component{render(){return b.createElement("div",{className:"footer"})}}class ao extends b.Component{constructor(){super(...arguments),Me()(this,"onFilterChange",K=>{const{target:{value:Z}}=K;this.props.layoutActions.updateFilter(Z)})}render(){const{specSelectors:K,layoutSelectors:Z,getComponent:le}=this.props,he=le("Col"),Ce=K.loadingStatus()==="loading",et=K.loadingStatus()==="failed",Ye=Z.currentFilter(),bt=["operation-filter-input"];return et&&bt.push("failed"),Ce&&bt.push("loading"),b.createElement("div",null,Ye===null||Ye===!1||Ye==="false"?null:b.createElement("div",{className:"filter-container"},b.createElement(he,{className:"filter wrapper",mobile:12},b.createElement("input",{className:bt.join(" "),placeholder:"Filter by tag",type:"text",onChange:this.onFilterChange,value:Ye===!0||Ye==="true"?"":Ye,disabled:Ce}))))}}const wn=Function.prototype;class En extends b.PureComponent{constructor(K,Z){super(K,Z),Me()(this,"updateValues",le=>{let{param:he,isExecute:Ce,consumesValue:et=""}=le,Ye=/xml/i.test(et),bt=/json/i.test(et),tt=Ye?he.get("value_xml"):he.get("value");if(tt!==void 0){let ht=!tt&&bt?"{}":tt;this.setState({value:ht}),this.onChange(ht,{isXml:Ye,isEditBox:Ce})}else Ye?this.onChange(this.sample("xml"),{isXml:Ye,isEditBox:Ce}):this.onChange(this.sample(),{isEditBox:Ce})}),Me()(this,"sample",le=>{let{param:he,fn:Ce}=this.props,et=Ce.inferSchema(he.toJS());return Ce.getSampleSchema(et,le,{includeWriteOnly:!0})}),Me()(this,"onChange",(le,he)=>{let{isEditBox:Ce,isXml:et}=he;this.setState({value:le,isEditBox:Ce}),this._onChange(le,et)}),Me()(this,"_onChange",(le,he)=>{(this.props.onChange||wn)(le,he)}),Me()(this,"handleOnChange",le=>{const{consumesValue:he}=this.props,Ce=/xml/i.test(he),et=le.target.value;this.onChange(et,{isXml:Ce,isEditBox:this.state.isEditBox})}),Me()(this,"toggleIsEditBox",()=>this.setState(le=>({isEditBox:!le.isEditBox}))),this.state={isEditBox:!1,value:""}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(K){this.updateValues.call(this,K)}render(){let{onChangeConsumes:K,param:Z,isExecute:le,specSelectors:he,pathMethod:Ce,getConfigs:et,getComponent:Ye}=this.props;const bt=Ye("Button"),tt=Ye("TextArea"),ht=Ye("highlightCode"),Ht=Ye("contentType");let ur=(he?he.parameterWithMetaByIdentity(Ce,Z):Z).get("errors",(0,X.List)()),Gt=he.contentTypeValues(Ce).get("requestContentType"),tr=this.props.consumes&&this.props.consumes.size?this.props.consumes:En.defaultProp.consumes,{value:yr,isEditBox:jr}=this.state,Tr=null;return(0,qn.O)(yr)&&(Tr="json"),b.createElement("div",{className:"body-param","data-param-name":Z.get("name"),"data-param-in":Z.get("in")},jr&&le?b.createElement(tt,{className:"body-param__text"+(ur.count()?" invalid":""),value:yr,onChange:this.handleOnChange}):yr&&b.createElement(ht,{className:"body-param__example",language:Tr,getConfigs:et,value:yr}),b.createElement("div",{className:"body-param-options"},le?b.createElement("div",{className:"body-param-edit"},b.createElement(bt,{className:jr?"btn cancel body-param__example-edit":"btn edit body-param__example-edit",onClick:this.toggleIsEditBox},jr?"Cancel":"Edit")):null,b.createElement("label",{htmlFor:""},b.createElement("span",null,"Parameter content type"),b.createElement(Ht,{value:Gt,contentTypes:tr,onChange:K,className:"body-param-content-type",ariaLabel:"Parameter content type"}))))}}Me()(En,"defaultProp",{consumes:(0,X.fromJS)(["application/json"]),param:(0,X.fromJS)({}),onChange:wn,onChangeConsumes:wn});var co=cr(92135);class kn extends b.Component{render(){let{request:K,getConfigs:Z}=this.props,le=(0,co.requestSnippetGenerator_curl_bash)(K);const he=Z(),Ce=no()(he,"syntaxHighlight.activated")?b.createElement(Ft.d3,{language:"bash",className:"curl microlight",style:(0,Ft.C2)(no()(he,"syntaxHighlight.theme"))},le):b.createElement("textarea",{readOnly:!0,className:"curl",value:le});return b.createElement("div",{className:"curl-command"},b.createElement("h4",null,"Curl"),b.createElement("div",{className:"copy-to-clipboard"},b.createElement($o.CopyToClipboard,{text:le},b.createElement("button",null))),b.createElement("div",null,Ce))}}class xo extends b.Component{constructor(){super(...arguments),Me()(this,"onChange",K=>{this.setScheme(K.target.value)}),Me()(this,"setScheme",K=>{let{path:Z,method:le,specActions:he}=this.props;he.setScheme(K,Z,le)})}UNSAFE_componentWillMount(){let{schemes:K}=this.props;this.setScheme(K.first())}UNSAFE_componentWillReceiveProps(K){var Z;this.props.currentScheme&&Te()(Z=K.schemes).call(Z,this.props.currentScheme)||this.setScheme(K.schemes.first())}render(){var K;let{schemes:Z,currentScheme:le}=this.props;return b.createElement("label",{htmlFor:"schemes"},b.createElement("span",{className:"schemes-title"},"Schemes"),b.createElement("select",{onChange:this.onChange,value:le},$()(K=Z.valueSeq()).call(K,he=>b.createElement("option",{value:he,key:he},he)).toArray()))}}class Ko extends b.Component{render(){const{specActions:K,specSelectors:Z,getComponent:le}=this.props,he=Z.operationScheme(),Ce=Z.schemes(),et=le("schemes");return Ce&&Ce.size?b.createElement(et,{currentScheme:he,schemes:Ce,specActions:K}):null}}class xn extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"toggleCollapsed",()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})}),Me()(this,"onLoad",Ce=>{if(Ce&&this.props.layoutSelectors){const et=this.props.layoutSelectors.getScrollToKey();te().is(et,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,Ce.parentElement)}});let{expanded:le,collapsedContent:he}=this.props;this.state={expanded:le,collapsedContent:he||xn.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:K,expanded:Z,modelName:le}=this.props;K&&Z&&this.props.onToggle(le,Z)}UNSAFE_componentWillReceiveProps(K){this.props.expanded!==K.expanded&&this.setState({expanded:K.expanded})}render(){const{title:K,classes:Z}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?b.createElement("span",{className:Z||""},this.props.children):b.createElement("span",{className:Z||"",ref:this.onLoad},b.createElement("button",{"aria-expanded":this.state.expanded,className:"model-box-control",onClick:this.toggleCollapsed},K&&b.createElement("span",{className:"pointer"},K),b.createElement("span",{className:"model-toggle"+(this.state.expanded?"":" collapsed")}),!this.state.expanded&&b.createElement("span",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}Me()(xn,"defaultProps",{collapsedContent:"{...}",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:te().List([])});var Ho=cr(92282),Go=cr.n(Ho);class Ss extends b.Component{constructor(K,Z){super(K,Z),Me()(this,"activeTab",Ye=>{let{target:{dataset:{name:bt}}}=Ye;this.setState({activeTab:bt})});let{getConfigs:le,isExecute:he}=this.props,{defaultModelRendering:Ce}=le(),et=Ce;Ce!=="example"&&Ce!=="model"&&(et="example"),he&&(et="example"),this.state={activeTab:et}}UNSAFE_componentWillReceiveProps(K){K.isExecute&&!this.props.isExecute&&this.props.example&&this.setState({activeTab:"example"})}render(){let{getComponent:K,specSelectors:Z,schema:le,example:he,isExecute:Ce,getConfigs:et,specPath:Ye,includeReadOnly:bt,includeWriteOnly:tt}=this.props,{defaultModelExpandDepth:ht}=et();const Ht=K("ModelWrapper"),ur=K("highlightCode"),Gt=Go()(5).toString("base64"),tr=Go()(5).toString("base64"),yr=Go()(5).toString("base64"),jr=Go()(5).toString("base64");let Tr=Z.isOAS3();return b.createElement("div",{className:"model-example"},b.createElement("ul",{className:"tab",role:"tablist"},b.createElement("li",{className:Jr()("tabitem",{active:this.state.activeTab==="example"}),role:"presentation"},b.createElement("button",{"aria-controls":tr,"aria-selected":this.state.activeTab==="example",className:"tablinks","data-name":"example",id:Gt,onClick:this.activeTab,role:"tab"},Ce?"Edit Value":"Example Value")),le&&b.createElement("li",{className:Jr()("tabitem",{active:this.state.activeTab==="model"}),role:"presentation"},b.createElement("button",{"aria-controls":jr,"aria-selected":this.state.activeTab==="model",className:Jr()("tablinks",{inactive:Ce}),"data-name":"model",id:yr,onClick:this.activeTab,role:"tab"},Tr?"Schema":"Model"))),this.state.activeTab==="example"&&b.createElement("div",{"aria-hidden":this.state.activeTab!=="example","aria-labelledby":Gt,"data-name":"examplePanel",id:tr,role:"tabpanel",tabIndex:"0"},he||b.createElement(ur,{value:"(no example available)",getConfigs:et})),this.state.activeTab==="model"&&b.createElement("div",{"aria-hidden":this.state.activeTab==="example","aria-labelledby":yr,"data-name":"modelPanel",id:jr,role:"tabpanel",tabIndex:"0"},b.createElement(Ht,{schema:le,getComponent:K,getConfigs:et,specSelectors:Z,expandDepth:ht,specPath:Ye,includeReadOnly:bt,includeWriteOnly:tt})))}}class uo extends b.Component{constructor(){super(...arguments),Me()(this,"onToggle",(K,Z)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,Z)})}render(){let{getComponent:K,getConfigs:Z}=this.props;const le=K("Model");let he;return this.props.layoutSelectors&&(he=this.props.layoutSelectors.isShown(this.props.fullPath)),b.createElement("div",{className:"model-box"},b.createElement(le,oo()({},this.props,{getConfigs:Z,expanded:he,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}var Cs=cr(53795);class ns extends b.Component{constructor(){super(...arguments),Me()(this,"getSchemaBasePath",()=>this.props.specSelectors.isOAS3()?["components","schemas"]:["definitions"]),Me()(this,"getCollapsedContent",()=>" "),Me()(this,"handleToggle",(K,Z)=>{const{layoutActions:le}=this.props;le.show([...this.getSchemaBasePath(),K],Z),Z&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),K])}),Me()(this,"onLoadModels",K=>{K&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),K)}),Me()(this,"onLoadModel",K=>{if(K){const Z=K.getAttribute("data-name");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),Z],K)}})}render(){var K;let{specSelectors:Z,getComponent:le,layoutSelectors:he,layoutActions:Ce,getConfigs:et}=this.props,Ye=Z.definitions(),{docExpansion:bt,defaultModelsExpandDepth:tt}=et();if(!Ye.size||tt<0)return null;const ht=this.getSchemaBasePath();let Ht=he.isShown(ht,tt>0&&bt!=="none");const ur=Z.isOAS3(),Gt=le("ModelWrapper"),tr=le("Collapse"),yr=le("ModelCollapse"),jr=le("JumpToPath",!0),Tr=le("ArrowUpIcon"),ln=le("ArrowDownIcon");return b.createElement("section",{className:Ht?"models is-open":"models",ref:this.onLoadModels},b.createElement("h4",null,b.createElement("button",{"aria-expanded":Ht,className:"models-control",onClick:()=>Ce.show(ht,!Ht)},b.createElement("span",null,ur?"Schemas":"Models"),Ht?b.createElement(Tr,null):b.createElement(ln,null))),b.createElement(tr,{isOpened:Ht},$()(K=Ye.entrySeq()).call(K,vn=>{let[Fr]=vn;const Lr=[...ht,Fr],Dr=te().List(Lr),cn=Z.specResolvedSubtree(Lr),Cr=Z.specJson().getIn(Lr),Qn=X.Map.isMap(cn)?cn:te().Map(),Br=X.Map.isMap(Cr)?Cr:te().Map(),un=Qn.get("title")||Br.get("title")||Fr,Sn=he.isShown(Lr,!1);Sn&&Qn.size===0&&Br.size>0&&this.props.specActions.requestResolvedSubtree(Lr);const hn=b.createElement(Gt,{name:Fr,expandDepth:tt,schema:Qn||te().Map(),displayName:un,fullPath:Lr,specPath:Dr,getComponent:le,specSelectors:Z,getConfigs:et,layoutSelectors:he,layoutActions:Ce,includeReadOnly:!0,includeWriteOnly:!0}),Vn=b.createElement("span",{className:"model-box"},b.createElement("span",{className:"model model-title"},un));return b.createElement("div",{id:`model-${Fr}`,className:"model-container",key:`models-section-${Fr}`,"data-name":Fr,ref:this.onLoadModel},b.createElement("span",{className:"models-jump-to-path"},b.createElement(jr,{specPath:Dr})),b.createElement(yr,{classes:"model-box",collapsedContent:this.getCollapsedContent(Fr),onToggle:this.handleToggle,title:Vn,displayName:un,modelName:Fr,specPath:Dr,layoutSelectors:he,layoutActions:Ce,hideSelfOnExpand:!0,expanded:tt>0&&Sn},hn))}).toArray()))}}const Ea=Ge=>{let{value:K,getComponent:Z}=Ge,le=Z("ModelCollapse"),he=b.createElement("span",null,"Array [ ",K.count()," ]");return b.createElement("span",{className:"prop-enum"},"Enum:",b.createElement("br",null),b.createElement(le,{collapsedContent:he},"[ ",K.join(", ")," ]"))};class Ms extends b.Component{render(){var K,Z,le,he;let nn=this.props,{schema:Ce,name:et,displayName:Ye,isRef:bt,getComponent:tt,getConfigs:ht,depth:Ht,onToggle:ur,expanded:Gt,specPath:tr}=nn,yr=$s(nn,["schema","name","displayName","isRef","getComponent","getConfigs","depth","onToggle","expanded","specPath"]),{specSelectors:jr,expandDepth:Tr,includeReadOnly:ln,includeWriteOnly:vn}=yr;const{isOAS3:Fr}=jr;if(!Ce)return null;const{showExtensions:Lr}=ht();let Dr=Ce.get("description"),cn=Ce.get("properties"),Cr=Ce.get("additionalProperties"),Qn=Ce.get("title")||Ye||et,Br=Ce.get("required"),un=s()(Ce).call(Ce,(gn,on)=>{var ho;return xt()(ho=["maxProperties","minProperties","nullable","example"]).call(ho,on)!==-1}),Sn=Ce.get("deprecated"),hn=Ce.getIn(["externalDocs","url"]),Vn=Ce.getIn(["externalDocs","description"]);const Mn=tt("JumpToPath",!0),po=tt("Markdown",!0),Bn=tt("Model"),Po=tt("ModelCollapse"),So=tt("Property"),Lo=tt("Link"),Uo=()=>b.createElement("span",{className:"model-jump-to-path"},b.createElement(Mn,{specPath:tr})),fs=b.createElement("span",null,b.createElement("span",null,"{"),"...",b.createElement("span",null,"}"),bt?b.createElement(Uo,null):""),Bo=jr.isOAS3()?Ce.get("anyOf"):null,Zo=jr.isOAS3()?Ce.get("oneOf"):null,ts=jr.isOAS3()?Ce.get("not"):null,zo=Qn&&b.createElement("span",{className:"model-title"},bt&&Ce.get("$$ref")&&b.createElement("span",{className:"model-hint"},Ce.get("$$ref")),b.createElement("span",{className:"model-title__text"},Qn));return b.createElement("span",{className:"model"},b.createElement(Po,{modelName:et,title:zo,onToggle:ur,expanded:!!Gt||Ht<=Tr,collapsedContent:fs},b.createElement("span",{className:"brace-open object"},"{"),bt?b.createElement(Uo,null):null,b.createElement("span",{className:"inner-object"},b.createElement("table",{className:"model"},b.createElement("tbody",null,Dr?b.createElement("tr",{className:"description"},b.createElement("td",null,"description:"),b.createElement("td",null,b.createElement(po,{source:Dr}))):null,hn&&b.createElement("tr",{className:"external-docs"},b.createElement("td",null,"externalDocs:"),b.createElement("td",null,b.createElement(Lo,{target:"_blank",href:(0,ie.Nm)(hn)},Vn||hn))),Sn?b.createElement("tr",{className:"property"},b.createElement("td",null,"deprecated:"),b.createElement("td",null,"true")):null,cn&&cn.size?$()(K=s()(Z=cn.entrySeq()).call(Z,gn=>{let[,on]=gn;return(!on.get("readOnly")||ln)&&(!on.get("writeOnly")||vn)})).call(K,gn=>{let[on,ho]=gn,is=Fr()&&ho.get("deprecated"),Js=X.List.isList(Br)&&Br.contains(on),ua=["property-row"];return is&&ua.push("deprecated"),Js&&ua.push("required"),b.createElement("tr",{key:on,className:ua.join(" ")},b.createElement("td",null,on,Js&&b.createElement("span",{className:"star"},"*")),b.createElement("td",null,b.createElement(Bn,oo()({key:`object-${et}-${on}_${ho}`},yr,{required:Js,getComponent:tt,specPath:tr.push("properties",on),getConfigs:ht,schema:ho,depth:Ht+1}))))}).toArray():null,Lr?b.createElement("tr",null,b.createElement("td",null," ")):null,Lr?$()(le=Ce.entrySeq()).call(le,gn=>{let[on,ho]=gn;if(P()(on).call(on,0,2)!=="x-")return;const is=ho?ho.toJS?ho.toJS():ho:null;return b.createElement("tr",{key:on,className:"extension"},b.createElement("td",null,on),b.createElement("td",null,h()(is)))}).toArray():null,Cr&&Cr.size?b.createElement("tr",null,b.createElement("td",null,"< * >:"),b.createElement("td",null,b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("additionalProperties"),getConfigs:ht,schema:Cr,depth:Ht+1})))):null,Bo?b.createElement("tr",null,b.createElement("td",null,"anyOf ->"),b.createElement("td",null,$()(Bo).call(Bo,(gn,on)=>b.createElement("div",{key:on},b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("anyOf",on),getConfigs:ht,schema:gn,depth:Ht+1})))))):null,Zo?b.createElement("tr",null,b.createElement("td",null,"oneOf ->"),b.createElement("td",null,$()(Zo).call(Zo,(gn,on)=>b.createElement("div",{key:on},b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("oneOf",on),getConfigs:ht,schema:gn,depth:Ht+1})))))):null,ts?b.createElement("tr",null,b.createElement("td",null,"not ->"),b.createElement("td",null,b.createElement("div",null,b.createElement(Bn,oo()({},yr,{required:!1,getComponent:tt,specPath:tr.push("not"),getConfigs:ht,schema:ts,depth:Ht+1}))))):null))),b.createElement("span",{className:"brace-close"},"}")),un.size?$()(he=un.entrySeq()).call(he,gn=>{let[on,ho]=gn;return b.createElement(So,{key:`${on}-${ho}`,propKey:on,propVal:ho,propClass:"property"})}):null)}}class ri extends b.Component{render(){var K;let{getComponent:Z,getConfigs:le,schema:he,depth:Ce,expandDepth:et,name:Ye,displayName:bt,specPath:tt}=this.props,ht=he.get("description"),Ht=he.get("items"),ur=he.get("title")||bt||Ye,Gt=s()(he).call(he,(Dr,cn)=>{var Cr;return xt()(Cr=["type","items","description","$$ref","externalDocs"]).call(Cr,cn)===-1}),tr=he.getIn(["externalDocs","url"]),yr=he.getIn(["externalDocs","description"]);const jr=Z("Markdown",!0),Tr=Z("ModelCollapse"),ln=Z("Model"),vn=Z("Property"),Fr=Z("Link"),Lr=ur&&b.createElement("span",{className:"model-title"},b.createElement("span",{className:"model-title__text"},ur));return b.createElement("span",{className:"model"},b.createElement(Tr,{title:Lr,expanded:Ce<=et,collapsedContent:"[...]"},"[",Gt.size?$()(K=Gt.entrySeq()).call(K,Dr=>{let[cn,Cr]=Dr;return b.createElement(vn,{key:`${cn}-${Cr}`,propKey:cn,propVal:Cr,propClass:"property"})}):null,ht?b.createElement(jr,{source:ht}):Gt.size?b.createElement("div",{className:"markdown"}):null,tr&&b.createElement("div",{className:"external-docs"},b.createElement(Fr,{target:"_blank",href:(0,ie.Nm)(tr)},yr||tr)),b.createElement("span",null,b.createElement(ln,oo()({},this.props,{getConfigs:le,specPath:tt.push("items"),name:null,schema:Ht,required:!1,depth:Ce+1}))),"]"))}}const Ta="property primitive";class zs extends b.Component{render(){var K,Z,le;let{schema:he,getComponent:Ce,getConfigs:et,name:Ye,displayName:bt,depth:tt,expandDepth:ht}=this.props;const{showExtensions:Ht}=et();if(!he||!he.get)return b.createElement("div",null);let ur=he.get("type"),Gt=he.get("format"),tr=he.get("xml"),yr=he.get("enum"),jr=he.get("title")||bt||Ye,Tr=he.get("description"),ln=(0,ie.nX)(he),vn=s()(he).call(he,(Sn,hn)=>{var Vn;return xt()(Vn=["enum","type","format","description","$$ref","externalDocs"]).call(Vn,hn)===-1}).filterNot((Sn,hn)=>ln.has(hn)),Fr=he.getIn(["externalDocs","url"]),Lr=he.getIn(["externalDocs","description"]);const Dr=Ce("Markdown",!0),cn=Ce("EnumModel"),Cr=Ce("Property"),Qn=Ce("ModelCollapse"),Br=Ce("Link"),un=jr&&b.createElement("span",{className:"model-title"},b.createElement("span",{className:"model-title__text"},jr));return b.createElement("span",{className:"model"},b.createElement(Qn,{title:un,expanded:tt<=ht,collapsedContent:"[...]",hideSelfOnExpand:ht!==tt},b.createElement("span",{className:"prop"},Ye&&tt>1&&b.createElement("span",{className:"prop-name"},jr),b.createElement("span",{className:"prop-type"},ur),Gt&&b.createElement("span",{className:"prop-format"},"($",Gt,")"),vn.size?$()(K=vn.entrySeq()).call(K,Sn=>{let[hn,Vn]=Sn;return b.createElement(Cr,{key:`${hn}-${Vn}`,propKey:hn,propVal:Vn,propClass:Ta})}):null,Ht&&ln.size?$()(Z=ln.entrySeq()).call(Z,Sn=>{let[hn,Vn]=Sn;return b.createElement(Cr,{key:`${hn}-${Vn}`,propKey:hn,propVal:Vn,propClass:Ta})}):null,Tr?b.createElement(Dr,{source:Tr}):null,Fr&&b.createElement("div",{className:"external-docs"},b.createElement(Br,{target:"_blank",href:(0,ie.Nm)(Fr)},Lr||Fr)),tr&&tr.size?b.createElement("span",null,b.createElement("br",null),b.createElement("span",{className:Ta},"xml:"),$()(le=tr.entrySeq()).call(le,Sn=>{let[hn,Vn]=Sn;return b.createElement("span",{key:`${hn}-${Vn}`,className:Ta},b.createElement("br",null),"   ",hn,": ",String(Vn))}).toArray()):null,yr&&b.createElement(cn,{value:yr,getComponent:Ce}))))}}const Oi=Ge=>{let{propKey:K,propVal:Z,propClass:le}=Ge;return b.createElement("span",{className:le},b.createElement("br",null),K,": ",String(Z))};class za extends b.Component{render(){const{onTryoutClick:K,onCancelClick:Z,onResetClick:le,enabled:he,hasUserEditedBody:Ce,isOAS3:et}=this.props,Ye=et&&Ce;return b.createElement("div",{className:Ye?"try-out btn-group":"try-out"},he?b.createElement("button",{className:"btn try-out__btn cancel",onClick:Z},"Cancel"):b.createElement("button",{className:"btn try-out__btn",onClick:K},"Try it out "),Ye&&b.createElement("button",{className:"btn try-out__btn reset",onClick:le},"Reset"))}}Me()(za,"defaultProps",{onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1});class yo extends b.PureComponent{render(){const{bypass:K,isSwagger2:Z,isOAS3:le,alsoShow:he}=this.props;return K?b.createElement("div",null,this.props.children):Z&&le?b.createElement("div",{className:"version-pragma"},he,b.createElement("div",{className:"version-pragma__message version-pragma__message--ambiguous"},b.createElement("div",null,b.createElement("h3",null,"Unable to render this definition"),b.createElement("p",null,b.createElement("code",null,"swagger")," and ",b.createElement("code",null,"openapi")," fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields."),b.createElement("p",null,"Supported version fields are ",b.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",b.createElement("code",null,"openapi: 3.0.n")," (for example, ",b.createElement("code",null,"openapi: 3.0.0"),").")))):Z||le?b.createElement("div",null,this.props.children):b.createElement("div",{className:"version-pragma"},he,b.createElement("div",{className:"version-pragma__message version-pragma__message--missing"},b.createElement("div",null,b.createElement("h3",null,"Unable to render this definition"),b.createElement("p",null,"The provided definition does not specify a valid version field."),b.createElement("p",null,"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are ",b.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",b.createElement("code",null,"openapi: 3.0.n")," (for example, ",b.createElement("code",null,"openapi: 3.0.0"),")."))))}}Me()(yo,"defaultProps",{alsoShow:null,children:null,bypass:!1});const Ji=Ge=>{let{version:K}=Ge;return b.createElement("small",null,b.createElement("pre",{className:"version"}," ",K," "))},ni=Ge=>{let{enabled:K,path:Z,text:le}=Ge;return b.createElement("a",{className:"nostyle",onClick:K?he=>he.preventDefault():null,href:K?`#/${Z}`:null},b.createElement("span",null,le))},Vs=()=>b.createElement("div",null,b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"svg-assets"},b.createElement("defs",null,b.createElement("symbol",{viewBox:"0 0 20 20",id:"unlocked"},b.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"locked"},b.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"close"},b.createElement("path",{d:"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow"},b.createElement("path",{d:"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow-down"},b.createElement("path",{d:"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"})),b.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow-up"},b.createElement("path",{d:"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z"})),b.createElement("symbol",{viewBox:"0 0 24 24",id:"jump-to"},b.createElement("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"})),b.createElement("symbol",{viewBox:"0 0 24 24",id:"expand"},b.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),b.createElement("symbol",{viewBox:"0 0 15 16",id:"copy"},b.createElement("g",{transform:"translate(2, -1)"},b.createElement("path",{fill:"#ffffff",fillRule:"evenodd",d:"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"}))))));var Ws=cr(4599);class rn extends b.Component{render(){const{errSelectors:K,specSelectors:Z,getComponent:le}=this.props,he=le("SvgAssets"),Ce=le("InfoContainer",!0),et=le("VersionPragmaFilter"),Ye=le("operations",!0),bt=le("Models",!0),tt=le("Webhooks",!0),ht=le("Row"),Ht=le("Col"),ur=le("errors",!0),Gt=le("ServersContainer",!0),tr=le("SchemesContainer",!0),yr=le("AuthorizeBtnContainer",!0),jr=le("FilterContainer",!0),Tr=Z.isSwagger2(),ln=Z.isOAS3(),vn=Z.isOAS31(),Fr=!Z.specStr(),Lr=Z.loadingStatus();let Dr=null;if(Lr==="loading"&&(Dr=b.createElement("div",{className:"info"},b.createElement("div",{className:"loading-container"},b.createElement("div",{className:"loading"})))),Lr==="failed"&&(Dr=b.createElement("div",{className:"info"},b.createElement("div",{className:"loading-container"},b.createElement("h4",{className:"title"},"Failed to load API definition."),b.createElement(ur,null)))),Lr==="failedConfig"){const Sn=K.lastError(),hn=Sn?Sn.get("message"):"";Dr=b.createElement("div",{className:"info failed-config"},b.createElement("div",{className:"loading-container"},b.createElement("h4",{className:"title"},"Failed to load remote configuration."),b.createElement("p",null,hn)))}if(!Dr&&Fr&&(Dr=b.createElement("h4",null,"No API definition provided.")),Dr)return b.createElement("div",{className:"swagger-ui"},b.createElement("div",{className:"loading-container"},Dr));const cn=Z.servers(),Cr=Z.schemes(),Qn=cn&&cn.size,Br=Cr&&Cr.size,un=!!Z.securityDefinitions();return b.createElement("div",{className:"swagger-ui"},b.createElement(he,null),b.createElement(et,{isSwagger2:Tr,isOAS3:ln,alsoShow:b.createElement(ur,null)},b.createElement(ur,null),b.createElement(ht,{className:"information-container"},b.createElement(Ht,{mobile:12},b.createElement(Ce,null))),Qn||Br||un?b.createElement("div",{className:"scheme-container"},b.createElement(Ht,{className:"schemes wrapper",mobile:12},Qn?b.createElement(Gt,null):null,Br?b.createElement(tr,null):null,un?b.createElement(yr,null):null)):null,b.createElement(jr,null),b.createElement(ht,null,b.createElement(Ht,{mobile:12,desktop:12},b.createElement(Ye,null))),vn&&b.createElement(ht,{className:"webhooks-container"},b.createElement(Ht,{mobile:12,desktop:12},b.createElement(tt,null))),b.createElement(ht,null,b.createElement(Ht,{mobile:12,desktop:12},b.createElement(bt,null)))))}}var ki=cr(775),vs=cr.n(ki);const Fo={value:"",onChange:()=>{},schema:{},keyName:"",required:!1,errors:(0,X.List)()};class Ra extends b.Component{componentDidMount(){const{dispatchInitialValue:K,value:Z,onChange:le}=this.props;K?le(Z):K===!1&&le("")}render(){let{schema:K,errors:Z,value:le,onChange:he,getComponent:Ce,fn:et,disabled:Ye}=this.props;const bt=K&&K.get?K.get("format"):null,tt=K&&K.get?K.get("type"):null;let ht=ur=>Ce(ur,!1,{failSilently:!0}),Ht=tt?ht(bt?`JsonSchema_${tt}_${bt}`:`JsonSchema_${tt}`):Ce("JsonSchema_string");return Ht||(Ht=Ce("JsonSchema_string")),b.createElement(Ht,oo()({},this.props,{errors:Z,fn:et,getComponent:Ce,value:le,onChange:he,schema:K,disabled:Ye}))}}Me()(Ra,"defaultProps",Fo);class oi extends b.Component{constructor(){super(...arguments),Me()(this,"onChange",K=>{const Z=this.props.schema&&this.props.schema.get("type")==="file"?K.target.files[0]:K.target.value;this.props.onChange(Z,this.props.keyName)}),Me()(this,"onEnumChange",K=>this.props.onChange(K))}render(){let{getComponent:K,value:Z,schema:le,errors:he,required:Ce,description:et,disabled:Ye}=this.props;const bt=le&&le.get?le.get("enum"):null,tt=le&&le.get?le.get("format"):null,ht=le&&le.get?le.get("type"):null,Ht=le&&le.get?le.get("in"):null;if(Z||(Z=""),he=he.toJS?he.toJS():[],bt){const tr=K("Select");return b.createElement(tr,{className:he.length?"invalid":"",title:he.length?he:"",allowedValues:[...bt],value:Z,allowEmptyValue:!Ce,disabled:Ye,onChange:this.onEnumChange})}const ur=Ye||Ht&&Ht==="formData"&&!("FormData"in window),Gt=K("Input");return ht&&ht==="file"?b.createElement(Gt,{type:"file",className:he.length?"invalid":"",title:he.length?he:"",onChange:this.onChange,disabled:ur}):b.createElement(vs(),{type:tt&&tt==="password"?"password":"text",className:he.length?"invalid":"",title:he.length?he:"",value:Z,minLength:0,debounceTimeout:350,placeholder:et,onChange:this.onChange,disabled:ur})}}Me()(oi,"defaultProps",Fo);class si extends b.PureComponent{constructor(K,Z){super(K,Z),Me()(this,"onChange",()=>{this.props.onChange(this.state.value)}),Me()(this,"onItemChange",(le,he)=>{this.setState(Ce=>{let{value:et}=Ce;return{value:et.set(he,le)}},this.onChange)}),Me()(this,"removeItem",le=>{this.setState(he=>{let{value:Ce}=he;return{value:Ce.delete(le)}},this.onChange)}),Me()(this,"addItem",()=>{const{fn:le}=this.props;let he=Ai(this.state.value);this.setState(()=>({value:he.push(le.getSampleSchema(this.state.schema.get("items"),!1,{includeWriteOnly:!0}))}),this.onChange)}),Me()(this,"onEnumChange",le=>{this.setState(()=>({value:le}),this.onChange)}),this.state={value:Ai(K.value),schema:K.schema}}UNSAFE_componentWillReceiveProps(K){const Z=Ai(K.value);Z!==this.state.value&&this.setState({value:Z}),K.schema!==this.state.schema&&this.setState({schema:K.schema})}render(){var K;let{getComponent:Z,required:le,schema:he,errors:Ce,fn:et,disabled:Ye}=this.props;Ce=Ce.toJS?Ce.toJS():x()(Ce)?Ce:[];const bt=s()(Ce).call(Ce,Fr=>typeof Fr=="string"),tt=$()(K=s()(Ce).call(Ce,Fr=>Fr.needRemove!==void 0)).call(K,Fr=>Fr.error),ht=this.state.value,Ht=!!(ht&&ht.count&&ht.count()>0),ur=he.getIn(["items","enum"]),Gt=he.getIn(["items","type"]),tr=he.getIn(["items","format"]),yr=he.get("items");let jr,Tr=!1,ln=Gt==="file"||Gt==="string"&&tr==="binary";if(Gt&&tr?jr=Z(`JsonSchema_${Gt}_${tr}`):Gt!=="boolean"&&Gt!=="array"&&Gt!=="object"||(jr=Z(`JsonSchema_${Gt}`)),jr||ln||(Tr=!0),ur){const Fr=Z("Select");return b.createElement(Fr,{className:Ce.length?"invalid":"",title:Ce.length?Ce:"",multiple:!0,value:ht,disabled:Ye,allowedValues:ur,allowEmptyValue:!le,onChange:this.onEnumChange})}const vn=Z("Button");return b.createElement("div",{className:"json-schema-array"},Ht?$()(ht).call(ht,(Fr,Lr)=>{var Dr;const cn=(0,X.fromJS)([...$()(Dr=s()(Ce).call(Ce,Cr=>Cr.index===Lr)).call(Dr,Cr=>Cr.error)]);return b.createElement("div",{key:Lr,className:"json-schema-form-item"},ln?b.createElement(Va,{value:Fr,onChange:Cr=>this.onItemChange(Cr,Lr),disabled:Ye,errors:cn,getComponent:Z}):Tr?b.createElement(xa,{value:Fr,onChange:Cr=>this.onItemChange(Cr,Lr),disabled:Ye,errors:cn}):b.createElement(jr,oo()({},this.props,{value:Fr,onChange:Cr=>this.onItemChange(Cr,Lr),disabled:Ye,errors:cn,schema:yr,getComponent:Z,fn:et})),Ye?null:b.createElement(vn,{className:`btn btn-sm json-schema-form-item-remove ${tt.length?"invalid":null}`,title:tt.length?tt:"",onClick:()=>this.removeItem(Lr)}," - "))}):null,Ye?null:b.createElement(vn,{className:`btn btn-sm json-schema-form-item-add ${bt.length?"invalid":null}`,title:bt.length?bt:"",onClick:this.addItem},"Add ",Gt?`${Gt} `:"","item"))}}Me()(si,"defaultProps",Fo);class xa extends b.Component{constructor(){super(...arguments),Me()(this,"onChange",K=>{const Z=K.target.value;this.props.onChange(Z,this.props.keyName)})}render(){let{value:K,errors:Z,description:le,disabled:he}=this.props;return K||(K=""),Z=Z.toJS?Z.toJS():[],b.createElement(vs(),{type:"text",className:Z.length?"invalid":"",title:Z.length?Z:"",value:K,minLength:0,debounceTimeout:350,placeholder:le,onChange:this.onChange,disabled:he})}}Me()(xa,"defaultProps",Fo);class Va extends b.Component{constructor(){super(...arguments),Me()(this,"onFileChange",K=>{const Z=K.target.files[0];this.props.onChange(Z,this.props.keyName)})}render(){let{getComponent:K,errors:Z,disabled:le}=this.props;const he=K("Input"),Ce=le||!("FormData"in window);return b.createElement(he,{type:"file",className:Z.length?"invalid":"",title:Z.length?Z:"",onChange:this.onFileChange,disabled:Ce})}}Me()(Va,"defaultProps",Fo);class ca extends b.Component{constructor(){super(...arguments),Me()(this,"onEnumChange",K=>this.props.onChange(K))}render(){let{getComponent:K,value:Z,errors:le,schema:he,required:Ce,disabled:et}=this.props;le=le.toJS?le.toJS():[];let Ye=he&&he.get?he.get("enum"):null,bt=!Ye||!Ce,tt=!Ye&&["true","false"];const ht=K("Select");return b.createElement(ht,{className:le.length?"invalid":"",title:le.length?le:"",value:String(Z),disabled:et,allowedValues:Ye?[...Ye]:tt,allowEmptyValue:bt,onChange:this.onEnumChange})}}Me()(ca,"defaultProps",Fo);const Ol=Ge=>$()(Ge).call(Ge,K=>{const Z=K.propKey!==void 0?K.propKey:K.index;let le=typeof K=="string"?K:typeof K.error=="string"?K.error:null;if(!Z&&le)return le;let he=K.error,Ce=`/${K.propKey}`;for(;typeof he=="object";){const et=he.propKey!==void 0?he.propKey:he.index;if(et===void 0||(Ce+=`/${et}`,!he.error))break;he=he.error}return`${Ce}: ${he}`});class Wa extends b.PureComponent{constructor(){super(),Me()(this,"onChange",K=>{this.props.onChange(K)}),Me()(this,"handleOnChange",K=>{const Z=K.target.value;this.onChange(Z)})}render(){let{getComponent:K,value:Z,errors:le,disabled:he}=this.props;const Ce=K("TextArea");return le=le.toJS?le.toJS():x()(le)?le:[],b.createElement("div",null,b.createElement(Ce,{className:Jr()({invalid:le.length}),title:le.length?Ol(le).join(", "):"",value:(0,ie.Pz)(Z),disabled:he,onChange:this.handleOnChange}))}}function Ai(Ge){return X.List.isList(Ge)?Ge:x()(Ge)?(0,X.fromJS)(Ge):(0,X.List)()}function kl(){let Ge={components:{App:Vt,authorizationPopup:Rt,authorizeBtn:Jt,AuthorizeBtnContainer:Wt,authorizeOperationBtn:zt,auths:Yt,AuthItem:Pt,authError:qe,oauth2:Oe,apiKeyAuth:ve,basicAuth:ke,clear:it,liveResponse:qt,InitializedInput:$r,info:lo,InfoContainer:zn,InfoUrl:Xn,InfoBasePath:mn,Contact:Ve,License:On,JumpToPath:Hr,CopyToClipboardBtn:Fn,onlineValidatorBadge:Xt.Z,operations:fr,operation:ot,OperationSummary:Qt,OperationSummaryMethod:lr,OperationSummaryPath:Nt,highlightCode:As,responses:qr,response:Qo,ResponseExtension:qo,responseBody:Us,parameters:ws,parameterRow:Tn,execute:to,headers:Yn,errors:Kr,contentType:Rn,overview:_r,footer:Gr,FilterContainer:ao,ParamBody:En,curl:kn,schemes:xo,SchemesContainer:Ko,modelExample:Ss,ModelWrapper:uo,ModelCollapse:xn,Model:Cs.Z,Models:ns,EnumModel:Ea,ObjectModel:Ms,ArrayModel:ri,PrimitiveModel:zs,Property:Oi,TryItOutButton:za,Markdown:Ws.Z,BaseLayout:rn,VersionPragmaFilter:yo,VersionStamp:Ji,OperationExt:Bt,OperationExtRow:nr,ParameterExt:Kt,ParameterIncludeEmpty:Rs,OperationTag:Le,OperationContainer:Mt,DeepLink:ni,SvgAssets:Vs,Example:ze,ExamplesSelect:nt,ExamplesSelectValueRetainer:rt}},K={components:p},Z={components:i};return[T.default,dt.default,Qe.default,je.default,$e.default,ge.default,Ie.default,Je.default,Ge,K,Et.default,Z,Ct.default,jt.default,I.default,z.default,ue.default,Be.default,V.default,(0,ne.default)()]}Me()(Wa,"defaultProps",Fo);var hs=cr(97451),_=cr(29806),F=cr(97139);function re(){return[kl,hs.default,F.default,_.default]}var de=cr(45308);const{GIT_DIRTY:Se,GIT_COMMIT:He,PACKAGE_VERSION:at,BUILD_TIME:St}={PACKAGE_VERSION:"5.3.1",GIT_COMMIT:"g733e51a",GIT_DIRTY:!0,BUILD_TIME:"Wed, 02 Aug 2023 13:12:32 GMT"};function pr(Ge){var K;fe.Z.versions=fe.Z.versions||{},fe.Z.versions.swaggerUi={version:at,gitRevision:He,gitDirty:Se,buildTimestamp:St};const Z={dom_id:null,domNode:null,spec:{},url:"",urls:null,layout:"BaseLayout",docExpansion:"list",maxDisplayedTags:null,filter:null,validatorUrl:"https://validator.swagger.io/validator",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,r()(K=window.location.pathname).call(K,"/"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:ur=>ur,responseInterceptor:ur=>ur,showMutatedRequest:!0,defaultModelRendering:"example",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:"cURL (bash)",syntax:"bash"},curl_powershell:{title:"cURL (PowerShell)",syntax:"powershell"},curl_cmd:{title:"cURL (CMD)",syntax:"bash"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:["get","put","post","delete","options","head","patch","trace"],queryConfigEnabled:!1,presets:[re],plugins:[],pluginsOptions:{pluginLoadType:"legacy"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:"agate"}};let le=Ge.queryConfigEnabled?(0,ie.UG)():{};const he=Ge.domNode;delete Ge.domNode;const Ce=y()({},Z,Ge,le),et={system:{configs:Ce.configs},plugins:Ce.presets,pluginsOptions:Ce.pluginsOptions,state:y()({layout:{layout:Ce.layout,filter:s()(Ce)},spec:{spec:"",url:Ce.url},requestSnippets:Ce.requestSnippets},Ce.initialState)};if(Ce.initialState)for(var Ye in Ce.initialState)Object.prototype.hasOwnProperty.call(Ce.initialState,Ye)&&Ce.initialState[Ye]===void 0&&delete et.state[Ye];var bt=new Y(et);bt.register([Ce.plugins,()=>({fn:Ce.fn,components:Ce.components,state:Ce.state})]);var tt=bt.getSystem();const ht=ur=>{let Gt=tt.specSelectors.getLocalConfig?tt.specSelectors.getLocalConfig():{},tr=y()({},Gt,Ce,ur||{},le);if(he&&(tr.domNode=he),bt.setConfigs(tr),tt.configsActions.loaded(),ur!==null&&(!le.url&&typeof tr.spec=="object"&&c()(tr.spec).length?(tt.specActions.updateUrl(""),tt.specActions.updateLoadingStatus("success"),tt.specActions.updateSpec(h()(tr.spec))):tt.specActions.download&&tr.url&&!tr.urls&&(tt.specActions.updateUrl(tr.url),tt.specActions.download(tr.url))),tr.domNode)tt.render(tr.domNode,"App");else if(tr.dom_id){let yr=document.querySelector(tr.dom_id);tt.render(yr,"App")}else tr.dom_id===null||tr.domNode===null||console.error("Skipped rendering: no `dom_id` or `domNode` was specified");return tt},Ht=le.config||Ce.configUrl;return Ht&&tt.specActions&&tt.specActions.getConfigByUrl?(tt.specActions.getConfigByUrl({url:Ht,loadRemoteConfig:!0,requestInterceptor:Ce.requestInterceptor,responseInterceptor:Ce.responseInterceptor},ht),tt):ht()}pr.presets={apis:re},pr.plugins=de.default;const ar=pr})(),ba=ba.default})())})(Xf);var mm=Xf.exports;const gm=dm(mm),Tw="",Qf="API_DOC:DESTINATION_URL_KEY",ed=()=>localStorage.getItem(Qf),ym=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const ia=ss.useAPIClient(),{t:zc}=Uc(),Vc=sa.useRef(),{data:la}=ss.useRequest({url:"swagger:getUrls"}),cr=i=>{if(!i.headers.Authorization){const e=location.pathname.match(/^\/apps\/([^/]*)\//);i.headers["X-App"]=(e==null?void 0:e[1])||"main",i.headers.Authorization=`Bearer ${ia.auth.getToken()}`}return i},[ba,p]=sa.useState(ed());return sa.useEffect(()=>{ba&&localStorage.setItem(Qf,ba)},[ba]),sa.useEffect(()=>{var i;(i=la==null?void 0:la.data)!=null&&i.length&&(!ba||!la.data.find(e=>e.url===ed()))&&p(la.data[0].url)},[ba,la]),sa.useEffect(()=>{gm({requestInterceptor:cr,url:ba,domNode:Vc.current})},[ba]),ba?Pn.jsxs(qs.Space,{direction:"vertical",style:{width:"100%"},children:[Pn.jsx("div",{style:{display:"flex",justifyContent:"center",width:"100%"},children:Pn.jsxs("div",{className:ss.css`
143
143
  display: flex;
144
144
  align-items: center;
145
145
  gap: 8px;
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.16.0-alpha.4",
2
+ "@nocobase/client": "0.16.0-alpha.5",
3
3
  "antd": "5.8.6",
4
4
  "react": "18.2.0",
5
5
  "@ant-design/icons": "5.1.4",
6
6
  "antd-style": "3.4.5",
7
7
  "react-i18next": "11.18.6",
8
- "@nocobase/actions": "0.16.0-alpha.4",
9
- "@nocobase/server": "0.16.0-alpha.4",
10
- "@nocobase/utils": "0.16.0-alpha.4",
11
- "@nocobase/database": "0.16.0-alpha.4"
8
+ "@nocobase/actions": "0.16.0-alpha.5",
9
+ "@nocobase/server": "0.16.0-alpha.5",
10
+ "@nocobase/utils": "0.16.0-alpha.5",
11
+ "@nocobase/database": "0.16.0-alpha.5"
12
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-api-doc",
3
- "version": "0.16.0-alpha.4",
3
+ "version": "0.16.0-alpha.5",
4
4
  "displayName": "API documentation",
5
5
  "displayName.zh-CN": "API 文档",
6
6
  "description": "An OpenAPI documentation generator for NocoBase HTTP API",
@@ -21,5 +21,5 @@
21
21
  "url": "git+https://github.com/nocobase/nocobase.git",
22
22
  "directory": "packages/plugins/api-doc"
23
23
  },
24
- "gitHead": "98d65186a22281e59209d11a6756712a62667c07"
24
+ "gitHead": "3badd2569e4658023897fa381ac4dd30e64d5bce"
25
25
  }