🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

swagger-ui-svelte

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-ui-svelte - npm Package Compare versions

Comparing version

to
0.0.10

2

package.json

@@ -12,3 +12,3 @@ {

"svelte": "src/SwaggerUISvelte.svelte",
"version": "0.0.9",
"version": "0.0.10",
"scripts": {

@@ -15,0 +15,0 @@ "build": "rollup -c",

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

var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e){t.appendChild(e)}function i(t,e,n){t.insertBefore(e,n||null)}function s(t){t.parentNode.removeChild(t)}function u(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function a(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function d(){return f(" ")}function p(){return f("")}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e,n){t.classList[n?"add":"remove"](e)}let $;function y(t){$=t}function b(t){(function(){if(!$)throw new Error("Function called outside component initialization");return $})().$$.on_mount.push(t)}const v=[],w=[],_=[],x=[],j=Promise.resolve();let O=!1;function L(t){_.push(t)}let T=!1;const k=new Set;function N(){if(!T){T=!0;do{for(let t=0;t<v.length;t+=1){const e=v[t];y(e),q(e.$$)}for(y(null),v.length=0;w.length;)w.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];k.has(e)||(k.add(e),e())}_.length=0}while(v.length);for(;x.length;)x.pop()();O=!1,T=!1,k.clear()}}function q(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const M=new Set;function B(t,e){-1===t.$$.dirty[0]&&(v.push(t),O||(O=!0,j.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function E(c,l,i,u,a,f,d=[-1]){const p=$;y(c);const m=l.props||{},h=c.$$={fragment:null,ctx:null,props:f,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:d,skip_bound:!1};let g=!1;if(h.ctx=i?i(c,m,(t,e,...n)=>{const r=n.length?n[0]:e;return h.ctx&&a(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),g&&B(c,t)),e}):[],h.update(),g=!0,r(h.before_update),h.fragment=!!u&&u(h.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);h.fragment&&h.fragment.l(t),t.forEach(s)}else h.fragment&&h.fragment.c();l.intro&&((b=c.$$.fragment)&&b.i&&(M.delete(b),b.i(v))),function(t,n,c){const{fragment:l,on_mount:i,on_destroy:s,after_update:u}=t.$$;l&&l.m(n,c),L(()=>{const n=i.map(e).filter(o);s?s.push(...n):r(n),t.$$.on_mount=[]}),u.forEach(L)}(c,l.target,l.anchor),N()}var b,v;y(p)}function H(t,e,n){const r=t.slice();return r[13]=e[n],r}function S(t,e,n){const r=t.slice();return r[16]=e[n],r}function U(t,e,n){const r=t.slice();return r[22]=e[n],r}function A(t,e,n){const r=t.slice();return r[22]=e[n],r}function C(t,e,n){const r=t.slice();return r[19]=e[n],r}function P(t,e,n){const r=t.slice();return r[10]=e[n],r[12]=n,r}function D(t,e,n){const r=t.slice();return r[7]=e[n],r[9]=n,r}function R(e){return{c(){document.title="Swagger UI using Svelte"},m:t,d:t}}function z(e){let n;return document.title=n=e[0].info.title,{c:t,m:t,d:t}}function F(t){let e,n,r,o,c,g,$,y,b,v,w,_=t[0].info.title+"",x=t[0].info.description+"",j=t[0].info.version+"",O=t[0].info.contact&&I(t),L=Object.entries(t[0].paths),T=[];for(let e=0;e<L.length;e+=1)T[e]=dt(D(t,L,e));return{c(){e=a("h1"),n=f(_),r=d(),o=a("h2"),c=f(x),g=f(" - "),$=f(j),y=d(),b=a("p"),O&&O.c(),v=d();for(let t=0;t<T.length;t+=1)T[t].c();w=p(),m(e,"class","title"),m(o,"class","subtitle")},m(t,s){i(t,e,s),l(e,n),i(t,r,s),i(t,o,s),l(o,c),l(o,g),l(o,$),i(t,y,s),i(t,b,s),O&&O.m(b,null),i(t,v,s);for(let e=0;e<T.length;e+=1)T[e].m(t,s);i(t,w,s)},p(t,e){if(1&e&&_!==(_=t[0].info.title+"")&&h(n,_),1&e&&x!==(x=t[0].info.description+"")&&h(c,x),1&e&&j!==(j=t[0].info.version+"")&&h($,j),t[0].info.contact?O?O.p(t,e):(O=I(t),O.c(),O.m(b,null)):O&&(O.d(1),O=null),7&e){let n;for(L=Object.entries(t[0].paths),n=0;n<L.length;n+=1){const r=D(t,L,n);T[n]?T[n].p(r,e):(T[n]=dt(r),T[n].c(),T[n].m(w.parentNode,w))}for(;n<T.length;n+=1)T[n].d(1);T.length=L.length}},d(t){t&&s(e),t&&s(r),t&&s(o),t&&s(y),t&&s(b),O&&O.d(),t&&s(v),u(T,t),t&&s(w)}}}function I(t){let e,n,r,o,c,u=t[0].info.contact.name+"",d=t[0].info.contact.email+"";return{c(){e=a("a"),n=f(u),o=f(" - \n "),c=f(d),m(e,"href",r=t[0].info.contact.url),m(e,"target","_blank")},m(t,r){i(t,e,r),l(e,n),i(t,o,r),i(t,c,r)},p(t,o){1&o&&u!==(u=t[0].info.contact.name+"")&&h(n,u),1&o&&r!==(r=t[0].info.contact.url)&&m(e,"href",r),1&o&&d!==(d=t[0].info.contact.email+"")&&h(c,d)},d(t){t&&s(e),t&&s(o),t&&s(c)}}}function G(t){let e,n=t[10][1].summary+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){1&r&&n!==(n=t[10][1].summary+"")&&h(e,n)},d(t){t&&s(e)}}}function J(t){let e,n=Object.entries(t[10][1].requestBody.content),r=[];for(let e=0;e<n.length;e+=1)r[e]=et(C(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,o){if(5&o){let c;for(n=Object.entries(t[10][1].requestBody.content),c=0;c<n.length;c+=1){const l=C(t,n,c);r[c]?r[c].p(l,o):(r[c]=et(l),r[c].c(),r[c].m(e.parentNode,e))}for(;c<r.length;c+=1)r[c].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function K(t){let e,n=Object.entries(t[19][1].schema.properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=X(U(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,o){if(1&o){let c;for(n=Object.entries(t[19][1].schema.properties),c=0;c<n.length;c+=1){const l=U(t,n,c);r[c]?r[c].p(l,o):(r[c]=X(l),r[c].c(),r[c].m(e.parentNode,e))}for(;c<r.length;c+=1)r[c].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function Q(t){let e,n=Object.entries(t[2](t[19][1].schema.$ref).properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=tt(A(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=p()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,o){if(5&o){let c;for(n=Object.entries(t[2](t[19][1].schema.$ref).properties),c=0;c<n.length;c+=1){const l=A(t,n,c);r[c]?r[c].p(l,o):(r[c]=tt(l),r[c].c(),r[c].m(e.parentNode,e))}for(;c<r.length;c+=1)r[c].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function V(e){let n;return{c(){n=f("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function W(t){let e,n=t[22][1].type+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){1&r&&n!==(n=t[22][1].type+"")&&h(e,n)},d(t){t&&s(e)}}}function X(t){let e,n,r,o,c,u,p,m,g,$=t[22][0]+"",y=t[22][1].description+"";function b(t,e){return t[22][1].type?W:V}let v=b(t),w=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),o=f($),c=d(),u=a("td"),p=d(),m=a("td"),w.c(),g=d()},m(t,s){i(t,e,s),l(e,n),l(n,r),l(r,o),l(e,c),l(e,u),u.innerHTML=y,l(e,p),l(e,m),w.m(m,null),l(e,g)},p(t,e){1&e&&$!==($=t[22][0]+"")&&h(o,$),1&e&&y!==(y=t[22][1].description+"")&&(u.innerHTML=y),v===(v=b(t))&&w?w.p(t,e):(w.d(1),w=v(t),w&&(w.c(),w.m(m,null)))},d(t){t&&s(e),w.d()}}}function Y(e){let n;return{c(){n=f("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function Z(t){let e,n=t[22][1].type+"";return{c(){e=f(n)},m(t,n){i(t,e,n)},p(t,r){1&r&&n!==(n=t[22][1].type+"")&&h(e,n)},d(t){t&&s(e)}}}function tt(t){let e,n,r,o,c,u,p,m,g,$=t[22][0]+"",y=t[22][1].description+"";function b(t,e){return t[22][1].type?Z:Y}let v=b(t),w=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),o=f($),c=d(),u=a("td"),p=d(),m=a("td"),w.c(),g=d()},m(t,s){i(t,e,s),l(e,n),l(n,r),l(r,o),l(e,c),l(e,u),u.innerHTML=y,l(e,p),l(e,m),w.m(m,null),l(e,g)},p(t,e){1&e&&$!==($=t[22][0]+"")&&h(o,$),1&e&&y!==(y=t[22][1].description+"")&&(u.innerHTML=y),v===(v=b(t))&&w?w.p(t,e):(w.d(1),w=v(t),w&&(w.c(),w.m(m,null)))},d(t){t&&s(e),w.d()}}}function et(t){let e,n,r,o,c,u,p,g,$,y,b,v=t[19][0]+"";function w(t,e){return"$ref"in t[19][1].schema?Q:K}let _=w(t),x=_(t);return{c(){e=a("div"),n=a("h4"),r=f("Request Body - "),o=f(v),c=d(),u=a("div"),p=a("table"),g=a("thead"),g.innerHTML="<tr><th>Name</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",$=d(),y=a("tbody"),x.c(),b=d(),m(n,"class","subtitle"),m(p,"class","table is-hoverable is-fullwidth"),m(u,"class","table-container"),m(e,"class","swagger-parameters")},m(t,s){i(t,e,s),l(e,n),l(n,r),l(n,o),l(e,c),l(e,u),l(u,p),l(p,g),l(p,$),l(p,y),x.m(y,null),l(e,b)},p(t,e){1&e&&v!==(v=t[19][0]+"")&&h(o,v),_===(_=w(t))&&x?x.p(t,e):(x.d(1),x=_(t),x&&(x.c(),x.m(y,null)))},d(t){t&&s(e),x.d()}}}function nt(t){let e,n,r,o,c,f,p,h,g=t[10][1].parameters,$=[];for(let e=0;e<g.length;e+=1)$[e]=st(S(t,g,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Parameters",r=d(),o=a("div"),c=a("table"),f=a("thead"),f.innerHTML="<tr><th>Name</th> \n <th>Located in</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",p=d(),h=a("tbody");for(let t=0;t<$.length;t+=1)$[t].c();m(n,"class","subtitle"),m(c,"class","table is-hoverable"),m(o,"class","table-container"),m(e,"class","swagger-parameters")},m(t,s){i(t,e,s),l(e,n),l(e,r),l(e,o),l(o,c),l(c,f),l(c,p),l(c,h);for(let t=0;t<$.length;t+=1)$[t].m(h,null)},p(t,e){if(1&e){let n;for(g=t[10][1].parameters,n=0;n<g.length;n+=1){const r=S(t,g,n);$[n]?$[n].p(r,e):($[n]=st(r),$[n].c(),$[n].m(h,null))}for(;n<$.length;n+=1)$[n].d(1);$.length=g.length}},d(t){t&&s(e),u($,t)}}}function rt(t){let e,n,r=t[16].name+"";return{c(){e=a("span"),n=f(r)},m(t,r){i(t,e,r),l(e,n)},p(t,e){1&e&&r!==(r=t[16].name+"")&&h(n,r)},d(t){t&&s(e)}}}function ot(t){let e,n,r=t[16].name+"";return{c(){e=a("span"),n=f(r),m(e,"class","swagger-parameter-required")},m(t,r){i(t,e,r),l(e,n)},p(t,e){1&e&&r!==(r=t[16].name+"")&&h(n,r)},d(t){t&&s(e)}}}function ct(e){let n;return{c(){n=f("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function lt(t){let e,n,r,o=t[16].type+"",c=t[16].items&&it(t);return{c(){e=f(o),n=d(),c&&c.c(),r=p()},m(t,o){i(t,e,o),i(t,n,o),c&&c.m(t,o),i(t,r,o)},p(t,n){1&n&&o!==(o=t[16].type+"")&&h(e,o),t[16].items?c?c.p(t,n):(c=it(t),c.c(),c.m(r.parentNode,r)):c&&(c.d(1),c=null)},d(t){t&&s(e),t&&s(n),c&&c.d(t),t&&s(r)}}}function it(t){let e,n,r=t[16].items.type+"";return{c(){e=f("of\n "),n=f(r)},m(t,r){i(t,e,r),i(t,n,r)},p(t,e){1&e&&r!==(r=t[16].items.type+"")&&h(n,r)},d(t){t&&s(e),t&&s(n)}}}function st(t){let e,n,r,o,c,u,p,m,g,$,y=t[16].in+"",b=t[16].description+"";function v(t,e){return t[16].required?ot:rt}let w=v(t),_=w(t);function x(t,e){return t[16].type?lt:ct}let j=x(t),O=j(t);return{c(){e=a("tr"),n=a("td"),_.c(),r=d(),o=a("td"),c=f(y),u=d(),p=a("td"),m=d(),g=a("td"),O.c(),$=d()},m(t,s){i(t,e,s),l(e,n),_.m(n,null),l(e,r),l(e,o),l(o,c),l(e,u),l(e,p),p.innerHTML=b,l(e,m),l(e,g),O.m(g,null),l(e,$)},p(t,e){w===(w=v(t))&&_?_.p(t,e):(_.d(1),_=w(t),_&&(_.c(),_.m(n,null))),1&e&&y!==(y=t[16].in+"")&&h(c,y),1&e&&b!==(b=t[16].description+"")&&(p.innerHTML=b),j===(j=x(t))&&O?O.p(t,e):(O.d(1),O=j(t),O&&(O.c(),O.m(g,null)))},d(t){t&&s(e),_.d(),O.d()}}}function ut(t){let e,n,r,o=Object.entries(t[10][1].responses),c=[];for(let e=0;e<o.length;e+=1)c[e]=at(H(t,o,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=d();for(let t=0;t<c.length;t+=1)c[t].c();m(e,"class","swagger-response")},m(t,o){i(t,e,o),l(e,n),l(e,r);for(let t=0;t<c.length;t+=1)c[t].m(e,null)},p(t,n){if(1&n){let r;for(o=Object.entries(t[10][1].responses),r=0;r<o.length;r+=1){const l=H(t,o,r);c[r]?c[r].p(l,n):(c[r]=at(l),c[r].c(),c[r].m(e,null))}for(;r<c.length;r+=1)c[r].d(1);c.length=o.length}},d(t){t&&s(e),u(c,t)}}}function at(t){let e,n,r,o,c,u=t[13][0]+"",p=t[13][1].description+"";return{c(){e=a("h5"),n=a("span"),r=f(u),o=d(),c=f(p),m(n,"class","swagger-response-code")},m(t,s){i(t,e,s),l(e,n),l(n,r),l(e,o),l(e,c)},p(t,e){1&e&&u!==(u=t[13][0]+"")&&h(r,u),1&e&&p!==(p=t[13][1].description+"")&&h(c,p)},d(t){t&&s(e)}}}function ft(t){let e,n,r,o,c,u,p,$,y,b,v,w,_,x,j=t[10][0]+"",O=t[10][1].summary&&G(t);function L(...e){return t[4](t[9],t[12],...e)}let T=t[10][1].requestBody&&t[10][1].requestBody.content&&J(t),k=t[10][1].parameters&&nt(t),N=t[10][1].responses&&ut(t);return{c(){e=a("div"),n=a("div"),r=a("a"),o=a("span"),c=f(j),u=d(),O&&O.c(),$=d(),y=a("div"),T&&T.c(),b=d(),k&&k.c(),v=d(),N&&N.c(),m(o,"class","swagger-method-name"),m(r,"class","swagger-method-link"),m(r,"href",p=null),m(n,"class","swagger-method-title"),m(y,"class","swagger-method-details open"),g(y,"open",t[1][`${t[9]}-${t[12]}`]),m(e,"class",w="swagger-method swagger-method-"+t[10][0])},m(t,s){var a,f,d,p;i(t,e,s),l(e,n),l(n,r),l(r,o),l(o,c),l(r,u),O&&O.m(r,null),l(e,$),l(e,y),T&&T.m(y,null),l(y,b),k&&k.m(y,null),l(y,v),N&&N.m(y,null),_||(f="click",d=L,(a=n).addEventListener(f,d,p),x=()=>a.removeEventListener(f,d,p),_=!0)},p(n,o){t=n,1&o&&j!==(j=t[10][0]+"")&&h(c,j),t[10][1].summary?O?O.p(t,o):(O=G(t),O.c(),O.m(r,null)):O&&(O.d(1),O=null),t[10][1].requestBody&&t[10][1].requestBody.content?T?T.p(t,o):(T=J(t),T.c(),T.m(y,b)):T&&(T.d(1),T=null),t[10][1].parameters?k?k.p(t,o):(k=nt(t),k.c(),k.m(y,v)):k&&(k.d(1),k=null),t[10][1].responses?N?N.p(t,o):(N=ut(t),N.c(),N.m(y,null)):N&&(N.d(1),N=null),2&o&&g(y,"open",t[1][`${t[9]}-${t[12]}`]),1&o&&w!==(w="swagger-method swagger-method-"+t[10][0])&&m(e,"class",w)},d(t){t&&s(e),O&&O.d(),T&&T.d(),k&&k.d(),N&&N.d(),_=!1,x()}}}function dt(t){let e,n,r,o,c,p=t[7][0]+"",g=Object.entries(t[7][1]),$=[];for(let e=0;e<g.length;e+=1)$[e]=ft(P(t,g,e));return{c(){e=a("div"),n=a("h3"),r=f(p),o=d();for(let t=0;t<$.length;t+=1)$[t].c();c=d(),m(n,"class","title is-small is-3"),m(e,"class","swagger-paths is-small")},m(t,s){i(t,e,s),l(e,n),l(n,r),l(e,o);for(let t=0;t<$.length;t+=1)$[t].m(e,null);l(e,c)},p(t,n){if(1&n&&p!==(p=t[7][0]+"")&&h(r,p),7&n){let r;for(g=Object.entries(t[7][1]),r=0;r<g.length;r+=1){const o=P(t,g,r);$[r]?$[r].p(o,n):($[r]=ft(o),$[r].c(),$[r].m(e,c))}for(;r<$.length;r+=1)$[r].d(1);$.length=g.length}},d(t){t&&s(e),u($,t)}}}function pt(e){let n,r,o,c,u;function f(t,e){return t[0]?z:R}let h=f(e),g=h(e),$=e[0]&&F(e);return{c(){g.c(),n=p(),r=d(),o=a("main"),c=a("section"),u=a("div"),$&&$.c(),m(u,"class","container"),m(c,"class","section")},m(t,e){g.m(document.head,null),l(document.head,n),i(t,r,e),i(t,o,e),l(o,c),l(c,u),$&&$.m(u,null)},p(t,[e]){h!==(h=f(t))&&(g.d(1),g=h(t),g&&(g.c(),g.m(n.parentNode,n))),t[0]?$?$.p(t,e):($=F(t),$.c(),$.m(u,null)):$&&($.d(1),$=null)},i:t,o:t,d(t){g.d(t),s(n),t&&s(r),t&&s(o),$&&$.d()}}}function mt(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,c){function l(t){try{s(r.next(t))}catch(t){c(t)}}function i(t){try{s(r.throw(t))}catch(t){c(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,i)}s((r=r.apply(t,e||[])).next())}))};let{swaggerUrl:o="swagger-example.json"}=e,c=null,l={};b(()=>{(t=>{r(void 0,void 0,void 0,(function*(){const e=yield fetch(t);n(0,c=yield e.json())}))})(o)});return t.$$set=t=>{"swaggerUrl"in t&&n(3,o=t.swaggerUrl)},[c,l,t=>{const e=t.replace("#/","").split("/");return c[e[0]][e[1]][e[2]]},o,(t,e)=>n(1,l[`${t}-${e}`]=!l[`${t}-${e}`],l)]}return new class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),E(this,t,mt,pt,c,{swaggerUrl:3})}}({target:document.body})}();
var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function l(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function i(t,e,n){t.insertBefore(e,n||null)}function s(t){t.parentNode.removeChild(t)}function u(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function a(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function f(){return d(" ")}function m(){return d("")}function p(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function h(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function g(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function y(t,e){t.value=null==e?"":e}function $(t,e,n){t.classList[n?"add":"remove"](e)}let b;function v(t){b=t}function x(t){(function(){if(!b)throw new Error("Function called outside component initialization");return b})().$$.on_mount.push(t)}const w=[],j=[],O=[],_=[],q=Promise.resolve();let T=!1;function B(t){O.push(t)}let E=!1;const N=new Set;function k(){if(!E){E=!0;do{for(let t=0;t<w.length;t+=1){const e=w[t];v(e),L(e.$$)}for(v(null),w.length=0;j.length;)j.pop()();for(let t=0;t<O.length;t+=1){const e=O[t];N.has(e)||(N.add(e),e())}O.length=0}while(w.length);for(;_.length;)_.pop()();T=!1,E=!1,N.clear()}}function L(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(B)}}const S=new Set;function M(t,e){-1===t.$$.dirty[0]&&(w.push(t),T||(T=!0,q.then(k)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function H(o,c,i,u,a,d,f=[-1]){const m=b;v(o);const p=c.props||{},h=o.$$={fragment:null,ctx:null,props:d,update:t,not_equal:a,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(m?m.$$.context:[]),callbacks:n(),dirty:f,skip_bound:!1};let g=!1;if(h.ctx=i?i(o,p,(t,e,...n)=>{const r=n.length?n[0]:e;return h.ctx&&a(h.ctx[t],h.ctx[t]=r)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](r),g&&M(o,t)),e}):[],h.update(),g=!0,r(h.before_update),h.fragment=!!u&&u(h.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);h.fragment&&h.fragment.l(t),t.forEach(s)}else h.fragment&&h.fragment.c();c.intro&&((y=o.$$.fragment)&&y.i&&(S.delete(y),y.i($))),function(t,n,o){const{fragment:c,on_mount:i,on_destroy:s,after_update:u}=t.$$;c&&c.m(n,o),B(()=>{const n=i.map(e).filter(l);s?s.push(...n):r(n),t.$$.on_mount=[]}),u.forEach(B)}(o,c.target,c.anchor),k()}var y,$;v(m)}function C(t,e,n){const r=t.slice();return r[27]=e[n],r}function U(t,e,n){const r=t.slice();return r[24]=e[n],r}function A(t,e,n){const r=t.slice();return r[33]=e[n],r[34]=e,r[35]=n,r}function P(t,e,n){const r=t.slice();return r[30]=e[n],r}function z(t,e,n){const r=t.slice();return r[30]=e[n],r}function J(t,e,n){const r=t.slice();return r[36]=e[n],r}function R(t,e,n){const r=t.slice();return r[21]=e[n],r[22]=e,r[23]=n,r}function D(t,e,n){const r=t.slice();return r[18]=e[n],r[20]=n,r}function F(e){return{c(){document.title="Swagger UI using Svelte"},m:t,d:t}}function I(e){let n;return document.title=n=e[0].info.title,{c:t,m:t,d:t}}function G(t){let e,n,r,l,o,$,b,v,x,w,j,O,_,q,T,B=t[0].info.title+"",E=t[0].info.description+"",N=t[0].info.version+"",k=t[0].info.contact&&K(t),L=Object.entries(t[6]),S=[];for(let e=0;e<L.length;e+=1)S[e]=vt(D(t,L,e));return{c(){e=a("h1"),n=d(B),r=f(),l=a("h2"),o=d(E),$=d(" - "),b=d(N),v=f(),x=a("p"),k&&k.c(),w=f(),j=a("input"),O=f();for(let t=0;t<S.length;t+=1)S[t].c();_=m(),h(e,"class","title"),h(l,"class","subtitle"),h(j,"class","input"),h(j,"type","text"),h(j,"placeholder","Server URL")},m(s,u){i(s,e,u),c(e,n),i(s,r,u),i(s,l,u),c(l,o),c(l,$),c(l,b),i(s,v,u),i(s,x,u),k&&k.m(x,null),i(s,w,u),i(s,j,u),y(j,t[1]),i(s,O,u);for(let t=0;t<S.length;t+=1)S[t].m(s,u);i(s,_,u),q||(T=p(j,"input",t[10]),q=!0)},p(t,e){if(1&e[0]&&B!==(B=t[0].info.title+"")&&g(n,B),1&e[0]&&E!==(E=t[0].info.description+"")&&g(o,E),1&e[0]&&N!==(N=t[0].info.version+"")&&g(b,N),t[0].info.contact?k?k.p(t,e):(k=K(t),k.c(),k.m(x,null)):k&&(k.d(1),k=null),2&e[0]&&j.value!==t[1]&&y(j,t[1]),508&e[0]){let n;for(L=Object.entries(t[6]),n=0;n<L.length;n+=1){const r=D(t,L,n);S[n]?S[n].p(r,e):(S[n]=vt(r),S[n].c(),S[n].m(_.parentNode,_))}for(;n<S.length;n+=1)S[n].d(1);S.length=L.length}},d(t){t&&s(e),t&&s(r),t&&s(l),t&&s(v),t&&s(x),k&&k.d(),t&&s(w),t&&s(j),t&&s(O),u(S,t),t&&s(_),q=!1,T()}}}function K(t){let e,n,r,l,o,u=t[0].info.contact.name+"",f=t[0].info.contact.email+"";return{c(){e=a("a"),n=d(u),l=d(" - \n "),o=d(f),h(e,"href",r=t[0].info.contact.url),h(e,"target","_blank")},m(t,r){i(t,e,r),c(e,n),i(t,l,r),i(t,o,r)},p(t,l){1&l[0]&&u!==(u=t[0].info.contact.name+"")&&g(n,u),1&l[0]&&r!==(r=t[0].info.contact.url)&&h(e,"href",r),1&l[0]&&f!==(f=t[0].info.contact.email+"")&&g(o,f)},d(t){t&&s(e),t&&s(l),t&&s(o)}}}function Q(t){let e,n,r=t[21].summary+"";return{c(){e=d("- "),n=d(r)},m(t,r){i(t,e,r),i(t,n,r)},p(t,e){64&e[0]&&r!==(r=t[21].summary+"")&&g(n,r)},d(t){t&&s(e),t&&s(n)}}}function V(t){let e,n=Object.entries(t[21].requestBody.content),r=[];for(let e=0;e<n.length;e+=1)r[e]=ot(J(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=m()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,l){if(224&l[0]){let o;for(n=Object.entries(t[21].requestBody.content),o=0;o<n.length;o+=1){const c=J(t,n,o);r[o]?r[o].p(c,l):(r[o]=ot(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function W(t){let e,n=Object.entries(t[36][1].schema.properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=tt(P(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=m()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,l){if(64&l[0]){let o;for(n=Object.entries(t[36][1].schema.properties),o=0;o<n.length;o+=1){const c=P(t,n,o);r[o]?r[o].p(c,l):(r[o]=tt(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function X(t){let e,n=Object.entries(t[7](t[36][1].schema.$ref).properties),r=[];for(let e=0;e<n.length;e+=1)r[e]=rt(z(t,n,e));return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=m()},m(t,n){for(let e=0;e<r.length;e+=1)r[e].m(t,n);i(t,e,n)},p(t,l){if(192&l[0]){let o;for(n=Object.entries(t[7](t[36][1].schema.$ref).properties),o=0;o<n.length;o+=1){const c=z(t,n,o);r[o]?r[o].p(c,l):(r[o]=rt(c),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=n.length}},d(t){u(r,t),t&&s(e)}}}function Y(e){let n;return{c(){n=d("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function Z(t){let e,n=t[30][1].type+"";return{c(){e=d(n)},m(t,n){i(t,e,n)},p(t,r){64&r[0]&&n!==(n=t[30][1].type+"")&&g(e,n)},d(t){t&&s(e)}}}function tt(t){let e,n,r,l,o,u,m,p,h,y=t[30][0]+"",$=t[30][1].description+"";function b(t,e){return t[30][1].type?Z:Y}let v=b(t),x=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=d(y),o=f(),u=a("td"),m=f(),p=a("td"),x.c(),h=f()},m(t,s){i(t,e,s),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=$,c(e,m),c(e,p),x.m(p,null),c(e,h)},p(t,e){64&e[0]&&y!==(y=t[30][0]+"")&&g(l,y),64&e[0]&&$!==($=t[30][1].description+"")&&(u.innerHTML=$),v===(v=b(t))&&x?x.p(t,e):(x.d(1),x=v(t),x&&(x.c(),x.m(p,null)))},d(t){t&&s(e),x.d()}}}function et(e){let n;return{c(){n=d("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function nt(t){let e,n=t[30][1].type+"";return{c(){e=d(n)},m(t,n){i(t,e,n)},p(t,r){64&r[0]&&n!==(n=t[30][1].type+"")&&g(e,n)},d(t){t&&s(e)}}}function rt(t){let e,n,r,l,o,u,m,p,h,y=t[30][0]+"",$=t[30][1].description+"";function b(t,e){return t[30][1].type?nt:et}let v=b(t),x=v(t);return{c(){e=a("tr"),n=a("td"),r=a("span"),l=d(y),o=f(),u=a("td"),m=f(),p=a("td"),x.c(),h=f()},m(t,s){i(t,e,s),c(e,n),c(n,r),c(r,l),c(e,o),c(e,u),u.innerHTML=$,c(e,m),c(e,p),x.m(p,null),c(e,h)},p(t,e){64&e[0]&&y!==(y=t[30][0]+"")&&g(l,y),64&e[0]&&$!==($=t[30][1].description+"")&&(u.innerHTML=$),v===(v=b(t))&&x?x.p(t,e):(x.d(1),x=v(t),x&&(x.c(),x.m(p,null)))},d(t){t&&s(e),x.d()}}}function lt(t){let e,n,r,l;function o(){t[12].call(n,t[21])}return{c(){e=d("Example:\n "),n=a("textarea"),h(n,"class","textarea has-fixed-size"),h(n,"placeholder","Fixed size textarea")},m(c,s){i(c,e,s),i(c,n,s),y(n,t[5][t[21].id]),r||(l=p(n,"input",o),r=!0)},p(e,r){t=e,96&r[0]&&y(n,t[5][t[21].id])},d(t){t&&s(e),t&&s(n),r=!1,l()}}}function ot(t){let e,n,r,l,o,u,m,p,y,$,b,v,x=t[36][0]+"";function w(t,e){return"$ref"in t[36][1].schema?X:W}let j=w(t),O=j(t),_="$ref"in t[36][1].schema&&lt(t);return{c(){e=a("div"),n=a("h4"),r=d("Request Body - "),l=d(x),o=f(),u=a("div"),m=a("table"),p=a("thead"),p.innerHTML="<tr><th>Name</th> \n <th>Description</th> \n <th>Type</th> \n </tr><tr></tr>",y=f(),$=a("tbody"),O.c(),b=f(),_&&_.c(),v=f(),h(n,"class","subtitle"),h(m,"class","table is-hoverable is-fullwidth"),h(u,"class","table-container"),h(e,"class","swagger-parameters")},m(t,s){i(t,e,s),c(e,n),c(n,r),c(n,l),c(e,o),c(e,u),c(u,m),c(m,p),c(m,y),c(m,$),O.m($,null),c(u,b),_&&_.m(u,null),c(e,v)},p(t,e){64&e[0]&&x!==(x=t[36][0]+"")&&g(l,x),j===(j=w(t))&&O?O.p(t,e):(O.d(1),O=j(t),O&&(O.c(),O.m($,null))),"$ref"in t[36][1].schema?_?_.p(t,e):(_=lt(t),_.c(),_.m(u,null)):_&&(_.d(1),_=null)},d(t){t&&s(e),O.d(),_&&_.d()}}}function ct(t){let e,n,r,l,o,d,m,p,g=t[21].parameters,y=[];for(let e=0;e<g.length;e+=1)y[e]=ft(A(t,g,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Parameters",r=f(),l=a("div"),o=a("table"),d=a("thead"),d.innerHTML="<tr><th>Name</th> \n <th>Input</th> \n <th>Description</th> \n <th>Located in</th> \n <th>Type</th> \n </tr><tr></tr>",m=f(),p=a("tbody");for(let t=0;t<y.length;t+=1)y[t].c();h(n,"class","subtitle"),h(o,"class","table is-hoverable"),h(l,"class","table-container"),h(e,"class","swagger-parameters")},m(t,s){i(t,e,s),c(e,n),c(e,r),c(e,l),c(l,o),c(o,d),c(o,m),c(o,p);for(let t=0;t<y.length;t+=1)y[t].m(p,null)},p(t,e){if(80&e[0]){let n;for(g=t[21].parameters,n=0;n<g.length;n+=1){const r=A(t,g,n);y[n]?y[n].p(r,e):(y[n]=ft(r),y[n].c(),y[n].m(p,null))}for(;n<y.length;n+=1)y[n].d(1);y.length=g.length}},d(t){t&&s(e),u(y,t)}}}function it(t){let e,n,r=t[33].name+"";return{c(){e=a("span"),n=d(r)},m(t,r){i(t,e,r),c(e,n)},p(t,e){64&e[0]&&r!==(r=t[33].name+"")&&g(n,r)},d(t){t&&s(e)}}}function st(t){let e,n,r=t[33].name+"";return{c(){e=a("span"),n=d(r),h(e,"class","swagger-parameter-required")},m(t,r){i(t,e,r),c(e,n)},p(t,e){64&e[0]&&r!==(r=t[33].name+"")&&g(n,r)},d(t){t&&s(e)}}}function ut(e){let n;return{c(){n=d("String")},m(t,e){i(t,n,e)},p:t,d(t){t&&s(n)}}}function at(t){let e,n,r,l=t[33].type+"",o=t[33].items&&dt(t);return{c(){e=d(l),n=f(),o&&o.c(),r=m()},m(t,l){i(t,e,l),i(t,n,l),o&&o.m(t,l),i(t,r,l)},p(t,n){64&n[0]&&l!==(l=t[33].type+"")&&g(e,l),t[33].items?o?o.p(t,n):(o=dt(t),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},d(t){t&&s(e),t&&s(n),o&&o.d(t),t&&s(r)}}}function dt(t){let e,n,r=t[33].items.type+"";return{c(){e=d("of\n "),n=d(r)},m(t,r){i(t,e,r),i(t,n,r)},p(t,e){64&e[0]&&r!==(r=t[33].items.type+"")&&g(n,r)},d(t){t&&s(e),t&&s(n)}}}function ft(t){let e,n,r,l,o,u,m,$,b,v,x,w,j,O,_,q,T=t[33].description+"",B=t[33].in+"";function E(t,e){return t[33].required?st:it}let N=E(t),k=N(t);function L(){t[13].call(o,t[21],t[33])}function S(t,e){return t[33].type?at:ut}let M=S(t),H=M(t);return{c(){e=a("tr"),n=a("td"),k.c(),r=f(),l=a("td"),o=a("input"),m=f(),$=a("td"),b=f(),v=a("td"),x=d(B),w=f(),j=a("td"),H.c(),O=f(),h(o,"class","input"),h(o,"type","text"),h(o,"placeholder",u=t[33].name)},m(s,u){i(s,e,u),c(e,n),k.m(n,null),c(e,r),c(e,l),c(l,o),y(o,t[4][`${t[21].id}-${t[33].name}`]),c(e,m),c(e,$),$.innerHTML=T,c(e,b),c(e,v),c(v,x),c(e,w),c(e,j),H.m(j,null),c(e,O),_||(q=p(o,"input",L),_=!0)},p(e,r){N===(N=E(t=e))&&k?k.p(t,r):(k.d(1),k=N(t),k&&(k.c(),k.m(n,null))),64&r[0]&&u!==(u=t[33].name)&&h(o,"placeholder",u),80&r[0]&&o.value!==t[4][`${t[21].id}-${t[33].name}`]&&y(o,t[4][`${t[21].id}-${t[33].name}`]),64&r[0]&&T!==(T=t[33].description+"")&&($.innerHTML=T),64&r[0]&&B!==(B=t[33].in+"")&&g(x,B),M===(M=S(t))&&H?H.p(t,r):(H.d(1),H=M(t),H&&(H.c(),H.m(j,null)))},d(t){t&&s(e),k.d(),H.d(),_=!1,q()}}}function mt(t){let e,n,r;function l(...e){return t[14](t[21],...e)}return{c(){e=a("button"),e.textContent="Execute",h(e,"class","button is-primary is-fullwidth")},m(t,o){i(t,e,o),n||(r=p(e,"click",l),n=!0)},p(e,n){t=e},d(t){t&&s(e),n=!1,r()}}}function pt(t){let e,n,r,l,o,u,m,p,y,$,b,v,x,w=t[3][t[21].id].url+"",j=t[3][t[21].id].status+"",O=t[3][t[21].id].statusText+"",_=[...t[3][t[21].id].headers.entries()].map(wt).join(" \n")+"";return{c(){e=a("p"),n=d(w),r=f(),l=a("div"),o=a("div"),u=d(j),m=f(),p=a("div"),y=d(O),$=f(),b=a("pre"),v=a("code"),x=d(_),h(o,"class","column is-narrow"),h(p,"class","column"),h(l,"class","columns")},m(t,s){i(t,e,s),c(e,n),i(t,r,s),i(t,l,s),c(l,o),c(o,u),c(l,m),c(l,p),c(p,y),c(p,$),c(p,b),c(b,v),c(v,x)},p(t,e){72&e[0]&&w!==(w=t[3][t[21].id].url+"")&&g(n,w),72&e[0]&&j!==(j=t[3][t[21].id].status+"")&&g(u,j),72&e[0]&&O!==(O=t[3][t[21].id].statusText+"")&&g(y,O),72&e[0]&&_!==(_=[...t[3][t[21].id].headers.entries()].map(wt).join(" \n")+"")&&g(x,_)},d(t){t&&s(e),t&&s(r),t&&s(l)}}}function ht(t){let e,n,r,l=Object.entries(t[21].responses),o=[];for(let e=0;e<l.length;e+=1)o[e]=$t(U(t,l,e));return{c(){e=a("div"),n=a("h4"),n.textContent="Responses",r=f();for(let t=0;t<o.length;t+=1)o[t].c();h(e,"class","swagger-response")},m(t,l){i(t,e,l),c(e,n),c(e,r);for(let t=0;t<o.length;t+=1)o[t].m(e,null)},p(t,n){if(192&n[0]){let r;for(l=Object.entries(t[21].responses),r=0;r<l.length;r+=1){const c=U(t,l,r);o[r]?o[r].p(c,n):(o[r]=$t(c),o[r].c(),o[r].m(e,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=l.length}},d(t){t&&s(e),u(o,t)}}}function gt(t){let e,n,r,l,o,u,m,p,h=JSON.stringify(t[7](t[27][1].schema.$ref).example,null,2)+"";return{c(){e=a("ul"),n=d("Example: "),r=a("br"),l=f(),o=a("pre"),u=a("code"),m=d(h),p=f()},m(t,s){i(t,e,s),c(e,n),c(e,r),c(e,l),c(e,o),c(o,u),c(u,m),c(e,p)},p(t,e){64&e[0]&&h!==(h=JSON.stringify(t[7](t[27][1].schema.$ref).example,null,2)+"")&&g(m,h)},d(t){t&&s(e)}}}function yt(t){let e,n,r,l,o,u,m,p,y,$,b=t[24][0]+"",v=t[24][1].description+"",x=t[27][0]+"",w="$ref"in t[27][1].schema&&gt(t);return{c(){e=a("div"),n=d(b),r=f(),l=a("div"),o=a("p"),u=d(v),m=f(),p=a("p"),y=d(x),$=f(),w&&w.c(),h(e,"class","column is-narrow"),h(l,"class","column")},m(t,s){i(t,e,s),c(e,n),i(t,r,s),i(t,l,s),c(l,o),c(o,u),c(l,m),c(l,p),c(p,y),c(l,$),w&&w.m(l,null)},p(t,e){64&e[0]&&b!==(b=t[24][0]+"")&&g(n,b),64&e[0]&&v!==(v=t[24][1].description+"")&&g(u,v),64&e[0]&&x!==(x=t[27][0]+"")&&g(y,x),"$ref"in t[27][1].schema?w?w.p(t,e):(w=gt(t),w.c(),w.m(l,null)):w&&(w.d(1),w=null)},d(t){t&&s(e),t&&s(r),t&&s(l),w&&w.d()}}}function $t(t){let e,n,r,l=Object.entries(t[24][1].content),o=[];for(let e=0;e<l.length;e+=1)o[e]=yt(C(t,l,e));return{c(){e=a("h5"),n=f(),r=a("div");for(let t=0;t<o.length;t+=1)o[t].c();h(r,"class","columns")},m(t,l){i(t,e,l),i(t,n,l),i(t,r,l);for(let t=0;t<o.length;t+=1)o[t].m(r,null)},p(t,e){if(192&e[0]){let n;for(l=Object.entries(t[24][1].content),n=0;n<l.length;n+=1){const c=C(t,l,n);o[n]?o[n].p(c,e):(o[n]=yt(c),o[n].c(),o[n].m(r,null))}for(;n<o.length;n+=1)o[n].d(1);o.length=l.length}},d(t){t&&s(e),t&&s(n),t&&s(r),u(o,t)}}}function bt(t){let e,n,r,l,o,u,m,y,b,v,x,w,j,O,_,q,T,B,E=t[21].method+"",N=t[21].route+"",k=t[21].summary&&Q(t);function L(...e){return t[11](t[21],...e)}let S=t[21].requestBody&&t[21].requestBody.content&&V(t),M=t[21].parameters&&t[21].parameters.length>0&&ct(t),H=(t[21].parameters&&t[21].parameters.length>0||t[21].requestBody&&t[21].requestBody.content)&&mt(t),C=t[3][t[21].id]&&pt(t),U=t[21].responses&&ht(t);return{c(){e=a("div"),n=a("div"),r=a("a"),l=a("span"),o=d(E),u=f(),m=d(N),y=f(),k&&k.c(),v=f(),x=a("div"),S&&S.c(),w=f(),M&&M.c(),j=f(),H&&H.c(),O=f(),C&&C.c(),_=f(),U&&U.c(),h(l,"class","swagger-method-name"),h(r,"class","swagger-method-link"),h(r,"href",b=null),h(n,"class","swagger-method-title"),h(x,"class","swagger-method-details open"),$(x,"open",t[2][t[21].id]),h(e,"class",q="swagger-method swagger-method-"+t[21].method)},m(t,s){i(t,e,s),c(e,n),c(n,r),c(r,l),c(l,o),c(r,u),c(r,m),c(r,y),k&&k.m(r,null),c(e,v),c(e,x),S&&S.m(x,null),c(x,w),M&&M.m(x,null),c(x,j),H&&H.m(x,null),c(x,O),C&&C.m(x,null),c(x,_),U&&U.m(x,null),T||(B=p(n,"click",L),T=!0)},p(n,l){t=n,64&l[0]&&E!==(E=t[21].method+"")&&g(o,E),64&l[0]&&N!==(N=t[21].route+"")&&g(m,N),t[21].summary?k?k.p(t,l):(k=Q(t),k.c(),k.m(r,null)):k&&(k.d(1),k=null),t[21].requestBody&&t[21].requestBody.content?S?S.p(t,l):(S=V(t),S.c(),S.m(x,w)):S&&(S.d(1),S=null),t[21].parameters&&t[21].parameters.length>0?M?M.p(t,l):(M=ct(t),M.c(),M.m(x,j)):M&&(M.d(1),M=null),t[21].parameters&&t[21].parameters.length>0||t[21].requestBody&&t[21].requestBody.content?H?H.p(t,l):(H=mt(t),H.c(),H.m(x,O)):H&&(H.d(1),H=null),t[3][t[21].id]?C?C.p(t,l):(C=pt(t),C.c(),C.m(x,_)):C&&(C.d(1),C=null),t[21].responses?U?U.p(t,l):(U=ht(t),U.c(),U.m(x,null)):U&&(U.d(1),U=null),68&l[0]&&$(x,"open",t[2][t[21].id]),64&l[0]&&q!==(q="swagger-method swagger-method-"+t[21].method)&&h(e,"class",q)},d(t){t&&s(e),k&&k.d(),S&&S.d(),M&&M.d(),H&&H.d(),C&&C.d(),U&&U.d(),T=!1,B()}}}function vt(t){let e,n,r,l,o,m=t[18][0]+"",p=t[18][1],y=[];for(let e=0;e<p.length;e+=1)y[e]=bt(R(t,p,e));return{c(){e=a("div"),n=a("h3"),r=d(m),l=f();for(let t=0;t<y.length;t+=1)y[t].c();o=f(),h(n,"class","title is-small is-3"),h(e,"class","swagger-paths is-small")},m(t,s){i(t,e,s),c(e,n),c(n,r),c(e,l);for(let t=0;t<y.length;t+=1)y[t].m(e,null);c(e,o)},p(t,n){if(64&n[0]&&m!==(m=t[18][0]+"")&&g(r,m),508&n[0]){let r;for(p=t[18][1],r=0;r<p.length;r+=1){const l=R(t,p,r);y[r]?y[r].p(l,n):(y[r]=bt(l),y[r].c(),y[r].m(e,o))}for(;r<y.length;r+=1)y[r].d(1);y.length=p.length}},d(t){t&&s(e),u(y,t)}}}function xt(e){let n,r,l,o,u;function d(t,e){return t[0]?I:F}let p=d(e),g=p(e),y=e[0]&&G(e);return{c(){g.c(),n=m(),r=f(),l=a("main"),o=a("section"),u=a("div"),y&&y.c(),h(u,"class","container"),h(o,"class","section")},m(t,e){g.m(document.head,null),c(document.head,n),i(t,r,e),i(t,l,e),c(l,o),c(o,u),y&&y.m(u,null)},p(t,e){p!==(p=d(t))&&(g.d(1),g=p(t),g&&(g.c(),g.m(n.parentNode,n))),t[0]?y?y.p(t,e):(y=G(t),y.c(),y.m(u,null)):y&&(y.d(1),y=null)},i:t,o:t,d(t){g.d(t),s(n),t&&s(r),t&&s(l),y&&y.d()}}}const wt=t=>t.join(": ");function jt(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(l,o){function c(t){try{s(r.next(t))}catch(t){o(t)}}function i(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?l(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,i)}s((r=r.apply(t,e||[])).next())}))};let{swaggerUrl:l="swagger-example.json"}=e,o=null,c="",i={},s={},u={},a={},d={};const f=t=>{const e=t.replace("#/","").split("/");return o[e[0]][e[1]][e[2]]},m=(t,e,l)=>r(void 0,void 0,void 0,(function*(){console.log(a[l]);const r=Object.entries(u).filter(t=>t[0].indexOf(l)>-1),o={};r.length>0&&r.forEach(t=>o[""+t[0].split("-")[2]]=t[1]);const i=Object.keys(o).map(t=>t+"="+o[t]).join("&"),d=`${c}${t}?${i}`,f=yield fetch(d,{method:e.toUpperCase(),cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:a[l]});n(3,s[l]=f,s)}));x(()=>{(t=>{r(void 0,void 0,void 0,(function*(){const e=yield fetch(t);n(0,o=yield e.json()),n(1,c=o.servers[0].url),Object.entries(o.paths).forEach((t,e)=>{const r=Object.values(t[1])[0].tags[0];Object.entries(t[1]).map((l,o)=>{const c=`${e}-${o}`;l[1].requestBody&&Object.entries(l[1].requestBody.content).forEach((t,r)=>{"$ref"in t[1].schema&&(console.log("method",e,o,r,f(t[1].schema.$ref).example),n(5,a[c]=JSON.stringify(f(t[1].schema.$ref).example,null,2),a))}),r in d?d[r].push(Object.assign({id:c,route:t[0],method:l[0]},l[1])):n(6,d[r]=[Object.assign({id:c,route:t[0],method:l[0]},l[1])],d)})})}))})(l)});return t.$$set=t=>{"swaggerUrl"in t&&n(9,l=t.swaggerUrl)},[o,c,i,s,u,a,d,f,m,l,function(){c=this.value,n(1,c)},t=>n(2,i[t.id]=!i[t.id],i),function(t){a[t.id]=this.value,n(5,a),n(6,d)},function(t,e){u[`${t.id}-${e.name}`]=this.value,n(4,u),n(6,d)},t=>m(t.route,t.method,t.id)]}return new class extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),H(this,t,jt,xt,o,{swaggerUrl:9},[-1,-1])}}({target:document.body})}();
//# sourceMappingURL=bundle.js.map

@@ -36,3 +36,3 @@ # Swagger-UI for Svelte

<SwaggerUISvelte swagger_url="/swagger.json" />
<SwaggerUISvelte swaggerUrl="/swagger.json" />
```

@@ -46,2 +46,2 @@

| --------------- | ------ | ------- | ------------------------- |
| `swagger_url` | string | swagger-example.json | URL for swagger.json file |
| `swaggerUrl` | string | swagger-example.json | URL for swagger.json file |

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet