@openapi-studio/core 0.6.0 → 0.6.2

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.
@@ -1 +1 @@
1
- import{K as i}from"./app-BgTLLqSw.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),k=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,r)=>r?r.toUpperCase():o.toLowerCase()),m=t=>{const e=k(t);return e.charAt(0).toUpperCase()+e.slice(1)},f=(...t)=>t.filter((e,o,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===o).join(" ").trim(),u=t=>t==="";var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const g=({name:t,iconNode:e,absoluteStrokeWidth:o,"absolute-stroke-width":r,strokeWidth:s,"stroke-width":n,size:c=a.width,color:w=a.stroke,...l},{slots:d})=>i("svg",{...a,...l,width:c,height:c,stroke:w,"stroke-width":u(o)||u(r)||o===!0||r===!0?Number(s||n||a["stroke-width"])*24/Number(c):s||n||a["stroke-width"],class:f("lucide",l.class,...t?[`lucide-${h(m(t))}-icon`,`lucide-${h(t)}`]:["lucide-icon"])},[...e.map(p=>i(...p)),...d.default?[d.default()]:[]]);const C=(t,e)=>(o,{slots:r,attrs:s})=>i(g,{...s,...o,iconNode:e,name:t},r);const x=C("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);export{x as F,C as c};
1
+ import{K as i}from"./app-B8WIou1H.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),k=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,r)=>r?r.toUpperCase():o.toLowerCase()),m=t=>{const e=k(t);return e.charAt(0).toUpperCase()+e.slice(1)},f=(...t)=>t.filter((e,o,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===o).join(" ").trim(),u=t=>t==="";var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const g=({name:t,iconNode:e,absoluteStrokeWidth:o,"absolute-stroke-width":r,strokeWidth:s,"stroke-width":n,size:c=a.width,color:w=a.stroke,...l},{slots:d})=>i("svg",{...a,...l,width:c,height:c,stroke:w,"stroke-width":u(o)||u(r)||o===!0||r===!0?Number(s||n||a["stroke-width"])*24/Number(c):s||n||a["stroke-width"],class:f("lucide",l.class,...t?[`lucide-${h(m(t))}-icon`,`lucide-${h(t)}`]:["lucide-icon"])},[...e.map(p=>i(...p)),...d.default?[d.default()]:[]]);const C=(t,e)=>(o,{slots:r,attrs:s})=>i(g,{...s,...o,iconNode:e,name:t},r);const x=C("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);export{x as F,C as c};
@@ -1 +1 @@
1
- import{L as a}from"./app-BgTLLqSw.js";const o=(t,e)=>{if(window?.document.getElementById(t))return;const d=window?.document.getElementsByTagName("head")[0],n=window?.document.createElement("style");n.setAttribute("id",t),n.textContent=e,d.appendChild(n)},r=async()=>{const{fullWidthButton:t}=await a(async()=>{const{fullWidthButton:e}=await import("./string-styles-CIC5AFdR.js");return{fullWidthButton:e}},[]);o("full-width-button",t)},l=async()=>{const{darkTheme:t}=await a(async()=>{const{darkTheme:e}=await import("./string-styles-CIC5AFdR.js");return{darkTheme:e}},[]);o("dark-theme",t)};export{l as setDarkThemeStyle,r as setFullWidthButtonStyle};
1
+ import{L as a}from"./app-B8WIou1H.js";const o=(t,e)=>{if(window?.document.getElementById(t))return;const d=window?.document.getElementsByTagName("head")[0],n=window?.document.createElement("style");n.setAttribute("id",t),n.textContent=e,d.appendChild(n)},r=async()=>{const{fullWidthButton:t}=await a(async()=>{const{fullWidthButton:e}=await import("./string-styles-CIC5AFdR.js");return{fullWidthButton:e}},[]);o("full-width-button",t)},l=async()=>{const{darkTheme:t}=await a(async()=>{const{darkTheme:e}=await import("./string-styles-CIC5AFdR.js");return{darkTheme:e}},[]);o("dark-theme",t)};export{l as setDarkThemeStyle,r as setFullWidthButtonStyle};
@@ -1,4 +1,4 @@
1
- import{L as aN}from"./app-BgTLLqSw.js";function Ng(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vj={},mj;function lN(){return mj||(mj=1,(function(t){(function(e){function n(E){return E!==null?Object.prototype.toString.call(E)==="[object Array]":!1}function r(E){return E!==null?Object.prototype.toString.call(E)==="[object Object]":!1}function o(E,D){if(E===D)return!0;var F=Object.prototype.toString.call(E);if(F!==Object.prototype.toString.call(D))return!1;if(n(E)===!0){if(E.length!==D.length)return!1;for(var ee=0;ee<E.length;ee++)if(o(E[ee],D[ee])===!1)return!1;return!0}if(r(E)===!0){var xe={};for(var Ne in E)if(hasOwnProperty.call(E,Ne)){if(o(E[Ne],D[Ne])===!1)return!1;xe[Ne]=!0}for(var Be in D)if(hasOwnProperty.call(D,Be)&&xe[Be]!==!0)return!1;return!0}return!1}function i(E){if(E===""||E===!1||E===null||n(E)&&E.length===0)return!0;if(r(E)){for(var D in E)if(E.hasOwnProperty(D))return!1;return!0}else return!1}function s(E){for(var D=Object.keys(E),F=[],ee=0;ee<D.length;ee++)F.push(E[D[ee]]);return F}var a;typeof String.prototype.trimLeft=="function"?a=function(E){return E.trimLeft()}:a=function(E){return E.match(/^\s*(.*)/)[1]};var l=0,u=1,h=2,d=3,f=4,p=5,v=6,g=7,m=8,b=9,y={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},w="EOF",j="UnquotedIdentifier",x="QuotedIdentifier",k="Rbracket",$="Rparen",T="Comma",M="Colon",z="Rbrace",V="Number",I="Current",J="Expref",he="Pipe",re="Or",Se="And",de="EQ",we="GT",ie="LT",X="GTE",W="LTE",ce="NE",N="Flatten",_="Star",P="Filter",oe="Dot",Ae="Not",ae="Lbrace",Y="Lbracket",ye="Lparen",A="Literal",q={".":oe,"*":_,",":T,":":M,"{":ae,"}":z,"]":k,"(":ye,")":$,"@":I},U={"<":!0,">":!0,"=":!0,"!":!0},fe={" ":!0," ":!0,"\n":!0};function Z(E){return E>="a"&&E<="z"||E>="A"&&E<="Z"||E==="_"}function H(E){return E>="0"&&E<="9"||E==="-"}function at(E){return E>="a"&&E<="z"||E>="A"&&E<="Z"||E>="0"&&E<="9"||E==="_"}function ct(){}ct.prototype={tokenize:function(E){var D=[];this._current=0;for(var F,ee,xe;this._current<E.length;)if(Z(E[this._current]))F=this._current,ee=this._consumeUnquotedIdentifier(E),D.push({type:j,value:ee,start:F});else if(q[E[this._current]]!==void 0)D.push({type:q[E[this._current]],value:E[this._current],start:this._current}),this._current++;else if(H(E[this._current]))xe=this._consumeNumber(E),D.push(xe);else if(E[this._current]==="[")xe=this._consumeLBracket(E),D.push(xe);else if(E[this._current]==='"')F=this._current,ee=this._consumeQuotedIdentifier(E),D.push({type:x,value:ee,start:F});else if(E[this._current]==="'")F=this._current,ee=this._consumeRawStringLiteral(E),D.push({type:A,value:ee,start:F});else if(E[this._current]==="`"){F=this._current;var Ne=this._consumeLiteral(E);D.push({type:A,value:Ne,start:F})}else if(U[E[this._current]]!==void 0)D.push(this._consumeOperator(E));else if(fe[E[this._current]]!==void 0)this._current++;else if(E[this._current]==="&")F=this._current,this._current++,E[this._current]==="&"?(this._current++,D.push({type:Se,value:"&&",start:F})):D.push({type:J,value:"&",start:F});else if(E[this._current]==="|")F=this._current,this._current++,E[this._current]==="|"?(this._current++,D.push({type:re,value:"||",start:F})):D.push({type:he,value:"|",start:F});else{var Be=new Error("Unknown character:"+E[this._current]);throw Be.name="LexerError",Be}return D},_consumeUnquotedIdentifier:function(E){var D=this._current;for(this._current++;this._current<E.length&&at(E[this._current]);)this._current++;return E.slice(D,this._current)},_consumeQuotedIdentifier:function(E){var D=this._current;this._current++;for(var F=E.length;E[this._current]!=='"'&&this._current<F;){var ee=this._current;E[ee]==="\\"&&(E[ee+1]==="\\"||E[ee+1]==='"')?ee+=2:ee++,this._current=ee}return this._current++,JSON.parse(E.slice(D,this._current))},_consumeRawStringLiteral:function(E){var D=this._current;this._current++;for(var F=E.length;E[this._current]!=="'"&&this._current<F;){var ee=this._current;E[ee]==="\\"&&(E[ee+1]==="\\"||E[ee+1]==="'")?ee+=2:ee++,this._current=ee}this._current++;var xe=E.slice(D+1,this._current-1);return xe.replace("\\'","'")},_consumeNumber:function(E){var D=this._current;this._current++;for(var F=E.length;H(E[this._current])&&this._current<F;)this._current++;var ee=parseInt(E.slice(D,this._current));return{type:V,value:ee,start:D}},_consumeLBracket:function(E){var D=this._current;return this._current++,E[this._current]==="?"?(this._current++,{type:P,value:"[?",start:D}):E[this._current]==="]"?(this._current++,{type:N,value:"[]",start:D}):{type:Y,value:"[",start:D}},_consumeOperator:function(E){var D=this._current,F=E[D];if(this._current++,F==="!")return E[this._current]==="="?(this._current++,{type:ce,value:"!=",start:D}):{type:Ae,value:"!",start:D};if(F==="<")return E[this._current]==="="?(this._current++,{type:W,value:"<=",start:D}):{type:ie,value:"<",start:D};if(F===">")return E[this._current]==="="?(this._current++,{type:X,value:">=",start:D}):{type:we,value:">",start:D};if(F==="="&&E[this._current]==="=")return this._current++,{type:de,value:"==",start:D}},_consumeLiteral:function(E){this._current++;for(var D=this._current,F=E.length,ee;E[this._current]!=="`"&&this._current<F;){var xe=this._current;E[xe]==="\\"&&(E[xe+1]==="\\"||E[xe+1]==="`")?xe+=2:xe++,this._current=xe}var Ne=a(E.slice(D,this._current));return Ne=Ne.replace("\\`","`"),this._looksLikeJSON(Ne)?ee=JSON.parse(Ne):ee=JSON.parse('"'+Ne+'"'),this._current++,ee},_looksLikeJSON:function(E){var D='[{"',F=["true","false","null"],ee="-0123456789";if(E==="")return!1;if(D.indexOf(E[0])>=0||F.indexOf(E)>=0)return!0;if(ee.indexOf(E[0])>=0)try{return JSON.parse(E),!0}catch{return!1}else return!1}};var Ee={};Ee[w]=0,Ee[j]=0,Ee[x]=0,Ee[k]=0,Ee[$]=0,Ee[T]=0,Ee[z]=0,Ee[V]=0,Ee[I]=0,Ee[J]=0,Ee[he]=1,Ee[re]=2,Ee[Se]=3,Ee[de]=5,Ee[we]=5,Ee[ie]=5,Ee[X]=5,Ee[W]=5,Ee[ce]=5,Ee[N]=9,Ee[_]=20,Ee[P]=21,Ee[oe]=40,Ee[Ae]=45,Ee[ae]=50,Ee[Y]=55,Ee[ye]=60;function pt(){}pt.prototype={parse:function(E){this._loadTokens(E),this.index=0;var D=this.expression(0);if(this._lookahead(0)!==w){var F=this._lookaheadToken(0),ee=new Error("Unexpected token type: "+F.type+", value: "+F.value);throw ee.name="ParserError",ee}return D},_loadTokens:function(E){var D=new ct,F=D.tokenize(E);F.push({type:w,value:"",start:E.length}),this.tokens=F},expression:function(E){var D=this._lookaheadToken(0);this._advance();for(var F=this.nud(D),ee=this._lookahead(0);E<Ee[ee];)this._advance(),F=this.led(ee,F),ee=this._lookahead(0);return F},_lookahead:function(E){return this.tokens[this.index+E].type},_lookaheadToken:function(E){return this.tokens[this.index+E]},_advance:function(){this.index++},nud:function(E){var D,F,ee;switch(E.type){case A:return{type:"Literal",value:E.value};case j:return{type:"Field",name:E.value};case x:var xe={type:"Field",name:E.value};if(this._lookahead(0)===ye)throw new Error("Quoted identifier not allowed for function names.");return xe;case Ae:return F=this.expression(Ee.Not),{type:"NotExpression",children:[F]};case _:return D={type:"Identity"},F=null,this._lookahead(0)===k?F={type:"Identity"}:F=this._parseProjectionRHS(Ee.Star),{type:"ValueProjection",children:[D,F]};case P:return this.led(E.type,{type:"Identity"});case ae:return this._parseMultiselectHash();case N:return D={type:N,children:[{type:"Identity"}]},F=this._parseProjectionRHS(Ee.Flatten),{type:"Projection",children:[D,F]};case Y:return this._lookahead(0)===V||this._lookahead(0)===M?(F=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},F)):this._lookahead(0)===_&&this._lookahead(1)===k?(this._advance(),this._advance(),F=this._parseProjectionRHS(Ee.Star),{type:"Projection",children:[{type:"Identity"},F]}):this._parseMultiselectList();case I:return{type:I};case J:return ee=this.expression(Ee.Expref),{type:"ExpressionReference",children:[ee]};case ye:for(var Ne=[];this._lookahead(0)!==$;)this._lookahead(0)===I?(ee={type:I},this._advance()):ee=this.expression(0),Ne.push(ee);return this._match($),Ne[0];default:this._errorToken(E)}},led:function(E,D){var F;switch(E){case oe:var ee=Ee.Dot;return this._lookahead(0)!==_?(F=this._parseDotRHS(ee),{type:"Subexpression",children:[D,F]}):(this._advance(),F=this._parseProjectionRHS(ee),{type:"ValueProjection",children:[D,F]});case he:return F=this.expression(Ee.Pipe),{type:he,children:[D,F]};case re:return F=this.expression(Ee.Or),{type:"OrExpression",children:[D,F]};case Se:return F=this.expression(Ee.And),{type:"AndExpression",children:[D,F]};case ye:for(var xe=D.name,Ne=[],Be,ge;this._lookahead(0)!==$;)this._lookahead(0)===I?(Be={type:I},this._advance()):Be=this.expression(0),this._lookahead(0)===T&&this._match(T),Ne.push(Be);return this._match($),ge={type:"Function",name:xe,children:Ne},ge;case P:var je=this.expression(0);return this._match(k),this._lookahead(0)===N?F={type:"Identity"}:F=this._parseProjectionRHS(Ee.Filter),{type:"FilterProjection",children:[D,F,je]};case N:var wt={type:N,children:[D]},ut=this._parseProjectionRHS(Ee.Flatten);return{type:"Projection",children:[wt,ut]};case de:case ce:case we:case X:case ie:case W:return this._parseComparator(D,E);case Y:var Ye=this._lookaheadToken(0);return Ye.type===V||Ye.type===M?(F=this._parseIndexExpression(),this._projectIfSlice(D,F)):(this._match(_),this._match(k),F=this._parseProjectionRHS(Ee.Star),{type:"Projection",children:[D,F]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(E){if(this._lookahead(0)===E)this._advance();else{var D=this._lookaheadToken(0),F=new Error("Expected "+E+", got: "+D.type);throw F.name="ParserError",F}},_errorToken:function(E){var D=new Error("Invalid token ("+E.type+'): "'+E.value+'"');throw D.name="ParserError",D},_parseIndexExpression:function(){if(this._lookahead(0)===M||this._lookahead(1)===M)return this._parseSliceExpression();var E={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(k),E},_projectIfSlice:function(E,D){var F={type:"IndexExpression",children:[E,D]};return D.type==="Slice"?{type:"Projection",children:[F,this._parseProjectionRHS(Ee.Star)]}:F},_parseSliceExpression:function(){for(var E=[null,null,null],D=0,F=this._lookahead(0);F!==k&&D<3;){if(F===M)D++,this._advance();else if(F===V)E[D]=this._lookaheadToken(0).value,this._advance();else{var ee=this._lookahead(0),xe=new Error("Syntax error, unexpected token: "+ee.value+"("+ee.type+")");throw xe.name="Parsererror",xe}F=this._lookahead(0)}return this._match(k),{type:"Slice",children:E}},_parseComparator:function(E,D){var F=this.expression(Ee[D]);return{type:"Comparator",name:D,children:[E,F]}},_parseDotRHS:function(E){var D=this._lookahead(0),F=[j,x,_];if(F.indexOf(D)>=0)return this.expression(E);if(D===Y)return this._match(Y),this._parseMultiselectList();if(D===ae)return this._match(ae),this._parseMultiselectHash()},_parseProjectionRHS:function(E){var D;if(Ee[this._lookahead(0)]<10)D={type:"Identity"};else if(this._lookahead(0)===Y)D=this.expression(E);else if(this._lookahead(0)===P)D=this.expression(E);else if(this._lookahead(0)===oe)this._match(oe),D=this._parseDotRHS(E);else{var F=this._lookaheadToken(0),ee=new Error("Sytanx error, unexpected token: "+F.value+"("+F.type+")");throw ee.name="ParserError",ee}return D},_parseMultiselectList:function(){for(var E=[];this._lookahead(0)!==k;){var D=this.expression(0);if(E.push(D),this._lookahead(0)===T&&(this._match(T),this._lookahead(0)===k))throw new Error("Unexpected token Rbracket")}return this._match(k),{type:"MultiSelectList",children:E}},_parseMultiselectHash:function(){for(var E=[],D=[j,x],F,ee,xe,Ne;;){if(F=this._lookaheadToken(0),D.indexOf(F.type)<0)throw new Error("Expecting an identifier token, got: "+F.type);if(ee=F.value,this._advance(),this._match(M),xe=this.expression(0),Ne={type:"KeyValuePair",name:ee,value:xe},E.push(Ne),this._lookahead(0)===T)this._match(T);else if(this._lookahead(0)===z){this._match(z);break}}return{type:"MultiSelectHash",children:E}}};function Le(E){this.runtime=E}Le.prototype={search:function(E,D){return this.visit(E,D)},visit:function(E,D){var F,ee,xe,Ne,Be,ge,je,wt,ut,Ye;switch(E.type){case"Field":return D!==null&&r(D)?(ge=D[E.name],ge===void 0?null:ge):null;case"Subexpression":for(xe=this.visit(E.children[0],D),Ye=1;Ye<E.children.length;Ye++)if(xe=this.visit(E.children[1],xe),xe===null)return null;return xe;case"IndexExpression":return je=this.visit(E.children[0],D),wt=this.visit(E.children[1],je),wt;case"Index":if(!n(D))return null;var Xe=E.value;return Xe<0&&(Xe=D.length+Xe),xe=D[Xe],xe===void 0&&(xe=null),xe;case"Slice":if(!n(D))return null;var Jt=E.children.slice(0),Un=this.computeSliceParams(D.length,Jt),Jn=Un[0],Kt=Un[1],Nn=Un[2];if(xe=[],Nn>0)for(Ye=Jn;Ye<Kt;Ye+=Nn)xe.push(D[Ye]);else for(Ye=Jn;Ye>Kt;Ye+=Nn)xe.push(D[Ye]);return xe;case"Projection":var rn=this.visit(E.children[0],D);if(!n(rn))return null;for(ut=[],Ye=0;Ye<rn.length;Ye++)ee=this.visit(E.children[1],rn[Ye]),ee!==null&&ut.push(ee);return ut;case"ValueProjection":if(rn=this.visit(E.children[0],D),!r(rn))return null;ut=[];var ln=s(rn);for(Ye=0;Ye<ln.length;Ye++)ee=this.visit(E.children[1],ln[Ye]),ee!==null&&ut.push(ee);return ut;case"FilterProjection":if(rn=this.visit(E.children[0],D),!n(rn))return null;var Sn=[],St=[];for(Ye=0;Ye<rn.length;Ye++)F=this.visit(E.children[2],rn[Ye]),i(F)||Sn.push(rn[Ye]);for(var Mn=0;Mn<Sn.length;Mn++)ee=this.visit(E.children[1],Sn[Mn]),ee!==null&&St.push(ee);return St;case"Comparator":switch(Ne=this.visit(E.children[0],D),Be=this.visit(E.children[1],D),E.name){case de:xe=o(Ne,Be);break;case ce:xe=!o(Ne,Be);break;case we:xe=Ne>Be;break;case X:xe=Ne>=Be;break;case ie:xe=Ne<Be;break;case W:xe=Ne<=Be;break;default:throw new Error("Unknown comparator: "+E.name)}return xe;case N:var Dt=this.visit(E.children[0],D);if(!n(Dt))return null;var nt=[];for(Ye=0;Ye<Dt.length;Ye++)ee=Dt[Ye],n(ee)?nt.push.apply(nt,ee):nt.push(ee);return nt;case"Identity":return D;case"MultiSelectList":if(D===null)return null;for(ut=[],Ye=0;Ye<E.children.length;Ye++)ut.push(this.visit(E.children[Ye],D));return ut;case"MultiSelectHash":if(D===null)return null;ut={};var cn;for(Ye=0;Ye<E.children.length;Ye++)cn=E.children[Ye],ut[cn.name]=this.visit(cn.value,D);return ut;case"OrExpression":return F=this.visit(E.children[0],D),i(F)&&(F=this.visit(E.children[1],D)),F;case"AndExpression":return Ne=this.visit(E.children[0],D),i(Ne)===!0?Ne:this.visit(E.children[1],D);case"NotExpression":return Ne=this.visit(E.children[0],D),i(Ne);case"Literal":return E.value;case he:return je=this.visit(E.children[0],D),this.visit(E.children[1],je);case I:return D;case"Function":var Gt=[];for(Ye=0;Ye<E.children.length;Ye++)Gt.push(this.visit(E.children[Ye],D));return this.runtime.callFunction(E.name,Gt);case"ExpressionReference":var ir=E.children[0];return ir.jmespathType=J,ir;default:throw new Error("Unknown node type: "+E.type)}},computeSliceParams:function(E,D){var F=D[0],ee=D[1],xe=D[2],Ne=[null,null,null];if(xe===null)xe=1;else if(xe===0){var Be=new Error("Invalid slice, step cannot be 0");throw Be.name="RuntimeError",Be}var ge=xe<0;return F===null?F=ge?E-1:0:F=this.capSliceRange(E,F,xe),ee===null?ee=ge?-1:E:ee=this.capSliceRange(E,ee,xe),Ne[0]=F,Ne[1]=ee,Ne[2]=xe,Ne},capSliceRange:function(E,D,F){return D<0?(D+=E,D<0&&(D=F<0?-1:0)):D>=E&&(D=F<0?E-1:E),D}};function Ke(E){this._interpreter=E,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[l]}]},avg:{_func:this._functionAvg,_signature:[{types:[m]}]},ceil:{_func:this._functionCeil,_signature:[{types:[l]}]},contains:{_func:this._functionContains,_signature:[{types:[h,d]},{types:[u]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[h]},{types:[h]}]},floor:{_func:this._functionFloor,_signature:[{types:[l]}]},length:{_func:this._functionLength,_signature:[{types:[h,d,f]}]},map:{_func:this._functionMap,_signature:[{types:[v]},{types:[d]}]},max:{_func:this._functionMax,_signature:[{types:[m,b]}]},merge:{_func:this._functionMerge,_signature:[{types:[f],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[d]},{types:[v]}]},sum:{_func:this._functionSum,_signature:[{types:[m]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[h]},{types:[h]}]},min:{_func:this._functionMin,_signature:[{types:[m,b]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[d]},{types:[v]}]},type:{_func:this._functionType,_signature:[{types:[u]}]},keys:{_func:this._functionKeys,_signature:[{types:[f]}]},values:{_func:this._functionValues,_signature:[{types:[f]}]},sort:{_func:this._functionSort,_signature:[{types:[b,m]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[d]},{types:[v]}]},join:{_func:this._functionJoin,_signature:[{types:[h]},{types:[b]}]},reverse:{_func:this._functionReverse,_signature:[{types:[h,d]}]},to_array:{_func:this._functionToArray,_signature:[{types:[u]}]},to_string:{_func:this._functionToString,_signature:[{types:[u]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[u]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[u],variadic:!0}]}}}Ke.prototype={callFunction:function(E,D){var F=this.functionTable[E];if(F===void 0)throw new Error("Unknown function: "+E+"()");return this._validateArgs(E,D,F._signature),F._func.call(this,D)},_validateArgs:function(E,D,F){var ee;if(F[F.length-1].variadic){if(D.length<F.length)throw ee=F.length===1?" argument":" arguments",new Error("ArgumentError: "+E+"() takes at least"+F.length+ee+" but received "+D.length)}else if(D.length!==F.length)throw ee=F.length===1?" argument":" arguments",new Error("ArgumentError: "+E+"() takes "+F.length+ee+" but received "+D.length);for(var xe,Ne,Be,ge=0;ge<F.length;ge++){Be=!1,xe=F[ge].types,Ne=this._getTypeName(D[ge]);for(var je=0;je<xe.length;je++)if(this._typeMatches(Ne,xe[je],D[ge])){Be=!0;break}if(!Be){var wt=xe.map(function(ut){return y[ut]}).join(",");throw new Error("TypeError: "+E+"() expected argument "+(ge+1)+" to be type "+wt+" but received type "+y[Ne]+" instead.")}}},_typeMatches:function(E,D,F){if(D===u)return!0;if(D===b||D===m||D===d){if(D===d)return E===d;if(E===d){var ee;D===m?ee=l:D===b&&(ee=h);for(var xe=0;xe<F.length;xe++)if(!this._typeMatches(this._getTypeName(F[xe]),ee,F[xe]))return!1;return!0}}else return E===D},_getTypeName:function(E){switch(Object.prototype.toString.call(E)){case"[object String]":return h;case"[object Number]":return l;case"[object Array]":return d;case"[object Boolean]":return p;case"[object Null]":return g;case"[object Object]":return E.jmespathType===J?v:f}},_functionStartsWith:function(E){return E[0].lastIndexOf(E[1])===0},_functionEndsWith:function(E){var D=E[0],F=E[1];return D.indexOf(F,D.length-F.length)!==-1},_functionReverse:function(E){var D=this._getTypeName(E[0]);if(D===h){for(var F=E[0],ee="",xe=F.length-1;xe>=0;xe--)ee+=F[xe];return ee}else{var Ne=E[0].slice(0);return Ne.reverse(),Ne}},_functionAbs:function(E){return Math.abs(E[0])},_functionCeil:function(E){return Math.ceil(E[0])},_functionAvg:function(E){for(var D=0,F=E[0],ee=0;ee<F.length;ee++)D+=F[ee];return D/F.length},_functionContains:function(E){return E[0].indexOf(E[1])>=0},_functionFloor:function(E){return Math.floor(E[0])},_functionLength:function(E){return r(E[0])?Object.keys(E[0]).length:E[0].length},_functionMap:function(E){for(var D=[],F=this._interpreter,ee=E[0],xe=E[1],Ne=0;Ne<xe.length;Ne++)D.push(F.visit(ee,xe[Ne]));return D},_functionMerge:function(E){for(var D={},F=0;F<E.length;F++){var ee=E[F];for(var xe in ee)D[xe]=ee[xe]}return D},_functionMax:function(E){if(E[0].length>0){var D=this._getTypeName(E[0][0]);if(D===l)return Math.max.apply(Math,E[0]);for(var F=E[0],ee=F[0],xe=1;xe<F.length;xe++)ee.localeCompare(F[xe])<0&&(ee=F[xe]);return ee}else return null},_functionMin:function(E){if(E[0].length>0){var D=this._getTypeName(E[0][0]);if(D===l)return Math.min.apply(Math,E[0]);for(var F=E[0],ee=F[0],xe=1;xe<F.length;xe++)F[xe].localeCompare(ee)<0&&(ee=F[xe]);return ee}else return null},_functionSum:function(E){for(var D=0,F=E[0],ee=0;ee<F.length;ee++)D+=F[ee];return D},_functionType:function(E){switch(this._getTypeName(E[0])){case l:return"number";case h:return"string";case d:return"array";case f:return"object";case p:return"boolean";case v:return"expref";case g:return"null"}},_functionKeys:function(E){return Object.keys(E[0])},_functionValues:function(E){for(var D=E[0],F=Object.keys(D),ee=[],xe=0;xe<F.length;xe++)ee.push(D[F[xe]]);return ee},_functionJoin:function(E){var D=E[0],F=E[1];return F.join(D)},_functionToArray:function(E){return this._getTypeName(E[0])===d?E[0]:[E[0]]},_functionToString:function(E){return this._getTypeName(E[0])===h?E[0]:JSON.stringify(E[0])},_functionToNumber:function(E){var D=this._getTypeName(E[0]),F;return D===l?E[0]:D===h&&(F=+E[0],!isNaN(F))?F:null},_functionNotNull:function(E){for(var D=0;D<E.length;D++)if(this._getTypeName(E[D])!==g)return E[D];return null},_functionSort:function(E){var D=E[0].slice(0);return D.sort(),D},_functionSortBy:function(E){var D=E[0].slice(0);if(D.length===0)return D;var F=this._interpreter,ee=E[1],xe=this._getTypeName(F.visit(ee,D[0]));if([l,h].indexOf(xe)<0)throw new Error("TypeError");for(var Ne=this,Be=[],ge=0;ge<D.length;ge++)Be.push([ge,D[ge]]);Be.sort(function(wt,ut){var Ye=F.visit(ee,wt[1]),Xe=F.visit(ee,ut[1]);if(Ne._getTypeName(Ye)!==xe)throw new Error("TypeError: expected "+xe+", received "+Ne._getTypeName(Ye));if(Ne._getTypeName(Xe)!==xe)throw new Error("TypeError: expected "+xe+", received "+Ne._getTypeName(Xe));return Ye>Xe?1:Ye<Xe?-1:wt[0]-ut[0]});for(var je=0;je<Be.length;je++)D[je]=Be[je][1];return D},_functionMaxBy:function(E){for(var D=E[1],F=E[0],ee=this.createKeyFunction(D,[l,h]),xe=-1/0,Ne,Be,ge=0;ge<F.length;ge++)Be=ee(F[ge]),Be>xe&&(xe=Be,Ne=F[ge]);return Ne},_functionMinBy:function(E){for(var D=E[1],F=E[0],ee=this.createKeyFunction(D,[l,h]),xe=1/0,Ne,Be,ge=0;ge<F.length;ge++)Be=ee(F[ge]),Be<xe&&(xe=Be,Ne=F[ge]);return Ne},createKeyFunction:function(E,D){var F=this,ee=this._interpreter,xe=function(Ne){var Be=ee.visit(E,Ne);if(D.indexOf(F._getTypeName(Be))<0){var ge="TypeError: expected one of "+D+", received "+F._getTypeName(Be);throw new Error(ge)}return Be};return xe}};function ft(E){var D=new pt,F=D.parse(E);return F}function We(E){var D=new ct;return D.tokenize(E)}function Nt(E,D){var F=new pt,ee=new Ke,xe=new Le(ee);ee._interpreter=xe;var Ne=F.parse(D);return xe.search(Ne,E)}e.tokenize=We,e.compile=ft,e.search=Nt,e.strictDeepEqual=o})(t)})(vj)),vj}var cN=lN();const uN=Ng(cN);var Tp={},gj;function hN(){if(gj)return Tp;gj=1;var t={b:"\b",f:"\f",n:`
1
+ import{L as aN}from"./app-B8WIou1H.js";function Ng(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vj={},mj;function lN(){return mj||(mj=1,(function(t){(function(e){function n(E){return E!==null?Object.prototype.toString.call(E)==="[object Array]":!1}function r(E){return E!==null?Object.prototype.toString.call(E)==="[object Object]":!1}function o(E,D){if(E===D)return!0;var F=Object.prototype.toString.call(E);if(F!==Object.prototype.toString.call(D))return!1;if(n(E)===!0){if(E.length!==D.length)return!1;for(var ee=0;ee<E.length;ee++)if(o(E[ee],D[ee])===!1)return!1;return!0}if(r(E)===!0){var xe={};for(var Ne in E)if(hasOwnProperty.call(E,Ne)){if(o(E[Ne],D[Ne])===!1)return!1;xe[Ne]=!0}for(var Be in D)if(hasOwnProperty.call(D,Be)&&xe[Be]!==!0)return!1;return!0}return!1}function i(E){if(E===""||E===!1||E===null||n(E)&&E.length===0)return!0;if(r(E)){for(var D in E)if(E.hasOwnProperty(D))return!1;return!0}else return!1}function s(E){for(var D=Object.keys(E),F=[],ee=0;ee<D.length;ee++)F.push(E[D[ee]]);return F}var a;typeof String.prototype.trimLeft=="function"?a=function(E){return E.trimLeft()}:a=function(E){return E.match(/^\s*(.*)/)[1]};var l=0,u=1,h=2,d=3,f=4,p=5,v=6,g=7,m=8,b=9,y={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},w="EOF",j="UnquotedIdentifier",x="QuotedIdentifier",k="Rbracket",$="Rparen",T="Comma",M="Colon",z="Rbrace",V="Number",I="Current",J="Expref",he="Pipe",re="Or",Se="And",de="EQ",we="GT",ie="LT",X="GTE",W="LTE",ce="NE",N="Flatten",_="Star",P="Filter",oe="Dot",Ae="Not",ae="Lbrace",Y="Lbracket",ye="Lparen",A="Literal",q={".":oe,"*":_,",":T,":":M,"{":ae,"}":z,"]":k,"(":ye,")":$,"@":I},U={"<":!0,">":!0,"=":!0,"!":!0},fe={" ":!0," ":!0,"\n":!0};function Z(E){return E>="a"&&E<="z"||E>="A"&&E<="Z"||E==="_"}function H(E){return E>="0"&&E<="9"||E==="-"}function at(E){return E>="a"&&E<="z"||E>="A"&&E<="Z"||E>="0"&&E<="9"||E==="_"}function ct(){}ct.prototype={tokenize:function(E){var D=[];this._current=0;for(var F,ee,xe;this._current<E.length;)if(Z(E[this._current]))F=this._current,ee=this._consumeUnquotedIdentifier(E),D.push({type:j,value:ee,start:F});else if(q[E[this._current]]!==void 0)D.push({type:q[E[this._current]],value:E[this._current],start:this._current}),this._current++;else if(H(E[this._current]))xe=this._consumeNumber(E),D.push(xe);else if(E[this._current]==="[")xe=this._consumeLBracket(E),D.push(xe);else if(E[this._current]==='"')F=this._current,ee=this._consumeQuotedIdentifier(E),D.push({type:x,value:ee,start:F});else if(E[this._current]==="'")F=this._current,ee=this._consumeRawStringLiteral(E),D.push({type:A,value:ee,start:F});else if(E[this._current]==="`"){F=this._current;var Ne=this._consumeLiteral(E);D.push({type:A,value:Ne,start:F})}else if(U[E[this._current]]!==void 0)D.push(this._consumeOperator(E));else if(fe[E[this._current]]!==void 0)this._current++;else if(E[this._current]==="&")F=this._current,this._current++,E[this._current]==="&"?(this._current++,D.push({type:Se,value:"&&",start:F})):D.push({type:J,value:"&",start:F});else if(E[this._current]==="|")F=this._current,this._current++,E[this._current]==="|"?(this._current++,D.push({type:re,value:"||",start:F})):D.push({type:he,value:"|",start:F});else{var Be=new Error("Unknown character:"+E[this._current]);throw Be.name="LexerError",Be}return D},_consumeUnquotedIdentifier:function(E){var D=this._current;for(this._current++;this._current<E.length&&at(E[this._current]);)this._current++;return E.slice(D,this._current)},_consumeQuotedIdentifier:function(E){var D=this._current;this._current++;for(var F=E.length;E[this._current]!=='"'&&this._current<F;){var ee=this._current;E[ee]==="\\"&&(E[ee+1]==="\\"||E[ee+1]==='"')?ee+=2:ee++,this._current=ee}return this._current++,JSON.parse(E.slice(D,this._current))},_consumeRawStringLiteral:function(E){var D=this._current;this._current++;for(var F=E.length;E[this._current]!=="'"&&this._current<F;){var ee=this._current;E[ee]==="\\"&&(E[ee+1]==="\\"||E[ee+1]==="'")?ee+=2:ee++,this._current=ee}this._current++;var xe=E.slice(D+1,this._current-1);return xe.replace("\\'","'")},_consumeNumber:function(E){var D=this._current;this._current++;for(var F=E.length;H(E[this._current])&&this._current<F;)this._current++;var ee=parseInt(E.slice(D,this._current));return{type:V,value:ee,start:D}},_consumeLBracket:function(E){var D=this._current;return this._current++,E[this._current]==="?"?(this._current++,{type:P,value:"[?",start:D}):E[this._current]==="]"?(this._current++,{type:N,value:"[]",start:D}):{type:Y,value:"[",start:D}},_consumeOperator:function(E){var D=this._current,F=E[D];if(this._current++,F==="!")return E[this._current]==="="?(this._current++,{type:ce,value:"!=",start:D}):{type:Ae,value:"!",start:D};if(F==="<")return E[this._current]==="="?(this._current++,{type:W,value:"<=",start:D}):{type:ie,value:"<",start:D};if(F===">")return E[this._current]==="="?(this._current++,{type:X,value:">=",start:D}):{type:we,value:">",start:D};if(F==="="&&E[this._current]==="=")return this._current++,{type:de,value:"==",start:D}},_consumeLiteral:function(E){this._current++;for(var D=this._current,F=E.length,ee;E[this._current]!=="`"&&this._current<F;){var xe=this._current;E[xe]==="\\"&&(E[xe+1]==="\\"||E[xe+1]==="`")?xe+=2:xe++,this._current=xe}var Ne=a(E.slice(D,this._current));return Ne=Ne.replace("\\`","`"),this._looksLikeJSON(Ne)?ee=JSON.parse(Ne):ee=JSON.parse('"'+Ne+'"'),this._current++,ee},_looksLikeJSON:function(E){var D='[{"',F=["true","false","null"],ee="-0123456789";if(E==="")return!1;if(D.indexOf(E[0])>=0||F.indexOf(E)>=0)return!0;if(ee.indexOf(E[0])>=0)try{return JSON.parse(E),!0}catch{return!1}else return!1}};var Ee={};Ee[w]=0,Ee[j]=0,Ee[x]=0,Ee[k]=0,Ee[$]=0,Ee[T]=0,Ee[z]=0,Ee[V]=0,Ee[I]=0,Ee[J]=0,Ee[he]=1,Ee[re]=2,Ee[Se]=3,Ee[de]=5,Ee[we]=5,Ee[ie]=5,Ee[X]=5,Ee[W]=5,Ee[ce]=5,Ee[N]=9,Ee[_]=20,Ee[P]=21,Ee[oe]=40,Ee[Ae]=45,Ee[ae]=50,Ee[Y]=55,Ee[ye]=60;function pt(){}pt.prototype={parse:function(E){this._loadTokens(E),this.index=0;var D=this.expression(0);if(this._lookahead(0)!==w){var F=this._lookaheadToken(0),ee=new Error("Unexpected token type: "+F.type+", value: "+F.value);throw ee.name="ParserError",ee}return D},_loadTokens:function(E){var D=new ct,F=D.tokenize(E);F.push({type:w,value:"",start:E.length}),this.tokens=F},expression:function(E){var D=this._lookaheadToken(0);this._advance();for(var F=this.nud(D),ee=this._lookahead(0);E<Ee[ee];)this._advance(),F=this.led(ee,F),ee=this._lookahead(0);return F},_lookahead:function(E){return this.tokens[this.index+E].type},_lookaheadToken:function(E){return this.tokens[this.index+E]},_advance:function(){this.index++},nud:function(E){var D,F,ee;switch(E.type){case A:return{type:"Literal",value:E.value};case j:return{type:"Field",name:E.value};case x:var xe={type:"Field",name:E.value};if(this._lookahead(0)===ye)throw new Error("Quoted identifier not allowed for function names.");return xe;case Ae:return F=this.expression(Ee.Not),{type:"NotExpression",children:[F]};case _:return D={type:"Identity"},F=null,this._lookahead(0)===k?F={type:"Identity"}:F=this._parseProjectionRHS(Ee.Star),{type:"ValueProjection",children:[D,F]};case P:return this.led(E.type,{type:"Identity"});case ae:return this._parseMultiselectHash();case N:return D={type:N,children:[{type:"Identity"}]},F=this._parseProjectionRHS(Ee.Flatten),{type:"Projection",children:[D,F]};case Y:return this._lookahead(0)===V||this._lookahead(0)===M?(F=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},F)):this._lookahead(0)===_&&this._lookahead(1)===k?(this._advance(),this._advance(),F=this._parseProjectionRHS(Ee.Star),{type:"Projection",children:[{type:"Identity"},F]}):this._parseMultiselectList();case I:return{type:I};case J:return ee=this.expression(Ee.Expref),{type:"ExpressionReference",children:[ee]};case ye:for(var Ne=[];this._lookahead(0)!==$;)this._lookahead(0)===I?(ee={type:I},this._advance()):ee=this.expression(0),Ne.push(ee);return this._match($),Ne[0];default:this._errorToken(E)}},led:function(E,D){var F;switch(E){case oe:var ee=Ee.Dot;return this._lookahead(0)!==_?(F=this._parseDotRHS(ee),{type:"Subexpression",children:[D,F]}):(this._advance(),F=this._parseProjectionRHS(ee),{type:"ValueProjection",children:[D,F]});case he:return F=this.expression(Ee.Pipe),{type:he,children:[D,F]};case re:return F=this.expression(Ee.Or),{type:"OrExpression",children:[D,F]};case Se:return F=this.expression(Ee.And),{type:"AndExpression",children:[D,F]};case ye:for(var xe=D.name,Ne=[],Be,ge;this._lookahead(0)!==$;)this._lookahead(0)===I?(Be={type:I},this._advance()):Be=this.expression(0),this._lookahead(0)===T&&this._match(T),Ne.push(Be);return this._match($),ge={type:"Function",name:xe,children:Ne},ge;case P:var je=this.expression(0);return this._match(k),this._lookahead(0)===N?F={type:"Identity"}:F=this._parseProjectionRHS(Ee.Filter),{type:"FilterProjection",children:[D,F,je]};case N:var wt={type:N,children:[D]},ut=this._parseProjectionRHS(Ee.Flatten);return{type:"Projection",children:[wt,ut]};case de:case ce:case we:case X:case ie:case W:return this._parseComparator(D,E);case Y:var Ye=this._lookaheadToken(0);return Ye.type===V||Ye.type===M?(F=this._parseIndexExpression(),this._projectIfSlice(D,F)):(this._match(_),this._match(k),F=this._parseProjectionRHS(Ee.Star),{type:"Projection",children:[D,F]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(E){if(this._lookahead(0)===E)this._advance();else{var D=this._lookaheadToken(0),F=new Error("Expected "+E+", got: "+D.type);throw F.name="ParserError",F}},_errorToken:function(E){var D=new Error("Invalid token ("+E.type+'): "'+E.value+'"');throw D.name="ParserError",D},_parseIndexExpression:function(){if(this._lookahead(0)===M||this._lookahead(1)===M)return this._parseSliceExpression();var E={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(k),E},_projectIfSlice:function(E,D){var F={type:"IndexExpression",children:[E,D]};return D.type==="Slice"?{type:"Projection",children:[F,this._parseProjectionRHS(Ee.Star)]}:F},_parseSliceExpression:function(){for(var E=[null,null,null],D=0,F=this._lookahead(0);F!==k&&D<3;){if(F===M)D++,this._advance();else if(F===V)E[D]=this._lookaheadToken(0).value,this._advance();else{var ee=this._lookahead(0),xe=new Error("Syntax error, unexpected token: "+ee.value+"("+ee.type+")");throw xe.name="Parsererror",xe}F=this._lookahead(0)}return this._match(k),{type:"Slice",children:E}},_parseComparator:function(E,D){var F=this.expression(Ee[D]);return{type:"Comparator",name:D,children:[E,F]}},_parseDotRHS:function(E){var D=this._lookahead(0),F=[j,x,_];if(F.indexOf(D)>=0)return this.expression(E);if(D===Y)return this._match(Y),this._parseMultiselectList();if(D===ae)return this._match(ae),this._parseMultiselectHash()},_parseProjectionRHS:function(E){var D;if(Ee[this._lookahead(0)]<10)D={type:"Identity"};else if(this._lookahead(0)===Y)D=this.expression(E);else if(this._lookahead(0)===P)D=this.expression(E);else if(this._lookahead(0)===oe)this._match(oe),D=this._parseDotRHS(E);else{var F=this._lookaheadToken(0),ee=new Error("Sytanx error, unexpected token: "+F.value+"("+F.type+")");throw ee.name="ParserError",ee}return D},_parseMultiselectList:function(){for(var E=[];this._lookahead(0)!==k;){var D=this.expression(0);if(E.push(D),this._lookahead(0)===T&&(this._match(T),this._lookahead(0)===k))throw new Error("Unexpected token Rbracket")}return this._match(k),{type:"MultiSelectList",children:E}},_parseMultiselectHash:function(){for(var E=[],D=[j,x],F,ee,xe,Ne;;){if(F=this._lookaheadToken(0),D.indexOf(F.type)<0)throw new Error("Expecting an identifier token, got: "+F.type);if(ee=F.value,this._advance(),this._match(M),xe=this.expression(0),Ne={type:"KeyValuePair",name:ee,value:xe},E.push(Ne),this._lookahead(0)===T)this._match(T);else if(this._lookahead(0)===z){this._match(z);break}}return{type:"MultiSelectHash",children:E}}};function Le(E){this.runtime=E}Le.prototype={search:function(E,D){return this.visit(E,D)},visit:function(E,D){var F,ee,xe,Ne,Be,ge,je,wt,ut,Ye;switch(E.type){case"Field":return D!==null&&r(D)?(ge=D[E.name],ge===void 0?null:ge):null;case"Subexpression":for(xe=this.visit(E.children[0],D),Ye=1;Ye<E.children.length;Ye++)if(xe=this.visit(E.children[1],xe),xe===null)return null;return xe;case"IndexExpression":return je=this.visit(E.children[0],D),wt=this.visit(E.children[1],je),wt;case"Index":if(!n(D))return null;var Xe=E.value;return Xe<0&&(Xe=D.length+Xe),xe=D[Xe],xe===void 0&&(xe=null),xe;case"Slice":if(!n(D))return null;var Jt=E.children.slice(0),Un=this.computeSliceParams(D.length,Jt),Jn=Un[0],Kt=Un[1],Nn=Un[2];if(xe=[],Nn>0)for(Ye=Jn;Ye<Kt;Ye+=Nn)xe.push(D[Ye]);else for(Ye=Jn;Ye>Kt;Ye+=Nn)xe.push(D[Ye]);return xe;case"Projection":var rn=this.visit(E.children[0],D);if(!n(rn))return null;for(ut=[],Ye=0;Ye<rn.length;Ye++)ee=this.visit(E.children[1],rn[Ye]),ee!==null&&ut.push(ee);return ut;case"ValueProjection":if(rn=this.visit(E.children[0],D),!r(rn))return null;ut=[];var ln=s(rn);for(Ye=0;Ye<ln.length;Ye++)ee=this.visit(E.children[1],ln[Ye]),ee!==null&&ut.push(ee);return ut;case"FilterProjection":if(rn=this.visit(E.children[0],D),!n(rn))return null;var Sn=[],St=[];for(Ye=0;Ye<rn.length;Ye++)F=this.visit(E.children[2],rn[Ye]),i(F)||Sn.push(rn[Ye]);for(var Mn=0;Mn<Sn.length;Mn++)ee=this.visit(E.children[1],Sn[Mn]),ee!==null&&St.push(ee);return St;case"Comparator":switch(Ne=this.visit(E.children[0],D),Be=this.visit(E.children[1],D),E.name){case de:xe=o(Ne,Be);break;case ce:xe=!o(Ne,Be);break;case we:xe=Ne>Be;break;case X:xe=Ne>=Be;break;case ie:xe=Ne<Be;break;case W:xe=Ne<=Be;break;default:throw new Error("Unknown comparator: "+E.name)}return xe;case N:var Dt=this.visit(E.children[0],D);if(!n(Dt))return null;var nt=[];for(Ye=0;Ye<Dt.length;Ye++)ee=Dt[Ye],n(ee)?nt.push.apply(nt,ee):nt.push(ee);return nt;case"Identity":return D;case"MultiSelectList":if(D===null)return null;for(ut=[],Ye=0;Ye<E.children.length;Ye++)ut.push(this.visit(E.children[Ye],D));return ut;case"MultiSelectHash":if(D===null)return null;ut={};var cn;for(Ye=0;Ye<E.children.length;Ye++)cn=E.children[Ye],ut[cn.name]=this.visit(cn.value,D);return ut;case"OrExpression":return F=this.visit(E.children[0],D),i(F)&&(F=this.visit(E.children[1],D)),F;case"AndExpression":return Ne=this.visit(E.children[0],D),i(Ne)===!0?Ne:this.visit(E.children[1],D);case"NotExpression":return Ne=this.visit(E.children[0],D),i(Ne);case"Literal":return E.value;case he:return je=this.visit(E.children[0],D),this.visit(E.children[1],je);case I:return D;case"Function":var Gt=[];for(Ye=0;Ye<E.children.length;Ye++)Gt.push(this.visit(E.children[Ye],D));return this.runtime.callFunction(E.name,Gt);case"ExpressionReference":var ir=E.children[0];return ir.jmespathType=J,ir;default:throw new Error("Unknown node type: "+E.type)}},computeSliceParams:function(E,D){var F=D[0],ee=D[1],xe=D[2],Ne=[null,null,null];if(xe===null)xe=1;else if(xe===0){var Be=new Error("Invalid slice, step cannot be 0");throw Be.name="RuntimeError",Be}var ge=xe<0;return F===null?F=ge?E-1:0:F=this.capSliceRange(E,F,xe),ee===null?ee=ge?-1:E:ee=this.capSliceRange(E,ee,xe),Ne[0]=F,Ne[1]=ee,Ne[2]=xe,Ne},capSliceRange:function(E,D,F){return D<0?(D+=E,D<0&&(D=F<0?-1:0)):D>=E&&(D=F<0?E-1:E),D}};function Ke(E){this._interpreter=E,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[l]}]},avg:{_func:this._functionAvg,_signature:[{types:[m]}]},ceil:{_func:this._functionCeil,_signature:[{types:[l]}]},contains:{_func:this._functionContains,_signature:[{types:[h,d]},{types:[u]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[h]},{types:[h]}]},floor:{_func:this._functionFloor,_signature:[{types:[l]}]},length:{_func:this._functionLength,_signature:[{types:[h,d,f]}]},map:{_func:this._functionMap,_signature:[{types:[v]},{types:[d]}]},max:{_func:this._functionMax,_signature:[{types:[m,b]}]},merge:{_func:this._functionMerge,_signature:[{types:[f],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[d]},{types:[v]}]},sum:{_func:this._functionSum,_signature:[{types:[m]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[h]},{types:[h]}]},min:{_func:this._functionMin,_signature:[{types:[m,b]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[d]},{types:[v]}]},type:{_func:this._functionType,_signature:[{types:[u]}]},keys:{_func:this._functionKeys,_signature:[{types:[f]}]},values:{_func:this._functionValues,_signature:[{types:[f]}]},sort:{_func:this._functionSort,_signature:[{types:[b,m]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[d]},{types:[v]}]},join:{_func:this._functionJoin,_signature:[{types:[h]},{types:[b]}]},reverse:{_func:this._functionReverse,_signature:[{types:[h,d]}]},to_array:{_func:this._functionToArray,_signature:[{types:[u]}]},to_string:{_func:this._functionToString,_signature:[{types:[u]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[u]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[u],variadic:!0}]}}}Ke.prototype={callFunction:function(E,D){var F=this.functionTable[E];if(F===void 0)throw new Error("Unknown function: "+E+"()");return this._validateArgs(E,D,F._signature),F._func.call(this,D)},_validateArgs:function(E,D,F){var ee;if(F[F.length-1].variadic){if(D.length<F.length)throw ee=F.length===1?" argument":" arguments",new Error("ArgumentError: "+E+"() takes at least"+F.length+ee+" but received "+D.length)}else if(D.length!==F.length)throw ee=F.length===1?" argument":" arguments",new Error("ArgumentError: "+E+"() takes "+F.length+ee+" but received "+D.length);for(var xe,Ne,Be,ge=0;ge<F.length;ge++){Be=!1,xe=F[ge].types,Ne=this._getTypeName(D[ge]);for(var je=0;je<xe.length;je++)if(this._typeMatches(Ne,xe[je],D[ge])){Be=!0;break}if(!Be){var wt=xe.map(function(ut){return y[ut]}).join(",");throw new Error("TypeError: "+E+"() expected argument "+(ge+1)+" to be type "+wt+" but received type "+y[Ne]+" instead.")}}},_typeMatches:function(E,D,F){if(D===u)return!0;if(D===b||D===m||D===d){if(D===d)return E===d;if(E===d){var ee;D===m?ee=l:D===b&&(ee=h);for(var xe=0;xe<F.length;xe++)if(!this._typeMatches(this._getTypeName(F[xe]),ee,F[xe]))return!1;return!0}}else return E===D},_getTypeName:function(E){switch(Object.prototype.toString.call(E)){case"[object String]":return h;case"[object Number]":return l;case"[object Array]":return d;case"[object Boolean]":return p;case"[object Null]":return g;case"[object Object]":return E.jmespathType===J?v:f}},_functionStartsWith:function(E){return E[0].lastIndexOf(E[1])===0},_functionEndsWith:function(E){var D=E[0],F=E[1];return D.indexOf(F,D.length-F.length)!==-1},_functionReverse:function(E){var D=this._getTypeName(E[0]);if(D===h){for(var F=E[0],ee="",xe=F.length-1;xe>=0;xe--)ee+=F[xe];return ee}else{var Ne=E[0].slice(0);return Ne.reverse(),Ne}},_functionAbs:function(E){return Math.abs(E[0])},_functionCeil:function(E){return Math.ceil(E[0])},_functionAvg:function(E){for(var D=0,F=E[0],ee=0;ee<F.length;ee++)D+=F[ee];return D/F.length},_functionContains:function(E){return E[0].indexOf(E[1])>=0},_functionFloor:function(E){return Math.floor(E[0])},_functionLength:function(E){return r(E[0])?Object.keys(E[0]).length:E[0].length},_functionMap:function(E){for(var D=[],F=this._interpreter,ee=E[0],xe=E[1],Ne=0;Ne<xe.length;Ne++)D.push(F.visit(ee,xe[Ne]));return D},_functionMerge:function(E){for(var D={},F=0;F<E.length;F++){var ee=E[F];for(var xe in ee)D[xe]=ee[xe]}return D},_functionMax:function(E){if(E[0].length>0){var D=this._getTypeName(E[0][0]);if(D===l)return Math.max.apply(Math,E[0]);for(var F=E[0],ee=F[0],xe=1;xe<F.length;xe++)ee.localeCompare(F[xe])<0&&(ee=F[xe]);return ee}else return null},_functionMin:function(E){if(E[0].length>0){var D=this._getTypeName(E[0][0]);if(D===l)return Math.min.apply(Math,E[0]);for(var F=E[0],ee=F[0],xe=1;xe<F.length;xe++)F[xe].localeCompare(ee)<0&&(ee=F[xe]);return ee}else return null},_functionSum:function(E){for(var D=0,F=E[0],ee=0;ee<F.length;ee++)D+=F[ee];return D},_functionType:function(E){switch(this._getTypeName(E[0])){case l:return"number";case h:return"string";case d:return"array";case f:return"object";case p:return"boolean";case v:return"expref";case g:return"null"}},_functionKeys:function(E){return Object.keys(E[0])},_functionValues:function(E){for(var D=E[0],F=Object.keys(D),ee=[],xe=0;xe<F.length;xe++)ee.push(D[F[xe]]);return ee},_functionJoin:function(E){var D=E[0],F=E[1];return F.join(D)},_functionToArray:function(E){return this._getTypeName(E[0])===d?E[0]:[E[0]]},_functionToString:function(E){return this._getTypeName(E[0])===h?E[0]:JSON.stringify(E[0])},_functionToNumber:function(E){var D=this._getTypeName(E[0]),F;return D===l?E[0]:D===h&&(F=+E[0],!isNaN(F))?F:null},_functionNotNull:function(E){for(var D=0;D<E.length;D++)if(this._getTypeName(E[D])!==g)return E[D];return null},_functionSort:function(E){var D=E[0].slice(0);return D.sort(),D},_functionSortBy:function(E){var D=E[0].slice(0);if(D.length===0)return D;var F=this._interpreter,ee=E[1],xe=this._getTypeName(F.visit(ee,D[0]));if([l,h].indexOf(xe)<0)throw new Error("TypeError");for(var Ne=this,Be=[],ge=0;ge<D.length;ge++)Be.push([ge,D[ge]]);Be.sort(function(wt,ut){var Ye=F.visit(ee,wt[1]),Xe=F.visit(ee,ut[1]);if(Ne._getTypeName(Ye)!==xe)throw new Error("TypeError: expected "+xe+", received "+Ne._getTypeName(Ye));if(Ne._getTypeName(Xe)!==xe)throw new Error("TypeError: expected "+xe+", received "+Ne._getTypeName(Xe));return Ye>Xe?1:Ye<Xe?-1:wt[0]-ut[0]});for(var je=0;je<Be.length;je++)D[je]=Be[je][1];return D},_functionMaxBy:function(E){for(var D=E[1],F=E[0],ee=this.createKeyFunction(D,[l,h]),xe=-1/0,Ne,Be,ge=0;ge<F.length;ge++)Be=ee(F[ge]),Be>xe&&(xe=Be,Ne=F[ge]);return Ne},_functionMinBy:function(E){for(var D=E[1],F=E[0],ee=this.createKeyFunction(D,[l,h]),xe=1/0,Ne,Be,ge=0;ge<F.length;ge++)Be=ee(F[ge]),Be<xe&&(xe=Be,Ne=F[ge]);return Ne},createKeyFunction:function(E,D){var F=this,ee=this._interpreter,xe=function(Ne){var Be=ee.visit(E,Ne);if(D.indexOf(F._getTypeName(Be))<0){var ge="TypeError: expected one of "+D+", received "+F._getTypeName(Be);throw new Error(ge)}return Be};return xe}};function ft(E){var D=new pt,F=D.parse(E);return F}function We(E){var D=new ct;return D.tokenize(E)}function Nt(E,D){var F=new pt,ee=new Ke,xe=new Le(ee);ee._interpreter=xe;var Ne=F.parse(D);return xe.search(Ne,E)}e.tokenize=We,e.compile=ft,e.search=Nt,e.strictDeepEqual=o})(t)})(vj)),vj}var cN=lN();const uN=Ng(cN);var Tp={},gj;function hN(){if(gj)return Tp;gj=1;var t={b:"\b",f:"\f",n:`
2
2
  `,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},e=97;Tp.parse=function(v,g,m){var b={},y=0,w=0,j=0,x=m&&m.bigint&&typeof BigInt<"u";return{data:k("",!0),pointers:b};function k(N,_){$();var P;de(N,"value");var oe=J();switch(oe){case"t":I("rue"),P=!0;break;case"f":I("alse"),P=!1;break;case"n":I("ull"),P=null;break;case'"':P=T();break;case"[":P=z(N);break;case"{":P=V(N);break;default:he(),"-0123456789".indexOf(oe)>=0?P=M():X()}return de(N,"valueEnd"),$(),_&&j<v.length&&X(),P}function $(){e:for(;j<v.length;){switch(v[j]){case" ":w++;break;case" ":w+=4;break;case"\r":w=0;break;case`
3
3
  `:w=0,y++;break;default:break e}j++}}function T(){for(var N="",_;_=J(),_!='"';)_=="\\"?(_=J(),_ in t?N+=t[_]:_=="u"?N+=re():W()):N+=_;return N}function M(){var N="",_=!0;v[j]=="-"&&(N+=J()),N+=v[j]=="0"?J():Se(),v[j]=="."&&(N+=J()+Se(),_=!1),(v[j]=="e"||v[j]=="E")&&(N+=J(),(v[j]=="+"||v[j]=="-")&&(N+=J()),N+=Se(),_=!1);var P=+N;return x&&_&&(P>Number.MAX_SAFE_INTEGER||P<Number.MIN_SAFE_INTEGER)?BigInt(N):P}function z(N){$();var _=[],P=0;if(J()=="]")return _;for(he();;){var oe=N+"/"+P;_.push(k(oe)),$();var Ae=J();if(Ae=="]")break;Ae!=","&&W(),$(),P++}return _}function V(N){$();var _={};if(J()=="}")return _;for(he();;){var P=ie();J()!='"'&&W();var oe=T(),Ae=N+"/"+p(oe);we(Ae,"key",P),de(Ae,"keyEnd"),$(),J()!=":"&&W(),$(),_[oe]=k(Ae),$();var ae=J();if(ae=="}")break;ae!=","&&W(),$()}return _}function I(N){for(var _=0;_<N.length;_++)J()!==N[_]&&W()}function J(){ce();var N=v[j];return j++,w++,N}function he(){j--,w--}function re(){for(var N=4,_=0;N--;){_<<=4;var P=J().toLowerCase();P>="a"&&P<="f"?_+=P.charCodeAt()-e+10:P>="0"&&P<="9"?_+=+P:W()}return String.fromCharCode(_)}function Se(){for(var N="";v[j]>="0"&&v[j]<="9";)N+=J();if(N.length)return N;ce(),X()}function de(N,_){we(N,_,ie())}function we(N,_,P){b[N]=b[N]||{},b[N][_]=P}function ie(){return{line:y,column:w,pos:j}}function X(){throw new SyntaxError("Unexpected token "+v[j]+" in JSON at position "+j)}function W(){he(),X()}function ce(){if(j>=v.length)throw new SyntaxError("Unexpected end of JSON input")}},Tp.stringify=function(v,g,m){if(!r(v))return;var b=0,y,w,j=typeof m=="object"?m.space:m;switch(typeof j){case"number":var x=j>10?10:j<0?0:Math.floor(j);j=x&&we(x," "),y=x,w=x;break;case"string":j=j.slice(0,10),y=0,w=0;for(var k=0;k<j.length;k++){var $=j[k];switch($){case" ":w++;break;case" ":w+=4;break;case"\r":w=0;break;case`
4
4
  `:w=0,b++;break;default:throw new Error("whitespace characters not allowed in JSON")}y++}break;default:j=void 0}var T="",M={},z=0,V=0,I=0,J=m&&m.es6&&typeof Map=="function";return he(v,0,""),{json:T,pointers:M};function he(ie,X,W){switch(de(W,"value"),typeof ie){case"number":case"bigint":case"boolean":re(""+ie);break;case"string":re(h(ie));break;case"object":ie===null?re("null"):typeof ie.toJSON=="function"?re(h(ie.toJSON())):Array.isArray(ie)?ce():J?ie.constructor.BYTES_PER_ELEMENT?ce():ie instanceof Map?_():ie instanceof Set?_(!0):N():N()}de(W,"valueEnd");function ce(){if(ie.length){re("[");for(var P=X+1,oe=0;oe<ie.length;oe++){oe&&re(","),Se(P);var Ae=r(ie[oe])?ie[oe]:null,ae=W+"/"+oe;he(Ae,P,ae)}Se(X),re("]")}else re("[]")}function N(){var P=Object.keys(ie);if(P.length){re("{");for(var oe=X+1,Ae=0;Ae<P.length;Ae++){var ae=P[Ae],Y=ie[ae];if(r(Y)){Ae&&re(",");var ye=W+"/"+p(ae);Se(oe),de(ye,"key"),re(h(ae)),de(ye,"keyEnd"),re(":"),j&&re(" "),he(Y,oe,ye)}}Se(X),re("}")}else re("{}")}function _(P){if(ie.size){re("{");for(var oe=X+1,Ae=!0,ae=ie.entries(),Y=ae.next();!Y.done;){var ye=Y.value,A=ye[0],q=P?!0:ye[1];if(r(q)){Ae||re(","),Ae=!1;var U=W+"/"+p(A);Se(oe),de(U,"key"),re(h(A)),de(U,"keyEnd"),re(":"),j&&re(" "),he(q,oe,U)}Y=ae.next()}Se(X),re("}")}else re("{}")}}function re(ie){V+=ie.length,I+=ie.length,T+=ie}function Se(ie){if(j){for(T+=`
package/dist/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  type="module"
15
15
  async
16
16
  crossorigin
17
- src="/assets/app-BgTLLqSw.js"
17
+ src="/assets/app-B8WIou1H.js"
18
18
  ></script>
19
19
  <style>
20
20
  @font-face {
@@ -382,8 +382,8 @@
382
382
  href="/assets/app-DiS_moJx.css"
383
383
  as="style"
384
384
  />
385
- <link rel="modulepreload" crossorigin href="/assets/Main-CqEm2aZF.js" />
386
- <link rel="preload" href="/assets/Main-e6pql1je.css" as="style" />
385
+ <link rel="modulepreload" crossorigin href="/assets/Main-BVdXlm_a.js" />
386
+ <link rel="preload" href="/assets/Main-CBu902Yc.css" as="style" />
387
387
  <link
388
388
  rel="preload"
389
389
  as="font"
@@ -635,7 +635,7 @@
635
635
 
636
636
  <link rel="stylesheet" crossorigin href="/assets/app-DiS_moJx.css" /><link
637
637
  rel="stylesheet"
638
- href="/assets/Main-e6pql1je.css"
638
+ href="/assets/Main-CBu902Yc.css"
639
639
  />
640
640
  </body>
641
641
  </html>
@@ -1 +1 @@
1
- {"version":"0.6.0","build_id":"6d9288d6aae1c869c018a132b5cc1d6394d11af2"}
1
+ {"version":"0.6.2","build_id":"0b354081c364825881b4a15a48b41745f92de431"}
package/dist/spec.html CHANGED
@@ -14,7 +14,7 @@
14
14
  type="module"
15
15
  async
16
16
  crossorigin
17
- src="/assets/app-BgTLLqSw.js"
17
+ src="/assets/app-B8WIou1H.js"
18
18
  ></script>
19
19
  <style>
20
20
  @font-face {
@@ -330,7 +330,7 @@
330
330
  <link
331
331
  rel="modulepreload"
332
332
  crossorigin
333
- href="/assets/SpecViewer-DEejm153.js"
333
+ href="/assets/SpecViewer-B5Bt4Dng.js"
334
334
  />
335
335
  <link rel="preload" href="/assets/SpecViewer-RnrGXg8h.css" as="style" />
336
336
  <link
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openapi-studio/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "^20.19.0 || >=22.12.0"
@@ -1,2 +0,0 @@
1
- import{d as Ge,r as E,c as d,a as be,u as $e,w as ae,o as Ve,b as Xe,e as s,f as t,g as e,h as u,i as se,j as P,t as f,k as p,F as ne,l as oe,m as le,v as he,n as Ee,p as L,_ as He,q as Te,s as De,x as F,y as xe,E as ge,z as Ke,A as Qe,B as Ye,C as Ze,D as et,G as tt,H as st,S as nt,U as ot,I as Le}from"./app-BgTLLqSw.js";import{c as te,F as Ue}from"./file-text-BMdngXGt.js";const at=te("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]);const qe=te("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const je=te("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Se=te("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const lt=te("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const it=te("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);const Ie=te("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);const de=te("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const rt=te("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const Fe=te("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);const Ne=te("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const ct=te("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Oe=Ge("endpoint",()=>{const N=E(null),i=E(null),h=E(null),g=E(!1),x=E([]),I=E(new Map),k=($,m)=>!$||!m?null:`${m}:${$}`,z=d(()=>k(N.value,i.value)),O=d(()=>{const $=z.value;return $&&I.value.get($)||null}),V=d(()=>!N.value||!i.value?[]:x.value.filter($=>$.path===N.value&&$.method===i.value));function b($,m){N.value=$,i.value=m}function w($){h.value=$}function G($){$===null||h.value===$?h.value=null:h.value=$}function W(){g.value=!g.value}function K(){g.value=!0}function q(){g.value=!1}function A($,m,l){const r=k($,m);r&&I.value.set(r,{...l})}function S($,m){const l=k($,m);return l&&I.value.get(l)||null}function M($,m){const l=k($,m);l&&I.value.delete(l)}function X($){x.value.unshift($)}function _($,m){x.value=x.value.filter(l=>!(l.path===$&&l.method===m))}function J(){x.value=[]}return{selectedPath:N,selectedMethod:i,selectedAuthScheme:h,authMenuOpen:g,requestHistory:x,endpointFormState:I,currentEndpointKey:z,currentFormState:O,filteredRequestHistory:V,setSelectedEndpoint:b,setSelectedAuthScheme:w,toggleSelectedAuthScheme:G,toggleAuthMenu:W,openAuthMenu:K,closeAuthMenu:q,saveEndpointFormState:A,getEndpointFormState:S,clearEndpointFormState:M,addRequestHistory:X,clearEndpointHistory:_,clearAllHistory:J,getEndpointKey:k}}),ut={class:"service-host-dropdown-wrapper"},dt={key:0,class:"service-host-selected"},ht={key:1,class:"service-host-placeholder"},vt={class:"service-host-list"},pt={key:0,class:"service-host-empty-state"},mt=["onClick"],yt={class:"service-host-item-content"},ft={class:"service-host-item-label"},kt={class:"service-host-item-url"},_t=["onClick"],St={class:"service-host-add-section"},gt={key:1,class:"service-host-add-form"},bt={class:"service-host-add-actions"},$t=["disabled"],Ct=be({__name:"ServiceHostPicker",setup(N){const i=$e(),h=E(!1),g=E(!1),x=E(""),I=E(""),k=d(()=>i.serviceHosts),z=d(()=>i.selectedServiceHost),O=d(()=>z.value?.id||null),V=q=>q.label?q.label:q.baseUrl+(q.openApiPath?` (${q.openApiPath})`:""),b=async q=>{k.value.find(S=>S.id===q)&&(await i.selectHost(q),h.value=!1)},w=async()=>{if(!x.value.trim())return;const q={id:crypto.randomUUID(),baseUrl:x.value.trim(),openApiPath:I.value.trim()||void 0};await i.addHost(q),await i.selectHost(q.id),x.value="",I.value="",g.value=!1,h.value=!1},G=()=>{g.value=!1,x.value="",I.value=""},W=async q=>{await i.removeHost(q)},K=q=>{q.target.closest(".service-host-dropdown-wrapper")||(h.value=!1)};return ae(()=>i.serviceHosts,()=>{},{deep:!0}),Ve(async()=>{await i.loadConfigFromLocalStorage(),i.selectedServiceHost&&await i.loadOpenApiSpec(),document.addEventListener("click",K)}),Xe(()=>{document.removeEventListener("click",K)}),(q,A)=>(t(),s("div",ut,[e("div",{class:"service-host-dropdown",onClick:A[0]||(A[0]=se(S=>h.value=!h.value,["stop"]))},[z.value?(t(),s("span",dt,f(V(z.value)),1)):(t(),s("span",ht,"Select service host")),P(p(qe),{size:16,class:"service-host-chevron"})]),h.value?(t(),s("div",{key:0,class:"service-host-dropdown-menu",onClick:A[4]||(A[4]=se(()=>{},["stop"]))},[e("div",vt,[k.value.length===0?(t(),s("div",pt,[...A[5]||(A[5]=[e("p",{class:"service-host-empty-text"},"No service hosts yet",-1),e("p",{class:"service-host-empty-hint"},"Add one below to get started",-1)])])):u("",!0),(t(!0),s(ne,null,oe(k.value,S=>(t(),s("div",{key:S.id,class:L(["service-host-item",{selected:O.value===S.id}]),onClick:M=>b(S.id)},[e("div",yt,[e("div",ft,f(V(S)),1),e("div",kt,f(S.baseUrl),1)]),e("button",{class:"service-host-item-remove",onClick:se(M=>W(S.id),["stop"]),title:"Remove"},[P(p(Ne),{size:14})],8,_t)],10,mt))),128))]),e("div",St,[g.value?(t(),s("div",gt,[le(e("input",{"onUpdate:modelValue":A[2]||(A[2]=S=>x.value=S),type:"text",placeholder:"Base URL (e.g., https://api.example.com)",class:"service-host-add-input",onKeyup:Ee(w,["enter"])},null,544),[[he,x.value]]),le(e("input",{"onUpdate:modelValue":A[3]||(A[3]=S=>I.value=S),type:"text",placeholder:"OpenAPI Path (optional, e.g., /openapi.json)",class:"service-host-add-input",onKeyup:Ee(w,["enter"])},null,544),[[he,I.value]]),e("div",bt,[e("button",{onClick:w,class:"service-host-add-submit",disabled:!x.value.trim()}," Add ",8,$t),e("button",{onClick:G,class:"service-host-add-cancel"}," Cancel ")])])):(t(),s("button",{key:0,class:"service-host-add-btn",onClick:A[1]||(A[1]=S=>g.value=!0)}," + Add Service Host "))])])):u("",!0)]))}}),Je=He(Ct,[["__scopeId","data-v-2eb02fe1"]]),wt={class:"endpoint-tester"},At={class:"endpoint-header"},xt={class:"endpoint-title"},Et={class:"endpoint-path"},qt={key:0,class:"endpoint-info"},Ht={key:0,class:"endpoint-summary-text"},Bt={key:1,class:"endpoint-description"},Pt={key:0,class:"security-schemes-wrapper"},Rt={class:"security-schemes-section"},Mt=["onClick"],zt={class:"scheme-name"},Tt={class:"request-section"},It={key:0,class:"params-section"},Ot={class:"params-list"},Kt={class:"param-name"},Lt={key:0,class:"required"},Ut={key:1,class:"param-desc"},jt=["onUpdate:modelValue","placeholder"],Vt={key:1,class:"params-section"},Dt={class:"params-list"},Ft={class:"param-name"},Nt={key:0,class:"required"},Jt={key:1,class:"param-desc"},Wt=["onUpdate:modelValue","placeholder"],Gt={key:2,class:"body-section"},Xt={class:"body-section-header"},Qt={class:"view-toggle"},Yt={key:0,class:"schema-display"},Zt={class:"schema-text"},es={key:1,class:"json-editor-wrapper"},ts=["disabled"],ss={class:"response-section"},ns={class:"section-header"},os={key:0,class:"no-response"},as={key:1,class:"no-response"},ls={key:2,class:"request-history-list"},is={class:"history-item-header"},rs={class:"history-item-title"},cs={class:"history-url"},us={class:"history-meta-group"},ds={key:0,class:"history-auth-scheme"},hs={key:1,class:"history-auth-scheme"},vs={class:"history-timestamp"},ps={class:"history-curl-section"},ms=["onClick"],ys={class:"curl-header-left"},fs=["onClick"],ks={key:0,class:"curl-command"},_s={key:0,class:"history-request-body"},Ss={class:"json-editor-wrapper"},gs={key:1,class:"history-error"},bs={class:"error-message"},$s={key:2,class:"history-response"},Cs={class:"json-editor-wrapper"},ws={class:"app-footer"},_e="__clerk_bearer__",As=be({__name:"EndpointTester",props:{path:{},method:{}},setup(N){const i=N,h=Te(),g=Oe(),x=$e(),I=!!(x.clerkPublishableKey&&x.clerkPublishableKey.trim());let k=null;if(I)try{k=De()}catch(y){console.warn("Failed to initialize Clerk auth:",y),k=null}const z=d(()=>{if(!k)return!1;try{return k.isSignedIn.value??!1}catch{return!1}}),O=k?.getToken?.value??(()=>Promise.resolve(null)),V=d(()=>{if(!k)return!1;try{return k.isLoaded.value??!1}catch{return!1}}),b=E({}),w=E(""),G=E(null),W=E(null),K=E(!1),q=E({}),A=E(new Set),S=E(!1),M=d(()=>g.selectedAuthScheme),X=d(()=>g.filteredRequestHistory),_=d(()=>!i.path||!i.method?null:h.getSelectedEndpoint(i.path,i.method)),J=d(()=>h.endpoints),$=d(()=>!_.value||!_.value.parameters?[]:_.value.parameters.map(h.resolveParameter).filter(y=>y!==null&&y.in==="path")),m=d(()=>!_.value||!_.value.parameters?[]:_.value.parameters.map(h.resolveParameter).filter(y=>y!==null&&y.in==="query")),l=d({get:()=>{if(!w.value.trim())return"{}";try{return w.value}catch{return"{}"}},set:y=>{w.value=y}}),r=d(()=>_.value?h.getRequestBodySchema(_.value):null),H=d(()=>!r.value||!h.openApiSpec?null:h.formatSchemaForDisplay(r.value,h.openApiSpec)),ie=()=>{S.value=!S.value},Ce=d(()=>h.securitySchemes),we=d(()=>_.value?h.getAvailableSecuritySchemes(_.value):[]),Be=d(()=>(_.value?we.value:Ce.value).some(v=>v.scheme.type==="http"&&v.scheme.scheme==="bearer")),re=d(()=>{const y=_.value?[...we.value]:[...Ce.value];return Be.value&&I&&(y.some(n=>n.name===_e)||y.push({name:_e,scheme:{type:"http",scheme:"bearer",description:"Clerk Bearer Authentication"}})),y}),Z=y=>h.endpointRequiresSecurity(y),ve=y=>{g.toggleSelectedAuthScheme(y)},ye=y=>({GET:"#61affe",POST:"#49cc90",PUT:"#fca130",PATCH:"#50e3c2",DELETE:"#f93e3e"})[y]||"#999",Pe=async()=>{if(!i.path||!i.method)return;K.value=!0,G.value=null,W.value=null;const y={id:Date.now().toString()+Math.random().toString(36).substr(2,9),timestamp:new Date,method:i.method,path:i.path||"",url:"",requestBody:w.value.trim()?(()=>{try{return JSON.parse(w.value)}catch{return w.value}})():null,requestParams:{...b.value},headers:{},response:null,responseError:null,authScheme:M.value||null};try{let n=`${x.serviceHost||""}${i.path}`;const U={},Q=new URLSearchParams;for(const[T,B]of Object.entries(b.value))if(B!==""&&B!=null){const Y=J.value.find(o=>o.path===i.path&&o.method===i.method);let c=!1;if(Y?.operation.parameters)for(const o of Y.operation.parameters){const a=h.resolveParameter(o);if(a&&a.name===T){c=a.in==="path";break}}c?U[T]=String(B):Q.append(T,String(B))}for(const[T,B]of Object.entries(U))n=n.replace(`{${T}}`,encodeURIComponent(B));const D={"Content-Type":"application/json"};if(M.value===_e){if(z.value){V.value||await new Promise(B=>{const Y=setInterval(()=>{V.value&&(clearInterval(Y),B(void 0))},100)});const T=await O();T&&(D.Authorization=`Bearer ${T}`)}}else if(M.value&&h.openApiSpec?.components?.securitySchemes){const T=h.openApiSpec.components.securitySchemes[M.value];if(T&&typeof T=="object"&&!("$ref"in T)){const B=q.value[M.value];if(T.type==="apiKey"){const Y=T;B?.value&&(Y.in==="header"?D[Y.name]=B.value:Y.in==="query"&&Q.append(Y.name,B.value))}else if(T.type==="http"){const Y=T;if(Y.scheme==="basic"){if(B?.username&&B?.password){const c=`${B.username}:${B.password}`;D.Authorization=`Basic ${btoa(c)}`}}else Y.scheme==="bearer"&&B?.token&&(D.Authorization=`Bearer ${B.token}`)}else T.type==="oauth2"?B?.accessToken&&(D.Authorization=`Bearer ${B.accessToken}`):T.type==="openIdConnect"&&B?.idToken&&(D.Authorization=`Bearer ${B.idToken}`)}}Q.toString()&&(n+=`?${Q.toString()}`),y.url=n,y.headers={...D};const j={method:i.method,headers:D};if(["POST","PUT","PATCH"].includes(i.method)&&w.value.trim())try{j.body=JSON.stringify(JSON.parse(w.value))}catch{const B="Invalid JSON in request body";W.value=B,y.responseError=B,g.addRequestHistory(y),K.value=!1;return}const R=await fetch(n,j),ke=R.headers.get("content-type");let ce;if(ke?.includes("application/json"))ce={status:R.status,statusText:R.statusText,headers:Object.fromEntries(R.headers.entries()),body:await R.json()};else{const T=await R.text();ce={status:R.status,statusText:R.statusText,headers:Object.fromEntries(R.headers.entries()),body:T}}G.value=ce,y.response=ce,y.status=R.status,y.statusText=R.statusText}catch(v){const n=v instanceof Error?v.message:"Request failed";W.value=n,y.responseError=n}finally{K.value=!1,g.addRequestHistory(y)}},fe=y=>{const v=["curl"];y.method!=="GET"&&v.push(`-X ${y.method}`);for(const[n,U]of Object.entries(y.headers||{})){const Q=U.replace(/"/g,'\\"');v.push(`-H "${n}: ${Q}"`)}if(["POST","PUT","PATCH"].includes(y.method)&&y.requestBody){const U=(typeof y.requestBody=="string"?y.requestBody:JSON.stringify(y.requestBody,null,2)).replace(/'/g,"'\\''").replace(/\n/g,"\\n");v.push(`-d '${U}'`)}return v.push(`"${y.url}"`),v.join(` \\
2
- `)},Re=async y=>{const v=fe(y);try{await navigator.clipboard.writeText(v)}catch(n){console.error("Failed to copy to clipboard:",n)}},Me=()=>{!i.path||!i.method||g.clearEndpointHistory(i.path,i.method)},pe=()=>{!i.path||!i.method||g.saveEndpointFormState(i.path,i.method,{requestParams:{...b.value},requestBody:w.value,selectedAuthScheme:M.value})};return ae([()=>i.path,()=>i.method],([y,v],[n,U])=>{if(y!==n||v!==U){n&&U&&pe(),G.value=null,W.value=null,A.value.clear();const Q=g.getEndpointFormState(y||"",v||""),D=!!Q;if(D&&Q?(b.value={...Q.requestParams},w.value=Q.requestBody,g.setSelectedAuthScheme(Q.selectedAuthScheme)):(b.value={},w.value="",g.setSelectedAuthScheme(null)),_.value?.parameters)for(const j of _.value.parameters){const R=h.resolveParameter(j);R&&(R.in==="query"||R.in==="path")&&(!D||!(R.name in b.value))&&(b.value[R.name]="")}else D||(b.value={});if(!D&&_.value?.requestBody){let j=_.value.requestBody;if(j&&typeof j=="object"&&"$ref"in j&&j.$ref&&h.openApiSpec){const R=h.resolveReference(j.$ref,h.openApiSpec);R&&typeof R=="object"&&(j=R)}if(j&&typeof j=="object"&&"content"in j&&j.content){const R=j.content["application/json"];if(R?.schema&&h.openApiSpec){const ke=h.generateExampleFromSchema(R.schema,h.openApiSpec);w.value=JSON.stringify(ke||{},null,2)}else w.value=JSON.stringify({},null,2)}}else D||(w.value="")}},{immediate:!0}),ae([b,w,M],()=>{i.path&&i.method&&pe()},{deep:!0}),(y,v)=>(t(),s("main",wt,[e("div",At,[e("div",xt,[e("span",{class:"method-badge large",style:xe({backgroundColor:ye(N.method||"")})},f(N.method),5),e("span",Et,f(N.path),1),_.value&&Z(_.value)?(t(),F(p(de),{key:0,size:18,class:"security-indicator-large",title:"Requires authentication"})):u("",!0)]),_.value&&(_.value.summary||_.value.description)?(t(),s("div",qt,[_.value.summary?(t(),s("p",Ht,f(_.value.summary),1)):u("",!0),_.value.description?(t(),s("p",Bt,f(_.value.description),1)):u("",!0)])):u("",!0)]),re.value.length>0?(t(),s("div",Pt,[v[1]||(v[1]=e("h4",{class:"security-schemes-title"},"Security Schemes",-1)),e("div",Rt,[(t(!0),s(ne,null,oe(re.value,n=>(t(),s("div",{key:n.name,class:L(["security-scheme-card",{selected:M.value===n.name}]),onClick:U=>ve(n.name)},[P(p(de),{size:12,class:"security-card-icon"}),e("span",zt,f(n.name===_e?"Clerk Bearer":n.name),1)],10,Mt))),128))])])):u("",!0),e("div",Tt,[v[5]||(v[5]=e("h3",null,"Request",-1)),$.value.length>0?(t(),s("div",It,[v[2]||(v[2]=e("h4",null,"Path Parameters",-1)),e("dl",Ot,[(t(!0),s(ne,null,oe($.value,n=>(t(),s("div",{key:n.name,class:"param-item"},[e("dt",null,[e("span",Kt,f(n.name),1),n.required?(t(),s("span",Lt,"*")):u("",!0),n.description?(t(),s("span",Ut," - "+f(n.description),1)):u("",!0)]),e("dd",null,[le(e("input",{"onUpdate:modelValue":U=>b.value[n.name]=U,type:"text",placeholder:n.schema&&"default"in n.schema?String(n.schema.default):""},null,8,jt),[[he,b.value[n.name]]])])]))),128))])])):u("",!0),m.value.length>0?(t(),s("div",Vt,[v[3]||(v[3]=e("h4",null,"Query Parameters",-1)),e("dl",Dt,[(t(!0),s(ne,null,oe(m.value,n=>(t(),s("div",{key:n.name,class:"param-item"},[e("dt",null,[e("span",Ft,f(n.name),1),n.required?(t(),s("span",Nt,"*")):u("",!0),n.description?(t(),s("span",Jt," - "+f(n.description),1)):u("",!0)]),e("dd",null,[le(e("input",{"onUpdate:modelValue":U=>b.value[n.name]=U,type:"text",placeholder:n.schema&&"default"in n.schema?String(n.schema.default):""},null,8,Wt),[[he,b.value[n.name]]])])]))),128))])])):u("",!0),_.value&&_.value.requestBody?(t(),s("div",Gt,[e("div",Xt,[v[4]||(v[4]=e("h4",null,"Request Body",-1)),e("div",Qt,[e("button",{onClick:ie,class:L([{active:!S.value},"toggle-btn small"])}," Edit ",2),e("button",{onClick:ie,class:L([{active:S.value},"toggle-btn small"])}," Schema ",2)])]),S.value&&H.value?(t(),s("div",Yt,[e("pre",Zt,f(H.value),1)])):S.value?u("",!0):(t(),s("div",es,[P(p(ge),{text:l.value,"onUpdate:text":v[0]||(v[0]=n=>l.value=n),mode:"text",mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["text"])]))])):u("",!0),e("button",{onClick:Pe,class:"send-button",disabled:K.value},[P(p(Fe),{size:16,class:"send-button-icon"}),e("span",null,f(K.value?"Sending...":"Send Request"),1)],8,ts)]),e("div",ss,[e("div",ns,[v[6]||(v[6]=e("h3",null,"Request History",-1)),X.value.length>0?(t(),s("button",{key:0,onClick:Me,class:"clear-history-btn"}," Clear History ")):u("",!0)]),!N.path||!N.method?(t(),s("div",os," Select an endpoint to view request history. ")):X.value.length===0?(t(),s("div",as,' No requests sent yet. Click "Send Request" to test the endpoint. ')):(t(),s("div",ls,[(t(!0),s(ne,null,oe(X.value,n=>(t(),s("div",{key:n.id,class:"history-item"},[e("div",is,[e("div",rs,[e("span",{class:L(["status-code",{success:n.status&&n.status>=200&&n.status<300,error:n.status&&n.status>=400,redirect:n.status&&n.status>=300&&n.status<400}])},f(n.status||"N/A"),3),e("span",cs,f(n.url),1)]),e("div",us,[n.authScheme?(t(),s("span",ds,[P(p(de),{size:12}),Ke(" "+f(n.authScheme===_e?"Clerk Bearer":n.authScheme),1)])):(t(),s("span",hs,[P(p(Ie),{size:12}),v[7]||(v[7]=Ke(" Anonymous ",-1))])),e("span",vs,f(new Date(n.timestamp).toLocaleTimeString()),1)])]),e("div",ps,[e("div",{class:"curl-header",onClick:U=>A.value.has(n.id)?A.value.delete(n.id):A.value.add(n.id)},[e("div",ys,[A.value.has(n.id)?(t(),F(p(qe),{key:0,size:16,class:"curl-toggle-icon"})):(t(),F(p(Se),{key:1,size:16,class:"curl-toggle-icon"})),v[8]||(v[8]=e("h5",null,"cURL Command",-1))]),e("button",{onClick:se(U=>Re(n),["stop"]),class:"copy-curl-btn",title:"Copy cURL command"},[P(p(lt),{size:16}),v[9]||(v[9]=e("span",null,"Copy",-1))],8,fs)],8,ms),A.value.has(n.id)?(t(),s("div",ks,[e("pre",null,f(fe(n)),1)])):u("",!0)]),n.requestBody?(t(),s("div",_s,[v[10]||(v[10]=e("h5",null,"Request Body",-1)),e("div",Ss,[P(p(ge),{"model-value":n.requestBody,mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])])])):u("",!0),n.responseError?(t(),s("div",gs,[v[11]||(v[11]=e("h5",null,"Error",-1)),e("div",bs,f(n.responseError),1)])):n.response?(t(),s("div",$s,[v[12]||(v[12]=e("h5",null,"Response",-1)),e("div",Cs,[P(p(ge),{"model-value":(()=>{if(typeof n.response.body=="string")try{return JSON.parse(n.response.body)}catch{return{text:n.response.body}}return n.response.body||{}})(),mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])])])):u("",!0)]))),128))]))]),e("footer",ws,[e("p",null,"© "+f(new Date().getFullYear())+" Gamja Labs",1)])]))}}),xs=He(As,[["__scopeId","data-v-cab1bf2e"]]),Es={key:0,class:"auth-side-menu"},qs={class:"auth-menu-header"},Hs={class:"auth-menu-content"},Bs={class:"auth-scheme-header"},Ps={style:{display:"flex","align-items":"center",gap:"0.5rem"}},Rs={class:"auth-scheme-header"},Ms={style:{display:"flex","align-items":"center",gap:"0.5rem"}},zs=["onClick"],Ts={class:"auth-scheme-header"},Is={style:{display:"flex","align-items":"center",gap:"0.5rem"}},Os={class:"auth-scheme-type"},Ks={key:0,class:"auth-scheme-description"},Ls={class:"field-location"},Us=["value","onInput","placeholder"],js=["onClick"],Vs=["value","onInput"],Ds=["value","onInput"],Fs=["onClick"],Ns=["value","onInput"],Js=["onClick"],Ws=["value","onInput"],Gs=["onClick"],Xs=["value","onInput"],Qs=["onClick"],Ys={key:1,class:"clerk-key-card"},Zs={class:"clerk-key-description"},en={key:0},tn={key:1},sn={class:"clerk-key-fields"},nn=["disabled"],ze="__clerk_bearer__",on=be({__name:"SecuritySchemeMenu",setup(N,{expose:i}){const h=Te(),g=Oe(),x=$e(),I=Qe(),k=d(()=>!!(x.clerkPublishableKey&&x.clerkPublishableKey.trim())),z=d(()=>h.securitySchemes),O=d(()=>g.selectedAuthScheme),V=d(()=>g.authMenuOpen),b=E({});d(()=>{if(!O.value)return"Anonymous";if(O.value===ze)return"Clerk Bearer";const m=z.value.find(l=>l.name===O.value);return m?m.name:"Anonymous"});const w=d(()=>x.selectedServiceHost),G=E("");ae(w,m=>{G.value=m?.clerkPublishableKey||""},{immediate:!0});const W=d(()=>!!w.value?.clerkPublishableKey?.trim()),K=d(()=>{const m=q.value;return m==="config.json"||m==="env"}),q=d(()=>{const m=x.clerkPublishableKey,l=void 0,r=x.config;return w.value?.clerkPublishableKey?"serviceHost":m&&r.clerkPublishableKey===m&&m!==l?"config.json":m&&m===l?"env":null}),A=d(()=>{const m=q.value;return m==="config.json"?`Key loaded from ${I.getConfigJsonPath()}`:m==="env"?"Key loaded from environment variable":m==="serviceHost"?"Key stored with service host":null}),S=(m,l,r)=>{b.value[m]||(b.value[m]={}),b.value[m][l]=r},M=m=>{delete b.value[m]},X=m=>{g.toggleSelectedAuthScheme(m)},_=()=>{w.value&&(x.saveClerkPublishableKeyForSelectedHost(G.value),typeof window<"u"&&window.location.reload())},J=()=>{w.value&&(x.clearClerkPublishableKeyForSelectedHost(),typeof window<"u"&&window.location.reload())},$=()=>{g.closeAuthMenu()};return i({authCredentials:b}),(m,l)=>V.value?(t(),s("aside",Es,[e("div",qs,[l[8]||(l[8]=e("h2",null,"Security Scheme",-1)),e("button",{onClick:$,class:"close-auth-menu",title:"Close"},[P(p(Ne),{size:20})])]),e("div",Hs,[e("div",{class:L(["auth-scheme anonymous-option",{selected:O.value===null}]),onClick:l[0]||(l[0]=r=>X(null))},[e("div",Bs,[e("div",Ps,[P(p(Ie),{size:18}),l[9]||(l[9]=e("h3",null,"Anonymous",-1))]),l[10]||(l[10]=e("span",{class:"auth-scheme-type"},"NONE",-1))]),l[11]||(l[11]=e("div",{class:"auth-scheme-description"}," Make requests without authentication ",-1))],2),k.value?(t(),s("div",{key:0,class:L(["auth-scheme clerk-bearer-option",{selected:O.value===ze}]),onClick:l[1]||(l[1]=r=>X(ze))},[e("div",Rs,[e("div",Ms,[P(p(de),{size:18}),l[12]||(l[12]=e("h3",null,"Clerk Bearer",-1))]),l[13]||(l[13]=e("span",{class:"auth-scheme-type"},"CLERK",-1))]),l[14]||(l[14]=e("div",{class:"auth-scheme-description"}," Use Clerk authentication token for bearer authentication ",-1))],2)):u("",!0),(t(!0),s(ne,null,oe(z.value,r=>(t(),s("div",{key:r.name,class:L(["auth-scheme",{selected:O.value===r.name}]),onClick:H=>X(r.name)},[e("div",Ts,[e("div",Is,[P(p(de),{size:18}),e("h3",null,f(r.name),1)]),e("span",Os,f(r.scheme.type),1)]),r.scheme.description?(t(),s("div",Ks,f(r.scheme.description),1)):u("",!0),r.scheme.type==="apiKey"?(t(),s("div",{key:1,class:"auth-scheme-fields",onClick:l[2]||(l[2]=se(()=>{},["stop"]))},[e("label",null,[e("span",null,f(r.scheme.name),1),e("span",Ls,"("+f(r.scheme.in)+")",1),e("input",{type:"text",value:b.value[r.name]?.value||"",onInput:H=>S(r.name,"value",H.target.value),placeholder:`Enter ${r.scheme.name}`,class:"auth-input"},null,40,Us)]),b.value[r.name]?.value?(t(),s("button",{key:0,onClick:H=>M(r.name),class:"clear-credential-btn"}," Clear ",8,js)):u("",!0)])):r.scheme.type==="http"&&r.scheme.scheme==="basic"?(t(),s("div",{key:2,class:"auth-scheme-fields",onClick:l[3]||(l[3]=se(()=>{},["stop"]))},[e("label",null,[l[15]||(l[15]=e("span",null,"Username",-1)),e("input",{type:"text",value:b.value[r.name]?.username||"",onInput:H=>S(r.name,"username",H.target.value),placeholder:"Enter username",class:"auth-input"},null,40,Vs)]),e("label",null,[l[16]||(l[16]=e("span",null,"Password",-1)),e("input",{type:"text",value:b.value[r.name]?.password||"",onInput:H=>S(r.name,"password",H.target.value),placeholder:"Enter password",class:"auth-input"},null,40,Ds)]),b.value[r.name]?.username||b.value[r.name]?.password?(t(),s("button",{key:0,onClick:H=>M(r.name),class:"clear-credential-btn"}," Clear ",8,Fs)):u("",!0)])):r.scheme.type==="http"&&r.scheme.scheme==="bearer"?(t(),s("div",{key:3,class:"auth-scheme-fields",onClick:l[4]||(l[4]=se(()=>{},["stop"]))},[e("label",null,[l[17]||(l[17]=e("span",null,"Bearer Token",-1)),e("input",{type:"text",value:b.value[r.name]?.token||"",onInput:H=>S(r.name,"token",H.target.value),placeholder:"Enter bearer token",class:"auth-input"},null,40,Ns)]),b.value[r.name]?.token?(t(),s("button",{key:0,onClick:H=>M(r.name),class:"clear-credential-btn"}," Clear ",8,Js)):u("",!0)])):r.scheme.type==="oauth2"?(t(),s("div",{key:4,class:"auth-scheme-fields",onClick:l[5]||(l[5]=se(()=>{},["stop"]))},[e("label",null,[l[18]||(l[18]=e("span",null,"Access Token",-1)),e("input",{type:"text",value:b.value[r.name]?.accessToken||"",onInput:H=>S(r.name,"accessToken",H.target.value),placeholder:"Enter OAuth2 access token",class:"auth-input"},null,40,Ws)]),b.value[r.name]?.accessToken?(t(),s("button",{key:0,onClick:H=>M(r.name),class:"clear-credential-btn"}," Clear ",8,Gs)):u("",!0)])):r.scheme.type==="openIdConnect"?(t(),s("div",{key:5,class:"auth-scheme-fields",onClick:l[6]||(l[6]=se(()=>{},["stop"]))},[e("label",null,[l[19]||(l[19]=e("span",null,"ID Token",-1)),e("input",{type:"text",value:b.value[r.name]?.idToken||"",onInput:H=>S(r.name,"idToken",H.target.value),placeholder:"Enter OpenID Connect ID token",class:"auth-input"},null,40,Xs)]),b.value[r.name]?.idToken?(t(),s("button",{key:0,onClick:H=>M(r.name),class:"clear-credential-btn"}," Clear ",8,Qs)):u("",!0)])):u("",!0)],10,zs))),128)),w.value?(t(),s("div",Ys,[l[21]||(l[21]=e("div",{class:"clerk-key-header"},[e("h3",null,"Clerk Publishable Key")],-1)),e("div",Zs,[A.value?(t(),s("span",en,f(A.value),1)):(t(),s("span",tn," Enter your Clerk publishable key to enable authentication. This will be stored with the selected service host. "))]),e("div",sn,[e("label",null,[l[20]||(l[20]=e("span",null,"Publishable Key",-1)),le(e("input",{"onUpdate:modelValue":l[7]||(l[7]=r=>G.value=r),type:"text",placeholder:"pk_test_...",class:"clerk-key-input",disabled:W.value||K.value},null,8,nn),[[he,G.value]])]),!W.value&&!K.value?(t(),s("button",{key:0,onClick:_,class:"save-button"}," Save and reload ")):W.value&&!K.value?(t(),s("button",{key:1,onClick:J,class:"save-button"}," Clear and reload ")):u("",!0)])])):u("",!0)])])):u("",!0)}}),an=He(on,[["__scopeId","data-v-b8c2be74"]]),ln={key:0,class:"service-host-input-section"},rn={key:0,class:"welcome-description"},cn={key:1,class:"welcome-description"},un={key:3,class:"service-host-direct-form"},dn={class:"service-host-input-wrapper"},hn=["disabled"],vn=be({__name:"WelcomeServiceHostInput",setup(N){const i=$e(),h=E(""),g=E(""),x=d(()=>i.serviceHosts),I=d(()=>i.hasServiceHost),k=async()=>{if(!h.value.trim())return;const z={id:crypto.randomUUID(),baseUrl:h.value.trim(),openApiPath:g.value.trim()||void 0};await i.addHost(z),await i.selectHost(z.id),h.value="",g.value=""};return(z,O)=>p(i).isServiceHostPickerEnabled&&!I.value?(t(),s("div",ln,[x.value.length>0?(t(),s("p",rn," Please select or add a service host to get started. ")):(t(),s("p",cn," Please enter your service host URL to get started. ")),x.value.length>0?(t(),F(Je,{key:2})):(t(),s("div",un,[e("div",dn,[le(e("input",{"onUpdate:modelValue":O[0]||(O[0]=V=>h.value=V),type:"text",placeholder:"Base URL (e.g., https://api.example.com)",class:"service-host-input",onKeyup:Ee(k,["enter"])},null,544),[[he,h.value]]),le(e("input",{"onUpdate:modelValue":O[1]||(O[1]=V=>g.value=V),type:"text",placeholder:"OpenAPI Path (optional, e.g., /openapi.json)",class:"service-host-input",onKeyup:Ee(k,["enter"])},null,544),[[he,g.value]]),e("button",{onClick:k,class:"service-host-submit-btn",disabled:!h.value.trim()}," Connect ",8,hn)])]))])):u("",!0)}}),pn=He(vn,[["__scopeId","data-v-d0cf2fc7"]]),mn={class:"openapi-test"},yn={class:"test-header"},fn={class:"header-content"},kn={class:"header-title-section"},_n={class:"title-section-content"},Sn={class:"title-row"},gn={class:"logo"},bn={key:0,class:"api-version"},$n={key:0,class:"api-description"},Cn={key:0,class:"header-title-section"},wn=["disabled"],An={class:"header-actions"},xn={href:"https://github.com/gamja-labs/openapi-studio",target:"_blank",rel:"noopener noreferrer",class:"github-link",title:"View on GitHub"},En={key:1,class:"auth-section"},qn={key:1,class:"user-section"},Hn={class:"test-container"},Bn={class:"sidebar-header"},Pn=["title"],Rn={class:"sidebar-content"},Mn={key:0,class:"loading"},zn={key:1,class:"error"},Tn={key:2,class:"endpoints-groups"},In=["onClick"],On={class:"group-name"},Kn={class:"group-count"},Ln={class:"group-toggle"},Un={key:0,class:"group-endpoints"},jn=["onClick"],Vn={class:"endpoint-path"},Dn={key:0,class:"endpoint-summary"},Fn={key:2,class:"endpoint-content"},Nn={class:"examples-header"},Jn=["title"],Wn={class:"examples-content"},Gn={key:0,class:"example-section"},Xn={class:"example-section-header"},Qn={class:"view-toggle"},Yn={class:"example-content"},Zn={key:0,class:"schema-display"},eo={class:"schema-text"},to={key:1,class:"json-editor-wrapper"},so={key:1,class:"example-section"},no={class:"response-codes-list"},oo={class:"response-code-header"},ao={class:"response-code-number"},lo={class:"response-code-right"},io={key:0,class:"response-code-description"},ro={class:"view-toggle"},co=["onClick"],uo=["onClick"],ho={key:0,class:"example-content"},vo={key:0,class:"schema-display"},po={class:"schema-text"},mo={key:1,class:"json-editor-wrapper"},yo={key:1,class:"no-example"},fo={key:2,class:"no-examples"},ko={key:3,class:"example-section"},_o={class:"schema-references-list"},So=["onClick"],go={class:"schema-reference-toggle"},bo={class:"schema-reference-name"},$o={key:0,class:"example-content"},Co={class:"schema-display"},wo={class:"schema-text"},Ao={key:3,class:"endpoint-tester empty"},xo={class:"empty-state"},Eo={class:"welcome-content"},qo={class:"welcome-icon"},Ho={key:0,class:"welcome-description"},Bo={key:1,class:"welcome-tips"},Po={class:"tip-item"},Ro={class:"tip-item"},Mo={class:"tip-item"},zo={class:"app-footer"},To="__clerk_bearer__",Ko=be({__name:"Main",setup(N){const i=et(),h=$e(),g=d(()=>h.hasServiceHost),x=Ye(),I=Ze(),k=Te(),z=Oe();let O=!!(h.clerkPublishableKey&&h.clerkPublishableKey.trim()),V=null;if(O)try{V=De()}catch(c){console.warn("Failed to initialize Clerk auth:",c),O=!1,V=null}const b=d(()=>{if(!V)return!1;try{return V.isSignedIn.value??!1}catch{return!1}}),w=d(()=>k.openApiSpec),G=d(()=>k.loading),W=d(()=>k.error),K=d(()=>z.selectedPath),q=d(()=>z.selectedMethod),A=d(()=>z.selectedAuthScheme),S=E(new Set),M=E(new Set),X=E(new Map),_=E(!1),J=E(!1),$=E(500),m=E(400),l=E(!1),r=E(!1),H=d(()=>k.getSelectedEndpoint(K.value,q.value)),ie=d(()=>k.endpoints),Ce=d(()=>{if(ie.value.length===0)return[];const c=new Map;for(const o of ie.value){const a=o.operation.tags||[];if(a.length>0){const C=a[0];C&&(c.has(C)||c.set(C,{name:C,endpoints:[]}),c.get(C).endpoints.push(o))}else{const C=o.path.split("/").filter(ue=>ue),ee=C.length>0?`/${C[0]}`:"Other";c.has(ee)||c.set(ee,{name:ee,endpoints:[]}),c.get(ee).endpoints.push(o)}}return S.value.size===0&&c.forEach((o,a)=>S.value.add(a)),Array.from(c.values()).sort((o,a)=>o.name.localeCompare(a.name))}),we=c=>{S.value.has(c)?S.value.delete(c):S.value.add(c)},Be=c=>{M.value.has(c)?M.value.delete(c):M.value.add(c)},re=c=>{const o=X.value.get(c)||!1;X.value.set(c,!o)},Z=c=>X.value.get(c)||!1,ve=new Map;async function ye(c,o){const a=`${o}:${c}`;if(ve.has(a))return ve.get(a);const ee=new TextEncoder().encode(a),ue=await crypto.subtle.digest("SHA-256",ee),me=Array.from(new Uint8Array(ue)).map(We=>We.toString(16).padStart(2,"0")).join("").slice(0,16);return ve.set(a,me),me}function Pe(c,o){const a=`${o}:${c}`;return ve.get(a)||""}async function fe(){const c=I.query.endpoint;if(!c)return null;for(const o of ie.value)if(await ye(o.path,o.method)===c)return{path:o.path,method:o.method};return null}Ve(async()=>{_.value=i.loadSidebarCollapsed(),J.value=i.loadExamplesSidebarCollapsed(),$.value=i.loadEndpointsSidebarWidth(),m.value=i.loadExamplesSidebarWidth(),await h.loadOpenApiSpec();for(const o of ie.value)await ye(o.path,o.method);const c=await fe();c&&(await tt(),await pe(c.path,c.method,!1)),ae(()=>I.query.endpoint,async o=>{if(o){const a=await fe();a&&(K.value!==a.path||q.value!==a.method)&&await pe(a.path,a.method,!1)}else(K.value||q.value)&&z.setSelectedEndpoint(null,null)}),ae(_,o=>{i.saveSidebarCollapsed(o)}),ae(J,o=>{i.saveExamplesSidebarCollapsed(o)}),ae($,o=>{i.saveEndpointsSidebarWidth(o)}),ae(m,o=>{i.saveExamplesSidebarWidth(o)})});const Re=c=>{l.value=!0;const o=c.clientX,a=$.value,C=ue=>{const Ae=ue.clientX-o,me=Math.max(200,Math.min(800,a+Ae));$.value=me},ee=()=>{l.value=!1,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",ee)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",ee)},Me=c=>{r.value=!0;const o=c.clientX,a=m.value,C=ue=>{const Ae=o-ue.clientX,me=Math.max(200,Math.min(800,a+Ae));m.value=me},ee=()=>{r.value=!1,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",ee)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",ee)},pe=async(c,o,a=!0)=>{if(z.setSelectedEndpoint(c,o),M.value.clear(),X.value.clear(),a){const C=Pe(c,o)||await ye(c,o);I.query.endpoint!==C&&await x.replace({query:{...I.query,endpoint:C}})}},y=c=>({GET:"#61affe",POST:"#49cc90",PUT:"#fca130",PATCH:"#50e3c2",DELETE:"#f93e3e"})[c]||"#999",v=d(()=>H.value?k.getExampleFromRequestBody(H.value):null),n=d(()=>H.value?k.getRequestBodySchema(H.value):null),U=d(()=>!n.value||!w.value?null:k.formatSchemaForDisplay(n.value,w.value)),Q=c=>!c||!w.value?null:k.formatSchemaForDisplay(c,w.value),D=d(()=>H.value?k.getAllResponseExamples(H.value):[]),j=d(()=>H.value?k.getEndpointSchemaReferences(H.value):[]),R=c=>k.endpointRequiresSecurity(c),ke=d(()=>k.openApiTitle),ce=d(()=>k.openApiDescription),T=d(()=>k.openApiVersion),B=d(()=>{if(!A.value)return"Anonymous";if(A.value===To)return"Clerk Bearer";const o=k.securitySchemes.find(a=>a.name===A.value);return o?o.name:"Anonymous"}),Y=async()=>{await h.reload()};return(c,o)=>(t(),s("div",mn,[e("header",yn,[e("div",fn,[e("div",kn,[e("div",_n,[e("div",Sn,[e("h1",gn,f(ke.value),1),T.value?(t(),s("div",bn,"v"+f(T.value),1)):u("",!0)]),ce.value?(t(),s("p",$n,f(ce.value),1)):u("",!0)]),g.value?(t(),s("div",Cn,[g.value?(t(),s("button",{key:0,onClick:Y,class:"refresh-spec-btn",disabled:p(k).loading,title:"Refresh OpenAPI Spec"},[P(p(rt),{size:20,class:L({spinning:p(k).loading})},null,8,["class"])],8,wn)):u("",!0)])):u("",!0)]),e("div",An,[p(h).isServiceHostPickerEnabled?(t(),F(Je,{key:0})):u("",!0),e("button",{onClick:o[0]||(o[0]=a=>p(x).push("/spec")),class:"openapi-spec-link",title:"View OpenAPI Spec JSON"},[P(p(Ue),{size:20})]),e("a",xn,[P(p(it),{size:20})]),e("button",{onClick:o[1]||(o[1]=(...a)=>p(z).toggleAuthMenu&&p(z).toggleAuthMenu(...a)),class:L(["auth-menu-toggle",{active:p(z).authMenuOpen,"has-selection":A.value}]),title:"Security Scheme"},[A.value?(t(),F(p(de),{key:1,size:16})):(t(),F(p(Ie),{key:0,size:16})),e("span",null,f(A.value?B.value:"Security"),1)],2),p(O)?(t(),s("div",En,[b.value?(t(),s("div",qn,[P(p(ot))])):(t(),F(p(nt),{key:0,mode:"modal"},{default:st(()=>[...o[6]||(o[6]=[e("button",{class:"sign-in-btn"},"Sign In",-1)])]),_:1}))])):u("",!0)])])]),P(an),e("div",Hn,[g.value?(t(),s("aside",{key:0,class:L(["endpoints-sidebar",{collapsed:_.value,resizing:l.value}]),style:xe({width:_.value?"60px":`${$.value}px`})},[e("div",Bn,[o[7]||(o[7]=e("h2",null,"Endpoints ",-1)),e("button",{onClick:o[2]||(o[2]=a=>_.value=!_.value),class:"sidebar-toggle",title:_.value?"Expand sidebar":"Collapse sidebar"},[_.value?(t(),F(p(Se),{key:0,size:16})):(t(),F(p(je),{key:1,size:16}))],8,Pn)]),le(e("div",Rn,[G.value?(t(),s("div",Mn,"Loading OpenAPI spec...")):W.value?(t(),s("div",zn,f(W.value),1)):(t(),s("div",Tn,[(t(!0),s(ne,null,oe(Ce.value,a=>(t(),s("div",{key:a.name,class:"endpoint-group"},[e("div",{class:"group-header",onClick:C=>we(a.name)},[e("span",On,f(a.name),1),e("span",Kn,"("+f(a.endpoints.length)+")",1),e("span",Ln,[S.value.has(a.name)?(t(),F(p(qe),{key:0,size:14})):(t(),F(p(Se),{key:1,size:14}))])],8,In),S.value.has(a.name)?(t(),s("div",Un,[(t(!0),s(ne,null,oe(a.endpoints,C=>(t(),s("div",{key:`${C.method}-${C.path}`,class:L(["endpoint-item",{active:K.value===C.path&&q.value===C.method}]),onClick:se(ee=>pe(C.path,C.method),["stop"])},[e("span",{class:"method-badge",style:xe({backgroundColor:y(C.method)})},f(C.method),5),e("span",Vn,f(C.path),1),C.operation.summary?(t(),s("span",Dn,f(C.operation.summary),1)):u("",!0),R(C.operation)?(t(),F(p(de),{key:1,size:14,class:"security-indicator",title:"Requires authentication"})):u("",!0)],10,jn))),128))])):u("",!0)]))),128))]))],512),[[Le,!_.value]])],6)):u("",!0),g.value&&!_.value?(t(),s("div",{key:1,class:L(["resize-handle resize-handle-endpoints",{resizing:l.value}]),onMousedown:Re},null,34)):u("",!0),H.value?(t(),s("div",Fn,[P(xs,{path:K.value,method:q.value},null,8,["path","method"]),J.value?u("",!0):(t(),s("div",{key:0,class:L(["resize-handle resize-handle-examples",{resizing:r.value}]),onMousedown:Me},null,34)),e("aside",{class:L(["examples-sidebar",{collapsed:J.value,resizing:r.value}]),style:xe({width:J.value?"60px":`${m.value}px`})},[e("div",Nn,[o[8]||(o[8]=e("h3",null,"Examples",-1)),e("button",{onClick:o[3]||(o[3]=a=>J.value=!J.value),class:"examples-toggle",title:J.value?"Expand examples":"Collapse examples"},[J.value?(t(),F(p(je),{key:0,size:16})):(t(),F(p(Se),{key:1,size:16}))],8,Jn)]),le(e("div",Wn,[v.value||n.value?(t(),s("div",Gn,[e("div",Xn,[e("h4",null,f(Z("request-body")?"Request Body Schema":"Example Request Body"),1),e("div",Qn,[e("button",{onClick:o[4]||(o[4]=a=>re("request-body")),class:L([{active:!Z("request-body")},"toggle-btn"])}," Example ",2),e("button",{onClick:o[5]||(o[5]=a=>re("request-body")),class:L([{active:Z("request-body")},"toggle-btn"])}," Schema ",2)])]),e("div",Yn,[Z("request-body")&&U.value?(t(),s("div",Zn,[e("pre",eo,f(U.value),1)])):Z("request-body")?u("",!0):(t(),s("div",to,[P(p(ge),{"model-value":v.value,mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])]))])])):u("",!0),D.value.length>0?(t(),s("div",so,[o[9]||(o[9]=e("h4",null,"Response Codes",-1)),e("div",no,[(t(!0),s(ne,null,oe(D.value,a=>(t(),s("div",{key:a.code,class:"response-code-item"},[e("div",oo,[e("div",{class:L(["response-code-left",{success:a.isSuccess,error:!a.isSuccess}])},[e("span",ao,f(a.code),1)],2),e("div",lo,[a.description?(t(),s("div",io,f(a.description),1)):u("",!0),e("div",ro,[e("button",{onClick:C=>re(`response-${a.code}`),class:L([{active:!Z(`response-${a.code}`)},"toggle-btn small"])}," Example ",10,co),e("button",{onClick:C=>re(`response-${a.code}`),class:L([{active:Z(`response-${a.code}`)},"toggle-btn small"])}," Schema ",10,uo)])])]),(Z(`response-${a.code}`)?a.schema:a.example)?(t(),s("div",ho,[Z(`response-${a.code}`)&&a.schema?(t(),s("div",vo,[e("pre",po,f(Q(a.schema)),1)])):Z(`response-${a.code}`)?u("",!0):(t(),s("div",mo,[P(p(ge),{"model-value":a.example,mode:"text",readOnly:!0,mainMenuBar:!1,navigationBar:!1,statusBar:!1,darkTheme:!0},null,8,["model-value"])]))])):(t(),s("div",yo," No "+f(Z(`response-${a.code}`)?"schema":"example")+" available ",1))]))),128))])])):u("",!0),!v.value&&D.value.length===0?(t(),s("div",fo," No examples available for this endpoint. ")):u("",!0),j.value.length>0?(t(),s("div",ko,[o[10]||(o[10]=e("h4",null,"Referenced Schemas",-1)),e("div",_o,[(t(!0),s(ne,null,oe(j.value,a=>(t(),s("div",{key:a.name,class:"schema-reference-item"},[e("div",{class:"schema-reference-header",onClick:C=>Be(a.name)},[e("span",go,[M.value.has(a.name)?(t(),F(p(qe),{key:0,size:14})):(t(),F(p(Se),{key:1,size:14}))]),e("span",bo,f(a.name),1)],8,So),M.value.has(a.name)?(t(),s("div",$o,[e("div",Co,[e("pre",wo,f(p(k).formatSchemaForDisplay(a.schema,w.value)),1)])])):u("",!0)]))),128))])])):u("",!0)],512),[[Le,!J.value]])],6)])):(t(),s("main",Ao,[e("div",xo,[e("div",Eo,[e("div",qo,[P(p(Fe),{size:64})]),o[14]||(o[14]=e("h1",{class:"welcome-title"},"Welcome to OpenAPI Studio",-1)),g.value?(t(),s("p",Ho," Select an endpoint from the sidebar to start testing your API endpoints. ")):u("",!0),P(pn),g.value?(t(),s("div",Bo,[e("div",Po,[P(p(Ue),{size:20,class:"tip-icon"}),o[11]||(o[11]=e("span",null,"Browse available endpoints in the sidebar",-1))]),e("div",Ro,[P(p(ct),{size:20,class:"tip-icon"}),o[12]||(o[12]=e("span",null,"Test requests with custom parameters",-1))]),e("div",Mo,[P(p(at),{size:20,class:"tip-icon"}),o[13]||(o[13]=e("span",null,"View responses and schema documentation",-1))])])):u("",!0)])]),e("footer",zo,[e("p",null,"© "+f(new Date().getFullYear())+" Gamja Labs",1)])]))])]))}});export{Ko as default};