@kong-ui-public/spec-renderer 2.0.24 → 2.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49736,7 +49736,7 @@ const Jy = /* @__PURE__ */ tP(rP), Wg = "default", oP = "#3a3f51", aP = "#afb7c5
49736
49736
  for (const [Ya, ut] of ro)
49737
49737
  yo[Ya] = ut;
49738
49738
  return yo;
49739
- }, nP = (Gt) => (Yy("data-v-6c8a307a"), Gt = Gt(), Qy(), Gt), iP = ["aria-hidden"], sP = {
49739
+ }, nP = (Gt) => (Yy("data-v-7166aa42"), Gt = Gt(), Qy(), Gt), iP = ["aria-hidden"], sP = {
49740
49740
  key: 0,
49741
49741
  "data-testid": "kui-icon-svg-title"
49742
49742
  }, cP = /* @__PURE__ */ nP(() => /* @__PURE__ */ Rc("path", {
@@ -49835,7 +49835,7 @@ const Jy = /* @__PURE__ */ tP(rP), Wg = "default", oP = "#3a3f51", aP = "#afb7c5
49835
49835
  _: 1
49836
49836
  }, 8, ["aria-hidden", "style"]));
49837
49837
  }
49838
- }), uP = /* @__PURE__ */ ek(lP, [["__scopeId", "data-v-6c8a307a"]]), pP = (Gt) => (Yy("data-v-1e938d03"), Gt = Gt(), Qy(), Gt), dP = ["aria-hidden"], hP = {
49838
+ }), uP = /* @__PURE__ */ ek(lP, [["__scopeId", "data-v-7166aa42"]]), pP = (Gt) => (Yy("data-v-cce7dc60"), Gt = Gt(), Qy(), Gt), dP = ["aria-hidden"], hP = {
49839
49839
  key: 0,
49840
49840
  "data-testid": "kui-icon-svg-title"
49841
49841
  }, gP = /* @__PURE__ */ pP(() => /* @__PURE__ */ Rc("path", {
@@ -49934,7 +49934,7 @@ const Jy = /* @__PURE__ */ tP(rP), Wg = "default", oP = "#3a3f51", aP = "#afb7c5
49934
49934
  _: 1
49935
49935
  }, 8, ["aria-hidden", "style"]));
49936
49936
  }
49937
- }), mP = /* @__PURE__ */ ek(fP, [["__scopeId", "data-v-1e938d03"]]), bP = (Gt) => (Yy("data-v-3cb6a9d8"), Gt = Gt(), Qy(), Gt), vP = ["aria-hidden"], yP = {
49937
+ }), mP = /* @__PURE__ */ ek(fP, [["__scopeId", "data-v-cce7dc60"]]), bP = (Gt) => (Yy("data-v-0b81fdea"), Gt = Gt(), Qy(), Gt), vP = ["aria-hidden"], yP = {
49938
49938
  key: 0,
49939
49939
  "data-testid": "kui-icon-svg-title"
49940
49940
  }, kP = /* @__PURE__ */ bP(() => /* @__PURE__ */ Rc("path", {
@@ -50033,7 +50033,7 @@ const Jy = /* @__PURE__ */ tP(rP), Wg = "default", oP = "#3a3f51", aP = "#afb7c5
50033
50033
  _: 1
50034
50034
  }, 8, ["aria-hidden", "style"]));
50035
50035
  }
50036
- }), xP = /* @__PURE__ */ ek(wP, [["__scopeId", "data-v-3cb6a9d8"]]), EP = ["aria-controls", "aria-expanded", "aria-label"], SP = {
50036
+ }), xP = /* @__PURE__ */ ek(wP, [["__scopeId", "data-v-0b81fdea"]]), EP = ["aria-controls", "aria-expanded", "aria-label"], SP = {
50037
50037
  "aria-hidden": "true",
50038
50038
  class: "icon-wrapper"
50039
50039
  }, _P = {
@@ -214,4 +214,4 @@ div#sidebar {
214
214
  top: unset;
215
215
  left: unset;
216
216
  }
