redoc/redoc-demo.bundle.js

1906 lines
1.0 MiB
JavaScript
Raw Normal View History

2021-07-01 12:47:52 +03:00
/*! For license information please see redoc-demo.bundle.js.LICENSE.txt */
(()=>{var e={5499:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=n(3325),o=n(6479),i=n(5522),a=n(4137),s=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=n(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=n(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}})},4667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class n{}t._CodeOrName=n,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends n{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class o extends n{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const n=[e[0]];let r=0;for(;r<t.length;)l(n,t[r]),n.push(e[++r]);return new o(n)}t._Code=o,t.nil=new o(""),t._=i;const a=new o("+");function s(e,...t){const n=[u(e[0])];let r=0;for(;r<t.length;)n.push(a),l(n,t[r]),n.push(a,u(e[++r]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const n=c(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(n),new o(n)}function l(e,t){var n;t instanceof o?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(n=t)||"boolean"==typeof n||null===n?n:u(Array.isArray(n)?n.join(","):n))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=s,t.addCodeArg=l,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:s`${e}${t}`},t.stringify=function(e){return new o(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):i`[${e}]`},t.regexpCode=function(e){return new o(e.toString())}},4475:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const r=n(4667),o=n(7791);var i=n(4667);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(l,a._`+${o}`);case"integer":return void r.elseIf(a._`${s} === "boolean" || ${o} === null
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,a._`+${o}`);case"boolean":return void r.elseIf(a._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(a._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return r.elseIf(a._`${o} === "" || ${o} === 0 || ${o} === false`),void r.assign(l,null);case"array":r.elseIf(a._`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${o} === null`).assign(l,a._`[${o}]`)}}r.else(),h(e),r.endIf(),r.if(a._`${l} !== undefined`,(()=>{r.assign(o,l),function({gen:e,parentData:t,parentDataProperty:n},r){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${n}]`,r)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function p(e,t,n,r=l.Correct){const o=r===l.Correct?a.operators.EQ:a.operators.NEQ;let i;switch(e){case"null":return a._`${t} ${o} null`;case"array":i=a._`Array.isArray(${t})`;break;case"object":i=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return a._`typeof ${t} ${o} ${e}`}return r===l.Correct?i:a.not(i);function s(e=a.nil){return a.and(a._`typeof ${t} == "number"`,e,n?a._`isFinite(${t})`:a.nil)}}function d(e,t,n,r){if(1===e.length)return p(e[0],t,n,r);let o;const i=s.toHash(e);if(i.array&&i.object){const e=a._`typeof ${t} != "object"`;o=i.null?e:a._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=a.nil;i.number&&delete i.integer;for(const e in i)o=a.and(o,p(e,t,n,r));return o}t.checkDataType=p,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:n,schema:r}=e,o=s.schemaRefOrVal(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:e}}(e);i.reportError(t,f)}t.reportTypeError=h},2537:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const r=n(4475),o=n(6124);function i(e,t,n){const{gen:i,compositeRule:a,data:s,opts:l}=e;if(void 0===n)return;const c=r._`${s}${r.getProperty(t)}`;if(a)return void o.checkStrictMode(e,`default is ignored for: ${c}`);let u=r._`${c} === undefined`;"empty"===l.useDefaults&&(u=r._`${u} || ${c} === null || ${c} === ""`),i.if(u,r._`${c} = ${r.stringify(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:r}=e.schema;if("object"===t&&n)for(const t in n)i(e,t,n[t].default);else"array"===t&&Array.isArray(r)&&r.forEach(((t,n)=>i(e,n,t.default)))}},1321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(7627),o=n(7927),i=n(4566),a=n(7927),s=n(2537),l=n(6488),c=n(4688),u=n(4475),p=n(5018),d=n(9826),f=n(6124),h=n(1885);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:o},i){o.code.es5?e.func(t,u._`${p.default.data}, ${p.default.valCxt}`,r.$async,(()=>{e.code(u._`"use strict"; ${g(n,o)}`),function(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,u._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,u._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,u._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,u._`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,u._`""`),e.var(p.default.parentData,u._`undefined`),e.var(p.default.parentDataProperty,u._`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(i)})):e.func(t,u._`${p.default.data}, ${function(e){return u._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?u._`, ${p.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,r.$async,(()=>e.code(g(n,o)).code(i)))}function g(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){f.checkUnknownRules(e),function(e){const{schema:t,errSchemaPath:n,opt
missingProperty: ${o},
depsCount: ${t},
deps: ${n}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:n)[r]=e[r]);return[t,n]}(e);s(e,t),l(e,n)}};function s(e,t=e.schema){const{gen:n,data:o,it:a}=e;if(0===Object.keys(t).length)return;const s=n.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=i.propertyInData(n,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?n.if(u,(()=>{for(const t of c)i.checkReportMissingProp(e,t)})):(n.if(r._`${u} && (${i.checkMissingProp(e,c,s)})`),i.reportMissingProp(e,s),n.else())}}function l(e,t=e.schema){const{gen:n,data:r,keyword:a,it:s}=e,l=n.name("valid");for(const c in t)o.alwaysValidSchema(s,t[c])||(n.if(i.propertyInData(n,r,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>n.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},5184:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>r.str`must match "${e.ifClause}" schema`,params:({params:e})=>r._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:i}=e;void 0===n.then&&void 0===n.else&&o.checkStrictMode(i,'"if" without "then" and "else" is ignored');const s=a(i,"then"),l=a(i,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(u,p("then",n),p("else",n))}else s?t.if(u,p("then")):t.if(r.not(u),p("else"));function p(n,o){return()=>{const i=e.subschema({keyword:n},u);t.assign(c,u),e.mergeValidEvaluated(i,c),o?t.assign(o,r._`${n}`):e.setParams({ifClause:n})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const n=e.schema[t];return void 0!==n&&!o.alwaysValidSchema(e,n)}t.default=i},9616:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3074),o=n(6988),i=n(6348),a=n(9822),s=n(9564),l=n(1117),c=n(4002),u=n(1422),p=n(9690),d=n(9883),f=n(8435),h=n(1668),m=n(9684),g=n(5716),y=n(5184),v=n(5642);t.default=function(e=!1){const t=[f.default,h.default,m.default,g.default,y.default,v.default,c.default,u.default,l.default,p.default,d.default];return e?t.push(o.default,a.default):t.push(r.default,i.default),t.push(s.default),t}},6348:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(4475),o=n(6124),i=n(8619),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return s(e,"additionalItems",t);n.items=!0,o.alwaysValidSchema(n,t)||e.ok(i.validateArray(e))}};function s(e,t,n=e.schema){const{gen:i,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:r,errSchemaPath:i}=c,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(r.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;o.checkStrictMode(c,e,r.strictTuples)}}(a),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,n.length,c.items));const u=i.name("valid"),p=i.const("len",r._`${s}.length`);n.forEach(((t,n)=>{o.alwaysValidSchema(c,t)||(i.if(r._`${p} > ${n}`,(()=>e.subschema({keyword:l,schemaProp:n,dataProp:n},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},9822:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4475),o=n(6124),i=n(8619),a=n(3074),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:s}=n;r.items=!0,o.alwaysValidSchema(r,t)
@media ${t?"print, ":""} screen and (max-width: ${t=>t.theme.breakpoints[e]}) ${n||""} {
${yn(...r)};
2022-02-04 13:00:46 +03:00
}
`,kn=gn;function On(e){return t=>{if(t.theme.extensionsHook)return t.theme.extensionsHook(e,t)}}const _n=kn.div`
2022-02-04 13:00:46 +03:00
padding: 20px;
color: red;
`;class Sn extends r.Component{constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e){return this.setState({error:e}),!1}render(){return this.state.error?r.createElement(_n,null,r.createElement("h1",null,"Something went wrong..."),r.createElement("small",null," ",this.state.error.message," "),r.createElement("p",null,r.createElement("details",null,r.createElement("summary",null,"Stack trace"),r.createElement("pre",null,this.state.error.stack))),r.createElement("small",null," ReDoc Version: ","2.0.0-rc.71")," ",r.createElement("br",null),r.createElement("small",null," Commit: ","c513b288")):r.Children.only(this.props.children)}}const En=bn`
2022-02-04 13:00:46 +03:00
0% {
transform: rotate(0deg); }
100% {
transform: rotate(360deg);
}
`,Pn=kn((e=>r.createElement("svg",{className:e.className,version:"1.1",width:"512",height:"512",viewBox:"0 0 512 512"},r.createElement("path",{d:"M275.682 147.999c0 10.864-8.837 19.661-19.682 19.661v0c-10.875 0-19.681-8.796-19.681-19.661v-96.635c0-10.885 8.806-19.661 19.681-19.661v0c10.844 0 19.682 8.776 19.682 19.661v96.635z"}),r.createElement("path",{d:"M275.682 460.615c0 10.865-8.837 19.682-19.682 19.682v0c-10.875 0-19.681-8.817-19.681-19.682v-96.604c0-10.885 8.806-19.681 19.681-19.681v0c10.844 0 19.682 8.796 19.682 19.682v96.604z"}),r.createElement("path",{d:"M147.978 236.339c10.885 0 19.681 8.755 19.681 19.641v0c0 10.885-8.796 19.702-19.681 19.702h-96.624c-10.864 0-19.661-8.817-19.661-19.702v0c0-10.885 8.796-19.641 19.661-19.641h96.624z"}),r.createElement("path",{d:"M460.615 236.339c10.865 0 19.682 8.755 19.682 19.641v0c0 10.885-8.817 19.702-19.682 19.702h-96.584c-10.885 0-19.722-8.817-19.722-19.702v0c0-10.885 8.837-19.641 19.722-19.641h96.584z"}),r.createElement("path",{d:"M193.546 165.703c7.69 7.66 7.68 20.142 0 27.822v0c-7.701 7.701-20.162 7.701-27.853 0.020l-68.311-68.322c-7.68-7.701-7.68-20.142 0-27.863v0c7.68-7.68 20.121-7.68 27.822 0l68.342 68.342z"}),r.createElement("path",{d:"M414.597 386.775c7.7 7.68 7.7 20.163 0.021 27.863v0c-7.7 7.659-20.142 7.659-27.843-0.062l-68.311-68.26c-7.68-7.7-7.68-20.204 0-27.863v0c7.68-7.7 20.163-7.7 27.842 0l68.291 68.322z"}),r.createElement("path",{d:"M165.694 318.464c7.69-7.7 20.153-7.7 27.853 0v0c7.68 7.659 7.69 20.163 0 27.863l-68.342 68.322c-7.67 7.659-20.142 7.659-27.822-0.062v0c-7.68-7.68-7.68-20.122 0-27.801l68.311-68.322z"}),r.createElement("path",{d:"M386.775 97.362c7.7-7.68 20.142-7.68 27.822 0v0c7.7 7.68 7.7 20.183 0.021 27.863l-68.322 68.311c-7.68 7.68-20.163 7.68-27.843-0.020v0c-7.68-7.68-7.68-20.162 0-27.822l68.322-68.332z"}))))`
animation: 2s ${En} linear infinite;
2022-02-04 13:00:46 +03:00
width: 50px;
height: 50px;
content: '';
display: inline-block;
margin-left: -25px;
path {
fill: ${e=>e.color};
}
`,$n=kn.div`
2022-02-04 13:00:46 +03:00
font-family: helvetica, sans;
width: 100%;
text-align: center;
font-size: 25px;
margin: 30px 0 20px 0;
color: ${e=>e.color};
`;class An extends r.PureComponent{render(){return r.createElement("div",{style:{textAlign:"center"}},r.createElement($n,{color:this.props.color},"Loading ..."),r.createElement(Pn,{color:this.props.color}))}}var Cn=n(5697);const Rn=r.createContext(new mn({})),jn=Rn.Provider,Tn=Rn.Consumer;function In(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Nn={};function Ln(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:Nn}var Dn=Object.assign,Mn=Object.getOwnPropertyDescriptor,Fn=Object.defineProperty,zn=Object.prototype,Un=[];Object.freeze(Un);var qn={};Object.freeze(qn);var Bn="undefined"!=typeof Proxy,Vn=Object.toString();function Wn(){Bn||In("Proxy not available")}function Hn(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Yn=function(){};function Kn(e){return"function"==typeof e}function Gn(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Qn(e){return null!==e&&"object"==typeof e}function Xn(e){var t;if(!Qn(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===Vn}function Zn(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function Jn(e,t,n){Fn(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function er(e,t,n){Fn(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function tr(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Qn(e)&&!0===e[n]}}function nr(e){return e instanceof Map}function rr(e){return e instanceof Set}var or=void 0!==Object.getOwnPropertySymbols,ir="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:or?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function ar(e){return null===e?null:"object"==typeof e?""+e:e}function sr(e,t){return zn.hasOwnProperty.call(e,t)}var lr=Object.getOwnPropertyDescriptors||function(e){var t={};return ir(e).forEach((function(n){t[n]=Mn(e,n)})),t};function cr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ur(e,t,n){return t&&cr(e.prototype,t),n&&cr(e,n),e}function pr(){return(pr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function fr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mr(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var gr=Symbol("mobx-stored-annotations");function yr(e){return Object.assign((function(t,n){vr(t,n,e)}),e)}function vr(e,t,n){sr(e,gr)||Jn(e,gr,pr({},e[gr])),function(e){return e.annotationType_===Er}(n)||(e[gr][t]=n)}var br=Symbol("mobx administration"),wr=
2022-02-04 13:00:46 +03:00
width: calc(100% - ${e=>e.theme.rightPanel.width});
padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px;
${({compact:e,theme:t})=>xn("medium",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
padding: ${`${e?0:t.spacing.sectionVertical}px ${t.spacing.sectionHorizontal}px`};
`};
`,pp=kn.div.attrs((e=>({[rp]:e.id})))`
2022-02-04 13:00:46 +03:00
padding: ${e=>e.theme.spacing.sectionVertical}px 0;
&:last-child {
min-height: calc(100vh + 1px);
}
& > &:last-child {
min-height: initial;
}
${xn("medium",!0)`
2022-02-04 13:00:46 +03:00
padding: 0;
`}
${e=>e.underlined?"\n position: relative;\n\n &:not(:last-of-type):after {\n position: absolute;\n bottom: 0;\n width: 100%;\n display: block;\n content: '';\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n }\n ":""}
`,dp=kn(kn.div`
2022-02-04 13:00:46 +03:00
width: ${e=>e.theme.rightPanel.width};
color: ${({theme:e})=>e.rightPanel.textColor};
background-color: ${e=>e.theme.rightPanel.backgroundColor};
padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px;
${xn("medium",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
padding: ${e=>`${e.theme.spacing.sectionVertical}px ${e.theme.spacing.sectionHorizontal}px`};
`};
`)`
background-color: ${e=>e.theme.rightPanel.backgroundColor};
`,fp=kn.div`
2022-02-04 13:00:46 +03:00
display: flex;
width: 100%;
padding: 0;
${xn("medium",!0)`
2022-02-04 13:00:46 +03:00
flex-direction: column;
`};
`,hp={1:"1.85714em",2:"1.57143em",3:"1.27em"},mp=e=>yn`
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-weight: ${({theme:e})=>e.typography.headings.fontWeight};
font-size: ${hp[e]};
2022-02-04 13:00:46 +03:00
line-height: ${({theme:e})=>e.typography.headings.lineHeight};
`,gp=kn.h1`
${mp(1)};
color: ${({theme:e})=>e.colors.text.primary};
2022-02-04 13:00:46 +03:00
${On("H1")};
`,yp=kn.h2`
${mp(2)};
color: ${({theme:e})=>e.colors.text.primary};
margin: 0 0 20px;
2022-02-04 13:00:46 +03:00
${On("H2")};
`,vp=(kn.h2`
${mp(3)};
color: ${({theme:e})=>e.colors.text.primary};
2022-02-04 13:00:46 +03:00
${On("H3")};
`,kn.h3`
2022-02-04 13:00:46 +03:00
color: ${({theme:e})=>e.rightPanel.textColor};
${On("RightPanelHeader")};
`),bp=kn.h5`
2022-02-04 13:00:46 +03:00
border-bottom: 1px solid rgba(38, 50, 56, 0.3);
margin: 1em 0 1em 0;
color: rgba(38, 50, 56, 0.5);
font-weight: normal;
text-transform: uppercase;
font-size: 0.929em;
line-height: 20px;
${On("UnderlinedHeader")};
`,wp=(0,r.createContext)(void 0),{Provider:xp,Consumer:kp}=wp;function Op(e){const{spec:t,specUrl:o,options:i,onLoaded:a,children:s}=e,[l,c]=r.useState(null),[u,p]=r.useState(null);if(u)throw u;r.useEffect((()=>{!function(){return e=this,null,r=function*(){if(t||o){c(null);try{const e=yield function(e){return t=this,r=function*(){const t=new Pa.Config({}),r={config:t,base:Mt?window.location.href:process.cwd()};Mt&&(t.resolve.http.customFetch=n.g.fetch),"object"==typeof e&&null!==e?r.doc={source:{absoluteRef:""},parsed:e}:r.ref=e;const{bundle:{parsed:o}}=yield(0,Ea.bundle)(r);return void 0!==o.swagger?(i=o,console.warn("[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0"),new Promise(((e,t)=>(0,$a.convertObj)(i,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},((n,r)=>{if(n)return t(n);e(r&&r.openapi)}))))):o;var i},new Promise(((e,n)=>{var o=e=>{try{a(r.next(e))}catch(e){n(e)}},i=e=>{try{a(r.throw(e))}catch(e){n(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,i);a((r=r.apply(t,null)).next())}));var t,r}(t||o);c(e)}catch(e){throw p(e),e}}},new Promise(((t,n)=>{var o=e=>{try{a(r.next(e))}catch(e){n(e)}},i=e=>{try{a(r.throw(e))}catch(e){n(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(o,i);a((r=r.apply(e,null)).next())}));var e,r}()}),[t,o]);const d=r.useMemo((()=>{if(!l)return null;try{return new Xg(l,o,i)}catch(e){throw a&&a(e),e}}),[l,o,i]);return r.useEffect((()=>{d&&a&&a()}),[d,a]),s({loading:!d,store:d})}const _p=e=>yn`
2022-02-04 13:00:46 +03:00
${e} {
cursor: pointer;
margin-left: -20px;
padding: 0;
line-height: 1;
width: 20px;
display: inline-block;
outline: 0;
}
${e}:before {
content: '';
width: 15px;
height: 15px;
background-size: contain;
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg==');
opacity: 0.5;
visibility: hidden;
display: inline-block;
vertical-align: middle;
}
h1:hover > ${e}::before, h2:hover > ${e}::before, ${e}:hover::before {
visibility: visible;
}
`,Sp=kn((function(e){const t=r.useContext(wp),n=r.useCallback((n=>{t&&function(e,t,n){t.defaultPrevented||0!==t.button||(e=>!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey))(t)||(t.preventDefault(),e.replace(encodeURI(n)))}(t.menu.history,n,e.to)}),[t,e.to]);return t?r.createElement("a",{className:e.className,href:t.menu.history.linkForId(e.to),onClick:n,"aria-label":e.to},e.children):null}))`
${_p("&")};
`;function Ep(e){return r.createElement(Sp,{to:e.to})}const Pp={left:"90deg",right:"-90deg",up:"-180deg",down:"0"};class $p extends r.PureComponent{render(){return r.createElement("svg",{className:this.props.className,style:this.props.style,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},r.createElement("polygon",{points:"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "}))}}const Ap=kn($p)`
2022-02-04 13:00:46 +03:00
height: ${e=>e.size||"18px"};
width: ${e=>e.size||"18px"};
min-width: ${e=>e.size||"18px"};
2022-02-04 13:00:46 +03:00
vertical-align: middle;
float: ${e=>e.float||""};
transition: transform 0.2s ease-out;
transform: rotateZ(${e=>Pp[e.direction||"down"]});
2022-02-04 13:00:46 +03:00
polygon {
fill: ${({color:e,theme:t})=>e&&t.colors.responses[e]&&t.colors.responses[e].color||e};
}
`,Cp=kn.span`
2022-02-04 13:00:46 +03:00
display: inline-block;
padding: 2px 8px;
margin: 0;
background-color: ${e=>e.theme.colors[e.type].main};
color: ${e=>e.theme.colors[e.type].contrastText};
font-size: ${e=>e.theme.typography.code.fontSize};
vertical-align: middle;
line-height: 1.6;
border-radius: 4px;
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
font-size: 12px;
+ span[type] {
margin-left: 4px;
}
`,Rp=yn`
2022-02-04 13:00:46 +03:00
text-decoration: line-through;
color: #707070;
`,jp=kn.caption`
2022-02-04 13:00:46 +03:00
text-align: right;
font-size: 0.9em;
font-weight: normal;
color: ${e=>e.theme.colors.text.secondary};
`,Tp=kn.td`
2022-02-04 13:00:46 +03:00
border-left: 1px solid ${e=>e.theme.schema.linesColor};
box-sizing: border-box;
position: relative;
padding: 10px 10px 10px 0;
${xn("small")`
2022-02-04 13:00:46 +03:00
display: block;
overflow: hidden;
`}
tr:first-of-type > &,
tr.last > & {
border-left-width: 0;
background-position: top left;
background-repeat: no-repeat;
background-size: 1px 100%;
}
tr:first-of-type > & {
background-image: linear-gradient(
to bottom,
transparent 0%,
transparent 22px,
${e=>e.theme.schema.linesColor} 22px,
${e=>e.theme.schema.linesColor} 100%
);
}
tr.last > & {
background-image: linear-gradient(
to bottom,
${e=>e.theme.schema.linesColor} 0%,
${e=>e.theme.schema.linesColor} 22px,
transparent 22px,
transparent 100%
);
}
tr.last + tr > & {
border-left-color: transparent;
}
tr.last:first-child > & {
background: none;
border-left-color: transparent;
}
`,Ip=kn(Tp)`
2022-02-04 13:00:46 +03:00
padding: 0;
`,Np=kn(Tp)`
2022-02-04 13:00:46 +03:00
vertical-align: top;
line-height: 20px;
white-space: nowrap;
font-size: 13px;
font-family: ${e=>e.theme.typography.code.fontFamily};
&.deprecated {
${Rp};
2022-02-04 13:00:46 +03:00
}
${({kind:e})=>"patternProperties"===e&&yn`
> span.property-name {
display: inline-table;
white-space: break-spaces;
margin-right: 20px;
2022-02-04 13:00:46 +03:00
::before,
::after {
content: '/';
filter: opacity(0.2);
}
}
`}
${({kind:e=""})=>["field","additionalProperties","patternProperties"].includes(e)?"":"font-style: italic"};
${On("PropertyNameCell")};
`,Lp=kn.td`
2022-02-04 13:00:46 +03:00
border-bottom: 1px solid #9fb4be;
padding: 10px 0;
width: ${e=>e.theme.schema.defaultDetailsWidth};
box-sizing: border-box;
tr.expanded & {
border-bottom: none;
}
${xn("small")`
2022-02-04 13:00:46 +03:00
padding: 0 20px;
border-bottom: none;
border-left: 1px solid ${e=>e.theme.schema.linesColor};
tr.last > & {
border-left: none;
}
`}
${On("PropertyDetailsCell")};
`,Dp=kn.span`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.linesColor};
font-family: ${e=>e.theme.typography.code.fontFamily};
margin-right: 10px;
&::before {
content: '';
display: inline-block;
vertical-align: middle;
width: 10px;
height: 1px;
background: ${e=>e.theme.schema.linesColor};
}
&::after {
content: '';
display: inline-block;
vertical-align: middle;
width: 1px;
background: ${e=>e.theme.schema.linesColor};
height: 7px;
}
`,Mp=kn.div`
2022-02-04 13:00:46 +03:00
padding: ${({theme:e})=>e.schema.nestingSpacing};
`,Fp=kn.table`
2022-02-04 13:00:46 +03:00
border-collapse: separate;
border-radius: 3px;
font-size: ${e=>e.theme.typography.fontSize};
border-spacing: 0;
width: 100%;
> tr {
vertical-align: middle;
}
${xn("small")`
2022-02-04 13:00:46 +03:00
display: block;
> tr, > tbody > tr {
display: block;
}
`}
${xn("small",!1," and (-ms-high-contrast:none)")`
2022-02-04 13:00:46 +03:00
td {
float: left;
width: 100%;
}
`}
&
${Mp},
2022-02-04 13:00:46 +03:00
&
${Mp}
${Mp}
${Mp},
2022-02-04 13:00:46 +03:00
&
${Mp}
${Mp}
${Mp}
${Mp}
${Mp} {
2022-02-04 13:00:46 +03:00
margin: ${({theme:e})=>e.schema.nestingSpacing};
margin-right: 0;
background: ${({theme:e})=>e.schema.nestedBackground};
}
&
${Mp}
${Mp},
2022-02-04 13:00:46 +03:00
&
${Mp}
${Mp}
${Mp}
${Mp},
2022-02-04 13:00:46 +03:00
&
${Mp}
${Mp}
${Mp}
${Mp}
${Mp}
${Mp} {
2022-02-04 13:00:46 +03:00
background: #ffffff;
}
`,zp=kn.div`
2022-02-04 13:00:46 +03:00
margin: 0 0 3px 0;
display: inline-block;
`,Up=kn.span`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
margin-right: 10px;
color: ${e=>e.theme.colors.primary.main};
font-family: ${e=>e.theme.typography.headings.fontFamily};
}
`,qp=kn.button`
2022-02-04 13:00:46 +03:00
display: inline-block;
margin-right: 10px;
margin-bottom: 5px;
font-size: 0.8em;
cursor: pointer;
border: 1px solid ${e=>e.theme.colors.primary.main};
padding: 2px 10px;
line-height: 1.5em;
outline: none;
&:focus {
box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary.main};
}
${({deprecated:e})=>e&&Rp||""};
${e=>e.active?`\n color: white;\n background-color: ${e.theme.colors.primary.main};\n &:focus {\n box-shadow: none;\n background-color: ${St(.15,e.theme.colors.primary.main)};\n }\n `:`\n color: ${e.theme.colors.primary.main};\n background-color: white;\n `}
`,Bp=kn.div`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
font-family: ${e=>e.theme.typography.code.fontFamily};
&::after {
content: ' [';
}
`,Vp=kn.div`
2022-02-04 13:00:46 +03:00
font-size: 0.9em;
font-family: ${e=>e.theme.typography.code.fontFamily};
&::after {
content: ']';
}
`;function Wp(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var Hp=Wp("Tab"),Yp=Wp("TabList"),Kp=Wp("TabPanel");function Gp(){return(Gp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Qp(e,t){return r.Children.map(e,(function(e){return null===e?null:function(e){return Hp(e)||Yp(e)||Kp(e)}(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children?(0,r.cloneElement)(e,Gp({},e.props,{children:Qp(e.props.children,t)})):e}))}function Xp(e,t){return r.Children.forEach(e,(function(e){null!==e&&(Hp(e)||Kp(e)?t(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(Yp(e)&&t(e),Xp(e.props.children,t)))}))}function Zp(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Zp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Jp(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Zp(e))&&(r&&(r+=" "),r+=t);return r}var ed,td=0;function nd(){return"react-tabs-"+td++}function rd(e){var t=0;return Xp(e,(function(e){Hp(e)&&t++})),t}function od(){return(od=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function id(e,t){return(id=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ad(e){return e&&"getAttribute"in e}function sd(e){return ad(e)&&"tab"===e.getAttribute("role")}function ld(e){return ad(e)&&"true"===e.getAttribute("aria-disabled")}var cd=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).tabNodes=[],t.handleKeyDown=function(e){var n=t.props,r=n.direction,o=n.disableUpDownKeys;if(t.isTabFromContainer(e.target)){var i=t.props.selectedIndex,a=!1,s=!1;32!==e.keyCode&&13!==e.keyCode||(a=!0,s=!1,t.handleClick(e)),37===e.keyCode||!o&&38===e.keyCode?(i="rtl"===r?t.getNextTab(i):t.getPrevTab(i),a=!0,s=!0):39===e.keyCode||!o&&40===e.keyCode?(i="rtl"===r?t.getPrevTab(i):t.getNextTab(i),a=!0,s=!0):35===e.keyCode?(i=t.getLastTab(),a=!0,s=!0):36===e.keyCode&&(i=t.getFirstTab(),a=!0,s=!0),a&&e.preventDefault(),s&&t.setSelected(i,e)}},t.handleClick=function(e){var n=e.target;do{if(t.isTabFromContainer(n)){if(ld(n))return;var r=[].slice.call(n.parentNode.children).filter(sd).indexOf(n);return void t.setSelected(r,e)}}while(null!=(n=n.parentNode))},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,id(t,n);var i=o.prototype;return i.setSelected=function(e,t){if(!(e<0||e>=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},i.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;n<t;n++)if(!ld(this.getTab(n)))return n;for(var r=0;r<e;r++)if(!ld(this.getTab(r)))return r;return e},i.getPrevTab=function(e){for(var t=e;t--;)if(!ld(this.getTab(t)))return t;for(t=this.getTabsCount();t-- >e;)if(!ld(this.getTab(t)))return t;return e},i.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t<e;t++)if(!ld(this.getTab(t)))return t;return null},i.getLastTab=function(){for(var e=this.getTabsCount();e--;)if(!ld(this.getTab(e)))return e;return null},i.getTabsCount=function(){return rd(this.props.children)},i.getPanelsCount=function(){return e=this.props.children,t=0,Xp(e,(function(e){Kp(e)&&t++})),t;var e,t},i.getTab=function(e){return this.tabNodes["tabs-"+e]},i.getChildren=function(){var e=this,t=0,n=this.props,o=n.children,i=n.disabledTabClassName,a=n.focus,s=n.forceRenderTabPanel,l=n.selectedIndex,c=n.selectedTabClassName,u=n.selectedTabPanelClassName,p=n.environment;this.tabIds=this.tabIds||[],this.panelIds=this.panelIds||[];for(var d=this.tabIds.length-this.getTabsCount();d++<0;)this.tabIds.push(nd()),this.panelIds.push(nd());return Qp(o,(function(n){var o=n;if(Yp(n)){var d=0,f=!1;null==ed&&function(e){var t=e||("undefined"!=
2022-02-04 13:00:46 +03:00
> ul {
list-style: none;
padding: 0;
margin: 0;
margin: 0 -5px;
> li {
padding: 5px 10px;
display: inline-block;
background-color: ${({theme:e})=>e.codeBlock.backgroundColor};
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
cursor: pointer;
text-align: center;
outline: none;
color: ${({theme:e})=>St(e.colors.tonalOffset,e.rightPanel.textColor)};
2022-02-04 13:00:46 +03:00
margin: 0
${({theme:e})=>`${e.spacing.unit}px ${e.spacing.unit}px ${e.spacing.unit}px`};
border: 1px solid ${({theme:e})=>St(.05,e.codeBlock.backgroundColor)};
2022-02-04 13:00:46 +03:00
border-radius: 5px;
min-width: 60px;
font-size: 0.9em;
font-weight: bold;
&.react-tabs__tab--selected {
color: ${e=>e.theme.colors.text.primary};
background: ${({theme:e})=>e.rightPanel.textColor};
&:focus {
outline: auto;
}
}
&:only-child {
flex: none;
min-width: 100px;
}
&.tab-success {
color: ${e=>e.theme.colors.responses.success.tabTextColor};
}
&.tab-redirect {
color: ${e=>e.theme.colors.responses.redirect.tabTextColor};
}
&.tab-info {
color: ${e=>e.theme.colors.responses.info.tabTextColor};
}
&.tab-error {
color: ${e=>e.theme.colors.responses.error.tabTextColor};
}
}
}
> .react-tabs__tab-panel {
background: ${({theme:e})=>e.codeBlock.backgroundColor};
& > div,
& > pre {
padding: ${e=>4*e.theme.spacing.unit}px;
margin: 0;
}
& > div > pre {
padding: 0;
}
}
`,Od=(kn(kd)`
2022-02-04 13:00:46 +03:00
> ul {
display: block;
> li {
padding: 2px 5px;
min-width: auto;
margin: 0 15px 0 0;
font-size: 13px;
font-weight: normal;
border-bottom: 1px dashed;
color: ${({theme:e})=>St(e.colors.tonalOffset,e.rightPanel.textColor)};
2022-02-04 13:00:46 +03:00
border-radius: 0;
background: none;
&:last-child {
margin-right: 0;
}
&.react-tabs__tab--selected {
color: ${({theme:e})=>e.rightPanel.textColor};
background: none;
}
}
}
> .react-tabs__tab-panel {
& > div,
& > pre {
padding: ${e=>2*e.theme.spacing.unit}px 0;
}
}
`,kn.div`
2022-02-04 13:00:46 +03:00
/**
* Based on prism-dark.css
*/
code[class*='language-'],
pre[class*='language-'] {
/* color: white;
background: none; */
text-shadow: 0 -0.1em 0.2em black;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
@media print {
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*='language-'] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: hsl(30, 20%, 50%);
}
.token.punctuation {
opacity: 0.7;
}
.namespace {
opacity: 0.7;
}
.token.property,
.token.tag,
.token.number,
.token.constant,
.token.symbol {
color: #4a8bb3;
}
.token.boolean {
color: #e64441;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a0fbaa;
& + a,
& + a:visited {
color: #4ed2ba;
text-decoration: underline;
}
}
.token.property.string {
color: white;
}
.token.operator,
.token.entity,
.token.url,
.token.variable {
color: hsl(40, 90%, 60%);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: hsl(350, 40%, 70%);
}
.token.regex,
.token.important {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.deleted {
color: red;
}
${On("Prism")};
`),_d=kn.div`
2022-02-04 13:00:46 +03:00
opacity: 0.7;
transition: opacity 0.3s ease;
text-align: right;
&:focus-within {
opacity: 1;
}
> button {
background-color: transparent;
border: 0;
color: inherit;
padding: 2px 10px;
font-family: ${({theme:e})=>e.typography.fontFamily};
font-size: ${({theme:e})=>e.typography.fontSize};
line-height: ${({theme:e})=>e.typography.lineHeight};
cursor: pointer;
outline: 0;
:hover,
:focus {
background: rgba(255, 255, 255, 0.1);
}
}
`,Sd=kn.div`
&:hover ${_d} {
2022-02-04 13:00:46 +03:00
opacity: 1;
}
`,Ed=kn(Od.withComponent("pre"))`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
overflow-x: auto;
margin: 0;
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
`;function Pd(e){return getComputedStyle(e)}function $d(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function Ad(e){var t=document.createElement("div");return t.className=e,t}var Cd="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Rd(e,t){if(!Cd)throw new Error("No element matching method supported");return Cd.call(e,t)}function jd(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function Td(e,t){return Array.prototype.filter.call(e.children,(function(e){return Rd(e,t)}))}var Id=function(e){return"ps__thumb-"+e},Nd=function(e){return"ps__rail-"+e},Ld="ps__child--consume",Dd="ps--focus",Md="ps--clicking",Fd=function(e){return"ps--active-"+e},zd=function(e){return"ps--scrolling-"+e},Ud={x:null,y:null};function qd(e,t){var n=e.element.classList,r=zd(t);n.contains(r)?clearTimeout(Ud[t]):n.add(r)}function Bd(e,t){Ud[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(zd(t))}),e.settings.scrollingThreshold)}var Vd=function(e){this.element=e,this.handlers={}},Wd={isEmpty:{configurable:!0}};Vd.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},Vd.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)}))},Vd.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},Wd.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(Vd.prototype,Wd);var Hd=function(){this.eventElements=[]};function Yd(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function Kd(e,t,n,r,o){var i;if(void 0===r&&(r=!0),void 0===o&&(o=!1),"top"===t)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,o){var i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0),void 0===o&&(o=!1);var p=e.element;e.reach[l]=null,p[s]<1&&(e.reach[l]="start"),p[s]>e[i]-e[a]-1&&(e.reach[l]="end"),t&&(p.dispatchEvent(Yd("ps-scroll-"+l)),t<0?p.dispatchEvent(Yd("ps-scroll-"+c)):t>0&&p.dispatchEvent(Yd("ps-scroll-"+u)),r&&function(e,t){qd(e,t),Bd(e,t)}(e,l)),e.reach[l]&&(t||o)&&p.dispatchEvent(Yd("ps-"+l+"-reach-"+e.reach[l]))}(e,n,i,r,o)}function Gd(e){return parseInt(e,10)||0}Hd.prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new Vd(e),this.eventElements.push(t)),t},Hd.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},Hd.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},Hd.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},Hd.prototype.once=function(e,t,n){var r=this.eventElement(e),o=function(e){r.unbind(t,o),n(e)};r.bind(t,o)};var Qd={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function Xd(e){var t=e.element,n=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.ceil(r.width),e.containerHeight=Math.ceil(r.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(Td(t,Nd("x")).forEach((function(
position: relative;
`;class ff extends r.Component{constructor(){super(...arguments),this.handleRef=e=>{this._container=e}}componentDidMount(){const e=this._container.parentElement&&this._container.parentElement.scrollTop||0;this.inst=new cf(this._container,this.props.options||{}),this._container.scrollTo&&this._container.scrollTo(0,e)}componentDidUpdate(){this.inst.update()}componentWillUnmount(){this.inst.destroy()}render(){const{children:e,className:t,updateFn:n}=this.props;return n&&n(this.componentDidUpdate.bind(this)),r.createElement(r.Fragment,null,uf&&r.createElement(pf,null),r.createElement(df,{className:`scrollbar-container ${t}`,ref:this.handleRef},e))}}function hf(e){return r.createElement(Rn.Consumer,null,(t=>t.nativeScrollbars?r.createElement("div",{style:{overflow:"auto",overscrollBehavior:"contain",msOverflowStyle:"-ms-autohiding-scrollbar"}},e.children):r.createElement(ff,((e,t)=>{for(var n in t||(t={}))af.call(t,n)&&lf(e,n,t[n]);if(of)for(var n of of(t))sf.call(t,n)&&lf(e,n,t[n]);return e})({},e),e.children)))}const mf=kn((({className:e,style:t})=>r.createElement("svg",{className:e,style:t,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("polyline",{points:"6 9 12 15 18 9"}))))`
position: absolute;
pointer-events: none;
z-index: 1;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
right: 8px;
margin: auto;
text-align: center;
polyline {
color: ${e=>"dark"===e.variant&&"white"};
}
`,gf=r.memo((e=>{const{options:t,onChange:n,placeholder:o,value:i="",variant:a,className:s}=e;return r.createElement("div",{className:s},r.createElement(mf,{variant:a}),r.createElement("select",{onChange:e=>{const{selectedIndex:r}=e.target;n(t[o?r-1:r])},value:i,className:"dropdown-select"},o&&r.createElement("option",{disabled:!0,hidden:!0,value:o},o),t.map((({idx:e,value:t,title:n},o)=>r.createElement("option",{key:e||t+o,value:t},n||t)))),r.createElement("label",null,i))})),yf=We(gf)`
label {
box-sizing: border-box;
min-width: 100px;
outline: none;
display: inline-block;
font-family: ${e=>e.theme.typography.headings.fontFamily};
color: ${({theme:e})=>e.colors.text.primary};
vertical-align: bottom;
width: ${({fullWidth:e})=>e?"100%":"auto"};
text-transform: none;
padding: 0 22px 0 4px;
font-size: 0.929em;
line-height: 1.5em;
font-family: inherit;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.dropdown-select {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
border: none;
appearance: none;
cursor: pointer;
color: ${({theme:e})=>e.colors.text.primary};
line-height: inherit;
font-family: inherit;
}
box-sizing: border-box;
min-width: 100px;
outline: none;
display: inline-block;
border-radius: 2px;
border: 1px solid rgba(38, 50, 56, 0.5);
vertical-align: bottom;
padding: 2px 0px 2px 6px;
2022-02-04 13:00:46 +03:00
position: relative;
width: auto;
background: white;
color: #263238;
font-family: ${e=>e.theme.typography.headings.fontFamily};
font-size: 0.929em;
line-height: 1.5em;
cursor: pointer;
transition: border 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
&:hover,
&:focus-within {
border: 1px solid ${e=>e.theme.colors.primary.main};
color: ${e=>e.theme.colors.primary.main};
box-shadow: 0px 0px 0px 1px ${e=>e.theme.colors.primary.main};
}
`,vf=We(yf)`
margin-left: 10px;
text-transform: none;
font-size: 0.969em;
font-size: 1em;
border: none;
padding: 0 1.2em 0 0;
background: transparent;
&:hover,
&:focus-within {
border: none;
box-shadow: none;
label {
color: ${e=>e.theme.colors.primary.main};
text-shadow: 0px 0px 0px ${e=>e.theme.colors.primary.main};
}
}
`,bf=We.span`
margin-left: 10px;
text-transform: none;
font-size: 0.929em;
color: black;
`;var wf=Object.defineProperty,xf=Object.getOwnPropertySymbols,kf=Object.prototype.hasOwnProperty,Of=Object.prototype.propertyIsEnumerable,_f=(e,t,n)=>t in e?wf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Sf(e){const{Label:t=bf,Dropdown:n=vf}=e;return 1===e.options.length?r.createElement(t,null,e.options[0].value):r.createElement(n,((e,t)=>{for(var n in t||(t={}))kf.call(t,n)&&_f(e,n,t[n]);if(xf)for(var n of xf(t))Of.call(t,n)&&_f(e,n,t[n]);return e})({},e))}var Ef=n(7856);const Pf=yn`
2022-02-04 13:00:46 +03:00
a {
text-decoration: ${e=>e.theme.typography.links.textDecoration};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.typography.links.color};
&:visited {
color: ${e=>e.theme.typography.links.visited};
}
&:hover {
color: ${e=>e.theme.typography.links.hover};
text-decoration: ${e=>e.theme.typography.links.hoverTextDecoration};
2022-02-04 13:00:46 +03:00
}
}
`,$f=kn(Od)`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.fontFamily};
font-weight: ${e=>e.theme.typography.fontWeightRegular};
line-height: ${e=>e.theme.typography.lineHeight};
p {
&:last-child {
margin-bottom: 0;
}
}
${({compact:e})=>e&&"\n p:first-child {\n margin-top: 0;\n }\n p:last-child {\n margin-bottom: 0;\n }\n "}
${({inline:e})=>e&&" p {\n display: inline-block;\n }"}
h1 {
${mp(1)};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
margin-top: 0;
}
h2 {
${mp(2)};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.text.primary};
}
code {
color: ${({theme:e})=>e.typography.code.color};
background-color: ${({theme:e})=>e.typography.code.backgroundColor};
font-family: ${e=>e.theme.typography.code.fontFamily};
border-radius: 2px;
border: 1px solid rgba(38, 50, 56, 0.1);
padding: 0 ${({theme:e})=>e.spacing.unit}px;
font-size: ${e=>e.theme.typography.code.fontSize};
font-weight: ${({theme:e})=>e.typography.code.fontWeight};
word-break: break-word;
}
pre {
font-family: ${e=>e.theme.typography.code.fontFamily};
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
background-color: ${({theme:e})=>e.codeBlock.backgroundColor};
color: white;
padding: ${e=>4*e.theme.spacing.unit}px;
overflow-x: auto;
line-height: normal;
border-radius: 0px;
border: 1px solid rgba(38, 50, 56, 0.1);
code {
background-color: transparent;
color: white;
padding: 0;
&:before,
&:after {
content: none;
}
}
}
blockquote {
margin: 0;
margin-bottom: 1em;
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
img {
max-width: 100%;
box-sizing: content-box;
}
ul,
ol {
padding-left: 2em;
margin: 0;
margin-bottom: 1em;
ul,
ol {
margin-bottom: 0;
margin-top: 0;
}
}
table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
border-collapse: collapse;
border-spacing: 0;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
table tr {
background-color: #fff;
border-top: 1px solid #ccc;
&:nth-child(2n) {
background-color: ${({theme:e})=>e.schema.nestedBackground};
}
}
table th,
table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table th {
text-align: left;
font-weight: bold;
}
${_p(".share-link")};
2022-02-04 13:00:46 +03:00
${Pf}
2022-02-04 13:00:46 +03:00
${On("Markdown")};
`;var Af=Object.defineProperty,Cf=Object.getOwnPropertySymbols,Rf=Object.prototype.hasOwnProperty,jf=Object.prototype.propertyIsEnumerable,Tf=(e,t,n)=>t in e?Af(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const If=$f.withComponent("span");function Nf(e){const t=e.inline?If:$f;return r.createElement(Tn,null,(n=>{return r.createElement(t,((e,t)=>{for(var n in t||(t={}))Rf.call(t,n)&&Tf(e,n,t[n]);if(Cf)for(var n of Cf(t))jf.call(t,n)&&Tf(e,n,t[n]);return e})({className:"redoc-markdown "+(e.className||""),dangerouslySetInnerHTML:{__html:(o=n.untrustedSpec,i=e.html,o?Ef.sanitize(i):i)},"data-role":e["data-role"]},e));var o,i}))}class Lf extends r.Component{render(){const{source:e,inline:t,compact:n,className:o,"data-role":i}=this.props,a=new Cl;return r.createElement(Nf,{html:a.renderMd(e),inline:t,compact:n,className:o,"data-role":i})}}const Df=kn.div`
2022-02-04 13:00:46 +03:00
position: relative;
`,Mf=kn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
min-width: 80px;
max-width: 500px;
background: #fff;
bottom: 100%;
left: 50%;
margin-bottom: 10px;
transform: translateX(-50%);
border-radius: 4px;
padding: 0.3em 0.6em;
text-align: center;
box-shadow: 0px 0px 5px 0px rgba(204, 204, 204, 1);
`,Ff=kn.div`
2022-02-04 13:00:46 +03:00
background: #fff;
color: #000;
display: inline;
font-size: 0.85em;
white-space: nowrap;
`,zf=kn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 0;
height: 0;
bottom: -5px;
left: 50%;
margin-left: -5px;
border-left: solid transparent 5px;
border-right: solid transparent 5px;
border-top: solid #fff 5px;
`,Uf=kn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 100%;
height: 20px;
bottom: -20px;
`;class qf extends r.Component{render(){const{open:e,title:t,children:n}=this.props;return r.createElement(Df,null,n,e&&r.createElement(Mf,null,r.createElement(Ff,null,t),r.createElement(zf,null),r.createElement(Uf,null)))}}const Bf="undefined"!=typeof document&&document.queryCommandSupported&&document.queryCommandSupported("copy");class Vf{static isSupported(){return Bf}static selectElement(e){let t,n;document.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(e),t.select()):document.createRange&&window.getSelection&&(n=window.getSelection(),t=document.createRange(),t.selectNodeContents(e),n.removeAllRanges(),n.addRange(t))}static deselect(){if(document.selection)document.selection.empty();else if(window.getSelection){const e=window.getSelection();e&&e.removeAllRanges()}}static copySelected(){let e;try{e=document.execCommand("copy")}catch(t){e=!1}return e}static copyElement(e){Vf.selectElement(e);const t=Vf.copySelected();return t&&Vf.deselect(),t}static copyCustom(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="2em",t.style.height="2em",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();const n=Vf.copySelected();return document.body.removeChild(t),n}}class Wf extends r.PureComponent{constructor(e){super(e),this.copy=()=>{const e="string"==typeof this.props.data?this.props.data:JSON.stringify(this.props.data,null,2);Vf.copyCustom(e),this.showTooltip()},this.renderCopyButton=()=>r.createElement("button",{onClick:this.copy},r.createElement(qf,{title:Vf.isSupported()?"Copied":"Not supported in your browser",open:this.state.tooltipShown},"Copy")),this.state={tooltipShown:!1}}render(){return this.props.children({renderCopyButton:this.renderCopyButton})}showTooltip(){this.setState({tooltipShown:!0}),setTimeout((()=>{this.setState({tooltipShown:!1})}),1500)}}let Hf=1;function Yf(e,t){Hf=1;let n="";return n+='<div class="redoc-json">',n+="<code>",n+=Zf(e,t),n+="</code>",n+="</div>",n}function Kf(e){return void 0!==e?e.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):""}function Gf(e){return JSON.stringify(e).slice(1,-1)}function Qf(e,t){return'<span class="'+t+'">'+Kf(e)+"</span>"}function Xf(e){return'<span class="token punctuation">'+e+"</span>"}function Zf(e,t){const n=typeof e;let r="";return null==e?r+=Qf("null","token keyword"):e&&e.constructor===Array?(Hf++,r+=function(e,t){const n=Hf>t?"collapsed":"";let r=`<button class="collapser" aria-label="${Hf>t+1?"expand":"collapse"}"></button>${Xf("[")}<span class="ellipsis"></span><ul class="array collapsible">`,o=!1;const i=e.length;for(let a=0;a<i;a++)o=!0,r+='<li><div class="hoverable '+n+'">',r+=Zf(e[a],t),a<i-1&&(r+=","),r+="</div></li>";return r+=`</ul>${Xf("]")}`,o||(r=Xf("[ ]")),r}(e,t),Hf--):e&&e.constructor===Date?r+=Qf('"'+e.toISOString()+'"',"token string"):"object"===n?(Hf++,r+=function(e,t){const n=Hf>t?"collapsed":"",r=Object.keys(e),o=r.length;let i=`<button class="collapser" aria-label="${Hf>t+1?"expand":"collapse"}"></button>${Xf("{")}<span class="ellipsis"></span><ul class="obj collapsible">`,a=!1;for(let s=0;s<o;s++){const l=r[s];a=!0,i+='<li><div class="hoverable '+n+'">',i+='<span class="property token string">"'+Kf(l)+'"</span>: ',i+=Zf(e[l],t),s<o-1&&(i+=Xf(",")),i+="</div></li>"}return i+=`</ul>${Xf("}")}`,a||(i=Xf("{ }")),i}(e,t),Hf--):"number"===n?r+=Qf(e,"token number"):"string"===n?/^(http|https):\/\/[^\s]+$/.test(e)?r+=Qf('"',"token string")+'<a href="'+encodeURI(e)+'">'+Kf(Gf(e))+"</a>"+Qf('"',"token string"):r+=Qf('"'+Gf(e)+'"',"token string"):"boolean"===n&&(r+=Qf(e,"token boolean")),r}const Jf=yn`
2022-02-04 13:00:46 +03:00
.redoc-json code > .collapser {
display: none;
pointer-events: none;
}
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"};
contain: content;
overflow-x: auto;
.callback-function {
color: gray;
}
.collapser:after {
content: '-';
cursor: pointer;
}
.collapsed > .collapser:after {
content: '+';
cursor: pointer;
}
.ellipsis:after {
content: ' … ';
}
.collapsible {
margin-left: 2em;
}
.hoverable {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 2px;
padding-right: 2px;
border-radius: 2px;
}
.hovered {
background-color: rgba(235, 238, 249, 1);
}
.collapser {
background-color: transparent;
border: 0;
color: #fff;
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: ${e=>e.theme.typography.code.fontSize};
padding-right: 6px;
padding-left: 6px;
padding-top: 0;
padding-bottom: 0;
display: flex;
align-items: center;
justify-content: center;
width: 15px;
height: 15px;
position: absolute;
top: 4px;
left: -1.5em;
cursor: default;
user-select: none;
-webkit-user-select: none;
padding: 2px;
&:focus {
outline-color: #fff;
outline-style: dotted;
outline-width: 1px;
}
}
ul {
list-style-type: none;
padding: 0px;
margin: 0px 0px 0px 26px;
}
li {
position: relative;
display: block;
}
.hoverable {
display: inline-block;
}
.selected {
outline-style: solid;
outline-width: 1px;
outline-style: dotted;
}
.collapsed > .collapsible {
display: none;
}
.ellipsis {
display: none;
}
.collapsed > .ellipsis {
display: inherit;
}
`,eh=kn.div`
&:hover > ${_d} {
2022-02-04 13:00:46 +03:00
opacity: 1;
}
`;class th extends r.PureComponent{constructor(){super(...arguments),this.renderInner=({renderCopyButton:e})=>{const t=this.props.data&&Object.values(this.props.data).some((e=>"object"==typeof e&&null!==e));return r.createElement(eh,null,r.createElement(_d,null,e(),t&&r.createElement(r.Fragment,null,r.createElement("button",{onClick:this.expandAll}," Expand all "),r.createElement("button",{onClick:this.collapseAll}," Collapse all "))),r.createElement(Rn.Consumer,null,(e=>r.createElement(Od,{className:this.props.className,ref:e=>this.node=e,dangerouslySetInnerHTML:{__html:Yf(this.props.data,e.jsonSampleExpandLevel)}}))))},this.expandAll=()=>{const e=this.node.getElementsByClassName("collapsible");for(const t of Array.prototype.slice.call(e)){const e=t.parentNode;e.classList.remove("collapsed"),e.querySelector(".collapser").setAttribute("aria-label","collapse")}},this.collapseAll=()=>{const e=this.node.getElementsByClassName("collapsible"),t=Array.prototype.slice.call(e,1);for(const e of t){const t=e.parentNode;t.classList.add("collapsed"),t.querySelector(".collapser").setAttribute("aria-label","expand")}},this.collapseElement=e=>{let t;"collapser"===e.className&&(t=e.parentElement.getElementsByClassName("collapsible")[0],t.parentElement.classList.contains("collapsed")?(t.parentElement.classList.remove("collapsed"),e.setAttribute("aria-label","collapse")):(t.parentElement.classList.add("collapsed"),e.setAttribute("aria-label","expand")))},this.clickListener=e=>{this.collapseElement(e.target)},this.focusListener=e=>{"Enter"===e.key&&this.collapseElement(e.target)}}render(){return r.createElement(Wf,{data:this.props.data},this.renderInner)}componentDidMount(){this.node.addEventListener("click",this.clickListener),this.node.addEventListener("focus",this.focusListener)}componentWillUnmount(){this.node.removeEventListener("click",this.clickListener),this.node.removeEventListener("focus",this.focusListener)}}const nh=kn(th)`
${Jf};
`;class rh extends r.PureComponent{render(){const{source:e,lang:t}=this.props;return r.createElement(Ed,{dangerouslySetInnerHTML:{__html:gs(e,t)}})}}class oh extends r.Component{render(){return r.createElement(Wf,{data:this.props.source},(({renderCopyButton:e})=>r.createElement(Sd,null,r.createElement(_d,null,e()),r.createElement(rh,{lang:this.props.lang,source:this.props.source}))))}}function ih({value:e,mimeType:t}){return Za(t)?r.createElement(nh,{data:e}):("object"==typeof e&&(e=JSON.stringify(e,null,2)),r.createElement(oh,{lang:(n=t,-1!==n.search(/xml/i)?"xml":"clike"),source:e}));var n}function ah({example:e,mimeType:t}){return void 0===e.value&&e.externalValueUrl?r.createElement(sh,{example:e,mimeType:t}):r.createElement(ih,{value:e.value,mimeType:t})}function sh({example:e,mimeType:t}){const n=function(e,t){const[,n]=(0,r.useState)(!0),o=(0,r.useRef)(void 0),i=(0,r.useRef)(void 0);return i.current!==e&&(o.current=void 0),i.current=e,(0,r.useEffect)((()=>{(()=>{return r=this,i=function*(){n(!0);try{o.current=yield e.getExternalValue(t)}catch(e){o.current=e}n(!1)},new Promise(((e,t)=>{var n=e=>{try{a(i.next(e))}catch(e){t(e)}},o=e=>{try{a(i.throw(e))}catch(e){t(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,o);a((i=i.apply(r,null)).next())}));var r,i})()}),[e,t]),o.current}(e,t);return void 0===n?r.createElement("span",null,"Loading..."):n instanceof Error?r.createElement(Ed,null,"Error loading external example: ",r.createElement("br",null),r.createElement("a",{className:"token string",href:e.externalValueUrl,target:"_blank",rel:"noopener noreferrer"},e.externalValueUrl)):r.createElement(ih,{value:n,mimeType:t})}const lh=kn.div`
2022-02-04 13:00:46 +03:00
padding: 0.9em;
background-color: ${({theme:e})=>Nt(.6,e.rightPanel.backgroundColor)};
2022-02-04 13:00:46 +03:00
margin: 0 0 10px 0;
display: block;
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-size: 0.929em;
line-height: 1.5em;
`,ch=kn.span`
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.headings.fontFamily};
font-size: 12px;
position: absolute;
z-index: 1;
top: -11px;
left: 12px;
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
color: ${({theme:e})=>Nt(.3,e.rightPanel.textColor)};
`,uh=kn.div`
2022-02-04 13:00:46 +03:00
position: relative;
`,ph=kn(yf)`
label {
color: ${({theme:e})=>e.rightPanel.textColor};
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
2022-02-04 13:00:46 +03:00
font-size: 1em;
text-transform: none;
border: none;
}
margin: 0 0 10px 0;
display: block;
background-color: ${({theme:e})=>Nt(.6,e.rightPanel.backgroundColor)};
border: none;
padding: 0.9em 1.6em 0.9em 0.9em;
box-shadow: none;
&:hover,
&:focus-within {
2022-02-04 13:00:46 +03:00
border: none;
box-shadow: none;
background-color: ${({theme:e})=>Nt(.3,e.rightPanel.backgroundColor)};
2022-02-04 13:00:46 +03:00
}
`,dh=kn.div`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
font-size: 12px;
color: #ee807f;
`;class fh extends r.Component{constructor(){super(...arguments),this.state={activeIdx:0},this.switchMedia=({idx:e})=>{void 0!==e&&this.setState({activeIdx:e})}}render(){const{activeIdx:e}=this.state,t=this.props.mediaType.examples||{},n=this.props.mediaType.name,o=r.createElement(dh,null,"No sample"),i=Object.keys(t);if(0===i.length)return o;if(i.length>1){const o=i.map(((e,n)=>({value:t[e].summary||e,idx:n}))),a=t[i[e]],s=a.description;return r.createElement(hh,null,r.createElement(uh,null,r.createElement(ch,null,"Example"),this.props.renderDropdown({value:o[e].value,options:o,onChange:this.switchMedia,ariaLabel:"Example"})),r.createElement("div",null,s&&r.createElement(Lf,{source:s}),r.createElement(ah,{example:a,mimeType:n})))}{const e=t[i[0]];return r.createElement(hh,null,e.description&&r.createElement(Lf,{source:e.description}),r.createElement(ah,{example:e,mimeType:n}))}}}const hh=kn.div`
2022-02-04 13:00:46 +03:00
margin-top: 15px;
`;if(!r.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Ci)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function mh(e){e()}var gh=[];function yh(e){return pi(ya(e,t));var t}var vh="undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry;function bh(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+wh}}var wh=1e4,xh=vh?function(e){var t=new Map,n=1,r=new e((function(e){var n=t.get(e);n&&(n.reaction.dispose(),t.delete(e))}));return{addReactionToTrack:function(e,o,i){var a=n++;return r.register(i,a,e),e.current=bh(o),e.current.finalizationRegistryCleanupToken=a,t.set(a,e.current),e.current},recordReactionAsCommitted:function(e){r.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&t.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(vh):function(){var e,t=new Set;function n(){void 0===e&&(e=setTimeout(r,1e4))}function r(){e=void 0;var r=Date.now();t.forEach((function(e){var n=e.current;n&&r>=n.cleanAt&&(n.reaction.dispose(),e.current=null,t.delete(e))})),t.size>0&&n()}return{addReactionToTrack:function(e,r,o){var i;return e.current=bh(r),i=e,t.add(i),n(),e.current},recordReactionAsCommitted:function(e){t.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),r())},resetCleanupScheduleForTests:function(){var n,r;if(t.size>0){try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),i=o.next();!i.done;i=o.next()){var a=i.value,s=a.current;s&&(s.reaction.dispose(),a.current=null)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}t.clear()}e&&(clearTimeout(e),e=void 0)}}}(),kh=xh.addReactionToTrack,Oh=xh.recordReactionAsCommitted,_h=(xh.resetCleanupScheduleForTests,xh.forceCleanupTimerToRunNowForTests,!1);function Sh(){return _h}function Eh(e){return"observer"+e}var Ph=function(){};function $h(e,t){if(void 0===t&&(t="observed"),Sh())return e();var n,o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(r.useState(new Ph),1)[0],i=(n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}((0,r.useState)(0),2)[1],(0,r.useCallback)((function(){n((function(e){return e+1}))}),gh)),a=r.useRef(null);if(!a.current)var s=new Vo(Eh(t),(function(){l.mounted?i():l.changedBeforeMount=!0})),l=kh(a,s,o);var c,u,p=a.current.reaction;if(r.useDebugValue(p,yh),r.useEffect((function(){return Oh(a),a.current?(a.current.mounted=!0,a.current.changedBeforeMount&&(a.current.changedBeforeMount=!1,i())):(a.current={reaction:new Vo(Eh(t),(function(){i()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},i()),function(){a.current.reaction.dispose(),a.current=null}}),[]),p.track((function(){try{c=e()}catch(e){u=e}})),u)throw u;return c}var Ah=function(){return(Ah=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var Ch={$$typeof:!0,render:!0,compare:!0,type:!0};function Rh(e){var t=e.children,n=e.render,r=t||n;return"function"!=typeof r?null:$h(r)}Rh.displayName="Observer",function(e){e||(e=mh),ui({reactionScheduler:e})}(o.unstable_batchedUpdates);var jh=0,Th={};function Ih(e){return Th[e]||(Th[e]=function(e){if("function"==typeof Symbol)return Symb
2022-02-04 13:00:46 +03:00
button {
background-color: transparent;
border: 0;
outline: 0;
font-size: 13px;
font-family: ${e=>e.theme.typography.code.fontFamily};
cursor: pointer;
padding: 0;
color: ${e=>e.theme.colors.text.primary};
&:focus {
font-weight: ${({theme:e})=>e.typography.fontWeightBold};
}
${({kind:e})=>"patternProperties"===e&&yn`
display: inline-flex;
margin-right: 20px;
> span.property-name {
white-space: break-spaces;
text-align: left;
::before,
::after {
content: '/';
filter: opacity(0.2);
}
}
> svg {
align-self: center;
}
`}
2022-02-04 13:00:46 +03:00
}
${Ap} {
2022-02-04 13:00:46 +03:00
height: ${({theme:e})=>e.schema.arrow.size};
width: ${({theme:e})=>e.schema.arrow.size};
polygon {
fill: ${({theme:e})=>e.schema.arrow.color};
}
}
`,im=kn.span`
2022-02-04 13:00:46 +03:00
vertical-align: middle;
font-size: ${({theme:e})=>e.typography.code.fontSize};
line-height: 20px;
`,am=kn(im)`
color: ${e=>Nt(.1,e.theme.schema.typeNameColor)};
`,sm=kn(im)`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.typeNameColor};
`,lm=kn(im)`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.typeTitleColor};
word-break: break-word;
`,cm=sm,um=kn(im.withComponent("div"))`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.schema.requireLabelColor};
font-size: ${e=>e.theme.schema.labelsTextSize};
font-weight: normal;
margin-left: 20px;
line-height: 1;
`,pm=kn(um)`
color: ${e=>e.theme.colors.primary.light};
`,dm=kn(im)`
2022-02-04 13:00:46 +03:00
color: ${({theme:e})=>e.colors.warning.main};
font-size: 13px;
`,fm=kn(im)`
2022-02-04 13:00:46 +03:00
color: #0e7c86;
&::before,
&::after {
font-weight: bold;
}
`,hm=kn(im)`
2022-02-04 13:00:46 +03:00
border-radius: 2px;
word-break: break-word;
${({theme:e})=>`\n background-color: ${Nt(.95,e.colors.text.primary)};\n color: ${Nt(.1,e.colors.text.primary)};\n\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${Nt(.9,e.colors.text.primary)};\n font-family: ${e.typography.code.fontFamily};\n}`};
2022-02-04 13:00:46 +03:00
& + & {
margin-left: 0;
}
${On("ExampleValue")};
`,mm=kn(hm)``,gm=kn(im)`
2022-02-04 13:00:46 +03:00
border-radius: 2px;
${({theme:e})=>`\n background-color: ${Nt(.95,e.colors.primary.light)};\n color: ${Nt(.1,e.colors.primary.main)};\n\n margin: 0 ${e.spacing.unit}px;\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${Nt(.9,e.colors.primary.main)};\n}`};
2022-02-04 13:00:46 +03:00
& + & {
margin-left: 0;
}
${On("ConstraintItem")};
`,ym=kn.button`
2022-02-04 13:00:46 +03:00
background-color: transparent;
border: 0;
color: ${({theme:e})=>e.colors.text.secondary};
margin-left: ${({theme:e})=>e.spacing.unit}px;
border-radius: 2px;
cursor: pointer;
outline-color: ${({theme:e})=>e.colors.text.secondary};
font-size: 12px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;const vm=kn.div`
${Pf};
2022-02-04 13:00:46 +03:00
${({compact:e})=>e?"":"margin: 1em 0"}
`;let bm=class extends r.Component{render(){const{externalDocs:e}=this.props;return e&&e.url?r.createElement(vm,{compact:this.props.compact},r.createElement("a",{href:e.url},e.description||e.url)):null}};bm=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],bm);class wm extends r.PureComponent{constructor(){super(...arguments),this.state={collapsed:!0}}toggle(){this.setState({collapsed:!this.state.collapsed})}render(){const{values:e,isArrayType:t}=this.props,{collapsed:n}=this.state,{enumSkipQuotes:o,maxDisplayedEnumValues:i}=this.context;if(!e.length)return null;const a=this.state.collapsed&&i?e.slice(0,i):e,s=!!i&&e.length>i,l=i?n?` ${e.length-i} more`:"Hide":"";return r.createElement("div",null,r.createElement(im,null,t?nn("enumArray"):""," ",1===e.length?nn("enumSingleValue"):nn("enum"),":")," ",a.map(((e,t)=>{const n=o?String(e):JSON.stringify(e);return r.createElement(r.Fragment,{key:t},r.createElement(hm,null,n)," ")})),s?r.createElement(xm,{onClick:()=>{this.toggle()}},l):null)}}wm.contextType=Rn;const xm=kn.span`
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
vertical-align: middle;
font-size: 13px;
line-height: 20px;
padding: 0 5px;
cursor: pointer;
`,km=kn($f)`
2022-02-04 13:00:46 +03:00
margin: 2px 0;
`;class Om extends r.PureComponent{render(){const e=this.props.extensions;return r.createElement(Rn.Consumer,null,(t=>r.createElement(r.Fragment,null,t.showExtensions&&Object.keys(e).map((t=>r.createElement(km,{key:t},r.createElement(im,null," ",t.substring(2),": ")," ",r.createElement(mm,null,"string"==typeof e[t]?e[t]:JSON.stringify(e[t]))))))))}}function _m({field:e}){return e.examples?r.createElement(r.Fragment,null,r.createElement(im,null," ",nn("examples"),": "),Jt(e.examples)?e.examples.map(((t,n)=>{const o=rs(e,t),i=e.in?String(o):JSON.stringify(o);return r.createElement(r.Fragment,{key:n},r.createElement(hm,null,i)," ")})):r.createElement(Sm,null,Object.values(e.examples).map(((t,n)=>r.createElement("li",{key:n+t.value},r.createElement(hm,null,rs(e,t.value))," -"," ",t.summary||t.description))))):null}const Sm=kn.ul`
2022-02-04 13:00:46 +03:00
margin-top: 1em;
list-style-position: outside;
`;class Em extends r.PureComponent{render(){return 0===this.props.constraints.length?null:r.createElement("span",null," ",this.props.constraints.map((e=>r.createElement(gm,{key:e}," ",e," "))))}}const Pm=r.memo((function({value:e,label:t,raw:n}){if(void 0===e)return null;const o=n?String(e):JSON.stringify(e);return r.createElement("div",null,r.createElement(im,null," ",t," ")," ",r.createElement(hm,null,o))}));function $m(e){const t=e.schema.pattern,{hideSchemaPattern:n}=r.useContext(Rn),[o,i]=r.useState(!1),a=r.useCallback((()=>i(!o)),[o]);return!t||n?null:r.createElement(r.Fragment,null,r.createElement(fm,null,o||t.length<45?t:`${t.substr(0,45)}...`),t.length>45&&r.createElement(ym,{onClick:a},o?"Hide pattern":"Show pattern"))}function Am({schema:e}){const{hideSchemaPattern:t}=r.useContext(Rn);return e&&("string"!==e.type||e.constraints.length)&&((null==e?void 0:e.pattern)&&!t||e.items||e.displayFormat||e.constraints.length)?r.createElement(Cm,null,"[ items",e.displayFormat&&r.createElement(cm,null," <",e.displayFormat," >"),r.createElement(Em,{constraints:e.constraints}),r.createElement($m,{schema:e}),e.items&&r.createElement(Am,{schema:e.items})," ]"):null}const Cm=kn(am)`
2022-02-04 13:00:46 +03:00
margin: 0 5px;
vertical-align: text-top;
`;var Rm=Object.defineProperty,jm=Object.getOwnPropertySymbols,Tm=Object.prototype.hasOwnProperty,Im=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?Rm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lm=(e,t)=>{for(var n in t||(t={}))Tm.call(t,n)&&Nm(e,n,t[n]);if(jm)for(var n of jm(t))Im.call(t,n)&&Nm(e,n,t[n]);return e};const Dm=rm((e=>{const{enumSkipQuotes:t,hideSchemaTitles:n}=r.useContext(Rn),{showExamples:o,field:i,renderDiscriminatorSwitch:a}=e,{schema:s,description:l,deprecated:c,extensions:u,in:p,const:d}=i,f="array"===s.type,h=t||"header"===p,m=r.useMemo((()=>!o||void 0===i.example&&void 0===i.examples?null:void 0!==i.examples?r.createElement(_m,{field:i}):r.createElement(Pm,{label:nn("example")+":",value:rs(i,i.example),raw:Boolean(i.in)})),[i,o]);return r.createElement("div",null,r.createElement("div",null,r.createElement(am,null,s.typePrefix),r.createElement(sm,null,s.displayType),s.displayFormat&&r.createElement(cm,null," ","<",s.displayFormat,">"," "),s.contentEncoding&&r.createElement(cm,null," ","<",s.contentEncoding,">"," "),s.contentMediaType&&r.createElement(cm,null," ","<",s.contentMediaType,">"," "),s.title&&!n&&r.createElement(lm,null," (",s.title,") "),r.createElement(Em,{constraints:s.constraints}),r.createElement($m,{schema:s}),s.isCircular&&r.createElement(dm,null," ",nn("recursive")," "),f&&s.items&&r.createElement(Am,{schema:s.items})),c&&r.createElement("div",null,r.createElement(Cp,{type:"warning"}," ",nn("deprecated")," ")),r.createElement(Pm,{raw:h,label:nn("default")+":",value:s.default}),!a&&r.createElement(wm,{isArrayType:f,values:s.enum})," ",m,r.createElement(Om,{extensions:Lm(Lm({},u),s.extensions)}),r.createElement("div",null,r.createElement(Lf,{compact:!0,source:l})),s.externalDocs&&r.createElement(bm,{externalDocs:s.externalDocs,compact:!0}),a&&a(e)||null,d&&r.createElement(Pm,{label:nn("const")+":",value:d})||null)})),Mm=r.memo(Dm);var Fm=Object.defineProperty,zm=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),Um=Object.prototype.hasOwnProperty,qm=Object.prototype.propertyIsEnumerable,Bm=(e,t,n)=>t in e?Fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Vm=class extends r.Component{constructor(){super(...arguments),this.toggle=()=>{void 0===this.props.field.expanded&&this.props.expandByDefault?this.props.field.collapse():this.props.field.toggle()},this.handleKeyPress=e=>{"Enter"===e.key&&(e.preventDefault(),this.toggle())}}render(){const{className:e="",field:t,isLast:n,expandByDefault:o}=this.props,{name:i,deprecated:a,required:s,kind:l}=t,c=!t.schema.isPrimitive&&!t.schema.isCircular,u=void 0===t.expanded?o:t.expanded,p=r.createElement(r.Fragment,null,"additionalProperties"===l&&r.createElement(pm,null,"additional property"),"patternProperties"===l&&r.createElement(pm,null,"pattern property"),s&&r.createElement(um,null,"required")),d=c?r.createElement(om,{className:a?"deprecated":"",kind:l,title:i},r.createElement(Dp,null),r.createElement("button",{onClick:this.toggle,onKeyPress:this.handleKeyPress,"aria-label":"expand properties"},r.createElement("span",{className:"property-name"},i),r.createElement(Ap,{direction:u?"down":"right"})),p):r.createElement(Np,{className:a?"deprecated":void 0,kind:l,title:i},r.createElement(Dp,null),r.createElement("span",{className:"property-name"},i),p);return r.createElement(r.Fragment,null,r.createElement("tr",{className:n?"last "+e:e},d,r.createElement(Lp,null,r.createElement(Mm,((e,t)=>{for(var n in t||(t={}))Um.call(t,n)&&Bm(e,n,t[n]);if(zm)for(var n of zm(t))qm.call(t,n)&&Bm(e,n,t[n]);return e})({},this.props)))),u&&c&&r.createElement("tr",{key:t.name+"inner"},r.createElement(Ip,{colSpan:2},r.createElement(Mp,null,r.createElement(_g,{schema:t.schema,skipReadOnly:this.props.skipReadOnly,skipWriteOnly:this.props.skipWriteOnly,showTitle:this.props.showTitle,level:this.props.level})))))}};Vm=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Vm);Object.defineProperty,Object.getOwnPropertyDescriptor;let Wm=class extends r.Component{constructor(){super(
2022-02-04 13:00:46 +03:00
padding-left: ${({theme:e})=>2*e.spacing.unit}px;
`;class rg extends r.PureComponent{render(){const e=this.props.schema,t=e.items,n=void 0===e.minItems&&void 0===e.maxItems?"":`(${ls(e)})`;return e.fields?r.createElement(Hm,tg(eg({},this.props),{level:this.props.level})):!e.displayType||t||n.length?r.createElement("div",null,r.createElement(Bp,null," Array ",n),r.createElement(ng,null,r.createElement(_g,tg(eg({},this.props),{schema:t}))),r.createElement(Vp,null)):r.createElement("div",null,r.createElement(sm,null,e.displayType))}}var og=Object.defineProperty,ig=Object.defineProperties,ag=Object.getOwnPropertyDescriptor,sg=Object.getOwnPropertyDescriptors,lg=Object.getOwnPropertySymbols,cg=Object.prototype.hasOwnProperty,ug=Object.prototype.propertyIsEnumerable,pg=(e,t,n)=>t in e?og(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dg=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?ag(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&og(t,n,i),i};let fg=class extends r.Component{constructor(){super(...arguments),this.activateOneOf=()=>{this.props.schema.activateOneOf(this.props.idx)}}render(){const{idx:e,schema:t,subSchema:n}=this.props;return r.createElement(qp,{deprecated:n.deprecated,active:e===t.activeOneOf,onClick:this.activateOneOf},n.title||n.typePrefix+n.displayType)}};fg=dg([rm],fg);let hg=class extends r.Component{render(){const{schema:{oneOf:e},schema:t}=this.props;if(void 0===e)return null;const n=e[t.activeOneOf];return r.createElement("div",null,r.createElement(Up,null," ",t.oneOfType," "),r.createElement(zp,null,e.map(((e,n)=>r.createElement(fg,{key:e.pointer,schema:t,subSchema:e,idx:n})))),r.createElement("div",null,e[t.activeOneOf].deprecated&&r.createElement(Cp,{type:"warning"},"Deprecated")),r.createElement(Em,{constraints:n.constraints}),r.createElement(_g,((e,t)=>ig(e,sg(t)))(((e,t)=>{for(var n in t||(t={}))cg.call(t,n)&&pg(e,n,t[n]);if(lg)for(var n of lg(t))ug.call(t,n)&&pg(e,n,t[n]);return e})({},this.props),{schema:n})))}};hg=dg([rm],hg);var mg=Object.defineProperty,gg=Object.defineProperties,yg=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),vg=Object.getOwnPropertySymbols,bg=Object.prototype.hasOwnProperty,wg=Object.prototype.propertyIsEnumerable,xg=(e,t,n)=>t in e?mg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kg=(e,t)=>{for(var n in t||(t={}))bg.call(t,n)&&xg(e,n,t[n]);if(vg)for(var n of vg(t))wg.call(t,n)&&xg(e,n,t[n]);return e},Og=(e,t)=>gg(e,yg(t));let _g=class extends r.Component{render(){var e;const t=this.props,{schema:n}=t,o=((e,t)=>{var n={};for(var r in e)bg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&vg)for(var r of vg(e))t.indexOf(r)<0&&wg.call(e,r)&&(n[r]=e[r]);return n})(t,["schema"]),i=(o.level||0)+1;if(!n)return r.createElement("em",null," Schema not provided ");const{type:a,oneOf:s,discriminatorProp:l,isCircular:c}=n;if(c)return r.createElement("div",null,r.createElement(sm,null,n.displayType),n.title&&r.createElement(lm,null," ",n.title," "),r.createElement(dm,null," ",nn("recursive")," "));if(void 0!==l)return s&&s.length?r.createElement(Hm,Og(kg({},o),{level:i,schema:s[n.activeOneOf],discriminator:{fieldName:l,parentSchema:n}})):(console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${n.title}`),null);if(void 0!==s)return r.createElement(hg,kg({schema:n},o));const u=Jt(a)?a:[a];if(u.includes("object")){if(null==(e=n.fields)?void 0:e.length)return r.createElement(Hm,Og(kg({},this.props),{level:i}))}else if(u.includes("array"))return r.createElement(rg,Og(kg({},this.props),{level:i}));const p={schema:n,name:"",required:!1,description:n.description,externalDocs:n.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1};return r.createElement("div",null,r.createElement(Mm,{field:p}))}};_g=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],_g);var Sg=Object.defineProperty,Eg=Object.defineProperties,Pg=Object.getOwnPropertyDescriptors,$g=Object.getOwnPropertySymbols,Ag=Object.prototype.hasOwnProperty,Cg=Object.prototype.propertyIsEnumerable,Rg=(e,t,n)=>t in e?Sg(e,t,
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.codeBlock.backgroundColor};
& > div,
& > pre {
padding: ${e=>4*e.theme.spacing.unit}px;
margin: 0;
}
& > div > pre {
padding: 0;
}
`,Ig=(We.div`
background-color: #e4e7eb;
`,We.ul`
display: inline;
list-style: none;
padding: 0;
li {
display: inherit;
&:after {
content: ',';
}
&:last-child:after {
content: none;
}
}
`,We.code`
font-size: ${e=>e.theme.typography.code.fontSize};
font-family: ${e=>e.theme.typography.code.fontFamily};
margin: 0 3px;
padding: 0.2em;
display: inline-block;
line-height: 1;
&:after {
content: ',';
font-weight: normal;
}
&:last-child:after {
content: none;
}
`),Ng=We.span`
&:after {
content: ' and ';
font-weight: normal;
}
&:last-child:after {
content: none;
}
${Pf};
`,Lg=We.span`
${e=>!e.expanded&&"white-space: nowrap;"}
&:after {
content: ' or ';
${e=>e.expanded&&"content: ' or \\a';"}
white-space: pre;
}
&:last-child:after,
&:only-child:after {
content: none;
}
${Pf};
`,Dg=We.div`
flex: 1 1 auto;
cursor: pointer;
`,Mg=We.div`
width: ${e=>e.theme.schema.defaultDetailsWidth};
text-overflow: ellipsis;
border-radius: 4px;
overflow: hidden;
${e=>e.expanded&&`background: ${e.theme.colors.gray[100]};\n padding: 8px 9.6px;\n margin: 20px 0;\n width: 100%;\n `};
${xn("small")`
margin-top: 10px;
`}
`,Fg=We(bp)`
display: inline-block;
margin: 0;
`,zg=We.div`
width: 100%;
display: flex;
margin: 1em 0;
flex-direction: ${e=>e.expanded?"column":"row"};
${xn("small")`
flex-direction: column;
`}
`,Ug=We.div`
margin: 0.5em 0;
`,qg=We.div`
border-bottom: 1px solid ${({theme:e})=>e.colors.border.dark};
margin-bottom: 1.5em;
padding-bottom: 0.7em;
h5 {
line-height: 1em;
margin: 0 0 0.6em;
font-size: ${({theme:e})=>e.typography.fontSize};
}
.redoc-markdown p:first-child {
display: inline;
}
`;function Bg({children:e,height:t}){const n=r.createRef(),[o,i]=r.useState(!1),[a,s]=r.useState(!1);return r.useEffect((()=>{n.current&&n.current.clientHeight+20<n.current.scrollHeight&&s(!0)}),[n]),r.createElement(r.Fragment,null,r.createElement(Vg,{ref:n,className:o?"":"container",style:{height:o?"auto":t}},e),r.createElement(Wg,{dimmed:!o},a&&r.createElement(Hg,{onClick:()=>{i(!o)}},o?"See less":"See more")))}const Vg=We.div`
overflow-y: hidden;
`,Wg=We.div`
text-align: center;
line-height: 1.5em;
${({dimmed:e})=>e&&"background-image: linear-gradient(to bottom, transparent,rgb(255 255 255));\n position: relative;\n top: -0.5em;\n padding-top: 0.5em;\n background-position-y: -1em;\n "}
`,Hg=We.a`
cursor: pointer;
`,Yg=r.memo((function(e){const{type:t,flow:n,RequiredScopes:o}=e,i=Object.keys((null==n?void 0:n.scopes)||{});return console.log("rended"),r.createElement(r.Fragment,null,r.createElement(Ug,null,r.createElement("b",null,"Flow type: "),r.createElement("code",null,t," ")),("implicit"===t||"authorizationCode"===t)&&r.createElement(Ug,null,r.createElement("strong",null," Authorization URL: "),r.createElement("code",null,r.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:n.authorizationUrl},n.authorizationUrl))),("password"===t||"clientCredentials"===t||"authorizationCode"===t)&&r.createElement(Ug,null,r.createElement("b",null," Token URL: "),r.createElement("code",null,n.tokenUrl)),n.refreshUrl&&r.createElement(Ug,null,r.createElement("strong",null," Refresh URL: "),n.refreshUrl),!!i.length&&r.createElement(r.Fragment,null,o||null,r.createElement(Ug,null,r.createElement("b",null," Scopes: ")),r.createElement(Bg,{height:"4em"},r.createElement("ul",null,i.map((e=>r.createElement("li",{key:e},r.createElement("code",null,e)," -"," ",r.createElement(Lf,{className:"redoc-markdown",inline:!0,source:n.scopes[e]||""}))))))))}));function Kg(e){const{RequiredScopes:t,scheme:n}=e;return r.createElement($f,null,n.apiKey?r.createElement(r.Fragment,null,r.createElement(Ug,null,r.createElement("b",null,(o=n.apiKey.in||"").charAt(0).toUpperCase()+o.slice(1)," parameter name: "),r.createElement("code",null,n.apiKey.name)),t):n.http?r.createElement(r.Fragment,null,r.createElement(Ug,null,r.createElement("b",null,"HTTP Authorization Scheme: "),r.createElement("code",null,n.http.scheme)),r.createElement(Ug,null,"bearer"===n.http.scheme&&n.http.bearerFormat&&r.createElement(r.Fragment,null,r.createElement("b",null,"Bearer format: "),r.createElement("code",null,n.http.bearerFormat))),t):n.openId?r.createElement(r.Fragment,null,r.createElement(Ug,null,r.createElement("b",null,"Connect URL: "),r.createElement("code",null,r.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:n.openId.connectUrl},n.openId.connectUrl))),t):n.flows?Object.keys(n.flows).map((e=>r.createElement(Yg,{key:e,type:e,RequiredScopes:t,flow:n.flows[e]}))):null);var o}const Gg={oauth2:"OAuth2",apiKey:"API Key",http:"HTTP",openIdConnect:"OpenID Connect"};class Qg extends r.PureComponent{render(){return this.props.securitySchemes.schemes.map((e=>r.createElement(pp,{id:e.sectionId,key:e.id},r.createElement(fp,null,r.createElement(up,null,r.createElement(yp,null,r.createElement(Ep,{to:e.sectionId}),e.displayName),r.createElement(Lf,{source:e.description||""}),r.createElement(qg,null,r.createElement(Ug,null,r.createElement("b",null,"Security Scheme Type: "),r.createElement("span",null,Gg[e.type]||e.type)),r.createElement(Kg,{scheme:e})))))))}}class Xg{constructor(e,t,n={},r=!0){var o,i,a,s;this.marker=new Ns,this.disposer=null,this.rawOptions=n,this.options=new mn(n,Zg),this.scroll=new lp(this.options),op.updateOnHistory(Ts.currentId,this.scroll),this.spec=new Fu(e,t,this.options),this.menu=new op(this.spec,this.scroll,Ts),this.options.disableSearch||(this.search=new cp,r&&this.search.indexItems(this.menu.items),this.disposer=(o=this.menu,i="activeItemIdx",Kn(a=e=>{this.updateMarkOnMenu(e.newValue)})?function(e,t,n,r){return va(e,t).observe_(n,r)}(o,i,a,s):function(e,t,n){return va(e).observe_(t,n)}(o,i,a)))}static fromJS(e){const t=new Xg(e.spec.data,e.spec.url,e.options,!1);return t.menu.activeItemIdx=e.menu.activeItemIdx||0,t.menu.activate(t.menu.flatItems[t.menu.activeItemIdx]),t.options.disableSearch||t.search.load(e.searchIndex),t}onDidMount(){this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx)}dispose(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),null!=this.disposer&&this.disposer()}toJS(){return e=this,t=null,n=function*(){return{menu:{activeItemIdx:this.menu.activeItemIdx},spec:{url:this.spec.parser.specUrl,data:this.spec.parser.spec},searchIndex:this.search?yield this.search.toJS():void 0,options:this.rawOptions}},new Promise(((r,o)=>{var i=e=>{try{s(n.next(e))}catch(e){o(e)}},a=e=>{try{s(
2022-02-04 13:00:46 +03:00
margin-top: 0;
margin-bottom: 0.5em;
${On("ApiHeader")};
`,ey=kn.a`
2022-02-04 13:00:46 +03:00
border: 1px solid ${e=>e.theme.colors.primary.main};
color: ${e=>e.theme.colors.primary.main};
font-weight: normal;
margin-left: 0.5em;
padding: 4px 8px 4px;
display: inline-block;
text-decoration: none;
cursor: pointer;
${On("DownloadButton")};
`,ty=kn.span`
2022-02-04 13:00:46 +03:00
&::before {
content: '|';
display: inline-block;
opacity: 0.5;
width: ${15}px;
text-align: center;
}
&:last-child::after {
display: none;
}
`,ny=kn.div`
2022-02-04 13:00:46 +03:00
overflow: hidden;
`,ry=kn.div`
2022-02-04 13:00:46 +03:00
display: flex;
flex-wrap: wrap;
// hide separator on new lines: idea from https://stackoverflow.com/a/31732902/1749888
margin-left: -${15}px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let oy=class extends r.Component{constructor(){super(...arguments),this.handleDownloadClick=e=>{e.target.href||(e.target.href=this.props.store.spec.info.downloadLink)}}render(){const{store:e}=this.props,{info:t,externalDocs:n}=e.spec,o=e.options.hideDownloadButton,i=t.downloadFileName,a=t.downloadLink,s=t.license&&r.createElement(ty,null,"License:"," ",t.license.identifier?t.license.identifier:r.createElement("a",{href:t.license.url},t.license.name))||null,l=t.contact&&t.contact.url&&r.createElement(ty,null,"URL: ",r.createElement("a",{href:t.contact.url},t.contact.url))||null,c=t.contact&&t.contact.email&&r.createElement(ty,null,t.contact.name||"E-mail",":"," ",r.createElement("a",{href:"mailto:"+t.contact.email},t.contact.email))||null,u=t.termsOfService&&r.createElement(ty,null,r.createElement("a",{href:t.termsOfService},"Terms of Service"))||null,p=t.version&&r.createElement("span",null,"(",t.version,")")||null;return r.createElement(pp,null,r.createElement(fp,null,r.createElement(up,{className:"api-info"},r.createElement(Jg,null,t.title," ",p),!o&&r.createElement("p",null,nn("downloadSpecification"),":",r.createElement(ey,{download:i||!0,target:"_blank",href:a,onClick:this.handleDownloadClick},nn("download"))),r.createElement($f,null,(t.license||t.contact||t.termsOfService)&&r.createElement(ny,null,r.createElement(ry,null,c," ",l," ",s," ",u))||null),r.createElement(Lf,{source:e.spec.info.summary,"data-role":"redoc-summary"}),r.createElement(Lf,{source:e.spec.info.description,"data-role":"redoc-description"}),n&&r.createElement(bm,{externalDocs:n}))))}};oy=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],oy);const iy=kn.img`
2022-02-04 13:00:46 +03:00
max-height: ${e=>e.theme.logo.maxHeight};
max-width: ${e=>e.theme.logo.maxWidth};
padding: ${e=>e.theme.logo.gutter};
width: 100%;
display: block;
`,ay=kn.div`
2022-02-04 13:00:46 +03:00
text-align: center;
`,sy=kn.a`
2022-02-04 13:00:46 +03:00
display: inline-block;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let ly=class extends r.Component{render(){const{info:e}=this.props,t=e["x-logo"];if(!t||!t.url)return null;const n=t.href||e.contact&&e.contact.url,o=t.altText?t.altText:"logo",i=r.createElement(iy,{src:t.url,alt:o});return r.createElement(ay,{style:{backgroundColor:t.backgroundColor}},n?(a=n,e=>r.createElement(sy,{href:a},e))(i):i);var a}};ly=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],ly);var cy=Object.defineProperty,uy=Object.getOwnPropertySymbols,py=Object.prototype.hasOwnProperty,dy=Object.prototype.propertyIsEnumerable,fy=(e,t,n)=>t in e?cy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hy=(e,t)=>{for(var n in t||(t={}))py.call(t,n)&&fy(e,n,t[n]);if(uy)for(var n of uy(t))dy.call(t,n)&&fy(e,n,t[n]);return e};class my extends r.Component{render(){return r.createElement(Tn,null,(e=>r.createElement(kp,null,(t=>this.renderWithOptionsAndStore(e,t)))))}renderWithOptionsAndStore(e,t){const{source:n,htmlWrap:o=(e=>e)}=this.props;if(!t)throw new Error("When using components in markdown, store prop must be provided");const i=new Cl(e).renderMdWithComponents(n);return i.length?i.map(((e,n)=>"string"==typeof e?r.cloneElement(o(r.createElement(Nf,{html:e,inline:!1,compact:!1})),{key:n}):r.createElement(e.component,hy({key:n},hy(hy({},e.props),e.propsSelector(t)))))):null}}var gy=n(4184),yy=n.n(gy);const vy=kn.span.attrs((e=>({className:`operation-type ${e.type}`})))`
2022-02-04 13:00:46 +03:00
width: 9ex;
display: inline-block;
height: ${e=>e.theme.typography.code.fontSize};
line-height: ${e=>e.theme.typography.code.fontSize};
background-color: #333;
border-radius: 3px;
background-repeat: no-repeat;
background-position: 6px 4px;
font-size: 7px;
font-family: Verdana, sans-serif; // web-safe
color: white;
text-transform: uppercase;
text-align: center;
font-weight: bold;
vertical-align: middle;
margin-right: 6px;
margin-top: 2px;
&.get {
background-color: ${e=>e.theme.colors.http.get};
}
&.post {
background-color: ${e=>e.theme.colors.http.post};
}
&.put {
background-color: ${e=>e.theme.colors.http.put};
}
&.options {
background-color: ${e=>e.theme.colors.http.options};
}
&.patch {
background-color: ${e=>e.theme.colors.http.patch};
}
&.delete {
background-color: ${e=>e.theme.colors.http.delete};
}
&.basic {
background-color: ${e=>e.theme.colors.http.basic};
}
&.link {
background-color: ${e=>e.theme.colors.http.link};
}
&.head {
background-color: ${e=>e.theme.colors.http.head};
}
&.hook {
background-color: ${e=>e.theme.colors.primary.main};
}
`;function by(e,{theme:t},n){return e>1?t.sidebar.level1Items[n]:1===e?t.sidebar.groupItems[n]:""}const wy=kn.ul`
2022-02-04 13:00:46 +03:00
margin: 0;
padding: 0;
& & {
font-size: 0.929em;
}
${e=>e.expanded?"":"display: none;"};
`,xy=kn.li`
2022-02-04 13:00:46 +03:00
list-style: none inside none;
overflow: hidden;
text-overflow: ellipsis;
padding: 0;
${e=>0===e.depth?"margin-top: 15px":""};
`,ky={0:yn`
2022-02-04 13:00:46 +03:00
opacity: 0.7;
text-transform: ${({theme:e})=>e.sidebar.groupItems.textTransform};
font-size: 0.8em;
padding-bottom: 0;
cursor: default;
`,1:yn`
2022-02-04 13:00:46 +03:00
font-size: 0.929em;
text-transform: ${({theme:e})=>e.sidebar.level1Items.textTransform};
`},Oy=kn.label.attrs((e=>({role:"menuitem",className:yy()("-depth"+e.depth,{active:e.active})})))`
2022-02-04 13:00:46 +03:00
cursor: pointer;
color: ${e=>e.active?by(e.depth,e,"activeTextColor"):e.theme.sidebar.textColor};
2022-02-04 13:00:46 +03:00
margin: 0;
padding: 12.5px ${e=>4*e.theme.spacing.unit}px;
${({depth:e,type:t,theme:n})=>"section"===t&&e>1&&"padding-left: "+8*n.spacing.unit+"px;"||""}
2022-02-04 13:00:46 +03:00
display: flex;
justify-content: space-between;
font-family: ${e=>e.theme.typography.headings.fontFamily};
${e=>ky[e.depth]};
background-color: ${e=>e.active?by(e.depth,e,"activeBackgroundColor"):e.theme.sidebar.backgroundColor};
2022-02-04 13:00:46 +03:00
${e=>e.deprecated&&Rp||""};
2022-02-04 13:00:46 +03:00
&:hover {
color: ${e=>by(e.depth,e,"activeTextColor")};
background-color: ${e=>by(e.depth,e,"activeBackgroundColor")};
2022-02-04 13:00:46 +03:00
}
${Ap} {
2022-02-04 13:00:46 +03:00
height: ${({theme:e})=>e.sidebar.arrow.size};
width: ${({theme:e})=>e.sidebar.arrow.size};
polygon {
fill: ${({theme:e})=>e.sidebar.arrow.color};
}
}
`,_y=kn.span`
2022-02-04 13:00:46 +03:00
display: inline-block;
vertical-align: middle;
width: ${e=>e.width?e.width:"auto"};
overflow: hidden;
text-overflow: ellipsis;
`,Sy=kn.div`
${({theme:e})=>`\n font-size: 0.8em;\n margin-top: ${2*e.spacing.unit}px;\n padding: 0 ${4*e.spacing.unit}px;\n text-align: left;\n\n opacity: 0.7;\n\n a,\n a:visited,\n a:hover {\n color: ${e.sidebar.textColor} !important;\n border-top: 1px solid ${St(.1,e.sidebar.backgroundColor)};\n padding: ${e.spacing.unit}px 0;\n display: block;\n }\n`};
`;class Ey extends r.PureComponent{render(){const{name:e,opened:t,className:n,onClick:o,httpVerb:i,deprecated:a}=this.props;return r.createElement(Py,{className:n,onClick:o||void 0},r.createElement(Ay,{type:i},fs(i)),r.createElement(Ap,{size:"1.5em",direction:t?"down":"right",float:"left"}),r.createElement($y,{deprecated:a},e),a?r.createElement(Cp,{type:"warning"}," ",nn("deprecated")," "):null)}}const Py=kn.button`
2022-02-04 13:00:46 +03:00
border: 0;
width: 100%;
text-align: left;
& > * {
vertical-align: middle;
}
${Ap} {
2022-02-04 13:00:46 +03:00
polygon {
fill: ${({theme:e})=>St(e.colors.tonalOffset,e.colors.gray[100])};
2022-02-04 13:00:46 +03:00
}
}
`,$y=kn.span`
2022-02-04 13:00:46 +03:00
text-decoration: ${e=>e.deprecated?"line-through":"none"};
margin-right: 8px;
`,Ay=kn(vy)`
2022-02-04 13:00:46 +03:00
margin: 0 5px 0 0;
`,Cy=kn(Ey)`
2022-02-04 13:00:46 +03:00
padding: 10px;
border-radius: 2px;
margin-bottom: 4px;
line-height: 1.5em;
background-color: ${({theme:e})=>e.colors.gray[100]};
cursor: pointer;
outline-color: ${({theme:e})=>St(e.colors.tonalOffset,e.colors.gray[100])};
`,Ry=kn.div`
2022-02-04 13:00:46 +03:00
padding: 10px 25px;
background-color: ${({theme:e})=>e.colors.gray[50]};
margin-bottom: 5px;
margin-top: 5px;
`;class jy extends r.PureComponent{constructor(){super(...arguments),this.selectElement=()=>{Vf.selectElement(this.child)}}render(){const{children:e}=this.props;return r.createElement("div",{ref:e=>this.child=e,onClick:this.selectElement,onFocus:this.selectElement,tabIndex:0,role:"button"},e)}}const Ty=kn.div`
2022-02-04 13:00:46 +03:00
cursor: pointer;
position: relative;
margin-bottom: 5px;
`,Iy=kn.span`
2022-02-04 13:00:46 +03:00
font-family: ${e=>e.theme.typography.code.fontFamily};
margin-left: 10px;
flex: 1;
overflow-x: hidden;
text-overflow: ellipsis;
`,Ny=kn.button`
2022-02-04 13:00:46 +03:00
outline: 0;
color: inherit;
width: 100%;
text-align: left;
cursor: pointer;
padding: 10px 30px 10px ${e=>e.inverted?"10px":"20px"};
border-radius: ${e=>e.inverted?"0":"4px 4px 0 0"};
background-color: ${e=>e.inverted?"transparent":e.theme.codeBlock.backgroundColor};
display: flex;
white-space: nowrap;
align-items: center;
border: ${e=>e.inverted?"0":"1px solid transparent"};
border-bottom: ${e=>e.inverted?"1px solid #ccc":"0"};
transition: border-color 0.25s ease;
${e=>e.expanded&&!e.inverted&&`border-color: ${e.theme.colors.border.dark};`||""}
.${Iy} {
2022-02-04 13:00:46 +03:00
color: ${e=>e.inverted?e.theme.colors.text.primary:"#ffffff"};
}
&:focus {
box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25);
}
`,Ly=kn.span.attrs((e=>({className:`http-verb ${e.type}`})))`
2022-02-04 13:00:46 +03:00
font-size: ${e=>e.compact?"0.8em":"0.929em"};
line-height: ${e=>e.compact?"18px":"20px"};
background-color: ${e=>e.theme.colors.http[e.type]||"#999999"};
color: #ffffff;
padding: ${e=>e.compact?"2px 8px":"3px 10px"};
text-transform: uppercase;
font-family: ${e=>e.theme.typography.headings.fontFamily};
margin: 0;
`,Dy=kn.div`
2022-02-04 13:00:46 +03:00
position: absolute;
width: 100%;
z-index: 100;
background: #fafafa;
color: #263238;
box-sizing: border-box;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.33);
overflow: hidden;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
transition: all 0.25s ease;
visibility: hidden;
${e=>e.expanded?"visibility: visible;":"transform: translateY(-50%) scaleY(0);"}
`,My=kn.div`
2022-02-04 13:00:46 +03:00
padding: 10px;
`,Fy=kn.div`
2022-02-04 13:00:46 +03:00
padding: 5px;
border: 1px solid #ccc;
background: #fff;
word-break: break-all;
color: ${e=>e.theme.colors.primary.main};
> span {
color: ${e=>e.theme.colors.text.primary};
}
`;class zy extends r.Component{constructor(e){super(e),this.toggle=()=>{this.setState({expanded:!this.state.expanded})},this.state={expanded:!1}}render(){const{operation:e,inverted:t,hideHostname:n}=this.props,{expanded:o}=this.state;return r.createElement(Rn.Consumer,null,(i=>r.createElement(Ty,null,r.createElement(Ny,{onClick:this.toggle,expanded:o,inverted:t},r.createElement(Ly,{type:e.httpVerb,compact:this.props.compact},e.httpVerb),r.createElement(Iy,null,e.path),r.createElement(Ap,{float:"right",color:t?"black":"white",size:"20px",direction:o?"up":"down",style:{marginRight:"-25px"}})),r.createElement(Dy,{expanded:o,"aria-hidden":!o},e.servers.map((t=>{const o=i.expandDefaultServerVariables?function(e,t={}){return e.replace(/(?:{)([\w-.]+)(?:})/g,((e,n)=>t[n]&&t[n].default||e))}(t.url,t.variables):t.url,a=function(e){try{return Xt(e).pathname}catch(t){return e}}(o);return r.createElement(My,{key:o},r.createElement(Lf,{source:t.description||"",compact:!0}),r.createElement(jy,null,r.createElement(Fy,null,r.createElement("span",null,n||i.hideHostname?"/"===a?"":a:o),e.path)))}))))))}}class Uy extends r.PureComponent{render(){const{place:e,parameters:t}=this.props;return t&&t.length?r.createElement("div",{key:e},r.createElement(bp,null,e," Parameters"),r.createElement(Fp,null,r.createElement("tbody",null,Bt(t,((e,t)=>r.createElement(Vm,{key:e.name,isLast:t,field:e,showExamples:!0})))))):null}}Object.defineProperty,Object.getOwnPropertyDescriptor;let qy=class extends r.Component{constructor(){super(...arguments),this.switchMedia=({idx:e})=>{this.props.content&&void 0!==e&&this.props.content.activate(e)}}render(){const{content:e}=this.props;if(!e||!e.mediaTypes||!e.mediaTypes.length)return null;const t=e.activeMimeIdx,n=e.mediaTypes.map(((e,t)=>({value:e.name,idx:t}))),o=({children:e})=>this.props.withLabel?r.createElement(uh,null,r.createElement(ch,null,"Content type"),e):e;return r.createElement(r.Fragment,null,r.createElement(o,null,this.props.renderDropdown({value:n[t].value,options:n,onChange:this.switchMedia,ariaLabel:"Content type"})),this.props.children(e.active))}};qy=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],qy);var By=Object.defineProperty,Vy=Object.getOwnPropertySymbols,Wy=Object.prototype.hasOwnProperty,Hy=Object.prototype.propertyIsEnumerable,Yy=(e,t,n)=>t in e?By(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Ky=["path","query","cookie","header"];class Gy extends r.PureComponent{orderParams(e){const t={};return e.forEach((e=>{var n,r,o;o=e,(n=t)[r=e.in]||(n[r]=[]),n[r].push(o)})),t}render(){const{body:e,parameters:t=[]}=this.props;if(void 0===e&&void 0===t)return null;const n=this.orderParams(t),o=t.length>0?Ky:[],i=e&&e.content,a=e&&e.description;return r.createElement(r.Fragment,null,o.map((e=>r.createElement(Uy,{key:e,place:e,parameters:n[e]}))),i&&r.createElement(Xy,{content:i,description:a}))}}function Qy(e){return r.createElement(bp,{key:"header"},"Request Body schema: ",r.createElement(Sf,((e,t)=>{for(var n in t||(t={}))Wy.call(t,n)&&Yy(e,n,t[n]);if(Vy)for(var n of Vy(t))Hy.call(t,n)&&Yy(e,n,t[n]);return e})({},e)))}function Xy(e){const{content:t,description:n}=e,{isRequestType:o}=t;return r.createElement(qy,{content:t,renderDropdown:Qy},(({schema:e})=>r.createElement(r.Fragment,null,void 0!==n&&r.createElement(Lf,{source:n}),"object"===(null==e?void 0:e.type)&&r.createElement(Em,{constraints:(null==e?void 0:e.constraints)||[]}),r.createElement(_g,{skipReadOnly:o,skipWriteOnly:!o,key:"schema",schema:e}))))}const Zy=kn(r.memo((function({title:e,type:t,empty:n,code:o,opened:i,className:a,onClick:s}){return r.createElement("button",{className:a,onClick:!n&&s||void 0,"aria-expanded":i,disabled:n},!n&&r.createElement(Ap,{size:"1.5em",color:t,direction:i?"down":"right",float:"left"}),r.createElement(tv,null,o," "),r.createElement(Lf,{compact:!0,inline:!0,source:e}))})))`
2022-02-04 13:00:46 +03:00
display: block;
border: 0;
width: 100%;
text-align: left;
padding: 10px;
border-radius: 2px;
margin-bottom: 4px;
line-height: 1.5em;
cursor: pointer;
color: ${e=>e.theme.colors.responses[e.type].color};
background-color: ${e=>e.theme.colors.responses[e.type].backgroundColor};
&:focus {
outline: auto ${e=>e.theme.colors.responses[e.type].color};
}
${e=>e.empty?'\ncursor: default;\n&::before {\n content: "—";\n font-weight: bold;\n width: 1.5em;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n}\n&:focus {\n outline: 0;\n}\n':""};
`,Jy=kn.div`
2022-02-04 13:00:46 +03:00
padding: 10px;
`,ev=kn(bp.withComponent("caption"))`
2022-02-04 13:00:46 +03:00
text-align: left;
margin-top: 1em;
caption-side: top;
`,tv=kn.strong`
2022-02-04 13:00:46 +03:00
vertical-align: top;
`;class nv extends r.PureComponent{render(){const{headers:e}=this.props;return void 0===e||0===e.length?null:r.createElement(Fp,null,r.createElement(ev,null," Response Headers "),r.createElement("tbody",null,Bt(e,((e,t)=>r.createElement(Vm,{isLast:t,key:e.name,field:e,showExamples:!0})))))}}var rv=Object.defineProperty,ov=Object.getOwnPropertySymbols,iv=Object.prototype.hasOwnProperty,av=Object.prototype.propertyIsEnumerable,sv=(e,t,n)=>t in e?rv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class lv extends r.PureComponent{constructor(){super(...arguments),this.renderDropdown=e=>r.createElement(bp,{key:"header"},"Response Schema: ",r.createElement(Sf,((e,t)=>{for(var n in t||(t={}))iv.call(t,n)&&sv(e,n,t[n]);if(ov)for(var n of ov(t))av.call(t,n)&&sv(e,n,t[n]);return e})({},e)))}render(){const{description:e,extensions:t,headers:n,content:o}=this.props.response;return r.createElement(r.Fragment,null,e&&r.createElement(Lf,{source:e}),r.createElement(Om,{extensions:t}),r.createElement(nv,{headers:n}),r.createElement(qy,{content:o,renderDropdown:this.renderDropdown},(({schema:e})=>r.createElement(r.Fragment,null,"object"===(null==e?void 0:e.type)&&r.createElement(Em,{constraints:(null==e?void 0:e.constraints)||[]}),r.createElement(_g,{skipWriteOnly:!0,key:"schema",schema:e})))))}}const cv=rm((({response:e})=>{const{extensions:t,headers:n,type:o,summary:i,description:a,code:s,expanded:l,content:c}=e,u=r.useMemo((()=>void 0===c?[]:c.mediaTypes.filter((e=>void 0!==e.schema))),[c]),p=r.useMemo((()=>!(t&&0!==Object.keys(t).length||0!==n.length||0!==u.length||a)),[t,n,u,a]);return r.createElement("div",null,r.createElement(Zy,{onClick:()=>e.toggle(),type:o,empty:p,title:i||"",code:s,opened:l}),l&&!p&&r.createElement(Jy,null,r.createElement(lv,{response:e})))})),uv=kn.h3`
2022-02-04 13:00:46 +03:00
font-size: 1.3em;
padding: 0.2em 0;
margin: 3em 0 1.1em;
color: ${({theme:e})=>e.colors.text.primary};
font-weight: normal;
`;class pv extends r.PureComponent{render(){const{responses:e,isCallback:t}=this.props;return e&&0!==e.length?r.createElement("div",null,r.createElement(uv,null,nn(t?"callbackResponses":"responses")),e.map((e=>r.createElement(cv,{key:e.code,response:e})))):null}}function dv(e){const{security:t,showSecuritySchemeType:n,expanded:o}=e,i=t.schemes.length>1;return r.createElement(Lg,{expanded:o},i&&"(",t.schemes.map((e=>r.createElement(Ng,{key:e.id},n&&`${Gg[e.type]||e.type}: `,r.createElement("i",null,e.displayName),o&&e.scopes.length?[" (",e.scopes.map((e=>r.createElement(Ig,{key:e},e))),") "]:null))),i&&") ")}const fv=({scopes:e})=>e.length?r.createElement("div",null,r.createElement("b",null,"Required scopes: "),e.map(((e,t)=>r.createElement(r.Fragment,{key:t},r.createElement("code",null,e)," ")))):null;function hv(e){const t=(0,r.useContext)(wp),n=null==t?void 0:t.options.showSecuritySchemeType,[o,i]=(0,r.useState)(!1),{securities:a}=e;if(!(null==a?void 0:a.length)||(null==t?void 0:t.options.hideSecuritySection))return null;const s=null==t?void 0:t.spec.securitySchemes.schemes.filter((({id:e})=>a.find((t=>t.schemes.find((t=>t.id===e))))));return r.createElement(r.Fragment,null,r.createElement(zg,{expanded:o},r.createElement(Dg,{onClick:()=>i(!o)},r.createElement(Fg,null,"Authorizations:"),r.createElement(Ap,{size:"1.3em",direction:o?"down":"right"})),r.createElement(Mg,{expanded:o},a.map(((e,t)=>r.createElement(dv,{key:t,expanded:o,showSecuritySchemeType:n,security:e}))))),o&&(null==s?void 0:s.length)&&s.map(((e,t)=>r.createElement(qg,{key:t},r.createElement("h5",null,r.createElement(mv,null)," ",Gg[e.type]||e.type,": ",e.id),r.createElement(Lf,{source:e.description||""}),r.createElement(Kg,{key:e.id,scheme:e,RequiredScopes:r.createElement(fv,{scopes:gv(e.id,a)})})))))}const mv=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"11",height:"11"},r.createElement("path",{fill:"currentColor",d:"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z"}));function gv(e,t){const n=[];let r=t.length;for(;r--;){const o=t[r];let i=o.schemes.length;for(;i--;){const t=o.schemes[i];t.id===e&&n.push(...t.scopes)}}return Array.from(new Set(n))}Object.defineProperty,Object.getOwnPropertyDescriptor;let yv=class extends r.Component{render(){const{operation:e}=this.props,{description:t,externalDocs:n}=e,o=!(!t&&!n);return r.createElement(Ry,null,o&&r.createElement(vv,null,void 0!==t&&r.createElement(Lf,{source:t}),n&&r.createElement(bm,{externalDocs:n})),r.createElement(zy,{operation:this.props.operation,inverted:!0,compact:!0}),r.createElement(Om,{extensions:e.extensions}),r.createElement(hv,{securities:e.security}),r.createElement(Gy,{parameters:e.parameters,body:e.requestBody}),r.createElement(pv,{responses:e.responses,isCallback:e.isCallback}))}};yv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],yv);const vv=kn.div`
2022-02-04 13:00:46 +03:00
margin-bottom: ${({theme:e})=>3*e.spacing.unit}px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let bv=class extends r.Component{constructor(){super(...arguments),this.toggle=()=>{this.props.callbackOperation.toggle()}}render(){const{name:e,expanded:t,httpVerb:n,deprecated:o}=this.props.callbackOperation;return r.createElement(r.Fragment,null,r.createElement(Cy,{onClick:this.toggle,name:e,opened:t,httpVerb:n,deprecated:o}),t&&r.createElement(yv,{operation:this.props.callbackOperation}))}};bv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],bv);class wv extends r.PureComponent{render(){const{callbacks:e}=this.props;return e&&0!==e.length?r.createElement("div",null,r.createElement(xv,null," Callbacks "),e.map((e=>e.operations.map(((t,n)=>r.createElement(bv,{key:`${e.name}_${n}`,callbackOperation:t})))))):null}}const xv=kn.h3`
2022-02-04 13:00:46 +03:00
font-size: 1.3em;
padding: 0.2em 0;
margin: 3em 0 1.1em;
color: ${({theme:e})=>e.colors.text.primary};
font-weight: normal;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let kv=class extends r.Component{constructor(e){super(e),this.switchItem=({idx:e})=>{this.props.items&&void 0!==e&&this.setState({activeItemIdx:e})},this.state={activeItemIdx:0}}render(){const{items:e}=this.props;if(!e||!e.length)return null;const t=({children:e})=>this.props.label?r.createElement(uh,null,r.createElement(ch,null,this.props.label),e):e;return r.createElement(r.Fragment,null,r.createElement(t,null,this.props.renderDropdown({value:this.props.options[this.state.activeItemIdx].value,options:this.props.options,onChange:this.switchItem,ariaLabel:this.props.label||"Callback"})),this.props.children(e[this.state.activeItemIdx]))}};kv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],kv);var Ov=Object.defineProperty,_v=Object.defineProperties,Sv=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Ev=Object.getOwnPropertySymbols,Pv=Object.prototype.hasOwnProperty,$v=Object.prototype.propertyIsEnumerable,Av=(e,t,n)=>t in e?Ov(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Cv=class extends r.Component{constructor(){super(...arguments),this.renderDropdown=e=>{return r.createElement(Sf,(t=((e,t)=>{for(var n in t||(t={}))Pv.call(t,n)&&Av(e,n,t[n]);if(Ev)for(var n of Ev(t))$v.call(t,n)&&Av(e,n,t[n]);return e})({Label:lh,Dropdown:ph},e),_v(t,Sv({variant:"dark"}))));var t}}render(){const e=this.props.content;return void 0===e?null:r.createElement(qy,{content:e,renderDropdown:this.renderDropdown,withLabel:!0},(e=>r.createElement(fh,{key:"samples",mediaType:e,renderDropdown:this.renderDropdown})))}};Cv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Cv);class Rv extends r.Component{render(){const e=this.props.callback.codeSamples.find((e=>au(e)));return e?r.createElement(jv,null,r.createElement(Cv,{content:e.requestBodyContent})):null}}const jv=kn.div`
2022-02-04 13:00:46 +03:00
margin-top: 15px;
`;var Tv=Object.defineProperty,Iv=Object.defineProperties,Nv=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Lv=Object.getOwnPropertySymbols,Dv=Object.prototype.hasOwnProperty,Mv=Object.prototype.propertyIsEnumerable,Fv=(e,t,n)=>t in e?Tv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let zv=class extends r.Component{constructor(){super(...arguments),this.renderDropdown=e=>{return r.createElement(Sf,(t=((e,t)=>{for(var n in t||(t={}))Dv.call(t,n)&&Fv(e,n,t[n]);if(Lv)for(var n of Lv(t))Mv.call(t,n)&&Fv(e,n,t[n]);return e})({Label:lh,Dropdown:ph},e),Iv(t,Nv({variant:"dark"}))));var t}}render(){const{callbacks:e}=this.props;if(!e||0===e.length)return null;const t=e.map((e=>e.operations.map((e=>e)))).reduce(((e,t)=>e.concat(t)),[]);if(!t.some((e=>e.codeSamples.length>0)))return null;const n=t.map(((e,t)=>({value:`${e.httpVerb.toUpperCase()}: ${e.name}`,idx:t})));return r.createElement("div",null,r.createElement(vp,null," Callback payload samples "),r.createElement(Uv,null,r.createElement(kv,{items:t,renderDropdown:this.renderDropdown,label:"Callback",options:n},(e=>r.createElement(Rv,{key:"callbackPayloadSample",callback:e,renderDropdown:this.renderDropdown})))))}};zv.contextType=Rn,zv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],zv);const Uv=kn.div`
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.codeBlock.backgroundColor};
padding: ${e=>4*e.theme.spacing.unit}px;
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let qv=class extends r.Component{render(){const{operation:e}=this.props,t=e.codeSamples,n=t.length>0,o=1===t.length&&this.context.hideSingleRequestSampleTab;return n&&r.createElement("div",null,r.createElement(vp,null," ",nn("requestSamples")," "),r.createElement(kd,{defaultIndex:0},r.createElement(hd,{hidden:o},t.map((e=>r.createElement(vd,{key:e.lang+"_"+(e.label||"")},void 0!==e.label?e.label:e.lang)))),t.map((e=>r.createElement(xd,{key:e.lang+"_"+(e.label||"")},au(e)?r.createElement("div",null,r.createElement(Cv,{content:e.requestBodyContent})):r.createElement(oh,{lang:e.lang,source:e.source}))))))||null}};qv.contextType=Rn,qv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],qv);Object.defineProperty,Object.getOwnPropertyDescriptor;let Bv=class extends r.Component{render(){const{operation:e}=this.props,t=e.responses.filter((e=>e.content&&e.content.hasSample));return t.length>0&&r.createElement("div",null,r.createElement(vp,null," ",nn("responseSamples")," "),r.createElement(kd,{defaultIndex:0},r.createElement(hd,null,t.map((e=>r.createElement(vd,{className:"tab-"+e.type,key:e.code},e.code)))),t.map((e=>r.createElement(xd,{key:e.code},r.createElement("div",null,r.createElement(Cv,{content:e.content})))))))||null}};Bv=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Bv);var Vv=Object.defineProperty,Wv=Object.defineProperties,Hv=Object.getOwnPropertyDescriptors,Yv=Object.getOwnPropertySymbols,Kv=Object.prototype.hasOwnProperty,Gv=Object.prototype.propertyIsEnumerable,Qv=(e,t,n)=>t in e?Vv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Xv=kn.div`
2022-02-04 13:00:46 +03:00
margin-bottom: ${({theme:e})=>6*e.spacing.unit}px;
`,Zv=rm((({operation:e})=>{const{name:t,description:n,deprecated:o,externalDocs:i,isWebhook:a,httpVerb:s}=e,l=!(!n&&!i),{showWebhookVerb:c}=r.useContext(Rn);return r.createElement(Rn.Consumer,null,(u=>r.createElement(fp,((e,t)=>Wv(e,Hv(t)))(((e,t)=>{for(var n in t||(t={}))Kv.call(t,n)&&Qv(e,n,t[n]);if(Yv)for(var n of Yv(t))Gv.call(t,n)&&Qv(e,n,t[n]);return e})({},{[rp]:e.operationHash}),{id:e.operationHash}),r.createElement(up,null,r.createElement(yp,null,r.createElement(Ep,{to:e.id}),t," ",o&&r.createElement(Cp,{type:"warning"}," Deprecated "),a&&r.createElement(Cp,{type:"primary"}," ","Webhook ",c&&s&&"| "+s.toUpperCase())),u.pathInMiddlePanel&&!a&&r.createElement(zy,{operation:e,inverted:!0}),l&&r.createElement(Xv,null,void 0!==n&&r.createElement(Lf,{source:n}),i&&r.createElement(bm,{externalDocs:i})),r.createElement(Om,{extensions:e.extensions}),r.createElement(hv,{securities:e.security}),r.createElement(Gy,{parameters:e.parameters,body:e.requestBody}),r.createElement(pv,{responses:e.responses}),r.createElement(wv,{callbacks:e.callbacks})),r.createElement(dp,null,!u.pathInMiddlePanel&&!a&&r.createElement(zy,{operation:e}),r.createElement(qv,{operation:e}),r.createElement(Bv,{operation:e}),r.createElement(zv,{callbacks:e.callbacks})))))}));var Jv=Object.defineProperty,eb=Object.getOwnPropertyDescriptor,tb=Object.getOwnPropertySymbols,nb=Object.prototype.hasOwnProperty,rb=Object.prototype.propertyIsEnumerable,ob=(e,t,n)=>t in e?Jv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ib=(e,t)=>{for(var n in t||(t={}))nb.call(t,n)&&ob(e,n,t[n]);if(tb)for(var n of tb(t))rb.call(t,n)&&ob(e,n,t[n]);return e},ab=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?eb(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Jv(t,n,i),i};let sb=class extends r.Component{render(){const e=this.props.items;return 0===e.length?null:e.map((e=>r.createElement(lb,{key:e.id,item:e})))}};sb=ab([rm],sb);let lb=class extends r.Component{render(){const e=this.props.item;let t;const{type:n}=e;switch(n){case"group":t=null;break;case"tag":case"section":t=r.createElement(ub,ib({},this.props));break;case"operation":t=r.createElement(pb,{item:e});break;default:t=r.createElement(ub,ib({},this.props))}return r.createElement(r.Fragment,null,t&&r.createElement(pp,{id:e.id,underlined:"operation"===e.type},t),e.items&&r.createElement(sb,{items:e.items}))}};lb=ab([rm],lb);const cb=e=>r.createElement(up,{compact:!0},e);let ub=class extends r.Component{render(){const{name:e,description:t,externalDocs:n,level:o}=this.props.item,i=2===o?yp:gp;return r.createElement(r.Fragment,null,r.createElement(fp,null,r.createElement(up,{compact:!1},r.createElement(i,null,r.createElement(Ep,{to:this.props.item.id}),e))),r.createElement(my,{source:t||"",htmlWrap:cb}),n&&r.createElement(fp,null,r.createElement(up,null,r.createElement(bm,{externalDocs:n}))))}};ub=ab([rm],ub);let pb=class extends r.Component{render(){return r.createElement(Zv,{operation:this.props.item})}};pb=ab([rm],pb);var db=Object.defineProperty,fb=Object.defineProperties,hb=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),mb=Object.getOwnPropertySymbols,gb=Object.prototype.hasOwnProperty,yb=Object.prototype.propertyIsEnumerable,vb=(e,t,n)=>t in e?db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let bb=class extends r.Component{constructor(){super(...arguments),this.ref=r.createRef(),this.activate=e=>{this.props.onActivate(this.props.item),e.stopPropagation()}}componentDidMount(){this.scrollIntoViewIfActive()}componentDidUpdate(){this.scrollIntoViewIfActive()}scrollIntoViewIfActive(){this.props.item.active&&this.ref.current&&zt(this.ref.current)}render(){const{item:e,withoutChildren:t}=this.props;return r.createElement(xy,{onClick:this.activate,depth:e.depth,"data-item-id":e.id},"operation"===e.type?r.createElement(wb,((e,t)=>fb(e,hb(t)))(((e,t)=>{for(var n in t||(t={}))gb.call(t,n)&&vb(e,n,t[n]);if(mb)for(var n of mb(t))yb.call(t,n)&&vb(e,n,t[n]);return e})({},this.props),{item:e})):r.createElement(Oy,{depth:e.depth,active:e.active,type:e.type,ref:th
2022-02-04 13:00:46 +03:00
user-select: none;
width: 20px;
height: 20px;
align-self: center;
display: flex;
flex-direction: column;
color: ${e=>e.theme.colors.primary.main};
`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Rb;Mt&&(Rb=n(5114));const jb=Rb&&Rb(),Tb=kn.div`
2022-02-04 13:00:46 +03:00
width: ${e=>e.theme.sidebar.width};
background-color: ${e=>e.theme.sidebar.backgroundColor};
overflow: hidden;
display: flex;
flex-direction: column;
backface-visibility: hidden;
/* contain: strict; TODO: breaks layout since Chrome 80*/
height: 100vh;
position: sticky;
position: -webkit-sticky;
top: 0;
${xn("small")`
2022-02-04 13:00:46 +03:00
position: fixed;
z-index: 20;
width: 100%;
background: ${({theme:e})=>e.sidebar.backgroundColor};
display: ${e=>e.open?"flex":"none"};
`};
@media print {
display: none;
}
`,Ib=kn.div`
2022-02-04 13:00:46 +03:00
outline: none;
user-select: none;
background-color: ${({theme:e})=>e.fab.backgroundColor};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.colors.primary.main};
display: none;
cursor: pointer;
position: fixed;
right: 20px;
z-index: 100;
border-radius: 50%;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
${xn("small")`
2022-02-04 13:00:46 +03:00
display: flex;
`};
bottom: 44px;
width: 60px;
height: 60px;
padding: 0 20px;
svg {
color: ${({theme:e})=>e.fab.color};
}
2022-02-04 13:00:46 +03:00
@media print {
display: none;
}
`;let Nb=class extends r.Component{constructor(){super(...arguments),this.state={offsetTop:"0px"},this.toggleNavMenu=()=>{this.props.menu.toggleSidebar()}}componentDidMount(){jb&&jb.add(this.stickyElement),this.setState({offsetTop:this.getScrollYOffset(this.context)})}componentWillUnmount(){jb&&jb.remove(this.stickyElement)}getScrollYOffset(e){let t;return t=void 0!==this.props.scrollYOffset?mn.normalizeScrollYOffset(this.props.scrollYOffset)():e.scrollYOffset(),t+"px"}render(){const e=this.props.menu.sideBarOpened,t=this.state.offsetTop;return r.createElement(r.Fragment,null,r.createElement(Tb,{open:e,className:this.props.className,style:{top:t,height:`calc(100vh - ${t})`},ref:e=>{this.stickyElement=e}},this.props.children),!this.context.hideFab&&r.createElement(Ib,{onClick:this.toggleNavMenu},r.createElement($b,{open:e})))}};Nb.contextType=Rn,Nb=((e,t,n,r)=>{for(var o,i=t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(i)||i);return i})([rm],Nb);const Lb=kn.div`
2022-02-04 13:00:46 +03:00
${({theme:e})=>`\n font-family: ${e.typography.fontFamily};\n font-size: ${e.typography.fontSize};\n font-weight: ${e.typography.fontWeightRegular};\n line-height: ${e.typography.lineHeight};\n color: ${e.colors.text.primary};\n display: flex;\n position: relative;\n text-align: left;\n\n -webkit-font-smoothing: ${e.typography.smoothing};\n font-smoothing: ${e.typography.smoothing};\n ${e.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":""};\n\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n`};
`,Db=kn.div`
2022-02-04 13:00:46 +03:00
z-index: 1;
position: relative;
overflow: hidden;
width: calc(100% - ${e=>e.theme.sidebar.width});
${xn("small",!0)`
2022-02-04 13:00:46 +03:00
width: 100%;
`};
contain: layout;
`,Mb=kn.div`
2022-02-04 13:00:46 +03:00
background: ${({theme:e})=>e.rightPanel.backgroundColor};
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: ${({theme:e})=>{if(e.rightPanel.width.endsWith("%")){const t=parseInt(e.rightPanel.width,10);return`calc((100% - ${e.sidebar.width}) * ${t/100})`}return e.rightPanel.width}};
${xn("medium",!0)`
2022-02-04 13:00:46 +03:00
display: none;
`};
`,Fb=kn.div`
2022-02-04 13:00:46 +03:00
padding: 5px 0;
`,zb=kn.input.attrs((()=>({className:"search-input"})))`
2022-02-04 13:00:46 +03:00
width: calc(100% - ${e=>8*e.theme.spacing.unit}px);
box-sizing: border-box;
margin: 0 ${e=>4*e.theme.spacing.unit}px;
padding: 5px ${e=>2*e.theme.spacing.unit}px 5px
${e=>4*e.theme.spacing.unit}px;
border: 0;
border-bottom: 1px solid
${({theme:e})=>($t(e.sidebar.backgroundColor)>.5?St:Ct)(.1,e.sidebar.backgroundColor)};
2022-02-04 13:00:46 +03:00
font-family: ${({theme:e})=>e.typography.fontFamily};
font-weight: bold;
font-size: 13px;
color: ${e=>e.theme.sidebar.textColor};
background-color: transparent;
outline: none;
`,Ub=kn((e=>r.createElement("svg",{className:e.className,version:"1.1",viewBox:"0 0 1000 1000",x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px"},r.createElement("path",{d:"M968.2,849.4L667.3,549c83.9-136.5,66.7-317.4-51.7-435.6C477.1-25,252.5-25,113.9,113.4c-138.5,138.3-138.5,362.6,0,501C219.2,730.1,413.2,743,547.6,666.5l301.9,301.4c43.6,43.6,76.9,14.9,104.2-12.4C981,928.3,1011.8,893,968.2,849.4z M524.5,522c-88.9,88.7-233,88.7-321.8,0c-88.9-88.7-88.9-232.6,0-321.3c88.9-88.7,233-88.7,321.8,0C613.4,289.4,613.4,433.3,524.5,522z"})))).attrs({className:"search-icon"})`
2022-02-04 13:00:46 +03:00
position: absolute;
left: ${e=>4*e.theme.spacing.unit}px;
height: 1.8em;
width: 0.9em;
path {
fill: ${e=>e.theme.sidebar.textColor};
}
`,qb=kn.div`
2022-02-04 13:00:46 +03:00
padding: ${e=>e.theme.spacing.unit}px 0;
background-color: ${({theme:e})=>St(.05,e.sidebar.backgroundColor)}};
2022-02-04 13:00:46 +03:00
color: ${e=>e.theme.sidebar.textColor};
min-height: 150px;
max-height: 250px;
border-top: ${({theme:e})=>St(.1,e.sidebar.backgroundColor)}};
border-bottom: ${({theme:e})=>St(.1,e.sidebar.backgroundColor)}};
2022-02-04 13:00:46 +03:00
margin-top: 10px;
line-height: 1.4;
font-size: 0.9em;
li {
background-color: inherit;
}
${Oy} {
2022-02-04 13:00:46 +03:00
padding-top: 6px;
padding-bottom: 6px;
&:hover,
&.active {
background-color: ${({theme:e})=>St(.1,e.sidebar.backgroundColor)};
2022-02-04 13:00:46 +03:00
}
> svg {
display: none;
}
}
`,Bb=kn.i`
2022-02-04 13:00:46 +03:00
position: absolute;
display: inline-block;
width: ${e=>2*e.theme.spacing.unit}px;
text-align: center;
right: ${e=>4*e.theme.spacing.unit}px;
line-height: 2em;
vertical-align: middle;
margin-right: 2px;
cursor: pointer;
font-style: normal;
color: '#666';
`;var Vb=Object.defineProperty,Wb=Object.getOwnPropertyDescriptor;class Hb extends r.PureComponent{constructor(e){super(e),this.activeItemRef=null,this.clear=()=>{this.setState({results:[],noResults:!1,term:"",activeItemIdx:-1}),this.props.marker.unmark()},this.handleKeyDown=e=>{if(27===e.keyCode&&this.clear(),40===e.keyCode&&(this.setState({activeItemIdx:Math.min(this.state.activeItemIdx+1,this.state.results.length-1)}),e.preventDefault()),38===e.keyCode&&(this.setState({activeItemIdx:Math.max(0,this.state.activeItemIdx-1)}),e.preventDefault()),13===e.keyCode){const e=this.state.results[this.state.activeItemIdx];if(e){const t=this.props.getItemById(e.meta);t&&this.props.onActivate(t)}}},this.search=e=>{const{minCharacterLengthToInitSearch:t}=this.context,n=e.target.value;n.length<t?this.clearResults(n):this.setState({term:n},(()=>this.searchCallback(this.state.term)))},this.state={results:[],noResults:!1,term:"",activeItemIdx:-1}}clearResults(e){this.setState({results:[],noResults:!1,term:e}),this.props.marker.unmark()}setResults(e,t){this.setState({results:e,noResults:0===e.length}),this.props.marker.mark(t)}searchCallback(e){this.props.search.search(e).then((t=>{this.setResults(t,e)}))}render(){const{activeItemIdx:e}=this.state,t=this.state.results.map((e=>({item:this.props.getItemById(e.meta),score:e.score})));return t.sort(((e,t)=>t.score-e.score)),r.createElement(Fb,{role:"search"},this.state.term&&r.createElement(Bb,{onClick:this.clear},"×"),r.createElement(Ub,null),r.createElement(zb,{value:this.state.term,onKeyDown:this.handleKeyDown,placeholder:"Search...","aria-label":"Search",type:"text",onChange:this.search}),t.length>0&&r.createElement(hf,{options:{wheelPropagation:!1}},r.createElement(qb,{"data-role":"search:results"},t.map(((t,n)=>r.createElement(bb,{item:Object.create(t.item,{active:{value:n===e}}),onActivate:this.props.onActivate,withoutChildren:!0,key:t.item.id,"data-role":"search:result"}))))),this.state.term&&this.state.noResults?r.createElement(qb,{"data-role":"search:results"},nn("noResultsFound")):null)}}Hb.contextType=Rn,((e,t,n,r)=>{for(var o,i=Wb(t,n),a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);i&&Vb(t,n,i)})([Aa.bind,(0,Aa.debounce)(400)],Hb.prototype,"searchCallback");class Yb extends r.Component{componentDidMount(){this.props.store.onDidMount()}componentWillUnmount(){this.props.store.dispose()}render(){const{store:{spec:e,menu:t,options:n,search:o,marker:i}}=this.props,a=this.props.store;return r.createElement(wn,{theme:n.theme},r.createElement(xp,{value:a},r.createElement(jn,{value:n},r.createElement(Lb,{className:"redoc-wrap"},r.createElement(Nb,{menu:t,className:"menu-content"},r.createElement(ly,{info:e.info}),!n.disableSearch&&r.createElement(Hb,{search:o,marker:i,getItemById:t.getItemById,onActivate:t.activateAndScroll})||null,r.createElement(Pb,{menu:t})),r.createElement(Db,{className:"api-content"},r.createElement(oy,{store:a}),r.createElement(sb,{items:t.items})),r.createElement(Mb,null)))))}}Yb.propTypes={store:Cn.instanceOf(Xg).isRequired};const Kb=function(e){const{spec:t,specUrl:o,options:i={},onLoaded:a}=e,s=fn(i.hideLoading,!1),l=new mn(i);if(void 0!==l.nonce)try{n.nc=l.nonce}catch(e){}return r.createElement(Sn,null,r.createElement(Op,{spec:t,specUrl:o,options:i,onLoaded:a},(({loading:e,store:t})=>e?s?null:r.createElement(An,{color:l.theme.colors.primary.main}):r.createElement(Yb,{store:t}))))},Gb=kn.li`
2022-02-04 13:00:46 +03:00
${e=>e.active?"background-color: #eee":""};
padding: 13px 16px;
&:hover {
background-color: #eee;
}
cursor: pointer;
text-overflow: ellipsis;
overflow: hidden;
`,Qb=kn.ul`
2022-02-04 13:00:46 +03:00
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
background: #fff;
border-radius: 0 0 2px 2px;
top: 100%;
left: 0;
right: 0;
z-index: 200;
overflow: hidden;
position: absolute;
list-style: none;
margin: 4px 0 0 0;
padding: 5px 0;
font-family: Roboto,sans-serif;
overflow: hidden;
`,Xb=kn.div`
2022-02-04 13:00:46 +03:00
position: relative;
width: 100%;
max-width: 500px;
display: flex;
`,Zb=kn.input`
2022-02-04 13:00:46 +03:00
box-sizing: border-box;
width: 100%;
padding: 0 10px;
color: #555;
background-color: #fff;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
&:focus {
border-color: #66afe9;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
`,Jb=kn.button`
2022-02-04 13:00:46 +03:00
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
border-left: 0;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
width: 80px;
white-space: nowrap;
@media screen and (max-width: 450px) {
display: none;
}
`;class ew extends r.Component{constructor(){super(...arguments),this.state={open:!1,value:this.props.value||"",activeItemIdx:-1},this.open=()=>{this.setState({open:!0})},this.close=()=>{this.setState({open:!1,activeItemIdx:-1})},this.handleChange=e=>{this.updateValue(e.currentTarget.value)},this.handleTryItClick=()=>{this.handleSelect(this.state.value)},this.handleKeyPress=e=>{if(13===e.keyCode)this.handleSelect(e.currentTarget.value);else if(40===e.keyCode){const t=Math.min(this.props.options.length-1,++this.state.activeItemIdx);this.setState({open:!0,activeItemIdx:t,value:this.props.options[t].value}),e.preventDefault()}else if(38===e.keyCode){const t=Math.max(0,--this.state.activeItemIdx);this.setState({activeItemIdx:t,value:this.props.options[t].value}),e.preventDefault()}else 27===e.keyCode&&this.close()},this.handleBlur=()=>{setTimeout((()=>this.close()),100)},this.handleItemClick=(e,t)=>{this.handleSelect(e),this.setState({activeItemIdx:t})},this.renderOption=(e,t)=>r.createElement(Gb,{active:t===this.state.activeItemIdx,key:e.value,onMouseDown:()=>{this.handleItemClick(e.value,t)}},r.createElement("small",null,r.createElement("strong",null,e.label)),r.createElement("br",null),e.value)}updateValue(e){this.setState({value:e,activeItemIdx:-1})}handleSelect(e){this.updateValue(e),this.props.onChange&&this.props.onChange(e),this.close()}render(){const{open:e,value:t}=this.state,{options:n,placeholder:o}=this.props;return r.createElement(Xb,null,r.createElement(Zb,{placeholder:o,onChange:this.handleChange,value:t,onFocus:this.open,onBlur:this.handleBlur,onKeyDown:this.handleKeyPress,"aria-label":"URL to an OpenAPI definition to try"}),r.createElement(Jb,{onClick:this.handleTryItClick}," TRY IT "),e&&r.createElement(Qb,null,n.map(this.renderOption)))}}var tw=function(e){return"object"==typeof e&&null!==e},nw=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},rw=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e};function ow(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function iw(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ow(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}iw.prototype=Object.create(Error.prototype),iw.prototype.constructor=iw,iw.prototype.toString=function(e){return this.name+": "+ow(this,e)};var aw=iw;function sw(e,t,n,r,o){var i="",a="",s=Math.floor(o/2)-1;return r-t>s&&(t=r-s+(i=" ... ").length),n-r>s&&(n=r+s-(a=" ...").length),{str:i+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+i.length}}function lw(e,t){return nw(" ",t-e.length)+e}var cw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],uw=["scalar","sequence","mapping"],pw=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===cw.indexOf(t))throw new aw('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===uw.indexOf(this.kind))throw new aw('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function dw(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)})),n[t]=e})),n}function fw(e){return this.extend(e)}fw.prototype.extend=function(e){var t=[],n=[];if(e instanceof pw)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.impli
2022-02-04 13:00:46 +03:00
background-color: #fff;
color: #333;
padding: 2px 10px;
touch-action: manipulation;
cursor: pointer;
user-select: none;
border: 1px solid #ccc;
font-size: 16px;
height: 28px;
box-sizing: border-box;
vertical-align: middle;
line-height: 1;
outline: none;
white-space: nowrap;
@media (max-width: 699px) {
display: none;
}
`,Ox=function(e){const t=(0,r.useRef)(null);return r.createElement("span",null,r.createElement(kx,{onClick:()=>{t&&t.current&&t.current.click()}},"Upload a file"),r.createElement("input",{type:"file",style:{display:"none"},onChange:t=>{const n=t.target.files[0],r=new FileReader;r.onload=()=>{e.onUpload(xx(r.result))},r.readAsText(n)},ref:t}))},_x="openapi.yaml",Sx="openapi-3-1.yaml",Ex=[{value:Sx,label:"Petstore OpenAPI 3.1"},{value:"https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml",label:"Instagram"},{value:"https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml",label:"Google Calendar"},{value:"https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.yaml",label:"Slack"},{value:"https://api.apis.guru/v2/specs/zoom.us/2.0.0/openapi.yaml",label:"Zoom.us"},{value:"https://docs.graphhopper.com/openapi.json",label:"GraphHopper"}];class Px extends r.Component{constructor(e){super(e),this.handleUploadFile=e=>{this.setState({spec:e,specUrl:""})},this.handleChange=e=>{e===Sx&&this.setState({cors:!1}),this.setState({specUrl:e}),window.history.pushState(void 0,"",jx(location.search,"url",e))},this.toggleCors=e=>{const t=e.currentTarget.checked;this.setState({cors:t}),window.history.pushState(void 0,"",jx(location.search,"nocors",t?void 0:""))};let t=window.location.search.match(/url=([^&]+)/),n=_x;t&&t.length>1&&(n=decodeURIComponent(t[1])),t=window.location.search.match(/[?&]nocors(&|#|$)/);let r=!0;t&&t.length>1&&(r=!1),this.state={spec:void 0,specUrl:n,dropdownOpen:!1,cors:r}}render(){const{specUrl:e,cors:t}=this.state;let n=e;return e!==_x&&(n=t?"\\\\cors.redoc.ly/"+new URL(e,window.location.href).href:e),r.createElement(r.Fragment,null,r.createElement(Cx,null,r.createElement("a",{href:"."},r.createElement(Rx,{src:"https://github.com/Redocly/redoc/raw/master/docs/images/redoc-logo.png",alt:"Redoc logo"})),r.createElement($x,null,r.createElement(Ox,{onUpload:this.handleUploadFile}),r.createElement(ew,{placeholder:"URL to a spec to try",options:Ex,onChange:this.handleChange,value:e===_x?"":e}),r.createElement(Ax,{title:"Use CORS proxy"},r.createElement("input",{id:"cors_checkbox",type:"checkbox",onChange:this.toggleCors,checked:t}),r.createElement("label",{htmlFor:"cors_checkbox"},"CORS"))),r.createElement("iframe",{src:"https://ghbtns.com/github-btn.html?user=Redocly&repo=redoc&type=star&count=true&size=large",frameBorder:"0",scrolling:"0",width:"160px",height:"30px"})),r.createElement(Kb,{spec:this.state.spec,specUrl:n,options:{scrollYOffset:"nav",untrustedSpec:!0}}))}}const $x=We.div`
2022-02-04 13:00:46 +03:00
display: flex;
justify-content: center;
flex: 1;
margin: 0 15px;
align-items: center;
`,Ax=We.div`
2022-02-04 13:00:46 +03:00
margin-left: 10px;
white-space: nowrap;
label {
font-size: 13px;
}
@media screen and (max-width: 550px) {
display: none;
}
`,Cx=We.nav`
2022-02-04 13:00:46 +03:00
position: sticky;
top: 0;
width: 100%;
height: 50px;
box-sizing: border-box;
background: white;
border-bottom: 1px solid #cccccc;
z-index: 10;
padding: 5px;
display: flex;
align-items: center;
font-family: Roboto, sans-serif;
`,Rx=We.img`
2022-02-04 13:00:46 +03:00
height: 40px;
width: 124px;
display: inline-block;
margin-right: 15px;
@media screen and (max-width: 950px) {
display: none;
}
`;function jx(e,t,n){const r=""===n?t:t+"="+n,o=new RegExp("([?|&])"+t+"=?.*?(&|#|$)","i");if(e.match(o))return void 0!==n?e.replace(o,"$1"+r+"$2"):e.replace(o,((e,t,n)=>(n.startsWith("&")&&(n=n.substring(1)),"&"===t?n:t+n)));{if(void 0===n)return e;let t="";-1!==e.indexOf("#")&&(t=e.replace(/.*#/,"#"),e=e.replace(/#.*/,""));const o=-1!==e.indexOf("?")?"&":"?";return e+o+r+t}}(0,o.render)(r.createElement(Px,null),document.getElementById("container"))})()})();