@redocly/openapi-docs 3.15.0-next.6 → 3.15.0-next.7
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Redocly OpenAPI Docs
|
|
3
3
|
* (c) Copyright 2025 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: 3.15.0-next.
|
|
5
|
+
* Version: 3.15.0-next.7
|
|
6
6
|
**/function tJ(e,t){for(var a=0;a<t.length;a++){const r=t[a];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aJ(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var a=function r(){var n=!1;try{n=this instanceof r}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),a}var rJ={exports:{}},Rk={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -800,7 +800,7 @@ Error generating stack: `+O.message+`
|
|
|
800
800
|
/**
|
|
801
801
|
* @tokens Catalog entity icon
|
|
802
802
|
*/
|
|
803
|
-
--catalog-entity-icon-color: var(--color-
|
|
803
|
+
--catalog-entity-icon-color: var(--color-persian-green-8);
|
|
804
804
|
--catalog-entity-border-color: var(--border-color-secondary);
|
|
805
805
|
--catalog-entity-bg-color: var(--bg-color-tonal);
|
|
806
806
|
|
|
@@ -10307,7 +10307,7 @@ ${JSON.stringify(a,null,2)}`);Zr(t.rules,a.rules),Zr(t.oas2Rules,a.oas2Rules),zn
|
|
|
10307
10307
|
font-size: var(--page-404-description-font-size);
|
|
10308
10308
|
line-height: var(--page-404-description-line-height);
|
|
10309
10309
|
font-weight: var(--page-404-description-font-weight);
|
|
10310
|
-
`;async function Qvt(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await Fvt(e||t);try{RZe(r)}catch{}return r}const Yvt=({options:e,definitionUrl:t,disableTelemetry:a,definition:r,activeSampleLanguage:n,children:i})=>{const[o,s]=I.useState(),[l,c]=I.useState(!0),[u,d]=I.useState(null),[p,h]=I.useState(e||{});I.useEffect(()=>{async function k(){c(!0);try{const y=await Vvt();h({...e,...y}),d(await Qvt(r,t,e))}catch(y){s(y.message)}}k()},[r,t,e]);const g=I.useMemo(()=>{if(u)return{definition:u,options:p,definitionUrl:t,activeSampleLanguage:n}},LZe([u,t,p]));return I.useEffect(()=>{g&&c(!1)},[g]),o?m.jsx(qvt,{description:o||"Please check path to your OpenAPI description"}):g?l?pl(e?.hideLoading,!1)?null:m.jsx(Nat,{color:"--loading-spinner-color"}):I.isValidElement(i)?I.cloneElement(i,{store:g}):null:null};function Xvt({definition:e,definitionUrl:t,disableTelemetry:a=!1,options:r={},activeItemId:n,activeSampleLanguage:i,activeDeepLink:o,router:s}){return m.jsx(Yvt,{definition:e,definitionUrl:t,disableTelemetry:a,options:r,activeItemId:n,activeSampleLanguage:i,activeDeepLink:o,children:m.jsx(_ae,{withCommonStyles:!0,router:s||"hash"})})}function eyt(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function tyt(e){const t=eyt(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function ayt(e,t=document.querySelector("redoc")){yJ.hydrateRoot(t,m.jsx(_ae,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function xpe(e,t={},a=A9("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,disableTelemetry:n,...i}={...t,...tyt(a)};let o,s;typeof e=="string"?o=e:typeof e=="object"&&(s=e),yJ.createRoot(a).render(I.createElement(Xvt,{definition:s,definitionUrl:o,disableTelemetry:n,options:i,router:r??"hash"},["Loading..."]))}const ryt="3.15.0-next.
|
|
10310
|
+
`;async function Qvt(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await Fvt(e||t);try{RZe(r)}catch{}return r}const Yvt=({options:e,definitionUrl:t,disableTelemetry:a,definition:r,activeSampleLanguage:n,children:i})=>{const[o,s]=I.useState(),[l,c]=I.useState(!0),[u,d]=I.useState(null),[p,h]=I.useState(e||{});I.useEffect(()=>{async function k(){c(!0);try{const y=await Vvt();h({...e,...y}),d(await Qvt(r,t,e))}catch(y){s(y.message)}}k()},[r,t,e]);const g=I.useMemo(()=>{if(u)return{definition:u,options:p,definitionUrl:t,activeSampleLanguage:n}},LZe([u,t,p]));return I.useEffect(()=>{g&&c(!1)},[g]),o?m.jsx(qvt,{description:o||"Please check path to your OpenAPI description"}):g?l?pl(e?.hideLoading,!1)?null:m.jsx(Nat,{color:"--loading-spinner-color"}):I.isValidElement(i)?I.cloneElement(i,{store:g}):null:null};function Xvt({definition:e,definitionUrl:t,disableTelemetry:a=!1,options:r={},activeItemId:n,activeSampleLanguage:i,activeDeepLink:o,router:s}){return m.jsx(Yvt,{definition:e,definitionUrl:t,disableTelemetry:a,options:r,activeItemId:n,activeSampleLanguage:i,activeDeepLink:o,children:m.jsx(_ae,{withCommonStyles:!0,router:s||"hash"})})}function eyt(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function tyt(e){const t=eyt(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function ayt(e,t=document.querySelector("redoc")){yJ.hydrateRoot(t,m.jsx(_ae,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function xpe(e,t={},a=A9("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,disableTelemetry:n,...i}={...t,...tyt(a)};let o,s;typeof e=="string"?o=e:typeof e=="object"&&(s=e),yJ.createRoot(a).render(I.createElement(Xvt,{definition:s,definitionUrl:o,disableTelemetry:n,options:i,router:r??"hash"},["Loading..."]))}const ryt="3.15.0-next.7",nyt="230aad56";function iyt(){const e=A9("redoc");if(!e)return;const t=e.getAttribute("spec-url");if(t){const a=e.getAttribute("disable-telemetry")==="true";xpe(t,{disableTelemetry:a},e)}}iyt();var wpe={exports:{}};/*!
|
|
10311
10311
|
|
|
10312
10312
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
10313
10313
|
<http://stuartk.com/jszip>
|
|
@@ -11081,6 +11081,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
11081
11081
|
flex-direction: column;
|
|
11082
11082
|
flex-shrink: 1;
|
|
11083
11083
|
gap: var(--card-content-gap);
|
|
11084
|
+
width: 100%;
|
|
11084
11085
|
`,skt=U.h3`
|
|
11085
11086
|
margin: var(--card-title-margin);
|
|
11086
11087
|
font-weight: var(--card-title-font-weight);
|
|
@@ -11116,28 +11117,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
11116
11117
|
> *:last-child {
|
|
11117
11118
|
margin-bottom: 0;
|
|
11118
11119
|
}
|
|
11119
|
-
|
|
11120
|
-
/* Icon link styles */
|
|
11121
|
-
& a {
|
|
11122
|
-
display: inline-flex;
|
|
11123
|
-
align-items: center;
|
|
11124
|
-
line-height: 1;
|
|
11125
|
-
|
|
11126
|
-
& svg {
|
|
11127
|
-
width: 1.2em;
|
|
11128
|
-
height: 1.2em;
|
|
11129
|
-
margin-right: 0.25em;
|
|
11130
|
-
vertical-align: middle;
|
|
11131
|
-
|
|
11132
|
-
& g {
|
|
11133
|
-
fill: var(--link-color-primary);
|
|
11134
|
-
}
|
|
11135
|
-
}
|
|
11136
|
-
}
|
|
11137
|
-
|
|
11138
|
-
& a:visited > span > svg > g {
|
|
11139
|
-
fill: var(--link-color-visited);
|
|
11140
|
-
}
|
|
11141
11120
|
`,ukt=U.div.attrs(({$isCardLink:e,$variant:t})=>({className:dkt(e,t)}))`
|
|
11142
11121
|
display: flex;
|
|
11143
11122
|
flex-direction: ${({$layout:e})=>e==="horizontal"?"row":"column"};
|
|
@@ -11179,12 +11158,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
11179
11158
|
}
|
|
11180
11159
|
}
|
|
11181
11160
|
}
|
|
11182
|
-
|
|
11183
|
-
&& ul {
|
|
11184
|
-
list-style: none;
|
|
11185
|
-
padding-left: 0;
|
|
11186
|
-
margin: var(--spacing-xs) 0;
|
|
11187
|
-
}
|
|
11188
11161
|
`,dkt=(e,t)=>{let a=[];return a.push(`card-variant-${t}`),e&&a.push("card-link"),a.join(" ")};function pkt(e){const{align:t,...a}=e;return t?m.jsx(hkt,{align:t,children:m.jsx(U2,{...a})}):m.jsx(U2,{...a})}const hkt=U.div`
|
|
11189
11162
|
text-align: ${e=>e.align||"initial"};
|
|
11190
11163
|
|
|
@@ -11870,7 +11843,7 @@ html body {
|
|
|
11870
11843
|
`),j+="`"+sTa(x)+"`: "+v),c([j])}return null})},e})();function aK(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
11871
11844
|
|
|
11872
11845
|
$3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function sTa(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var lTa=(function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},e(t,a)};return function(t,a){e(t,a);function r(){this.constructor=t}t.prototype=a===null?Object.create(a):(r.prototype=a.prototype,new r)}})(),ni,cw;if(typeof process=="object")cw=!1;else if(typeof navigator=="object"){var cTa=navigator.userAgent;cw=cTa.indexOf("Windows")>=0}var uTa=/^\w[\w\d+.-]*$/,dTa=/^\//,pTa=/^\/\//;function hTa(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!uTa.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!dTa.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(pTa.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function mTa(e,t){return!e&&!t?"file":e}function fTa(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Xc&&(t=Xc+t):t=Xc;break}return t}var tn="",Xc="/",gTa=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,rK=(function(){function e(t,a,r,n,i,o){o===void 0&&(o=!1),typeof t=="object"?(this.scheme=t.scheme||tn,this.authority=t.authority||tn,this.path=t.path||tn,this.query=t.query||tn,this.fragment=t.fragment||tn):(this.scheme=mTa(t,o),this.authority=a||tn,this.path=fTa(this.scheme,r||tn),this.query=n||tn,this.fragment=i||tn,hTa(this,o))}return e.isUri=function(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="function"&&typeof t.with=="function"&&typeof t.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return nPe(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var a=t.scheme,r=t.authority,n=t.path,i=t.query,o=t.fragment;return a===void 0?a=this.scheme:a===null&&(a=tn),r===void 0?r=this.authority:r===null&&(r=tn),n===void 0?n=this.path:n===null&&(n=tn),i===void 0?i=this.query:i===null&&(i=tn),o===void 0?o=this.fragment:o===null&&(o=tn),a===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new Xy(a,r,n,i,o)},e.parse=function(t,a){a===void 0&&(a=!1);var r=gTa.exec(t);return r?new Xy(r[2]||tn,D3(r[4]||tn),D3(r[5]||tn),D3(r[7]||tn),D3(r[9]||tn),a):new Xy(tn,tn,tn,tn,tn)},e.file=function(t){var a=tn;if(cw&&(t=t.replace(/\\/g,Xc)),t[0]===Xc&&t[1]===Xc){var r=t.indexOf(Xc,2);r===-1?(a=t.substring(2),t=Xc):(a=t.substring(2,r),t=t.substring(r)||Xc)}return new Xy("file",a,t,tn,tn)},e.from=function(t){return new Xy(t.scheme,t.authority,t.path,t.query,t.fragment)},e.prototype.toString=function(t){return t===void 0&&(t=!1),nK(this,t)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var a=new Xy(t);return a._formatted=t.external,a._fsPath=t._sep===tPe?t.fsPath:null,a}else return t},e})(),tPe=cw?1:void 0,Xy=(function(e){lTa(t,e);function t(){var a=e!==null&&e.apply(this,arguments)||this;return a._formatted=null,a._fsPath=null,a}return Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=nPe(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(a){return a===void 0&&(a=!1),a?nK(this,!0):(this._formatted||(this._formatted=nK(this,!1)),this._formatted)},t.prototype.toJSON=function(){var a={$mid:1};return this._fsPath&&(a.fsPath=this._fsPath,a._sep=tPe),this._formatted&&(a.external=this._formatted),this.path&&(a.path=this.path),this.scheme&&(a.scheme=this.scheme),this.authority&&(a.authority=this.authority),this.query&&(a.query=this.query),this.fragment&&(a.fragment=this.fragment),a},t})(rK),aPe=(ni={},ni[58]="%3A",ni[47]="%2F",ni[63]="%3F",ni[35]="%23",ni[91]="%5B",ni[93]="%5D",ni[64]="%40",ni[33]="%21",ni[36]="%24",ni[38]="%26",ni[39]="%27",ni[40]="%28",ni[41]="%29",ni[42]="%2A",ni[43]="%2B",ni[44]="%2C",ni[59]="%3B",ni[61]="%3D",ni[32]="%20",ni);function rPe(e,t){for(var a=void 0,r=-1,n=0;n<e.length;n++){var i=e.charCodeAt(n);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||t&&i===47)r!==-1&&(a+=encodeURIComponent(e.substring(r,n)),r=-1),a!==void 0&&(a+=e.charAt(n));else{a===void 0&&(a=e.substr(0,n));var o=aPe[i];o!==void 0?(r!==-1&&(a+=encodeURIComponent(e.substring(r,n)),r=-1),a+=o):r===-1&&(r=n)}}return r!==-1&&(a+=encodeURIComponent(e.substring(r))),a!==void 0?a:e}function vTa(e){for(var t=void 0,a=0;a<e.length;a++){var r=e.charCodeAt(a);r===35||r===63?(t===void 0&&(t=e.substr(0,a)),t+=aPe[r]):t!==void 0&&(t+=e[a])}return t!==void 0?t:e}function nPe(e,t){var a;return e.authority&&e.path.length>1&&e.scheme==="file"?a="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?a=e.path[1].toLowerCase()+e.path.substr(2):a=e.path,cw&&(a=a.replace(/\//g,"\\")),a}function nK(e,t){var a=t?vTa:rPe,r="",n=e.scheme,i=e.authority,o=e.path,s=e.query,l=e.fragment;if(n&&(r+=n,r+=":"),(i||n==="file")&&(r+=Xc,r+=Xc),i){var c=i.indexOf("@");if(c!==-1){var u=i.substr(0,c);i=i.substr(c+1),c=u.indexOf(":"),c===-1?r+=a(u,!1):(r+=a(u.substr(0,c),!1),r+=":",r+=a(u.substr(c+1),!1)),r+="@"}i=i.toLowerCase(),c=i.indexOf(":"),c===-1?r+=a(i,!1):(r+=a(i.substr(0,c),!1),r+=i.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){var d=o.charCodeAt(1);d>=65&&d<=90&&(o="/"+String.fromCharCode(d+32)+":"+o.substr(3))}else if(o.length>=2&&o.charCodeAt(1)===58){var d=o.charCodeAt(0);d>=65&&d<=90&&(o=String.fromCharCode(d+32)+":"+o.substr(2))}r+=a(o,!0)}return s&&(r+="?",r+=a(s,!1)),l&&(r+="#",r+=t?l:rPe(l,!1)),r}function iPe(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+iPe(e.substr(3)):e}}var oPe=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function D3(e){return e.match(oPe)?e.replace(oPe,function(t){return iPe(t)}):e}var yTa=(function(){function e(t){try{this.patternRegExp=new RegExp(aTa(t)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(t){this.schemas.push(t)},e.prototype.matchesPattern=function(t){return this.patternRegExp&&this.patternRegExp.test(t)},e.prototype.getSchemas=function(){return this.schemas},e})(),bTa=(function(){function e(t,a,r){this.service=t,this.url=a,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new eb(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(a){return t.service.resolveSchemaContent(a,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e})(),eb=(function(){function e(t,a){a===void 0&&(a=[]),this.schema=t,this.errors=a}return e})(),sPe=(function(){function e(t,a){a===void 0&&(a=[]),this.schema=t,this.errors=a}return e.prototype.getSection=function(t){return Zs(this.getSectionRecursive(t,this.schema))},e.prototype.getSectionRecursive=function(t,a){if(!a||typeof a=="boolean"||t.length===0)return a;var r=t.shift();if(a.properties&&typeof a.properties[r])return this.getSectionRecursive(t,a.properties[r]);if(a.patternProperties)for(var n=0,i=Object.keys(a.patternProperties);n<i.length;n++){var o=i[n],s=new RegExp(o);if(s.test(r))return this.getSectionRecursive(t,a.patternProperties[o])}else{if(typeof a.additionalProperties=="object")return this.getSectionRecursive(t,a.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(a.items)){var l=parseInt(r,10);if(!isNaN(l)&&a.items[l])return this.getSectionRecursive(t,a.items[l])}else if(a.items)return this.getSectionRecursive(t,a.items)}}return null},e})(),kTa=(function(){function e(t,a,r){this.contextService=a,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(a){var r=rK.parse(a).scheme;return r!=="schemaservice"&&(!t||t(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var a=this,r=!1;t=this.normalizeId(t);for(var n=[t],i=Object.keys(this.schemasById).map(function(c){return a.schemasById[c]});n.length;)for(var o=n.pop(),s=0;s<i.length;s++){var l=i[s];l&&(l.url===o||l.dependencies[o])&&(l.url!==o&&n.push(l.url),l.clearSchema(),i[s]=void 0,r=!0)}return r},e.prototype.normalizeId=function(t){try{return rK.parse(t).toString()}catch{return t}},e.prototype.setSchemaContributions=function(t){if(t.schemas){var a=t.schemas;for(var r in a){var n=this.normalizeId(r);this.contributionSchemas[n]=this.addSchemaHandle(n,a[r])}}if(t.schemaAssociations){var i=t.schemaAssociations;for(var o in i){var s=i[o];this.contributionAssociations[o]=s;for(var l=this.getOrAddFilePatternAssociation(o),c=0,u=s;c<u.length;c++){var d=u[c],r=this.normalizeId(d);l.addSchema(r)}}}},e.prototype.addSchemaHandle=function(t,a){var r=new bTa(this,t,a);return this.schemasById[t]=r,r},e.prototype.getOrAddSchemaHandle=function(t,a){return this.schemasById[t]||this.addSchemaHandle(t,a)},e.prototype.getOrAddFilePatternAssociation=function(t){var a=this.filePatternAssociationById[t];return a||(a=new yTa(t),this.filePatternAssociationById[t]=a,this.filePatternAssociations.push(a)),a},e.prototype.registerExternalSchema=function(t,a,r){a===void 0&&(a=null);var n=this.normalizeId(t);if(this.registeredSchemasIds[n]=!0,a)for(var i=0,o=a;i<o.length;i++){var s=o[i];this.getOrAddFilePatternAssociation(s).addSchema(n)}return r?this.addSchemaHandle(n,r):this.getOrAddSchemaHandle(n)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var a in this.contributionAssociations)for(var r=this.getOrAddFilePatternAssociation(a),n=0,i=this.contributionAssociations[a];n<i.length;n++){var o=i[n],t=this.normalizeId(o);r.addSchema(t)}},e.prototype.getResolvedSchema=function(t){var a=this.normalizeId(t),r=this.schemasById[a];return r?r.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(t){if(!this.requestService){var a="Unable to load schema from '"+t+"'. No schema request service available";return this.promise.resolve(new eb({},[a]))}return this.requestService(t).then(function(r){if(!r){var n="Unable to load schema from '"+t+"': No content.";return new eb({},[n])}var i={},o=[];i=N3a(r,o);var s=o.length?["Unable to parse content from '"+t+"': Parse error at offset "+o[0].offset]:[];return new eb(i,s)},function(r){var n="Unable to load schema from '"+t+"': "+r.toString();return new eb({},[n])})},e.prototype.resolveSchemaContent=function(t,a,r){var n=this,i=t.errors.slice(0),o=t.schema;if(o.$schema){var s=this.normalizeId(o.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new sPe({},["Draft-03 schemas are not supported."]));s==="https://json-schema.org/draft/2019-09/schema"&&t.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var l=this.contextService,c=function(h,g){if(!g)return h;var k=h;return g[0]==="/"&&(g=g.substr(1)),g.split("/").some(function(y){return k=k[y],!k}),k},u=function(h,g,k,y){var f=c(g,y);if(f)for(var v in f)f.hasOwnProperty(v)&&!h.hasOwnProperty(v)&&(h[v]=f[v]);else i.push("$ref '"+y+"' in '"+k+"' can not be resolved.")},d=function(h,g,k,y,f){l&&!/^\w+:\/\/.*/.test(g)&&(g=l.resolveRelativePath(g,y)),g=n.normalizeId(g);var v=n.getOrAddSchemaHandle(g);return v.getUnresolvedSchema().then(function(x){if(f[g]=!0,x.errors.length){var j=k?g+"#"+k:g;i.push("Problems loading reference '"+j+"': "+x.errors[0]+".")}return u(h,x.schema,g,k),p(h,x.schema,g,v.dependencies)})},p=function(h,g,k,y){if(!h||typeof h!="object")return Promise.resolve(null);for(var f=[h],v=[],x=[],j=function(){for(var T=[],B=0;B<arguments.length;B++)T[B]=arguments[B];for(var q=0,$=T;q<$.length;q++){var W=$[q];typeof W=="object"&&f.push(W)}},z=function(){for(var T=[],B=0;B<arguments.length;B++)T[B]=arguments[B];for(var q=0,$=T;q<$.length;q++){var W=$[q];if(typeof W=="object")for(var H in W){var ee=W[H];typeof ee=="object"&&f.push(ee)}}},S=function(){for(var T=[],B=0;B<arguments.length;B++)T[B]=arguments[B];for(var q=0,$=T;q<$.length;q++){var W=$[q];if(Array.isArray(W))for(var H=0,ee=W;H<ee.length;H++){var ae=ee[H];typeof ae=="object"&&f.push(ae)}}},C=function(T){for(var B=[];T.$ref;){var q=T.$ref,$=q.split("#",2);if(delete T.$ref,$[0].length>0){x.push(d(T,$[0],$[1],k,y));return}else B.indexOf(q)===-1&&(u(T,g,k,$[1]),B.push(q))}j(T.items,T.additionalProperties,T.not,T.contains,T.propertyNames,T.if,T.then,T.else),z(T.definitions,T.properties,T.patternProperties,T.dependencies),S(T.anyOf,T.allOf,T.oneOf,T.items)};f.length;){var M=f.pop();v.indexOf(M)>=0||(v.push(M),C(M))}return n.promise.all(x)};return p(o,o,a,r).then(function(h){return new sPe(o,i)})},e.prototype.getSchemaForResource=function(t,a){if(a&&a.root&&a.root.type==="object"){var r=a.root.properties.filter(function(g){return g.keyNode.value==="$schema"&&g.valueNode&&g.valueNode.type==="string"});if(r.length>0){var n=Uh(r[0].valueNode);if(n&&tTa(n,".")&&this.contextService&&(n=this.contextService.resolveRelativePath(n,t)),n){var i=this.normalizeId(n);return this.getOrAddSchemaHandle(i).getResolvedSchema()}}}for(var o=Object.create(null),s=[],l=0,c=this.filePatternAssociations;l<c.length;l++){var u=c[l];if(u.matchesPattern(t))for(var d=0,p=u.getSchemas();d<p.length;d++){var h=p[d];o[h]||(s.push(h),o[h]=!0)}}return s.length>0?this.createCombinedSchema(t,s).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(t,a){if(a.length===1)return this.getOrAddSchemaHandle(a[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),n={allOf:a.map(function(i){return{$ref:i}})};return this.addSchemaHandle(r,n)},e})(),xTa=(function(){function e(t,a){this.jsonSchemaService=t,this.promise=a,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate,this.commentSeverity=t.allowComments?void 0:Ca.Error)},e.prototype.doValidation=function(t,a,r,n){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],s={},l=function(d){var p=d.range.start.line+" "+d.range.start.character+" "+d.message;s[p]||(s[p]=!0,o.push(d))},c=function(d){var p=r?uPe(r.trailingCommas):Ca.Error,h=r?uPe(r.comments):i.commentSeverity;if(d){if(d.errors.length&&a.root){var g=a.root,k=g.type==="object"?g.properties[0]:null;if(k&&k.keyNode.value==="$schema"){var y=k.valueNode||k,f=hr.create(t.positionAt(y.offset),t.positionAt(y.offset+y.length));l(op.create(f,d.errors[0],Ca.Warning,lr.SchemaResolveError))}else{var f=hr.create(t.positionAt(g.offset),t.positionAt(g.offset+1));l(op.create(f,d.errors[0],Ca.Warning,lr.SchemaResolveError))}}else{var v=a.validate(t,d.schema);v&&v.forEach(l)}lPe(d.schema)&&(h=void 0),cPe(d.schema)&&(p=void 0)}for(var x=0,j=a.syntaxErrors;x<j.length;x++){var z=j[x];if(z.code===lr.TrailingComma){if(typeof p!="number")continue;z.severity=p}l(z)}if(typeof h=="number"){var S="Comments are not permitted in JSON.";a.comments.forEach(function(C){l(op.create(C,S,h,lr.CommentNotPermitted))})}return o};if(n){var u=n.id||"schemaservice://untitled/"+wTa++;return this.jsonSchemaService.resolveSchemaContent(new eb(n),u,{}).then(function(d){return c(d)})}return this.jsonSchemaService.getSchemaForResource(t.uri,a).then(function(d){return c(d)})},e})(),wTa=0;function lPe(e){if(e&&typeof e=="object"){if(Qu(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,a=e.allOf;t<a.length;t++){var r=a[t],n=lPe(r);if(Qu(n))return n}}}function cPe(e){if(e&&typeof e=="object"){if(Qu(e.allowTrailingCommas))return e.allowTrailingCommas;if(Qu(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var t=0,a=e.allOf;t<a.length;t++){var r=a[t],n=cPe(r);if(Qu(n))return n}}}function uPe(e){switch(e){case"error":return Ca.Error;case"warning":return Ca.Warning;case"ignore":return}}var dPe=48,zTa=57,STa=65,N3=97,jTa=102;function ii(e){return e<dPe?0:e<=zTa?e-dPe:(e<N3&&(e+=N3-STa),e>=N3&&e<=jTa?e-N3+10:0)}function CTa(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:ii(e.charCodeAt(1))*17/255,green:ii(e.charCodeAt(2))*17/255,blue:ii(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ii(e.charCodeAt(1))*17/255,green:ii(e.charCodeAt(2))*17/255,blue:ii(e.charCodeAt(3))*17/255,alpha:ii(e.charCodeAt(4))*17/255};case 7:return{red:(ii(e.charCodeAt(1))*16+ii(e.charCodeAt(2)))/255,green:(ii(e.charCodeAt(3))*16+ii(e.charCodeAt(4)))/255,blue:(ii(e.charCodeAt(5))*16+ii(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ii(e.charCodeAt(1))*16+ii(e.charCodeAt(2)))/255,green:(ii(e.charCodeAt(3))*16+ii(e.charCodeAt(4)))/255,blue:(ii(e.charCodeAt(5))*16+ii(e.charCodeAt(6)))/255,alpha:(ii(e.charCodeAt(7))*16+ii(e.charCodeAt(8)))/255}}return null}var OTa=(function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,a,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=a.root;if(!i)return null;var o=r.resultLimit,s=t.uri;if((s==="vscode://defaultsettings/keybindings.json"||tK(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,h=d.properties;p<h.length;p++){var g=h[p];if(g.keyNode.value==="key"&&g.valueNode){var k=Zy.create(t.uri,Zh(t,d));if(l.push({name:Uh(g.valueNode),kind:Yu.Function,location:k}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var y=function(v,x,j){return o>=0&&(x.type==="array"?x.items.forEach(function(z){return y(v,z,j)}):x.type==="object"&&x.properties.forEach(function(z){if(o>=0){var S=z.valueNode;if(S){o--;var C=Zy.create(t.uri,Zh(t,z)),M=j?j+"."+z.keyNode.value:z.keyNode.value;v.push({name:n.getKeyLabel(z),kind:n.getSymbolKind(S.type),location:C,containerName:j}),y(v,S,M)}}})),v},f=y([],i,void 0);return o<0&&(f.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),f},e.prototype.findDocumentSymbols2=function(t,a,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=a.root;if(!i)return null;var o=r.resultLimit,s=t.uri;if((s==="vscode://defaultsettings/keybindings.json"||tK(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,h=d.properties;p<h.length;p++){var g=h[p];if(g.keyNode.value==="key"&&g.valueNode){var k=Zh(t,d),y=Zh(t,g.keyNode);if(l.push({name:Uh(g.valueNode),kind:Yu.Function,range:k,selectionRange:y}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var f=function(x,j){return o>=0&&(j.type==="array"?j.items.forEach(function(z,S){if(z&&o>=0){o--;var C=Zh(t,z),M=C,T=String(S),B=f([],z);x.push({name:T,kind:n.getSymbolKind(z.type),range:C,selectionRange:M,children:B})}}):j.type==="object"&&j.properties.forEach(function(z){var S=z.valueNode;if(S&&o>=0){o--;var C=Zh(t,z),M=Zh(t,z.keyNode),T=f([],S);x.push({name:n.getKeyLabel(z),kind:n.getSymbolKind(S.type),range:C,selectionRange:M,children:T})}})),x},v=f([],i);return o<0&&(v.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),v},e.prototype.getSymbolKind=function(t){switch(t){case"object":return Yu.Module;case"string":return Yu.String;case"number":return Yu.Number;case"array":return Yu.Array;case"boolean":return Yu.Boolean;default:return Yu.Variable}},e.prototype.getKeyLabel=function(t){var a=t.keyNode.value;return a&&(a=a.replace(/[\n]/g,"\u21B5")),a&&a.trim()?a:'"'+a+'"'},e.prototype.findDocumentColors=function(t,a,r){return this.schemaService.getSchemaForResource(t.uri,a).then(function(n){var i=[];if(n)for(var o=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,s=a.getMatchingSchemas(n.schema),l={},c=0,u=s;c<u.length;c++){var d=u[c];if(!d.inverted&&d.schema&&(d.schema.format==="color"||d.schema.format==="color-hex")&&d.node&&d.node.type==="string"){var p=String(d.node.offset);if(!l[p]){var h=CTa(Uh(d.node));if(h){var g=Zh(t,d.node);i.push({color:h,range:g})}if(l[p]=!0,o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),i}}}return i})},e.prototype.getColorPresentations=function(t,a,r,n){var i=[],o=Math.round(r.red*255),s=Math.round(r.green*255),l=Math.round(r.blue*255);function c(d){var p=d.toString(16);return p.length!==2?"0"+p:p}var u;return r.alpha===1?u="#"+c(o)+c(s)+c(l):u="#"+c(o)+c(s)+c(l)+c(Math.round(r.alpha*255)),i.push({label:u,textEdit:sp.replace(n,JSON.stringify(u))}),i},e})();function Zh(e,t){return hr.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var ATa={schemaAssociations:{},schemas:{}};function PTa(e,t){var a=[],r=[],n=[],i=-1,o=Uy(e.getText(),!1),s=o.scan();function l(B){a.push(B),r.push(n.length)}for(;s!==17;){switch(s){case 1:case 3:{var c=e.positionAt(o.getTokenOffset()).line,u={startLine:c,endLine:c,kind:s===1?"object":"array"};n.push(u);break}case 2:case 4:{var d=s===2?"object":"array";if(n.length>0&&n[n.length-1].kind===d){var u=n.pop(),p=e.positionAt(o.getTokenOffset()).line;u&&p>u.startLine+1&&i!==u.startLine&&(u.endLine=p-1,l(u),i=u.startLine)}break}case 13:{var c=e.positionAt(o.getTokenOffset()).line,h=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&c+1<e.lineCount?o.setPosition(e.offsetAt(cc.create(c+1,0))):c<h&&(l({startLine:c,endLine:h,kind:sw.Comment}),i=c);break}case 12:{var g=e.getText().substr(o.getTokenOffset(),o.getTokenLength()),k=g.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(k){var p=e.positionAt(o.getTokenOffset()).line;if(k[1]){var u={startLine:p,endLine:p,kind:sw.Region};n.push(u)}else{for(var y=n.length-1;y>=0&&n[y].kind!==sw.Region;)y--;if(y>=0){var u=n[y];n.length=y,p>u.startLine&&i!==u.startLine&&(u.endLine=p,l(u),i=u.startLine)}}}break}}s=o.scan()}var f=t&&t.rangeLimit;if(typeof f!="number"||a.length<=f)return a;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var v=[],x=0,j=r;x<j.length;x++){var z=j[x];z<30&&(v[z]=(v[z]||0)+1)}for(var S=0,C=0,y=0;y<v.length;y++){var M=v[y];if(M){if(M+S>f){C=y;break}S+=M}}for(var T=[],y=0;y<a.length;y++){var z=r[y];typeof z=="number"&&(z<C||z===C&&S++<f)&&T.push(a[y])}return T}function MTa(e,t,a){function r(s){for(var l=e.offsetAt(s),c=a.getNodeFromOffset(l,!0),u=[];c;){switch(c.type){case"string":case"object":case"array":var d=c.offset+1,p=c.offset+c.length-1;d<p&&l>=d&&l<=p&&u.push(n(d,p)),u.push(n(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":u.push(n(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){var h=o(c.offset+c.length,5);h!==-1&&u.push(n(c.offset,h))}c=c.parent}for(var g=void 0,k=u.length-1;k>=0;k--)g=B3.create(u[k],g);return g||(g=B3.create(hr.create(s,s))),g}function n(s,l){return hr.create(e.positionAt(s),e.positionAt(l))}var i=Uy(e.getText(),!0);function o(s,l){i.setPosition(s);var c=i.scan();return c===l?i.getTokenOffset()+i.getTokenLength():-1}return t.map(r)}function pPe(e){var t=e.promiseConstructor||Promise,a=new kTa(e.schemaRequestService,e.workspaceContext,t);a.setSchemaContributions(ATa);var r=new iTa(a,e.contributions,t,e.clientCapabilities),n=new oTa(a,e.contributions,t),i=new OTa(a),o=new xTa(a,t);return{configure:function(s){a.clearExternalSchemas(),s.schemas&&s.schemas.forEach(function(l){a.registerExternalSchema(l.uri,l.fileMatch,l.schema)}),o.configure(s)},resetSchema:function(s){return a.onResourceChange(s)},doValidation:o.doValidation.bind(o),parseJSONDocument:function(s){return eTa(s,{collectComments:!0})},newJSONDocument:function(s,l){return X3a(s,l)},doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findColorSymbols:function(s,l){return i.findDocumentColors(s,l).then(function(c){return c.map(function(u){return u.range})})},findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:n.doHover.bind(n),getFoldingRanges:PTa,getSelectionRanges:MTa,format:function(s,l,c){var u=void 0;if(l){var d=s.offsetAt(l.start),p=s.offsetAt(l.end)-d;u={offset:d,length:p}}var h={tabSize:c?c.tabSize:4,insertSpaces:c?c.insertSpaces:!0,eol:`
|
|
11873
|
-
`};return H3a(s.getText(),u,h).map(function(g){return sp.replace(hr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function Df(){const{tabsState:e}=Ua(),t=I.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return zi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),a=I.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=t({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[t,e]),r=I.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((zi(s,Kt.Workflow)||zi(s,Kt.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),zi(s,Kt.Step)&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&zi(s,Kt.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:t,getExistingTab:a,handleIdChange:r}}function zi(e,t){return e.type===t}const $3=pPe({});let hPe=null;function mPe(e){hPe!==e&&(hPe=e,$3.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function fPe(e){const t=E3.create("stub.json","json",0,e),a=$3.parseJSONDocument(t);return{textDoc:t,jsonDoc:a}}const gPe=Ei.define({create(){},update(e){return e}}),vPe=e=>e.field(gPe,!1),TTa=({store:e,isResponse:t,apiOperation:a})=>{const r=ZK(e).data.get();let n=a?.body?.mediaTypes?.[Jo.JSON]?.schema;if(zi(r,Kt.Step)&&t){const i=r.response?.status;i&&(n=a?.responses?.[i]?.mediaTypes?.[Jo.JSON]?.schema)}return[gPe.init(()=>({schema:ep(n||{}),store:e}))]};function _Ta(){return async e=>{const{schema:t}=vPe(e.state)||{};if(!t)return[];mPe(t);const a=e.state.doc,{textDoc:r,jsonDoc:n}=fPe(a.toString());return(await $3.doValidation(r,n))?.map(i=>({from:iK(a,i.range.start),to:iK(a,i.range.end),message:i.message,severity:BTa[i.severity||3]}))}}const RTa=Ku.highest(By.of([{key:"Tab",run:e=>Gje(e)}]));function LTa(){return async function(e){const t={from:e.pos,to:e.pos,options:[],filter:!1},{schema:a}=vPe(e.state)||{};if(!a)return t;mPe(a);const r=e.state.doc,n=iK.bind(null,r),{textDoc:i,jsonDoc:o}=fPe(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await $3.doComplete(i,{line:l,character:c},o);if(!u)return t;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||ETa(d))return t;t.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:k=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,f=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let v=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const x=f===-1?0:f-v.length;k.dispatch({changes:{from:n(y.start),to:n(y.end),insert:v}});const j=v.length-(y.end.character-y.start.character);k.dispatch({selection:st.single(n(y.end)+j+x)})}}))||[];const p=e.state.wordAt(e.pos),h=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return h&&(t.options=t.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(h))),t}}const BTa={1:"error",2:"warning",3:"info",4:"hint"};function iK(e,t){return e.line(t.line+1).from+t.character}function ETa(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const yPe=fa.define();function tb(e){const t=e.activeEnvironmentId.get();return e.environments.find(a=>a.name.get()===t)?.get()||e.environments[0].get()}const oK=e=>Pn.fromClass(class{decorations;constructor(t){this.decorations=this.buildDecorations(t,e)}update(t){(t.docChanged||t.viewportChanged)&&(this.decorations=this.buildDecorations(t.view,e))}buildDecorations(t,a){const r=tb(a.store)?.inputs,n=[],i=Dt.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Dt.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of t.visibleRanges){const c=t.state.doc.sliceString(s,l),u=LM(c);for(const d of u){const p=s+d.start,h=s+d.end;if(!(p>=h))if(d.prefix==="inputs"){const g=RD(d.match),k=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:h,value:o(k)})}else n.push({from:p,to:h,value:i})}}return Dt.set(n,!0)}},{decorations:t=>t.decorations}),DTa=pPe({});function NTa(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.type=="string"&&typeof t.offset=="number"&&typeof t.length=="number"}function $Ta(e){const t=[];if(!e)return t;const a=[e];for(;a.length>0;){const r=a.pop();if(r.type==="property"){r.valueNode&&a.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&t.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)a.push(n)}return t}const ITa=e=>Pn.fromClass(class{decorations;constructor(t){this.decorations=this.buildDecorations(t,e)}update(t){(t.docChanged||t.viewportChanged)&&(this.decorations=this.buildDecorations(t.view,e))}buildDecorations(t,a){const r=t.state.doc.toString();let n;try{const u=E3.create("inmemory://model.json","json",0,r),d=DTa.parseJSONDocument(u)?.root;n=NTa(d)?d:void 0}catch{n=void 0}const i=tb(a.store)?.inputs,o=Dt.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Dt.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Dt.set([],!0);const c=$Ta(n);for(const u of c){if(!t.visibleRanges.some(k=>Math.max(k.from,u.from)<Math.min(k.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const h=t.state.doc.sliceString(d,p),g=LM(h);for(const k of g){const y=d+k.start,f=d+k.end;if(!(y>=f))if(k.prefix==="inputs"){const v=RD(k.match),x=!i?.find(j=>j.name===v)?.value;l.push({from:y,to:f,value:s(x)})}else l.push({from:y,to:f,value:o})}}return Dt.set(l,!0)}},{decorations:t=>t.decorations}),Xu={[Jo.Text]:{name:"Text",extensions:[wt.lineWrapping],stateExtensions:[oK]},[Jo.JSON]:{name:"JSON",extensions:[qCa(),wMa(_Ta(),{delay:0,needsRefresh:e=>e.transactions.some(t=>t.effects.some(a=>a.is(yPe)))}),rje.data.of({autocomplete:LTa()}),RTa],stateExtensions:[TTa,ITa]},[Jo.XML]:{name:"XML",extensions:[uMa()],stateExtensions:[oK]}},KTa={[Jo.Image]:{name:"Image",extensions:[],stateExtensions:[]}},HTa={[Jo.HTML]:{name:"HTML",extensions:[IPa()],stateExtensions:[oK]}},Qh={...Xu,...KTa,...HTa},bPe={[Jo.FormData]:{name:"form-data",extensions:void 0},[Jo["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},kPe={[Jo.Binary]:{name:"Binary",extensions:void 0}},Nf={...Xu,...bPe,...kPe},VTa=Object.keys(Xu),sK=Object.keys(bPe),xPe=Object.keys(kPe);function wPe(e=[],t){const a={};return e.forEach(r=>{const n=String(r[t]);a[n]||(a[n]=[]),a[n].push(r)}),a}const uw={active:!0,key:"",value:""};function Yh(e,t){return[...e.map(a=>({id:crypto.randomUUID(),key:a.name,value:t.initializeWithInputs?`$inputs.${a.name}`:a.example?String(a.example):"",active:t.initializeWithInputs?!0:!!a.example,in:a.in})),In(t.in)]}function dw(e,t){const[a]=e.split("?"),r=t.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${a}${r?`?${r}`:""}`}function uc(){return{id:crypto.randomUUID(),...uw}}function Ys(){return{id:crypto.randomUUID(),...uw,description:""}}function In(e){return{...uw,id:crypto.randomUUID(),in:e}}function $f(){return{id:crypto.randomUUID(),...uw,type:"text",files:null}}function lK(){return{id:crypto.randomUUID(),...uw,sendIn:$o.URL}}function cK(e){return e.map(t=>({id:crypto.randomUUID(),key:"",value:t,active:!0}))}function I3(e,t){return e.filter(a=>a.active&&a.value).map(({value:a})=>(t?$r(a,t):a).trim())}function Xh(e,t){const a=t.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(a.map(r=>[r.key,r])).values()):a}function zPe(e,t){return e.map(({value:a,...r})=>({...r,value:$r(a,t)}))}function FTa(e,t){if(!e.startsWith("$components.parameters."))return null;const a=e.replace("$components.parameters.","");return a&&t[a]||null}function Kn(e=[],t={}){const a=[];for(const r of e)if(yh(r)){const n=FTa(r.reference,t);n&&a.push({...n,active:r.active,value:r.value||n.value})}else a.push(r);return a}function em(e){return Object.entries(e).map(([t,a])=>({id:crypto.randomUUID(),key:"",value:t,active:!0,description:a}))}function GTa(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const SPe={documentedOAuth2Types:[],grantType:Ue.ClientCredentials,authRequestExtraParams:[uc()],tokenRequestExtraParams:[lK()],[Ue.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ys()],accessToken:""},[Ue.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ys()],accessToken:""},[Ue.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],accessToken:""},[Ue.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ys()]}},qTa={securityType:qe.NoAuth,securitySchemeId:null,[qe.BasicAuth]:{username:"",password:""},[qe.JWT]:{token:""},[qe.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[qe.APIKey]:{location:yl.Header,name:"",key:""},[qe.OAuth2]:SPe,[qe.OpenIDConnect]:{...SPe,openIdConnectUrl:"",userInfoUrl:""}},uK="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",JTa={[Fo.SIMPLE]:{condition:"",type:Fo.SIMPLE},[Fo.REGEX]:{condition:"",type:Fo.REGEX,context:""},[Fo.JSONPATH]:{condition:"",type:Fo.JSONPATH,context:""},[Fo.XPATH]:{condition:"",type:Fo.XPATH,context:""}};function K3(){return structuredClone({type:Xi.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[$f()],"application/x-www-form-urlencoded":[$f()]},binary:null})}const WTa={method:"GET",url:"",security:[ed()],body:K3(),queryParameters:[uc()],headers:[uc()],cookies:[uc()],pathParameters:[uc()]};function jPe(){return structuredClone(WTa)}function ed(){return ep(qTa)}function UTa(e){return ep({id:crypto.randomUUID(),...JTa[e]})}function CPe(e,t,a){for(const r of a){const n=OPe(e,r),i=OPe(t,r);if(typeof n=="object"&&typeof i=="object"){if(!CPe(n,i,a))return!1}else if(n!==i)return!1}return!0}function OPe(e,t){const a=t.split("/");let r=e;for(const n of a)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function ZTa(e,t){return e.length===t.length&&e.sort().join()===t.sort().join()}function QTa(e,t){return e.every(a=>t.includes(a))}function YTa(e){switch(e){case"query":return yl.Query;case"cookie":return yl.Cookie;case"header":return yl.Header;default:return}}function XTa(e,t,a){const{security:r}=t,n=c0a(e);if(!a)return!1;const i=dK(a),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!ZTa(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),h=i.find(f=>f.securityType===u),g=!h||CPe(c,h,t4a(u,d)),k=e4a(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&h&&g&&k);l.push(!a.security?.length||y)}),l.includes(!1)}function e4a(e,t,a,r){if(t===qe.OAuth2&&(a===Ue.AuthorizationCode||a===Ue.AuthorizationCodeWithPkce||a===Ue.Implicit)){const n=e[qe.OAuth2][a]?.availableScopes,i=I3(e[qe.OAuth2][a]?.scopes,r);return QTa(i,n)}return!0}function t4a(e,t){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...a4a(t)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function a4a(e){return e===Ue.ClientCredentials?[`${qe.OAuth2}/${Ue.ClientCredentials}/tokenUrl`]:e===Ue.Password?[`${qe.OAuth2}/${Ue.Password}/tokenUrl`]:e===Ue.Implicit?[`${qe.OAuth2}/${Ue.Implicit}/authorizationUrl`]:e===Ue.AuthorizationCode?[`${qe.OAuth2}/${Ue.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCode}/authorizationUrl`]:e===Ue.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function r4a(e){return e.map(t=>{const a=t.map(r=>r.id).join("_");return t.map(r=>({...r,schemeId:a}))})}function n4a(e){const t=e.security||[],a=t.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(pK(o))}),{id:n,security:i}});return t.length?a:[]}function i4a(e,t){const a=e.security||[];return a?.length?TPe(a).map((r,n)=>pK(r)):[]}function dK(e){const t=(e.security||[])[0];return t?t.map(a=>pK(a)):[ed()]}function pK(e,t){const a={...ed(),securitySchemeId:e.id},r=H3(e);a.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(a[r].schemeName=e.id),r===qe.BasicAuth&&(a[qe.BasicAuth].username||(a[qe.BasicAuth].username=Cn(n+na.Username)),a[qe.BasicAuth].password||(a[qe.BasicAuth].password=Cn(n+na.Password))),r===qe.DigestAuth&&(a[qe.DigestAuth].username||(a[qe.DigestAuth].username=Cn(n+na.Username)),a[qe.DigestAuth].password||(a[qe.DigestAuth].password=Cn(n+na.Password))),r===qe.JWT&&!a[qe.JWT].token&&(a[qe.JWT].token=Cn(n+na.JWTToken)),r===qe.APIKey&&!a[qe.APIKey].key){a[qe.APIKey].name=e.name||"",a[qe.APIKey].key=Cn(n+na.APIKey);const i=YTa(e.in);i&&(a[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=fK(e),o=Cn(n+na.Token),s=a[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===Ue.AuthorizationCode&&!s[Ue.AuthorizationCode].accessToken&&(s[Ue.AuthorizationCode].accessToken=o,s[Ue.AuthorizationCode].clientId=Cn(n+na.ClientId),s[Ue.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCode].clientSecret=Cn(n+na.ClientSecret),s[Ue.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCode].scopes=[...em(e.flows?.authorizationCode?.scopes||{})||[],Ys()]),l===Ue.AuthorizationCodeWithPkce&&!s[Ue.AuthorizationCodeWithPkce].accessToken&&(s[Ue.AuthorizationCodeWithPkce].accessToken=o,s[Ue.AuthorizationCodeWithPkce].clientId=Cn(n+na.ClientId),s[Ue.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCodeWithPkce].clientSecret=Cn(n+na.ClientSecret),s[Ue.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCodeWithPkce].scopes=[...em(e.flows?.authorizationCode?.scopes||{}),Ys()]),l===Ue.ClientCredentials&&!s[Ue.ClientCredentials].accessToken&&(s[Ue.ClientCredentials].accessToken=o,s[Ue.ClientCredentials].clientId=Cn(n+na.ClientId),s[Ue.ClientCredentials].clientSecret=Cn(n+na.ClientSecret),s[Ue.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[Ue.ClientCredentials].scopes=[...em(e.flows?.clientCredentials?.scopes||{}),Ys()]),l===Ue.ClientCredentialsWithJwtAssertion&&!s[Ue.ClientCredentialsWithJwtAssertion].accessToken&&(s[Ue.ClientCredentialsWithJwtAssertion].accessToken=o,s[Ue.ClientCredentialsWithJwtAssertion].clientId=Cn(n+na.ClientId),s[Ue.ClientCredentialsWithJwtAssertion].clientAssertion=Cn(n+na.ClientAssertion),s[Ue.ClientCredentialsWithJwtAssertion].scopes=[...em(e.flows?.clientCredentials?.scopes||{}),Ys()]),l===Ue.Implicit&&!s[Ue.Implicit].accessToken&&(s[Ue.Implicit].accessToken=o,s[Ue.Implicit].clientId=Cn(n+na.ClientId),s[Ue.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[Ue.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[Ue.Implicit].scopes=[...em(e.flows?.implicit?.scopes||{}),Ys()]),l===Ue.Password&&!s[Ue.Password].accessToken&&(s[Ue.Password].accessToken=o,s[Ue.Password].clientId=Cn(n+na.ClientId),s[Ue.Password].clientSecret=Cn(n+na.ClientSecret),s[Ue.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[Ue.Password].scopes=[...em(e.flows?.password?.scopes||{}),Ys()])})}if(r===qe.OpenIDConnect){const i=Cn(n+na.Token),o=a[qe.OpenIDConnect];o[Ue.AuthorizationCode].accessToken||(o[Ue.AuthorizationCode].accessToken=i,o[Ue.AuthorizationCode].clientId=Cn(n+na.ClientId),o[Ue.AuthorizationCode].clientSecret=Cn(n+na.ClientSecret),o[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.AuthorizationCodeWithPkce].accessToken||(o[Ue.AuthorizationCodeWithPkce].accessToken=i,o[Ue.AuthorizationCodeWithPkce].clientId=Cn(n+na.ClientId),o[Ue.AuthorizationCodeWithPkce].clientSecret=Cn(n+na.ClientSecret),o[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.Implicit].accessToken||(o[Ue.Implicit].accessToken=i,o[Ue.Implicit].clientId=Cn(n+na.ClientId))}return a}function o4a(e,t="",a){const r=wPe(e.parameters,"in"),n=APe(e),i=dK(e),o=Yh(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:a,apiPath:{path:e.path,method:e.method},apiId:t,request:{pathParameters:Yh(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:dw(GTa(e.path),o),headers:Yh(r.header||[],{in:"header"}),queryParameters:o,cookies:Yh(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function hK(e){const t=wPe(e.parameters,"in"),a=APe(e),r=dK(e);return{parameters:{queryParameters:Yh(t.query||[],{in:"query"}),headers:Yh(t.header||[],{in:"header"}),cookies:Yh(t.cookie||[],{in:"cookie"}),pathParameters:Yh(t.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:a,security:r}}function APe(e){const t=e.body?.mediaTypes;if(!t||!Object.keys(t).length)return K3();const a=s4a(t,e),r=a?.name||"",n=!sK.includes(r)&&!xPe.includes(r),i=mK(a),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...K3(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...a&&{type:a.name},content:o,formData:{"multipart/form-data":MPe(t[Jo.FormData]),"application/x-www-form-urlencoded":MPe(t[Jo["application/x-www-form-urlencoded"]])}}}function PPe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((t,a)=>(t[a]={name:a,extensions:void 0},t),{}),...Nf}:Nf}function MPe(e){if(!e)return[$f()];if(!e.parameters)return[$f()];const t=e.parameters.map(a=>({id:crypto.randomUUID(),key:a.name,value:String(a.example)||"",active:!0,type:a.inputType,files:null}));return t.push($f()),t}function mK(e){const t=e?.examples;return Object.keys(t||{}).map(a=>{const r=t?.[a];return{name:Pm(r?.summary)?r?.summary:r?.summary?.raw||a,key:a,value:t?.[a].value}})}function s4a(e,t){const a=PPe(t),r=Object.keys(e).find(n=>!!a[n]);return r?e[r]:null}function l4a(e){return!e?.security?.length||!e?[]:i4a(e)}function TPe(e){const t=new Set;return e.flat().filter(a=>t.has(a.id)?!1:(t.add(a.id),!0))}function H3(e){if(e.type==="http"){if(e.scheme==="bearer")return qe.JWT;if(e.scheme==="basic")return qe.BasicAuth;if(e.scheme==="digest")return qe.DigestAuth}else{if(e.type==="apiKey")return qe.APIKey;if(e.type==="oauth2")return qe.OAuth2;if(e.type==="openIdConnect")return qe.OpenIDConnect}return qe.NoAuth}function c4a(e,t){if(e==="clientCredentials"&&t&&"x-assertionType"in t&&t["x-assertionType"]===uK)return Ue.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&t&&"x-usePkce"in t&&t["x-usePkce"])return Ue.AuthorizationCodeWithPkce;switch(e){case"implicit":return Ue.Implicit;case"password":return Ue.Password;case"clientCredentials":return Ue.ClientCredentials;case"authorizationCode":return Ue.AuthorizationCode;default:return Ue.AuthorizationCode}}function u4a(e,t){const a=e?.security;if(!a?.length)return[];const r=r4a(a).flat().filter(n=>n.schemeId===t).find(n=>H3(n)===qe.OAuth2);return fK(r)}function fK(e){return Object.entries(e?.flows||{}).map(([t,a])=>c4a(t,a)).filter(Boolean)}async function pw(e){try{const t=await bza(e),a=await Awe(e);return{absolutePath:e,file:new File([t],a)}}catch(t){return console.error("Failed to init replay file",t),null}}async function _Pe(e){return(await Promise.allSettled(e.map(t=>pw(t)))).map(t=>t.status==="fulfilled"?t.value:null).filter(t=>t!==null)}async function d4a(e,t,a,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await p4a({projectPath:r,apiUrl:l.url,collectionId:t})}))),s={inputs:e.components?.inputs||{},parameters:Object.fromEntries(Object.entries(e.components?.parameters||{}).map(([l,c])=>[l,{...c,key:c.name,value:c.value,id:crypto.randomUUID(),active:!0}]))};return{...e,id:t,srcType:a,state:pr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:pr.Normal,parameters:VPe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:KPe(l.outputs),security:NPe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=VPe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=dw(d.url,u.queryParameters.filter(Xpe)));const p=h4a(c,o,n);let h;if(p&&i){const k=n?.find(y=>y.id===p.apiId);h=i(p.path,p.method,k)}delete c.operationId,delete c["x-operation"];const g=await b4a(c.requestBody,r);return{...c,state:pr.Normal,parameters:u,outputs:KPe(c.outputs),successCriteria:c.successCriteria?.map(k=>({...k,type:k.type??Fo.SIMPLE}))||[],requestBody:g,xOperation:d,security:NPe(c["x-security"],h),operation:p}}))})))}}async function p4a({projectPath:e,apiUrl:t,collectionId:a}){if(jwe(t))return t;if(await Zn.isAbsolute(t))return await Zn.relative(e,t);const r=await Zn.resolve(await Zn.join(e,a,"..",t));return await Zn.relative(e,r)}function h4a(e,t,a){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=LPe({operationPath:e.operationPath,parsedSourceDescriptions:t}),{operationId:o,apiId:s}=m4a({operationId:e.operationId,parsedSourceDescriptions:t}),l=s||i||t[0]?.apiId||"",c=a?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=x4a(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function m4a({operationId:e,parsedSourceDescriptions:t}){if(!e)return{operationId:"",apiId:null};const a=e.split(".");if(a.length===1)return{operationId:e,apiId:t[0]?.apiId??""};const[,r,n=""]=a,i=t.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function RPe(e){return"reference"in e&&typeof e.reference=="string"}function LPe({operationPath:e,parsedSourceDescriptions:t}){if(!e)return{apiId:null,path:"",method:""};try{const a=e.split("#"),r=a.length>1?a[1]:a[0],n=a.length>1?a[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=t.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:qi.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function f4a(e){switch(e.type){case"apiKey":return qe.APIKey;case"oauth2":return qe.OAuth2;case"openIdConnect":return qe.OpenIDConnect;case"http":return e.scheme==="basic"?qe.BasicAuth:e.scheme==="digest"?qe.DigestAuth:e.scheme==="bearer"?qe.JWT:qe.NoAuth;default:return qe.NoAuth}}function BPe(e,t){const a={clientCredentials:Ue.ClientCredentials,authorizationCode:Ue.AuthorizationCode,implicit:Ue.Implicit,password:Ue.Password,clientCredentialsWithJwtAssertion:Ue.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:Ue.AuthorizationCodeWithPkce};return e==="clientCredentials"&&t["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?Ue.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&t["x-usePkce"]?Ue.AuthorizationCodeWithPkce:a[e]??null}function g4a(e){return{query:yl.Query,header:yl.Header,cookie:yl.Cookie}[e.toLowerCase()]||yl.Header}function v4a(e){return{body:$o.Body,header:$o.Header,url:$o.URL}[e.toLowerCase()]||$o.URL}function EPe(e,t,a){return Object.keys(e).reduce((r,n)=>{const i=BPe(n,e[n]);if(!i)return r;switch(i){case Ue.ClientCredentials:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.AuthorizationCode:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Implicit:r[i]={...a[i],clientId:t.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:If(e[n].availableScopes),scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Password:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",username:t.username??"",password:t.password??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.ClientCredentialsWithJwtAssertion:r[i]={...a[i],clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.AuthorizationCodeWithPkce:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:If(e[n].availableScopes),scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:t.codeVerifier??"",codeChallenge:t.codeChallenge??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break}return r},a)}function DPe(e,t,a){const r={...ed(),securityType:e},n=Object.keys(t.flows||{})[0],i=BPe(n,t.flows?.[n])??Ue.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:a.username,password:a.password,schemeName:t.id}};case qe.JWT:return{...r,[qe.JWT]:{token:a.token,schemeName:t.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:a.username,password:a.password,schemeName:t.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:g4a(t.in),name:t.name,key:a.apiKey,schemeName:t.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...EPe(t.flows||{},a||{},r[qe.OAuth2]),authRequestExtraParams:$Pe(a.authRequestExtraParams),tokenRequestExtraParams:IPe(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...EPe(a.flows||{},a||{},r[qe.OpenIDConnect]),openIdConnectUrl:a.openIdConnectUrl,userInfoUrl:a.userInfoUrl,authRequestExtraParams:$Pe(a.authRequestExtraParams),tokenRequestExtraParams:IPe(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};default:return r}}function y4a(e,t){return[...e.map(a=>{if("scheme"in a){const n=f4a(a.scheme);return DPe(n,a.scheme,a.values)}const r=t.find(n=>n.id===a.schemeName);if(r){const n=H3(r),i=DPe(n,r,a.values);return i.securitySchemeId=r.id,i}return ed()})]}function NPe(e=[],t){const a=TPe(t?.security||[]);return e.length?y4a(e,a):[ed()]}function If(e,t){const a=em(e||{}),r=em(t||{});return[...a,...r,Ys()]}function $Pe(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0})).concat(uc())}function IPe(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0,sendIn:v4a(t.in)})).concat(lK())}function KPe(e){if(!e)return[uc()];const t=[];for(const a in e)t.push({id:crypto.randomUUID(),key:a,value:e[a],active:!0});return t.push(uc()),t}const V3={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function HPe(e,t){const a="$components.parameters.";if(e.reference.startsWith(a)){const r=e.reference.replace(a,"");return t?.[r]}}function VPe(e,t,a){if(!e&&!t)return{pathParameters:[In("path")],queryParameters:[In("query")],headers:[In("header")],cookies:[In("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(RPe(n)){const i=HPe(n,a),o=V3[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[V3[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(t)for(const n of t)if(RPe(n)){const i=HPe(n,a),o=V3[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[V3[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(In("path")),r.queryParameters.push(In("query")),r.headers.push(In("header")),r.cookies.push(In("cookie")),r}async function b4a(e,t){const a=jPe().body;if(!e)return a;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...a,type:e.contentType,formData:await k4a(e,t)};case"application/octet-stream":const r=e.payload?await qPe(e.payload,t):[],n=r.length>0?await pw(r[0]):null;return{...a,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...a,type:e.contentType,content:GPe(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...a,type:o,content:i?e.payload:GPe(e.payload)}}}}async function FPe(e,t,a,r){const n=await qPe(t,r),i=n.length>0||Array.isArray(t),o=i?await _Pe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":t,type:i?"file":"text",active:a,files:o}}async function k4a(e,t){const a=jPe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>FPe(o,s,!0,t))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>FPe(o,s,!1,t))):[];return{...a,[r]:[...n,...i,$f()]}}function GPe(e){return e?JSON.stringify(e,null,2):""}function x4a(e,t){for(const a of Object.keys(t.paths)){const r=t.paths[a];for(const n of Object.keys(r)){const i=n.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(i)&&r[i]?.operationId===e)return{method:i,path:a}}}return null}async function qPe(e,t){return Array.isArray(e)?(await Promise.all(e.map(a=>JPe(a,t)))).flat():typeof e=="string"?await JPe(e,t):[]}async function JPe(e,t){const a=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(a));return Promise.all(r.map(n=>w4a(n[1],t)))}async function w4a(e,t){return await Zn.isAbsolute(e)?e:await Zn.resolve(await Zn.join(t,e))}const Os=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},WPe=(e,t,a)=>{if(!e.properties)return e;const r=e.properties[t],n=Os(r);return{...e,properties:{...e.properties,[t]:{...n,...a}}}},z4a=(e,t,a)=>{if(!e.properties||t===a||!a.trim())return null;const r={...e.properties};return r[a]?null:(r[a]=r[t],delete r[t],{...e,properties:r})},S4a=(e,t)=>{if(!e.properties)return e;const a={...e.properties};return delete a[t],{...e,properties:a}},j4a=(e,t,a={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[t]:a}}};function UPe(e){const t=Object.assign({},...(e||[]).filter(({key:a,active:r})=>a&&r).map(a=>({[a.key]:a.value})));if(Object.keys(t).length!==0)return t}function ZPe(e){if(!e)return{};const t={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},a=[],r=[];return Object.keys(t).forEach(n=>{const i=n;e[i].forEach(o=>{if(yh(o)){const s={reference:o.reference,value:o.value||void 0};o.active?a.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:t[i],value:o.value};o.active?a.push(s):r.push(s)}})}),{parameters:a.length>0?a:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function C4a(e){const t=e?.map(a=>({condition:a.condition,context:a.context,type:a.type==Fo.SIMPLE?void 0:a.type}));if(t?.length!==0)return t}function O4a(e){if(!(!e||e.length===0))return[...e]}async function QPe(e,t){return e.absolutePath?`$file('${await Zn.relative(t,e.absolutePath)}')`:null}async function A4a(e,t){const{type:a,value:r,files:n}=e;switch(a){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>QPe(o,t)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function P4a(e,t){const a=e.type,r=e.formData[a],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await A4a(o,t);l?n[s]=c:i[s]=c})),{payload:Object.keys(n).length>0?n:void 0,"x-replay-disabled-payload":Object.keys(i).length>0?i:void 0}}function M4a(e){if(!e)return e;try{const t=JSON.parse(e);return typeof t=="object"?t:e}catch{return e}}async function T4a(e,t){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await P4a(e,t)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await QPe(e.binary,t):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:M4a(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function _4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function R4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function L4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function B4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function E4a(e){const{flows:t,values:a}=eMe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:t}},values:{...a,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:YPe(e.authRequestExtraParams),tokenRequestExtraParams:XPe(e.tokenRequestExtraParams)}}}function D4a(e){const{flows:t,values:a}=eMe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:t}},values:{...a,authRequestExtraParams:YPe(e.authRequestExtraParams),tokenRequestExtraParams:XPe(e.tokenRequestExtraParams)}}}function ab(e){const t={},a={};return e.forEach(r=>{r.value&&(r.active?t[r.value]=r.description:a[r.value]=r.description)}),{scopes:t,"x-replay-disabled-scopes":Object.keys(a).length>0?a:void 0}}function YPe(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active}))}function XPe(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active,in:t.sendIn.toLowerCase()}))}function eMe(e){let t;switch(e.grantType){case Ue.ClientCredentials:return t=e[Ue.ClientCredentials],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...ab(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken}};case Ue.Implicit:return t=e[Ue.Implicit],{flows:{implicit:{authorizationUrl:t.authorizationUrl,...ab(t.scopes)}},values:{clientId:t.clientId,accessToken:t.accessToken,callbackUrl:t.callbackUrl}};case Ue.Password:return t=e[Ue.Password],{flows:{password:{tokenUrl:t.tokenUrl,...ab(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,username:t.username,password:t.password,accessToken:t.accessToken}};case Ue.AuthorizationCode:return t=e[Ue.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...ab(t.scopes)}},values:{accessToken:t.accessToken,clientId:t.clientId,callbackUrl:t.callbackUrl}};case Ue.ClientCredentialsWithJwtAssertion:return t=e[Ue.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...ab(t.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:t.clientId,clientAssertion:t.clientAssertion,accessToken:t.accessToken}};case Ue.AuthorizationCodeWithPkce:return t=e[Ue.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...ab(t.scopes),"x-usePkce":!0}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken,codeVerifier:t.codeVerifier,codeChallenge:t.codeChallenge,callbackUrl:t.callbackUrl}}}}function tMe(e){const t=e.map(a=>{switch(a.securityType){case qe.OpenIDConnect:{const r=a[qe.OpenIDConnect];return E4a(r)}case qe.OAuth2:{const r=a[qe.OAuth2];return D4a(r)}case qe.APIKey:{const r=a[qe.APIKey];return R4a(r)}case qe.BasicAuth:{const r=a[qe.BasicAuth];return _4a(r)}case qe.DigestAuth:{const r=a[qe.DigestAuth];return B4a(r)}case qe.JWT:{const r=a[qe.JWT];return L4a(r)}default:return null}}).filter(a=>a!==null);return{"x-security":t.length?t:void 0}}function N4a(e){const{inputs:t,parameters:a,...r}=e;let n=r;return Object.keys(t).length&&(n.inputs=t),Object.keys(a).length&&(n.parameters=Object.fromEntries(Object.entries(a).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function $4a(e,t){const{id:a,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:N4a(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:h,steps:g,inputs:k,...y})=>({...y,dependsOn:O4a(d),outputs:UPe(p),inputs:k?Os(k):void 0,...tMe(u),...ZPe(c),steps:await Promise.all(g.map(async({parameters:f,security:v,operation:x,requestBody:j,successCriteria:z,outputs:S,state:C,xOperation:M,...T})=>{const B={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(x){const q=e.sourceDescriptions.find(({apiId:$})=>$===x.apiId)||e.sourceDescriptions[0];if(x.operationId){const $=e.sourceDescriptions.length<=1;B.operationId=$?x.operationId:`$sourceDescriptions.${q.name}.${x.operationId}`}else B.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${qi.escape(x.path)}/${x.method}`}else M&&(B["x-operation"]={...M,url:M.url.split("?")[0]});return{...T,...B,...tMe(v),...ZPe(f),requestBody:await T4a(j,t),successCriteria:C4a(z),outputs:UPe(S)}}))})))}}}class I4a extends Lwe{constructor(t,a){super(t),this.convertOperationToReplayValue=a}parse(t,a){return d4a(t.content,t.uri,t.type,this.storage.baseDir,a,this.convertOperationToReplayValue)}async stringify(t){const{arazzoObject:a}=await $4a(t,this.storage.baseDir);return await Zn.extname(t.id)===".json"?JSON.stringify(a,null,2):Id.dump(a)}}class K4a{constructor(t,a){this.storage=t,this.localStorageSecretsProvider=a}default=[];async read(){const t=await this.storage.get("replay-environments.yaml"),a=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!t)return this.default;try{r=Id.load(t),n=a?JSON.parse(a):null}catch(i){return console.error("Failed to parse environments file",i),this.default}return r?Object.keys(r).filter(i=>i!=="version").map(i=>({name:i,inputs:Object.entries(r[i].inputs).map(([o,s])=>{if(typeof s=="string")return{name:o,value:s,isSecret:!1};const l=n?.[i]?.[o]??"";return{name:o,value:l,isSecret:!0}}),servers:Object.entries(r[i].servers).map(([o,s])=>({apiId:o,value:s.value,variables:Object.entries(s.variables||{}).map(([l,c])=>({name:l,value:c}))})),state:pr.Normal})):this.default}async write(t){const a=await this.localStorageSecretsProvider.get(),r=a?JSON.parse(a):{},n=t.reduce((i,o)=>(o.name&&(i[o.name]={inputs:o.inputs.reduce((s,l)=>(l.isSecret&&r?(r[o.name]||(r[o.name]={}),r[o.name][l.name]=l.value,s[l.name]={provider:"local"}):s[l.name]=l.value,s),{}),servers:o.servers.reduce((s,l)=>(s[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},s),{})}),i),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),n&&this.storage.set("replay-environments.yaml",Id.dump(n))}}class H4a{constructor(t,a,r){this.storage=t,this.filePath=a,this.defaultValue=r}async parse(t){return JSON.parse(t)}stringify(t){return JSON.stringify(t)}async read(){const t=await this.storage.get(this.filePath);return t?await this.parse(t):this.defaultValue}async write(t){return this.storage.set(this.filePath,this.stringify(t))}}const V4a=(e,t)=>({data:e,version:t});class gK extends H4a{constructor(t,a,r,n){super(t,a,r),this.version=n}migrationMap={};migrate(t){if(!this.migrationMap[t.version])return this.defaultValue;const a=this.migrationMap[t.version](t);return a.version===this.version?a:this.migrate(a)}async parse(t){const a=JSON.parse(t);if(a.version!==this.version){const r=this.migrate(a);return await this.write(r.data),r.data}return a.data}stringify(t){return JSON.stringify(V4a(t,this.version))}}function F4a(e){return{data:{...e.data,tabs:e.data.tabs.map(t=>t.data.type===Kt.Step?{...t,data:{...t.data,draftStep:{...t.data.step,security:t.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:t)},version:2}}const aMe=2,G4a="tabs.json";class q4a extends gK{migrationMap={1:F4a};constructor(t){super(t,G4a,ep(zwe),aMe)}async parse(t){let a=JSON.parse(t);a.version!==aMe&&(a=this.migrate(a));const r=await Promise.all(a.data.tabs.map(async n=>{if(n.data.type===Kt.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await rMe(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await rMe(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await pw(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...a.data,tabs:r}}stringify(t){return super.stringify({...t,tabs:t.tabs.map(a=>a.data.type===Kt.Step?{...a,data:{...a.data,response:null}}:a.data.type===Kt.WorkflowRun?{...a,data:{...a.data,result:null}}:a)})}}async function rMe(e){return Promise.all(e.map(async t=>{const a={...t};if(t.files){const r=t.files.map(n=>n.absolutePath).filter(n=>n!==null);a.files=await _Pe(r)}return a}))}const J4a=1,W4a=1;class U4a{constructor(t,a){this.project=t,this.convertOperationToReplayValue=a,this.localStorageSecretsProvider=new zza(this.project.id),this.systemFilesStorage=this.isTauriApp?new Rwe(this.project.systemFilesDir):new Cwe(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new Rwe(this.project.userFilesDir):new Cwe(this.project.userFilesDir);const r=new fza;this.historyStorage=new gK(this.systemFilesStorage,"history.json",[],J4a),this.activeEnvironmentIdStorage=new gK(this.systemFilesStorage,"active_environment_id.json",yx,W4a),this.tabsStateStorage=new q4a(this.systemFilesStorage),this.environmentsStorage=new K4a(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new I4a(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Sza(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Sy();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const t=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),a=[],r=[],n=new Set;return await Promise.all(t.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=Id.load(o);typeof s=="object"&&s!==null&&(typeof s.openapi=="string"?a.push({uri:i,type:Bu.FS,content:s}):typeof s.arazzo=="string"&&(r.push({uri:i,type:Bu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&jwe(u);d&&p&&n.add(u)})))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:a,collectionFiles:r,apiUrls:n}}async loadApis(t){const a=[];return await Promise.all(Array.from(t).map(async r=>{let n="";try{const i=await Eu(q5e({proxyUrl:vwe,resolvedUrl:r,ignoreProxy:this.isTauriApp}));n=await i.text(),i.ok||console.error(`Error fetching API from ${r}:`,i.status,n)}catch(i){console.error(`Error fetching API from ${r}:`,i)}try{const i=Id.load(n);typeof i=="object"&&i!==null&&typeof i.openapi=="string"&&a.push({uri:r,type:Bu.WEB,content:i})}catch(i){console.error(`Error parsing YAML from ${r}:`,i)}})),a}async read(){const[t,a,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:t,activeEnvironmentId:a,tabsState:r,environments:n,apis:c,collections:u}}async update(t,a){switch(t.path[0]){case"history":this.historyStorage.write(a.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(a.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(a.tabsState.get());break;case"environments":this.environmentsStorage.write(a.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(t,a.apis.get());break;case"collections":await this.collectionsStorage.update(t,a.collections.get());break}}}function Z4a(e=!1){let t,a=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(a||r.path.length>0)return{isInitialized:!1};if(a=!0,!e){t=new U4a(n,i);const o=await t.read();r.merge(o)}return a=!1,{isInitialized:!0}}}),onSet(r,n,i){a||e||t.update(n,i)}})}function Q4a({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:ep(zwe),activeEnvironmentId:yx,environments:e||wwe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:Lu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const Y4a=v0t(Q4a(),y0t(uza({key:"replay-root-store"}),Z4a())),nMe=I.createContext(Y4a);function Ua(){const e=I.useContext(nMe);return Qpe(e)}function X4a(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const e6a=X4a(),t6a=I.createContext(e6a);function lp(){const e=I.useContext(t6a);return Qpe(e)}function a6a(e,t){const{apps:{apiId:a}}=Ua(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=lp();r.set(e?.corsProxyUrl??vwe),i.set(e?.mockServer),a.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!t),I.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const iMe=I.createContext({});function hw(){return I.useContext(iMe)||{}}const r6a="0.18.0-next.6",n6a={version:r6a};class i6a{client;_isInitialized=!1;constructor(){this.client=new iza}get isInitialized(){return this._isInitialized}init(t){if(this.isInitialized)return;const a={serviceName:"replay",serviceVersion:n6a.version,version:"1.0.0",tracerName:t?.tracerName||"desktop",collectorUrl:t?.collectorUrl||"",isProd:!0};this.client.init({otel:{...a,...t}}),this._isInitialized=!0}sendEvent(t,a){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(t,a)}catch(r){console.error("Failed to send telemetry event:",r)}}}const vK=new i6a;function Ea(){const{telemetry:e}=hw();return vK.isInitialized||vK.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl}),{sendEvent:(t,a)=>{vK.sendEvent(t,a)}}}const Wo=800;function Kf(e){"@babel/helpers - typeof";return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function o6a(e,t){if(Kf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var r=a.call(e,t);if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oMe(e){var t=o6a(e,"string");return Kf(t)=="symbol"?t:t+""}function mw(e,t,a){return(t=oMe(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function sMe(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function ta(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?sMe(Object(a),!0).forEach(function(r){mw(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):sMe(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function s6a(e){if(Array.isArray(e))return e}function l6a(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(a=a.call(e)).next,t===0){if(Object(a)!==a)return;l=!1}else for(;!(l=(r=i.call(a)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function yK(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function lMe(e,t){if(e){if(typeof e=="string")return yK(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?yK(e,t):void 0}}function c6a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11846
|
+
`};return H3a(s.getText(),u,h).map(function(g){return sp.replace(hr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function Df(){const{tabsState:e}=Ua(),t=I.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return zi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),a=I.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=t({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[t,e]),r=I.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((zi(s,Kt.Workflow)||zi(s,Kt.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),zi(s,Kt.Step)&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&zi(s,Kt.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:t,getExistingTab:a,handleIdChange:r}}function zi(e,t){return e.type===t}const $3=pPe({});let hPe=null;function mPe(e){hPe!==e&&(hPe=e,$3.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function fPe(e){const t=E3.create("stub.json","json",0,e),a=$3.parseJSONDocument(t);return{textDoc:t,jsonDoc:a}}const gPe=Ei.define({create(){},update(e){return e}}),vPe=e=>e.field(gPe,!1),TTa=({store:e,isResponse:t,apiOperation:a})=>{const r=ZK(e).data.get();let n=a?.body?.mediaTypes?.[Jo.JSON]?.schema;if(zi(r,Kt.Step)&&t){const i=r.response?.status;i&&(n=a?.responses?.[i]?.mediaTypes?.[Jo.JSON]?.schema)}return[gPe.init(()=>({schema:ep(n||{}),store:e}))]};function _Ta(){return async e=>{const{schema:t}=vPe(e.state)||{};if(!t)return[];mPe(t);const a=e.state.doc,{textDoc:r,jsonDoc:n}=fPe(a.toString());return(await $3.doValidation(r,n))?.map(i=>({from:iK(a,i.range.start),to:iK(a,i.range.end),message:i.message,severity:BTa[i.severity||3]}))}}const RTa=Ku.highest(By.of([{key:"Tab",run:e=>Gje(e)}]));function LTa(){return async function(e){const t={from:e.pos,to:e.pos,options:[],filter:!1},{schema:a}=vPe(e.state)||{};if(!a)return t;mPe(a);const r=e.state.doc,n=iK.bind(null,r),{textDoc:i,jsonDoc:o}=fPe(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await $3.doComplete(i,{line:l,character:c},o);if(!u)return t;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||ETa(d))return t;t.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:k=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,f=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let v=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const x=f===-1?0:f-v.length;k.dispatch({changes:{from:n(y.start),to:n(y.end),insert:v}});const j=v.length-(y.end.character-y.start.character);k.dispatch({selection:st.single(n(y.end)+j+x)})}}))||[];const p=e.state.wordAt(e.pos),h=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return h&&(t.options=t.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(h))),t}}const BTa={1:"error",2:"warning",3:"info",4:"hint"};function iK(e,t){return e.line(t.line+1).from+t.character}function ETa(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const yPe=fa.define();function tb(e){const t=e.activeEnvironmentId.get();return e.environments.find(a=>a.name.get()===t)?.get()||e.environments[0].get()}const oK=e=>Pn.fromClass(class{decorations;constructor(t){this.decorations=this.buildDecorations(t,e)}update(t){(t.docChanged||t.viewportChanged)&&(this.decorations=this.buildDecorations(t.view,e))}buildDecorations(t,a){const r=tb(a.store)?.inputs,n=[],i=Dt.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Dt.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of t.visibleRanges){const c=t.state.doc.sliceString(s,l),u=LM(c);for(const d of u){const p=s+d.start,h=s+d.end;if(!(p>=h))if(d.prefix==="inputs"){const g=RD(d.match),k=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:h,value:o(k)})}else n.push({from:p,to:h,value:i})}}return Dt.set(n,!0)}},{decorations:t=>t.decorations}),DTa=pPe({});function NTa(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.type=="string"&&typeof t.offset=="number"&&typeof t.length=="number"}function $Ta(e){const t=[];if(!e)return t;const a=[e];for(;a.length>0;){const r=a.pop();if(r.type==="property"){r.valueNode&&a.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&t.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)a.push(n)}return t}const ITa=e=>Pn.fromClass(class{decorations;constructor(t){this.decorations=this.buildDecorations(t,e)}update(t){(t.docChanged||t.viewportChanged)&&(this.decorations=this.buildDecorations(t.view,e))}buildDecorations(t,a){const r=t.state.doc.toString();let n;try{const u=E3.create("inmemory://model.json","json",0,r),d=DTa.parseJSONDocument(u)?.root;n=NTa(d)?d:void 0}catch{n=void 0}const i=tb(a.store)?.inputs,o=Dt.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Dt.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Dt.set([],!0);const c=$Ta(n);for(const u of c){if(!t.visibleRanges.some(k=>Math.max(k.from,u.from)<Math.min(k.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const h=t.state.doc.sliceString(d,p),g=LM(h);for(const k of g){const y=d+k.start,f=d+k.end;if(!(y>=f))if(k.prefix==="inputs"){const v=RD(k.match),x=!i?.find(j=>j.name===v)?.value;l.push({from:y,to:f,value:s(x)})}else l.push({from:y,to:f,value:o})}}return Dt.set(l,!0)}},{decorations:t=>t.decorations}),Xu={[Jo.Text]:{name:"Text",extensions:[wt.lineWrapping],stateExtensions:[oK]},[Jo.JSON]:{name:"JSON",extensions:[qCa(),wMa(_Ta(),{delay:0,needsRefresh:e=>e.transactions.some(t=>t.effects.some(a=>a.is(yPe)))}),rje.data.of({autocomplete:LTa()}),RTa],stateExtensions:[TTa,ITa]},[Jo.XML]:{name:"XML",extensions:[uMa()],stateExtensions:[oK]}},KTa={[Jo.Image]:{name:"Image",extensions:[],stateExtensions:[]}},HTa={[Jo.HTML]:{name:"HTML",extensions:[IPa()],stateExtensions:[oK]}},Qh={...Xu,...KTa,...HTa},bPe={[Jo.FormData]:{name:"form-data",extensions:void 0},[Jo["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},kPe={[Jo.Binary]:{name:"Binary",extensions:void 0}},Nf={...Xu,...bPe,...kPe},VTa=Object.keys(Xu),sK=Object.keys(bPe),xPe=Object.keys(kPe);function wPe(e=[],t){const a={};return e.forEach(r=>{const n=String(r[t]);a[n]||(a[n]=[]),a[n].push(r)}),a}const uw={active:!0,key:"",value:""};function Yh(e,t){return[...e.map(a=>({id:crypto.randomUUID(),key:a.name,value:t.initializeWithInputs?`$inputs.${a.name}`:a.example?String(a.example):"",active:t.initializeWithInputs?!0:!!a.example,in:a.in})),In(t.in)]}function dw(e,t){const[a]=e.split("?"),r=t.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${a}${r?`?${r}`:""}`}function uc(){return{id:crypto.randomUUID(),...uw}}function Ys(){return{id:crypto.randomUUID(),...uw,description:""}}function In(e){return{...uw,id:crypto.randomUUID(),in:e}}function $f(){return{id:crypto.randomUUID(),...uw,type:"text",files:null}}function lK(){return{id:crypto.randomUUID(),...uw,sendIn:$o.URL}}function cK(e){return e.map(t=>({id:crypto.randomUUID(),key:"",value:t,active:!0}))}function I3(e,t){return e.filter(a=>a.active&&a.value).map(({value:a})=>(t?$r(a,t):a).trim())}function Xh(e,t){const a=t.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(a.map(r=>[r.key,r])).values()):a}function zPe(e,t){return e.map(({value:a,...r})=>({...r,value:$r(a,t)}))}function FTa(e,t){if(!e.startsWith("$components.parameters."))return null;const a=e.replace("$components.parameters.","");return a&&t[a]||null}function Kn(e=[],t={}){const a=[];for(const r of e)if(yh(r)){const n=FTa(r.reference,t);n&&a.push({...n,active:r.active,value:r.value||n.value})}else a.push(r);return a}function em(e){return Object.entries(e).map(([t,a])=>({id:crypto.randomUUID(),key:"",value:t,active:!0,description:a}))}function GTa(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const SPe={documentedOAuth2Types:[],grantType:Ue.ClientCredentials,authRequestExtraParams:[uc()],tokenRequestExtraParams:[lK()],[Ue.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ys()],accessToken:""},[Ue.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ys()],accessToken:""},[Ue.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],codeVerifier:"",codeChallenge:"",accessToken:""},[Ue.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ys()],accessToken:""},[Ue.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ys()]}},qTa={securityType:qe.NoAuth,securitySchemeId:null,[qe.BasicAuth]:{username:"",password:""},[qe.JWT]:{token:""},[qe.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[qe.APIKey]:{location:yl.Header,name:"",key:""},[qe.OAuth2]:SPe,[qe.OpenIDConnect]:{...SPe,openIdConnectUrl:"",userInfoUrl:""}},uK="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",JTa={[Fo.SIMPLE]:{condition:"",type:Fo.SIMPLE},[Fo.REGEX]:{condition:"",type:Fo.REGEX,context:""},[Fo.JSONPATH]:{condition:"",type:Fo.JSONPATH,context:""},[Fo.XPATH]:{condition:"",type:Fo.XPATH,context:""}};function K3(){return structuredClone({type:Xi.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[$f()],"application/x-www-form-urlencoded":[$f()]},binary:null})}const WTa={method:"GET",url:"",security:[ed()],body:K3(),queryParameters:[uc()],headers:[uc()],cookies:[uc()],pathParameters:[uc()]};function jPe(){return structuredClone(WTa)}function ed(){return ep(qTa)}function UTa(e){return ep({id:crypto.randomUUID(),...JTa[e]})}function CPe(e,t,a){for(const r of a){const n=OPe(e,r),i=OPe(t,r);if(typeof n=="object"&&typeof i=="object"){if(!CPe(n,i,a))return!1}else if(n!==i)return!1}return!0}function OPe(e,t){const a=t.split("/");let r=e;for(const n of a)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function ZTa(e,t){return e.length===t.length&&e.sort().join()===t.sort().join()}function QTa(e,t){return e.every(a=>t.includes(a))}function YTa(e){switch(e){case"query":return yl.Query;case"cookie":return yl.Cookie;case"header":return yl.Header;default:return}}function XTa(e,t,a){const{security:r}=t,n=c0a(e);if(!a)return!1;const i=dK(a),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!ZTa(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),h=i.find(f=>f.securityType===u),g=!h||CPe(c,h,t4a(u,d)),k=e4a(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&h&&g&&k);l.push(!a.security?.length||y)}),l.includes(!1)}function e4a(e,t,a,r){if(t===qe.OAuth2&&(a===Ue.AuthorizationCode||a===Ue.AuthorizationCodeWithPkce||a===Ue.Implicit)){const n=e[qe.OAuth2][a]?.availableScopes,i=I3(e[qe.OAuth2][a]?.scopes,r);return QTa(i,n)}return!0}function t4a(e,t){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...a4a(t)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function a4a(e){return e===Ue.ClientCredentials?[`${qe.OAuth2}/${Ue.ClientCredentials}/tokenUrl`]:e===Ue.Password?[`${qe.OAuth2}/${Ue.Password}/tokenUrl`]:e===Ue.Implicit?[`${qe.OAuth2}/${Ue.Implicit}/authorizationUrl`]:e===Ue.AuthorizationCode?[`${qe.OAuth2}/${Ue.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCode}/authorizationUrl`]:e===Ue.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${Ue.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function r4a(e){return e.map(t=>{const a=t.map(r=>r.id).join("_");return t.map(r=>({...r,schemeId:a}))})}function n4a(e){const t=e.security||[],a=t.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(pK(o))}),{id:n,security:i}});return t.length?a:[]}function i4a(e,t){const a=e.security||[];return a?.length?TPe(a).map((r,n)=>pK(r)):[]}function dK(e){const t=(e.security||[])[0];return t?t.map(a=>pK(a)):[ed()]}function pK(e,t){const a={...ed(),securitySchemeId:e.id},r=H3(e);a.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(a[r].schemeName=e.id),r===qe.BasicAuth&&(a[qe.BasicAuth].username||(a[qe.BasicAuth].username=Cn(n+na.Username)),a[qe.BasicAuth].password||(a[qe.BasicAuth].password=Cn(n+na.Password))),r===qe.DigestAuth&&(a[qe.DigestAuth].username||(a[qe.DigestAuth].username=Cn(n+na.Username)),a[qe.DigestAuth].password||(a[qe.DigestAuth].password=Cn(n+na.Password))),r===qe.JWT&&!a[qe.JWT].token&&(a[qe.JWT].token=Cn(n+na.JWTToken)),r===qe.APIKey&&!a[qe.APIKey].key){a[qe.APIKey].name=e.name||"",a[qe.APIKey].key=Cn(n+na.APIKey);const i=YTa(e.in);i&&(a[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=fK(e),o=Cn(n+na.Token),s=a[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===Ue.AuthorizationCode&&!s[Ue.AuthorizationCode].accessToken&&(s[Ue.AuthorizationCode].accessToken=o,s[Ue.AuthorizationCode].clientId=Cn(n+na.ClientId),s[Ue.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCode].clientSecret=Cn(n+na.ClientSecret),s[Ue.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCode].scopes=[...em(e.flows?.authorizationCode?.scopes||{})||[],Ys()]),l===Ue.AuthorizationCodeWithPkce&&!s[Ue.AuthorizationCodeWithPkce].accessToken&&(s[Ue.AuthorizationCodeWithPkce].accessToken=o,s[Ue.AuthorizationCodeWithPkce].clientId=Cn(n+na.ClientId),s[Ue.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[Ue.AuthorizationCodeWithPkce].clientSecret=Cn(n+na.ClientSecret),s[Ue.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[Ue.AuthorizationCodeWithPkce].scopes=[...em(e.flows?.authorizationCode?.scopes||{}),Ys()]),l===Ue.ClientCredentials&&!s[Ue.ClientCredentials].accessToken&&(s[Ue.ClientCredentials].accessToken=o,s[Ue.ClientCredentials].clientId=Cn(n+na.ClientId),s[Ue.ClientCredentials].clientSecret=Cn(n+na.ClientSecret),s[Ue.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[Ue.ClientCredentials].scopes=[...em(e.flows?.clientCredentials?.scopes||{}),Ys()]),l===Ue.ClientCredentialsWithJwtAssertion&&!s[Ue.ClientCredentialsWithJwtAssertion].accessToken&&(s[Ue.ClientCredentialsWithJwtAssertion].accessToken=o,s[Ue.ClientCredentialsWithJwtAssertion].clientId=Cn(n+na.ClientId),s[Ue.ClientCredentialsWithJwtAssertion].clientAssertion=Cn(n+na.ClientAssertion),s[Ue.ClientCredentialsWithJwtAssertion].scopes=[...em(e.flows?.clientCredentials?.scopes||{}),Ys()]),l===Ue.Implicit&&!s[Ue.Implicit].accessToken&&(s[Ue.Implicit].accessToken=o,s[Ue.Implicit].clientId=Cn(n+na.ClientId),s[Ue.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[Ue.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[Ue.Implicit].scopes=[...em(e.flows?.implicit?.scopes||{}),Ys()]),l===Ue.Password&&!s[Ue.Password].accessToken&&(s[Ue.Password].accessToken=o,s[Ue.Password].clientId=Cn(n+na.ClientId),s[Ue.Password].clientSecret=Cn(n+na.ClientSecret),s[Ue.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[Ue.Password].scopes=[...em(e.flows?.password?.scopes||{}),Ys()])})}if(r===qe.OpenIDConnect){const i=Cn(n+na.Token),o=a[qe.OpenIDConnect];o[Ue.AuthorizationCode].accessToken||(o[Ue.AuthorizationCode].accessToken=i,o[Ue.AuthorizationCode].clientId=Cn(n+na.ClientId),o[Ue.AuthorizationCode].clientSecret=Cn(n+na.ClientSecret),o[Ue.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.AuthorizationCodeWithPkce].accessToken||(o[Ue.AuthorizationCodeWithPkce].accessToken=i,o[Ue.AuthorizationCodeWithPkce].clientId=Cn(n+na.ClientId),o[Ue.AuthorizationCodeWithPkce].clientSecret=Cn(n+na.ClientSecret),o[Ue.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[Ue.Implicit].accessToken||(o[Ue.Implicit].accessToken=i,o[Ue.Implicit].clientId=Cn(n+na.ClientId))}return a}function o4a(e,t="",a){const r=wPe(e.parameters,"in"),n=APe(e),i=dK(e),o=Yh(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:a,apiPath:{path:e.path,method:e.method},apiId:t,request:{pathParameters:Yh(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:dw(GTa(e.path),o),headers:Yh(r.header||[],{in:"header"}),queryParameters:o,cookies:Yh(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function hK(e){const t=wPe(e.parameters,"in"),a=APe(e),r=dK(e);return{parameters:{queryParameters:Yh(t.query||[],{in:"query"}),headers:Yh(t.header||[],{in:"header"}),cookies:Yh(t.cookie||[],{in:"cookie"}),pathParameters:Yh(t.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:a,security:r}}function APe(e){const t=e.body?.mediaTypes;if(!t||!Object.keys(t).length)return K3();const a=s4a(t,e),r=a?.name||"",n=!sK.includes(r)&&!xPe.includes(r),i=mK(a),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...K3(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...a&&{type:a.name},content:o,formData:{"multipart/form-data":MPe(t[Jo.FormData]),"application/x-www-form-urlencoded":MPe(t[Jo["application/x-www-form-urlencoded"]])}}}function PPe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((t,a)=>(t[a]={name:a,extensions:void 0},t),{}),...Nf}:Nf}function MPe(e){if(!e)return[$f()];if(!e.parameters)return[$f()];const t=e.parameters.map(a=>({id:crypto.randomUUID(),key:a.name,value:String(a.example)||"",active:!0,type:a.inputType,files:null}));return t.push($f()),t}function mK(e){const t=e?.examples;return Object.keys(t||{}).map(a=>{const r=t?.[a];return{name:Pm(r?.summary)?r?.summary:r?.summary?.raw||a,key:a,value:t?.[a].value}})}function s4a(e,t){const a=PPe(t),r=Object.keys(e).find(n=>!!a[n]);return r?e[r]:null}function l4a(e){return!e?.security?.length||!e?[]:i4a(e)}function TPe(e){const t=new Set;return e.flat().filter(a=>t.has(a.id)?!1:(t.add(a.id),!0))}function H3(e){if(e.type==="http"){if(e.scheme==="bearer")return qe.JWT;if(e.scheme==="basic")return qe.BasicAuth;if(e.scheme==="digest")return qe.DigestAuth}else{if(e.type==="apiKey")return qe.APIKey;if(e.type==="oauth2")return qe.OAuth2;if(e.type==="openIdConnect")return qe.OpenIDConnect}return qe.NoAuth}function c4a(e,t){if(e==="clientCredentials"&&t&&"x-assertionType"in t&&t["x-assertionType"]===uK)return Ue.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&t&&"x-usePkce"in t&&t["x-usePkce"])return Ue.AuthorizationCodeWithPkce;switch(e){case"implicit":return Ue.Implicit;case"password":return Ue.Password;case"clientCredentials":return Ue.ClientCredentials;case"authorizationCode":return Ue.AuthorizationCode;default:return Ue.AuthorizationCode}}function u4a(e,t){const a=e?.security;if(!a?.length)return[];const r=r4a(a).flat().filter(n=>n.schemeId===t).find(n=>H3(n)===qe.OAuth2);return fK(r)}function fK(e){return Object.entries(e?.flows||{}).map(([t,a])=>c4a(t,a)).filter(Boolean)}async function pw(e){try{const t=await bza(e),a=await Awe(e);return{absolutePath:e,file:new File([t],a)}}catch(t){return console.error("Failed to init replay file",t),null}}async function _Pe(e){return(await Promise.allSettled(e.map(t=>pw(t)))).map(t=>t.status==="fulfilled"?t.value:null).filter(t=>t!==null)}async function d4a(e,t,a,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await p4a({projectPath:r,apiUrl:l.url,collectionId:t})}))),s={inputs:e.components?.inputs||{},parameters:Object.fromEntries(Object.entries(e.components?.parameters||{}).map(([l,c])=>[l,{...c,key:c.name,value:c.value,id:crypto.randomUUID(),active:!0}]))};return{...e,id:t,srcType:a,state:pr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:pr.Normal,parameters:VPe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:KPe(l.outputs),security:NPe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=VPe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=dw(d.url,u.queryParameters.filter(Xpe)));const p=h4a(c,o,n);let h;if(p&&i){const k=n?.find(y=>y.id===p.apiId);h=i(p.path,p.method,k)}delete c.operationId,delete c["x-operation"];const g=await b4a(c.requestBody,r);return{...c,state:pr.Normal,parameters:u,outputs:KPe(c.outputs),successCriteria:c.successCriteria?.map(k=>({...k,type:k.type??Fo.SIMPLE}))||[],requestBody:g,xOperation:d,security:NPe(c["x-security"],h),operation:p}}))})))}}async function p4a({projectPath:e,apiUrl:t,collectionId:a}){if(jwe(t))return t;if(await Zn.isAbsolute(t))return await Zn.relative(e,t);const r=await Zn.resolve(await Zn.join(e,a,"..",t));return await Zn.relative(e,r)}function h4a(e,t,a){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=LPe({operationPath:e.operationPath,parsedSourceDescriptions:t}),{operationId:o,apiId:s}=m4a({operationId:e.operationId,parsedSourceDescriptions:t}),l=s||i||t[0]?.apiId||"",c=a?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=x4a(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function m4a({operationId:e,parsedSourceDescriptions:t}){if(!e)return{operationId:"",apiId:null};const a=e.split(".");if(a.length===1)return{operationId:e,apiId:t[0]?.apiId??""};const[,r,n=""]=a,i=t.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function RPe(e){return"reference"in e&&typeof e.reference=="string"}function LPe({operationPath:e,parsedSourceDescriptions:t}){if(!e)return{apiId:null,path:"",method:""};try{const a=e.split("#"),r=a.length>1?a[1]:a[0],n=a.length>1?a[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=t.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:qi.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function f4a(e){switch(e.type){case"apiKey":return qe.APIKey;case"oauth2":return qe.OAuth2;case"openIdConnect":return qe.OpenIDConnect;case"http":return e.scheme==="basic"?qe.BasicAuth:e.scheme==="digest"?qe.DigestAuth:e.scheme==="bearer"?qe.JWT:qe.NoAuth;default:return qe.NoAuth}}function BPe(e,t){const a={clientCredentials:Ue.ClientCredentials,authorizationCode:Ue.AuthorizationCode,implicit:Ue.Implicit,password:Ue.Password,clientCredentialsWithJwtAssertion:Ue.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:Ue.AuthorizationCodeWithPkce};return e==="clientCredentials"&&t["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?Ue.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&t["x-usePkce"]?Ue.AuthorizationCodeWithPkce:a[e]??null}function g4a(e){return{query:yl.Query,header:yl.Header,cookie:yl.Cookie}[e.toLowerCase()]||yl.Header}function v4a(e){return{body:$o.Body,header:$o.Header,url:$o.URL}[e.toLowerCase()]||$o.URL}function EPe(e,t,a){return Object.keys(e).reduce((r,n)=>{const i=BPe(n,e[n]);if(!i)return r;switch(i){case Ue.ClientCredentials:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.AuthorizationCode:r[i]={...a[i],clientId:t.clientId??"",clientSecret:t.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Implicit:r[i]={...a[i],clientId:t.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:If(e[n].availableScopes),scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:t.accessToken??""};break;case Ue.Password:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",username:t.username??"",password:t.password??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.ClientCredentialsWithJwtAssertion:r[i]={...a[i],clientAssertion:t.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break;case Ue.AuthorizationCodeWithPkce:r[i]={...a[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:t.callbackUrl??"",availableScopes:If(e[n].availableScopes),scopes:If(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:t.codeVerifier??"",codeChallenge:t.codeChallenge??"",clientId:t.clientId??"",clientSecret:t.clientSecret??"",accessToken:t.accessToken??""};break}return r},a)}function DPe(e,t,a){const r={...ed(),securityType:e},n=Object.keys(t.flows||{})[0],i=BPe(n,t.flows?.[n])??Ue.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:a.username,password:a.password,schemeName:t.id}};case qe.JWT:return{...r,[qe.JWT]:{token:a.token,schemeName:t.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:a.username,password:a.password,schemeName:t.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:g4a(t.in),name:t.name,key:a.apiKey,schemeName:t.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...EPe(t.flows||{},a||{},r[qe.OAuth2]),authRequestExtraParams:$Pe(a.authRequestExtraParams),tokenRequestExtraParams:IPe(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...EPe(a.flows||{},a||{},r[qe.OpenIDConnect]),openIdConnectUrl:a.openIdConnectUrl,userInfoUrl:a.userInfoUrl,authRequestExtraParams:$Pe(a.authRequestExtraParams),tokenRequestExtraParams:IPe(a.tokenRequestExtraParams),grantType:i,schemeName:t.id}};default:return r}}function y4a(e,t){return[...e.map(a=>{if("scheme"in a){const n=f4a(a.scheme);return DPe(n,a.scheme,a.values)}const r=t.find(n=>n.id===a.schemeName);if(r){const n=H3(r),i=DPe(n,r,a.values);return i.securitySchemeId=r.id,i}return ed()})]}function NPe(e=[],t){const a=TPe(t?.security||[]);return e.length?y4a(e,a):[ed()]}function If(e,t){const a=em(e||{}),r=em(t||{});return[...a,...r,Ys()]}function $Pe(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0})).concat(uc())}function IPe(e){return(e||[]).map(t=>({id:crypto.randomUUID(),key:t.key??"",value:t.value??"",active:t.active??!0,sendIn:v4a(t.in)})).concat(lK())}function KPe(e){if(!e)return[uc()];const t=[];for(const a in e)t.push({id:crypto.randomUUID(),key:a,value:e[a],active:!0});return t.push(uc()),t}const V3={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function HPe(e,t){const a="$components.parameters.";if(e.reference.startsWith(a)){const r=e.reference.replace(a,"");return t?.[r]}}function VPe(e,t,a){if(!e&&!t)return{pathParameters:[In("path")],queryParameters:[In("query")],headers:[In("header")],cookies:[In("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(RPe(n)){const i=HPe(n,a),o=V3[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[V3[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(t)for(const n of t)if(RPe(n)){const i=HPe(n,a),o=V3[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[V3[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(In("path")),r.queryParameters.push(In("query")),r.headers.push(In("header")),r.cookies.push(In("cookie")),r}async function b4a(e,t){const a=jPe().body;if(!e)return a;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...a,type:e.contentType,formData:await k4a(e,t)};case"application/octet-stream":const r=e.payload?await qPe(e.payload,t):[],n=r.length>0?await pw(r[0]):null;return{...a,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...a,type:e.contentType,content:GPe(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...a,type:o,content:i?e.payload:GPe(e.payload)}}}}async function FPe(e,t,a,r){const n=await qPe(t,r),i=n.length>0||Array.isArray(t),o=i?await _Pe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":t,type:i?"file":"text",active:a,files:o}}async function k4a(e,t){const a=jPe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>FPe(o,s,!0,t))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>FPe(o,s,!1,t))):[];return{...a,[r]:[...n,...i,$f()]}}function GPe(e){return e?JSON.stringify(e,null,2):""}function x4a(e,t){for(const a of Object.keys(t.paths)){const r=t.paths[a];for(const n of Object.keys(r)){const i=n.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(i)&&r[i]?.operationId===e)return{method:i,path:a}}}return null}async function qPe(e,t){return Array.isArray(e)?(await Promise.all(e.map(a=>JPe(a,t)))).flat():typeof e=="string"?await JPe(e,t):[]}async function JPe(e,t){const a=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(a));return Promise.all(r.map(n=>w4a(n[1],t)))}async function w4a(e,t){return await Zn.isAbsolute(e)?e:await Zn.resolve(await Zn.join(t,e))}const Os=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},WPe=(e,t,a)=>{if(!e.properties)return e;const r=e.properties[t],n=Os(r);return{...e,properties:{...e.properties,[t]:{...n,...a}}}},z4a=(e,t,a)=>{if(!e.properties||t===a||!a.trim())return null;const r={...e.properties};return r[a]?null:(r[a]=r[t],delete r[t],{...e,properties:r})},S4a=(e,t)=>{if(!e.properties)return e;const a={...e.properties};return delete a[t],{...e,properties:a}},j4a=(e,t,a={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[t]:a}}};function UPe(e){const t=Object.assign({},...(e||[]).filter(({key:a,active:r})=>a&&r).map(a=>({[a.key]:a.value})));if(Object.keys(t).length!==0)return t}function ZPe(e){if(!e)return{};const t={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},a=[],r=[];return Object.keys(t).forEach(n=>{const i=n;e[i].forEach(o=>{if(yh(o)){const s={reference:o.reference,value:o.value||void 0};o.active?a.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:t[i],value:o.value};o.active?a.push(s):r.push(s)}})}),{parameters:a.length>0?a:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function C4a(e){const t=e?.map(a=>({condition:a.condition,context:a.context,type:a.type==Fo.SIMPLE?void 0:a.type}));if(t?.length!==0)return t}function O4a(e){if(!(!e||e.length===0))return[...e]}async function QPe(e,t){return e.absolutePath?`$file('${await Zn.relative(t,e.absolutePath)}')`:null}async function A4a(e,t){const{type:a,value:r,files:n}=e;switch(a){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>QPe(o,t)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function P4a(e,t){const a=e.type,r=e.formData[a],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await A4a(o,t);l?n[s]=c:i[s]=c})),{payload:Object.keys(n).length>0?n:void 0,"x-replay-disabled-payload":Object.keys(i).length>0?i:void 0}}function M4a(e){if(!e)return e;try{const t=JSON.parse(e);return typeof t=="object"?t:e}catch{return e}}async function T4a(e,t){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await P4a(e,t)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await QPe(e.binary,t):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:M4a(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function _4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function R4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function L4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function B4a(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function E4a(e){const{flows:t,values:a}=eMe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:t}},values:{...a,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:YPe(e.authRequestExtraParams),tokenRequestExtraParams:XPe(e.tokenRequestExtraParams)}}}function D4a(e){const{flows:t,values:a}=eMe(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:t}},values:{...a,authRequestExtraParams:YPe(e.authRequestExtraParams),tokenRequestExtraParams:XPe(e.tokenRequestExtraParams)}}}function ab(e){const t={},a={};return e.forEach(r=>{r.value&&(r.active?t[r.value]=r.description:a[r.value]=r.description)}),{scopes:t,"x-replay-disabled-scopes":Object.keys(a).length>0?a:void 0}}function YPe(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active}))}function XPe(e){return e.filter(t=>t.value||t.key).map(t=>({key:t.key,value:t.value,active:t.active,in:t.sendIn.toLowerCase()}))}function eMe(e){let t;switch(e.grantType){case Ue.ClientCredentials:return t=e[Ue.ClientCredentials],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...ab(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken}};case Ue.Implicit:return t=e[Ue.Implicit],{flows:{implicit:{authorizationUrl:t.authorizationUrl,...ab(t.scopes)}},values:{clientId:t.clientId,accessToken:t.accessToken,callbackUrl:t.callbackUrl}};case Ue.Password:return t=e[Ue.Password],{flows:{password:{tokenUrl:t.tokenUrl,...ab(t.scopes)}},values:{clientId:t.clientId,clientSecret:t.clientSecret,username:t.username,password:t.password,accessToken:t.accessToken}};case Ue.AuthorizationCode:return t=e[Ue.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...ab(t.scopes)}},values:{accessToken:t.accessToken,clientId:t.clientId,callbackUrl:t.callbackUrl}};case Ue.ClientCredentialsWithJwtAssertion:return t=e[Ue.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:t.tokenUrl,...ab(t.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:t.clientId,clientAssertion:t.clientAssertion,accessToken:t.accessToken}};case Ue.AuthorizationCodeWithPkce:return t=e[Ue.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:t.tokenUrl,authorizationUrl:t.authorizationUrl,...ab(t.scopes),"x-usePkce":!0}},values:{clientId:t.clientId,clientSecret:t.clientSecret,accessToken:t.accessToken,codeVerifier:t.codeVerifier,codeChallenge:t.codeChallenge,callbackUrl:t.callbackUrl}}}}function tMe(e){const t=e.map(a=>{switch(a.securityType){case qe.OpenIDConnect:{const r=a[qe.OpenIDConnect];return E4a(r)}case qe.OAuth2:{const r=a[qe.OAuth2];return D4a(r)}case qe.APIKey:{const r=a[qe.APIKey];return R4a(r)}case qe.BasicAuth:{const r=a[qe.BasicAuth];return _4a(r)}case qe.DigestAuth:{const r=a[qe.DigestAuth];return B4a(r)}case qe.JWT:{const r=a[qe.JWT];return L4a(r)}default:return null}}).filter(a=>a!==null);return{"x-security":t.length?t:void 0}}function N4a(e){const{inputs:t,parameters:a,...r}=e;let n=r;return Object.keys(t).length&&(n.inputs=t),Object.keys(a).length&&(n.parameters=Object.fromEntries(Object.entries(a).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function $4a(e,t){const{id:a,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:N4a(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:h,steps:g,inputs:k,...y})=>({...y,dependsOn:O4a(d),outputs:UPe(p),inputs:k?Os(k):void 0,...tMe(u),...ZPe(c),steps:await Promise.all(g.map(async({parameters:f,security:v,operation:x,requestBody:j,successCriteria:z,outputs:S,state:C,xOperation:M,...T})=>{const B={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(x){const q=e.sourceDescriptions.find(({apiId:$})=>$===x.apiId)||e.sourceDescriptions[0];if(x.operationId){const $=e.sourceDescriptions.length<=1;B.operationId=$?x.operationId:`$sourceDescriptions.${q.name}.${x.operationId}`}else B.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${qi.escape(x.path)}/${x.method}`}else M&&(B["x-operation"]={...M,url:M.url.split("?")[0]});return{...T,...B,...tMe(v),...ZPe(f),requestBody:await T4a(j,t),successCriteria:C4a(z),outputs:UPe(S)}}))})))}}}class I4a extends Lwe{constructor(t,a){super(t),this.convertOperationToReplayValue=a}parse(t,a){return d4a(t.content,t.uri,t.type,this.storage.baseDir,a,this.convertOperationToReplayValue)}async stringify(t){const{arazzoObject:a}=await $4a(t,this.storage.baseDir);return await Zn.extname(t.id)===".json"?JSON.stringify(a,null,2):Id.dump(a)}}class K4a{constructor(t,a){this.storage=t,this.localStorageSecretsProvider=a}default=[];async read(){const t=await this.storage.get("replay-environments.yaml"),a=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!t)return this.default;try{r=Id.load(t),n=a?JSON.parse(a):null}catch(i){return console.error("Failed to parse environments file",i),this.default}return r?Object.keys(r).filter(i=>i!=="version").map(i=>({name:i,inputs:Object.entries(r[i].inputs).map(([o,s])=>{if(typeof s=="string")return{name:o,value:s,isSecret:!1};const l=n?.[i]?.[o]??"";return{name:o,value:l,isSecret:!0}}),servers:Object.entries(r[i].servers).map(([o,s])=>({apiId:o,value:s.value,variables:Object.entries(s.variables||{}).map(([l,c])=>({name:l,value:c}))})),state:pr.Normal})):this.default}async write(t){const a=await this.localStorageSecretsProvider.get(),r=a?JSON.parse(a):{},n=t.reduce((i,o)=>(o.name&&(i[o.name]={inputs:o.inputs.reduce((s,l)=>(l.isSecret&&r?(r[o.name]||(r[o.name]={}),r[o.name][l.name]=l.value,s[l.name]={provider:"local"}):s[l.name]=l.value,s),{}),servers:o.servers.reduce((s,l)=>(s[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},s),{})}),i),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),n&&this.storage.set("replay-environments.yaml",Id.dump(n))}}class H4a{constructor(t,a,r){this.storage=t,this.filePath=a,this.defaultValue=r}async parse(t){return JSON.parse(t)}stringify(t){return JSON.stringify(t)}async read(){const t=await this.storage.get(this.filePath);return t?await this.parse(t):this.defaultValue}async write(t){return this.storage.set(this.filePath,this.stringify(t))}}const V4a=(e,t)=>({data:e,version:t});class gK extends H4a{constructor(t,a,r,n){super(t,a,r),this.version=n}migrationMap={};migrate(t){if(!this.migrationMap[t.version])return this.defaultValue;const a=this.migrationMap[t.version](t);return a.version===this.version?a:this.migrate(a)}async parse(t){const a=JSON.parse(t);if(a.version!==this.version){const r=this.migrate(a);return await this.write(r.data),r.data}return a.data}stringify(t){return JSON.stringify(V4a(t,this.version))}}function F4a(e){return{data:{...e.data,tabs:e.data.tabs.map(t=>t.data.type===Kt.Step?{...t,data:{...t.data,draftStep:{...t.data.step,security:t.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:t)},version:2}}const aMe=2,G4a="tabs.json";class q4a extends gK{migrationMap={1:F4a};constructor(t){super(t,G4a,ep(zwe),aMe)}async parse(t){let a=JSON.parse(t);a.version!==aMe&&(a=this.migrate(a));const r=await Promise.all(a.data.tabs.map(async n=>{if(n.data.type===Kt.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await rMe(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await rMe(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await pw(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...a.data,tabs:r}}stringify(t){return super.stringify({...t,tabs:t.tabs.map(a=>a.data.type===Kt.Step?{...a,data:{...a.data,response:null}}:a.data.type===Kt.WorkflowRun?{...a,data:{...a.data,result:null}}:a)})}}async function rMe(e){return Promise.all(e.map(async t=>{const a={...t};if(t.files){const r=t.files.map(n=>n.absolutePath).filter(n=>n!==null);a.files=await _Pe(r)}return a}))}const J4a=1,W4a=1;class U4a{constructor(t,a){this.project=t,this.convertOperationToReplayValue=a,this.localStorageSecretsProvider=new zza(this.project.id),this.systemFilesStorage=this.isTauriApp?new Rwe(this.project.systemFilesDir):new Cwe(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new Rwe(this.project.userFilesDir):new Cwe(this.project.userFilesDir);const r=new fza;this.historyStorage=new gK(this.systemFilesStorage,"history.json",[],J4a),this.activeEnvironmentIdStorage=new gK(this.systemFilesStorage,"active_environment_id.json",yx,W4a),this.tabsStateStorage=new q4a(this.systemFilesStorage),this.environmentsStorage=new K4a(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new I4a(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Sza(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Sy();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const t=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),a=[],r=[],n=new Set;return await Promise.all(t.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=Id.load(o);typeof s=="object"&&s!==null&&(typeof s.openapi=="string"?a.push({uri:i,type:Bu.FS,content:s}):typeof s.arazzo=="string"&&(r.push({uri:i,type:Bu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&jwe(u);d&&p&&n.add(u)})))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:a,collectionFiles:r,apiUrls:n}}async loadApis(t){const a=[];return await Promise.all(Array.from(t).map(async r=>{let n="";try{const i=await Eu(q5e({proxyUrl:vwe,resolvedUrl:r,ignoreProxy:this.isTauriApp}));n=await i.text(),i.ok||console.error(`Error fetching API from ${r}:`,i.status,n)}catch(i){console.error(`Error fetching API from ${r}:`,i)}try{const i=Id.load(n);typeof i=="object"&&i!==null&&typeof i.openapi=="string"&&a.push({uri:r,type:Bu.WEB,content:i})}catch(i){console.error(`Error parsing YAML from ${r}:`,i)}})),a}async read(){const[t,a,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:t,activeEnvironmentId:a,tabsState:r,environments:n,apis:c,collections:u}}async update(t,a){switch(t.path[0]){case"history":this.historyStorage.write(a.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(a.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(a.tabsState.get());break;case"environments":this.environmentsStorage.write(a.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(t,a.apis.get());break;case"collections":await this.collectionsStorage.update(t,a.collections.get());break}}}function Z4a(e=!1){let t,a=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(a||r.path.length>0)return{isInitialized:!1};if(a=!0,!e){t=new U4a(n,i);const o=await t.read();r.merge(o)}return a=!1,{isInitialized:!0}}}),onSet(r,n,i){a||e||t.update(n,i)}})}function Q4a({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:ep(zwe),activeEnvironmentId:yx,environments:e||wwe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:Lu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const Y4a=v0t(Q4a(),y0t(uza({key:"replay-root-store"}),Z4a())),nMe=I.createContext(Y4a);function Ua(){const e=I.useContext(nMe);return Qpe(e)}function X4a(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const e6a=X4a(),t6a=I.createContext(e6a);function lp(){const e=I.useContext(t6a);return Qpe(e)}function a6a(e,t){const{apps:{apiId:a}}=Ua(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=lp();r.set(e?.corsProxyUrl??vwe),i.set(e?.mockServer),a.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!t),I.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const iMe=I.createContext({});function hw(){return I.useContext(iMe)||{}}const r6a="0.18.0-next.7",n6a={version:r6a};class i6a{client;_isInitialized=!1;constructor(){this.client=new iza}get isInitialized(){return this._isInitialized}init(t){if(this.isInitialized)return;const a={serviceName:"replay",serviceVersion:n6a.version,version:"1.0.0",tracerName:t?.tracerName||"desktop",collectorUrl:t?.collectorUrl||"",isProd:!0};this.client.init({otel:{...a,...t}}),this._isInitialized=!0}sendEvent(t,a){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(t,a)}catch(r){console.error("Failed to send telemetry event:",r)}}}const vK=new i6a;function Ea(){const{telemetry:e}=hw();return vK.isInitialized||vK.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl}),{sendEvent:(t,a)=>{vK.sendEvent(t,a)}}}const Wo=800;function Kf(e){"@babel/helpers - typeof";return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function o6a(e,t){if(Kf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var r=a.call(e,t);if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oMe(e){var t=o6a(e,"string");return Kf(t)=="symbol"?t:t+""}function mw(e,t,a){return(t=oMe(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function sMe(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,r)}return a}function ta(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?sMe(Object(a),!0).forEach(function(r){mw(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):sMe(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function s6a(e){if(Array.isArray(e))return e}function l6a(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(a=a.call(e)).next,t===0){if(Object(a)!==a)return;l=!1}else for(;!(l=(r=i.call(a)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&a.return!=null&&(o=a.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function yK(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function lMe(e,t){if(e){if(typeof e=="string")return yK(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?yK(e,t):void 0}}function c6a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11874
11847
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cp(e,t){return s6a(e)||l6a(e,t)||lMe(e,t)||c6a()}function u6a(e,t){if(e==null)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;a[r]=e[r]}return a}function up(e,t){if(e==null)return{};var a,r,n=u6a(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var d6a=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function p6a(e){var t=e.defaultInputValue,a=t===void 0?"":t,r=e.defaultMenuIsOpen,n=r===void 0?!1:r,i=e.defaultValue,o=i===void 0?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,h=e.value,g=up(e,d6a),k=I.useState(s!==void 0?s:a),y=cp(k,2),f=y[0],v=y[1],x=I.useState(l!==void 0?l:n),j=cp(x,2),z=j[0],S=j[1],C=I.useState(h!==void 0?h:o),M=cp(C,2),T=M[0],B=M[1],q=I.useCallback(function(oe,me){typeof c=="function"&&c(oe,me),B(oe)},[c]),$=I.useCallback(function(oe,me){var K;typeof u=="function"&&(K=u(oe,me)),v(K!==void 0?K:oe)},[u]),W=I.useCallback(function(){typeof p=="function"&&p(),S(!0)},[p]),H=I.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),ee=s!==void 0?s:f,ae=l!==void 0?l:z,ce=h!==void 0?h:T;return ta(ta({},g),{},{inputValue:ee,menuIsOpen:ae,onChange:q,onInputChange:$,onMenuClose:H,onMenuOpen:W,value:ce})}function sa(){return sa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},sa.apply(null,arguments)}function h6a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cMe(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oMe(r.key),r)}}function m6a(e,t,a){return t&&cMe(e.prototype,t),a&&cMe(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function bK(e,t){return bK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,r){return a.__proto__=r,a},bK(e,t)}function f6a(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bK(e,t)}function F3(e){return F3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},F3(e)}function uMe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uMe=function(){return!!e})()}function g6a(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v6a(e,t){if(t&&(Kf(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g6a(e)}function y6a(e){var t=uMe();return function(){var a,r=F3(e);if(t){var n=F3(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return v6a(this,a)}}function b6a(e){if(Array.isArray(e))return yK(e)}function k6a(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x6a(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
11875
11848
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kK(e){return b6a(e)||k6a(e)||lMe(e)||x6a()}function w6a(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function z6a(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var S6a=(function(){function e(a){var r=this;this._insertTag=function(n){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(n,i),r.tags.push(n)},this.isSpeedy=a.speedy===void 0?!0:a.speedy,this.tags=[],this.ctr=0,this.nonce=a.nonce,this.key=a.key,this.container=a.container,this.prepend=a.prepend,this.insertionPoint=a.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(z6a(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=w6a(r);try{n.insertRule(a,n.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){return a.parentNode&&a.parentNode.removeChild(a)}),this.tags=[],this.ctr=0},e})(),Uo="-ms-",G3="-moz-",Sr="-webkit-",dMe="comm",xK="rule",wK="decl",j6a="@import",pMe="@keyframes",C6a=Math.abs,q3=String.fromCharCode,O6a=Object.assign;function A6a(e,t){return go(e,0)^45?(((t<<2^go(e,0))<<2^go(e,1))<<2^go(e,2))<<2^go(e,3):0}function hMe(e){return e.trim()}function P6a(e,t){return(e=t.exec(e))?e[0]:e}function Tr(e,t,a){return e.replace(t,a)}function zK(e,t){return e.indexOf(t)}function go(e,t){return e.charCodeAt(t)|0}function fw(e,t,a){return e.slice(t,a)}function td(e){return e.length}function SK(e){return e.length}function J3(e,t){return t.push(e),e}function M6a(e,t){return e.map(t).join("")}var W3=1,rb=1,mMe=0,Xs=0,Si=0,nb="";function U3(e,t,a,r,n,i,o){return{value:e,root:t,parent:a,type:r,props:n,children:i,line:W3,column:rb,length:o,return:""}}function gw(e,t){return O6a(U3("",null,null,"",null,null,0),e,{length:-e.length},t)}function T6a(){return Si}function _6a(){return Si=Xs>0?go(nb,--Xs):0,rb--,Si===10&&(rb=1,W3--),Si}function Ml(){return Si=Xs<mMe?go(nb,Xs++):0,rb++,Si===10&&(rb=1,W3++),Si}function ad(){return go(nb,Xs)}function Z3(){return Xs}function vw(e,t){return fw(nb,e,t)}function yw(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function fMe(e){return W3=rb=1,mMe=td(nb=e),Xs=0,[]}function gMe(e){return nb="",e}function Q3(e){return hMe(vw(Xs-1,jK(e===91?e+2:e===40?e+1:e)))}function R6a(e){for(;(Si=ad())&&Si<33;)Ml();return yw(e)>2||yw(Si)>3?"":" "}function L6a(e,t){for(;--t&&Ml()&&!(Si<48||Si>102||Si>57&&Si<65||Si>70&&Si<97););return vw(e,Z3()+(t<6&&ad()==32&&Ml()==32))}function jK(e){for(;Ml();)switch(Si){case e:return Xs;case 34:case 39:e!==34&&e!==39&&jK(Si);break;case 40:e===41&&jK(e);break;case 92:Ml();break}return Xs}function B6a(e,t){for(;Ml()&&e+Si!==57&&!(e+Si===84&&ad()===47););return"/*"+vw(t,Xs-1)+"*"+q3(e===47?e:Ml())}function E6a(e){for(;!yw(ad());)Ml();return vw(e,Xs)}function D6a(e){return gMe(Y3("",null,null,null,[""],e=fMe(e),0,[0],e))}function Y3(e,t,a,r,n,i,o,s,l){for(var c=0,u=0,d=o,p=0,h=0,g=0,k=1,y=1,f=1,v=0,x="",j=n,z=i,S=r,C=x;y;)switch(g=v,v=Ml()){case 40:if(g!=108&&go(C,d-1)==58){zK(C+=Tr(Q3(v),"&","&\f"),"&\f")!=-1&&(f=-1);break}case 34:case 39:case 91:C+=Q3(v);break;case 9:case 10:case 13:case 32:C+=R6a(g);break;case 92:C+=L6a(Z3()-1,7);continue;case 47:switch(ad()){case 42:case 47:J3(N6a(B6a(Ml(),Z3()),t,a),l);break;default:C+="/"}break;case 123*k:s[c++]=td(C)*f;case 125*k:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:h>0&&td(C)-d&&J3(h>32?yMe(C+";",r,a,d-1):yMe(Tr(C," ","")+";",r,a,d-2),l);break;case 59:C+=";";default:if(J3(S=vMe(C,t,a,c,u,n,s,x,j=[],z=[],d),i),v===123)if(u===0)Y3(C,t,S,S,j,i,d,s,z);else switch(p===99&&go(C,3)===110?100:p){case 100:case 109:case 115:Y3(e,S,S,r&&J3(vMe(e,S,S,0,0,n,s,x,n,j=[],d),z),n,z,d,s,r?j:z);break;default:Y3(C,S,S,S,[""],z,0,s,z)}}c=u=h=0,k=f=1,x=C="",d=o;break;case 58:d=1+td(C),h=g;default:if(k<1){if(v==123)--k;else if(v==125&&k++==0&&_6a()==125)continue}switch(C+=q3(v),v*k){case 38:f=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(td(C)-1)*f,f=1;break;case 64:ad()===45&&(C+=Q3(Ml())),p=ad(),u=d=td(x=C+=E6a(Z3())),v++;break;case 45:g===45&&td(C)==2&&(k=0)}}return i}function vMe(e,t,a,r,n,i,o,s,l,c,u){for(var d=n-1,p=n===0?i:[""],h=SK(p),g=0,k=0,y=0;g<r;++g)for(var f=0,v=fw(e,d+1,d=C6a(k=o[g])),x=e;f<h;++f)(x=hMe(k>0?p[f]+" "+v:Tr(v,/&\f/g,p[f])))&&(l[y++]=x);return U3(e,t,a,n===0?xK:s,l,c,u)}function N6a(e,t,a){return U3(e,t,a,dMe,q3(T6a()),fw(e,2,-2),0)}function yMe(e,t,a,r){return U3(e,t,a,wK,fw(e,0,r),fw(e,r+1,-1),r)}function ib(e,t){for(var a="",r=SK(e),n=0;n<r;n++)a+=t(e[n],n,e,t)||"";return a}function $6a(e,t,a,r){switch(e.type){case j6a:case wK:return e.return=e.return||e.value;case dMe:return"";case pMe:return e.return=e.value+"{"+ib(e.children,r)+"}";case xK:e.value=e.props.join(",")}return td(a=ib(e.children,r))?e.return=e.value+"{"+a+"}":""}function I6a(e){var t=SK(e);return function(a,r,n,i){for(var o="",s=0;s<t;s++)o+=e[s](a,r,n,i)||"";return o}}function K6a(e){return function(t){t.root||(t=t.return)&&e(t)}}function H6a(e){var t=Object.create(null);return function(a){return t[a]===void 0&&(t[a]=e(a)),t[a]}}var V6a=function(e,t,a){for(var r=0,n=0;r=n,n=ad(),r===38&&n===12&&(t[a]=1),!yw(n);)Ml();return vw(e,Xs)},F6a=function(e,t){var a=-1,r=44;do switch(yw(r)){case 0:r===38&&ad()===12&&(t[a]=1),e[a]+=V6a(Xs-1,t,a);break;case 2:e[a]+=Q3(r);break;case 4:if(r===44){e[++a]=ad()===58?"&\f":"",t[a]=e[a].length;break}default:e[a]+=q3(r)}while(r=Ml());return e},G6a=function(e,t){return gMe(F6a(fMe(e),t))},bMe=new WeakMap,q6a=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,a=e.parent,r=e.column===a.column&&e.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!bMe.get(a))&&!r){bMe.set(e,!0);for(var n=[],i=G6a(t,n),o=a.props,s=0,l=0;s<i.length;s++)for(var c=0;c<o.length;c++,l++)e.props[l]=n[s]?i[s].replace(/&\f/g,o[c]):o[c]+" "+i[s]}}},J6a=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function kMe(e,t){switch(A6a(e,t)){case 5103:return Sr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Sr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Sr+e+G3+e+Uo+e+e;case 6828:case 4268:return Sr+e+Uo+e+e;case 6165:return Sr+e+Uo+"flex-"+e+e;case 5187:return Sr+e+Tr(e,/(\w+).+(:[^]+)/,Sr+"box-$1$2"+Uo+"flex-$1$2")+e;case 5443:return Sr+e+Uo+"flex-item-"+Tr(e,/flex-|-self/,"")+e;case 4675:return Sr+e+Uo+"flex-line-pack"+Tr(e,/align-content|flex-|-self/,"")+e;case 5548:return Sr+e+Uo+Tr(e,"shrink","negative")+e;case 5292:return Sr+e+Uo+Tr(e,"basis","preferred-size")+e;case 6060:return Sr+"box-"+Tr(e,"-grow","")+Sr+e+Uo+Tr(e,"grow","positive")+e;case 4554:return Sr+Tr(e,/([^-])(transform)/g,"$1"+Sr+"$2")+e;case 6187:return Tr(Tr(Tr(e,/(zoom-|grab)/,Sr+"$1"),/(image-set)/,Sr+"$1"),e,"")+e;case 5495:case 3959:return Tr(e,/(image-set\([^]*)/,Sr+"$1$`$1");case 4968:return Tr(Tr(e,/(.+:)(flex-)?(.*)/,Sr+"box-pack:$3"+Uo+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Sr+e+e;case 4095:case 3583:case 4068:case 2532:return Tr(e,/(.+)-inline(.+)/,Sr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(td(e)-1-t>6)switch(go(e,t+1)){case 109:if(go(e,t+4)!==45)break;case 102:return Tr(e,/(.+:)(.+)-([^]+)/,"$1"+Sr+"$2-$3$1"+G3+(go(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~zK(e,"stretch")?kMe(Tr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(go(e,t+1)!==115)break;case 6444:switch(go(e,td(e)-3-(~zK(e,"!important")&&10))){case 107:return Tr(e,":",":"+Sr)+e;case 101:return Tr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Sr+(go(e,14)===45?"inline-":"")+"box$3$1"+Sr+"$2$3$1"+Uo+"$2box$3")+e}break;case 5936:switch(go(e,t+11)){case 114:return Sr+e+Uo+Tr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Sr+e+Uo+Tr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Sr+e+Uo+Tr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Sr+e+Uo+e+e}return e}var W6a=function(e,t,a,r){if(e.length>-1&&!e.return)switch(e.type){case wK:e.return=kMe(e.value,e.length);break;case pMe:return ib([gw(e,{value:Tr(e.value,"@","@"+Sr)})],r);case xK:if(e.length)return M6a(e.props,function(n){switch(P6a(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ib([gw(e,{props:[Tr(n,/:(read-\w+)/,":"+G3+"$1")]})],r);case"::placeholder":return ib([gw(e,{props:[Tr(n,/:(plac\w+)/,":"+Sr+"input-$1")]}),gw(e,{props:[Tr(n,/:(plac\w+)/,":"+G3+"$1")]}),gw(e,{props:[Tr(n,/:(plac\w+)/,Uo+"input-$1")]})],r)}return""})}},U6a=[W6a],Z6a=function(e){var t=e.key;if(t==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(g){var k=g.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=e.stylisPlugins||U6a,n={},i,o=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(g){for(var k=g.getAttribute("data-emotion").split(" "),y=1;y<k.length;y++)n[k[y]]=!0;o.push(g)});var s,l=[q6a,J6a];{var c,u=[$6a,K6a(function(g){c.insert(g)})],d=I6a(l.concat(r,u)),p=function(g){return ib(D6a(g),d)};s=function(g,k,y,f){c=y,p(g?g+"{"+k.styles+"}":k.styles),f&&(h.inserted[k.name]=!0)}}var h={key:t,sheet:new S6a({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:n,registered:{},insert:s};return h.sheet.hydrate(o),h},Q6a=!0;function Y6a(e,t,a){var r="";return a.split(" ").forEach(function(n){e[n]!==void 0?t.push(e[n]+";"):r+=n+" "}),r}var xMe=function(e,t,a){var r=e.key+"-"+t.name;(a===!1||Q6a===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},X6a=function(e,t,a){xMe(e,t,a);var r=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var n=t;do e.insert(t===n?"."+r:"",n,e.sheet,!0),n=n.next;while(n!==void 0)}};function e9a(e){for(var t=0,a,r=0,n=e.length;n>=4;++r,n-=4)a=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,a=(a&65535)*1540483477+((a>>>16)*59797<<16),a^=a>>>24,t=(a&65535)*1540483477+((a>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(n){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var t9a={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a9a=/[A-Z]|^ms/g,r9a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wMe=function(e){return e.charCodeAt(1)===45},zMe=function(e){return e!=null&&typeof e!="boolean"},CK=H6a(function(e){return wMe(e)?e:e.replace(a9a,"-$&").toLowerCase()}),SMe=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(r9a,function(a,r,n){return rd={name:r,styles:n,next:rd},r})}return t9a[e]!==1&&!wMe(e)&&typeof t=="number"&&t!==0?t+"px":t};function bw(e,t,a){if(a==null)return"";if(a.__emotion_styles!==void 0)return a;switch(typeof a){case"boolean":return"";case"object":{if(a.anim===1)return rd={name:a.name,styles:a.styles,next:rd},a.name;if(a.styles!==void 0){var r=a.next;if(r!==void 0)for(;r!==void 0;)rd={name:r.name,styles:r.styles,next:rd},r=r.next;var n=a.styles+";";return n}return n9a(e,t,a)}case"function":{if(e!==void 0){var i=rd,o=a(e);return rd=i,bw(e,t,o)}break}}return a}function n9a(e,t,a){var r="";if(Array.isArray(a))for(var n=0;n<a.length;n++)r+=bw(e,t,a[n])+";";else for(var i in a){var o=a[i];if(typeof o!="object")zMe(o)&&(r+=CK(i)+":"+SMe(i,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var s=0;s<o.length;s++)zMe(o[s])&&(r+=CK(i)+":"+SMe(i,o[s])+";");else{var l=bw(e,t,o);switch(i){case"animation":case"animationName":{r+=CK(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var jMe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,rd,CMe=function(e,t,a){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,n="";rd=void 0;var i=e[0];i==null||i.raw===void 0?(r=!1,n+=bw(a,t,i)):n+=i[0];for(var o=1;o<e.length;o++)n+=bw(a,t,e[o]),r&&(n+=i[o]);jMe.lastIndex=0;for(var s="",l;(l=jMe.exec(n))!==null;)s+="-"+l[1];var c=e9a(n)+s;return{name:c,styles:n,next:rd}},i9a=function(e){return e()},o9a=jm.useInsertionEffect?jm.useInsertionEffect:!1,s9a=o9a||i9a,OK={}.hasOwnProperty,l9a=I.createContext(typeof HTMLElement<"u"?Z6a({key:"css"}):null),c9a=function(e){return I.forwardRef(function(t,a){var r=I.useContext(l9a);return e(t,r,a)})},u9a=I.createContext({}),AK="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",d9a=function(e,t){var a={};for(var r in t)OK.call(t,r)&&(a[r]=t[r]);return a[AK]=e,a},p9a=function(e){var t=e.cache,a=e.serialized,r=e.isStringTag;return xMe(t,a,r),s9a(function(){return X6a(t,a,r)}),null},h9a=c9a(function(e,t,a){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var n=e[AK],i=[r],o="";typeof e.className=="string"?o=Y6a(t.registered,i,e.className):e.className!=null&&(o=e.className+" ");var s=CMe(i,void 0,I.useContext(u9a));o+=t.key+"-"+s.name;var l={};for(var c in e)OK.call(e,c)&&c!=="css"&&c!==AK&&(l[c]=e[c]);return l.ref=a,l.className=o,I.createElement(I.Fragment,null,I.createElement(p9a,{cache:t,serialized:s,isStringTag:typeof n=="string"}),I.createElement(n,l))}),Xt=function(e,t){var a=arguments;if(t==null||!OK.call(t,"css"))return I.createElement.apply(void 0,a);var r=a.length,n=new Array(r);n[0]=h9a,n[1]=d9a(e,t);for(var i=2;i<r;i++)n[i]=a[i];return I.createElement.apply(null,n)};function PK(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return CMe(t)}var m9a=function(){var e=PK.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function f9a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const g9a=Math.min,v9a=Math.max,X3=Math.round,eT=Math.floor,tT=e=>({x:e,y:e});function y9a(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function OMe(e){return PMe(e)?(e.nodeName||"").toLowerCase():"#document"}function dp(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function AMe(e){var t;return(t=(PMe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function PMe(e){return e instanceof Node||e instanceof dp(e).Node}function b9a(e){return e instanceof Element||e instanceof dp(e).Element}function MK(e){return e instanceof HTMLElement||e instanceof dp(e).HTMLElement}function MMe(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dp(e).ShadowRoot}function TMe(e){const{overflow:t,overflowX:a,overflowY:r,display:n}=TK(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+a)&&!["inline","contents"].includes(n)}function k9a(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function x9a(e){return["html","body","#document"].includes(OMe(e))}function TK(e){return dp(e).getComputedStyle(e)}function w9a(e){if(OMe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||MMe(e)&&e.host||AMe(e);return MMe(t)?t.host:t}function _Me(e){const t=w9a(e);return x9a(t)?e.ownerDocument?e.ownerDocument.body:e.body:MK(t)&&TMe(t)?t:_Me(t)}function aT(e,t,a){var r;t===void 0&&(t=[]),a===void 0&&(a=!0);const n=_Me(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=dp(n);return i?t.concat(o,o.visualViewport||[],TMe(n)?n:[],o.frameElement&&a?aT(o.frameElement):[]):t.concat(n,aT(n,[],a))}function z9a(e){const t=TK(e);let a=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const n=MK(e),i=n?e.offsetWidth:a,o=n?e.offsetHeight:r,s=X3(a)!==i||X3(r)!==o;return s&&(a=i,r=o),{width:a,height:r,$:s}}function _K(e){return b9a(e)?e:e.contextElement}function RMe(e){const t=_K(e);if(!MK(t))return tT(1);const a=t.getBoundingClientRect(),{width:r,height:n,$:i}=z9a(t);let o=(i?X3(a.width):a.width)/r,s=(i?X3(a.height):a.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const S9a=tT(0);function j9a(e){const t=dp(e);return!k9a()||!t.visualViewport?S9a:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function C9a(e,t,a){return!1}function LMe(e,t,a,r){t===void 0&&(t=!1);const n=e.getBoundingClientRect(),i=_K(e);let o=tT(1);t&&(o=RMe(e));const s=C9a()?j9a(i):tT(0);let l=(n.left+s.x)/o.x,c=(n.top+s.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(i){const p=dp(i),h=r;let g=p.frameElement;for(;g&&r&&h!==p;){const k=RMe(g),y=g.getBoundingClientRect(),f=TK(g),v=y.left+(g.clientLeft+parseFloat(f.paddingLeft))*k.x,x=y.top+(g.clientTop+parseFloat(f.paddingTop))*k.y;l*=k.x,c*=k.y,u*=k.x,d*=k.y,l+=v,c+=x,g=dp(g).frameElement}}return y9a({width:u,height:d,x:l,y:c})}function O9a(e,t){let a=null,r;const n=AMe(e);function i(){clearTimeout(r),a&&a.disconnect(),a=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h=eT(u),g=eT(n.clientWidth-(c+d)),k=eT(n.clientHeight-(u+p)),y=eT(c),f={rootMargin:-h+"px "+-g+"px "+-k+"px "+-y+"px",threshold:v9a(0,g9a(1,l))||1};let v=!0;function x(j){const z=j[0].intersectionRatio;if(z!==l){if(!v)return o();z?o(!1,z):r=setTimeout(()=>{o(!1,1e-7)},100)}v=!1}try{a=new IntersectionObserver(x,{...f,root:n.ownerDocument})}catch{a=new IntersectionObserver(x,f)}a.observe(e)}return o(!0),i}function A9a(e,t,a,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=_K(e),u=n||i?[...c?aT(c):[],...aT(t)]:[];u.forEach(f=>{n&&f.addEventListener("scroll",a,{passive:!0}),i&&f.addEventListener("resize",a)});const d=c&&s?O9a(c,a):null;let p=-1,h=null;o&&(h=new ResizeObserver(f=>{let[v]=f;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{h&&h.observe(t)})),a()}),c&&!l&&h.observe(c),h.observe(t));let g,k=l?LMe(e):null;l&&y();function y(){const f=LMe(e);k&&(f.x!==k.x||f.y!==k.y||f.width!==k.width||f.height!==k.height)&&a(),k=f,g=requestAnimationFrame(y)}return a(),()=>{u.forEach(f=>{n&&f.removeEventListener("scroll",a),i&&f.removeEventListener("resize",a)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var RK=I.useLayoutEffect,P9a=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],rT=function(){};function M9a(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function T9a(e,t){for(var a=arguments.length,r=new Array(a>2?a-2:0),n=2;n<a;n++)r[n-2]=arguments[n];var i=[].concat(r);if(t&&e)for(var o in t)t.hasOwnProperty(o)&&t[o]&&i.push("".concat(M9a(e,o)));return i.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var BMe=function(e){return I9a(e)?e.filter(Boolean):Kf(e)==="object"&&e!==null?[e]:[]},EMe=function(e){var t=up(e,P9a);return ta({},t)},Un=function(e,t,a){var r=e.cx,n=e.getStyles,i=e.getClassNames,o=e.className;return{css:n(t,e),className:r(a??{},i(t,e),o)}};function nT(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function _9a(e){return nT(e)?window.innerHeight:e.clientHeight}function DMe(e){return nT(e)?window.pageYOffset:e.scrollTop}function iT(e,t){if(nT(e)){window.scrollTo(0,t);return}e.scrollTop=t}function R9a(e){var t=getComputedStyle(e),a=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var n=e;n=n.parentElement;)if(t=getComputedStyle(n),!(a&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return n;return document.documentElement}function L9a(e,t,a,r){return a*((e=e/r-1)*e*e+1)+t}function oT(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:rT,n=DMe(e),i=t-n,o=10,s=0;function l(){s+=o;var c=L9a(s,n,i,a);iT(e,c),s<a?window.requestAnimationFrame(l):r(e)}l()}function NMe(e,t){var a=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n=t.offsetHeight/3;r.bottom+n>a.bottom?iT(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+n,e.scrollHeight)):r.top-n<a.top&&iT(e,Math.max(t.offsetTop-n,0))}function B9a(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function $Me(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function E9a(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var IMe=!1,D9a={get passive(){return IMe=!0}},sT=typeof window<"u"?window:{};sT.addEventListener&&sT.removeEventListener&&(sT.addEventListener("p",rT,D9a),sT.removeEventListener("p",rT,!1));var N9a=IMe;function $9a(e){return e!=null}function I9a(e){return Array.isArray(e)}function lT(e,t,a){return e?t:a}var K9a=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),r=1;r<t;r++)a[r-1]=arguments[r];var n=Object.entries(e).filter(function(i){var o=cp(i,1),s=o[0];return!a.includes(s)});return n.reduce(function(i,o){var s=cp(o,2),l=s[0],c=s[1];return i[l]=c,i},{})},H9a=["children","innerProps"],V9a=["children","innerProps"];function F9a(e){var t=e.maxHeight,a=e.menuEl,r=e.minHeight,n=e.placement,i=e.shouldScroll,o=e.isFixedPosition,s=e.controlHeight,l=R9a(a),c={placement:"bottom",maxHeight:t};if(!a||!a.offsetParent)return c;var u=l.getBoundingClientRect(),d=u.height,p=a.getBoundingClientRect(),h=p.bottom,g=p.height,k=p.top,y=a.offsetParent.getBoundingClientRect(),f=y.top,v=o?window.innerHeight:_9a(l),x=DMe(l),j=parseInt(getComputedStyle(a).marginBottom,10),z=parseInt(getComputedStyle(a).marginTop,10),S=f-z,C=v-k,M=S+x,T=d-x-k,B=h-v+x+j,q=x+k-z,$=160;switch(n){case"auto":case"bottom":if(C>=g)return{placement:"bottom",maxHeight:t};if(T>=g&&!o)return i&&oT(l,B,$),{placement:"bottom",maxHeight:t};if(!o&&T>=r||o&&C>=r){i&&oT(l,B,$);var W=o?C-j:T-j;return{placement:"bottom",maxHeight:W}}if(n==="auto"||o){var H=t,ee=o?S:M;return ee>=r&&(H=Math.min(ee-j-s,t)),{placement:"top",maxHeight:H}}if(n==="bottom")return i&&iT(l,B),{placement:"bottom",maxHeight:t};break;case"top":if(S>=g)return{placement:"top",maxHeight:t};if(M>=g&&!o)return i&&oT(l,q,$),{placement:"top",maxHeight:t};if(!o&&M>=r||o&&S>=r){var ae=t;return(!o&&M>=r||o&&S>=r)&&(ae=o?S-z:M-z),i&&oT(l,q,$),{placement:"top",maxHeight:ae}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(n,'".'))}return c}function G9a(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var KMe=function(e){return e==="auto"?"bottom":e},q9a=function(e,t){var a,r=e.placement,n=e.theme,i=n.borderRadius,o=n.spacing,s=n.colors;return ta((a={label:"menu"},mw(a,G9a(r),"100%"),mw(a,"position","absolute"),mw(a,"width","100%"),mw(a,"zIndex",1),a),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},HMe=I.createContext(null),J9a=function(e){var t=e.children,a=e.minMenuHeight,r=e.maxMenuHeight,n=e.menuPlacement,i=e.menuPosition,o=e.menuShouldScrollIntoView,s=e.theme,l=I.useContext(HMe)||{},c=l.setPortalPlacement,u=I.useRef(null),d=I.useState(r),p=cp(d,2),h=p[0],g=p[1],k=I.useState(null),y=cp(k,2),f=y[0],v=y[1],x=s.spacing.controlHeight;return RK(function(){var j=u.current;if(j){var z=i==="fixed",S=o&&!z,C=F9a({maxHeight:r,menuEl:j,minHeight:a,placement:n,shouldScroll:S,isFixedPosition:z,controlHeight:x});g(C.maxHeight),v(C.placement),c?.(C.placement)}},[r,n,i,o,a,c,x]),t({ref:u,placerProps:ta(ta({},e),{},{placement:f||KMe(n),maxHeight:h})})},W9a=function(e){var t=e.children,a=e.innerRef,r=e.innerProps;return Xt("div",sa({},Un(e,"menu",{menu:!0}),{ref:a},r),t)},U9a=W9a,Z9a=function(e,t){var a=e.maxHeight,r=e.theme.spacing.baseUnit;return ta({maxHeight:a,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},Q9a=function(e){var t=e.children,a=e.innerProps,r=e.innerRef,n=e.isMulti;return Xt("div",sa({},Un(e,"menuList",{"menu-list":!0,"menu-list--is-multi":n}),{ref:r},a),t)},VMe=function(e,t){var a=e.theme,r=a.spacing.baseUnit,n=a.colors;return ta({textAlign:"center"},t?{}:{color:n.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},Y9a=VMe,X9a=VMe,e8a=function(e){var t=e.children,a=t===void 0?"No options":t,r=e.innerProps,n=up(e,H9a);return Xt("div",sa({},Un(ta(ta({},n),{},{children:a,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),a)},t8a=function(e){var t=e.children,a=t===void 0?"Loading...":t,r=e.innerProps,n=up(e,V9a);return Xt("div",sa({},Un(ta(ta({},n),{},{children:a,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),a)},a8a=function(e){var t=e.rect,a=e.offset,r=e.position;return{left:t.left,position:r,top:a,width:t.width,zIndex:1}},r8a=function(e){var t=e.appendTo,a=e.children,r=e.controlElement,n=e.innerProps,i=e.menuPlacement,o=e.menuPosition,s=I.useRef(null),l=I.useRef(null),c=I.useState(KMe(i)),u=cp(c,2),d=u[0],p=u[1],h=I.useMemo(function(){return{setPortalPlacement:p}},[]),g=I.useState(null),k=cp(g,2),y=k[0],f=k[1],v=I.useCallback(function(){if(r){var S=B9a(r),C=o==="fixed"?0:window.pageYOffset,M=S[d]+C;(M!==y?.offset||S.left!==y?.rect.left||S.width!==y?.rect.width)&&f({offset:M,rect:S})}},[r,o,d,y?.offset,y?.rect.left,y?.rect.width]);RK(function(){v()},[v]);var x=I.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),r&&s.current&&(l.current=A9a(r,s.current,v,{elementResize:"ResizeObserver"in window}))},[r,v]);RK(function(){x()},[x]);var j=I.useCallback(function(S){s.current=S,x()},[x]);if(!t&&o!=="fixed"||!y)return null;var z=Xt("div",sa({ref:j},Un(ta(ta({},e),{},{offset:y.offset,position:o,rect:y.rect}),"menuPortal",{"menu-portal":!0}),n),a);return Xt(HMe.Provider,{value:h},t?KS.createPortal(z,t):z)},n8a=function(e){var t=e.isDisabled,a=e.isRtl;return{label:"container",direction:a?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},i8a=function(e){var t=e.children,a=e.innerProps,r=e.isDisabled,n=e.isRtl;return Xt("div",sa({},Un(e,"container",{"--is-disabled":r,"--is-rtl":n}),a),t)},o8a=function(e,t){var a=e.theme.spacing,r=e.isMulti,n=e.hasValue,i=e.selectProps.controlShouldRenderValue;return ta({alignItems:"center",display:r&&n&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(a.baseUnit/2,"px ").concat(a.baseUnit*2,"px")})},s8a=function(e){var t=e.children,a=e.innerProps,r=e.isMulti,n=e.hasValue;return Xt("div",sa({},Un(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":n}),a),t)},l8a=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},c8a=function(e){var t=e.children,a=e.innerProps;return Xt("div",sa({},Un(e,"indicatorsContainer",{indicators:!0}),a),t)},FMe,u8a=["size"],d8a=["innerProps","isRtl","size"],p8a={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},GMe=function(e){var t=e.size,a=up(e,u8a);return Xt("svg",sa({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:p8a},a))},LK=function(e){return Xt(GMe,sa({size:20},e),Xt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},qMe=function(e){return Xt(GMe,sa({size:20},e),Xt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},JMe=function(e,t){var a=e.isFocused,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return ta({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:a?i.neutral60:i.neutral20,padding:n*2,":hover":{color:a?i.neutral80:i.neutral40}})},h8a=JMe,m8a=function(e){var t=e.children,a=e.innerProps;return Xt("div",sa({},Un(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),a),t||Xt(qMe,null))},f8a=JMe,g8a=function(e){var t=e.children,a=e.innerProps;return Xt("div",sa({},Un(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),a),t||Xt(LK,null))},v8a=function(e,t){var a=e.isDisabled,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return ta({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:a?i.neutral10:i.neutral20,marginBottom:n*2,marginTop:n*2})},y8a=function(e){var t=e.innerProps;return Xt("span",sa({},t,Un(e,"indicatorSeparator",{"indicator-separator":!0})))},b8a=m9a(FMe||(FMe=f9a([`
|
|
11876
11849
|
0%, 80%, 100% { opacity: 0; }
|
|
@@ -15264,7 +15237,7 @@ Use the data prop if you want to provide your own handlers.`);if(e.initialData){
|
|
|
15264
15237
|
color: var(--color-error-base);
|
|
15265
15238
|
font-size: var(--font-size-sm);
|
|
15266
15239
|
padding: 0 var(--spacing-xs);
|
|
15267
|
-
`;function H9e(e,t){if(!e)return"Provide a name for the environment";if(t.has(e))return"An environment with this name already exists";for(let a=0;a<e.length;a++){const r=e.charCodeAt(a);if(r<1||r>127)return"A valid name can only contain letters, numbers, and symbols"}}const NWa=({selectedEnvName:e,onEnvironmentSelect:t,onAddEnvironment:a,onRemoveEnvironment:r})=>{const{environments:n,activeEnvironmentId:i,predefinedEnvironmentNames:o}=Ua(),{sendEvent:s}=Ea(),[l,c]=I.useState(!1),u=y=>{const{name:f}=y.get();y.set(ya),r(f),s("environment.management",{action:"removed",name:f})},d=y=>{const{name:f}=y.get();i.set(f)},p=()=>{c(!0)},h=y=>{s("environment.management",{action:"creation_finished",name:y}),c(!1),a?.(y)},g=()=>{c(!1),s("environment.management",{action:"creation_canceled"})},k=y=>{const f=new Set(n.get().map(v=>v.name));return H9e(y,f)};return m.jsxs($Wa,{children:[m.jsx(IWa,{children:"Environments"}),m.jsxs(KWa,{children:[m.jsxs(HWa,{children:[n.filter(y=>y.state.get()!==pr.Draft).map(y=>{const f=y.name.get(),v=f===i.get(),x=f===e,j=f===yx,z=o.get().has(f),S=!j&&!z;return m.jsxs(F9e,{$isActive:v,$isSelected:x,onClick:()=>t(f),"data-testid":`environment-${f}`,children:[m.jsxs(GWa,{children:[v?m.jsx(Fg,{color:"var(--color-success-base)"}):m.jsx(CWa,{}),m.jsx("span",{children:f})]}),m.jsx(V9e,{children:(!v||S)&&m.jsx(Oo,{triggerEvent:"hover",trigger:m.jsx(tt,{variant:"text",size:"small",icon:m.jsx(uv,{}),"data-testid":`environment-actions-btn-${f}`}),alignment:"end",children:m.jsxs(Ao,{children:[!v&&m.jsxs(fc,{onClick:()=>{d(y)},children:[m.jsx(SWa,{size:"14px"}),"Set
|
|
15240
|
+
`;function H9e(e,t){if(!e)return"Provide a name for the environment";if(t.has(e))return"An environment with this name already exists";for(let a=0;a<e.length;a++){const r=e.charCodeAt(a);if(r<1||r>127)return"A valid name can only contain letters, numbers, and symbols"}}const NWa=({selectedEnvName:e,onEnvironmentSelect:t,onAddEnvironment:a,onRemoveEnvironment:r})=>{const{environments:n,activeEnvironmentId:i,predefinedEnvironmentNames:o}=Ua(),{sendEvent:s}=Ea(),[l,c]=I.useState(!1),u=y=>{const{name:f}=y.get();y.set(ya),r(f),s("environment.management",{action:"removed",name:f})},d=y=>{const{name:f}=y.get();i.set(f)},p=()=>{c(!0)},h=y=>{s("environment.management",{action:"creation_finished",name:y}),c(!1),a?.(y)},g=()=>{c(!1),s("environment.management",{action:"creation_canceled"})},k=y=>{const f=new Set(n.get().map(v=>v.name));return H9e(y,f)};return m.jsxs($Wa,{children:[m.jsx(IWa,{children:"Environments"}),m.jsxs(KWa,{children:[m.jsxs(HWa,{children:[n.filter(y=>y.state.get()!==pr.Draft).map(y=>{const f=y.name.get(),v=f===i.get(),x=f===e,j=f===yx,z=o.get().has(f),S=!j&&!z;return m.jsxs(F9e,{$isActive:v,$isSelected:x,onClick:()=>t(f),"data-testid":`environment-${f}`,children:[m.jsxs(GWa,{children:[v?m.jsx(Fg,{color:"var(--color-success-base)"}):m.jsx(CWa,{}),m.jsx("span",{children:f})]}),m.jsx(V9e,{children:(!v||S)&&m.jsx(Oo,{triggerEvent:"hover",trigger:m.jsx(tt,{variant:"text",size:"small",icon:m.jsx(uv,{}),"data-testid":`environment-actions-btn-${f}`}),alignment:"end",children:m.jsxs(Ao,{children:[!v&&m.jsxs(fc,{onClick:()=>{d(y)},children:[m.jsx(SWa,{size:"14px"}),"Set as active"]}),S&&m.jsx(Mb,{description:RWa.replace("{name}",f),onConfirm:()=>{u(y)},children:m.jsxs(fc,{"data-testid":`remove-environment-${f}`,children:[m.jsx(ri,{size:"14px"}),"Remove environment"]})})]})})})]},f)}),l&&m.jsxs(VWa,{$isActive:!1,$isSelected:!0,children:[m.jsx(FWa,{children:m.jsx(ks,{})}),m.jsx(K9e,{placeholder:"New environment",defaultName:"",onApplyNewName:h,onCancelEditing:g,validate:k})]})]}),m.jsx(qWa,{children:m.jsx("div",{children:m.jsx(tt,{variant:"text",size:"small",icon:m.jsx(ks,{}),iconPosition:"left",onClick:p,"data-testid":"add-environment-btn",children:"New environment"})})})]})]})},$Wa=U.div`
|
|
15268
15241
|
width: 280px;
|
|
15269
15242
|
border: 1px solid var(--border-color-secondary);
|
|
15270
15243
|
border-radius: var(--border-radius);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.15.0-next.
|
|
3
|
+
"version": "3.15.0-next.7",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
39
|
"@redocly/config": "0.36.1",
|
|
40
|
-
"@redocly/replay": "0.18.0-next.
|
|
40
|
+
"@redocly/replay": "0.18.0-next.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"typescript": "5.9.3",
|
|
76
76
|
"url": "~0.11.0",
|
|
77
77
|
"vite": "7.1.9",
|
|
78
|
-
"@redocly/theme": "0.59.0-next.
|
|
78
|
+
"@redocly/theme": "0.59.0-next.6"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"start": "npm run copy-highlight-hook && vite",
|