217
- `,a.setAttribute("data-testid","relative-sidebar-styles"),this.shadowRoot.appendChild(a)}Cn(this,Yl)&&R1.use({target:this.shadowRoot,testId:"hide-essentials-styles"});const r={hasSidebar:Cn(this,Nu),applicationRegistrationEnabled:Cn(this,zd),currentVersion:{version:Cn(this,Nd)},onViewSpecClick:()=>{this.dispatchEvent(new CustomEvent("clicked-view-spec",{bubbles:!0}))},onRegisterClick:()=>{this.dispatchEvent(new CustomEvent("clicked-register",{bubbles:!0}))},...Cn(this,Rd)};Qc(this,Cc,Lf({url:Cn(this,_p),spec:Cn(this,zu),domNode:this.rootElement,deepLinking:!0,filter:!0,presets:[Lf.presets.apis,Lf.SwaggerUIStandalonePreset],plugins:[Lf.plugins.DownloadUrl,y6.SwaggerUIKongTheme],layout:"KongLayout",theme:r}))}showOperation(r){if(!Cn(this,Cc))return!1;const a=wy(r);return Cn(this,Cc).layoutActions.show(a,!0),!0}hideOperation(r){if(!Cn(this,Cc))return!1;const a=wy(r);return Cn(this,Cc).layoutActions.show(a,!1),!0}scrollToOperation(r){if(!Cn(this,Cc))return!1;const a=xC(r);let i=this.shadowRoot.getElementById(a);if(!i){const x=this.shadowRoot.querySelector(`[data-tag='${r.tag}']`);if(!x||(x.click(),i=this.shadowRoot.getElementById(a),!i))return!1}const m=window.matchMedia("(prefers-reduced-motion: no-preference)");let _;m&&m.matches&&(_="smooth"),i.scrollIntoView({behavior:_})}get autoInit(){return Cn(this,Td)}set autoInit(r){Qc(this,Td,jg(r))}get hasSidebar(){return Cn(this,Nu)}set hasSidebar(r){Qc(this,Nu,jg(r))}get relativeSidebar(){return Cn(this,Ap)}set relativeSidebar(r){Qc(this,Ap,jg(r))}get essentialsOnly(){return Cn(this,Yl)}set essentialsOnly(r){Qc(this,Yl,jg(r))}get spec(){return Cn(this,zu)}set spec(r){if(!r)throw new Error("Spec cannot be empty");let a;typeof r=="string"?a=JSON.parse(r):typeof r=="object"&&(a=r),Qc(this,zu,a),Cn(this,Cc)&&Cn(this,Cc).getSystem().specActions.updateJsonSpec(Cn(this,zu))}get url(){return Cn(this,_p)}set url(r){Qc(this,_p,r)}get themeOverrides(){return Cn(this,Rd)}set themeOverrides(r){Qc(this,Rd,r)}get applicationRegistrationEnabled(){return Cn(this,zd)}set applicationRegistrationEnabled(r){Qc(this,zd,jg(r))}get currentVersion(){return Cn(this,Nd)}set currentVersion(r){Qc(this,Nd,r)}static get observedAttributes(){return["url","spec","auto-init","has-sidebar","relative-sidebar","essentials-only","application-registration-enabled","current-version","theme-overrides"]}}Td=new WeakMap,zu=new WeakMap,_p=new WeakMap,Nu=new WeakMap,Ap=new WeakMap,Yl=new WeakMap,Cc=new WeakMap,Rd=new WeakMap,zd=new WeakMap,Nd=new WeakMap,Ya(Ig,"name","kong-swagger-ui"),customElements.get(Ig.name)?console.warn(`Cannot register ${Ig.name}. Element is already defined, ignoring`):customElements.define(Ig.name,Ig)})()})();const tx=["application-registration-enabled","current-version","essentials-only","has-sidebar","relative-sidebar","spec","theme-overrides","url"],rx={key:1,"data-testid":"kong-public-ui-spec-details-error"},ox=St.defineComponent({__name:"SpecDetails",props:{document:{type:Object,default:null},url:{type:String,default:""},hasSidebar:{type:Boolean,default:!1},relativeSidebar:{type:Boolean,default:!1},themeOverrides:{type:Object,default:null},essentialsOnly:{type:Boolean,default:!1},activeOperation:{type:Object,default:null},applicationRegistrationEnabled:{type:Boolean,default:!1},currentVersion:{type:String,default:()=>{}}},setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.ref(null),ut=St.computed(()=>!!(ko.document||ko.url)),b=St.ref(!1),j=()=>{if(!nn.value)return;const o={...ko.activeOperation};if(o&&o.tag){const u=decodeURIComponent(o.tag.trim().replaceAll(/\s/g,"%20"));o.tag=u}nn.value.showOperation(o),nn.value.scrollToOperation(o),b.value=!0};return St.onMounted(()=>{ko.activeOperation&&j()}),St.watch(()=>ko.activeOperation,()=>{ko.activeOperation&&j()}),(o,u)=>(St.openBlock(),St.createElementBlock("div",{class:St.normalizeClass(["kong-public-ui-spec-details",{"active-op-focused":b.value}])},[ut.value?(St.openBlock(),St.createElementBlock("kong-swagger-ui",{key:0,ref_key:"swaggerRef",ref:nn,"application-registration-enabled":sr.applicationRegistrationEnabled,"current-version":sr.currentVersion,"data-testid":"kong-public-ui-spec-details-swagger","essentials-only":sr.essentialsOnly,"has-sidebar":sr.hasSidebar,"relative-sidebar":sr.relativeSidebar,spec:sr.document,"theme-overrides":encodeURIComponent(JSON.stringify(sr.themeOverrides)),url:sr.url},null,8,tx)):(St.openBlock(),St.createElementBlock("div",rx,St.toDisplayString(St.unref(Fo).t("specDetails.error")),1))],2))}}),Md=(sr,ko)=>{const Fo=sr.__vccOpts||sr;for(const[nn,ut]of ko)Fo[nn]=ut;return Fo},By=Md(ox,[["__scopeId","data-v-71bf6e29"]]);let $g;const ax=new Uint8Array(16);function nx(){if(!$g&&($g=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$g))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $g(ax)}const ls=[];for(let sr=0;sr<256;++sr)ls.push((sr+256).toString(16).slice(1));function ix(sr,ko=0){return ls[sr[ko+0]]+ls[sr[ko+1]]+ls[sr[ko+2]]+ls[sr[ko+3]]+"-"+ls[sr[ko+4]]+ls[sr[ko+5]]+"-"+ls[sr[ko+6]]+ls[sr[ko+7]]+"-"+ls[sr[ko+8]]+ls[sr[ko+9]]+"-"+ls[sr[ko+10]]+ls[sr[ko+11]]+ls[sr[ko+12]]+ls[sr[ko+13]]+ls[sr[ko+14]]+ls[sr[ko+15]]}let Dy,F0,$0=0,U0=0;function sx(sr,ko,Fo){let nn=ko&&Fo||0;const ut=ko||new Array(16);sr=sr||{};let b=sr.node||Dy,j=sr.clockseq!==void 0?sr.clockseq:F0;if(b==null||j==null){const O=sr.random||(sr.rng||nx)();b==null&&(b=Dy=[O[0]|1,O[1],O[2],O[3],O[4],O[5]]),j==null&&(j=F0=(O[6]<<8|O[7])&16383)}let o=sr.msecs!==void 0?sr.msecs:Date.now(),u=sr.nsecs!==void 0?sr.nsecs:U0+1;const v=o-$0+(u-U0)/1e4;if(v<0&&sr.clockseq===void 0&&(j=j+1&16383),(v<0||o>$0)&&sr.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");$0=o,U0=u,F0=j,o+=122192928e5;const S=((o&268435455)*1e4+u)%4294967296;ut[nn++]=S>>>24&255,ut[nn++]=S>>>16&255,ut[nn++]=S>>>8&255,ut[nn++]=S&255;const w=o/4294967296*1e4&268435455;ut[nn++]=w>>>8&255,ut[nn++]=w&255,ut[nn++]=w>>>24&15|16,ut[nn++]=w>>>16&255,ut[nn++]=j>>>8|128,ut[nn++]=j&255;for(let O=0;O<6;++O)ut[nn+O]=b[O];return ko||ix(ut)}var Ug=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cx(sr){return sr&&sr.__esModule&&Object.prototype.hasOwnProperty.call(sr,"default")?sr.default:sr}var qg={exports:{}};qg.exports,function(sr,ko){var Fo=200,nn="__lodash_hash_undefined__",ut=9007199254740991,b="[object Arguments]",j="[object Array]",o="[object Boolean]",u="[object Date]",v="[object Error]",S="[object Function]",w="[object GeneratorFunction]",O="[object Map]",I="[object Number]",p="[object Object]",n="[object Promise]",l="[object RegExp]",d="[object Set]",s="[object String]",g="[object Symbol]",k="[object WeakMap]",E="[object ArrayBuffer]",f="[object DataView]",A="[object Float32Array]",P="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",F="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,re=/\w*$/,Y=/^\[object .+?Constructor\]$/,le=/^(?:0|[1-9]\d*)$/,Q={};Q[b]=Q[j]=Q[E]=Q[f]=Q[o]=Q[u]=Q[A]=Q[P]=Q[R]=Q[D]=Q[F]=Q[O]=Q[I]=Q[p]=Q[l]=Q[d]=Q[s]=Q[g]=Q[M]=Q[N]=Q[U]=Q[W]=!0,Q[v]=Q[S]=Q[k]=!1;var fe=typeof Ug=="object"&&Ug&&Ug.Object===Object&&Ug,ne=typeof self=="object"&&self&&self.Object===Object&&self,ae=fe||ne||Function("return this")(),me=ko&&!ko.nodeType&&ko,Pe=me&&!0&&sr&&!sr.nodeType&&sr,Fe=Pe&&Pe.exports===me;function ze(We,ar){return We.set(ar[0],ar[1]),We}function $e(We,ar){return We.add(ar),We}function Je(We,ar){for(var Nr=-1,yo=We?We.length:0;++Nr<yo&&ar(We[Nr],Nr,We)!==!1;);return We}function Te(We,ar){for(var Nr=-1,yo=ar.length,On=We.length;++Nr<yo;)We[On+Nr]=ar[Nr];return We}function Ae(We,ar,Nr,yo){var On=-1,Kn=We?We.length:0;for(yo&&Kn&&(Nr=We[++On]);++On<Kn;)Nr=ar(Nr,We[On],On,We);return Nr}function lt(We,ar){for(var Nr=-1,yo=Array(We);++Nr<We;)yo[Nr]=ar(Nr);return yo}function dt(We,ar){return We==null?void 0:We[ar]}function Pt(We){var ar=!1;if(We!=null&&typeof We.toString!="function")try{ar=!!(We+"")}catch{}return ar}function Vt(We){var ar=-1,Nr=Array(We.size);return We.forEach(function(yo,On){Nr[++ar]=[On,yo]}),Nr}function yr(We,ar){return function(Nr){return We(ar(Nr))}}function Jt(We){var ar=-1,Nr=Array(We.size);return We.forEach(function(yo){Nr[++ar]=yo}),Nr}var Ar=Array.prototype,ur=Function.prototype,Or=Object.prototype,Br=ae["__core-js_shared__"],kr=function(){var We=/[^.]+$/.exec(Br&&Br.keys&&Br.keys.IE_PROTO||"");return We?"Symbol(src)_1."+We:""}(),Bt=ur.toString,De=Or.hasOwnProperty,et=Or.toString,At=RegExp("^"+Bt.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ke=Fe?ae.Buffer:void 0,Ze=ae.Symbol,jt=ae.Uint8Array,Dt=yr(Object.getPrototypeOf,Object),xr=Object.create,X=Or.propertyIsEnumerable,pe=Ar.splice,ke=Object.getOwnPropertySymbols,Ve=Ke?Ke.isBuffer:void 0,ot=yr(Object.keys,Object),pt=Mn(ae,"DataView"),Ge=Mn(ae,"Map"),Ot=Mn(ae,"Promise"),hr=Mn(ae,"Set"),_t=Mn(ae,"WeakMap"),Ie=Mn(Object,"create"),He=oi(pt),Qe=oi(Ge),vt=oi(Ot),_r=oi(hr),Sr=oi(_t),Zr=Ze?Ze.prototype:void 0,Xr=Zr?Zr.valueOf:void 0;function bo(We){var ar=-1,Nr=We?We.length:0;for(this.clear();++ar<Nr;){var yo=We[ar];this.set(yo[0],yo[1])}}function zt(){this.__data__=Ie?Ie(null):{}}function Er(We){return this.has(We)&&delete this.__data__[We]}function Gr(We){var ar=this.__data__;if(Ie){var Nr=ar[We];return Nr===nn?void 0:Nr}return De.call(ar,We)?ar[We]:void 0}function go(We){var ar=this.__data__;return Ie?ar[We]!==void 0:De.call(ar,We)}function Po(We,ar){var Nr=this.__data__;return Nr[We]=Ie&&ar===void 0?nn:ar,this}bo.prototype.clear=zt,bo.prototype.delete=Er,bo.prototype.get=Gr,bo.prototype.has=go,bo.prototype.set=Po;function so(We){var ar=-1,Nr=We?We.length:0;for(this.clear();++ar<Nr;){var yo=We[ar];this.set(yo[0],yo[1])}}function Io(){this.__data__=[]}function Oo(We){var ar=this.__data__,Nr=mt(ar,We);if(Nr<0)return!1;var yo=ar.length-1;return Nr==yo?ar.pop():pe.call(ar,Nr,1),!0}function Mo(We){var ar=this.__data__,Nr=mt(ar,We);return Nr<0?void 0:ar[Nr][1]}function Oa(We){return mt(this.__data__,We)>-1}function yn(We,ar){var Nr=this.__data__,yo=mt(Nr,We);return yo<0?Nr.push([We,ar]):Nr[yo][1]=ar,this}so.prototype.clear=Io,so.prototype.delete=Oo,so.prototype.get=Mo,so.prototype.has=Oa,so.prototype.set=yn;function aa(We){var ar=-1,Nr=We?We.length:0;for(this.clear();++ar<Nr;){var yo=We[ar];this.set(yo[0],yo[1])}}function Jo(){this.__data__={hash:new bo,map:new(Ge||so),string:new bo}}function Pa(We){return vi(this,We).delete(We)}function qa(We){return vi(this,We).get(We)}function rr(We){return vi(this,We).has(We)}function pr(We,ar){return vi(this,We).set(We,ar),this}aa.prototype.clear=Jo,aa.prototype.delete=Pa,aa.prototype.get=qa,aa.prototype.has=rr,aa.prototype.set=pr;function nr(We){this.__data__=new so(We)}function Qr(){this.__data__=new so}function cr(We){return this.__data__.delete(We)}function ha(We){return this.__data__.get(We)}function no(We){return this.__data__.has(We)}function st(We,ar){var Nr=this.__data__;if(Nr instanceof so){var yo=Nr.__data__;if(!Ge||yo.length<Fo-1)return yo.push([We,ar]),this;Nr=this.__data__=new aa(yo)}return Nr.set(We,ar),this}nr.prototype.clear=Qr,nr.prototype.delete=cr,nr.prototype.get=ha,nr.prototype.has=no,nr.prototype.set=st;function Ee(We,ar){var Nr=ei(We)||Li(We)?lt(We.length,String):[],yo=Nr.length,On=!!yo;for(var Kn in We)(ar||De.call(We,Kn))&&!(On&&(Kn=="length"||zi(Kn,yo)))&&Nr.push(Kn);return Nr}function Ue(We,ar,Nr){var yo=We[ar];(!(De.call(We,ar)&&Mi(yo,Nr))||Nr===void 0&&!(ar in We))&&(We[ar]=Nr)}function mt(We,ar){for(var Nr=We.length;Nr--;)if(Mi(We[Nr][0],ar))return Nr;return-1}function Ft(We,ar){return We&&ja(ar,vo(ar),We)}function wr(We,ar,Nr,yo,On,Kn,ti){var ui;if(yo&&(ui=Kn?yo(We,On,Kn,ti):yo(We)),ui!==void 0)return ui;if(!xt(We))return We;var $i=ei(We);if($i){if(ui=Ri(We),!ar)return zn(We,ui)}else{var Yn=ln(We),Ui=Yn==S||Yn==w;if(ji(We))return Ro(We,ar);if(Yn==p||Yn==b||Ui&&!Kn){if(Pt(We))return Kn?We:{};if(ui=Ln(Ui?{}:We),!ar)return ma(We,Ft(ui,We))}else{if(!Q[Yn])return Kn?We:{};ui=za(We,Yn,wr,ar)}}ti||(ti=new nr);var ec=ti.get(We);if(ec)return ec;if(ti.set(We,ui),!$i)var xs=Nr?Zn(We):vo(We);return Je(xs||We,function(Xa,Es){xs&&(Es=Xa,Xa=We[Es]),Ue(ui,Es,wr(Xa,ar,Nr,yo,Es,We,ti))}),ui}function gt(We){return xt(We)?xr(We):{}}function Lt(We,ar,Nr){var yo=ar(We);return ei(We)?yo:Te(yo,Nr(We))}function Tr(We){return et.call(We)}function gr(We){if(!xt(We)||fn(We))return!1;var ar=dn(We)||Pt(We)?At:Y;return ar.test(oi(We))}function lo(We){if(!li(We))return ot(We);var ar=[];for(var Nr in Object(We))De.call(We,Nr)&&Nr!="constructor"&&ar.push(Nr);return ar}function Ro(We,ar){if(ar)return We.slice();var Nr=new We.constructor(We.length);return We.copy(Nr),Nr}function ga(We){var ar=new We.constructor(We.byteLength);return new jt(ar).set(new jt(We)),ar}function ka(We,ar){var Nr=ar?ga(We.buffer):We.buffer;return new We.constructor(Nr,We.byteOffset,We.byteLength)}function Qa(We,ar,Nr){var yo=ar?Nr(Vt(We),!0):Vt(We);return Ae(yo,ze,new We.constructor)}function gn(We){var ar=new We.constructor(We.source,re.exec(We));return ar.lastIndex=We.lastIndex,ar}function Rn(We,ar,Nr){var yo=ar?Nr(Jt(We),!0):Jt(We);return Ae(yo,$e,new We.constructor)}function Qo(We){return Xr?Object(Xr.call(We)):{}}function on(We,ar){var Nr=ar?ga(We.buffer):We.buffer;return new We.constructor(Nr,We.byteOffset,We.length)}function zn(We,ar){var Nr=-1,yo=We.length;for(ar||(ar=Array(yo));++Nr<yo;)ar[Nr]=We[Nr];return ar}function ja(We,ar,Nr,yo){Nr||(Nr={});for(var On=-1,Kn=ar.length;++On<Kn;){var ti=ar[On],ui=yo?yo(Nr[ti],We[ti],ti,Nr,We):void 0;Ue(Nr,ti,ui===void 0?We[ti]:ui)}return Nr}function ma(We,ar){return ja(We,cn(We),ar)}function Zn(We){return Lt(We,vo,cn)}function vi(We,ar){var Nr=We.__data__;return us(ar)?Nr[typeof ar=="string"?"string":"hash"]:Nr.map}function Mn(We,ar){var Nr=dt(We,ar);return gr(Nr)?Nr:void 0}var cn=ke?yr(ke,Object):No,ln=Tr;(pt&&ln(new pt(new ArrayBuffer(1)))!=f||Ge&&ln(new Ge)!=O||Ot&&ln(Ot.resolve())!=n||hr&&ln(new hr)!=d||_t&&ln(new _t)!=k)&&(ln=function(We){var ar=et.call(We),Nr=ar==p?We.constructor:void 0,yo=Nr?oi(Nr):void 0;if(yo)switch(yo){case He:return f;case Qe:return O;case vt:return n;case _r:return d;case Sr:return k}return ar});function Ri(We){var ar=We.length,Nr=We.constructor(ar);return ar&&typeof We[0]=="string"&&De.call(We,"index")&&(Nr.index=We.index,Nr.input=We.input),Nr}function Ln(We){return typeof We.constructor=="function"&&!li(We)?gt(Dt(We)):{}}function za(We,ar,Nr,yo){var On=We.constructor;switch(ar){case E:return ga(We);case o:case u:return new On(+We);case f:return ka(We,yo);case A:case P:case R:case D:case F:case M:case N:case U:case W:return on(We,yo);case O:return Qa(We,yo,Nr);case I:case s:return new On(We);case l:return gn(We);case d:return Rn(We,yo,Nr);case g:return Qo(We)}}function zi(We,ar){return ar=ar??ut,!!ar&&(typeof We=="number"||le.test(We))&&We>-1&&We%1==0&&We<ar}function us(We){var ar=typeof We;return ar=="string"||ar=="number"||ar=="symbol"||ar=="boolean"?We!=="__proto__":We===null}function fn(We){return!!kr&&kr in We}function li(We){var ar=We&&We.constructor,Nr=typeof ar=="function"&&ar.prototype||Or;return We===Nr}function oi(We){if(We!=null){try{return Bt.call(We)}catch{}try{return We+""}catch{}}return""}function Ji(We){return wr(We,!0,!0)}function Mi(We,ar){return We===ar||We!==We&&ar!==ar}function Li(We){return Fi(We)&&De.call(We,"callee")&&(!X.call(We,"callee")||et.call(We)==b)}var ei=Array.isArray;function Ha(We){return We!=null&&ps(We.length)&&!dn(We)}function Fi(We){return ao(We)&&Ha(We)}var ji=Ve||kn;function dn(We){var ar=xt(We)?et.call(We):"";return ar==S||ar==w}function ps(We){return typeof We=="number"&&We>-1&&We%1==0&&We<=ut}function xt(We){var ar=typeof We;return!!We&&(ar=="object"||ar=="function")}function ao(We){return!!We&&typeof We=="object"}function vo(We){return Ha(We)?Ee(We):lo(We)}function No(){return[]}function kn(){return!1}sr.exports=Ji}(qg,qg.exports);var lx=qg.exports;const q0=cx(lx),Pp="default",ux="#3a3f51",px="#afb7c5",My="20px",Ip="24px",K0=(sr,ko)=>{const Fo=sr.__vccOpts||sr;for(const[nn,ut]of ko)Fo[nn]=ut;return Fo},dx=sr=>(St.pushScopeId("data-v-6c8a307a"),sr=sr(),St.popScopeId(),sr),hx=["aria-hidden"],gx={key:0,"data-testid":"kui-icon-svg-title"},fx=dx(()=>St.createElementVNode("path",{d:"M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",fill:"currentColor"},null,-1)),mx=St.defineComponent({__name:"ChevronDownIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ip,validator:sr=>{if(typeof sr=="number"&&sr>0)return!0;if(typeof sr=="string"){const ko=String(sr).replace(/px/gi,""),Fo=Number(ko);if(Fo&&!isNaN(Fo)&&Number.isInteger(Fo)&&Fo>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(sr){const ko=sr,Fo=St.computed(()=>{if(typeof ko.size=="number"&&ko.size>0)return`${ko.size}px`;if(typeof ko.size=="string"){const ut=String(ko.size).replace(/px/gi,""),b=Number(ut);if(b&&!isNaN(b)&&Number.isInteger(b)&&b>0)return`${b}px`}return Ip}),nn=St.computed(()=>({boxSizing:"border-box",color:ko.color,display:ko.display,height:Fo.value,lineHeight:"0",width:Fo.value}));return(ut,b)=>(St.openBlock(),St.createBlock(St.resolveDynamicComponent(sr.as),{"aria-hidden":sr.decorative?"true":void 0,class:"kui-icon chevron-down-icon","data-testid":"kui-icon-wrapper-chevron-down-icon",style:St.normalizeStyle(nn.value)},{default:St.withCtx(()=>[(St.openBlock(),St.createElementBlock("svg",{"aria-hidden":sr.decorative?"true":void 0,"data-testid":"kui-icon-svg-chevron-down-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[sr.title?(St.openBlock(),St.createElementBlock("title",gx,St.toDisplayString(sr.title),1)):St.createCommentVNode("",!0),fx],8,hx))]),_:1},8,["aria-hidden","style"]))}}),bx=K0(mx,[["__scopeId","data-v-6c8a307a"]]),vx=sr=>(St.pushScopeId("data-v-1e938d03"),sr=sr(),St.popScopeId(),sr),yx=["aria-hidden"],kx={key:0,"data-testid":"kui-icon-svg-title"},wx=vx(()=>St.createElementVNode("path",{d:"M9.4 18L8 16.6L12.6 12L8 7.4L9.4 6L15.4 12L9.4 18Z",fill:"currentColor"},null,-1)),xx=St.defineComponent({__name:"ChevronRightIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ip,validator:sr=>{if(typeof sr=="number"&&sr>0)return!0;if(typeof sr=="string"){const ko=String(sr).replace(/px/gi,""),Fo=Number(ko);if(Fo&&!isNaN(Fo)&&Number.isInteger(Fo)&&Fo>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(sr){const ko=sr,Fo=St.computed(()=>{if(typeof ko.size=="number"&&ko.size>0)return`${ko.size}px`;if(typeof ko.size=="string"){const ut=String(ko.size).replace(/px/gi,""),b=Number(ut);if(b&&!isNaN(b)&&Number.isInteger(b)&&b>0)return`${b}px`}return Ip}),nn=St.computed(()=>({boxSizing:"border-box",color:ko.color,display:ko.display,height:Fo.value,lineHeight:"0",width:Fo.value}));return(ut,b)=>(St.openBlock(),St.createBlock(St.resolveDynamicComponent(sr.as),{"aria-hidden":sr.decorative?"true":void 0,class:"kui-icon chevron-right-icon","data-testid":"kui-icon-wrapper-chevron-right-icon",style:St.normalizeStyle(nn.value)},{default:St.withCtx(()=>[(St.openBlock(),St.createElementBlock("svg",{"aria-hidden":sr.decorative?"true":void 0,"data-testid":"kui-icon-svg-chevron-right-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[sr.title?(St.openBlock(),St.createElementBlock("title",kx,St.toDisplayString(sr.title),1)):St.createCommentVNode("",!0),wx],8,yx))]),_:1},8,["aria-hidden","style"]))}}),Ex=K0(xx,[["__scopeId","data-v-1e938d03"]]),Sx=sr=>(St.pushScopeId("data-v-3cb6a9d8"),sr=sr(),St.popScopeId(),sr),_x=["aria-hidden"],Ax={key:0,"data-testid":"kui-icon-svg-title"},Ox=Sx(()=>St.createElementVNode("path",{d:"M10 18V16H14V18H10ZM6 13V11H18V13H6ZM3 8V6H21V8H3Z",fill:"currentColor"},null,-1)),jx=St.defineComponent({__name:"FilterIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ip,validator:sr=>{if(typeof sr=="number"&&sr>0)return!0;if(typeof sr=="string"){const ko=String(sr).replace(/px/gi,""),Fo=Number(ko);if(Fo&&!isNaN(Fo)&&Number.isInteger(Fo)&&Fo>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(sr){const ko=sr,Fo=St.computed(()=>{if(typeof ko.size=="number"&&ko.size>0)return`${ko.size}px`;if(typeof ko.size=="string"){const ut=String(ko.size).replace(/px/gi,""),b=Number(ut);if(b&&!isNaN(b)&&Number.isInteger(b)&&b>0)return`${b}px`}return Ip}),nn=St.computed(()=>({boxSizing:"border-box",color:ko.color,display:ko.display,height:Fo.value,lineHeight:"0",width:Fo.value}));return(ut,b)=>(St.openBlock(),St.createBlock(St.resolveDynamicComponent(sr.as),{"aria-hidden":sr.decorative?"true":void 0,class:"kui-icon filter-icon","data-testid":"kui-icon-wrapper-filter-icon",style:St.normalizeStyle(nn.value)},{default:St.withCtx(()=>[(St.openBlock(),St.createElementBlock("svg",{"aria-hidden":sr.decorative?"true":void 0,"data-testid":"kui-icon-svg-filter-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[sr.title?(St.openBlock(),St.createElementBlock("title",Ax,St.toDisplayString(sr.title),1)):St.createCommentVNode("",!0),Ox],8,_x))]),_:1},8,["aria-hidden","style"]))}}),Cx=K0(jx,[["__scopeId","data-v-3cb6a9d8"]]),Px=["aria-controls","aria-expanded","aria-label"],Ix={"aria-hidden":"true",class:"icon-wrapper"},Tx={"aria-hidden":"true",class:"label truncated"},Rx=["title"],Ly=Md(St.defineComponent({__name:"OperationsListSectionHeader",props:{isCollapsed:{type:Boolean,required:!0},name:{type:String,required:!0},description:{type:String,default:void 0},contentElementId:{type:String,required:!0}},emits:["toggle"],setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.computed(()=>ko.isCollapsed?Fo.t("specOperationsList.section.expandAriaLabel",{section:`"${ko.name}"`}):Fo.t("specOperationsList.section.collapseAriaLabel",{section:`"${ko.name}"`}));return(ut,b)=>(St.openBlock(),St.createElementBlock("button",{"aria-controls":sr.contentElementId,"aria-expanded":sr.isCollapsed?"false":"true","aria-label":nn.value,class:St.normalizeClass(["header",{"header--collapsed":sr.isCollapsed}]),type:"button",onClick:b[0]||(b[0]=j=>ut.$emit("toggle"))},[St.createElementVNode("div",Ix,[sr.isCollapsed?(St.openBlock(),St.createBlock(St.unref(Ex),{key:0,color:`var(--kong-ui-spec-renderer-operations-list-section-icon-color-collapsed, ${St.unref(px)})`,size:St.unref(My)},null,8,["color","size"])):(St.openBlock(),St.createBlock(St.unref(bx),{key:1,color:`var(--kong-ui-spec-renderer-operations-list-section-icon-color-expanded, ${St.unref(ux)})`,icon:"chevronDown",size:St.unref(My)},null,8,["color","size"]))]),St.createElementVNode("h1",Tx,St.toDisplayString(sr.name),1),St.createElementVNode("div",{class:"description truncated",title:sr.description},St.toDisplayString(sr.description),9,Rx)],10,Px))}}),[["__scopeId","data-v-98e20a36"]]),zx=["data-testid"],Nx=["title"],Bx={class:"details"},Dx=["aria-label","title"],Fy=Md(St.defineComponent({__name:"OperationsListItem",props:{item:{type:Object,required:!0,validator:sr=>sr.method!==void 0&&sr.summary!==void 0&&sr.path!==void 0},isSelected:{type:Boolean,default:!1},disableSelection:{type:Boolean,default:!1}},emits:["click"],setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.computed(()=>{var b,j;return`spec-operations-list-item-${(b=ko.item.method)==null?void 0:b.toLowerCase()}${(j=ko.item.path)==null?void 0:j.replaceAll("/","-")}-${ko.item.tag||"-"}`}),ut=St.computed(()=>ko.item.method||"");return(b,j)=>{const o=St.resolveComponent("KBadge");return St.openBlock(),St.createElementBlock("button",{class:St.normalizeClass(["spec-operations-list-item",{"item--selected":sr.isSelected,[`item--method-${sr.item.method}`]:!0,disabled:sr.disableSelection}]),"data-testid":nn.value,type:"button",onClick:j[0]||(j[0]=u=>b.$emit("click",sr.item))},[sr.item.summary?(St.openBlock(),St.createElementBlock("h2",{key:0,class:"summary truncated",title:sr.item.summary},St.toDisplayString(sr.item.summary),9,Nx)):St.createCommentVNode("",!0),St.createElementVNode("div",Bx,[St.createVNode(o,{appearance:"custom","aria-label":St.unref(Fo).t("specOperationsList.item.methodAriaLabel",{method:ut.value.toUpperCase()}),"background-color":"var(--kong-ui-spec-renderer-operations-list-item-method-background)",class:"method-badge",color:"var(--kong-ui-spec-renderer-operations-list-item-method-color)",tabindex:"-1"},{default:St.withCtx(()=>[St.createTextVNode(St.toDisplayString(ut.value.toUpperCase()),1)]),_:1},8,["aria-label"]),St.createElementVNode("span",{"aria-label":St.unref(Fo).t("specOperationsList.item.pathAriaLabel",{path:sr.item.path}),class:"path truncated",title:sr.item.path},St.toDisplayString(sr.item.path),9,Dx)])],10,zx)}}}),[["__scopeId","data-v-5610ea54"]]),Mx=["aria-label"],Lx={key:0},Fx={key:0,class:"filter-wrapper"},$x={key:1},Ux=["data-testid"],qx=["id"],Kx={key:0,class:"section","data-testid":"spec-operations-list-untagged-items"},Hx=["id"],Vx={key:2,"data-testid":"kong-ui-public-spec-operations-list-empty"},Wx={class:"center"},Jx={key:1,"data-testid":"kong-ui-public-spec-operations-list-error"},{getSizeFromString:Gx,hasRequiredProps:$y}=Du.useUtilities(),Uy=Md(St.defineComponent({__name:"SpecOperationsList",props:{operations:{type:Array,required:!0,validator:sr=>!sr.length||$y(sr,["method","path"])},tags:{type:Array,default:()=>[],validator:sr=>!sr.length||$y(sr,["name"])},isFilterable:{type:Boolean,default:!0},filterFunction:{type:Function,default:({items:sr,query:ko})=>(ko=ko.toLowerCase(),sr.filter(Fo=>Fo.tag&&Fo.tag.toLowerCase().includes(ko))),validator:sr=>!!sr&&typeof sr=="function"},deselect:{type:Boolean,default:!1},disableSelection:{type:Boolean,default:!1},width:{type:String,default:"210"}},emits:["selected"],setup(sr,{emit:ko}){const Fo=sr,nn=ko,{i18n:ut}=Du.useI18n(),b=St.computed(()=>sx()),j=St.ref(""),o=St.ref([]),u=St.ref(),v=St.ref([]),S=()=>{const k=o.value;if(!Fo.isFilterable){v.value=k;return}if(!Fo.filterFunction||typeof Fo.filterFunction!="function")throw new Error(`filterFunction property must be a function, got ${typeof Fo.filterFunction}`);v.value=Fo.filterFunction({items:k,query:j.value})},w=St.computed(()=>Gx(Fo.width)),O=St.computed(()=>{const k=[];return v.value.forEach(E=>{E.tag&&!k.includes(E.tag)&&k.push(E.tag)}),k}),I=St.computed(()=>o.value.filter(k=>!k.tag)),p=k=>{if(!Fo.tags||!Array.isArray(Fo.tags))return"";const E=Fo.tags.find(f=>f.name===k);return(E==null?void 0:E.description)||""},n=k=>v.value.filter(E=>E.tag===k),l=k=>{const E=u.value;return!!E&&E.path===k.path&&E.method===k.method&&E.operationId===k.operationId&&E.tag===k.tag},d=k=>`${b.value}-section-${k.toLowerCase()}`,s=k=>{Fo.disableSelection||(u.value=k,nn("selected",k))},g=()=>{o.value=[],Fo.operations&&(Fo.operations.forEach(k=>{var f;const E=q0(k);(f=k.tags)!=null&&f.length?k.tags.forEach(A=>{delete E.tags,E.tag=A,o.value.push(q0(E))}):(delete E.tags,E.tag=null,o.value.push(q0(E)))}),S())};return St.watch(()=>Fo.deselect,()=>{Fo.deselect&&(u.value=void 0)}),St.watch(()=>Fo.operations,()=>g()),St.watch(j,()=>S()),St.onMounted(()=>{g()}),(k,E)=>{const f=St.resolveComponent("KInput"),A=St.resolveComponent("KCollapse");return St.openBlock(),St.createElementBlock("section",{"aria-label":St.unref(ut).t("specOperationsList.ariaLabel"),class:"kong-ui-public-spec-operations-list","data-testid":"kong-ui-public-spec-operations-list",role:"navigation",style:St.normalizeStyle({width:w.value})},[sr.operations?(St.openBlock(),St.createElementBlock("div",Lx,[sr.isFilterable?(St.openBlock(),St.createElementBlock("div",Fx,[St.createVNode(f,{modelValue:j.value,"onUpdate:modelValue":E[0]||(E[0]=P=>j.value=P),class:"filter-input","data-testid":"spec-operations-list-filter",placeholder:St.unref(ut).t("specOperationsList.filterPlaceholder")},{before:St.withCtx(()=>[St.createVNode(St.unref(Cx),{decorative:""})]),_:1},8,["modelValue","placeholder"])])):St.createCommentVNode("",!0),v.value.length?(St.openBlock(),St.createElementBlock("div",$x,[(St.openBlock(!0),St.createElementBlock(St.Fragment,null,St.renderList(O.value,P=>(St.openBlock(),St.createElementBlock("div",{key:P,class:"section-wrapper","data-testid":`spec-operations-list-section-${P.toLowerCase().replaceAll(" ","-")}`},[St.createVNode(A,{"model-value":!1,"trigger-alignment":"leading"},{trigger:St.withCtx(({isCollapsed:R,toggle:D})=>[St.createVNode(Ly,{"content-element-id":d(P),"data-testid":`spec-operations-list-section-${P.toLowerCase().replaceAll(" ","-")}-collapse-trigger`,description:p(P),"is-collapsed":R,name:P,onToggle:D},null,8,["content-element-id","data-testid","description","is-collapsed","name","onToggle"])]),default:St.withCtx(()=>[St.createElementVNode("div",{id:d(P)},[(St.openBlock(!0),St.createElementBlock(St.Fragment,null,St.renderList(n(P),R=>St.renderSlot(k.$slots,"item",{key:`${R.path}-${R.method}`,item:R,section:P,select:()=>s(R)},()=>[St.createVNode(Fy,{"disable-selection":sr.disableSelection,"is-selected":l(R),item:R,section:P,onClick:s},null,8,["disable-selection","is-selected","item","section"])],!0)),128))],8,qx)]),_:2},1024)],8,Ux))),128)),!sr.isFilterable||!j.value?(St.openBlock(),St.createElementBlock("div",Kx,[St.createVNode(A,{"model-value":!1,"trigger-alignment":"leading"},{trigger:St.withCtx(({isCollapsed:P,toggle:R})=>[St.createVNode(Ly,{"content-element-id":d(St.unref(Pp)),"data-testid":"spec-operations-list-section-untagged-collapse-trigger",description:p(St.unref(Pp)),"is-collapsed":P,name:St.unref(Pp),onToggle:R},null,8,["content-element-id","description","is-collapsed","name","onToggle"])]),default:St.withCtx(()=>[St.createElementVNode("div",{id:d(St.unref(Pp))},[(St.openBlock(!0),St.createElementBlock(St.Fragment,null,St.renderList(I.value,P=>St.renderSlot(k.$slots,"untagged-item",{key:`${P.path}-${P.method}`,item:P,section:St.unref(Pp),select:()=>s(P)},()=>[St.createVNode(Fy,{"disable-selection":sr.disableSelection,"is-selected":l(P),item:P,onClick:s},null,8,["disable-selection","is-selected","item"])],!0)),128))],8,Hx)]),_:3})])):St.createCommentVNode("",!0)])):(St.openBlock(),St.createElementBlock("div",Vx,[St.renderSlot(k.$slots,"empty-state",{},()=>[St.createElementVNode("div",Wx,St.toDisplayString(St.unref(ut).t("specOperationsList.noResults")),1)],!0)]))])):(St.openBlock(),St.createElementBlock("div",Jx,[St.renderSlot(k.$slots,"error-state",{},()=>[St.createTextVNode(St.toDisplayString(St.unref(ut).t("specOperationsList.error")),1)],!0)]))],12,Mx)}}}),[["__scopeId","data-v-751da895"]]),Zx={class:"kong-ui-public-spec-renderer"},Yx={key:0,class:"spec-container"},Qx={class:"spec-renderer-ops-list-empty-state","data-testid":"spec-renderer-ops-list-empty-state"},Xx={key:1,"data-testid":"kong-ui-public-spec-renderer-error"},{hasRequiredProps:qy}=Du.useUtilities(),e2=Md(St.defineComponent({__name:"SpecRenderer",props:{spec:{type:Object,required:!0},essentialsOnly:{type:Boolean,default:!1},operationsList:{type:Array,required:!0,validator:sr=>!sr.length||qy(sr,["method","path"])},tags:{type:Array,default:()=>[],validator:sr=>!sr.length||qy(sr,["name"])},navWidth:{type:String,default:"310"},deselect:{type:Boolean,default:!1}},setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.computed(()=>!!(ko.spec&&ko.operationsList)),ut=St.ref(),b=j=>{ut.value=j};return(j,o)=>{const u=St.resolveComponent("KEmptyState");return St.openBlock(),St.createElementBlock("div",Zx,[nn.value?(St.openBlock(),St.createElementBlock("div",Yx,[St.createVNode(Uy,{"data-testid":"spec-renderer-ops-list-content",deselect:sr.deselect,operations:sr.operationsList,tags:sr.tags,width:sr.navWidth,onSelected:b},{"empty-state":St.withCtx(()=>[St.createElementVNode("div",Qx,[St.renderSlot(j.$slots,"ops-list-empty-state",{},void 0,!0)])]),_:3},8,["deselect","operations","tags","width"]),St.createVNode(By,{"active-operation":ut.value,class:"spec-renderer-details","data-testid":"spec-renderer-details-content",document:sr.spec,"essentials-only":sr.essentialsOnly,"has-sidebar":!1},null,8,["active-operation","document","essentials-only"])])):(St.openBlock(),St.createElementBlock("div",Xx,[St.renderSlot(j.$slots,"error-state",{},()=>[St.createVNode(u,{"cta-is-hidden":"","icon-size":"50","is-error":!0},{title:St.withCtx(()=>[St.createTextVNode(St.toDisplayString(St.unref(Fo).t("specRenderer.error")),1)]),_:1})],!0)]))])}}}),[["__scopeId","data-v-573e5489"]]);qn.DEFAULT_UNTAGGED_SECTION_NAME=Pp,qn.SpecDetails=By,qn.SpecOperationsList=Uy,qn.SpecRenderer=e2,Object.defineProperty(qn,Symbol.toStringTag,{value:"Module"})});
217
+ `,a.setAttribute("data-testid","relative-sidebar-styles"),this.shadowRoot.appendChild(a)}Cn(this,Yl)&&R1.use({target:this.shadowRoot,testId:"hide-essentials-styles"});const r={hasSidebar:Cn(this,Nu),applicationRegistrationEnabled:Cn(this,zd),currentVersion:{version:Cn(this,Nd)},onViewSpecClick:()=>{this.dispatchEvent(new CustomEvent("clicked-view-spec",{bubbles:!0}))},onRegisterClick:()=>{this.dispatchEvent(new CustomEvent("clicked-register",{bubbles:!0}))},...Cn(this,Rd)};Qc(this,Cc,Lf({url:Cn(this,_p),spec:Cn(this,zu),domNode:this.rootElement,deepLinking:!0,filter:!0,presets:[Lf.presets.apis,Lf.SwaggerUIStandalonePreset],plugins:[Lf.plugins.DownloadUrl,y6.SwaggerUIKongTheme],layout:"KongLayout",theme:r}))}showOperation(r){if(!Cn(this,Cc))return!1;const a=wy(r);return Cn(this,Cc).layoutActions.show(a,!0),!0}hideOperation(r){if(!Cn(this,Cc))return!1;const a=wy(r);return Cn(this,Cc).layoutActions.show(a,!1),!0}scrollToOperation(r){if(!Cn(this,Cc))return!1;const a=xC(r);let i=this.shadowRoot.getElementById(a);if(!i){const x=this.shadowRoot.querySelector(`[data-tag='${r.tag}']`);if(!x||(x.click(),i=this.shadowRoot.getElementById(a),!i))return!1}const m=window.matchMedia("(prefers-reduced-motion: no-preference)");let _;m&&m.matches&&(_="smooth"),i.scrollIntoView({behavior:_})}get autoInit(){return Cn(this,Td)}set autoInit(r){Qc(this,Td,jg(r))}get hasSidebar(){return Cn(this,Nu)}set hasSidebar(r){Qc(this,Nu,jg(r))}get relativeSidebar(){return Cn(this,Ap)}set relativeSidebar(r){Qc(this,Ap,jg(r))}get essentialsOnly(){return Cn(this,Yl)}set essentialsOnly(r){Qc(this,Yl,jg(r))}get spec(){return Cn(this,zu)}set spec(r){if(!r)throw new Error("Spec cannot be empty");let a;typeof r=="string"?a=JSON.parse(r):typeof r=="object"&&(a=r),Qc(this,zu,a),Cn(this,Cc)&&Cn(this,Cc).getSystem().specActions.updateJsonSpec(Cn(this,zu))}get url(){return Cn(this,_p)}set url(r){Qc(this,_p,r)}get themeOverrides(){return Cn(this,Rd)}set themeOverrides(r){Qc(this,Rd,r)}get applicationRegistrationEnabled(){return Cn(this,zd)}set applicationRegistrationEnabled(r){Qc(this,zd,jg(r))}get currentVersion(){return Cn(this,Nd)}set currentVersion(r){Qc(this,Nd,r)}static get observedAttributes(){return["url","spec","auto-init","has-sidebar","relative-sidebar","essentials-only","application-registration-enabled","current-version","theme-overrides"]}}Td=new WeakMap,zu=new WeakMap,_p=new WeakMap,Nu=new WeakMap,Ap=new WeakMap,Yl=new WeakMap,Cc=new WeakMap,Rd=new WeakMap,zd=new WeakMap,Nd=new WeakMap,Ya(Ig,"name","kong-swagger-ui"),customElements.get(Ig.name)?console.warn(`Cannot register ${Ig.name}. Element is already defined, ignoring`):customElements.define(Ig.name,Ig)})()})();const tx=["application-registration-enabled","current-version","essentials-only","has-sidebar","relative-sidebar","spec","theme-overrides","url"],rx={key:1,"data-testid":"kong-public-ui-spec-details-error"},ox=St.defineComponent({__name:"SpecDetails",props:{document:{type:Object,default:null},url:{type:String,default:""},hasSidebar:{type:Boolean,default:!1},relativeSidebar:{type:Boolean,default:!1},themeOverrides:{type:Object,default:null},essentialsOnly:{type:Boolean,default:!1},activeOperation:{type:Object,default:null},applicationRegistrationEnabled:{type:Boolean,default:!1},currentVersion:{type:String,default:()=>{}}},setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.ref(null),ut=St.computed(()=>!!(ko.document||ko.url)),b=St.ref(!1),j=()=>{if(!nn.value)return;const o={...ko.activeOperation};if(o&&o.tag){const u=decodeURIComponent(o.tag.trim().replaceAll(/\s/g,"%20"));o.tag=u}nn.value.showOperation(o),nn.value.scrollToOperation(o),b.value=!0};return St.onMounted(()=>{ko.activeOperation&&j()}),St.watch(()=>ko.activeOperation,()=>{ko.activeOperation&&j()}),(o,u)=>(St.openBlock(),St.createElementBlock("div",{class:St.normalizeClass(["kong-public-ui-spec-details",{"active-op-focused":b.value}])},[ut.value?(St.openBlock(),St.createElementBlock("kong-swagger-ui",{key:0,ref_key:"swaggerRef",ref:nn,"application-registration-enabled":sr.applicationRegistrationEnabled,"current-version":sr.currentVersion,"data-testid":"kong-public-ui-spec-details-swagger","essentials-only":sr.essentialsOnly,"has-sidebar":sr.hasSidebar,"relative-sidebar":sr.relativeSidebar,spec:sr.document,"theme-overrides":encodeURIComponent(JSON.stringify(sr.themeOverrides)),url:sr.url},null,8,tx)):(St.openBlock(),St.createElementBlock("div",rx,St.toDisplayString(St.unref(Fo).t("specDetails.error")),1))],2))}}),Md=(sr,ko)=>{const Fo=sr.__vccOpts||sr;for(const[nn,ut]of ko)Fo[nn]=ut;return Fo},By=Md(ox,[["__scopeId","data-v-71bf6e29"]]);let $g;const ax=new Uint8Array(16);function nx(){if(!$g&&($g=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$g))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $g(ax)}const ls=[];for(let sr=0;sr<256;++sr)ls.push((sr+256).toString(16).slice(1));function ix(sr,ko=0){return ls[sr[ko+0]]+ls[sr[ko+1]]+ls[sr[ko+2]]+ls[sr[ko+3]]+"-"+ls[sr[ko+4]]+ls[sr[ko+5]]+"-"+ls[sr[ko+6]]+ls[sr[ko+7]]+"-"+ls[sr[ko+8]]+ls[sr[ko+9]]+"-"+ls[sr[ko+10]]+ls[sr[ko+11]]+ls[sr[ko+12]]+ls[sr[ko+13]]+ls[sr[ko+14]]+ls[sr[ko+15]]}let Dy,F0,$0=0,U0=0;function sx(sr,ko,Fo){let nn=ko&&Fo||0;const ut=ko||new Array(16);sr=sr||{};let b=sr.node||Dy,j=sr.clockseq!==void 0?sr.clockseq:F0;if(b==null||j==null){const O=sr.random||(sr.rng||nx)();b==null&&(b=Dy=[O[0]|1,O[1],O[2],O[3],O[4],O[5]]),j==null&&(j=F0=(O[6]<<8|O[7])&16383)}let o=sr.msecs!==void 0?sr.msecs:Date.now(),u=sr.nsecs!==void 0?sr.nsecs:U0+1;const v=o-$0+(u-U0)/1e4;if(v<0&&sr.clockseq===void 0&&(j=j+1&16383),(v<0||o>$0)&&sr.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");$0=o,U0=u,F0=j,o+=122192928e5;const S=((o&268435455)*1e4+u)%4294967296;ut[nn++]=S>>>24&255,ut[nn++]=S>>>16&255,ut[nn++]=S>>>8&255,ut[nn++]=S&255;const w=o/4294967296*1e4&268435455;ut[nn++]=w>>>8&255,ut[nn++]=w&255,ut[nn++]=w>>>24&15|16,ut[nn++]=w>>>16&255,ut[nn++]=j>>>8|128,ut[nn++]=j&255;for(let O=0;O<6;++O)ut[nn+O]=b[O];return ko||ix(ut)}var Ug=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cx(sr){return sr&&sr.__esModule&&Object.prototype.hasOwnProperty.call(sr,"default")?sr.default:sr}var qg={exports:{}};qg.exports,function(sr,ko){var Fo=200,nn="__lodash_hash_undefined__",ut=9007199254740991,b="[object Arguments]",j="[object Array]",o="[object Boolean]",u="[object Date]",v="[object Error]",S="[object Function]",w="[object GeneratorFunction]",O="[object Map]",I="[object Number]",p="[object Object]",n="[object Promise]",l="[object RegExp]",d="[object Set]",s="[object String]",g="[object Symbol]",k="[object WeakMap]",E="[object ArrayBuffer]",f="[object DataView]",A="[object Float32Array]",P="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",F="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,re=/\w*$/,Y=/^\[object .+?Constructor\]$/,le=/^(?:0|[1-9]\d*)$/,Q={};Q[b]=Q[j]=Q[E]=Q[f]=Q[o]=Q[u]=Q[A]=Q[P]=Q[R]=Q[D]=Q[F]=Q[O]=Q[I]=Q[p]=Q[l]=Q[d]=Q[s]=Q[g]=Q[M]=Q[N]=Q[U]=Q[W]=!0,Q[v]=Q[S]=Q[k]=!1;var fe=typeof Ug=="object"&&Ug&&Ug.Object===Object&&Ug,ne=typeof self=="object"&&self&&self.Object===Object&&self,ae=fe||ne||Function("return this")(),me=ko&&!ko.nodeType&&ko,Pe=me&&!0&&sr&&!sr.nodeType&&sr,Fe=Pe&&Pe.exports===me;function ze(We,ar){return We.set(ar[0],ar[1]),We}function $e(We,ar){return We.add(ar),We}function Je(We,ar){for(var Nr=-1,yo=We?We.length:0;++Nr<yo&&ar(We[Nr],Nr,We)!==!1;);return We}function Te(We,ar){for(var Nr=-1,yo=ar.length,On=We.length;++Nr<yo;)We[On+Nr]=ar[Nr];return We}function Ae(We,ar,Nr,yo){var On=-1,Kn=We?We.length:0;for(yo&&Kn&&(Nr=We[++On]);++On<Kn;)Nr=ar(Nr,We[On],On,We);return Nr}function lt(We,ar){for(var Nr=-1,yo=Array(We);++Nr<We;)yo[Nr]=ar(Nr);return yo}function dt(We,ar){return We==null?void 0:We[ar]}function Pt(We){var ar=!1;if(We!=null&&typeof We.toString!="function")try{ar=!!(We+"")}catch{}return ar}function Vt(We){var ar=-1,Nr=Array(We.size);return We.forEach(function(yo,On){Nr[++ar]=[On,yo]}),Nr}function yr(We,ar){return function(Nr){return We(ar(Nr))}}function Jt(We){var ar=-1,Nr=Array(We.size);return We.forEach(function(yo){Nr[++ar]=yo}),Nr}var Ar=Array.prototype,ur=Function.prototype,Or=Object.prototype,Br=ae["__core-js_shared__"],kr=function(){var We=/[^.]+$/.exec(Br&&Br.keys&&Br.keys.IE_PROTO||"");return We?"Symbol(src)_1."+We:""}(),Bt=ur.toString,De=Or.hasOwnProperty,et=Or.toString,At=RegExp("^"+Bt.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ke=Fe?ae.Buffer:void 0,Ze=ae.Symbol,jt=ae.Uint8Array,Dt=yr(Object.getPrototypeOf,Object),xr=Object.create,X=Or.propertyIsEnumerable,pe=Ar.splice,ke=Object.getOwnPropertySymbols,Ve=Ke?Ke.isBuffer:void 0,ot=yr(Object.keys,Object),pt=Mn(ae,"DataView"),Ge=Mn(ae,"Map"),Ot=Mn(ae,"Promise"),hr=Mn(ae,"Set"),_t=Mn(ae,"WeakMap"),Ie=Mn(Object,"create"),He=oi(pt),Qe=oi(Ge),vt=oi(Ot),_r=oi(hr),Sr=oi(_t),Zr=Ze?Ze.prototype:void 0,Xr=Zr?Zr.valueOf:void 0;function bo(We){var ar=-1,Nr=We?We.length:0;for(this.clear();++ar<Nr;){var yo=We[ar];this.set(yo[0],yo[1])}}function zt(){this.__data__=Ie?Ie(null):{}}function Er(We){return this.has(We)&&delete this.__data__[We]}function Gr(We){var ar=this.__data__;if(Ie){var Nr=ar[We];return Nr===nn?void 0:Nr}return De.call(ar,We)?ar[We]:void 0}function go(We){var ar=this.__data__;return Ie?ar[We]!==void 0:De.call(ar,We)}function Po(We,ar){var Nr=this.__data__;return Nr[We]=Ie&&ar===void 0?nn:ar,this}bo.prototype.clear=zt,bo.prototype.delete=Er,bo.prototype.get=Gr,bo.prototype.has=go,bo.prototype.set=Po;function so(We){var ar=-1,Nr=We?We.length:0;for(this.clear();++ar<Nr;){var yo=We[ar];this.set(yo[0],yo[1])}}function Io(){this.__data__=[]}function Oo(We){var ar=this.__data__,Nr=mt(ar,We);if(Nr<0)return!1;var yo=ar.length-1;return Nr==yo?ar.pop():pe.call(ar,Nr,1),!0}function Mo(We){var ar=this.__data__,Nr=mt(ar,We);return Nr<0?void 0:ar[Nr][1]}function Oa(We){return mt(this.__data__,We)>-1}function yn(We,ar){var Nr=this.__data__,yo=mt(Nr,We);return yo<0?Nr.push([We,ar]):Nr[yo][1]=ar,this}so.prototype.clear=Io,so.prototype.delete=Oo,so.prototype.get=Mo,so.prototype.has=Oa,so.prototype.set=yn;function aa(We){var ar=-1,Nr=We?We.length:0;for(this.clear();++ar<Nr;){var yo=We[ar];this.set(yo[0],yo[1])}}function Jo(){this.__data__={hash:new bo,map:new(Ge||so),string:new bo}}function Pa(We){return vi(this,We).delete(We)}function qa(We){return vi(this,We).get(We)}function rr(We){return vi(this,We).has(We)}function pr(We,ar){return vi(this,We).set(We,ar),this}aa.prototype.clear=Jo,aa.prototype.delete=Pa,aa.prototype.get=qa,aa.prototype.has=rr,aa.prototype.set=pr;function nr(We){this.__data__=new so(We)}function Qr(){this.__data__=new so}function cr(We){return this.__data__.delete(We)}function ha(We){return this.__data__.get(We)}function no(We){return this.__data__.has(We)}function st(We,ar){var Nr=this.__data__;if(Nr instanceof so){var yo=Nr.__data__;if(!Ge||yo.length<Fo-1)return yo.push([We,ar]),this;Nr=this.__data__=new aa(yo)}return Nr.set(We,ar),this}nr.prototype.clear=Qr,nr.prototype.delete=cr,nr.prototype.get=ha,nr.prototype.has=no,nr.prototype.set=st;function Ee(We,ar){var Nr=ei(We)||Li(We)?lt(We.length,String):[],yo=Nr.length,On=!!yo;for(var Kn in We)(ar||De.call(We,Kn))&&!(On&&(Kn=="length"||zi(Kn,yo)))&&Nr.push(Kn);return Nr}function Ue(We,ar,Nr){var yo=We[ar];(!(De.call(We,ar)&&Mi(yo,Nr))||Nr===void 0&&!(ar in We))&&(We[ar]=Nr)}function mt(We,ar){for(var Nr=We.length;Nr--;)if(Mi(We[Nr][0],ar))return Nr;return-1}function Ft(We,ar){return We&&ja(ar,vo(ar),We)}function wr(We,ar,Nr,yo,On,Kn,ti){var ui;if(yo&&(ui=Kn?yo(We,On,Kn,ti):yo(We)),ui!==void 0)return ui;if(!xt(We))return We;var $i=ei(We);if($i){if(ui=Ri(We),!ar)return zn(We,ui)}else{var Yn=ln(We),Ui=Yn==S||Yn==w;if(ji(We))return Ro(We,ar);if(Yn==p||Yn==b||Ui&&!Kn){if(Pt(We))return Kn?We:{};if(ui=Ln(Ui?{}:We),!ar)return ma(We,Ft(ui,We))}else{if(!Q[Yn])return Kn?We:{};ui=za(We,Yn,wr,ar)}}ti||(ti=new nr);var ec=ti.get(We);if(ec)return ec;if(ti.set(We,ui),!$i)var xs=Nr?Zn(We):vo(We);return Je(xs||We,function(Xa,Es){xs&&(Es=Xa,Xa=We[Es]),Ue(ui,Es,wr(Xa,ar,Nr,yo,Es,We,ti))}),ui}function gt(We){return xt(We)?xr(We):{}}function Lt(We,ar,Nr){var yo=ar(We);return ei(We)?yo:Te(yo,Nr(We))}function Tr(We){return et.call(We)}function gr(We){if(!xt(We)||fn(We))return!1;var ar=dn(We)||Pt(We)?At:Y;return ar.test(oi(We))}function lo(We){if(!li(We))return ot(We);var ar=[];for(var Nr in Object(We))De.call(We,Nr)&&Nr!="constructor"&&ar.push(Nr);return ar}function Ro(We,ar){if(ar)return We.slice();var Nr=new We.constructor(We.length);return We.copy(Nr),Nr}function ga(We){var ar=new We.constructor(We.byteLength);return new jt(ar).set(new jt(We)),ar}function ka(We,ar){var Nr=ar?ga(We.buffer):We.buffer;return new We.constructor(Nr,We.byteOffset,We.byteLength)}function Qa(We,ar,Nr){var yo=ar?Nr(Vt(We),!0):Vt(We);return Ae(yo,ze,new We.constructor)}function gn(We){var ar=new We.constructor(We.source,re.exec(We));return ar.lastIndex=We.lastIndex,ar}function Rn(We,ar,Nr){var yo=ar?Nr(Jt(We),!0):Jt(We);return Ae(yo,$e,new We.constructor)}function Qo(We){return Xr?Object(Xr.call(We)):{}}function on(We,ar){var Nr=ar?ga(We.buffer):We.buffer;return new We.constructor(Nr,We.byteOffset,We.length)}function zn(We,ar){var Nr=-1,yo=We.length;for(ar||(ar=Array(yo));++Nr<yo;)ar[Nr]=We[Nr];return ar}function ja(We,ar,Nr,yo){Nr||(Nr={});for(var On=-1,Kn=ar.length;++On<Kn;){var ti=ar[On],ui=yo?yo(Nr[ti],We[ti],ti,Nr,We):void 0;Ue(Nr,ti,ui===void 0?We[ti]:ui)}return Nr}function ma(We,ar){return ja(We,cn(We),ar)}function Zn(We){return Lt(We,vo,cn)}function vi(We,ar){var Nr=We.__data__;return us(ar)?Nr[typeof ar=="string"?"string":"hash"]:Nr.map}function Mn(We,ar){var Nr=dt(We,ar);return gr(Nr)?Nr:void 0}var cn=ke?yr(ke,Object):No,ln=Tr;(pt&&ln(new pt(new ArrayBuffer(1)))!=f||Ge&&ln(new Ge)!=O||Ot&&ln(Ot.resolve())!=n||hr&&ln(new hr)!=d||_t&&ln(new _t)!=k)&&(ln=function(We){var ar=et.call(We),Nr=ar==p?We.constructor:void 0,yo=Nr?oi(Nr):void 0;if(yo)switch(yo){case He:return f;case Qe:return O;case vt:return n;case _r:return d;case Sr:return k}return ar});function Ri(We){var ar=We.length,Nr=We.constructor(ar);return ar&&typeof We[0]=="string"&&De.call(We,"index")&&(Nr.index=We.index,Nr.input=We.input),Nr}function Ln(We){return typeof We.constructor=="function"&&!li(We)?gt(Dt(We)):{}}function za(We,ar,Nr,yo){var On=We.constructor;switch(ar){case E:return ga(We);case o:case u:return new On(+We);case f:return ka(We,yo);case A:case P:case R:case D:case F:case M:case N:case U:case W:return on(We,yo);case O:return Qa(We,yo,Nr);case I:case s:return new On(We);case l:return gn(We);case d:return Rn(We,yo,Nr);case g:return Qo(We)}}function zi(We,ar){return ar=ar??ut,!!ar&&(typeof We=="number"||le.test(We))&&We>-1&&We%1==0&&We<ar}function us(We){var ar=typeof We;return ar=="string"||ar=="number"||ar=="symbol"||ar=="boolean"?We!=="__proto__":We===null}function fn(We){return!!kr&&kr in We}function li(We){var ar=We&&We.constructor,Nr=typeof ar=="function"&&ar.prototype||Or;return We===Nr}function oi(We){if(We!=null){try{return Bt.call(We)}catch{}try{return We+""}catch{}}return""}function Ji(We){return wr(We,!0,!0)}function Mi(We,ar){return We===ar||We!==We&&ar!==ar}function Li(We){return Fi(We)&&De.call(We,"callee")&&(!X.call(We,"callee")||et.call(We)==b)}var ei=Array.isArray;function Ha(We){return We!=null&&ps(We.length)&&!dn(We)}function Fi(We){return ao(We)&&Ha(We)}var ji=Ve||kn;function dn(We){var ar=xt(We)?et.call(We):"";return ar==S||ar==w}function ps(We){return typeof We=="number"&&We>-1&&We%1==0&&We<=ut}function xt(We){var ar=typeof We;return!!We&&(ar=="object"||ar=="function")}function ao(We){return!!We&&typeof We=="object"}function vo(We){return Ha(We)?Ee(We):lo(We)}function No(){return[]}function kn(){return!1}sr.exports=Ji}(qg,qg.exports);var lx=qg.exports;const q0=cx(lx),Pp="default",ux="#3a3f51",px="#afb7c5",My="20px",Ip="24px",K0=(sr,ko)=>{const Fo=sr.__vccOpts||sr;for(const[nn,ut]of ko)Fo[nn]=ut;return Fo},dx=sr=>(St.pushScopeId("data-v-7166aa42"),sr=sr(),St.popScopeId(),sr),hx=["aria-hidden"],gx={key:0,"data-testid":"kui-icon-svg-title"},fx=dx(()=>St.createElementVNode("path",{d:"M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",fill:"currentColor"},null,-1)),mx=St.defineComponent({__name:"ChevronDownIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ip,validator:sr=>{if(typeof sr=="number"&&sr>0)return!0;if(typeof sr=="string"){const ko=String(sr).replace(/px/gi,""),Fo=Number(ko);if(Fo&&!isNaN(Fo)&&Number.isInteger(Fo)&&Fo>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(sr){const ko=sr,Fo=St.computed(()=>{if(typeof ko.size=="number"&&ko.size>0)return`${ko.size}px`;if(typeof ko.size=="string"){const ut=String(ko.size).replace(/px/gi,""),b=Number(ut);if(b&&!isNaN(b)&&Number.isInteger(b)&&b>0)return`${b}px`}return Ip}),nn=St.computed(()=>({boxSizing:"border-box",color:ko.color,display:ko.display,height:Fo.value,lineHeight:"0",width:Fo.value}));return(ut,b)=>(St.openBlock(),St.createBlock(St.resolveDynamicComponent(sr.as),{"aria-hidden":sr.decorative?"true":void 0,class:"kui-icon chevron-down-icon","data-testid":"kui-icon-wrapper-chevron-down-icon",style:St.normalizeStyle(nn.value)},{default:St.withCtx(()=>[(St.openBlock(),St.createElementBlock("svg",{"aria-hidden":sr.decorative?"true":void 0,"data-testid":"kui-icon-svg-chevron-down-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[sr.title?(St.openBlock(),St.createElementBlock("title",gx,St.toDisplayString(sr.title),1)):St.createCommentVNode("",!0),fx],8,hx))]),_:1},8,["aria-hidden","style"]))}}),bx=K0(mx,[["__scopeId","data-v-7166aa42"]]),vx=sr=>(St.pushScopeId("data-v-cce7dc60"),sr=sr(),St.popScopeId(),sr),yx=["aria-hidden"],kx={key:0,"data-testid":"kui-icon-svg-title"},wx=vx(()=>St.createElementVNode("path",{d:"M9.4 18L8 16.6L12.6 12L8 7.4L9.4 6L15.4 12L9.4 18Z",fill:"currentColor"},null,-1)),xx=St.defineComponent({__name:"ChevronRightIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ip,validator:sr=>{if(typeof sr=="number"&&sr>0)return!0;if(typeof sr=="string"){const ko=String(sr).replace(/px/gi,""),Fo=Number(ko);if(Fo&&!isNaN(Fo)&&Number.isInteger(Fo)&&Fo>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(sr){const ko=sr,Fo=St.computed(()=>{if(typeof ko.size=="number"&&ko.size>0)return`${ko.size}px`;if(typeof ko.size=="string"){const ut=String(ko.size).replace(/px/gi,""),b=Number(ut);if(b&&!isNaN(b)&&Number.isInteger(b)&&b>0)return`${b}px`}return Ip}),nn=St.computed(()=>({boxSizing:"border-box",color:ko.color,display:ko.display,height:Fo.value,lineHeight:"0",width:Fo.value}));return(ut,b)=>(St.openBlock(),St.createBlock(St.resolveDynamicComponent(sr.as),{"aria-hidden":sr.decorative?"true":void 0,class:"kui-icon chevron-right-icon","data-testid":"kui-icon-wrapper-chevron-right-icon",style:St.normalizeStyle(nn.value)},{default:St.withCtx(()=>[(St.openBlock(),St.createElementBlock("svg",{"aria-hidden":sr.decorative?"true":void 0,"data-testid":"kui-icon-svg-chevron-right-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[sr.title?(St.openBlock(),St.createElementBlock("title",kx,St.toDisplayString(sr.title),1)):St.createCommentVNode("",!0),wx],8,yx))]),_:1},8,["aria-hidden","style"]))}}),Ex=K0(xx,[["__scopeId","data-v-cce7dc60"]]),Sx=sr=>(St.pushScopeId("data-v-0b81fdea"),sr=sr(),St.popScopeId(),sr),_x=["aria-hidden"],Ax={key:0,"data-testid":"kui-icon-svg-title"},Ox=Sx(()=>St.createElementVNode("path",{d:"M10 18V16H14V18H10ZM6 13V11H18V13H6ZM3 8V6H21V8H3Z",fill:"currentColor"},null,-1)),jx=St.defineComponent({__name:"FilterIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Ip,validator:sr=>{if(typeof sr=="number"&&sr>0)return!0;if(typeof sr=="string"){const ko=String(sr).replace(/px/gi,""),Fo=Number(ko);if(Fo&&!isNaN(Fo)&&Number.isInteger(Fo)&&Fo>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(sr){const ko=sr,Fo=St.computed(()=>{if(typeof ko.size=="number"&&ko.size>0)return`${ko.size}px`;if(typeof ko.size=="string"){const ut=String(ko.size).replace(/px/gi,""),b=Number(ut);if(b&&!isNaN(b)&&Number.isInteger(b)&&b>0)return`${b}px`}return Ip}),nn=St.computed(()=>({boxSizing:"border-box",color:ko.color,display:ko.display,height:Fo.value,lineHeight:"0",width:Fo.value}));return(ut,b)=>(St.openBlock(),St.createBlock(St.resolveDynamicComponent(sr.as),{"aria-hidden":sr.decorative?"true":void 0,class:"kui-icon filter-icon","data-testid":"kui-icon-wrapper-filter-icon",style:St.normalizeStyle(nn.value)},{default:St.withCtx(()=>[(St.openBlock(),St.createElementBlock("svg",{"aria-hidden":sr.decorative?"true":void 0,"data-testid":"kui-icon-svg-filter-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[sr.title?(St.openBlock(),St.createElementBlock("title",Ax,St.toDisplayString(sr.title),1)):St.createCommentVNode("",!0),Ox],8,_x))]),_:1},8,["aria-hidden","style"]))}}),Cx=K0(jx,[["__scopeId","data-v-0b81fdea"]]),Px=["aria-controls","aria-expanded","aria-label"],Ix={"aria-hidden":"true",class:"icon-wrapper"},Tx={"aria-hidden":"true",class:"label truncated"},Rx=["title"],Ly=Md(St.defineComponent({__name:"OperationsListSectionHeader",props:{isCollapsed:{type:Boolean,required:!0},name:{type:String,required:!0},description:{type:String,default:void 0},contentElementId:{type:String,required:!0}},emits:["toggle"],setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.computed(()=>ko.isCollapsed?Fo.t("specOperationsList.section.expandAriaLabel",{section:`"${ko.name}"`}):Fo.t("specOperationsList.section.collapseAriaLabel",{section:`"${ko.name}"`}));return(ut,b)=>(St.openBlock(),St.createElementBlock("button",{"aria-controls":sr.contentElementId,"aria-expanded":sr.isCollapsed?"false":"true","aria-label":nn.value,class:St.normalizeClass(["header",{"header--collapsed":sr.isCollapsed}]),type:"button",onClick:b[0]||(b[0]=j=>ut.$emit("toggle"))},[St.createElementVNode("div",Ix,[sr.isCollapsed?(St.openBlock(),St.createBlock(St.unref(Ex),{key:0,color:`var(--kong-ui-spec-renderer-operations-list-section-icon-color-collapsed, ${St.unref(px)})`,size:St.unref(My)},null,8,["color","size"])):(St.openBlock(),St.createBlock(St.unref(bx),{key:1,color:`var(--kong-ui-spec-renderer-operations-list-section-icon-color-expanded, ${St.unref(ux)})`,icon:"chevronDown",size:St.unref(My)},null,8,["color","size"]))]),St.createElementVNode("h1",Tx,St.toDisplayString(sr.name),1),St.createElementVNode("div",{class:"description truncated",title:sr.description},St.toDisplayString(sr.description),9,Rx)],10,Px))}}),[["__scopeId","data-v-98e20a36"]]),zx=["data-testid"],Nx=["title"],Bx={class:"details"},Dx=["aria-label","title"],Fy=Md(St.defineComponent({__name:"OperationsListItem",props:{item:{type:Object,required:!0,validator:sr=>sr.method!==void 0&&sr.summary!==void 0&&sr.path!==void 0},isSelected:{type:Boolean,default:!1},disableSelection:{type:Boolean,default:!1}},emits:["click"],setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.computed(()=>{var b,j;return`spec-operations-list-item-${(b=ko.item.method)==null?void 0:b.toLowerCase()}${(j=ko.item.path)==null?void 0:j.replaceAll("/","-")}-${ko.item.tag||"-"}`}),ut=St.computed(()=>ko.item.method||"");return(b,j)=>{const o=St.resolveComponent("KBadge");return St.openBlock(),St.createElementBlock("button",{class:St.normalizeClass(["spec-operations-list-item",{"item--selected":sr.isSelected,[`item--method-${sr.item.method}`]:!0,disabled:sr.disableSelection}]),"data-testid":nn.value,type:"button",onClick:j[0]||(j[0]=u=>b.$emit("click",sr.item))},[sr.item.summary?(St.openBlock(),St.createElementBlock("h2",{key:0,class:"summary truncated",title:sr.item.summary},St.toDisplayString(sr.item.summary),9,Nx)):St.createCommentVNode("",!0),St.createElementVNode("div",Bx,[St.createVNode(o,{appearance:"custom","aria-label":St.unref(Fo).t("specOperationsList.item.methodAriaLabel",{method:ut.value.toUpperCase()}),"background-color":"var(--kong-ui-spec-renderer-operations-list-item-method-background)",class:"method-badge",color:"var(--kong-ui-spec-renderer-operations-list-item-method-color)",tabindex:"-1"},{default:St.withCtx(()=>[St.createTextVNode(St.toDisplayString(ut.value.toUpperCase()),1)]),_:1},8,["aria-label"]),St.createElementVNode("span",{"aria-label":St.unref(Fo).t("specOperationsList.item.pathAriaLabel",{path:sr.item.path}),class:"path truncated",title:sr.item.path},St.toDisplayString(sr.item.path),9,Dx)])],10,zx)}}}),[["__scopeId","data-v-5610ea54"]]),Mx=["aria-label"],Lx={key:0},Fx={key:0,class:"filter-wrapper"},$x={key:1},Ux=["data-testid"],qx=["id"],Kx={key:0,class:"section","data-testid":"spec-operations-list-untagged-items"},Hx=["id"],Vx={key:2,"data-testid":"kong-ui-public-spec-operations-list-empty"},Wx={class:"center"},Jx={key:1,"data-testid":"kong-ui-public-spec-operations-list-error"},{getSizeFromString:Gx,hasRequiredProps:$y}=Du.useUtilities(),Uy=Md(St.defineComponent({__name:"SpecOperationsList",props:{operations:{type:Array,required:!0,validator:sr=>!sr.length||$y(sr,["method","path"])},tags:{type:Array,default:()=>[],validator:sr=>!sr.length||$y(sr,["name"])},isFilterable:{type:Boolean,default:!0},filterFunction:{type:Function,default:({items:sr,query:ko})=>(ko=ko.toLowerCase(),sr.filter(Fo=>Fo.tag&&Fo.tag.toLowerCase().includes(ko))),validator:sr=>!!sr&&typeof sr=="function"},deselect:{type:Boolean,default:!1},disableSelection:{type:Boolean,default:!1},width:{type:String,default:"210"}},emits:["selected"],setup(sr,{emit:ko}){const Fo=sr,nn=ko,{i18n:ut}=Du.useI18n(),b=St.computed(()=>sx()),j=St.ref(""),o=St.ref([]),u=St.ref(),v=St.ref([]),S=()=>{const k=o.value;if(!Fo.isFilterable){v.value=k;return}if(!Fo.filterFunction||typeof Fo.filterFunction!="function")throw new Error(`filterFunction property must be a function, got ${typeof Fo.filterFunction}`);v.value=Fo.filterFunction({items:k,query:j.value})},w=St.computed(()=>Gx(Fo.width)),O=St.computed(()=>{const k=[];return v.value.forEach(E=>{E.tag&&!k.includes(E.tag)&&k.push(E.tag)}),k}),I=St.computed(()=>o.value.filter(k=>!k.tag)),p=k=>{if(!Fo.tags||!Array.isArray(Fo.tags))return"";const E=Fo.tags.find(f=>f.name===k);return(E==null?void 0:E.description)||""},n=k=>v.value.filter(E=>E.tag===k),l=k=>{const E=u.value;return!!E&&E.path===k.path&&E.method===k.method&&E.operationId===k.operationId&&E.tag===k.tag},d=k=>`${b.value}-section-${k.toLowerCase()}`,s=k=>{Fo.disableSelection||(u.value=k,nn("selected",k))},g=()=>{o.value=[],Fo.operations&&(Fo.operations.forEach(k=>{var f;const E=q0(k);(f=k.tags)!=null&&f.length?k.tags.forEach(A=>{delete E.tags,E.tag=A,o.value.push(q0(E))}):(delete E.tags,E.tag=null,o.value.push(q0(E)))}),S())};return St.watch(()=>Fo.deselect,()=>{Fo.deselect&&(u.value=void 0)}),St.watch(()=>Fo.operations,()=>g()),St.watch(j,()=>S()),St.onMounted(()=>{g()}),(k,E)=>{const f=St.resolveComponent("KInput"),A=St.resolveComponent("KCollapse");return St.openBlock(),St.createElementBlock("section",{"aria-label":St.unref(ut).t("specOperationsList.ariaLabel"),class:"kong-ui-public-spec-operations-list","data-testid":"kong-ui-public-spec-operations-list",role:"navigation",style:St.normalizeStyle({width:w.value})},[sr.operations?(St.openBlock(),St.createElementBlock("div",Lx,[sr.isFilterable?(St.openBlock(),St.createElementBlock("div",Fx,[St.createVNode(f,{modelValue:j.value,"onUpdate:modelValue":E[0]||(E[0]=P=>j.value=P),class:"filter-input","data-testid":"spec-operations-list-filter",placeholder:St.unref(ut).t("specOperationsList.filterPlaceholder")},{before:St.withCtx(()=>[St.createVNode(St.unref(Cx),{decorative:""})]),_:1},8,["modelValue","placeholder"])])):St.createCommentVNode("",!0),v.value.length?(St.openBlock(),St.createElementBlock("div",$x,[(St.openBlock(!0),St.createElementBlock(St.Fragment,null,St.renderList(O.value,P=>(St.openBlock(),St.createElementBlock("div",{key:P,class:"section-wrapper","data-testid":`spec-operations-list-section-${P.toLowerCase().replaceAll(" ","-")}`},[St.createVNode(A,{"model-value":!1,"trigger-alignment":"leading"},{trigger:St.withCtx(({isCollapsed:R,toggle:D})=>[St.createVNode(Ly,{"content-element-id":d(P),"data-testid":`spec-operations-list-section-${P.toLowerCase().replaceAll(" ","-")}-collapse-trigger`,description:p(P),"is-collapsed":R,name:P,onToggle:D},null,8,["content-element-id","data-testid","description","is-collapsed","name","onToggle"])]),default:St.withCtx(()=>[St.createElementVNode("div",{id:d(P)},[(St.openBlock(!0),St.createElementBlock(St.Fragment,null,St.renderList(n(P),R=>St.renderSlot(k.$slots,"item",{key:`${R.path}-${R.method}`,item:R,section:P,select:()=>s(R)},()=>[St.createVNode(Fy,{"disable-selection":sr.disableSelection,"is-selected":l(R),item:R,section:P,onClick:s},null,8,["disable-selection","is-selected","item","section"])],!0)),128))],8,qx)]),_:2},1024)],8,Ux))),128)),!sr.isFilterable||!j.value?(St.openBlock(),St.createElementBlock("div",Kx,[St.createVNode(A,{"model-value":!1,"trigger-alignment":"leading"},{trigger:St.withCtx(({isCollapsed:P,toggle:R})=>[St.createVNode(Ly,{"content-element-id":d(St.unref(Pp)),"data-testid":"spec-operations-list-section-untagged-collapse-trigger",description:p(St.unref(Pp)),"is-collapsed":P,name:St.unref(Pp),onToggle:R},null,8,["content-element-id","description","is-collapsed","name","onToggle"])]),default:St.withCtx(()=>[St.createElementVNode("div",{id:d(St.unref(Pp))},[(St.openBlock(!0),St.createElementBlock(St.Fragment,null,St.renderList(I.value,P=>St.renderSlot(k.$slots,"untagged-item",{key:`${P.path}-${P.method}`,item:P,section:St.unref(Pp),select:()=>s(P)},()=>[St.createVNode(Fy,{"disable-selection":sr.disableSelection,"is-selected":l(P),item:P,onClick:s},null,8,["disable-selection","is-selected","item"])],!0)),128))],8,Hx)]),_:3})])):St.createCommentVNode("",!0)])):(St.openBlock(),St.createElementBlock("div",Vx,[St.renderSlot(k.$slots,"empty-state",{},()=>[St.createElementVNode("div",Wx,St.toDisplayString(St.unref(ut).t("specOperationsList.noResults")),1)],!0)]))])):(St.openBlock(),St.createElementBlock("div",Jx,[St.renderSlot(k.$slots,"error-state",{},()=>[St.createTextVNode(St.toDisplayString(St.unref(ut).t("specOperationsList.error")),1)],!0)]))],12,Mx)}}}),[["__scopeId","data-v-751da895"]]),Zx={class:"kong-ui-public-spec-renderer"},Yx={key:0,class:"spec-container"},Qx={class:"spec-renderer-ops-list-empty-state","data-testid":"spec-renderer-ops-list-empty-state"},Xx={key:1,"data-testid":"kong-ui-public-spec-renderer-error"},{hasRequiredProps:qy}=Du.useUtilities(),e2=Md(St.defineComponent({__name:"SpecRenderer",props:{spec:{type:Object,required:!0},essentialsOnly:{type:Boolean,default:!1},operationsList:{type:Array,required:!0,validator:sr=>!sr.length||qy(sr,["method","path"])},tags:{type:Array,default:()=>[],validator:sr=>!sr.length||qy(sr,["name"])},navWidth:{type:String,default:"310"},deselect:{type:Boolean,default:!1}},setup(sr){const ko=sr,{i18n:Fo}=Du.useI18n(),nn=St.computed(()=>!!(ko.spec&&ko.operationsList)),ut=St.ref(),b=j=>{ut.value=j};return(j,o)=>{const u=St.resolveComponent("KEmptyState");return St.openBlock(),St.createElementBlock("div",Zx,[nn.value?(St.openBlock(),St.createElementBlock("div",Yx,[St.createVNode(Uy,{"data-testid":"spec-renderer-ops-list-content",deselect:sr.deselect,operations:sr.operationsList,tags:sr.tags,width:sr.navWidth,onSelected:b},{"empty-state":St.withCtx(()=>[St.createElementVNode("div",Qx,[St.renderSlot(j.$slots,"ops-list-empty-state",{},void 0,!0)])]),_:3},8,["deselect","operations","tags","width"]),St.createVNode(By,{"active-operation":ut.value,class:"spec-renderer-details","data-testid":"spec-renderer-details-content",document:sr.spec,"essentials-only":sr.essentialsOnly,"has-sidebar":!1},null,8,["active-operation","document","essentials-only"])])):(St.openBlock(),St.createElementBlock("div",Xx,[St.renderSlot(j.$slots,"error-state",{},()=>[St.createVNode(u,{"cta-is-hidden":"","icon-size":"50","is-error":!0},{title:St.withCtx(()=>[St.createTextVNode(St.toDisplayString(St.unref(Fo).t("specRenderer.error")),1)]),_:1})],!0)]))])}}}),[["__scopeId","data-v-573e5489"]]);qn.DEFAULT_UNTAGGED_SECTION_NAME=Pp,qn.SpecDetails=By,qn.SpecOperationsList=Uy,qn.SpecRenderer=e2,Object.defineProperty(qn,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/spec-renderer",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "type": "module",
5
5
  "main": "./dist/spec-renderer.umd.js",
6
6
  "module": "./dist/spec-renderer.es.js",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@kong-ui-public/swagger-ui-web-component": "^0.10.9",
38
- "@kong/icons": "^1.8.10",
38
+ "@kong/icons": "^1.8.11",
39
39
  "lodash.clonedeep": "^4.5.0",
40
40
  "uuid": "^9.0.1",
41
41
  "@kong-ui-public/i18n": "^2.0.5"